Skip to content

Instantly share code, notes, and snippets.

@hiroto-takatoshi
Created April 30, 2018 19:06
Show Gist options
  • Save hiroto-takatoshi/834d40df72fab074e949efb3fc262c28 to your computer and use it in GitHub Desktop.
Save hiroto-takatoshi/834d40df72fab074e949efb3fc262c28 to your computer and use it in GitHub Desktop.
enza-game.min.js
This file has been truncated, but you can view the full file.
! function(t, e) {
"object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.ezg = e() : t.ezg = e()
}(window, function() {
return function(t) {
var e = {};
function r(n) {
if (e[n]) return e[n].exports;
var i = e[n] = {
i: n,
l: !1,
exports: {}
};
return t[n].call(i.exports, i, i.exports, r), i.l = !0, i.exports
}
return r.m = t, r.c = e, r.d = function(t, e, n) {
r.o(t, e) || Object.defineProperty(t, e, {
configurable: !1,
enumerable: !0,
get: n
})
}, r.r = function(t) {
Object.defineProperty(t, "__esModule", {
value: !0
})
}, r.n = function(t) {
var e = t && t.__esModule ? function() {
return t.default
} : function() {
return t
};
return r.d(e, "a", e), e
}, r.o = function(t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}, r.p = "", r(r.s = 102)
}([function(t, e, r) {
"use strict";
e.__esModule = !0, e.autoDetectRenderer = e.Application = e.Filter = e.SpriteMaskFilter = e.Quad = e.RenderTarget = e.ObjectRenderer = e.WebGLManager = e.Shader = e.CanvasRenderTarget = e.TextureUvs = e.VideoBaseTexture = e.BaseRenderTexture = e.RenderTexture = e.BaseTexture = e.TextureMatrix = e.Texture = e.Spritesheet = e.CanvasGraphicsRenderer = e.GraphicsRenderer = e.GraphicsData = e.Graphics = e.TextMetrics = e.TextStyle = e.Text = e.SpriteRenderer = e.CanvasTinter = e.CanvasSpriteRenderer = e.Sprite = e.TransformBase = e.TransformStatic = e.Transform = e.Container = e.DisplayObject = e.Bounds = e.glCore = e.WebGLRenderer = e.CanvasRenderer = e.ticker = e.utils = e.settings = void 0;
var n = r(1);
Object.keys(n).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return n[t]
}
})
});
var i = r(5);
Object.keys(i).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return i[t]
}
})
});
var o = r(6);
Object.defineProperty(e, "glCore", {
enumerable: !0,
get: function() {
return z(o).default
}
});
var a = r(28);
Object.defineProperty(e, "Bounds", {
enumerable: !0,
get: function() {
return z(a).default
}
});
var s = r(54);
Object.defineProperty(e, "DisplayObject", {
enumerable: !0,
get: function() {
return z(s).default
}
});
var u = r(11);
Object.defineProperty(e, "Container", {
enumerable: !0,
get: function() {
return z(u).default
}
});
var l = r(56);
Object.defineProperty(e, "Transform", {
enumerable: !0,
get: function() {
return z(l).default
}
});
var h = r(55);
Object.defineProperty(e, "TransformStatic", {
enumerable: !0,
get: function() {
return z(h).default
}
});
var c = r(30);
Object.defineProperty(e, "TransformBase", {
enumerable: !0,
get: function() {
return z(c).default
}
});
var f = r(31);
Object.defineProperty(e, "Sprite", {
enumerable: !0,
get: function() {
return z(f).default
}
});
var d = r(133);
Object.defineProperty(e, "CanvasSpriteRenderer", {
enumerable: !0,
get: function() {
return z(d).default
}
});
var p = r(35);
Object.defineProperty(e, "CanvasTinter", {
enumerable: !0,
get: function() {
return z(p).default
}
});
var v = r(136);
Object.defineProperty(e, "SpriteRenderer", {
enumerable: !0,
get: function() {
return z(v).default
}
});
var y = r(152);
Object.defineProperty(e, "Text", {
enumerable: !0,
get: function() {
return z(y).default
}
});
var g = r(69);
Object.defineProperty(e, "TextStyle", {
enumerable: !0,
get: function() {
return z(g).default
}
});
var m = r(70);
Object.defineProperty(e, "TextMetrics", {
enumerable: !0,
get: function() {
return z(m).default
}
});
var _ = r(154);
Object.defineProperty(e, "Graphics", {
enumerable: !0,
get: function() {
return z(_).default
}
});
var b = r(71);
Object.defineProperty(e, "GraphicsData", {
enumerable: !0,
get: function() {
return z(b).default
}
});
var x = r(156);
Object.defineProperty(e, "GraphicsRenderer", {
enumerable: !0,
get: function() {
return z(x).default
}
});
var w = r(163);
Object.defineProperty(e, "CanvasGraphicsRenderer", {
enumerable: !0,
get: function() {
return z(w).default
}
});
var T = r(164);
Object.defineProperty(e, "Spritesheet", {
enumerable: !0,
get: function() {
return z(T).default
}
});
var E = r(8);
Object.defineProperty(e, "Texture", {
enumerable: !0,
get: function() {
return z(E).default
}
});
var S = r(67);
Object.defineProperty(e, "TextureMatrix", {
enumerable: !0,
get: function() {
return z(S).default
}
});
var M = r(10);
Object.defineProperty(e, "BaseTexture", {
enumerable: !0,
get: function() {
return z(M).default
}
});
var P = r(34);
Object.defineProperty(e, "RenderTexture", {
enumerable: !0,
get: function() {
return z(P).default
}
});
var O = r(62);
Object.defineProperty(e, "BaseRenderTexture", {
enumerable: !0,
get: function() {
return z(O).default
}
});
var C = r(59);
Object.defineProperty(e, "VideoBaseTexture", {
enumerable: !0,
get: function() {
return z(C).default
}
});
var A = r(60);
Object.defineProperty(e, "TextureUvs", {
enumerable: !0,
get: function() {
return z(A).default
}
});
var R = r(63);
Object.defineProperty(e, "CanvasRenderTarget", {
enumerable: !0,
get: function() {
return z(R).default
}
});
var I = r(14);
Object.defineProperty(e, "Shader", {
enumerable: !0,
get: function() {
return z(I).default
}
});
var D = r(13);
Object.defineProperty(e, "WebGLManager", {
enumerable: !0,
get: function() {
return z(D).default
}
});
var k = r(18);
Object.defineProperty(e, "ObjectRenderer", {
enumerable: !0,
get: function() {
return z(k).default
}
});
var N = r(20);
Object.defineProperty(e, "RenderTarget", {
enumerable: !0,
get: function() {
return z(N).default
}
});
var L = r(68);
Object.defineProperty(e, "Quad", {
enumerable: !0,
get: function() {
return z(L).default
}
});
var j = r(65);
Object.defineProperty(e, "SpriteMaskFilter", {
enumerable: !0,
get: function() {
return z(j).default
}
});
var F = r(66);
Object.defineProperty(e, "Filter", {
enumerable: !0,
get: function() {
return z(F).default
}
});
var B = r(73);
Object.defineProperty(e, "Application", {
enumerable: !0,
get: function() {
return z(B).default
}
});
var U = r(74);
Object.defineProperty(e, "autoDetectRenderer", {
enumerable: !0,
get: function() {
return U.autoDetectRenderer
}
});
var X = H(r(3)),
V = H(r(33)),
W = z(r(4)),
Y = z(r(12)),
G = z(r(19));
function H(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}
function z(t) {
return t && t.__esModule ? t : {
default: t
}
}
e.settings = W.default, e.utils = X, e.ticker = V, e.CanvasRenderer = Y.default, e.WebGLRenderer = G.default
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
e.VERSION = "4.7.0", e.PI_2 = 2 * Math.PI, e.RAD_TO_DEG = 180 / Math.PI, e.DEG_TO_RAD = Math.PI / 180, e.RENDERER_TYPE = {
UNKNOWN: 0,
WEBGL: 1,
CANVAS: 2
}, e.BLEND_MODES = {
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,
NORMAL_NPM: 17,
ADD_NPM: 18,
SCREEN_NPM: 19
}, e.DRAW_MODES = {
POINTS: 0,
LINES: 1,
LINE_LOOP: 2,
LINE_STRIP: 3,
TRIANGLES: 4,
TRIANGLE_STRIP: 5,
TRIANGLE_FAN: 6
}, e.SCALE_MODES = {
LINEAR: 0,
NEAREST: 1
}, e.WRAP_MODES = {
CLAMP: 0,
REPEAT: 1,
MIRRORED_REPEAT: 2
}, e.GC_MODES = {
AUTO: 0,
MANUAL: 1
}, e.URL_FILE_EXTENSION = /\.(\w{3,4})(?:$|\?|#)/i, e.DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i, e.SVG_SIZE = /<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i, e.SHAPES = {
POLY: 0,
RECT: 1,
CIRC: 2,
ELIP: 3,
RREC: 4
}, e.PRECISION = {
LOW: "lowp",
MEDIUM: "mediump",
HIGH: "highp"
}, e.TRANSFORM_MODE = {
STATIC: 0,
DYNAMIC: 1
}, e.TEXT_GRADIENT = {
LINEAR_VERTICAL: 0,
LINEAR_HORIZONTAL: 1
}, e.UPDATE_PRIORITY = {
INTERACTION: 50,
HIGH: 25,
NORMAL: 0,
LOW: -25,
UTILITY: -50
}
}, function(t, e, r) {
"use strict";
(function(t) {
e.__esModule = !0, e.loader = e.prepare = e.particles = e.mesh = e.loaders = e.interaction = e.filters = e.extras = e.extract = e.accessibility = void 0;
var n = r(104);
Object.keys(n).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return n[t]
}
})
});
var i = r(0);
Object.keys(i).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return i[t]
}
})
});
var o, a = r(165),
s = (o = a) && o.__esModule ? o : {
default: o
},
u = g(r(166)),
l = g(r(168)),
h = g(r(76)),
c = g(r(178)),
f = g(r(185)),
d = g(r(187)),
p = g(r(191)),
v = g(r(196)),
y = g(r(201));
function g(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}
i.utils.mixins.performMixins();
var m = d.shared || null;
e.accessibility = u, e.extract = l, e.extras = h, e.filters = c, e.interaction = f, e.loaders = d, e.mesh = p, e.particles = v, e.prepare = y, e.loader = m, "function" == typeof s.default && (0, s.default)(e), t.PIXI = e
}).call(this, r(23))
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.premultiplyBlendMode = e.BaseTextureCache = e.TextureCache = e.mixins = e.pluginTarget = e.EventEmitter = e.removeItems = e.isMobile = void 0, e.uid = function() {
return ++d
}, e.hex2rgb = function(t, e) {
return (e = e || [])[0] = (t >> 16 & 255) / 255, e[1] = (t >> 8 & 255) / 255, e[2] = (255 & t) / 255, e
}, e.hex2string = function(t) {
return t = t.toString(16), "#" + (t = "000000".substr(0, 6 - t.length) + t)
}, e.rgb2hex = function(t) {
return (255 * t[0] << 16) + (255 * t[1] << 8) + (255 * t[2] | 0)
}, e.getResolutionOfUrl = function(t, e) {
var r = i.default.RETINA_PREFIX.exec(t);
if (r) return parseFloat(r[1]);
return void 0 !== e ? e : 1
}, e.decomposeDataUri = function(t) {
var e = n.DATA_URI.exec(t);
if (e) return {
mediaType: e[1] ? e[1].toLowerCase() : void 0,
subType: e[2] ? e[2].toLowerCase() : void 0,
encoding: e[3] ? e[3].toLowerCase() : void 0,
data: e[4]
};
return
}, e.getUrlFileExtension = function(t) {
var e = n.URL_FILE_EXTENSION.exec(t);
if (e) return e[1].toLowerCase();
return
}, e.getSvgSize = function(t) {
var e = n.SVG_SIZE.exec(t),
r = {};
e && (r[e[1]] = Math.round(parseFloat(e[3])), r[e[5]] = Math.round(parseFloat(e[7])));
return r
}, e.skipHello = function() {
p = !0
}, e.sayHello = function(t) {
if (p) return;
if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) {
var e = ["\n %c %c %c PixiJS " + n.VERSION + " - ✰ " + t + " ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n", "background: #ff66a5; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff66a5; background: #030307; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "background: #ffc3dc; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;"];
window.console.log.apply(console, e)
} else window.console && window.console.log("PixiJS " + n.VERSION + " - " + t + " - http://www.pixijs.com/");
p = !0
}, e.isWebGLSupported = function() {
var t = {
stencil: !0,
failIfMajorPerformanceCaveat: !0
};
try {
if (!window.WebGLRenderingContext) return !1;
var e = document.createElement("canvas"),
r = e.getContext("webgl", t) || e.getContext("experimental-webgl", t),
n = !(!r || !r.getContextAttributes().stencil);
if (r) {
var i = r.getExtension("WEBGL_lose_context");
i && i.loseContext()
}
return r = null, n
} catch (t) {
return !1
}
}, e.sign = function(t) {
return 0 === t ? 0 : t < 0 ? -1 : 1
}, e.destroyTextureCache = function() {
var t = void 0;
for (t in v) v[t].destroy();
for (t in y) y[t].destroy()
}, e.clearTextureCache = function() {
var t = void 0;
for (t in v) delete v[t];
for (t in y) delete y[t]
}, e.correctBlendMode = function(t, e) {
return g[e ? 1 : 0][t]
}, e.premultiplyTint = function(t, e) {
if (1 === e) return (255 * e << 24) + t;
if (0 === e) return 0;
var r = t >> 16 & 255,
n = t >> 8 & 255,
i = 255 & t;
return (255 * e << 24) + ((r = r * e + .5 | 0) << 16) + ((n = n * e + .5 | 0) << 8) + (i = i * e + .5 | 0)
}, e.premultiplyRgba = function(t, e, r, n) {
r = r || new Float32Array(4), n || void 0 === n ? (r[0] = t[0] * e, r[1] = t[1] * e, r[2] = t[2] * e) : (r[0] = t[0], r[1] = t[1], r[2] = t[2]);
return r[3] = e, r
}, e.premultiplyTintToRgba = function(t, e, r, n) {
(r = r || new Float32Array(4))[0] = (t >> 16 & 255) / 255, r[1] = (t >> 8 & 255) / 255, r[2] = (255 & t) / 255, (n || void 0 === n) && (r[0] *= e, r[1] *= e, r[2] *= e);
return r[3] = e, r
};
var n = r(1),
i = f(r(4)),
o = f(r(9)),
a = f(r(121)),
s = c(r(122)),
u = c(r(29)),
l = f(r(123)),
h = f(r(124));
function c(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}
function f(t) {
return t && t.__esModule ? t : {
default: t
}
}
var d = 0,
p = !1;
e.isMobile = u, e.removeItems = l.default, e.EventEmitter = o.default, e.pluginTarget = a.default, e.mixins = s;
var v = e.TextureCache = Object.create(null),
y = e.BaseTextureCache = Object.create(null);
var g = e.premultiplyBlendMode = (0, h.default)()
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = o(r(119)),
i = o(r(120));
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
e.default = {
TARGET_FPMS: .06,
MIPMAP_TEXTURES: !0,
RESOLUTION: 1,
FILTER_RESOLUTION: 1,
SPRITE_MAX_TEXTURES: (0, n.default)(32),
SPRITE_BATCH_SIZE: 4096,
RETINA_PREFIX: /@([0-9\.]+)x/,
RENDER_OPTIONS: {
view: null,
antialias: !1,
forceFXAA: !1,
autoResize: !1,
transparent: !1,
backgroundColor: 0,
clearBeforeRender: !0,
preserveDrawingBuffer: !1,
roundPixels: !1,
width: 800,
height: 600,
legacy: !1
},
TRANSFORM_MODE: 0,
GC_MODE: 0,
GC_MAX_IDLE: 3600,
GC_MAX_CHECK_COUNT: 600,
WRAP_MODE: 0,
SCALE_MODE: 0,
PRECISION_VERTEX: "highp",
PRECISION_FRAGMENT: "mediump",
CAN_UPLOAD_SAME_BUFFER: (0, i.default)(),
MESH_CANVAS_PADDING: 0
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(24);
Object.defineProperty(e, "Point", {
enumerable: !0,
get: function() {
return f(n).default
}
});
var i = r(43);
Object.defineProperty(e, "ObservablePoint", {
enumerable: !0,
get: function() {
return f(i).default
}
});
var o = r(25);
Object.defineProperty(e, "Matrix", {
enumerable: !0,
get: function() {
return f(o).default
}
});
var a = r(44);
Object.defineProperty(e, "GroupD8", {
enumerable: !0,
get: function() {
return f(a).default
}
});
var s = r(109);
Object.defineProperty(e, "Circle", {
enumerable: !0,
get: function() {
return f(s).default
}
});
var u = r(110);
Object.defineProperty(e, "Ellipse", {
enumerable: !0,
get: function() {
return f(u).default
}
});
var l = r(111);
Object.defineProperty(e, "Polygon", {
enumerable: !0,
get: function() {
return f(l).default
}
});
var h = r(26);
Object.defineProperty(e, "Rectangle", {
enumerable: !0,
get: function() {
return f(h).default
}
});
var c = r(112);
function f(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "RoundedRectangle", {
enumerable: !0,
get: function() {
return f(c).default
}
})
}, function(t, e, r) {
var n = {
createContext: r(113),
setVertexAttribArrays: r(45),
GLBuffer: r(114),
GLFramebuffer: r(115),
GLShader: r(116),
GLTexture: r(46),
VertexArrayObject: r(117),
shader: r(118)
};
void 0 !== t && t.exports && (t.exports = n), "undefined" != typeof window && (window.PIXI = window.PIXI || {}, window.PIXI.glCore = n)
}, function(t, e, r) {
(function(t) { // Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
function r(t, e) {
for (var r = 0, n = t.length - 1; n >= 0; n--) {
var i = t[n];
"." === i ? t.splice(n, 1) : ".." === i ? (t.splice(n, 1), r++) : r && (t.splice(n, 1), r--)
}
if (e)
for (; r--; r) t.unshift("..");
return t
}
var n = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,
i = function(t) {
return n.exec(t).slice(1)
};
function o(t, e) {
if (t.filter) return t.filter(e);
for (var r = [], n = 0; n < t.length; n++) e(t[n], n, t) && r.push(t[n]);
return r
}
e.resolve = function() {
for (var e = "", n = !1, i = arguments.length - 1; i >= -1 && !n; i--) {
var a = i >= 0 ? arguments[i] : t.cwd();
if ("string" != typeof a) throw new TypeError("Arguments to path.resolve must be strings");
a && (e = a + "/" + e, n = "/" === a.charAt(0))
}
return (n ? "/" : "") + (e = r(o(e.split("/"), function(t) {
return !!t
}), !n).join("/")) || "."
}, e.normalize = function(t) {
var n = e.isAbsolute(t),
i = "/" === a(t, -1);
return (t = r(o(t.split("/"), function(t) {
return !!t
}), !n).join("/")) || n || (t = "."), t && i && (t += "/"), (n ? "/" : "") + t
}, e.isAbsolute = function(t) {
return "/" === t.charAt(0)
}, e.join = function() {
var t = Array.prototype.slice.call(arguments, 0);
return e.normalize(o(t, function(t, e) {
if ("string" != typeof t) throw new TypeError("Arguments to path.join must be strings");
return t
}).join("/"))
}, e.relative = function(t, r) {
function n(t) {
for (var e = 0; e < t.length && "" === t[e]; e++);
for (var r = t.length - 1; r >= 0 && "" === t[r]; r--);
return e > r ? [] : t.slice(e, r - e + 1)
}
t = e.resolve(t).substr(1), r = e.resolve(r).substr(1);
for (var i = n(t.split("/")), o = n(r.split("/")), a = Math.min(i.length, o.length), s = a, u = 0; u < a; u++)
if (i[u] !== o[u]) {
s = u;
break
}
var l = [];
for (u = s; u < i.length; u++) l.push("..");
return (l = l.concat(o.slice(s))).join("/")
}, e.sep = "/", e.delimiter = ":", e.dirname = function(t) {
var e = i(t),
r = e[0],
n = e[1];
return r || n ? (n && (n = n.substr(0, n.length - 1)), r + n) : "."
}, e.basename = function(t, e) {
var r = i(t)[2];
return e && r.substr(-1 * e.length) === e && (r = r.substr(0, r.length - e.length)), r
}, e.extname = function(t) {
return i(t)[3]
};
var a = "b" === "ab".substr(-1) ? function(t, e, r) {
return t.substr(e, r)
} : function(t, e, r) {
return e < 0 && (e = t.length + e), t.substr(e, r)
}
}).call(this, r(139))
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = c(r(10)),
o = c(r(59)),
a = c(r(60)),
s = c(r(9)),
u = r(5),
l = r(3),
h = c(r(4));
function c(t) {
return t && t.__esModule ? t : {
default: t
}
}
var f = function(t) {
function e(r, n, i, o, a) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
if (s.noFrame = !1, n || (s.noFrame = !0, n = new u.Rectangle(0, 0, 1, 1)), r instanceof e && (r = r.baseTexture), s.baseTexture = r, s._frame = n, s.trim = o, s.valid = !1, s.requiresUpdate = !1, s._uvs = null, s.orig = i || n, s._rotate = Number(a || 0), !0 === a) s._rotate = 2;
else if (s._rotate % 2 != 0) throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");
return r.hasLoaded ? (s.noFrame && (n = new u.Rectangle(0, 0, r.width, r.height), r.on("update", s.onBaseTextureUpdated, s)), s.frame = n) : r.once("loaded", s.onBaseTextureLoaded, s), s._updateID = 0, s.transform = null, s.textureCacheIds = [], s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.update = function() {
this.baseTexture.update()
}, e.prototype.onBaseTextureLoaded = function(t) {
this._updateID++, this.noFrame ? this.frame = new u.Rectangle(0, 0, t.width, t.height) : this.frame = this._frame, this.baseTexture.on("update", this.onBaseTextureUpdated, this), this.emit("update", this)
}, e.prototype.onBaseTextureUpdated = function(t) {
this._updateID++, this._frame.width = t.width, this._frame.height = t.height, this.emit("update", this)
}, e.prototype.destroy = function(t) {
this.baseTexture && (t && (l.TextureCache[this.baseTexture.imageUrl] && e.removeFromCache(this.baseTexture.imageUrl), this.baseTexture.destroy()), this.baseTexture.off("update", this.onBaseTextureUpdated, this), this.baseTexture.off("loaded", this.onBaseTextureLoaded, this), this.baseTexture = null), this._frame = null, this._uvs = null, this.trim = null, this.orig = null, this.valid = !1, e.removeFromCache(this), this.textureCacheIds = null
}, e.prototype.clone = function() {
return new e(this.baseTexture, this.frame, this.orig, this.trim, this.rotate)
}, e.prototype._updateUvs = function() {
this._uvs || (this._uvs = new a.default), this._uvs.set(this._frame, this.baseTexture, this.rotate), this._updateID++
}, e.fromImage = function(t, r, n, o) {
var a = l.TextureCache[t];
return a || (a = new e(i.default.fromImage(t, r, n, o)), e.addToCache(a, t)), a
}, e.fromFrame = function(t) {
var e = l.TextureCache[t];
if (!e) throw new Error('The frameId "' + t + '" does not exist in the texture cache');
return e
}, e.fromCanvas = function(t, r) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "canvas";
return new e(i.default.fromCanvas(t, r, n))
}, e.fromVideo = function(t, r) {
return "string" == typeof t ? e.fromVideoUrl(t, r) : new e(o.default.fromVideo(t, r))
}, e.fromVideoUrl = function(t, r) {
return new e(o.default.fromUrl(t, r))
}, e.from = function(t) {
if ("string" == typeof t) {
var r = l.TextureCache[t];
return r || (null !== t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/) ? e.fromVideoUrl(t) : e.fromImage(t))
}
return t instanceof HTMLImageElement ? new e(i.default.from(t)) : t instanceof HTMLCanvasElement ? e.fromCanvas(t, h.default.SCALE_MODE, "HTMLCanvasElement") : t instanceof HTMLVideoElement ? e.fromVideo(t) : t instanceof i.default ? new e(t) : t
}, e.fromLoader = function(t, r, n) {
var o = new i.default(t, void 0, (0, l.getResolutionOfUrl)(r)),
a = new e(o);
return o.imageUrl = r, n || (n = r), i.default.addToCache(a.baseTexture, n), e.addToCache(a, n), n !== r && (i.default.addToCache(a.baseTexture, r), e.addToCache(a, r)), a
}, e.addToCache = function(t, e) {
e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), l.TextureCache[e] && console.warn("Texture added to the cache with an id [" + e + "] that already had an entry"), l.TextureCache[e] = t)
}, e.removeFromCache = function(t) {
if ("string" == typeof t) {
var e = l.TextureCache[t];
if (e) {
var r = e.textureCacheIds.indexOf(t);
return r > -1 && e.textureCacheIds.splice(r, 1), delete l.TextureCache[t], e
}
} else if (t && t.textureCacheIds) {
for (var n = 0; n < t.textureCacheIds.length; ++n) l.TextureCache[t.textureCacheIds[n]] === t && delete l.TextureCache[t.textureCacheIds[n]];
return t.textureCacheIds.length = 0, t
}
return null
}, n(e, [{
key: "frame",
get: function() {
return this._frame
},
set: function(t) {
this._frame = t, this.noFrame = !1;
var e = t.x,
r = t.y,
n = t.width,
i = t.height,
o = e + n > this.baseTexture.width,
a = r + i > this.baseTexture.height;
if (o || a) {
var s = o && a ? "and" : "or",
u = "X: " + e + " + " + n + " = " + (e + n) + " > " + this.baseTexture.width,
l = "Y: " + r + " + " + i + " = " + (r + i) + " > " + this.baseTexture.height;
throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: " + u + " " + s + " " + l)
}
this.valid = n && i && this.baseTexture.hasLoaded, this.trim || this.rotate || (this.orig = t), this.valid && this._updateUvs()
}
}, {
key: "rotate",
get: function() {
return this._rotate
},
set: function(t) {
this._rotate = t, this.valid && this._updateUvs()
}
}, {
key: "width",
get: function() {
return this.orig.width
}
}, {
key: "height",
get: function() {
return this.orig.height
}
}]), e
}(s.default);
function d(t) {
t.destroy = function() {}, t.on = function() {}, t.once = function() {}, t.emit = function() {}
}
e.default = f, f.EMPTY = new f(new i.default), d(f.EMPTY), d(f.EMPTY.baseTexture), f.WHITE = function() {
var t = document.createElement("canvas");
t.width = 10, t.height = 10;
var e = t.getContext("2d");
return e.fillStyle = "white", e.fillRect(0, 0, 10, 10), new f(new i.default(t))
}(), d(f.WHITE), d(f.WHITE.baseTexture)
}, function(t, e, r) {
"use strict";
var n = Object.prototype.hasOwnProperty,
i = "~";
function o() {}
function a(t, e, r) {
this.fn = t, this.context = e, this.once = r || !1
}
function s() {
this._events = new o, this._eventsCount = 0
}
Object.create && (o.prototype = Object.create(null), (new o).__proto__ || (i = !1)), s.prototype.eventNames = function() {
var t, e, r = [];
if (0 === this._eventsCount) return r;
for (e in t = this._events) n.call(t, e) && r.push(i ? e.slice(1) : e);
return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(t)) : r
}, s.prototype.listeners = function(t, e) {
var r = i ? i + t : t,
n = this._events[r];
if (e) return !!n;
if (!n) return [];
if (n.fn) return [n.fn];
for (var o = 0, a = n.length, s = new Array(a); o < a; o++) s[o] = n[o].fn;
return s
}, s.prototype.emit = function(t, e, r, n, o, a) {
var s = i ? i + t : t;
if (!this._events[s]) return !1;
var u, l, h = this._events[s],
c = arguments.length;
if (h.fn) {
switch (h.once && this.removeListener(t, h.fn, void 0, !0), c) {
case 1:
return h.fn.call(h.context), !0;
case 2:
return h.fn.call(h.context, e), !0;
case 3:
return h.fn.call(h.context, e, r), !0;
case 4:
return h.fn.call(h.context, e, r, n), !0;
case 5:
return h.fn.call(h.context, e, r, n, o), !0;
case 6:
return h.fn.call(h.context, e, r, n, o, a), !0
}
for (l = 1, u = new Array(c - 1); l < c; l++) u[l - 1] = arguments[l];
h.fn.apply(h.context, u)
} else {
var f, d = h.length;
for (l = 0; l < d; l++) switch (h[l].once && this.removeListener(t, h[l].fn, void 0, !0), c) {
case 1:
h[l].fn.call(h[l].context);
break;
case 2:
h[l].fn.call(h[l].context, e);
break;
case 3:
h[l].fn.call(h[l].context, e, r);
break;
case 4:
h[l].fn.call(h[l].context, e, r, n);
break;
default:
if (!u)
for (f = 1, u = new Array(c - 1); f < c; f++) u[f - 1] = arguments[f];
h[l].fn.apply(h[l].context, u)
}
}
return !0
}, s.prototype.on = function(t, e, r) {
var n = new a(e, r || this),
o = i ? i + t : t;
return this._events[o] ? this._events[o].fn ? this._events[o] = [this._events[o], n] : this._events[o].push(n) : (this._events[o] = n, this._eventsCount++), this
}, s.prototype.once = function(t, e, r) {
var n = new a(e, r || this, !0),
o = i ? i + t : t;
return this._events[o] ? this._events[o].fn ? this._events[o] = [this._events[o], n] : this._events[o].push(n) : (this._events[o] = n, this._eventsCount++), this
}, s.prototype.removeListener = function(t, e, r, n) {
var a = i ? i + t : t;
if (!this._events[a]) return this;
if (!e) return 0 == --this._eventsCount ? this._events = new o : delete this._events[a], this;
var s = this._events[a];
if (s.fn) s.fn !== e || n && !s.once || r && s.context !== r || (0 == --this._eventsCount ? this._events = new o : delete this._events[a]);
else {
for (var u = 0, l = [], h = s.length; u < h; u++)(s[u].fn !== e || n && !s[u].once || r && s[u].context !== r) && l.push(s[u]);
l.length ? this._events[a] = 1 === l.length ? l[0] : l : 0 == --this._eventsCount ? this._events = new o : delete this._events[a]
}
return this
}, s.prototype.removeAllListeners = function(t) {
var e;
return t ? (e = i ? i + t : t, this._events[e] && (0 == --this._eventsCount ? this._events = new o : delete this._events[e])) : (this._events = new o, this._eventsCount = 0), this
}, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prototype.setMaxListeners = function() {
return this
}, s.prefixed = i, s.EventEmitter = s, t.exports = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(3),
i = u(r(4)),
o = u(r(9)),
a = u(r(57)),
s = u(r(32));
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
var l = function(t) {
function e(r, o, a) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return s.uid = (0, n.uid)(), s.touched = 0, s.resolution = a || i.default.RESOLUTION, s.width = 100, s.height = 100, s.realWidth = 100, s.realHeight = 100, s.scaleMode = void 0 !== o ? o : i.default.SCALE_MODE, s.hasLoaded = !1, s.isLoading = !1, s.source = null, s.origSource = null, s.imageType = null, s.sourceScale = 1, s.premultipliedAlpha = !0, s.imageUrl = null, s.isPowerOfTwo = !1, s.mipmap = i.default.MIPMAP_TEXTURES, s.wrapMode = i.default.WRAP_MODE, s._glTextures = {}, s._enabled = 0, s._virtalBoundId = -1, s._destroyed = !1, s.textureCacheIds = [], r && s.loadSource(r), s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.update = function() {
"svg" !== this.imageType && (this.realWidth = this.source.naturalWidth || this.source.videoWidth || this.source.width, this.realHeight = this.source.naturalHeight || this.source.videoHeight || this.source.height, this._updateDimensions()), this.emit("update", this)
}, e.prototype._updateDimensions = function() {
this.width = this.realWidth / this.resolution, this.height = this.realHeight / this.resolution, this.isPowerOfTwo = s.default.isPow2(this.realWidth) && s.default.isPow2(this.realHeight)
}, e.prototype.loadSource = function(t) {
var e = this.isLoading;
this.hasLoaded = !1, this.isLoading = !1, e && this.source && (this.source.onload = null, this.source.onerror = null);
var r = !this.source;
if (this.source = t, (t.src && t.complete || t.getContext) && t.width && t.height) this._updateImageType(), "svg" === this.imageType ? this._loadSvgSource() : this._sourceLoaded(), r && this.emit("loaded", this);
else if (!t.getContext) {
this.isLoading = !0;
var n = this;
if (t.onload = function() {
n._updateImageType(), t.onload = null, t.onerror = null, n.isLoading && (n.isLoading = !1, n._sourceLoaded(), "svg" !== n.imageType ? n.emit("loaded", n) : n._loadSvgSource())
}, t.onerror = function() {
t.onload = null, t.onerror = null, n.isLoading && (n.isLoading = !1, n.emit("error", n))
}, t.complete && t.src) {
if (t.onload = null, t.onerror = null, "svg" === n.imageType) return void n._loadSvgSource();
this.isLoading = !1, t.width && t.height ? (this._sourceLoaded(), e && this.emit("loaded", this)) : e && this.emit("error", this)
}
}
}, e.prototype._updateImageType = function() {
if (this.imageUrl) {
var t = (0, n.decomposeDataUri)(this.imageUrl),
e = void 0;
if (t && "image" === t.mediaType) {
var r = t.subType.split("+")[0];
if (!(e = (0, n.getUrlFileExtension)("." + r))) throw new Error("Invalid image type in data URI.")
} else(e = (0, n.getUrlFileExtension)(this.imageUrl)) || (e = "png");
this.imageType = e
}
}, e.prototype._loadSvgSource = function() {
if ("svg" === this.imageType) {
var t = (0, n.decomposeDataUri)(this.imageUrl);
t ? this._loadSvgSourceUsingDataUri(t) : this._loadSvgSourceUsingXhr()
}
}, e.prototype._loadSvgSourceUsingDataUri = function(t) {
var e = void 0;
if ("base64" === t.encoding) {
if (!atob) throw new Error("Your browser doesn't support base64 conversions.");
e = atob(t.data)
} else e = t.data;
this._loadSvgSourceUsingString(e)
}, e.prototype._loadSvgSourceUsingXhr = function() {
var t = this,
e = new XMLHttpRequest;
e.onload = function() {
if (e.readyState !== e.DONE || 200 !== e.status) throw new Error("Failed to load SVG using XHR.");
t._loadSvgSourceUsingString(e.response)
}, e.onerror = function() {
return t.emit("error", t)
}, e.open("GET", this.imageUrl, !0), e.send()
}, e.prototype._loadSvgSourceUsingString = function(t) {
var r = (0, n.getSvgSize)(t),
i = r.width,
o = r.height;
if (!i || !o) throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");
this.realWidth = Math.round(i * this.sourceScale), this.realHeight = Math.round(o * this.sourceScale), this._updateDimensions();
var a = document.createElement("canvas");
a.width = this.realWidth, a.height = this.realHeight, a._pixiId = "canvas_" + (0, n.uid)(), a.getContext("2d").drawImage(this.source, 0, 0, i, o, 0, 0, this.realWidth, this.realHeight), this.origSource = this.source, this.source = a, e.addToCache(this, a._pixiId), this.isLoading = !1, this._sourceLoaded(), this.emit("loaded", this)
}, e.prototype._sourceLoaded = function() {
this.hasLoaded = !0, this.update()
}, e.prototype.destroy = function() {
this.imageUrl && (delete n.TextureCache[this.imageUrl], this.imageUrl = null, navigator.isCocoonJS || (this.source.src = "")), this.source = null, this.dispose(), e.removeFromCache(this), this.textureCacheIds = null, this._destroyed = !0
}, e.prototype.dispose = function() {
this.emit("dispose", this)
}, e.prototype.updateSourceImage = function(t) {
this.source.src = t, this.loadSource(this.source)
}, e.fromImage = function(t, r, i, o) {
var s = n.BaseTextureCache[t];
if (!s) {
var u = new Image;
void 0 === r && 0 !== t.indexOf("data:") ? u.crossOrigin = (0, a.default)(t) : r && (u.crossOrigin = "string" == typeof r ? r : "anonymous"), (s = new e(u, i)).imageUrl = t, o && (s.sourceScale = o), s.resolution = (0, n.getResolutionOfUrl)(t), u.src = t, e.addToCache(s, t)
}
return s
}, e.fromCanvas = function(t, r) {
var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "canvas";
t._pixiId || (t._pixiId = i + "_" + (0, n.uid)());
var o = n.BaseTextureCache[t._pixiId];
return o || (o = new e(t, r), e.addToCache(o, t._pixiId)), o
}, e.from = function(t, r, i) {
if ("string" == typeof t) return e.fromImage(t, void 0, r, i);
if (t instanceof HTMLImageElement) {
var o = t.src,
a = n.BaseTextureCache[o];
return a || ((a = new e(t, r)).imageUrl = o, i && (a.sourceScale = i), a.resolution = (0, n.getResolutionOfUrl)(o), e.addToCache(a, o)), a
}
return t instanceof HTMLCanvasElement ? e.fromCanvas(t, r) : t
}, e.addToCache = function(t, e) {
e && (-1 === t.textureCacheIds.indexOf(e) && t.textureCacheIds.push(e), n.BaseTextureCache[e] && console.warn("BaseTexture added to the cache with an id [" + e + "] that already had an entry"), n.BaseTextureCache[e] = t)
}, e.removeFromCache = function(t) {
if ("string" == typeof t) {
var e = n.BaseTextureCache[t];
if (e) {
var r = e.textureCacheIds.indexOf(t);
return r > -1 && e.textureCacheIds.splice(r, 1), delete n.BaseTextureCache[t], e
}
} else if (t && t.textureCacheIds) {
for (var i = 0; i < t.textureCacheIds.length; ++i) delete n.BaseTextureCache[t.textureCacheIds[i]];
return t.textureCacheIds.length = 0, t
}
return null
}, e
}(o.default);
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(3),
a = r(54);
var s = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return r.children = [], r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.onChildrenChange = function() {}, e.prototype.addChild = function(t) {
var e = arguments.length;
if (e > 1)
for (var r = 0; r < e; r++) this.addChild(arguments[r]);
else t.parent && t.parent.removeChild(t), t.parent = this, t.transform._parentID = -1, this.children.push(t), this._boundsID++, this.onChildrenChange(this.children.length - 1), t.emit("added", this);
return t
}, e.prototype.addChildAt = function(t, e) {
if (e < 0 || e > this.children.length) throw new Error(t + "addChildAt: The index " + e + " supplied is out of bounds " + this.children.length);
return t.parent && t.parent.removeChild(t), t.parent = this, t.transform._parentID = -1, this.children.splice(e, 0, t), this._boundsID++, this.onChildrenChange(e), t.emit("added", this), t
}, e.prototype.swapChildren = function(t, e) {
if (t !== e) {
var r = this.getChildIndex(t),
n = this.getChildIndex(e);
this.children[r] = e, this.children[n] = t, this.onChildrenChange(r < n ? r : n)
}
}, e.prototype.getChildIndex = function(t) {
var e = this.children.indexOf(t);
if (-1 === e) throw new Error("The supplied DisplayObject must be a child of the caller");
return e
}, e.prototype.setChildIndex = function(t, e) {
if (e < 0 || e >= this.children.length) throw new Error("The supplied index is out of bounds");
var r = this.getChildIndex(t);
(0, o.removeItems)(this.children, r, 1), this.children.splice(e, 0, t), this.onChildrenChange(e)
}, e.prototype.getChildAt = function(t) {
if (t < 0 || t >= this.children.length) throw new Error("getChildAt: Index (" + t + ") does not exist.");
return this.children[t]
}, e.prototype.removeChild = function(t) {
var e = arguments.length;
if (e > 1)
for (var r = 0; r < e; r++) this.removeChild(arguments[r]);
else {
var n = this.children.indexOf(t);
if (-1 === n) return null;
t.parent = null, t.transform._parentID = -1, (0, o.removeItems)(this.children, n, 1), this._boundsID++, this.onChildrenChange(n), t.emit("removed", this)
}
return t
}, e.prototype.removeChildAt = function(t) {
var e = this.getChildAt(t);
return e.parent = null, e.transform._parentID = -1, (0, o.removeItems)(this.children, t, 1), this._boundsID++, this.onChildrenChange(t), e.emit("removed", this), e
}, e.prototype.removeChildren = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
e = arguments[1],
r = t,
n = "number" == typeof e ? e : this.children.length,
i = n - r,
o = void 0;
if (i > 0 && i <= n) {
o = this.children.splice(r, i);
for (var a = 0; a < o.length; ++a) o[a].parent = null, o[a].transform && (o[a].transform._parentID = -1);
this._boundsID++, this.onChildrenChange(t);
for (var s = 0; s < o.length; ++s) o[s].emit("removed", this);
return o
}
if (0 === i && 0 === this.children.length) return [];
throw new RangeError("removeChildren: numeric values are outside the acceptable range.")
}, e.prototype.updateTransform = function() {
this._boundsID++, this.transform.updateTransform(this.parent.transform), this.worldAlpha = this.alpha * this.parent.worldAlpha;
for (var t = 0, e = this.children.length; t < e; ++t) {
var r = this.children[t];
r.visible && r.updateTransform()
}
}, e.prototype.calculateBounds = function() {
this._bounds.clear(), this._calculateBounds();
for (var t = 0; t < this.children.length; t++) {
var e = this.children[t];
e.visible && e.renderable && (e.calculateBounds(), e._mask ? (e._mask.calculateBounds(), this._bounds.addBoundsMask(e._bounds, e._mask._bounds)) : e.filterArea ? this._bounds.addBoundsArea(e._bounds, e.filterArea) : this._bounds.addBounds(e._bounds))
}
this._lastBoundsID = this._boundsID
}, e.prototype._calculateBounds = function() {}, e.prototype.renderWebGL = function(t) {
if (this.visible && !(this.worldAlpha <= 0) && this.renderable)
if (this._mask || this._filters) this.renderAdvancedWebGL(t);
else {
this._renderWebGL(t);
for (var e = 0, r = this.children.length; e < r; ++e) this.children[e].renderWebGL(t)
}
}, e.prototype.renderAdvancedWebGL = function(t) {
t.flush();
var e = this._filters,
r = this._mask;
if (e) {
this._enabledFilters || (this._enabledFilters = []), this._enabledFilters.length = 0;
for (var n = 0; n < e.length; n++) e[n].enabled && this._enabledFilters.push(e[n]);
this._enabledFilters.length && t.filterManager.pushFilter(this, this._enabledFilters)
}
r && t.maskManager.pushMask(this, this._mask), this._renderWebGL(t);
for (var i = 0, o = this.children.length; i < o; i++) this.children[i].renderWebGL(t);
t.flush(), r && t.maskManager.popMask(this, this._mask), e && this._enabledFilters && this._enabledFilters.length && t.filterManager.popFilter()
}, e.prototype._renderWebGL = function(t) {}, e.prototype._renderCanvas = function(t) {}, e.prototype.renderCanvas = function(t) {
if (this.visible && !(this.worldAlpha <= 0) && this.renderable) {
this._mask && t.maskManager.pushMask(this._mask), this._renderCanvas(t);
for (var e = 0, r = this.children.length; e < r; ++e) this.children[e].renderCanvas(t);
this._mask && t.maskManager.popMask(t)
}
}, e.prototype.destroy = function(e) {
t.prototype.destroy.call(this);
var r = "boolean" == typeof e ? e : e && e.children,
n = this.removeChildren(0, this.children.length);
if (r)
for (var i = 0; i < n.length; ++i) n[i].destroy(e)
}, i(e, [{
key: "width",
get: function() {
return this.scale.x * this.getLocalBounds().width
},
set: function(t) {
var e = this.getLocalBounds().width;
this.scale.x = 0 !== e ? t / e : 1, this._width = t
}
}, {
key: "height",
get: function() {
return this.scale.y * this.getLocalBounds().height
},
set: function(t) {
var e = this.getLocalBounds().height;
this.scale.y = 0 !== e ? t / e : 1, this._height = t
}
}]), e
}(((n = a) && n.__esModule ? n : {
default: n
}).default);
e.default = s, s.prototype.containerUpdateTransform = s.prototype.updateTransform
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = h(r(61)),
i = h(r(134)),
o = h(r(63)),
a = h(r(135)),
s = r(3),
u = r(1),
l = h(r(4));
function h(t) {
return t && t.__esModule ? t : {
default: t
}
}
var c = function(t) {
function e(r, n, o) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "Canvas", r, n, o));
return s.type = u.RENDERER_TYPE.CANVAS, s.rootContext = s.view.getContext("2d", {
alpha: s.transparent
}), s.context = s.rootContext, s.refresh = !0, s.maskManager = new i.default(s), s.smoothProperty = "imageSmoothingEnabled", s.rootContext.imageSmoothingEnabled || (s.rootContext.webkitImageSmoothingEnabled ? s.smoothProperty = "webkitImageSmoothingEnabled" : s.rootContext.mozImageSmoothingEnabled ? s.smoothProperty = "mozImageSmoothingEnabled" : s.rootContext.oImageSmoothingEnabled ? s.smoothProperty = "oImageSmoothingEnabled" : s.rootContext.msImageSmoothingEnabled && (s.smoothProperty = "msImageSmoothingEnabled")), s.initPlugins(), s.blendModes = (0, a.default)(), s._activeBlendMode = null, s.renderingToScreen = !1, s.resize(s.options.width, s.options.height), s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.render = function(t, e, r, n, i) {
if (this.view) {
this.renderingToScreen = !e, this.emit("prerender");
var a = this.resolution;
e ? ((e = e.baseTexture || e)._canvasRenderTarget || (e._canvasRenderTarget = new o.default(e.width, e.height, e.resolution), e.source = e._canvasRenderTarget.canvas, e.valid = !0), this.context = e._canvasRenderTarget.context, this.resolution = e._canvasRenderTarget.resolution) : this.context = this.rootContext;
var s = this.context;
if (e || (this._lastObjectRendered = t), !i) {
var l = t.parent,
h = this._tempDisplayObjectParent.transform.worldTransform;
n ? (n.copy(h), this._tempDisplayObjectParent.transform._worldID = -1) : h.identity(), t.parent = this._tempDisplayObjectParent, t.updateTransform(), t.parent = l
}
s.save(), s.setTransform(1, 0, 0, 1, 0, 0), s.globalAlpha = 1, this._activeBlendMode = u.BLEND_MODES.NORMAL, s.globalCompositeOperation = this.blendModes[u.BLEND_MODES.NORMAL], navigator.isCocoonJS && this.view.screencanvas && (s.fillStyle = "black", s.clear()), (void 0 !== r ? r : this.clearBeforeRender) && this.renderingToScreen && (this.transparent ? s.clearRect(0, 0, this.width, this.height) : (s.fillStyle = this._backgroundColorString, s.fillRect(0, 0, this.width, this.height)));
var c = this.context;
this.context = s, t.renderCanvas(this), this.context = c, s.restore(), this.resolution = a, this.emit("postrender")
}
}, e.prototype.clear = function(t) {
var e = this.context;
t = t || this._backgroundColorString, !this.transparent && t ? (e.fillStyle = t, e.fillRect(0, 0, this.width, this.height)) : e.clearRect(0, 0, this.width, this.height)
}, e.prototype.setBlendMode = function(t) {
this._activeBlendMode !== t && (this._activeBlendMode = t, this.context.globalCompositeOperation = this.blendModes[t])
}, e.prototype.destroy = function(e) {
this.destroyPlugins(), t.prototype.destroy.call(this, e), this.context = null, this.refresh = !0, this.maskManager.destroy(), this.maskManager = null, this.smoothProperty = null
}, e.prototype.resize = function(e, r) {
t.prototype.resize.call(this, e, r), this.smoothProperty && (this.rootContext[this.smoothProperty] = l.default.SCALE_MODE === u.SCALE_MODES.LINEAR)
}, e.prototype.invalidateBlendMode = function() {
this._activeBlendMode = this.blendModes.indexOf(this.context.globalCompositeOperation)
}, e
}(n.default);
e.default = c, s.pluginTarget.mixin(c)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e, this.renderer.on("context", this.onContextChange, this)
}
return t.prototype.onContextChange = function() {}, t.prototype.destroy = function() {
this.renderer.off("context", this.onContextChange, this), this.renderer = null
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(6),
o = r(4),
a = (n = o) && n.__esModule ? n : {
default: n
};
function s(t, e) {
if (t instanceof Array) {
if ("precision" !== t[0].substring(0, 9)) {
var r = t.slice(0);
return r.unshift("precision " + e + " float;"), r
}
} else if ("precision" !== t.trim().substring(0, 9)) return "precision " + e + " float;\n" + t;
return t
}
var u = function(t) {
function e(r, n, i, o, u) {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r, s(n, u || a.default.PRECISION_VERTEX), s(i, u || a.default.PRECISION_FRAGMENT), void 0, o))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e
}(i.GLShader);
e.default = u
}, function(t, e, r) {
"use strict";
var n = r(188).default,
i = r(37).default,
o = r(89),
a = r(90);
n.Resource = i, n.async = o, n.base64 = a, t.exports = n, t.exports.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
a = r(8),
s = (n = a) && n.__esModule ? n : {
default: n
};
var u = new o.Point,
l = new o.Polygon,
h = function(t) {
function e(r, n, i, a, u) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var l = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return l._texture = r || s.default.EMPTY, l.uvs = i || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), l.vertices = n || new Float32Array([0, 0, 100, 0, 100, 100, 0, 100]), l.indices = a || new Uint16Array([0, 1, 3, 2]), l.dirty = 0, l.indexDirty = 0, l.blendMode = o.BLEND_MODES.NORMAL, l.canvasPadding = o.settings.MESH_CANVAS_PADDING, l.drawMode = u || e.DRAW_MODES.TRIANGLE_MESH, l.shader = null, l.tintRgb = new Float32Array([1, 1, 1]), l._glDatas = {}, l._uvTransform = new o.TextureMatrix(l._texture), l.uploadUvTransform = !1, l.pluginName = "mesh", l
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._renderWebGL = function(t) {
this.refresh(), t.setObjectRenderer(t.plugins[this.pluginName]), t.plugins[this.pluginName].render(this)
}, e.prototype._renderCanvas = function(t) {
this.refresh(), t.plugins[this.pluginName].render(this)
}, e.prototype._onTextureUpdate = function() {
this._uvTransform.texture = this._texture, this.refresh()
}, e.prototype.multiplyUvs = function() {
this.uploadUvTransform || this._uvTransform.multiplyUvs(this.uvs)
}, e.prototype.refresh = function(t) {
this._uvTransform.update(t) && this._refresh()
}, e.prototype._refresh = function() {}, e.prototype._calculateBounds = function() {
this._bounds.addVertices(this.transform, this.vertices, 0, this.vertices.length)
}, e.prototype.containsPoint = function(t) {
if (!this.getBounds().contains(t.x, t.y)) return !1;
this.worldTransform.applyInverse(t, u);
for (var r = this.vertices, n = l.points, i = this.indices, o = this.indices.length, a = this.drawMode === e.DRAW_MODES.TRIANGLES ? 3 : 1, s = 0; s + 2 < o; s += a) {
var h = 2 * i[s],
c = 2 * i[s + 1],
f = 2 * i[s + 2];
if (n[0] = r[h], n[1] = r[h + 1], n[2] = r[c], n[3] = r[c + 1], n[4] = r[f], n[5] = r[f + 1], l.contains(u.x, u.y)) return !0
}
return !1
}, i(e, [{
key: "texture",
get: function() {
return this._texture
},
set: function(t) {
this._texture !== t && (this._texture = t, t && (t.baseTexture.hasLoaded ? this._onTextureUpdate() : t.once("update", this._onTextureUpdate, this)))
}
}, {
key: "tint",
get: function() {
return o.utils.rgb2hex(this.tintRgb)
},
set: function(t) {
this.tintRgb = o.utils.hex2rgb(t, this.tintRgb)
}
}]), e
}(o.Container);
e.default = h, h.DRAW_MODES = {
TRIANGLE_MESH: 0,
TRIANGLES: 1
}
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Sprite = void 0;
var n = r(2);
e.Sprite = function(t) {
function e(t) {
((function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
})(this, e), t) && ("string" == typeof t || t.constructor === String ? n.utils.TextureCache[t] ? t = n.Texture.fromFrame(t) : (console.error("The frameId '" + t + "' does not exist in the texture cache"), t = null) : t instanceof n.Texture || console.error("Sprite constructor argument type is invalid"));
return function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, n.Sprite), e
}()
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(13);
var o = function(t) {
function e() {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.apply(this, arguments))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.start = function() {}, e.prototype.stop = function() {
this.flush()
}, e.prototype.flush = function() {}, e.prototype.render = function(t) {}, e
}(((n = i) && n.__esModule ? n : {
default: n
}).default);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = m(r(61)),
i = m(r(137)),
o = m(r(140)),
a = m(r(141)),
s = m(r(20)),
u = m(r(18)),
l = m(r(143)),
h = m(r(10)),
c = m(r(144)),
f = m(r(145)),
d = m(r(147)),
p = m(r(148)),
v = r(3),
y = m(r(6)),
g = r(1);
function m(t) {
return t && t.__esModule ? t : {
default: t
}
}
var _ = 0,
b = function(t) {
function e(r, n, a) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "WebGL", r, n, a));
return s.legacy = s.options.legacy, s.legacy && (y.default.VertexArrayObject.FORCE_NATIVE = !0), s.type = g.RENDERER_TYPE.WEBGL, s.handleContextLost = s.handleContextLost.bind(s), s.handleContextRestored = s.handleContextRestored.bind(s), s.view.addEventListener("webglcontextlost", s.handleContextLost, !1), s.view.addEventListener("webglcontextrestored", s.handleContextRestored, !1), s._contextOptions = {
alpha: s.transparent,
antialias: s.options.antialias,
premultipliedAlpha: s.transparent && "notMultiplied" !== s.transparent,
stencil: !0,
preserveDrawingBuffer: s.options.preserveDrawingBuffer,
powerPreference: s.options.powerPreference
}, s._backgroundColorRgba[3] = s.transparent ? 0 : 1, s.maskManager = new i.default(s), s.stencilManager = new o.default(s), s.emptyRenderer = new u.default(s), s.currentRenderer = s.emptyRenderer, s.textureManager = null, s.filterManager = null, s.initPlugins(), s.options.context && (0, p.default)(s.options.context), s.gl = s.options.context || y.default.createContext(s.view, s._contextOptions), s.CONTEXT_UID = _++, s.state = new f.default(s.gl), s.renderingToScreen = !0, s.boundTextures = null, s._activeShader = null, s._activeVao = null, s._activeRenderTarget = null, s._initContext(), s.drawModes = (0, d.default)(s.gl), s._nextTextureLocation = 0, s.setBlendMode(0), s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._initContext = function() {
var t = this.gl;
t.isContextLost() && t.getExtension("WEBGL_lose_context") && t.getExtension("WEBGL_lose_context").restoreContext();
var e = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);
this._activeShader = null, this._activeVao = null, this.boundTextures = new Array(e), this.emptyTextures = new Array(e), this.textureManager = new l.default(this), this.filterManager = new a.default(this), this.textureGC = new c.default(this), this.state.resetToDefault(), this.rootRenderTarget = new s.default(t, this.width, this.height, null, this.resolution, !0), this.rootRenderTarget.clearColor = this._backgroundColorRgba, this.bindRenderTarget(this.rootRenderTarget);
var r = new y.default.GLTexture.fromData(t, null, 1, 1),
n = {
_glTextures: {}
};
n._glTextures[this.CONTEXT_UID] = {};
for (var i = 0; i < e; i++) {
var o = new h.default;
o._glTextures[this.CONTEXT_UID] = r, this.boundTextures[i] = n, this.emptyTextures[i] = o, this.bindTexture(null, i)
}
this.emit("context", t), this.resize(this.screen.width, this.screen.height)
}, e.prototype.render = function(t, e, r, n, i) {
if (this.renderingToScreen = !e, this.emit("prerender"), this.gl && !this.gl.isContextLost()) {
if (this._nextTextureLocation = 0, e || (this._lastObjectRendered = t), !i) {
var o = t.parent;
t.parent = this._tempDisplayObjectParent, t.updateTransform(), t.parent = o
}
this.bindRenderTexture(e, n), this.currentRenderer.start(), (void 0 !== r ? r : this.clearBeforeRender) && this._activeRenderTarget.clear(), t.renderWebGL(this), this.currentRenderer.flush(), this.textureGC.update(), this.emit("postrender")
}
}, e.prototype.setObjectRenderer = function(t) {
this.currentRenderer !== t && (this.currentRenderer.stop(), this.currentRenderer = t, this.currentRenderer.start())
}, e.prototype.flush = function() {
this.setObjectRenderer(this.emptyRenderer)
}, e.prototype.resize = function(t, e) {
n.default.prototype.resize.call(this, t, e), this.rootRenderTarget.resize(t, e), this._activeRenderTarget === this.rootRenderTarget && (this.rootRenderTarget.activate(), this._activeShader && (this._activeShader.uniforms.projectionMatrix = this.rootRenderTarget.projectionMatrix.toArray(!0)))
}, e.prototype.setBlendMode = function(t) {
this.state.setBlendMode(t)
}, e.prototype.clear = function(t) {
this._activeRenderTarget.clear(t)
}, e.prototype.setTransform = function(t) {
this._activeRenderTarget.transform = t
}, e.prototype.clearRenderTexture = function(t, e) {
var r = t.baseTexture._glRenderTargets[this.CONTEXT_UID];
return r && r.clear(e), this
}, e.prototype.bindRenderTexture = function(t, e) {
var r = void 0;
if (t) {
var n = t.baseTexture;
n._glRenderTargets[this.CONTEXT_UID] || this.textureManager.updateTexture(n, 0), this.unbindTexture(n), (r = n._glRenderTargets[this.CONTEXT_UID]).setFrame(t.frame)
} else r = this.rootRenderTarget;
return r.transform = e, this.bindRenderTarget(r), this
}, e.prototype.bindRenderTarget = function(t) {
return t !== this._activeRenderTarget && (this._activeRenderTarget = t, t.activate(), this._activeShader && (this._activeShader.uniforms.projectionMatrix = t.projectionMatrix.toArray(!0)), this.stencilManager.setMaskStack(t.stencilMaskStack)), this
}, e.prototype.bindShader = function(t, e) {
return this._activeShader !== t && (this._activeShader = t, t.bind(), !1 !== e && (t.uniforms.projectionMatrix = this._activeRenderTarget.projectionMatrix.toArray(!0))), this
}, e.prototype.bindTexture = function(t, e, r) {
if ((t = (t = t || this.emptyTextures[e]).baseTexture || t).touched = this.textureGC.count, r) e = e || 0;
else {
for (var n = 0; n < this.boundTextures.length; n++)
if (this.boundTextures[n] === t) return n;
void 0 === e && (this._nextTextureLocation++, this._nextTextureLocation %= this.boundTextures.length, e = this.boundTextures.length - this._nextTextureLocation - 1)
}
var i = this.gl,
o = t._glTextures[this.CONTEXT_UID];
return o ? (this.boundTextures[e] = t, i.activeTexture(i.TEXTURE0 + e), i.bindTexture(i.TEXTURE_2D, o.texture)) : this.textureManager.updateTexture(t, e), e
}, e.prototype.unbindTexture = function(t) {
var e = this.gl;
t = t.baseTexture || t;
for (var r = 0; r < this.boundTextures.length; r++) this.boundTextures[r] === t && (this.boundTextures[r] = this.emptyTextures[r], e.activeTexture(e.TEXTURE0 + r), e.bindTexture(e.TEXTURE_2D, this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture));
return this
}, e.prototype.createVao = function() {
return new y.default.VertexArrayObject(this.gl, this.state.attribState)
}, e.prototype.bindVao = function(t) {
return this._activeVao === t ? this : (t ? t.bind() : this._activeVao && this._activeVao.unbind(), this._activeVao = t, this)
}, e.prototype.reset = function() {
this.setObjectRenderer(this.emptyRenderer), this.bindVao(null), this._activeShader = null, this._activeRenderTarget = this.rootRenderTarget;
for (var t = 0; t < this.boundTextures.length; t++) this.boundTextures[t] = this.emptyTextures[t];
return this.rootRenderTarget.activate(), this.state.resetToDefault(), this
}, e.prototype.handleContextLost = function(t) {
t.preventDefault()
}, e.prototype.handleContextRestored = function() {
this.textureManager.removeAll(), this.filterManager.destroy(!0), this._initContext()
}, e.prototype.destroy = function(e) {
this.destroyPlugins(), this.view.removeEventListener("webglcontextlost", this.handleContextLost), this.view.removeEventListener("webglcontextrestored", this.handleContextRestored), this.textureManager.destroy(), t.prototype.destroy.call(this, e), this.uid = 0, this.maskManager.destroy(), this.stencilManager.destroy(), this.filterManager.destroy(), this.maskManager = null, this.filterManager = null, this.textureManager = null, this.currentRenderer = null, this.handleContextLost = null, this.handleContextRestored = null, this._contextOptions = null, this.gl.useProgram(null), this.gl.getExtension("WEBGL_lose_context") && this.gl.getExtension("WEBGL_lose_context").loseContext(), this.gl = null
}, e
}(n.default);
e.default = b, v.pluginTarget.mixin(b)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(5),
o = r(1),
a = r(4),
s = (n = a) && n.__esModule ? n : {
default: n
},
u = r(6);
var l = function() {
function t(e, r, n, a, l, h) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.gl = e, this.frameBuffer = null, this.texture = null, this.clearColor = [0, 0, 0, 0], this.size = new i.Rectangle(0, 0, 1, 1), this.resolution = l || s.default.RESOLUTION, this.projectionMatrix = new i.Matrix, this.transform = null, this.frame = null, this.defaultFrame = new i.Rectangle, this.destinationFrame = null, this.sourceFrame = null, this.stencilBuffer = null, this.stencilMaskStack = [], this.filterData = null, this.scaleMode = void 0 !== a ? a : s.default.SCALE_MODE, this.root = h, this.root ? (this.frameBuffer = new u.GLFramebuffer(e, 100, 100), this.frameBuffer.framebuffer = null) : (this.frameBuffer = u.GLFramebuffer.createRGBA(e, 100, 100), this.scaleMode === o.SCALE_MODES.NEAREST ? this.frameBuffer.texture.enableNearestScaling() : this.frameBuffer.texture.enableLinearScaling(), this.texture = this.frameBuffer.texture), this.setFrame(), this.resize(r, n)
}
return t.prototype.clear = function(t) {
var e = t || this.clearColor;
this.frameBuffer.clear(e[0], e[1], e[2], e[3])
}, t.prototype.attachStencilBuffer = function() {
this.root || this.frameBuffer.enableStencil()
}, t.prototype.setFrame = function(t, e) {
this.destinationFrame = t || this.destinationFrame || this.defaultFrame, this.sourceFrame = e || this.sourceFrame || this.destinationFrame
}, t.prototype.activate = function() {
var t = this.gl;
this.frameBuffer.bind(), this.calculateProjection(this.destinationFrame, this.sourceFrame), this.transform && this.projectionMatrix.append(this.transform), this.destinationFrame !== this.sourceFrame ? (t.enable(t.SCISSOR_TEST), t.scissor(0 | this.destinationFrame.x, 0 | this.destinationFrame.y, this.destinationFrame.width * this.resolution | 0, this.destinationFrame.height * this.resolution | 0)) : t.disable(t.SCISSOR_TEST), t.viewport(0 | this.destinationFrame.x, 0 | this.destinationFrame.y, this.destinationFrame.width * this.resolution | 0, this.destinationFrame.height * this.resolution | 0)
}, t.prototype.calculateProjection = function(t, e) {
var r = this.projectionMatrix;
e = e || t, r.identity(), this.root ? (r.a = 1 / t.width * 2, r.d = -1 / t.height * 2, r.tx = -1 - e.x * r.a, r.ty = 1 - e.y * r.d) : (r.a = 1 / t.width * 2, r.d = 1 / t.height * 2, r.tx = -1 - e.x * r.a, r.ty = -1 - e.y * r.d)
}, t.prototype.resize = function(t, e) {
if (t |= 0, e |= 0, this.size.width !== t || this.size.height !== e) {
this.size.width = t, this.size.height = e, this.defaultFrame.width = t, this.defaultFrame.height = e, this.frameBuffer.resize(t * this.resolution, e * this.resolution);
var r = this.frame || this.size;
this.calculateProjection(r)
}
}, t.prototype.destroy = function() {
this.frameBuffer.destroy(), this.frameBuffer = null, this.texture = null
}, t
}();
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
t.nativeLines ? function(t, e) {
var r = 0,
n = t.points;
if (0 === n.length) return;
var o = e.points,
a = n.length / 2,
s = (0, i.hex2rgb)(t.lineColor),
u = t.lineAlpha,
l = s[0] * u,
h = s[1] * u,
c = s[2] * u;
for (r = 1; r < a; r++) {
var f = n[2 * (r - 1)],
d = n[2 * (r - 1) + 1],
p = n[2 * r],
v = n[2 * r + 1];
o.push(f, d), o.push(l, h, c, u), o.push(p, v), o.push(l, h, c, u)
}
}(t, r) : function(t, e) {
var r = t.points;
if (0 === r.length) return;
var o = new n.Point(r[0], r[1]),
a = new n.Point(r[r.length - 2], r[r.length - 1]);
if (o.x === a.x && o.y === a.y) {
(r = r.slice()).pop(), r.pop();
var s = (a = new n.Point(r[r.length - 2], r[r.length - 1])).x + .5 * (o.x - a.x),
u = a.y + .5 * (o.y - a.y);
r.unshift(s, u), r.push(s, u)
}
var l = e.points,
h = e.indices,
c = r.length / 2,
f = r.length,
d = l.length / 6,
p = t.lineWidth / 2,
v = (0, i.hex2rgb)(t.lineColor),
y = t.lineAlpha,
g = v[0] * y,
m = v[1] * y,
_ = v[2] * y,
b = r[0],
x = r[1],
w = r[2],
T = r[3],
E = 0,
S = 0,
M = -(x - T),
P = b - w,
O = 0,
C = 0,
A = 0,
R = 0,
I = Math.sqrt(M * M + P * P);
M /= I, P /= I, M *= p, P *= p, l.push(b - M, x - P, g, m, _, y), l.push(b + M, x + P, g, m, _, y);
for (var D = 1; D < c - 1; ++D) {
b = r[2 * (D - 1)], x = r[2 * (D - 1) + 1], w = r[2 * D], T = r[2 * D + 1], E = r[2 * (D + 1)], S = r[2 * (D + 1) + 1], M = -(x - T), P = b - w, I = Math.sqrt(M * M + P * P), M /= I, P /= I, M *= p, P *= p, O = -(T - S), C = w - E, I = Math.sqrt(O * O + C * C), O /= I, C /= I;
var k = -P + x - (-P + T),
N = -M + w - (-M + b),
L = (-M + b) * (-P + T) - (-M + w) * (-P + x),
j = -(C *= p) + S - (-C + T),
F = -(O *= p) + w - (-O + E),
B = (-O + E) * (-C + T) - (-O + w) * (-C + S),
U = k * F - j * N;
if (Math.abs(U) < .1) U += 10.1, l.push(w - M, T - P, g, m, _, y), l.push(w + M, T + P, g, m, _, y);
else {
var X = (N * B - F * L) / U,
V = (j * L - k * B) / U,
W = (X - w) * (X - w) + (V - T) * (V - T);
W > 196 * p * p ? (A = M - O, R = P - C, I = Math.sqrt(A * A + R * R), A /= I, R /= I, A *= p, R *= p, l.push(w - A, T - R), l.push(g, m, _, y), l.push(w + A, T + R), l.push(g, m, _, y), l.push(w - A, T - R), l.push(g, m, _, y), f++) : (l.push(X, V), l.push(g, m, _, y), l.push(w - (X - w), T - (V - T)), l.push(g, m, _, y))
}
}
b = r[2 * (c - 2)], x = r[2 * (c - 2) + 1], w = r[2 * (c - 1)], T = r[2 * (c - 1) + 1], M = -(x - T), P = b - w, I = Math.sqrt(M * M + P * P), M /= I, P /= I, M *= p, P *= p, l.push(w - M, T - P), l.push(g, m, _, y), l.push(w + M, T + P), l.push(g, m, _, y), h.push(d);
for (var Y = 0; Y < f; ++Y) h.push(d++);
h.push(d - 1)
}(t, e)
};
var n = r(5),
i = r(3)
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Tween = void 0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(2),
o = r(214),
a = r(40);
e.Tween = function(t) {
function e(t) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
r._target = t, r._elements = [], r._currentIndex = 0, r._currentTime = 0, r._loop = !1, r._isPaused = !1, r._totalDuration = 0, r._onComplete = function() {}, a.TweenManager.add(r);
var n = t.destroy;
t.destroy = null;
var i = r;
return t.destroy = function(e) {
i.remove(), n.bind(t)(e)
}, r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, i.utils.EventEmitter), n(e, [{
key: "to",
value: function(t, e, r) {
var n = o.TweenElement.create(this).to(t, e, r);
return this._addElement(n, e), this
}
}, {
key: "from",
value: function(t, e, r) {
var n = o.TweenElement.create(this).from(t, e, r);
return this._addElement(n, e), this
}
}, {
key: "by",
value: function(t, e, r) {
var n = o.TweenElement.create(this).by(t, e, r);
return this._addElement(n, e), this
}
}, {
key: "wait",
value: function(t) {
var e = o.TweenElement.create(this).wait(t);
return this._addElement(e, t), this
}
}, {
key: "call",
value: function(t, e) {
var r = o.TweenElement.create(this).call(t, e);
return this._addElement(r), this
}
}, {
key: "set",
value: function(t) {
for (var e = Object.keys(t), r = 0, n = e.length; r < n; r++) this._target[e[r]] = t[e[r]];
return this
}
}, {
key: "loop",
value: function() {
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
return this._loop = t, this
}
}, {
key: "pause",
value: function() {
return this._isPaused = !0, this
}
}, {
key: "resume",
value: function() {
return this._isPaused = !1, this
}
}, {
key: "chain",
value: function(t) {
return t.pause(), this._onComplete = function() {
return t.resume()
}, t
}
}, {
key: "remove",
value: function() {
a.TweenManager.remove(this), this._target = null
}
}, {
key: "update",
value: function(t) {
this._isPaused || this._target.isPaused || (this._loop && this._totalDuration > 0 && (t %= this._totalDuration), this._updateElement(t))
}
}, {
key: "_addElement",
value: function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
this._elements.push(t), this._totalDuration += e
}
}, {
key: "_updateElement",
value: function(t) {
if (this._currentIndex >= this._elements.length) {
if (!this._loop) return this.remove(), void this._onComplete();
this._reset()
}
var e = this._elements[this._currentIndex];
e.isPending() && e.start();
var r = e.update(t);
if (r > 0) return this._currentIndex++, this._updateElement(r)
}
}, {
key: "_reset",
value: function() {
this._currentIndex = 0, this._elements.forEach(function(t) {
return t.reset()
})
}
}, {
key: "target",
get: function() {
return this._target
}
}], [{
key: "new",
value: function(t) {
return new this(t)
}
}]), e
}()
}, function(t, e) {
var r;
r = function() {
return this
}();
try {
r = r || Function("return this")() || (0, eval)("this")
} catch (t) {
"object" == typeof window && (r = window)
}
t.exports = r
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x = e, this.y = r
}
return t.prototype.clone = function() {
return new t(this.x, this.y)
}, t.prototype.copy = function(t) {
this.set(t.x, t.y)
}, t.prototype.equals = function(t) {
return t.x === this.x && t.y === this.y
}, t.prototype.set = function(t, e) {
this.x = t || 0, this.y = e || (0 !== e ? this.x : 0)
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(24),
a = (n = o) && n.__esModule ? n : {
default: n
};
var s = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1,
o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0,
a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.a = e, this.b = r, this.c = n, this.d = i, this.tx = o, this.ty = a, this.array = null
}
return t.prototype.fromArray = function(t) {
this.a = t[0], this.b = t[1], this.c = t[3], this.d = t[4], this.tx = t[2], this.ty = t[5]
}, t.prototype.set = function(t, e, r, n, i, o) {
return this.a = t, this.b = e, this.c = r, this.d = n, this.tx = i, this.ty = o, this
}, t.prototype.toArray = function(t, e) {
this.array || (this.array = new Float32Array(9));
var r = e || this.array;
return t ? (r[0] = this.a, r[1] = this.b, r[2] = 0, r[3] = this.c, r[4] = this.d, r[5] = 0, r[6] = this.tx, r[7] = this.ty, r[8] = 1) : (r[0] = this.a, r[1] = this.c, r[2] = this.tx, r[3] = this.b, r[4] = this.d, r[5] = this.ty, r[6] = 0, r[7] = 0, r[8] = 1), r
}, t.prototype.apply = function(t, e) {
e = e || new a.default;
var r = t.x,
n = t.y;
return e.x = this.a * r + this.c * n + this.tx, e.y = this.b * r + this.d * n + this.ty, e
}, t.prototype.applyInverse = function(t, e) {
e = e || new a.default;
var r = 1 / (this.a * this.d + this.c * -this.b),
n = t.x,
i = t.y;
return e.x = this.d * r * n + -this.c * r * i + (this.ty * this.c - this.tx * this.d) * r, e.y = this.a * r * i + -this.b * r * n + (-this.ty * this.a + this.tx * this.b) * r, e
}, t.prototype.translate = function(t, e) {
return this.tx += t, this.ty += e, this
}, t.prototype.scale = function(t, e) {
return this.a *= t, this.d *= e, this.c *= t, this.b *= e, this.tx *= t, this.ty *= e, this
}, t.prototype.rotate = function(t) {
var e = Math.cos(t),
r = Math.sin(t),
n = this.a,
i = this.c,
o = this.tx;
return this.a = n * e - this.b * r, this.b = n * r + this.b * e, this.c = i * e - this.d * r, this.d = i * r + this.d * e, this.tx = o * e - this.ty * r, this.ty = o * r + this.ty * e, this
}, t.prototype.append = function(t) {
var e = this.a,
r = this.b,
n = this.c,
i = this.d;
return this.a = t.a * e + t.b * n, this.b = t.a * r + t.b * i, this.c = t.c * e + t.d * n, this.d = t.c * r + t.d * i, this.tx = t.tx * e + t.ty * n + this.tx, this.ty = t.tx * r + t.ty * i + this.ty, this
}, t.prototype.setTransform = function(t, e, r, n, i, o, a, s, u) {
var l = Math.sin(a),
h = Math.cos(a),
c = Math.cos(u),
f = Math.sin(u),
d = -Math.sin(s),
p = Math.cos(s),
v = h * i,
y = l * i,
g = -l * o,
m = h * o;
return this.a = c * v + f * g, this.b = c * y + f * m, this.c = d * v + p * g, this.d = d * y + p * m, this.tx = t + (r * v + n * g), this.ty = e + (r * y + n * m), this
}, t.prototype.prepend = function(t) {
var e = this.tx;
if (1 !== t.a || 0 !== t.b || 0 !== t.c || 1 !== t.d) {
var r = this.a,
n = this.c;
this.a = r * t.a + this.b * t.c, this.b = r * t.b + this.b * t.d, this.c = n * t.a + this.d * t.c, this.d = n * t.b + this.d * t.d
}
return this.tx = e * t.a + this.ty * t.c + t.tx, this.ty = e * t.b + this.ty * t.d + t.ty, this
}, t.prototype.decompose = function(t) {
var e = this.a,
r = this.b,
n = this.c,
i = this.d,
o = -Math.atan2(-n, i),
a = Math.atan2(r, e);
return Math.abs(o + a) < 1e-5 ? (t.rotation = a, e < 0 && i >= 0 && (t.rotation += t.rotation <= 0 ? Math.PI : -Math.PI), t.skew.x = t.skew.y = 0) : (t.skew.x = o, t.skew.y = a), t.scale.x = Math.sqrt(e * e + r * r), t.scale.y = Math.sqrt(n * n + i * i), t.position.x = this.tx, t.position.y = this.ty, t
}, t.prototype.invert = function() {
var t = this.a,
e = this.b,
r = this.c,
n = this.d,
i = this.tx,
o = t * n - e * r;
return this.a = n / o, this.b = -e / o, this.c = -r / o, this.d = t / o, this.tx = (r * this.ty - n * i) / o, this.ty = -(t * this.ty - e * i) / o, this
}, t.prototype.identity = function() {
return this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.tx = 0, this.ty = 0, this
}, t.prototype.clone = function() {
var e = new t;
return e.a = this.a, e.b = this.b, e.c = this.c, e.d = this.d, e.tx = this.tx, e.ty = this.ty, e
}, t.prototype.copy = function(t) {
return t.a = this.a, t.b = this.b, t.c = this.c, t.d = this.d, t.tx = this.tx, t.ty = this.ty, t
}, i(t, null, [{
key: "IDENTITY",
get: function() {
return new t
}
}, {
key: "TEMP_MATRIX",
get: function() {
return new t
}
}]), t
}();
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(1);
var o = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x = Number(e), this.y = Number(r), this.width = Number(n), this.height = Number(o), this.type = i.SHAPES.RECT
}
return t.prototype.clone = function() {
return new t(this.x, this.y, this.width, this.height)
}, t.prototype.copy = function(t) {
return this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height, this
}, t.prototype.contains = function(t, e) {
return !(this.width <= 0 || this.height <= 0) && (t >= this.x && t < this.x + this.width && e >= this.y && e < this.y + this.height)
}, t.prototype.pad = function(t, e) {
t = t || 0, e = e || (0 !== e ? t : 0), this.x -= t, this.y -= e, this.width += 2 * t, this.height += 2 * e
}, t.prototype.fit = function(t) {
this.x < t.x && (this.width += this.x, this.width < 0 && (this.width = 0), this.x = t.x), this.y < t.y && (this.height += this.y, this.height < 0 && (this.height = 0), this.y = t.y), this.x + this.width > t.x + t.width && (this.width = t.width - this.x, this.width < 0 && (this.width = 0)), this.y + this.height > t.y + t.height && (this.height = t.height - this.y, this.height < 0 && (this.height = 0))
}, t.prototype.enlarge = function(t) {
var e = Math.min(this.x, t.x),
r = Math.max(this.x + this.width, t.x + t.width),
n = Math.min(this.y, t.y),
i = Math.max(this.y + this.height, t.y + t.height);
this.x = e, this.width = r - e, this.y = n, this.height = i - n
}, n(t, [{
key: "left",
get: function() {
return this.x
}
}, {
key: "right",
get: function() {
return this.x + this.width
}
}, {
key: "top",
get: function() {
return this.y
}
}, {
key: "bottom",
get: function() {
return this.y + this.height
}
}], [{
key: "EMPTY",
get: function() {
return new t(0, 0, 0, 0)
}
}]), t
}();
e.default = o
}, function(t, e) {
var r = null,
n = {
FLOAT: "float",
FLOAT_VEC2: "vec2",
FLOAT_VEC3: "vec3",
FLOAT_VEC4: "vec4",
INT: "int",
INT_VEC2: "ivec2",
INT_VEC3: "ivec3",
INT_VEC4: "ivec4",
BOOL: "bool",
BOOL_VEC2: "bvec2",
BOOL_VEC3: "bvec3",
BOOL_VEC4: "bvec4",
FLOAT_MAT2: "mat2",
FLOAT_MAT3: "mat3",
FLOAT_MAT4: "mat4",
SAMPLER_2D: "sampler2D"
};
t.exports = function(t, e) {
if (!r) {
var i = Object.keys(n);
r = {};
for (var o = 0; o < i.length; ++o) {
var a = i[o];
r[t[a]] = n[a]
}
}
return r[e]
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(5);
var i = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.rect = null
}
return t.prototype.isEmpty = function() {
return this.minX > this.maxX || this.minY > this.maxY
}, t.prototype.clear = function() {
this.updateID++, this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0
}, t.prototype.getRectangle = function(t) {
return this.minX > this.maxX || this.minY > this.maxY ? n.Rectangle.EMPTY : ((t = t || new n.Rectangle(0, 0, 1, 1)).x = this.minX, t.y = this.minY, t.width = this.maxX - this.minX, t.height = this.maxY - this.minY, t)
}, t.prototype.addPoint = function(t) {
this.minX = Math.min(this.minX, t.x), this.maxX = Math.max(this.maxX, t.x), this.minY = Math.min(this.minY, t.y), this.maxY = Math.max(this.maxY, t.y)
}, t.prototype.addQuad = function(t) {
var e = this.minX,
r = this.minY,
n = this.maxX,
i = this.maxY,
o = t[0],
a = t[1];
e = o < e ? o : e, r = a < r ? a : r, n = o > n ? o : n, i = a > i ? a : i, e = (o = t[2]) < e ? o : e, r = (a = t[3]) < r ? a : r, n = o > n ? o : n, i = a > i ? a : i, e = (o = t[4]) < e ? o : e, r = (a = t[5]) < r ? a : r, n = o > n ? o : n, i = a > i ? a : i, e = (o = t[6]) < e ? o : e, r = (a = t[7]) < r ? a : r, n = o > n ? o : n, i = a > i ? a : i, this.minX = e, this.minY = r, this.maxX = n, this.maxY = i
}, t.prototype.addFrame = function(t, e, r, n, i) {
var o = t.worldTransform,
a = o.a,
s = o.b,
u = o.c,
l = o.d,
h = o.tx,
c = o.ty,
f = this.minX,
d = this.minY,
p = this.maxX,
v = this.maxY,
y = a * e + u * r + h,
g = s * e + l * r + c;
f = y < f ? y : f, d = g < d ? g : d, p = y > p ? y : p, v = g > v ? g : v, f = (y = a * n + u * r + h) < f ? y : f, d = (g = s * n + l * r + c) < d ? g : d, p = y > p ? y : p, v = g > v ? g : v, f = (y = a * e + u * i + h) < f ? y : f, d = (g = s * e + l * i + c) < d ? g : d, p = y > p ? y : p, v = g > v ? g : v, f = (y = a * n + u * i + h) < f ? y : f, d = (g = s * n + l * i + c) < d ? g : d, p = y > p ? y : p, v = g > v ? g : v, this.minX = f, this.minY = d, this.maxX = p, this.maxY = v
}, t.prototype.addVertices = function(t, e, r, n) {
for (var i = t.worldTransform, o = i.a, a = i.b, s = i.c, u = i.d, l = i.tx, h = i.ty, c = this.minX, f = this.minY, d = this.maxX, p = this.maxY, v = r; v < n; v += 2) {
var y = e[v],
g = e[v + 1],
m = o * y + s * g + l,
_ = u * g + a * y + h;
c = m < c ? m : c, f = _ < f ? _ : f, d = m > d ? m : d, p = _ > p ? _ : p
}
this.minX = c, this.minY = f, this.maxX = d, this.maxY = p
}, t.prototype.addBounds = function(t) {
var e = this.minX,
r = this.minY,
n = this.maxX,
i = this.maxY;
this.minX = t.minX < e ? t.minX : e, this.minY = t.minY < r ? t.minY : r, this.maxX = t.maxX > n ? t.maxX : n, this.maxY = t.maxY > i ? t.maxY : i
}, t.prototype.addBoundsMask = function(t, e) {
var r = t.minX > e.minX ? t.minX : e.minX,
n = t.minY > e.minY ? t.minY : e.minY,
i = t.maxX < e.maxX ? t.maxX : e.maxX,
o = t.maxY < e.maxY ? t.maxY : e.maxY;
if (r <= i && n <= o) {
var a = this.minX,
s = this.minY,
u = this.maxX,
l = this.maxY;
this.minX = r < a ? r : a, this.minY = n < s ? n : s, this.maxX = i > u ? i : u, this.maxY = o > l ? o : l
}
}, t.prototype.addBoundsArea = function(t, e) {
var r = t.minX > e.x ? t.minX : e.x,
n = t.minY > e.y ? t.minY : e.y,
i = t.maxX < e.x + e.width ? t.maxX : e.x + e.width,
o = t.maxY < e.y + e.height ? t.maxY : e.y + e.height;
if (r <= i && n <= o) {
var a = this.minX,
s = this.minY,
u = this.maxX,
l = this.maxY;
this.minX = r < a ? r : a, this.minY = n < s ? n : s, this.maxX = i > u ? i : u, this.maxY = o > l ? o : l
}
}, t
}();
e.default = i
}, function(t, e, r) {
var n, i, o, a, s, u, l, h, c, f, d, p, v, y, g, m, _, b, x, w, T, E;
/**
* isMobile.js v0.4.1
*
* A simple library to detect Apple phones and tablets,
* Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
* and any kind of seven inch device, via user agent sniffing.
*
* @author: Kai Mallea (kmallea@gmail.com)
*
* @license: http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* isMobile.js v0.4.1
*
* A simple library to detect Apple phones and tablets,
* Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
* and any kind of seven inch device, via user agent sniffing.
*
* @author: Kai Mallea (kmallea@gmail.com)
*
* @license: http://creativecommons.org/publicdomain/zero/1.0/
*/
a = this, s = /iPhone/i, u = /iPod/i, l = /iPad/i, h = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i, c = /Android/i, f = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i, d = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i, p = /Windows Phone/i, v = /(?=.*\bWindows\b)(?=.*\bARM\b)/i, y = /BlackBerry/i, g = /BB10/i, m = /Opera Mini/i, _ = /(CriOS|Chrome)(?=.*\bMobile\b)/i, b = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i, x = new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)", "i"), w = function(t, e) {
return t.test(e)
}, T = function(t) {
var e = t || navigator.userAgent,
r = e.split("[FBAN");
if (void 0 !== r[1] && (e = r[0]), void 0 !== (r = e.split("Twitter"))[1] && (e = r[0]), this.apple = {
phone: w(s, e),
ipod: w(u, e),
tablet: !w(s, e) && w(l, e),
device: w(s, e) || w(u, e) || w(l, e)
}, this.amazon = {
phone: w(f, e),
tablet: !w(f, e) && w(d, e),
device: w(f, e) || w(d, e)
}, this.android = {
phone: w(f, e) || w(h, e),
tablet: !w(f, e) && !w(h, e) && (w(d, e) || w(c, e)),
device: w(f, e) || w(d, e) || w(h, e) || w(c, e)
}, this.windows = {
phone: w(p, e),
tablet: w(v, e),
device: w(p, e) || w(v, e)
}, this.other = {
blackberry: w(y, e),
blackberry10: w(g, e),
opera: w(m, e),
firefox: w(b, e),
chrome: w(_, e),
device: w(y, e) || w(g, e) || w(m, e) || w(b, e) || w(_, e)
}, this.seven_inch = w(x, e), this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch, this.phone = this.apple.phone || this.android.phone || this.windows.phone, this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet, "undefined" == typeof window) return this
}, E = function() {
var t = new T;
return t.Class = T, t
}, void 0 !== t && t.exports && "undefined" == typeof window ? t.exports = T : void 0 !== t && t.exports && "undefined" != typeof window ? t.exports = E() : (i = [], n = a.isMobile = E(), void 0 === (o = "function" == typeof n ? n.apply(e, i) : n) || (t.exports = o))
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(5);
var i = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.worldTransform = new n.Matrix, this.localTransform = new n.Matrix, this._worldID = 0, this._parentID = 0
}
return t.prototype.updateLocalTransform = function() {}, t.prototype.updateTransform = function(t) {
var e = t.worldTransform,
r = this.worldTransform,
n = this.localTransform;
r.a = n.a * e.a + n.b * e.c, r.b = n.a * e.b + n.b * e.d, r.c = n.c * e.a + n.d * e.c, r.d = n.c * e.b + n.d * e.d, r.tx = n.tx * e.a + n.ty * e.c + e.tx, r.ty = n.tx * e.b + n.ty * e.d + e.ty, this._worldID++
}, t
}();
e.default = i, i.prototype.updateWorldTransform = i.prototype.updateTransform, i.IDENTITY = new i
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(5),
o = r(3),
a = r(1),
s = l(r(8)),
u = l(r(11));
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
var h = new i.Point,
c = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return n._anchor = new i.ObservablePoint(n._onAnchorUpdate, n), n._texture = null, n._width = 0, n._height = 0, n._tint = null, n._tintRGB = null, n.tint = 16777215, n.blendMode = a.BLEND_MODES.NORMAL, n.shader = null, n.cachedTint = 16777215, n.texture = r || s.default.EMPTY, n.vertexData = new Float32Array(8), n.vertexTrimmedData = null, n._transformID = -1, n._textureID = -1, n._transformTrimmedID = -1, n._textureTrimmedID = -1, n.pluginName = "sprite", n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._onTextureUpdate = function() {
this._textureID = -1, this._textureTrimmedID = -1, this.cachedTint = 16777215, this._width && (this.scale.x = (0, o.sign)(this.scale.x) * this._width / this._texture.orig.width), this._height && (this.scale.y = (0, o.sign)(this.scale.y) * this._height / this._texture.orig.height)
}, e.prototype._onAnchorUpdate = function() {
this._transformID = -1, this._transformTrimmedID = -1
}, e.prototype.calculateVertices = function() {
if (this._transformID !== this.transform._worldID || this._textureID !== this._texture._updateID) {
this._transformID = this.transform._worldID, this._textureID = this._texture._updateID;
var t = this._texture,
e = this.transform.worldTransform,
r = e.a,
n = e.b,
i = e.c,
o = e.d,
a = e.tx,
s = e.ty,
u = this.vertexData,
l = t.trim,
h = t.orig,
c = this._anchor,
f = 0,
d = 0,
p = 0,
v = 0;
l ? (f = (d = l.x - c._x * h.width) + l.width, p = (v = l.y - c._y * h.height) + l.height) : (f = (d = -c._x * h.width) + h.width, p = (v = -c._y * h.height) + h.height), u[0] = r * d + i * v + a, u[1] = o * v + n * d + s, u[2] = r * f + i * v + a, u[3] = o * v + n * f + s, u[4] = r * f + i * p + a, u[5] = o * p + n * f + s, u[6] = r * d + i * p + a, u[7] = o * p + n * d + s
}
}, e.prototype.calculateTrimmedVertices = function() {
if (this.vertexTrimmedData) {
if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID) return
} else this.vertexTrimmedData = new Float32Array(8);
this._transformTrimmedID = this.transform._worldID, this._textureTrimmedID = this._texture._updateID;
var t = this._texture,
e = this.vertexTrimmedData,
r = t.orig,
n = this._anchor,
i = this.transform.worldTransform,
o = i.a,
a = i.b,
s = i.c,
u = i.d,
l = i.tx,
h = i.ty,
c = -n._x * r.width,
f = c + r.width,
d = -n._y * r.height,
p = d + r.height;
e[0] = o * c + s * d + l, e[1] = u * d + a * c + h, e[2] = o * f + s * d + l, e[3] = u * d + a * f + h, e[4] = o * f + s * p + l, e[5] = u * p + a * f + h, e[6] = o * c + s * p + l, e[7] = u * p + a * c + h
}, e.prototype._renderWebGL = function(t) {
this.calculateVertices(), t.setObjectRenderer(t.plugins[this.pluginName]), t.plugins[this.pluginName].render(this)
}, e.prototype._renderCanvas = function(t) {
t.plugins[this.pluginName].render(this)
}, e.prototype._calculateBounds = function() {
var t = this._texture.trim,
e = this._texture.orig;
!t || t.width === e.width && t.height === e.height ? (this.calculateVertices(), this._bounds.addQuad(this.vertexData)) : (this.calculateTrimmedVertices(), this._bounds.addQuad(this.vertexTrimmedData))
}, e.prototype.getLocalBounds = function(e) {
return 0 === this.children.length ? (this._bounds.minX = this._texture.orig.width * -this._anchor._x, this._bounds.minY = this._texture.orig.height * -this._anchor._y, this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x), this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y), e || (this._localBoundsRect || (this._localBoundsRect = new i.Rectangle), e = this._localBoundsRect), this._bounds.getRectangle(e)) : t.prototype.getLocalBounds.call(this, e)
}, e.prototype.containsPoint = function(t) {
this.worldTransform.applyInverse(t, h);
var e = this._texture.orig.width,
r = this._texture.orig.height,
n = -e * this.anchor.x,
i = 0;
return h.x >= n && h.x < n + e && (i = -r * this.anchor.y, h.y >= i && h.y < i + r)
}, e.prototype.destroy = function(e) {
if (t.prototype.destroy.call(this, e), this._anchor = null, "boolean" == typeof e ? e : e && e.texture) {
var r = "boolean" == typeof e ? e : e && e.baseTexture;
this._texture.destroy(!!r)
}
this._texture = null, this.shader = null
}, e.from = function(t) {
return new e(s.default.from(t))
}, e.fromFrame = function(t) {
var r = o.TextureCache[t];
if (!r) throw new Error('The frameId "' + t + '" does not exist in the texture cache');
return new e(r)
}, e.fromImage = function(t, r, n) {
return new e(s.default.fromImage(t, r, n))
}, n(e, [{
key: "width",
get: function() {
return Math.abs(this.scale.x) * this._texture.orig.width
},
set: function(t) {
var e = (0, o.sign)(this.scale.x) || 1;
this.scale.x = e * t / this._texture.orig.width, this._width = t
}
}, {
key: "height",
get: function() {
return Math.abs(this.scale.y) * this._texture.orig.height
},
set: function(t) {
var e = (0, o.sign)(this.scale.y) || 1;
this.scale.y = e * t / this._texture.orig.height, this._height = t
}
}, {
key: "anchor",
get: function() {
return this._anchor
},
set: function(t) {
this._anchor.copy(t)
}
}, {
key: "tint",
get: function() {
return this._tint
},
set: function(t) {
this._tint = t, this._tintRGB = (t >> 16) + (65280 & t) + ((255 & t) << 16)
}
}, {
key: "texture",
get: function() {
return this._texture
},
set: function(t) {
this._texture !== t && (this._texture = t, this.cachedTint = 16777215, this._textureID = -1, this._textureTrimmedID = -1, t && (t.baseTexture.hasLoaded ? this._onTextureUpdate() : t.once("update", this._onTextureUpdate, this)))
}
}]), e
}(u.default);
e.default = c
}, function(t, e, r) {
"use strict";
"use restrict";
function n(t) {
var e = 32;
return (t &= -t) && e--, 65535 & t && (e -= 16), 16711935 & t && (e -= 8), 252645135 & t && (e -= 4), 858993459 & t && (e -= 2), 1431655765 & t && (e -= 1), e
}
e.INT_BITS = 32, e.INT_MAX = 2147483647, e.INT_MIN = -1 << 31, e.sign = function(t) {
return (t > 0) - (t < 0)
}, e.abs = function(t) {
var e = t >> 31;
return (t ^ e) - e
}, e.min = function(t, e) {
return e ^ (t ^ e) & -(t < e)
}, e.max = function(t, e) {
return t ^ (t ^ e) & -(t < e)
}, e.isPow2 = function(t) {
return !(t & t - 1 || !t)
}, e.log2 = function(t) {
var e, r;
return e = (t > 65535) << 4, e |= r = ((t >>>= e) > 255) << 3, e |= r = ((t >>>= r) > 15) << 2, (e |= r = ((t >>>= r) > 3) << 1) | (t >>>= r) >> 1
}, e.log10 = function(t) {
return t >= 1e9 ? 9 : t >= 1e8 ? 8 : t >= 1e7 ? 7 : t >= 1e6 ? 6 : t >= 1e5 ? 5 : t >= 1e4 ? 4 : t >= 1e3 ? 3 : t >= 100 ? 2 : t >= 10 ? 1 : 0
}, e.popCount = function(t) {
return 16843009 * ((t = (858993459 & (t -= t >>> 1 & 1431655765)) + (t >>> 2 & 858993459)) + (t >>> 4) & 252645135) >>> 24
}, e.countTrailingZeros = n, e.nextPow2 = function(t) {
return t += 0 === t, --t, t |= t >>> 1, t |= t >>> 2, t |= t >>> 4, t |= t >>> 8, (t |= t >>> 16) + 1
}, e.prevPow2 = function(t) {
return t |= t >>> 1, t |= t >>> 2, t |= t >>> 4, t |= t >>> 8, (t |= t >>> 16) - (t >>> 1)
}, e.parity = function(t) {
return t ^= t >>> 16, t ^= t >>> 8, t ^= t >>> 4, 27030 >>> (t &= 15) & 1
};
var i = new Array(256);
! function(t) {
for (var e = 0; e < 256; ++e) {
var r = e,
n = e,
i = 7;
for (r >>>= 1; r; r >>>= 1) n <<= 1, n |= 1 & r, --i;
t[e] = n << i & 255
}
}(i), e.reverse = function(t) {
return i[255 & t] << 24 | i[t >>> 8 & 255] << 16 | i[t >>> 16 & 255] << 8 | i[t >>> 24 & 255]
}, e.interleave2 = function(t, e) {
return (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t &= 65535) | t << 8)) | t << 4)) | t << 2)) | t << 1)) | (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e &= 65535) | e << 8)) | e << 4)) | e << 2)) | e << 1)) << 1
}, e.deinterleave2 = function(t, e) {
return (t = 65535 & ((t = 16711935 & ((t = 252645135 & ((t = 858993459 & ((t = t >>> e & 1431655765) | t >>> 1)) | t >>> 2)) | t >>> 4)) | t >>> 16)) << 16 >> 16
}, e.interleave3 = function(t, e, r) {
return t = 1227133513 & ((t = 3272356035 & ((t = 251719695 & ((t = 4278190335 & ((t &= 1023) | t << 16)) | t << 8)) | t << 4)) | t << 2), (t |= (e = 1227133513 & ((e = 3272356035 & ((e = 251719695 & ((e = 4278190335 & ((e &= 1023) | e << 16)) | e << 8)) | e << 4)) | e << 2)) << 1) | (r = 1227133513 & ((r = 3272356035 & ((r = 251719695 & ((r = 4278190335 & ((r &= 1023) | r << 16)) | r << 8)) | r << 4)) | r << 2)) << 2
}, e.deinterleave3 = function(t, e) {
return (t = 1023 & ((t = 4278190335 & ((t = 251719695 & ((t = 3272356035 & ((t = t >>> e & 1227133513) | t >>> 2)) | t >>> 4)) | t >>> 8)) | t >>> 16)) << 22 >> 22
}, e.nextCombination = function(t) {
var e = t | t - 1;
return e + 1 | (~e & -~e) - 1 >>> n(t) + 1
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.Ticker = e.shared = void 0;
var n, i = r(131),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = new o.default;
a.autoStart = !0, a.destroy = function() {}, e.shared = a, e.Ticker = o.default
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = i(r(62));
function i(t) {
return t && t.__esModule ? t : {
default: t
}
}
var o = function(t) {
function e(r, i) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var o = null;
if (!(r instanceof n.default)) {
var a = arguments[1],
s = arguments[2],
u = arguments[3],
l = arguments[4];
console.warn("Please use RenderTexture.create(" + a + ", " + s + ") instead of the ctor directly."), o = arguments[0], i = null, r = new n.default(a, s, u, l)
}
var h = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r, i));
return h.legacyRenderer = o, h.valid = !0, h._updateUvs(), h
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.resize = function(t, e, r) {
t = Math.ceil(t), e = Math.ceil(e), this.valid = t > 0 && e > 0, this._frame.width = this.orig.width = t, this._frame.height = this.orig.height = e, r || this.baseTexture.resize(t, e), this._updateUvs()
}, e.create = function(t, r, i, o) {
return new e(new n.default(t, r, i, o))
}, e
}(i(r(8)).default);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(3),
o = r(64);
var a = {
getTintedTexture: function(t, e) {
var r = t._texture,
n = "#" + ("00000" + (0 | (e = a.roundColor(e))).toString(16)).substr(-6);
r.tintCache = r.tintCache || {};
var i = r.tintCache[n],
o = void 0;
if (i) {
if (i.tintId === r._updateID) return r.tintCache[n];
o = r.tintCache[n]
} else o = a.canvas || document.createElement("canvas");
if (a.tintMethod(r, e, o), o.tintId = r._updateID, a.convertTintToImage) {
var s = new Image;
s.src = o.toDataURL(), r.tintCache[n] = s
} else r.tintCache[n] = o, a.canvas = null;
return o
},
tintWithMultiply: function(t, e, r) {
var n = r.getContext("2d"),
i = t._frame.clone(),
o = t.baseTexture.resolution;
i.x *= o, i.y *= o, i.width *= o, i.height *= o, r.width = Math.ceil(i.width), r.height = Math.ceil(i.height), n.save(), n.fillStyle = "#" + ("00000" + (0 | e).toString(16)).substr(-6), n.fillRect(0, 0, i.width, i.height), n.globalCompositeOperation = "multiply", n.drawImage(t.baseTexture.source, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), n.globalCompositeOperation = "destination-atop", n.drawImage(t.baseTexture.source, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), n.restore()
},
tintWithOverlay: function(t, e, r) {
var n = r.getContext("2d"),
i = t._frame.clone(),
o = t.baseTexture.resolution;
i.x *= o, i.y *= o, i.width *= o, i.height *= o, r.width = Math.ceil(i.width), r.height = Math.ceil(i.height), n.save(), n.globalCompositeOperation = "copy", n.fillStyle = "#" + ("00000" + (0 | e).toString(16)).substr(-6), n.fillRect(0, 0, i.width, i.height), n.globalCompositeOperation = "destination-atop", n.drawImage(t.baseTexture.source, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), n.restore()
},
tintWithPerPixel: function(t, e, r) {
var n = r.getContext("2d"),
o = t._frame.clone(),
a = t.baseTexture.resolution;
o.x *= a, o.y *= a, o.width *= a, o.height *= a, r.width = Math.ceil(o.width), r.height = Math.ceil(o.height), n.save(), n.globalCompositeOperation = "copy", n.drawImage(t.baseTexture.source, o.x, o.y, o.width, o.height, 0, 0, o.width, o.height), n.restore();
for (var s = (0, i.hex2rgb)(e), u = s[0], l = s[1], h = s[2], c = n.getImageData(0, 0, o.width, o.height), f = c.data, d = 0; d < f.length; d += 4) f[d + 0] *= u, f[d + 1] *= l, f[d + 2] *= h;
n.putImageData(c, 0, 0)
},
roundColor: function(t) {
var e = a.cacheStepsPerColorChannel,
r = (0, i.hex2rgb)(t);
return r[0] = Math.min(255, r[0] / e * e), r[1] = Math.min(255, r[1] / e * e), r[2] = Math.min(255, r[2] / e * e), (0, i.rgb2hex)(r)
},
cacheStepsPerColorChannel: 8,
convertTintToImage: !1,
canUseMultiply: (0, ((n = o) && n.__esModule ? n : {
default: n
}).default)(),
tintMethod: 0
};
a.tintMethod = a.canUseMultiply ? a.tintWithMultiply : a.tintWithPerPixel, e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
for (var e = 6 * t, r = new Uint16Array(e), n = 0, i = 0; n < e; n += 6, i += 4) r[n + 0] = i + 0, r[n + 1] = i + 1, r[n + 2] = i + 2, r[n + 3] = i + 0, r[n + 4] = i + 2, r[n + 5] = i + 3;
return r
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = a(r(88)),
o = a(r(87));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
var s = !(!window.XDomainRequest || "withCredentials" in new XMLHttpRequest),
u = null;
function l() {}
var h = function() {
function t(e, r, n) {
if (function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), "string" != typeof e || "string" != typeof r) throw new Error("Both name and url are required for constructing a resource.");
n = n || {}, this._flags = 0, this._setFlag(t.STATUS_FLAGS.DATA_URL, 0 === r.indexOf("data:")), this.name = e, this.url = r, this.extension = this._getExtension(), this.data = null, this.crossOrigin = !0 === n.crossOrigin ? "anonymous" : n.crossOrigin, this.loadType = n.loadType || this._determineLoadType(), this.xhrType = n.xhrType, this.metadata = n.metadata || {}, this.error = null, this.xhr = null, this.children = [], this.type = t.TYPE.UNKNOWN, this.progressChunk = 0, this._dequeue = l, this._onLoadBinding = null, this._boundComplete = this.complete.bind(this), this._boundOnError = this._onError.bind(this), this._boundOnProgress = this._onProgress.bind(this), this._boundXhrOnError = this._xhrOnError.bind(this), this._boundXhrOnAbort = this._xhrOnAbort.bind(this), this._boundXhrOnLoad = this._xhrOnLoad.bind(this), this._boundXdrOnTimeout = this._xdrOnTimeout.bind(this), this.onStart = new o.default, this.onProgress = new o.default, this.onComplete = new o.default, this.onAfterMiddleware = new o.default
}
return t.setExtensionLoadType = function(e, r) {
c(t._loadTypeMap, e, r)
}, t.setExtensionXhrType = function(e, r) {
c(t._xhrTypeMap, e, r)
}, t.prototype.complete = function() {
if (this.data && this.data.removeEventListener && (this.data.removeEventListener("error", this._boundOnError, !1), this.data.removeEventListener("load", this._boundComplete, !1), this.data.removeEventListener("progress", this._boundOnProgress, !1), this.data.removeEventListener("canplaythrough", this._boundComplete, !1)), this.xhr && (this.xhr.removeEventListener ? (this.xhr.removeEventListener("error", this._boundXhrOnError, !1), this.xhr.removeEventListener("abort", this._boundXhrOnAbort, !1), this.xhr.removeEventListener("progress", this._boundOnProgress, !1), this.xhr.removeEventListener("load", this._boundXhrOnLoad, !1)) : (this.xhr.onerror = null, this.xhr.ontimeout = null, this.xhr.onprogress = null, this.xhr.onload = null)), this.isComplete) throw new Error("Complete called again for an already completed resource.");
this._setFlag(t.STATUS_FLAGS.COMPLETE, !0), this._setFlag(t.STATUS_FLAGS.LOADING, !1), this.onComplete.dispatch(this)
}, t.prototype.abort = function(e) {
if (!this.error) {
if (this.error = new Error(e), this.xhr) this.xhr.abort();
else if (this.xdr) this.xdr.abort();
else if (this.data)
if (this.data.src) this.data.src = t.EMPTY_GIF;
else
for (; this.data.firstChild;) this.data.removeChild(this.data.firstChild);
this.complete()
}
}, t.prototype.load = function(e) {
var r = this;
if (!this.isLoading)
if (this.isComplete) e && setTimeout(function() {
return e(r)
}, 1);
else switch (e && this.onComplete.once(e), this._setFlag(t.STATUS_FLAGS.LOADING, !0), this.onStart.dispatch(this), !1 !== this.crossOrigin && "string" == typeof this.crossOrigin || (this.crossOrigin = this._determineCrossOrigin(this.url)), this.loadType) {
case t.LOAD_TYPE.IMAGE:
this.type = t.TYPE.IMAGE, this._loadElement("image");
break;
case t.LOAD_TYPE.AUDIO:
this.type = t.TYPE.AUDIO, this._loadSourceElement("audio");
break;
case t.LOAD_TYPE.VIDEO:
this.type = t.TYPE.VIDEO, this._loadSourceElement("video");
break;
case t.LOAD_TYPE.XHR:
default:
s && this.crossOrigin ? this._loadXdr() : this._loadXhr()
}
}, t.prototype._hasFlag = function(t) {
return !!(this._flags & t)
}, t.prototype._setFlag = function(t, e) {
this._flags = e ? this._flags | t : this._flags & ~t
}, t.prototype._loadElement = function(t) {
this.metadata.loadElement ? this.data = this.metadata.loadElement : "image" === t && void 0 !== window.Image ? this.data = new Image : this.data = document.createElement(t), this.crossOrigin && (this.data.crossOrigin = this.crossOrigin), this.metadata.skipSource || (this.data.src = this.url), this.data.addEventListener("error", this._boundOnError, !1), this.data.addEventListener("load", this._boundComplete, !1), this.data.addEventListener("progress", this._boundOnProgress, !1)
}, t.prototype._loadSourceElement = function(t) {
if (this.metadata.loadElement ? this.data = this.metadata.loadElement : "audio" === t && void 0 !== window.Audio ? this.data = new Audio : this.data = document.createElement(t), null !== this.data) {
if (!this.metadata.skipSource)
if (navigator.isCocoonJS) this.data.src = Array.isArray(this.url) ? this.url[0] : this.url;
else if (Array.isArray(this.url))
for (var e = this.metadata.mimeType, r = 0; r < this.url.length; ++r) this.data.appendChild(this._createSource(t, this.url[r], Array.isArray(e) ? e[r] : e));
else {
var n = this.metadata.mimeType;
this.data.appendChild(this._createSource(t, this.url, Array.isArray(n) ? n[0] : n))
}
this.data.addEventListener("error", this._boundOnError, !1), this.data.addEventListener("load", this._boundComplete, !1), this.data.addEventListener("progress", this._boundOnProgress, !1), this.data.addEventListener("canplaythrough", this._boundComplete, !1), this.data.load()
} else this.abort("Unsupported element: " + t)
}, t.prototype._loadXhr = function() {
"string" != typeof this.xhrType && (this.xhrType = this._determineXhrType());
var e = this.xhr = new XMLHttpRequest;
e.open("GET", this.url, !0), this.xhrType === t.XHR_RESPONSE_TYPE.JSON || this.xhrType === t.XHR_RESPONSE_TYPE.DOCUMENT ? e.responseType = t.XHR_RESPONSE_TYPE.TEXT : e.responseType = this.xhrType, e.addEventListener("error", this._boundXhrOnError, !1), e.addEventListener("abort", this._boundXhrOnAbort, !1), e.addEventListener("progress", this._boundOnProgress, !1), e.addEventListener("load", this._boundXhrOnLoad, !1), e.send()
}, t.prototype._loadXdr = function() {
"string" != typeof this.xhrType && (this.xhrType = this._determineXhrType());
var t = this.xhr = new XDomainRequest;
t.timeout = 5e3, t.onerror = this._boundXhrOnError, t.ontimeout = this._boundXdrOnTimeout, t.onprogress = this._boundOnProgress, t.onload = this._boundXhrOnLoad, t.open("GET", this.url, !0), setTimeout(function() {
return t.send()
}, 1)
}, t.prototype._createSource = function(t, e, r) {
r || (r = t + "/" + this._getExtension(e));
var n = document.createElement("source");
return n.src = e, n.type = r, n
}, t.prototype._onError = function(t) {
this.abort("Failed to load element using: " + t.target.nodeName)
}, t.prototype._onProgress = function(t) {
t && t.lengthComputable && this.onProgress.dispatch(this, t.loaded / t.total)
}, t.prototype._xhrOnError = function() {
var t = this.xhr;
this.abort(f(t) + " Request failed. Status: " + t.status + ', text: "' + t.statusText + '"')
}, t.prototype._xhrOnAbort = function() {
this.abort(f(this.xhr) + " Request was aborted by the user.")
}, t.prototype._xdrOnTimeout = function() {
this.abort(f(this.xhr) + " Request timed out.")
}, t.prototype._xhrOnLoad = function() {
var e = this.xhr,
r = "",
n = void 0 === e.status ? 200 : e.status;
if ("" !== e.responseType && "text" !== e.responseType && void 0 !== e.responseType || (r = e.responseText), 0 === n && (r.length > 0 || e.responseType === t.XHR_RESPONSE_TYPE.BUFFER) ? n = 200 : 1223 === n && (n = 204), 2 === (n / 100 | 0)) {
if (this.xhrType === t.XHR_RESPONSE_TYPE.TEXT) this.data = r, this.type = t.TYPE.TEXT;
else if (this.xhrType === t.XHR_RESPONSE_TYPE.JSON) try {
this.data = JSON.parse(r), this.type = t.TYPE.JSON
} catch (t) {
return void this.abort("Error trying to parse loaded json: " + t)
} else if (this.xhrType === t.XHR_RESPONSE_TYPE.DOCUMENT) try {
if (window.DOMParser) {
var i = new DOMParser;
this.data = i.parseFromString(r, "text/xml")
} else {
var o = document.createElement("div");
o.innerHTML = r, this.data = o
}
this.type = t.TYPE.XML
} catch (t) {
return void this.abort("Error trying to parse loaded xml: " + t)
} else this.data = e.response || r;
this.complete()
} else this.abort("[" + e.status + "] " + e.statusText + ": " + e.responseURL)
}, t.prototype._determineCrossOrigin = function(t, e) {
if (0 === t.indexOf("data:")) return "";
e = e || window.location, u || (u = document.createElement("a")), u.href = t;
var r = !(t = (0, i.default)(u.href, {
strictMode: !0
})).port && "" === e.port || t.port === e.port,
n = t.protocol ? t.protocol + ":" : "";
return t.host === e.hostname && r && n === e.protocol ? "" : "anonymous"
}, t.prototype._determineXhrType = function() {
return t._xhrTypeMap[this.extension] || t.XHR_RESPONSE_TYPE.TEXT
}, t.prototype._determineLoadType = function() {
return t._loadTypeMap[this.extension] || t.LOAD_TYPE.XHR
}, t.prototype._getExtension = function() {
var t = this.url,
e = "";
if (this.isDataUrl) {
var r = t.indexOf("/");
e = t.substring(r + 1, t.indexOf(";", r))
} else {
var n = t.indexOf("?"),
i = t.indexOf("#"),
o = Math.min(n > -1 ? n : t.length, i > -1 ? i : t.length);
e = (t = t.substring(0, o)).substring(t.lastIndexOf(".") + 1)
}
return e.toLowerCase()
}, t.prototype._getMimeFromXhrType = function(e) {
switch (e) {
case t.XHR_RESPONSE_TYPE.BUFFER:
return "application/octet-binary";
case t.XHR_RESPONSE_TYPE.BLOB:
return "application/blob";
case t.XHR_RESPONSE_TYPE.DOCUMENT:
return "application/xml";
case t.XHR_RESPONSE_TYPE.JSON:
return "application/json";
case t.XHR_RESPONSE_TYPE.DEFAULT:
case t.XHR_RESPONSE_TYPE.TEXT:
default:
return "text/plain"
}
}, n(t, [{
key: "isDataUrl",
get: function() {
return this._hasFlag(t.STATUS_FLAGS.DATA_URL)
}
}, {
key: "isComplete",
get: function() {
return this._hasFlag(t.STATUS_FLAGS.COMPLETE)
}
}, {
key: "isLoading",
get: function() {
return this._hasFlag(t.STATUS_FLAGS.LOADING)
}
}]), t
}();
function c(t, e, r) {
e && 0 === e.indexOf(".") && (e = e.substring(1)), e && (t[e] = r)
}
function f(t) {
return t.toString().replace("object ", "")
}
e.default = h, h.STATUS_FLAGS = {
NONE: 0,
DATA_URL: 1,
COMPLETE: 2,
LOADING: 4
}, h.TYPE = {
UNKNOWN: 0,
JSON: 1,
XML: 2,
IMAGE: 3,
AUDIO: 4,
VIDEO: 5,
TEXT: 6
}, h.LOAD_TYPE = {
XHR: 1,
IMAGE: 2,
AUDIO: 3,
VIDEO: 4
}, h.XHR_RESPONSE_TYPE = {
DEFAULT: "text",
BUFFER: "arraybuffer",
BLOB: "blob",
DOCUMENT: "document",
JSON: "json",
TEXT: "text"
}, h._loadTypeMap = {
gif: h.LOAD_TYPE.IMAGE,
png: h.LOAD_TYPE.IMAGE,
bmp: h.LOAD_TYPE.IMAGE,
jpg: h.LOAD_TYPE.IMAGE,
jpeg: h.LOAD_TYPE.IMAGE,
tif: h.LOAD_TYPE.IMAGE,
tiff: h.LOAD_TYPE.IMAGE,
webp: h.LOAD_TYPE.IMAGE,
tga: h.LOAD_TYPE.IMAGE,
svg: h.LOAD_TYPE.IMAGE,
"svg+xml": h.LOAD_TYPE.IMAGE,
mp3: h.LOAD_TYPE.AUDIO,
ogg: h.LOAD_TYPE.AUDIO,
wav: h.LOAD_TYPE.AUDIO,
mp4: h.LOAD_TYPE.VIDEO,
webm: h.LOAD_TYPE.VIDEO
}, h._xhrTypeMap = {
xhtml: h.XHR_RESPONSE_TYPE.DOCUMENT,
html: h.XHR_RESPONSE_TYPE.DOCUMENT,
htm: h.XHR_RESPONSE_TYPE.DOCUMENT,
xml: h.XHR_RESPONSE_TYPE.DOCUMENT,
tmx: h.XHR_RESPONSE_TYPE.DOCUMENT,
svg: h.XHR_RESPONSE_TYPE.DOCUMENT,
tsx: h.XHR_RESPONSE_TYPE.DOCUMENT,
gif: h.XHR_RESPONSE_TYPE.BLOB,
png: h.XHR_RESPONSE_TYPE.BLOB,
bmp: h.XHR_RESPONSE_TYPE.BLOB,
jpg: h.XHR_RESPONSE_TYPE.BLOB,
jpeg: h.XHR_RESPONSE_TYPE.BLOB,
tif: h.XHR_RESPONSE_TYPE.BLOB,
tiff: h.XHR_RESPONSE_TYPE.BLOB,
webp: h.XHR_RESPONSE_TYPE.BLOB,
tga: h.XHR_RESPONSE_TYPE.BLOB,
json: h.XHR_RESPONSE_TYPE.JSON,
text: h.XHR_RESPONSE_TYPE.TEXT,
txt: h.XHR_RESPONSE_TYPE.TEXT,
ttf: h.XHR_RESPONSE_TYPE.BUFFER,
otf: h.XHR_RESPONSE_TYPE.BUFFER
}, h.EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = r(94),
a = (n = o) && n.__esModule ? n : {
default: n
};
var s = i.ticker.shared;
i.settings.UPLOADS_PER_FRAME = 4;
var u = function() {
function t(e) {
var r = this;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.limiter = new a.default(i.settings.UPLOADS_PER_FRAME), this.renderer = e, this.uploadHookHelper = null, this.queue = [], this.addHooks = [], this.uploadHooks = [], this.completes = [], this.ticking = !1, this.delayedTick = function() {
r.queue && r.prepareItems()
}, this.registerFindHook(p), this.registerFindHook(v), this.registerFindHook(l), this.registerFindHook(h), this.registerFindHook(c), this.registerUploadHook(f), this.registerUploadHook(d)
}
return t.prototype.upload = function(t, e) {
"function" == typeof t && (e = t, t = null), t && this.add(t), this.queue.length ? (e && this.completes.push(e), this.ticking || (this.ticking = !0, s.addOnce(this.tick, this, i.UPDATE_PRIORITY.UTILITY))) : e && e()
}, t.prototype.tick = function() {
setTimeout(this.delayedTick, 0)
}, t.prototype.prepareItems = function() {
for (this.limiter.beginFrame(); this.queue.length && this.limiter.allowedToUpload();) {
var t = this.queue[0],
e = !1;
if (t && !t._destroyed)
for (var r = 0, n = this.uploadHooks.length; r < n; r++)
if (this.uploadHooks[r](this.uploadHookHelper, t)) {
this.queue.shift(), e = !0;
break
}
e || this.queue.shift()
}
if (this.queue.length) s.addOnce(this.tick, this, i.UPDATE_PRIORITY.UTILITY);
else {
this.ticking = !1;
var o = this.completes.slice(0);
this.completes.length = 0;
for (var a = 0, u = o.length; a < u; a++) o[a]()
}
}, t.prototype.registerFindHook = function(t) {
return t && this.addHooks.push(t), this
}, t.prototype.registerUploadHook = function(t) {
return t && this.uploadHooks.push(t), this
}, t.prototype.add = function(t) {
for (var e = 0, r = this.addHooks.length; e < r && !this.addHooks[e](t, this.queue); e++);
if (t instanceof i.Container)
for (var n = t.children.length - 1; n >= 0; n--) this.add(t.children[n]);
return this
}, t.prototype.destroy = function() {
this.ticking && s.remove(this.tick, this), this.ticking = !1, this.addHooks = null, this.uploadHooks = null, this.renderer = null, this.completes = null, this.queue = null, this.limiter = null, this.uploadHookHelper = null
}, t
}();
function l(t, e) {
var r = !1;
if (t && t._textures && t._textures.length)
for (var n = 0; n < t._textures.length; n++)
if (t._textures[n] instanceof i.Texture) {
var o = t._textures[n].baseTexture; - 1 === e.indexOf(o) && (e.push(o), r = !0)
}
return r
}
function h(t, e) {
return t instanceof i.BaseTexture && (-1 === e.indexOf(t) && e.push(t), !0)
}
function c(t, e) {
if (t._texture && t._texture instanceof i.Texture) {
var r = t._texture.baseTexture;
return -1 === e.indexOf(r) && e.push(r), !0
}
return !1
}
function f(t, e) {
return e instanceof i.Text && (e.updateText(!0), !0)
}
function d(t, e) {
if (e instanceof i.TextStyle) {
var r = e.toFontString();
return i.TextMetrics.measureFont(r), !0
}
return !1
}
function p(t, e) {
if (t instanceof i.Text) {
-1 === e.indexOf(t.style) && e.push(t.style), -1 === e.indexOf(t) && e.push(t);
var r = t._texture.baseTexture;
return -1 === e.indexOf(r) && e.push(r), !0
}
return !1
}
function v(t, e) {
return t instanceof i.TextStyle && (-1 === e.indexOf(t) && e.push(t), !0)
}
e.default = u
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}();
e.Geometry = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t)
}
return n(t, null, [{
key: "collideRectVsRect",
value: function(t, e) {
return t.left < e.right && t.right > e.left && t.top < e.bottom && t.bottom > e.top
}
}, {
key: "collideCircleVsCircle",
value: function(t, e) {
var r = t.radius,
n = e.radius,
i = e.x - t.x,
o = e.y - t.y;
return i * i + o * o <= (r + n) * (r + n)
}
}, {
key: "collideRectVsCircle",
value: function(t, e) {
var r = Math.abs(e.x - t.x - t.width / 2),
n = Math.abs(e.y - t.y - t.height / 2);
if (r > t.width / 2 + e.radius) return !1;
if (n > t.height / 2 + e.radius) return !1;
if (r <= t.width / 2) return !0;
if (n <= t.height / 2) return !0;
var i = r - t.width / 2,
o = n - t.height / 2;
return i * i + o * o <= e.radius * e.radius
}
}]), t
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}();
var i = [];
e.TweenManager = function() {
function t() {
throw function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), new Error("TweenManager cannot be instantiated")
}
return n(t, null, [{
key: "add",
value: function(t) {
i.push(t)
}
}, {
key: "remove",
value: function(t) {
var e = i.indexOf(t); - 1 !== e && i.splice(e, 1)
}
}, {
key: "update",
value: function(t) {
i.forEach(function(e) {
return e.update(t)
})
}
}, {
key: "tweens",
get: function() {
return i
}
}]), t
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.VERSION = e.event = e.game = e.sceneManager = e.soundManager = e.p = void 0;
var n = r(2),
i = r(224),
o = r(229),
a = r(100),
s = r(230),
u = (e.p = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
return e = null === e ? t : e, new n.Point(t, e)
}, e.soundManager = new a.SoundManager, e.sceneManager = new o.SceneManager);
e.game = new i.Game({
sceneManager: u
}), e.event = new n.utils.EventEmitter, e.VERSION = new s.Version("1.0.0")
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.ua = void 0;
var n, i = r(233);
var o = new((n = i) && n.__esModule ? n : {
default: n
}).default(window.navigator.userAgent);
e.ua = {
isIOS: function() {
return "ios" === o.getOS().name.toLowerCase()
},
isAndroid: function() {
return "android" === o.getOS().name.toLowerCase()
},
isChrome: function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : void 0,
e = o.getBrowser();
return -1 !== e.name.toLowerCase().indexOf("chrome") && (void 0 === t || 0 === e.version.indexOf(t))
}
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}();
var i = function() {
function t(e, r) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this._x = n, this._y = i, this.cb = e, this.scope = r
}
return t.prototype.set = function(t, e) {
var r = t || 0,
n = e || (0 !== e ? r : 0);
this._x === r && this._y === n || (this._x = r, this._y = n, this.cb.call(this.scope))
}, t.prototype.copy = function(t) {
this._x === t.x && this._y === t.y || (this._x = t.x, this._y = t.y, this.cb.call(this.scope))
}, n(t, [{
key: "x",
get: function() {
return this._x
},
set: function(t) {
this._x !== t && (this._x = t, this.cb.call(this.scope))
}
}, {
key: "y",
get: function() {
return this._y
},
set: function(t) {
this._y !== t && (this._y = t, this.cb.call(this.scope))
}
}]), t
}();
e.default = i
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(25),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1],
s = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1],
u = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1],
l = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1],
h = [],
c = [];
function f(t) {
return t < 0 ? -1 : t > 0 ? 1 : 0
}! function() {
for (var t = 0; t < 16; t++) {
var e = [];
c.push(e);
for (var r = 0; r < 16; r++)
for (var n = f(a[t] * a[r] + u[t] * s[r]), i = f(s[t] * a[r] + l[t] * s[r]), d = f(a[t] * u[r] + u[t] * l[r]), p = f(s[t] * u[r] + l[t] * l[r]), v = 0; v < 16; v++)
if (a[v] === n && s[v] === i && u[v] === d && l[v] === p) {
e.push(v);
break
}
}
for (var y = 0; y < 16; y++) {
var g = new o.default;
g.set(a[y], s[y], u[y], l[y], 0, 0), h.push(g)
}
}();
var d = {
E: 0,
SE: 1,
S: 2,
SW: 3,
W: 4,
NW: 5,
N: 6,
NE: 7,
MIRROR_VERTICAL: 8,
MIRROR_HORIZONTAL: 12,
uX: function(t) {
return a[t]
},
uY: function(t) {
return s[t]
},
vX: function(t) {
return u[t]
},
vY: function(t) {
return l[t]
},
inv: function(t) {
return 8 & t ? 15 & t : 7 & -t
},
add: function(t, e) {
return c[t][e]
},
sub: function(t, e) {
return c[t][d.inv(e)]
},
rotate180: function(t) {
return 4 ^ t
},
isVertical: function(t) {
return 2 == (3 & t)
},
byDirection: function(t, e) {
return 2 * Math.abs(t) <= Math.abs(e) ? e >= 0 ? d.S : d.N : 2 * Math.abs(e) <= Math.abs(t) ? t > 0 ? d.E : d.W : e > 0 ? t > 0 ? d.SE : d.SW : t > 0 ? d.NE : d.NW
},
matrixAppendRotationInv: function(t, e) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0,
i = h[d.inv(e)];
i.tx = r, i.ty = n, t.append(i)
}
};
e.default = d
}, function(t, e) {
t.exports = function(t, e, r) {
var n;
if (r) {
var i = r.tempAttribState,
o = r.attribState;
for (n = 0; n < i.length; n++) i[n] = !1;
for (n = 0; n < e.length; n++) i[e[n].attribute.location] = !0;
for (n = 0; n < o.length; n++) o[n] !== i[n] && (o[n] = i[n], r.attribState[n] ? t.enableVertexAttribArray(n) : t.disableVertexAttribArray(n))
} else
for (n = 0; n < e.length; n++) {
var a = e[n];
t.enableVertexAttribArray(a.attribute.location)
}
}
}, function(t, e) {
var r = function(t, e, r, n, i) {
this.gl = t, this.texture = t.createTexture(), this.mipmap = !1, this.premultiplyAlpha = !1, this.width = e || -1, this.height = r || -1, this.format = n || t.RGBA, this.type = i || t.UNSIGNED_BYTE
};
r.prototype.upload = function(t) {
this.bind();
var e = this.gl;
e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha);
var r = t.videoWidth || t.width,
n = t.videoHeight || t.height;
n !== this.height || r !== this.width ? e.texImage2D(e.TEXTURE_2D, 0, this.format, this.format, this.type, t) : e.texSubImage2D(e.TEXTURE_2D, 0, 0, 0, this.format, this.type, t), this.width = r, this.height = n
};
var n = !1;
r.prototype.uploadData = function(t, e, r) {
this.bind();
var i = this.gl;
if (t instanceof Float32Array) {
if (!n) {
if (!i.getExtension("OES_texture_float")) throw new Error("floating point textures not available");
n = !0
}
this.type = i.FLOAT
} else this.type = this.type || i.UNSIGNED_BYTE;
i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha), e !== this.width || r !== this.height ? i.texImage2D(i.TEXTURE_2D, 0, this.format, e, r, 0, this.format, this.type, t || null) : i.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, e, r, this.format, this.type, t || null), this.width = e, this.height = r
}, r.prototype.bind = function(t) {
var e = this.gl;
void 0 !== t && e.activeTexture(e.TEXTURE0 + t), e.bindTexture(e.TEXTURE_2D, this.texture)
}, r.prototype.unbind = function() {
var t = this.gl;
t.bindTexture(t.TEXTURE_2D, null)
}, r.prototype.minFilter = function(t) {
var e = this.gl;
this.bind(), this.mipmap ? e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, t ? e.LINEAR_MIPMAP_LINEAR : e.NEAREST_MIPMAP_NEAREST) : e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, t ? e.LINEAR : e.NEAREST)
}, r.prototype.magFilter = function(t) {
var e = this.gl;
this.bind(), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, t ? e.LINEAR : e.NEAREST)
}, r.prototype.enableMipmap = function() {
var t = this.gl;
this.bind(), this.mipmap = !0, t.generateMipmap(t.TEXTURE_2D)
}, r.prototype.enableLinearScaling = function() {
this.minFilter(!0), this.magFilter(!0)
}, r.prototype.enableNearestScaling = function() {
this.minFilter(!1), this.magFilter(!1)
}, r.prototype.enableWrapClamp = function() {
var t = this.gl;
this.bind(), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE)
}, r.prototype.enableWrapRepeat = function() {
var t = this.gl;
this.bind(), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.REPEAT), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.REPEAT)
}, r.prototype.enableWrapMirrorRepeat = function() {
var t = this.gl;
this.bind(), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.MIRRORED_REPEAT), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.MIRRORED_REPEAT)
}, r.prototype.destroy = function() {
this.gl.deleteTexture(this.texture)
}, r.fromSource = function(t, e, n) {
var i = new r(t);
return i.premultiplyAlpha = n || !1, i.upload(e), i
}, r.fromData = function(t, e, n, i) {
var o = new r(t);
return o.uploadData(e, n, i), o
}, t.exports = r
}, function(t, e) {
var r = function(t, e, r) {
var n = t.createShader(e);
return t.shaderSource(n, r), t.compileShader(n), t.getShaderParameter(n, t.COMPILE_STATUS) ? n : (console.log(t.getShaderInfoLog(n)), null)
};
t.exports = function(t, e, n, i) {
var o = r(t, t.VERTEX_SHADER, e),
a = r(t, t.FRAGMENT_SHADER, n),
s = t.createProgram();
if (t.attachShader(s, o), t.attachShader(s, a), i)
for (var u in i) t.bindAttribLocation(s, i[u], u);
return t.linkProgram(s), t.getProgramParameter(s, t.LINK_STATUS) || (console.error("Pixi.js Error: Could not initialize shader."), console.error("gl.VALIDATE_STATUS", t.getProgramParameter(s, t.VALIDATE_STATUS)), console.error("gl.getError()", t.getError()), "" !== t.getProgramInfoLog(s) && console.warn("Pixi.js Warning: gl.getProgramInfoLog()", t.getProgramInfoLog(s)), t.deleteProgram(s), s = null), t.deleteShader(o), t.deleteShader(a), s
}
}, function(t, e, r) {
var n = r(27),
i = r(49),
o = function(t, e, r, n) {
gl.vertexAttribPointer(this.location, this.size, t || gl.FLOAT, e || !1, r || 0, n || 0)
};
t.exports = function(t, e) {
for (var r = {}, a = t.getProgramParameter(e, t.ACTIVE_ATTRIBUTES), s = 0; s < a; s++) {
var u = t.getActiveAttrib(e, s),
l = n(t, u.type);
r[u.name] = {
type: l,
size: i(l),
location: t.getAttribLocation(e, u.name),
pointer: o
}
}
return r
}
}, function(t, e) {
var r = {
float: 1,
vec2: 2,
vec3: 3,
vec4: 4,
int: 1,
ivec2: 2,
ivec3: 3,
ivec4: 4,
bool: 1,
bvec2: 2,
bvec3: 3,
bvec4: 4,
mat2: 4,
mat3: 9,
mat4: 16,
sampler2D: 1
};
t.exports = function(t) {
return r[t]
}
}, function(t, e, r) {
var n = r(27),
i = r(51);
t.exports = function(t, e) {
for (var r = {}, o = t.getProgramParameter(e, t.ACTIVE_UNIFORMS), a = 0; a < o; a++) {
var s = t.getActiveUniform(e, a),
u = s.name.replace(/\[.*?\]/, ""),
l = n(t, s.type);
r[u] = {
type: l,
size: s.size,
location: t.getUniformLocation(e, u),
value: i(l, s.size)
}
}
return r
}
}, function(t, e) {
var r = function(t) {
for (var e = new Array(t), r = 0; r < e.length; r++) e[r] = !1;
return e
};
t.exports = function(t, e) {
switch (t) {
case "float":
return 0;
case "vec2":
return new Float32Array(2 * e);
case "vec3":
return new Float32Array(3 * e);
case "vec4":
return new Float32Array(4 * e);
case "int":
case "sampler2D":
return 0;
case "ivec2":
return new Int32Array(2 * e);
case "ivec3":
return new Int32Array(3 * e);
case "ivec4":
return new Int32Array(4 * e);
case "bool":
return !1;
case "bvec2":
return r(2 * e);
case "bvec3":
return r(3 * e);
case "bvec4":
return r(4 * e);
case "mat2":
return new Float32Array([1, 0, 0, 1]);
case "mat3":
return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
case "mat4":
return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])
}
}
}, function(t, e) {
t.exports = function(t, e) {
return "precision" !== t.substring(0, 9) ? "precision " + e + " float;\n" + t : t
}
}, function(t, e) {
var r = function(t) {
return function() {
return this.data[t].value
}
},
n = {
float: function(t, e, r) {
t.uniform1f(e, r)
},
vec2: function(t, e, r) {
t.uniform2f(e, r[0], r[1])
},
vec3: function(t, e, r) {
t.uniform3f(e, r[0], r[1], r[2])
},
vec4: function(t, e, r) {
t.uniform4f(e, r[0], r[1], r[2], r[3])
},
int: function(t, e, r) {
t.uniform1i(e, r)
},
ivec2: function(t, e, r) {
t.uniform2i(e, r[0], r[1])
},
ivec3: function(t, e, r) {
t.uniform3i(e, r[0], r[1], r[2])
},
ivec4: function(t, e, r) {
t.uniform4i(e, r[0], r[1], r[2], r[3])
},
bool: function(t, e, r) {
t.uniform1i(e, r)
},
bvec2: function(t, e, r) {
t.uniform2i(e, r[0], r[1])
},
bvec3: function(t, e, r) {
t.uniform3i(e, r[0], r[1], r[2])
},
bvec4: function(t, e, r) {
t.uniform4i(e, r[0], r[1], r[2], r[3])
},
mat2: function(t, e, r) {
t.uniformMatrix2fv(e, !1, r)
},
mat3: function(t, e, r) {
t.uniformMatrix3fv(e, !1, r)
},
mat4: function(t, e, r) {
t.uniformMatrix4fv(e, !1, r)
},
sampler2D: function(t, e, r) {
t.uniform1i(e, r)
}
},
i = {
float: function(t, e, r) {
t.uniform1fv(e, r)
},
vec2: function(t, e, r) {
t.uniform2fv(e, r)
},
vec3: function(t, e, r) {
t.uniform3fv(e, r)
},
vec4: function(t, e, r) {
t.uniform4fv(e, r)
},
int: function(t, e, r) {
t.uniform1iv(e, r)
},
ivec2: function(t, e, r) {
t.uniform2iv(e, r)
},
ivec3: function(t, e, r) {
t.uniform3iv(e, r)
},
ivec4: function(t, e, r) {
t.uniform4iv(e, r)
},
bool: function(t, e, r) {
t.uniform1iv(e, r)
},
bvec2: function(t, e, r) {
t.uniform2iv(e, r)
},
bvec3: function(t, e, r) {
t.uniform3iv(e, r)
},
bvec4: function(t, e, r) {
t.uniform4iv(e, r)
},
sampler2D: function(t, e, r) {
t.uniform1iv(e, r)
}
};
function o(t, e) {
return function(r) {
this.data[t].value = r;
var o = this.data[t].location;
1 === e.size ? n[e.type](this.gl, o, r) : i[e.type](this.gl, o, r)
}
}
function a(t, e) {
for (var r = e, n = 0; n < t.length - 1; n++) {
var i = r[t[n]] || {
data: {}
};
r[t[n]] = i, r = i
}
return r
}
t.exports = function(t, e) {
var n = {
data: {}
};
n.gl = t;
for (var i = Object.keys(e), s = 0; s < i.length; s++) {
var u = i[s],
l = u.split("."),
h = l[l.length - 1],
c = a(l, n),
f = e[u];
c.data[h] = f, c.gl = t, Object.defineProperty(c, h, {
get: r(h),
set: o(h, f)
})
}
return n
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = c(r(9)),
o = r(1),
a = c(r(4)),
s = c(r(55)),
u = c(r(56)),
l = c(r(28)),
h = r(5);
function c(t) {
return t && t.__esModule ? t : {
default: t
}
}
var f = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this)),
n = a.default.TRANSFORM_MODE === o.TRANSFORM_MODE.STATIC ? s.default : u.default;
return r.tempDisplayObjectParent = null, r.transform = new n, r.alpha = 1, r.visible = !0, r.renderable = !0, r.parent = null, r.worldAlpha = 1, r.filterArea = null, r._filters = null, r._enabledFilters = null, r._bounds = new l.default, r._boundsID = 0, r._lastBoundsID = -1, r._boundsRect = null, r._localBoundsRect = null, r._mask = null, r._destroyed = !1, r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.updateTransform = function() {
this.transform.updateTransform(this.parent.transform), this.worldAlpha = this.alpha * this.parent.worldAlpha, this._bounds.updateID++
}, e.prototype._recursivePostUpdateTransform = function() {
this.parent ? (this.parent._recursivePostUpdateTransform(), this.transform.updateTransform(this.parent.transform)) : this.transform.updateTransform(this._tempDisplayObjectParent.transform)
}, e.prototype.getBounds = function(t, e) {
return t || (this.parent ? (this._recursivePostUpdateTransform(), this.updateTransform()) : (this.parent = this._tempDisplayObjectParent, this.updateTransform(), this.parent = null)), this._boundsID !== this._lastBoundsID && this.calculateBounds(), e || (this._boundsRect || (this._boundsRect = new h.Rectangle), e = this._boundsRect), this._bounds.getRectangle(e)
}, e.prototype.getLocalBounds = function(t) {
var e = this.transform,
r = this.parent;
this.parent = null, this.transform = this._tempDisplayObjectParent.transform, t || (this._localBoundsRect || (this._localBoundsRect = new h.Rectangle), t = this._localBoundsRect);
var n = this.getBounds(!1, t);
return this.parent = r, this.transform = e, n
}, e.prototype.toGlobal = function(t, e) {
return arguments.length > 2 && void 0 !== arguments[2] && arguments[2] || (this._recursivePostUpdateTransform(), this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, this.displayObjectUpdateTransform(), this.parent = null)), this.worldTransform.apply(t, e)
}, e.prototype.toLocal = function(t, e, r, n) {
return e && (t = e.toGlobal(t, r, n)), n || (this._recursivePostUpdateTransform(), this.parent ? this.displayObjectUpdateTransform() : (this.parent = this._tempDisplayObjectParent, this.displayObjectUpdateTransform(), this.parent = null)), this.worldTransform.applyInverse(t, r)
}, e.prototype.renderWebGL = function(t) {}, e.prototype.renderCanvas = function(t) {}, e.prototype.setParent = function(t) {
if (!t || !t.addChild) throw new Error("setParent: Argument must be a Container");
return t.addChild(this), t
}, e.prototype.setTransform = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1,
n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1,
i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0,
o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0,
a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 0,
s = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 0,
u = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : 0;
return this.position.x = t, this.position.y = e, this.scale.x = r || 1, this.scale.y = n || 1, this.rotation = i, this.skew.x = o, this.skew.y = a, this.pivot.x = s, this.pivot.y = u, this
}, e.prototype.destroy = function() {
this.removeAllListeners(), this.parent && this.parent.removeChild(this), this.transform = null, this.parent = null, this._bounds = null, this._currentBounds = null, this._mask = null, this.filterArea = null, this.interactive = !1, this.interactiveChildren = !1, this._destroyed = !0
}, n(e, [{
key: "_tempDisplayObjectParent",
get: function() {
return null === this.tempDisplayObjectParent && (this.tempDisplayObjectParent = new e), this.tempDisplayObjectParent
}
}, {
key: "x",
get: function() {
return this.position.x
},
set: function(t) {
this.transform.position.x = t
}
}, {
key: "y",
get: function() {
return this.position.y
},
set: function(t) {
this.transform.position.y = t
}
}, {
key: "worldTransform",
get: function() {
return this.transform.worldTransform
}
}, {
key: "localTransform",
get: function() {
return this.transform.localTransform
}
}, {
key: "position",
get: function() {
return this.transform.position
},
set: function(t) {
this.transform.position.copy(t)
}
}, {
key: "scale",
get: function() {
return this.transform.scale
},
set: function(t) {
this.transform.scale.copy(t)
}
}, {
key: "pivot",
get: function() {
return this.transform.pivot
},
set: function(t) {
this.transform.pivot.copy(t)
}
}, {
key: "skew",
get: function() {
return this.transform.skew
},
set: function(t) {
this.transform.skew.copy(t)
}
}, {
key: "rotation",
get: function() {
return this.transform.rotation
},
set: function(t) {
this.transform.rotation = t
}
}, {
key: "worldVisible",
get: function() {
var t = this;
do {
if (!t.visible) return !1;
t = t.parent
} while (t);
return !0
}
}, {
key: "mask",
get: function() {
return this._mask
},
set: function(t) {
this._mask && (this._mask.renderable = !0, this._mask.isMask = !1), this._mask = t, this._mask && (this._mask.renderable = !1, this._mask.isMask = !0)
}
}, {
key: "filters",
get: function() {
return this._filters && this._filters.slice()
},
set: function(t) {
this._filters = t && t.slice()
}
}]), e
}(i.default);
e.default = f, f.prototype.displayObjectUpdateTransform = f.prototype.updateTransform
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(5),
a = r(30);
var s = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return r.position = new o.ObservablePoint(r.onChange, r, 0, 0), r.scale = new o.ObservablePoint(r.onChange, r, 1, 1), r.pivot = new o.ObservablePoint(r.onChange, r, 0, 0), r.skew = new o.ObservablePoint(r.updateSkew, r, 0, 0), r._rotation = 0, r._cx = 1, r._sx = 0, r._cy = 0, r._sy = 1, r._localID = 0, r._currentLocalID = 0, r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.onChange = function() {
this._localID++
}, e.prototype.updateSkew = function() {
this._cx = Math.cos(this._rotation + this.skew._y), this._sx = Math.sin(this._rotation + this.skew._y), this._cy = -Math.sin(this._rotation - this.skew._x), this._sy = Math.cos(this._rotation - this.skew._x), this._localID++
}, e.prototype.updateLocalTransform = function() {
var t = this.localTransform;
this._localID !== this._currentLocalID && (t.a = this._cx * this.scale._x, t.b = this._sx * this.scale._x, t.c = this._cy * this.scale._y, t.d = this._sy * this.scale._y, t.tx = this.position._x - (this.pivot._x * t.a + this.pivot._y * t.c), t.ty = this.position._y - (this.pivot._x * t.b + this.pivot._y * t.d), this._currentLocalID = this._localID, this._parentID = -1)
}, e.prototype.updateTransform = function(t) {
var e = this.localTransform;
if (this._localID !== this._currentLocalID && (e.a = this._cx * this.scale._x, e.b = this._sx * this.scale._x, e.c = this._cy * this.scale._y, e.d = this._sy * this.scale._y, e.tx = this.position._x - (this.pivot._x * e.a + this.pivot._y * e.c), e.ty = this.position._y - (this.pivot._x * e.b + this.pivot._y * e.d), this._currentLocalID = this._localID, this._parentID = -1), this._parentID !== t._worldID) {
var r = t.worldTransform,
n = this.worldTransform;
n.a = e.a * r.a + e.b * r.c, n.b = e.a * r.b + e.b * r.d, n.c = e.c * r.a + e.d * r.c, n.d = e.c * r.b + e.d * r.d, n.tx = e.tx * r.a + e.ty * r.c + r.tx, n.ty = e.tx * r.b + e.ty * r.d + r.ty, this._parentID = t._worldID, this._worldID++
}
}, e.prototype.setFromMatrix = function(t) {
t.decompose(this), this._localID++
}, i(e, [{
key: "rotation",
get: function() {
return this._rotation
},
set: function(t) {
this._rotation = t, this.updateSkew()
}
}]), e
}(((n = a) && n.__esModule ? n : {
default: n
}).default);
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(5),
a = r(30);
var s = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return r.position = new o.Point(0, 0), r.scale = new o.Point(1, 1), r.skew = new o.ObservablePoint(r.updateSkew, r, 0, 0), r.pivot = new o.Point(0, 0), r._rotation = 0, r._cx = 1, r._sx = 0, r._cy = 0, r._sy = 1, r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.updateSkew = function() {
this._cx = Math.cos(this._rotation + this.skew._y), this._sx = Math.sin(this._rotation + this.skew._y), this._cy = -Math.sin(this._rotation - this.skew._x), this._sy = Math.cos(this._rotation - this.skew._x)
}, e.prototype.updateLocalTransform = function() {
var t = this.localTransform;
t.a = this._cx * this.scale.x, t.b = this._sx * this.scale.x, t.c = this._cy * this.scale.y, t.d = this._sy * this.scale.y, t.tx = this.position.x - (this.pivot.x * t.a + this.pivot.y * t.c), t.ty = this.position.y - (this.pivot.x * t.b + this.pivot.y * t.d)
}, e.prototype.updateTransform = function(t) {
var e = this.localTransform;
e.a = this._cx * this.scale.x, e.b = this._sx * this.scale.x, e.c = this._cy * this.scale.y, e.d = this._sy * this.scale.y, e.tx = this.position.x - (this.pivot.x * e.a + this.pivot.y * e.c), e.ty = this.position.y - (this.pivot.x * e.b + this.pivot.y * e.d);
var r = t.worldTransform,
n = this.worldTransform;
n.a = e.a * r.a + e.b * r.c, n.b = e.a * r.b + e.b * r.d, n.c = e.c * r.a + e.d * r.c, n.d = e.c * r.b + e.d * r.d, n.tx = e.tx * r.a + e.ty * r.c + r.tx, n.ty = e.tx * r.b + e.ty * r.d + r.ty, this._worldID++
}, e.prototype.setFromMatrix = function(t) {
t.decompose(this)
}, i(e, [{
key: "rotation",
get: function() {
return this._rotation
},
set: function(t) {
this._rotation = t, this.updateSkew()
}
}]), e
}(((n = a) && n.__esModule ? n : {
default: n
}).default);
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : window.location;
if (0 === t.indexOf("data:")) return "";
e = e || window.location, a || (a = document.createElement("a"));
a.href = t;
var r = !(t = o.default.parse(a.href)).port && "" === e.port || t.port === e.port;
if (t.hostname !== e.hostname || !r || t.protocol !== e.protocol) return "anonymous";
return ""
};
var n, i = r(58),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = void 0
}, function(t, e, r) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var n = r(125),
i = r(127);
function o() {
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null
}
e.parse = _, e.resolve = function(t, e) {
return _(t, !1, !0).resolve(e)
}, e.resolveObject = function(t, e) {
return t ? _(t, !1, !0).resolveObject(e) : e
}, e.format = function(t) {
i.isString(t) && (t = _(t));
return t instanceof o ? t.format() : o.prototype.format.call(t)
}, e.Url = o;
var a = /^([a-z0-9.+-]+:)/i,
s = /:[0-9]*$/,
u = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]),
h = ["'"].concat(l),
c = ["%", "/", "?", ";", "#"].concat(h),
f = ["/", "?", "#"],
d = /^[+a-z0-9A-Z_-]{0,63}$/,
p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
v = {
javascript: !0,
"javascript:": !0
},
y = {
javascript: !0,
"javascript:": !0
},
g = {
http: !0,
https: !0,
ftp: !0,
gopher: !0,
file: !0,
"http:": !0,
"https:": !0,
"ftp:": !0,
"gopher:": !0,
"file:": !0
},
m = r(128);
function _(t, e, r) {
if (t && i.isObject(t) && t instanceof o) return t;
var n = new o;
return n.parse(t, e, r), n
}
o.prototype.parse = function(t, e, r) {
if (!i.isString(t)) throw new TypeError("Parameter 'url' must be a string, not " + typeof t);
var o = t.indexOf("?"),
s = -1 !== o && o < t.indexOf("#") ? "?" : "#",
l = t.split(s);
l[0] = l[0].replace(/\\/g, "/");
var _ = t = l.join(s);
if (_ = _.trim(), !r && 1 === t.split("#").length) {
var b = u.exec(_);
if (b) return this.path = _, this.href = _, this.pathname = b[1], b[2] ? (this.search = b[2], this.query = e ? m.parse(this.search.substr(1)) : this.search.substr(1)) : e && (this.search = "", this.query = {}), this
}
var x = a.exec(_);
if (x) {
var w = (x = x[0]).toLowerCase();
this.protocol = w, _ = _.substr(x.length)
}
if (r || x || _.match(/^\/\/[^@\/]+@[^@\/]+/)) {
var T = "//" === _.substr(0, 2);
!T || x && y[x] || (_ = _.substr(2), this.slashes = !0)
}
if (!y[x] && (T || x && !g[x])) {
for (var E, S, M = -1, P = 0; P < f.length; P++) {
-1 !== (O = _.indexOf(f[P])) && (-1 === M || O < M) && (M = O)
} - 1 !== (S = -1 === M ? _.lastIndexOf("@") : _.lastIndexOf("@", M)) && (E = _.slice(0, S), _ = _.slice(S + 1), this.auth = decodeURIComponent(E)), M = -1;
for (P = 0; P < c.length; P++) {
var O; - 1 !== (O = _.indexOf(c[P])) && (-1 === M || O < M) && (M = O)
} - 1 === M && (M = _.length), this.host = _.slice(0, M), _ = _.slice(M), this.parseHost(), this.hostname = this.hostname || "";
var C = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
if (!C)
for (var A = this.hostname.split(/\./), R = (P = 0, A.length); P < R; P++) {
var I = A[P];
if (I && !I.match(d)) {
for (var D = "", k = 0, N = I.length; k < N; k++) I.charCodeAt(k) > 127 ? D += "x" : D += I[k];
if (!D.match(d)) {
var L = A.slice(0, P),
j = A.slice(P + 1),
F = I.match(p);
F && (L.push(F[1]), j.unshift(F[2])), j.length && (_ = "/" + j.join(".") + _), this.hostname = L.join(".");
break
}
}
}
this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), C || (this.hostname = n.toASCII(this.hostname));
var B = this.port ? ":" + this.port : "",
U = this.hostname || "";
this.host = U + B, this.href += this.host, C && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== _[0] && (_ = "/" + _))
}
if (!v[w])
for (P = 0, R = h.length; P < R; P++) {
var X = h[P];
if (-1 !== _.indexOf(X)) {
var V = encodeURIComponent(X);
V === X && (V = escape(X)), _ = _.split(X).join(V)
}
}
var W = _.indexOf("#"); - 1 !== W && (this.hash = _.substr(W), _ = _.slice(0, W));
var Y = _.indexOf("?");
if (-1 !== Y ? (this.search = _.substr(Y), this.query = _.substr(Y + 1), e && (this.query = m.parse(this.query)), _ = _.slice(0, Y)) : e && (this.search = "", this.query = {}), _ && (this.pathname = _), g[w] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
B = this.pathname || "";
var G = this.search || "";
this.path = B + G
}
return this.href = this.format(), this
}, o.prototype.format = function() {
var t = this.auth || "";
t && (t = (t = encodeURIComponent(t)).replace(/%3A/i, ":"), t += "@");
var e = this.protocol || "",
r = this.pathname || "",
n = this.hash || "",
o = !1,
a = "";
this.host ? o = t + this.host : this.hostname && (o = t + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (o += ":" + this.port)), this.query && i.isObject(this.query) && Object.keys(this.query).length && (a = m.stringify(this.query));
var s = this.search || a && "?" + a || "";
return e && ":" !== e.substr(-1) && (e += ":"), this.slashes || (!e || g[e]) && !1 !== o ? (o = "//" + (o || ""), r && "/" !== r.charAt(0) && (r = "/" + r)) : o || (o = ""), n && "#" !== n.charAt(0) && (n = "#" + n), s && "?" !== s.charAt(0) && (s = "?" + s), e + o + (r = r.replace(/[?#]/g, function(t) {
return encodeURIComponent(t)
})) + (s = s.replace("#", "%23")) + n
}, o.prototype.resolve = function(t) {
return this.resolveObject(_(t, !1, !0)).format()
}, o.prototype.resolveObject = function(t) {
if (i.isString(t)) {
var e = new o;
e.parse(t, !1, !0), t = e
}
for (var r = new o, n = Object.keys(this), a = 0; a < n.length; a++) {
var s = n[a];
r[s] = this[s]
}
if (r.hash = t.hash, "" === t.href) return r.href = r.format(), r;
if (t.slashes && !t.protocol) {
for (var u = Object.keys(t), l = 0; l < u.length; l++) {
var h = u[l];
"protocol" !== h && (r[h] = t[h])
}
return g[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = "/"), r.href = r.format(), r
}
if (t.protocol && t.protocol !== r.protocol) {
if (!g[t.protocol]) {
for (var c = Object.keys(t), f = 0; f < c.length; f++) {
var d = c[f];
r[d] = t[d]
}
return r.href = r.format(), r
}
if (r.protocol = t.protocol, t.host || y[t.protocol]) r.pathname = t.pathname;
else {
for (var p = (t.pathname || "").split("/"); p.length && !(t.host = p.shift()););
t.host || (t.host = ""), t.hostname || (t.hostname = ""), "" !== p[0] && p.unshift(""), p.length < 2 && p.unshift(""), r.pathname = p.join("/")
}
if (r.search = t.search, r.query = t.query, r.host = t.host || "", r.auth = t.auth, r.hostname = t.hostname || t.host, r.port = t.port, r.pathname || r.search) {
var v = r.pathname || "",
m = r.search || "";
r.path = v + m
}
return r.slashes = r.slashes || t.slashes, r.href = r.format(), r
}
var _ = r.pathname && "/" === r.pathname.charAt(0),
b = t.host || t.pathname && "/" === t.pathname.charAt(0),
x = b || _ || r.host && t.pathname,
w = x,
T = r.pathname && r.pathname.split("/") || [],
E = (p = t.pathname && t.pathname.split("/") || [], r.protocol && !g[r.protocol]);
if (E && (r.hostname = "", r.port = null, r.host && ("" === T[0] ? T[0] = r.host : T.unshift(r.host)), r.host = "", t.protocol && (t.hostname = null, t.port = null, t.host && ("" === p[0] ? p[0] = t.host : p.unshift(t.host)), t.host = null), x = x && ("" === p[0] || "" === T[0])), b) r.host = t.host || "" === t.host ? t.host : r.host, r.hostname = t.hostname || "" === t.hostname ? t.hostname : r.hostname, r.search = t.search, r.query = t.query, T = p;
else if (p.length) T || (T = []), T.pop(), T = T.concat(p), r.search = t.search, r.query = t.query;
else if (!i.isNullOrUndefined(t.search)) {
if (E) r.hostname = r.host = T.shift(), (C = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = C.shift(), r.host = r.hostname = C.shift());
return r.search = t.search, r.query = t.query, i.isNull(r.pathname) && i.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.href = r.format(), r
}
if (!T.length) return r.pathname = null, r.search ? r.path = "/" + r.search : r.path = null, r.href = r.format(), r;
for (var S = T.slice(-1)[0], M = (r.host || t.host || T.length > 1) && ("." === S || ".." === S) || "" === S, P = 0, O = T.length; O >= 0; O--) "." === (S = T[O]) ? T.splice(O, 1) : ".." === S ? (T.splice(O, 1), P++) : P && (T.splice(O, 1), P--);
if (!x && !w)
for (; P--; P) T.unshift("..");
!x || "" === T[0] || T[0] && "/" === T[0].charAt(0) || T.unshift(""), M && "/" !== T.join("/").substr(-1) && T.push("");
var C, A = "" === T[0] || T[0] && "/" === T[0].charAt(0);
E && (r.hostname = r.host = A ? "" : T.length ? T.shift() : "", (C = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = C.shift(), r.host = r.hostname = C.shift()));
return (x = x || r.host && T.length) && !A && T.unshift(""), T.length ? r.pathname = T.join("/") : (r.pathname = null, r.path = null), i.isNull(r.pathname) && i.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.auth = t.auth || r.auth, r.slashes = r.slashes || t.slashes, r.href = r.format(), r
}, o.prototype.parseHost = function() {
var t = this.host,
e = s.exec(t);
e && (":" !== (e = e[0]) && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t)
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = l(r(10)),
o = r(3),
a = r(33),
s = r(1),
u = l(r(57));
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
var h = function(t) {
function e(r, n) {
if (function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e), !r) throw new Error("No video source element specified.");
(r.readyState === r.HAVE_ENOUGH_DATA || r.readyState === r.HAVE_FUTURE_DATA) && r.width && r.height && (r.complete = !0);
var i = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r, n));
return i.width = r.videoWidth, i.height = r.videoHeight, i._autoUpdate = !0, i._isAutoUpdating = !1, i.autoPlay = !0, i.update = i.update.bind(i), i._onCanPlay = i._onCanPlay.bind(i), r.addEventListener("play", i._onPlayStart.bind(i)), r.addEventListener("pause", i._onPlayStop.bind(i)), i.hasLoaded = !1, i.__loaded = !1, i._isSourceReady() ? i._onCanPlay() : (r.addEventListener("canplay", i._onCanPlay), r.addEventListener("canplaythrough", i._onCanPlay)), i
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._isSourcePlaying = function() {
var t = this.source;
return t.currentTime > 0 && !1 === t.paused && !1 === t.ended && t.readyState > 2
}, e.prototype._isSourceReady = function() {
return 3 === this.source.readyState || 4 === this.source.readyState
}, e.prototype._onPlayStart = function() {
this.hasLoaded || this._onCanPlay(), !this._isAutoUpdating && this.autoUpdate && (a.shared.add(this.update, this, s.UPDATE_PRIORITY.HIGH), this._isAutoUpdating = !0)
}, e.prototype._onPlayStop = function() {
this._isAutoUpdating && (a.shared.remove(this.update, this), this._isAutoUpdating = !1)
}, e.prototype._onCanPlay = function() {
this.hasLoaded = !0, this.source && (this.source.removeEventListener("canplay", this._onCanPlay), this.source.removeEventListener("canplaythrough", this._onCanPlay), this.width = this.source.videoWidth, this.height = this.source.videoHeight, this.__loaded || (this.__loaded = !0, this.emit("loaded", this)), this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && this.source.play())
}, e.prototype.destroy = function() {
this._isAutoUpdating && a.shared.remove(this.update, this), this.source && this.source._pixiId && (i.default.removeFromCache(this.source._pixiId), delete this.source._pixiId, this.source.pause(), this.source.src = "", this.source.load()), t.prototype.destroy.call(this)
}, e.fromVideo = function(t, r) {
t._pixiId || (t._pixiId = "video_" + (0, o.uid)());
var n = o.BaseTextureCache[t._pixiId];
return n || (n = new e(t, r), i.default.addToCache(n, t._pixiId)), n
}, e.fromUrl = function(t, r, n) {
var i = document.createElement("video");
i.setAttribute("webkit-playsinline", ""), i.setAttribute("playsinline", "");
var o = Array.isArray(t) ? t[0].src || t[0] : t.src || t;
if (void 0 === n && 0 !== o.indexOf("data:") ? i.crossOrigin = (0, u.default)(o) : n && (i.crossOrigin = "string" == typeof n ? n : "anonymous"), Array.isArray(t))
for (var a = 0; a < t.length; ++a) i.appendChild(c(t[a].src || t[a], t[a].mime));
else i.appendChild(c(o, t.mime));
return i.load(), e.fromVideo(i, r)
}, n(e, [{
key: "autoUpdate",
get: function() {
return this._autoUpdate
},
set: function(t) {
t !== this._autoUpdate && (this._autoUpdate = t, !this._autoUpdate && this._isAutoUpdating ? (a.shared.remove(this.update, this), this._isAutoUpdating = !1) : this._autoUpdate && !this._isAutoUpdating && (a.shared.add(this.update, this, s.UPDATE_PRIORITY.HIGH), this._isAutoUpdating = !0))
}
}]), e
}(i.default);
function c(t, e) {
e || (e = "video/" + t.substr(t.lastIndexOf(".") + 1));
var r = document.createElement("source");
return r.src = t, r.type = e, r
}
e.default = h, h.fromUrls = h.fromUrl
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(44),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x0 = 0, this.y0 = 0, this.x1 = 1, this.y1 = 0, this.x2 = 1, this.y2 = 1, this.x3 = 0, this.y3 = 1, this.uvsUint32 = new Uint32Array(4)
}
return t.prototype.set = function(t, e, r) {
var n = e.width,
i = e.height;
if (r) {
var a = t.width / 2 / n,
s = t.height / 2 / i,
u = t.x / n + a,
l = t.y / i + s;
r = o.default.add(r, o.default.NW), this.x0 = u + a * o.default.uX(r), this.y0 = l + s * o.default.uY(r), r = o.default.add(r, 2), this.x1 = u + a * o.default.uX(r), this.y1 = l + s * o.default.uY(r), r = o.default.add(r, 2), this.x2 = u + a * o.default.uX(r), this.y2 = l + s * o.default.uY(r), r = o.default.add(r, 2), this.x3 = u + a * o.default.uX(r), this.y3 = l + s * o.default.uY(r)
} else this.x0 = t.x / n, this.y0 = t.y / i, this.x1 = (t.x + t.width) / n, this.y1 = t.y / i, this.x2 = (t.x + t.width) / n, this.y2 = (t.y + t.height) / i, this.x3 = t.x / n, this.y3 = (t.y + t.height) / i;
this.uvsUint32[0] = (65535 * this.y0 & 65535) << 16 | 65535 * this.x0 & 65535, this.uvsUint32[1] = (65535 * this.y1 & 65535) << 16 | 65535 * this.x1 & 65535, this.uvsUint32[2] = (65535 * this.y2 & 65535) << 16 | 65535 * this.x2 & 65535, this.uvsUint32[3] = (65535 * this.y3 & 65535) << 16 | 65535 * this.x3 & 65535
}, t
}();
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(3),
o = r(5),
a = r(1),
s = c(r(4)),
u = c(r(11)),
l = c(r(34)),
h = c(r(9));
function c(t) {
return t && t.__esModule ? t : {
default: t
}
}
var f = new o.Matrix,
d = function(t) {
function e(r, n, l, h) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var c = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return (0, i.sayHello)(r), "number" == typeof n && (n = Object.assign({
width: n,
height: l || s.default.RENDER_OPTIONS.height
}, h)), n = Object.assign({}, s.default.RENDER_OPTIONS, n), c.options = n, c.type = a.RENDERER_TYPE.UNKNOWN, c.screen = new o.Rectangle(0, 0, n.width, n.height), c.view = n.view || document.createElement("canvas"), c.resolution = n.resolution || s.default.RESOLUTION, c.transparent = n.transparent, c.autoResize = n.autoResize || !1, c.blendModes = null, c.preserveDrawingBuffer = n.preserveDrawingBuffer, c.clearBeforeRender = n.clearBeforeRender, c.roundPixels = n.roundPixels, c._backgroundColor = 0, c._backgroundColorRgba = [0, 0, 0, 0], c._backgroundColorString = "#000000", c.backgroundColor = n.backgroundColor || c._backgroundColor, c._tempDisplayObjectParent = new u.default, c._lastObjectRendered = c._tempDisplayObjectParent, c
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.resize = function(t, e) {
this.screen.width = t, this.screen.height = e, this.view.width = t * this.resolution, this.view.height = e * this.resolution, this.autoResize && (this.view.style.width = t + "px", this.view.style.height = e + "px")
}, e.prototype.generateTexture = function(t, e, r, n) {
n = n || t.getLocalBounds();
var i = l.default.create(0 | n.width, 0 | n.height, e, r);
return f.tx = -n.x, f.ty = -n.y, this.render(t, i, !1, f, !0), i
}, e.prototype.destroy = function(t) {
t && this.view.parentNode && this.view.parentNode.removeChild(this.view), this.type = a.RENDERER_TYPE.UNKNOWN, this.view = null, this.screen = null, this.resolution = 0, this.transparent = !1, this.autoResize = !1, this.blendModes = null, this.options = null, this.preserveDrawingBuffer = !1, this.clearBeforeRender = !1, this.roundPixels = !1, this._backgroundColor = 0, this._backgroundColorRgba = null, this._backgroundColorString = null, this._tempDisplayObjectParent = null, this._lastObjectRendered = null
}, n(e, [{
key: "width",
get: function() {
return this.view.width
}
}, {
key: "height",
get: function() {
return this.view.height
}
}, {
key: "backgroundColor",
get: function() {
return this._backgroundColor
},
set: function(t) {
this._backgroundColor = t, this._backgroundColorString = (0, i.hex2string)(t), (0, i.hex2rgb)(t, this._backgroundColorRgba)
}
}]), e
}(h.default);
e.default = d
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = o(r(10)),
i = o(r(4));
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
var a = function(t) {
function e() {
var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 100,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 100,
o = arguments[2],
a = arguments[3];
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, null, o));
return s.resolution = a || i.default.RESOLUTION, s.width = Math.ceil(r), s.height = Math.ceil(n), s.realWidth = s.width * s.resolution, s.realHeight = s.height * s.resolution, s.scaleMode = void 0 !== o ? o : i.default.SCALE_MODE, s.hasLoaded = !0, s._glRenderTargets = {}, s._canvasRenderTarget = null, s.valid = !1, s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.resize = function(t, e) {
t = Math.ceil(t), e = Math.ceil(e), t === this.width && e === this.height || (this.valid = t > 0 && e > 0, this.width = t, this.height = e, this.realWidth = this.width * this.resolution, this.realHeight = this.height * this.resolution, this.valid && this.emit("update", this))
}, e.prototype.destroy = function() {
t.prototype.destroy.call(this, !0), this.renderer = null
}, e
}(n.default);
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(4),
a = (n = o) && n.__esModule ? n : {
default: n
};
var s = function() {
function t(e, r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.resolution = n || a.default.RESOLUTION, this.resize(e, r)
}
return t.prototype.clear = function() {
this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)
}, t.prototype.resize = function(t, e) {
this.canvas.width = t * this.resolution, this.canvas.height = e * this.resolution
}, t.prototype.destroy = function() {
this.context = null, this.canvas = null
}, i(t, [{
key: "width",
get: function() {
return this.canvas.width
},
set: function(t) {
this.canvas.width = t
}
}, {
key: "height",
get: function() {
return this.canvas.height
},
set: function(t) {
this.canvas.height = t
}
}]), t
}();
e.default = s
}, function(t, e, r) {
"use strict";
function n(t) {
var e = document.createElement("canvas");
e.width = 6, e.height = 1;
var r = e.getContext("2d");
return r.fillStyle = t, r.fillRect(0, 0, 6, 1), e
}
e.__esModule = !0, e.default = function() {
if ("undefined" == typeof document) return !1;
var t = n("#ff00ff"),
e = n("#ffff00"),
r = document.createElement("canvas");
r.width = 6, r.height = 1;
var i = r.getContext("2d");
i.globalCompositeOperation = "multiply", i.drawImage(t, 0, 0), i.drawImage(e, 2, 0);
var o = i.getImageData(2, 0, 1, 1);
if (!o) return !1;
var a = o.data;
return 255 === a[0] && 0 === a[1] && 0 === a[2]
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = a(r(66)),
i = r(5),
o = (r(7), a(r(67)));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
var s = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = new i.Matrix,
o = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n", "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));
return r.renderable = !1, o.maskSprite = r, o.maskMatrix = n, o
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.apply = function(t, e, r) {
var n = this.maskSprite,
i = this.maskSprite.texture;
i.valid && (i.transform || (i.transform = new o.default(i, 0)), i.transform.update(), this.uniforms.mask = i, this.uniforms.otherMatrix = t.calculateSpriteMatrix(this.maskMatrix, n).prepend(i.transform.mapCoord), this.uniforms.alpha = n.worldAlpha, this.uniforms.maskClamp = i.transform.uClampFrame, t.applyFilter(this, e, r))
}, e
}(n.default);
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = u(r(138)),
o = r(3),
a = r(1),
s = u(r(4));
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
var l = {},
h = function() {
function t(e, r, n) {
for (var u in function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.vertexSrc = e || t.defaultVertexSrc, this.fragmentSrc = r || t.defaultFragmentSrc, this._blendMode = a.BLEND_MODES.NORMAL, this.uniformData = n || (0, i.default)(this.vertexSrc, this.fragmentSrc, "projectionMatrix|uSampler"), this.uniforms = {}, this.uniformData) this.uniforms[u] = this.uniformData[u].value, this.uniformData[u].type && (this.uniformData[u].type = this.uniformData[u].type.toLowerCase());
this.glShaders = {}, l[this.vertexSrc + this.fragmentSrc] || (l[this.vertexSrc + this.fragmentSrc] = (0, o.uid)()), this.glShaderKey = l[this.vertexSrc + this.fragmentSrc], this.padding = 4, this.resolution = s.default.RESOLUTION, this.enabled = !0, this.autoFit = !0
}
return t.prototype.apply = function(t, e, r, n, i) {
t.applyFilter(this, e, r, n)
}, n(t, [{
key: "blendMode",
get: function() {
return this._blendMode
},
set: function(t) {
this._blendMode = t
}
}], [{
key: "defaultVertexSrc",
get: function() {
return ["attribute vec2 aVertexPosition;", "attribute vec2 aTextureCoord;", "uniform mat3 projectionMatrix;", "uniform mat3 filterMatrix;", "varying vec2 vTextureCoord;", "varying vec2 vFilterCoord;", "void main(void){", " gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);", " vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;", " vTextureCoord = aTextureCoord ;", "}"].join("\n")
}
}, {
key: "defaultFragmentSrc",
get: function() {
return ["varying vec2 vTextureCoord;", "varying vec2 vFilterCoord;", "uniform sampler2D uSampler;", "uniform sampler2D filterSampler;", "void main(void){", " vec4 masky = texture2D(filterSampler, vFilterCoord);", " vec4 sample = texture2D(uSampler, vTextureCoord);", " vec4 color;", " if(mod(vFilterCoord.x, 1.0) > 0.5)", " {", " color = vec4(1.0, 0.0, 0.0, 1.0);", " }", " else", " {", " color = vec4(0.0, 1.0, 0.0, 1.0);", " }", " gl_FragColor = mix(sample, masky, 0.5);", " gl_FragColor *= sample.a;", "}"].join("\n")
}
}]), t
}();
e.default = h
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = r(25),
a = (n = o) && n.__esModule ? n : {
default: n
};
var s = new a.default,
u = function() {
function t(e, r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this._texture = e, this.mapCoord = new a.default, this.uClampFrame = new Float32Array(4), this.uClampOffset = new Float32Array(2), this._lastTextureID = -1, this.clampOffset = 0, this.clampMargin = void 0 === r ? .5 : r
}
return t.prototype.multiplyUvs = function(t, e) {
void 0 === e && (e = t);
for (var r = this.mapCoord, n = 0; n < t.length; n += 2) {
var i = t[n],
o = t[n + 1];
e[n] = i * r.a + o * r.c + r.tx, e[n + 1] = i * r.b + o * r.d + r.ty
}
return e
}, t.prototype.update = function(t) {
var e = this._texture;
if (!e || !e.valid) return !1;
if (!t && this._lastTextureID === e._updateID) return !1;
this._lastTextureID = e._updateID;
var r = e._uvs;
this.mapCoord.set(r.x1 - r.x0, r.y1 - r.y0, r.x3 - r.x0, r.y3 - r.y0, r.x0, r.y0);
var n = e.orig,
i = e.trim;
i && (s.set(n.width / i.width, 0, 0, n.height / i.height, -i.x / i.width, -i.y / i.height), this.mapCoord.append(s));
var o = e.baseTexture,
a = this.uClampFrame,
u = this.clampMargin / o.resolution,
l = this.clampOffset;
return a[0] = (e._frame.x + u + l) / o.width, a[1] = (e._frame.y + u + l) / o.height, a[2] = (e._frame.x + e._frame.width - u + l) / o.width, a[3] = (e._frame.y + e._frame.height - u + l) / o.height, this.uClampOffset[0] = l / o.realWidth, this.uClampOffset[1] = l / o.realHeight, !0
}, i(t, [{
key: "texture",
get: function() {
return this._texture
},
set: function(t) {
this._texture = t, this._lastTextureID = -1
}
}]), t
}();
e.default = u
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = o(r(6)),
i = o(r(36));
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
var a = function() {
function t(e, r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.gl = e, this.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]), this.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), this.interleaved = new Float32Array(16);
for (var o = 0; o < 4; o++) this.interleaved[4 * o] = this.vertices[2 * o], this.interleaved[4 * o + 1] = this.vertices[2 * o + 1], this.interleaved[4 * o + 2] = this.uvs[2 * o], this.interleaved[4 * o + 3] = this.uvs[2 * o + 1];
this.indices = (0, i.default)(1), this.vertexBuffer = n.default.GLBuffer.createVertexBuffer(e, this.interleaved, e.STATIC_DRAW), this.indexBuffer = n.default.GLBuffer.createIndexBuffer(e, this.indices, e.STATIC_DRAW), this.vao = new n.default.VertexArrayObject(e, r)
}
return t.prototype.initVao = function(t) {
this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer, t.attributes.aVertexPosition, this.gl.FLOAT, !1, 16, 0).addAttribute(this.vertexBuffer, t.attributes.aTextureCoord, this.gl.FLOAT, !1, 16, 8)
}, t.prototype.map = function(t, e) {
var r = 0,
n = 0;
return this.uvs[0] = r, this.uvs[1] = n, this.uvs[2] = r + e.width / t.width, this.uvs[3] = n, this.uvs[4] = r + e.width / t.width, this.uvs[5] = n + e.height / t.height, this.uvs[6] = r, this.uvs[7] = n + e.height / t.height, r = e.x, n = e.y, this.vertices[0] = r, this.vertices[1] = n, this.vertices[2] = r + e.width, this.vertices[3] = n, this.vertices[4] = r + e.width, this.vertices[5] = n + e.height, this.vertices[6] = r, this.vertices[7] = n + e.height, this
}, t.prototype.upload = function() {
for (var t = 0; t < 4; t++) this.interleaved[4 * t] = this.vertices[2 * t], this.interleaved[4 * t + 1] = this.vertices[2 * t + 1], this.interleaved[4 * t + 2] = this.uvs[2 * t], this.interleaved[4 * t + 3] = this.uvs[2 * t + 1];
return this.vertexBuffer.upload(this.interleaved), this
}, t.prototype.destroy = function() {
var t = this.gl;
t.deleteBuffer(this.vertexBuffer), t.deleteBuffer(this.indexBuffer)
}, t
}();
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(1),
o = r(3);
var a = {
align: "left",
breakWords: !1,
dropShadow: !1,
dropShadowAlpha: 1,
dropShadowAngle: Math.PI / 6,
dropShadowBlur: 0,
dropShadowColor: "black",
dropShadowDistance: 5,
fill: "black",
fillGradientType: i.TEXT_GRADIENT.LINEAR_VERTICAL,
fillGradientStops: [],
fontFamily: "Arial",
fontSize: 26,
fontStyle: "normal",
fontVariant: "normal",
fontWeight: "normal",
letterSpacing: 0,
lineHeight: 0,
lineJoin: "miter",
miterLimit: 10,
padding: 0,
stroke: "black",
strokeThickness: 0,
textBaseline: "alphabetic",
trim: !1,
wordWrap: !1,
wordWrapWidth: 100,
leading: 0
},
s = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.styleID = 0, this.reset(), h(this, e, e)
}
return t.prototype.clone = function() {
var e = {};
return h(e, this, a), new t(e)
}, t.prototype.reset = function() {
h(this, a, a)
}, t.prototype.toFontString = function() {
var t = "number" == typeof this.fontSize ? this.fontSize + "px" : this.fontSize,
e = this.fontFamily;
Array.isArray(this.fontFamily) || (e = this.fontFamily.split(","));
for (var r = e.length - 1; r >= 0; r--) {
var n = e[r].trim();
/([\"\'])[^\'\"]+\1/.test(n) || (n = '"' + n + '"'), e[r] = n
}
return this.fontStyle + " " + this.fontVariant + " " + this.fontWeight + " " + t + " " + e.join(",")
}, n(t, [{
key: "align",
get: function() {
return this._align
},
set: function(t) {
this._align !== t && (this._align = t, this.styleID++)
}
}, {
key: "breakWords",
get: function() {
return this._breakWords
},
set: function(t) {
this._breakWords !== t && (this._breakWords = t, this.styleID++)
}
}, {
key: "dropShadow",
get: function() {
return this._dropShadow
},
set: function(t) {
this._dropShadow !== t && (this._dropShadow = t, this.styleID++)
}
}, {
key: "dropShadowAlpha",
get: function() {
return this._dropShadowAlpha
},
set: function(t) {
this._dropShadowAlpha !== t && (this._dropShadowAlpha = t, this.styleID++)
}
}, {
key: "dropShadowAngle",
get: function() {
return this._dropShadowAngle
},
set: function(t) {
this._dropShadowAngle !== t && (this._dropShadowAngle = t, this.styleID++)
}
}, {
key: "dropShadowBlur",
get: function() {
return this._dropShadowBlur
},
set: function(t) {
this._dropShadowBlur !== t && (this._dropShadowBlur = t, this.styleID++)
}
}, {
key: "dropShadowColor",
get: function() {
return this._dropShadowColor
},
set: function(t) {
var e = l(t);
this._dropShadowColor !== e && (this._dropShadowColor = e, this.styleID++)
}
}, {
key: "dropShadowDistance",
get: function() {
return this._dropShadowDistance
},
set: function(t) {
this._dropShadowDistance !== t && (this._dropShadowDistance = t, this.styleID++)
}
}, {
key: "fill",
get: function() {
return this._fill
},
set: function(t) {
var e = l(t);
this._fill !== e && (this._fill = e, this.styleID++)
}
}, {
key: "fillGradientType",
get: function() {
return this._fillGradientType
},
set: function(t) {
this._fillGradientType !== t && (this._fillGradientType = t, this.styleID++)
}
}, {
key: "fillGradientStops",
get: function() {
return this._fillGradientStops
},
set: function(t) {
(function(t, e) {
if (!Array.isArray(t) || !Array.isArray(e)) return !1;
if (t.length !== e.length) return !1;
for (var r = 0; r < t.length; ++r)
if (t[r] !== e[r]) return !1;
return !0
})(this._fillGradientStops, t) || (this._fillGradientStops = t, this.styleID++)
}
}, {
key: "fontFamily",
get: function() {
return this._fontFamily
},
set: function(t) {
this.fontFamily !== t && (this._fontFamily = t, this.styleID++)
}
}, {
key: "fontSize",
get: function() {
return this._fontSize
},
set: function(t) {
this._fontSize !== t && (this._fontSize = t, this.styleID++)
}
}, {
key: "fontStyle",
get: function() {
return this._fontStyle
},
set: function(t) {
this._fontStyle !== t && (this._fontStyle = t, this.styleID++)
}
}, {
key: "fontVariant",
get: function() {
return this._fontVariant
},
set: function(t) {
this._fontVariant !== t && (this._fontVariant = t, this.styleID++)
}
}, {
key: "fontWeight",
get: function() {
return this._fontWeight
},
set: function(t) {
this._fontWeight !== t && (this._fontWeight = t, this.styleID++)
}
}, {
key: "letterSpacing",
get: function() {
return this._letterSpacing
},
set: function(t) {
this._letterSpacing !== t && (this._letterSpacing = t, this.styleID++)
}
}, {
key: "lineHeight",
get: function() {
return this._lineHeight
},
set: function(t) {
this._lineHeight !== t && (this._lineHeight = t, this.styleID++)
}
}, {
key: "leading",
get: function() {
return this._leading
},
set: function(t) {
this._leading !== t && (this._leading = t, this.styleID++)
}
}, {
key: "lineJoin",
get: function() {
return this._lineJoin
},
set: function(t) {
this._lineJoin !== t && (this._lineJoin = t, this.styleID++)
}
}, {
key: "miterLimit",
get: function() {
return this._miterLimit
},
set: function(t) {
this._miterLimit !== t && (this._miterLimit = t, this.styleID++)
}
}, {
key: "padding",
get: function() {
return this._padding
},
set: function(t) {
this._padding !== t && (this._padding = t, this.styleID++)
}
}, {
key: "stroke",
get: function() {
return this._stroke
},
set: function(t) {
var e = l(t);
this._stroke !== e && (this._stroke = e, this.styleID++)
}
}, {
key: "strokeThickness",
get: function() {
return this._strokeThickness
},
set: function(t) {
this._strokeThickness !== t && (this._strokeThickness = t, this.styleID++)
}
}, {
key: "textBaseline",
get: function() {
return this._textBaseline
},
set: function(t) {
this._textBaseline !== t && (this._textBaseline = t, this.styleID++)
}
}, {
key: "trim",
get: function() {
return this._trim
},
set: function(t) {
this._trim !== t && (this._trim = t, this.styleID++)
}
}, {
key: "wordWrap",
get: function() {
return this._wordWrap
},
set: function(t) {
this._wordWrap !== t && (this._wordWrap = t, this.styleID++)
}
}, {
key: "wordWrapWidth",
get: function() {
return this._wordWrapWidth
},
set: function(t) {
this._wordWrapWidth !== t && (this._wordWrapWidth = t, this.styleID++)
}
}]), t
}();
function u(t) {
return "number" == typeof t ? (0, o.hex2string)(t) : ("string" == typeof t && 0 === t.indexOf("0x") && (t = t.replace("0x", "#")), t)
}
function l(t) {
if (Array.isArray(t)) {
for (var e = 0; e < t.length; ++e) t[e] = u(t[e]);
return t
}
return u(t)
}
function h(t, e, r) {
for (var n in r) Array.isArray(e[n]) ? t[n] = e[n].slice() : t[n] = e[n]
}
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e, r, n, i, o, a, s, u, l) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.text = e, this.style = r, this.width = n, this.height = i, this.lines = o, this.lineWidths = a, this.lineHeight = s, this.maxLineWidth = u, this.fontProperties = l
}
return t.measureText = function(e, r, n) {
var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : t._canvas;
n = n || r.wordWrap;
var o = r.toFontString(),
a = t.measureFont(o),
s = i.getContext("2d");
s.font = o;
for (var u = (n ? t.wordWrap(e, r, i) : e).split(/(?:\r\n|\r|\n)/), l = new Array(u.length), h = 0, c = 0; c < u.length; c++) {
var f = s.measureText(u[c]).width + (u[c].length - 1) * r.letterSpacing;
l[c] = f, h = Math.max(h, f)
}
var d = h + r.strokeThickness;
r.dropShadow && (d += r.dropShadowDistance);
var p = r.lineHeight || a.fontSize + r.strokeThickness,
v = Math.max(p, a.fontSize + r.strokeThickness) + (u.length - 1) * (p + r.leading);
return r.dropShadow && (v += r.dropShadowDistance), new t(e, r, d, v, u, l, p + r.leading, h, a)
}, t.wordWrap = function(e, r) {
for (var n = (arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : t._canvas).getContext("2d"), i = "", o = e.charAt(0), a = e.split("\n"), s = r.wordWrapWidth, u = {}, l = 0; l < a.length; l++) {
for (var h = s, c = a[l].split(" "), f = 0; f < c.length; f++) {
var d = n.measureText(c[f]).width;
if (r.breakWords && d > s)
for (var p = c[f].split(""), v = 0; v < p.length; v++) {
var y = p[v],
g = u[y];
void 0 === g && (g = n.measureText(y).width, u[y] = g), g > h ? (i += "\n" + y, h = s - g) : (0 === v && (f > 0 || " " === o) && (i += " "), i += y, h -= g)
} else {
var m = d + n.measureText(" ").width;
0 === f || m > h ? (f > 0 && (i += "\n"), i += c[f], h = s - d) : (h -= m, i += " " + c[f])
}
}
l < a.length - 1 && (i += "\n")
}
return i
}, t.measureFont = function(e) {
if (t._fonts[e]) return t._fonts[e];
var r = {},
n = t._canvas,
i = t._context;
i.font = e;
var o = Math.ceil(i.measureText("|MÉq").width),
a = Math.ceil(i.measureText("M").width),
s = 2 * a;
a = 1.4 * a | 0, n.width = o, n.height = s, i.fillStyle = "#f00", i.fillRect(0, 0, o, s), i.font = e, i.textBaseline = "alphabetic", i.fillStyle = "#000", i.fillText("|MÉq", 0, a);
var u = i.getImageData(0, 0, o, s).data,
l = u.length,
h = 4 * o,
c = 0,
f = 0,
d = !1;
for (c = 0; c < a; ++c) {
for (var p = 0; p < h; p += 4)
if (255 !== u[f + p]) {
d = !0;
break
}
if (d) break;
f += h
}
for (r.ascent = a - c, f = l - h, d = !1, c = s; c > a; --c) {
for (var v = 0; v < h; v += 4)
if (255 !== u[f + v]) {
d = !0;
break
}
if (d) break;
f -= h
}
return r.descent = c - a, r.fontSize = r.ascent + r.descent, t._fonts[e] = r, r
}, t
}();
e.default = n;
var i = document.createElement("canvas");
i.width = i.height = 10, n._canvas = i, n._context = i.getContext("2d"), n._fonts = {}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e, r, n, i, o, a, s, u) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.lineWidth = e, this.nativeLines = s, this.lineColor = r, this.lineAlpha = n, this._lineTint = r, this.fillColor = i, this.fillAlpha = o, this._fillTint = i, this.fill = a, this.holes = [], this.shape = u, this.type = u.type
}
return t.prototype.clone = function() {
return new t(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.fill, this.nativeLines, this.shape)
}, t.prototype.addHole = function(t) {
this.holes.push(t)
}, t.prototype.destroy = function() {
this.shape = null, this.holes = null
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
function n(t, e, r) {
r = r || 2;
var n, s, u, l, h, d, v, y = e && e.length,
g = y ? e[0] * r : t.length,
m = i(t, 0, g, r, !0),
_ = [];
if (!m) return _;
if (y && (m = function(t, e, r, n) {
var a, s, u, l, h, d = [];
for (a = 0, s = e.length; a < s; a++) u = e[a] * n, l = a < s - 1 ? e[a + 1] * n : t.length, (h = i(t, u, l, n, !1)) === h.next && (h.steiner = !0), d.push(p(h));
for (d.sort(c), a = 0; a < d.length; a++) f(d[a], r), r = o(r, r.next);
return r
}(t, e, m, r)), t.length > 80 * r) {
n = u = t[0], s = l = t[1];
for (var b = r; b < g; b += r)(h = t[b]) < n && (n = h), (d = t[b + 1]) < s && (s = d), h > u && (u = h), d > l && (l = d);
v = 0 !== (v = Math.max(u - n, l - s)) ? 1 / v : 0
}
return a(m, _, r, n, s, v), _
}
function i(t, e, r, n, i) {
var o, a;
if (i === S(t, e, r, n) > 0)
for (o = e; o < r; o += n) a = w(o, t[o], t[o + 1], a);
else
for (o = r - n; o >= e; o -= n) a = w(o, t[o], t[o + 1], a);
return a && m(a, a.next) && (T(a), a = a.next), a
}
function o(t, e) {
if (!t) return t;
e || (e = t);
var r, n = t;
do {
if (r = !1, n.steiner || !m(n, n.next) && 0 !== g(n.prev, n, n.next)) n = n.next;
else {
if (T(n), (n = e = n.prev) === n.next) break;
r = !0
}
} while (r || n !== e);
return e
}
function a(t, e, r, n, i, c, f) {
if (t) {
!f && c && function(t, e, r, n) {
var i = t;
do {
null === i.z && (i.z = d(i.x, i.y, e, r, n)), i.prevZ = i.prev, i.nextZ = i.next, i = i.next
} while (i !== t);
i.prevZ.nextZ = null, i.prevZ = null,
function(t) {
var e, r, n, i, o, a, s, u, l = 1;
do {
for (r = t, t = null, o = null, a = 0; r;) {
for (a++, n = r, s = 0, e = 0; e < l && (s++, n = n.nextZ); e++);
for (u = l; s > 0 || u > 0 && n;) 0 !== s && (0 === u || !n || r.z <= n.z) ? (i = r, r = r.nextZ, s--) : (i = n, n = n.nextZ, u--), o ? o.nextZ = i : t = i, i.prevZ = o, o = i;
r = n
}
o.nextZ = null, l *= 2
} while (a > 1)
}(i)
}(t, n, i, c);
for (var p, v, y = t; t.prev !== t.next;)
if (p = t.prev, v = t.next, c ? u(t, n, i, c) : s(t)) e.push(p.i / r), e.push(t.i / r), e.push(v.i / r), T(t), t = v.next, y = v.next;
else if ((t = v) === y) {
f ? 1 === f ? a(t = l(t, e, r), e, r, n, i, c, 2) : 2 === f && h(t, e, r, n, i, c) : a(o(t), e, r, n, i, c, 1);
break
}
}
}
function s(t) {
var e = t.prev,
r = t,
n = t.next;
if (g(e, r, n) >= 0) return !1;
for (var i = t.next.next; i !== t.prev;) {
if (v(e.x, e.y, r.x, r.y, n.x, n.y, i.x, i.y) && g(i.prev, i, i.next) >= 0) return !1;
i = i.next
}
return !0
}
function u(t, e, r, n) {
var i = t.prev,
o = t,
a = t.next;
if (g(i, o, a) >= 0) return !1;
for (var s = i.x < o.x ? i.x < a.x ? i.x : a.x : o.x < a.x ? o.x : a.x, u = i.y < o.y ? i.y < a.y ? i.y : a.y : o.y < a.y ? o.y : a.y, l = i.x > o.x ? i.x > a.x ? i.x : a.x : o.x > a.x ? o.x : a.x, h = i.y > o.y ? i.y > a.y ? i.y : a.y : o.y > a.y ? o.y : a.y, c = d(s, u, e, r, n), f = d(l, h, e, r, n), p = t.prevZ, y = t.nextZ; p && p.z >= c && y && y.z <= f;) {
if (p !== t.prev && p !== t.next && v(i.x, i.y, o.x, o.y, a.x, a.y, p.x, p.y) && g(p.prev, p, p.next) >= 0) return !1;
if (p = p.prevZ, y !== t.prev && y !== t.next && v(i.x, i.y, o.x, o.y, a.x, a.y, y.x, y.y) && g(y.prev, y, y.next) >= 0) return !1;
y = y.nextZ
}
for (; p && p.z >= c;) {
if (p !== t.prev && p !== t.next && v(i.x, i.y, o.x, o.y, a.x, a.y, p.x, p.y) && g(p.prev, p, p.next) >= 0) return !1;
p = p.prevZ
}
for (; y && y.z <= f;) {
if (y !== t.prev && y !== t.next && v(i.x, i.y, o.x, o.y, a.x, a.y, y.x, y.y) && g(y.prev, y, y.next) >= 0) return !1;
y = y.nextZ
}
return !0
}
function l(t, e, r) {
var n = t;
do {
var i = n.prev,
o = n.next.next;
!m(i, o) && _(i, n, n.next, o) && b(i, o) && b(o, i) && (e.push(i.i / r), e.push(n.i / r), e.push(o.i / r), T(n), T(n.next), n = t = o), n = n.next
} while (n !== t);
return n
}
function h(t, e, r, n, i, s) {
var u = t;
do {
for (var l = u.next.next; l !== u.prev;) {
if (u.i !== l.i && y(u, l)) {
var h = x(u, l);
return u = o(u, u.next), h = o(h, h.next), a(u, e, r, n, i, s), void a(h, e, r, n, i, s)
}
l = l.next
}
u = u.next
} while (u !== t)
}
function c(t, e) {
return t.x - e.x
}
function f(t, e) {
if (e = function(t, e) {
var r, n = e,
i = t.x,
o = t.y,
a = -1 / 0;
do {
if (o <= n.y && o >= n.next.y && n.next.y !== n.y) {
var s = n.x + (o - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
if (s <= i && s > a) {
if (a = s, s === i) {
if (o === n.y) return n;
if (o === n.next.y) return n.next
}
r = n.x < n.next.x ? n : n.next
}
}
n = n.next
} while (n !== e);
if (!r) return null;
if (i === a) return r.prev;
var u, l = r,
h = r.x,
c = r.y,
f = 1 / 0;
n = r.next;
for (; n !== l;) i >= n.x && n.x >= h && i !== n.x && v(o < c ? i : a, o, h, c, o < c ? a : i, o, n.x, n.y) && ((u = Math.abs(o - n.y) / (i - n.x)) < f || u === f && n.x > r.x) && b(n, t) && (r = n, f = u), n = n.next;
return r
}(t, e)) {
var r = x(e, t);
o(r, r.next)
}
}
function d(t, e, r, n, i) {
return (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = 32767 * (t - r) * i) | t << 8)) | t << 4)) | t << 2)) | t << 1)) | (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = 32767 * (e - n) * i) | e << 8)) | e << 4)) | e << 2)) | e << 1)) << 1
}
function p(t) {
var e = t,
r = t;
do {
e.x < r.x && (r = e), e = e.next
} while (e !== t);
return r
}
function v(t, e, r, n, i, o, a, s) {
return (i - a) * (e - s) - (t - a) * (o - s) >= 0 && (t - a) * (n - s) - (r - a) * (e - s) >= 0 && (r - a) * (o - s) - (i - a) * (n - s) >= 0
}
function y(t, e) {
return t.next.i !== e.i && t.prev.i !== e.i && ! function(t, e) {
var r = t;
do {
if (r.i !== t.i && r.next.i !== t.i && r.i !== e.i && r.next.i !== e.i && _(r, r.next, t, e)) return !0;
r = r.next
} while (r !== t);
return !1
}(t, e) && b(t, e) && b(e, t) && function(t, e) {
var r = t,
n = !1,
i = (t.x + e.x) / 2,
o = (t.y + e.y) / 2;
do {
r.y > o != r.next.y > o && r.next.y !== r.y && i < (r.next.x - r.x) * (o - r.y) / (r.next.y - r.y) + r.x && (n = !n), r = r.next
} while (r !== t);
return n
}(t, e)
}
function g(t, e, r) {
return (e.y - t.y) * (r.x - e.x) - (e.x - t.x) * (r.y - e.y)
}
function m(t, e) {
return t.x === e.x && t.y === e.y
}
function _(t, e, r, n) {
return !!(m(t, e) && m(r, n) || m(t, n) && m(r, e)) || g(t, e, r) > 0 != g(t, e, n) > 0 && g(r, n, t) > 0 != g(r, n, e) > 0
}
function b(t, e) {
return g(t.prev, t, t.next) < 0 ? g(t, e, t.next) >= 0 && g(t, t.prev, e) >= 0 : g(t, e, t.prev) < 0 || g(t, t.next, e) < 0
}
function x(t, e) {
var r = new E(t.i, t.x, t.y),
n = new E(e.i, e.x, e.y),
i = t.next,
o = e.prev;
return t.next = e, e.prev = t, r.next = i, i.prev = r, n.next = r, r.prev = n, o.next = n, n.prev = o, n
}
function w(t, e, r, n) {
var i = new E(t, e, r);
return n ? (i.next = n.next, i.prev = n, n.next.prev = i, n.next = i) : (i.prev = i, i.next = i), i
}
function T(t) {
t.next.prev = t.prev, t.prev.next = t.next, t.prevZ && (t.prevZ.nextZ = t.nextZ), t.nextZ && (t.nextZ.prevZ = t.prevZ)
}
function E(t, e, r) {
this.i = t, this.x = e, this.y = r, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1
}
function S(t, e, r, n) {
for (var i = 0, o = e, a = r - n; o < r; o += n) i += (t[a] - t[o]) * (t[o + 1] + t[a + 1]), a = o;
return i
}
t.exports = n, t.exports.default = n, n.deviation = function(t, e, r, n) {
var i = e && e.length,
o = i ? e[0] * r : t.length,
a = Math.abs(S(t, 0, o, r));
if (i)
for (var s = 0, u = e.length; s < u; s++) {
var l = e[s] * r,
h = s < u - 1 ? e[s + 1] * r : t.length;
a -= Math.abs(S(t, l, h, r))
}
var c = 0;
for (s = 0; s < n.length; s += 3) {
var f = n[s] * r,
d = n[s + 1] * r,
p = n[s + 2] * r;
c += Math.abs((t[f] - t[p]) * (t[d + 1] - t[f + 1]) - (t[f] - t[d]) * (t[p + 1] - t[f + 1]))
}
return 0 === a && 0 === c ? 0 : Math.abs((c - a) / a)
}, n.flatten = function(t) {
for (var e = t[0][0].length, r = {
vertices: [],
holes: [],
dimensions: e
}, n = 0, i = 0; i < t.length; i++) {
for (var o = 0; o < t[i].length; o++)
for (var a = 0; a < e; a++) r.vertices.push(t[i][o][a]);
i > 0 && (n += t[i - 1].length, r.holes.push(n))
}
return r
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(74),
o = l(r(11)),
a = r(33),
s = l(r(4)),
u = r(1);
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
var h = function() {
function t(e, r, n, u, l) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), "number" == typeof e && (e = Object.assign({
width: e,
height: r || s.default.RENDER_OPTIONS.height,
forceCanvas: !!u,
sharedTicker: !!l
}, n)), this._options = e = Object.assign({
autoStart: !0,
sharedTicker: !1,
forceCanvas: !1,
sharedLoader: !1
}, e), this.renderer = (0, i.autoDetectRenderer)(e), this.stage = new o.default, this._ticker = null, this.ticker = e.sharedTicker ? a.shared : new a.Ticker, e.autoStart && this.start()
}
return t.prototype.render = function() {
this.renderer.render(this.stage)
}, t.prototype.stop = function() {
this._ticker.stop()
}, t.prototype.start = function() {
this._ticker.start()
}, t.prototype.destroy = function(t) {
var e = this._ticker;
this.ticker = null, e.destroy(), this.stage.destroy(), this.stage = null, this.renderer.destroy(t), this.renderer = null, this._options = null
}, n(t, [{
key: "ticker",
set: function(t) {
this._ticker && this._ticker.remove(this.render, this), this._ticker = t, t && t.add(this.render, this, u.UPDATE_PRIORITY.LOW)
},
get: function() {
return this._ticker
}
}, {
key: "view",
get: function() {
return this.renderer.view
}
}, {
key: "screen",
get: function() {
return this.renderer.screen
}
}]), t
}();
e.default = h
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.autoDetectRenderer = function(t, e, r, a) {
var s = t && t.forceCanvas;
void 0 !== a && (s = a);
if (!s && n.isWebGLSupported()) return new o.default(t, e, r);
return new i.default(t, e, r)
};
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(3)),
i = a(r(12)),
o = a(r(19));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = {
accessible: !1,
accessibleTitle: null,
accessibleHint: null,
tabIndex: 0,
_accessibleActive: !1,
_accessibleDiv: !1
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.BitmapText = e.TilingSpriteRenderer = e.TilingSprite = e.AnimatedSprite = void 0;
var n = r(171);
Object.defineProperty(e, "AnimatedSprite", {
enumerable: !0,
get: function() {
return s(n).default
}
});
var i = r(172);
Object.defineProperty(e, "TilingSprite", {
enumerable: !0,
get: function() {
return s(i).default
}
});
var o = r(173);
Object.defineProperty(e, "TilingSpriteRenderer", {
enumerable: !0,
get: function() {
return s(o).default
}
});
var a = r(174);
function s(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "BitmapText", {
enumerable: !0,
get: function() {
return s(a).default
}
}), r(175), r(176), r(177)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = u(r(78)),
a = u(r(79)),
s = u(r(80));
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
var l = function(t) {
function e(r, n, s, u) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e), u = u || 5;
var l = (0, o.default)(u, !0),
h = (0, a.default)(u),
c = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, l, h));
return c.resolution = s || i.settings.RESOLUTION, c._quality = 0, c.quality = n || 4, c.strength = r || 8, c.firstRun = !0, c
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.apply = function(t, e, r, n) {
if (this.firstRun) {
var i = t.renderer.gl,
u = (0, s.default)(i);
this.vertexSrc = (0, o.default)(u, !0), this.fragmentSrc = (0, a.default)(u), this.firstRun = !1
}
if (this.uniforms.strength = 1 / r.size.width * (r.size.width / e.size.width), this.uniforms.strength *= this.strength, this.uniforms.strength /= this.passes, 1 === this.passes) t.applyFilter(this, e, r, n);
else {
for (var l = t.getRenderTarget(!0), h = e, c = l, f = 0; f < this.passes - 1; f++) {
t.applyFilter(this, h, c, !0);
var d = c;
c = h, h = d
}
t.applyFilter(this, h, r, n), t.returnRenderTarget(l)
}
}, n(e, [{
key: "blur",
get: function() {
return this.strength
},
set: function(t) {
this.padding = 2 * Math.abs(t), this.strength = t
}
}, {
key: "quality",
get: function() {
return this._quality
},
set: function(t) {
this._quality = t, this.passes = t
}
}]), e
}(i.Filter);
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e) {
var r = Math.ceil(t / 2),
i = n,
o = "",
a = void 0;
a = e ? "vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);" : "vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";
for (var s = 0; s < t; s++) {
var u = a.replace("%index%", s);
u = u.replace("%sampleIndex%", s - (r - 1) + ".0"), o += u, o += "\n"
}
return i = (i = i.replace("%blur%", o)).replace("%size%", t)
};
var n = ["attribute vec2 aVertexPosition;", "attribute vec2 aTextureCoord;", "uniform float strength;", "uniform mat3 projectionMatrix;", "varying vec2 vBlurTexCoords[%size%];", "void main(void)", "{", "gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);", "%blur%", "}"].join("\n")
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
for (var e = n[t], r = e.length, o = i, a = "", s = void 0, u = 0; u < t; u++) {
var l = "gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%", u);
s = u, u >= r && (s = t - u - 1), l = l.replace("%value%", e[s]), a += l, a += "\n"
}
return o = (o = o.replace("%blur%", a)).replace("%size%", t)
};
var n = {
5: [.153388, .221461, .250301],
7: [.071303, .131514, .189879, .214607],
9: [.028532, .067234, .124009, .179044, .20236],
11: [.0093, .028002, .065984, .121703, .175713, .198596],
13: [.002406, .009255, .027867, .065666, .121117, .174868, .197641],
15: [489e-6, .002403, .009246, .02784, .065602, .120999, .174697, .197448]
},
i = ["varying vec2 vBlurTexCoords[%size%];", "uniform sampler2D uSampler;", "void main(void)", "{", " gl_FragColor = vec4(0.0);", " %blur%", "}"].join("\n")
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
var e = t.getParameter(t.MAX_VARYING_VECTORS),
r = 15;
for (; r > e;) r -= 2;
return r
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = u(r(78)),
a = u(r(79)),
s = u(r(80));
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
var l = function(t) {
function e(r, n, s, u) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e), u = u || 5;
var l = (0, o.default)(u, !1),
h = (0, a.default)(u),
c = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, l, h));
return c.resolution = s || i.settings.RESOLUTION, c._quality = 0, c.quality = n || 4, c.strength = r || 8, c.firstRun = !0, c
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.apply = function(t, e, r, n) {
if (this.firstRun) {
var i = t.renderer.gl,
u = (0, s.default)(i);
this.vertexSrc = (0, o.default)(u, !1), this.fragmentSrc = (0, a.default)(u), this.firstRun = !1
}
if (this.uniforms.strength = 1 / r.size.height * (r.size.height / e.size.height), this.uniforms.strength *= this.strength, this.uniforms.strength /= this.passes, 1 === this.passes) t.applyFilter(this, e, r, n);
else {
for (var l = t.getRenderTarget(!0), h = e, c = l, f = 0; f < this.passes - 1; f++) {
t.applyFilter(this, h, c, !0);
var d = c;
c = h, h = d
}
t.applyFilter(this, h, r, n), t.returnRenderTarget(l)
}
}, n(e, [{
key: "blur",
get: function() {
return this.strength
},
set: function(t) {
this.padding = 2 * Math.abs(t), this.strength = t
}
}, {
key: "quality",
get: function() {
return this._quality
},
set: function(t) {
this._quality = t, this.passes = t
}
}]), e
}(i.Filter);
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
var o = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.global = new i.Point, this.target = null, this.originalEvent = null, this.identifier = null, this.isPrimary = !1, this.button = 0, this.buttons = 0, this.width = 0, this.height = 0, this.tiltX = 0, this.tiltY = 0, this.pointerType = null, this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0
}
return t.prototype.getLocalPosition = function(t, e, r) {
return t.worldTransform.applyInverse(r || this.global, e)
}, t.prototype._copyEvent = function(t) {
t.isPrimary && (this.isPrimary = !0), this.button = t.button, this.buttons = t.buttons, this.width = t.width, this.height = t.height, this.tiltX = t.tiltX, this.tiltY = t.tiltY, this.pointerType = t.pointerType, this.pressure = t.pressure, this.rotationAngle = t.rotationAngle, this.twist = t.twist || 0, this.tangentialPressure = t.tangentialPressure || 0
}, t.prototype._reset = function() {
this.isPrimary = !1
}, n(t, [{
key: "pointerId",
get: function() {
return this.identifier
}
}]), t
}();
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.stopped = !1, this.target = null, this.currentTarget = null, this.type = null, this.data = null
}
return t.prototype.stopPropagation = function() {
this.stopped = !0
}, t.prototype._reset = function() {
this.stopped = !1, this.currentTarget = null, this.target = null
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}();
var i = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this._pointerId = e, this._flags = t.FLAGS.NONE
}
return t.prototype._doSet = function(t, e) {
this._flags = e ? this._flags | t : this._flags & ~t
}, n(t, [{
key: "pointerId",
get: function() {
return this._pointerId
}
}, {
key: "flags",
get: function() {
return this._flags
},
set: function(t) {
this._flags = t
}
}, {
key: "none",
get: function() {
return this._flags === this.constructor.FLAGS.NONE
}
}, {
key: "over",
get: function() {
return 0 != (this._flags & this.constructor.FLAGS.OVER)
},
set: function(t) {
this._doSet(this.constructor.FLAGS.OVER, t)
}
}, {
key: "rightDown",
get: function() {
return 0 != (this._flags & this.constructor.FLAGS.RIGHT_DOWN)
},
set: function(t) {
this._doSet(this.constructor.FLAGS.RIGHT_DOWN, t)
}
}, {
key: "leftDown",
get: function() {
return 0 != (this._flags & this.constructor.FLAGS.LEFT_DOWN)
},
set: function(t) {
this._doSet(this.constructor.FLAGS.LEFT_DOWN, t)
}
}]), t
}();
e.default = i, i.FLAGS = Object.freeze({
NONE: 0,
OVER: 1,
LEFT_DOWN: 2,
RIGHT_DOWN: 4
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = {
interactive: !1,
interactiveChildren: !0,
hitArea: null,
get buttonMode() {
return "pointer" === this.cursor
},
set buttonMode(t) {
t ? this.cursor = "pointer" : "pointer" === this.cursor && (this.cursor = null)
},
cursor: null,
get trackedPointers() {
return void 0 === this._trackedPointers && (this._trackedPointers = {}), this._trackedPointers
},
_trackedPointers: void 0
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.parse = s, e.default = function() {
return function(t, e) {
if (t.data && t.type === o.Resource.TYPE.XML)
if (0 !== t.data.getElementsByTagName("page").length && 0 !== t.data.getElementsByTagName("info").length && null !== t.data.getElementsByTagName("info")[0].getAttribute("face")) {
var r = t.isDataUrl ? "" : n.dirname(t.url);
t.isDataUrl && ("." === r && (r = ""), this.baseUrl && r && "/" === this.baseUrl.charAt(this.baseUrl.length - 1) && (r += "/")), (r = r.replace(this.baseUrl, "")) && "/" !== r.charAt(r.length - 1) && (r += "/");
var a = r + t.data.getElementsByTagName("page")[0].getAttribute("file");
if (i.utils.TextureCache[a]) s(t, i.utils.TextureCache[a]), e();
else {
var u = {
crossOrigin: t.crossOrigin,
loadType: o.Resource.LOAD_TYPE.IMAGE,
metadata: t.metadata.imageMetadata,
parentResource: t
};
this.add(t.name + "_image", a, u, function(r) {
s(t, r.texture), e()
})
}
} else e();
else e()
}
};
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(7)),
i = r(0),
o = r(15),
a = r(76);
function s(t, e) {
t.bitmapFont = a.BitmapText.registerFont(t.data, e)
}
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}();
function i(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}
var o = function() {
function t(e, r, n) {
void 0 === r && (r = !1), i(this, t), this._fn = e, this._once = r, this._thisArg = n, this._next = this._prev = this._owner = null
}
return n(t, [{
key: "detach",
value: function() {
return null !== this._owner && (this._owner.detach(this), !0)
}
}]), t
}();
function a(t, e) {
return t._head ? (t._tail._next = e, e._prev = t._tail, t._tail = e) : (t._head = e, t._tail = e), e._owner = t, e
}
var s = function() {
function t() {
i(this, t), this._head = this._tail = void 0
}
return n(t, [{
key: "handlers",
value: function() {
var t = !(arguments.length <= 0 || void 0 === arguments[0]) && arguments[0],
e = this._head;
if (t) return !!e;
for (var r = []; e;) r.push(e), e = e._next;
return r
}
}, {
key: "has",
value: function(t) {
if (!(t instanceof o)) throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");
return t._owner === this
}
}, {
key: "dispatch",
value: function() {
var t = this._head;
if (!t) return !1;
for (; t;) t._once && this.detach(t), t._fn.apply(t._thisArg, arguments), t = t._next;
return !0
}
}, {
key: "add",
value: function(t) {
var e = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1];
if ("function" != typeof t) throw new Error("MiniSignal#add(): First arg must be a Function.");
return a(this, new o(t, !1, e))
}
}, {
key: "once",
value: function(t) {
var e = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1];
if ("function" != typeof t) throw new Error("MiniSignal#once(): First arg must be a Function.");
return a(this, new o(t, !0, e))
}
}, {
key: "detach",
value: function(t) {
if (!(t instanceof o)) throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");
return t._owner !== this ? this : (t._prev && (t._prev._next = t._next), t._next && (t._next._prev = t._prev), t === this._head ? (this._head = t._next, null === t._next && (this._tail = null)) : t === this._tail && (this._tail = t._prev, this._tail._next = null), t._owner = null, this)
}
}, {
key: "detachAll",
value: function() {
var t = this._head;
if (!t) return this;
for (this._head = this._tail = null; t;) t._owner = null, t = t._next;
return this
}
}]), t
}();
s.MiniSignalBinding = o, e.default = s, t.exports = e.default
}, function(t, e, r) {
"use strict";
t.exports = function(t, e) {
e = e || {};
for (var r = {
key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"],
q: {
name: "queryKey",
parser: /(?:^|&)([^&=]*)=?([^&]*)/g
},
parser: {
strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
}
}, n = r.parser[e.strictMode ? "strict" : "loose"].exec(t), i = {}, o = 14; o--;) i[r.key[o]] = n[o] || "";
return i[r.q.name] = {}, i[r.key[12]].replace(r.q.parser, function(t, e, n) {
e && (i[r.q.name][e] = n)
}), i
}
}, function(t, e, r) {
"use strict";
function n() {}
function i(t) {
return function() {
if (null === t) throw new Error("Callback was already called.");
var e = t;
t = null, e.apply(this, arguments)
}
}
e.__esModule = !0, e.eachSeries = function(t, e, r, n) {
var i = 0,
o = t.length;
! function a(s) {
s || i === o ? r && r(s) : n ? setTimeout(function() {
e(t[i++], a)
}, 1) : e(t[i++], a)
}()
}, e.queue = function(t, e) {
if (null == e) e = 1;
else if (0 === e) throw new Error("Concurrency must not be zero");
var r = 0,
o = {
_tasks: [],
concurrency: e,
saturated: n,
unsaturated: n,
buffer: e / 4,
empty: n,
drain: n,
error: n,
started: !1,
paused: !1,
push: function(t, e) {
a(t, !1, e)
},
kill: function() {
r = 0, o.drain = n, o.started = !1, o._tasks = []
},
unshift: function(t, e) {
a(t, !0, e)
},
process: function() {
for (; !o.paused && r < o.concurrency && o._tasks.length;) {
var e = o._tasks.shift();
0 === o._tasks.length && o.empty(), (r += 1) === o.concurrency && o.saturated(), t(e.data, i(s(e)))
}
},
length: function() {
return o._tasks.length
},
running: function() {
return r
},
idle: function() {
return o._tasks.length + r === 0
},
pause: function() {
!0 !== o.paused && (o.paused = !0)
},
resume: function() {
if (!1 !== o.paused) {
o.paused = !1;
for (var t = 1; t <= o.concurrency; t++) o.process()
}
}
};
function a(t, e, r) {
if (null != r && "function" != typeof r) throw new Error("task callback must be a function");
if (o.started = !0, null == t && o.idle()) setTimeout(function() {
return o.drain()
}, 1);
else {
var i = {
data: t,
callback: "function" == typeof r ? r : n
};
e ? o._tasks.unshift(i) : o._tasks.push(i), setTimeout(function() {
return o.process()
}, 1)
}
}
function s(t) {
return function() {
r -= 1, t.callback.apply(t, arguments), null != arguments[0] && o.error(arguments[0], t.data), r <= o.concurrency - o.buffer && o.unsaturated(), o.idle() && o.drain(), o.process()
}
}
return o
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.encodeBinary = function(t) {
var e = "",
r = 0;
for (; r < t.length;) {
for (var i = [0, 0, 0], o = [0, 0, 0, 0], a = 0; a < i.length; ++a) r < t.length ? i[a] = 255 & t.charCodeAt(r++) : i[a] = 0;
o[0] = i[0] >> 2, o[1] = (3 & i[0]) << 4 | i[1] >> 4, o[2] = (15 & i[1]) << 2 | i[2] >> 6, o[3] = 63 & i[2];
var s = r - (t.length - 1);
switch (s) {
case 2:
o[3] = 64, o[2] = 64;
break;
case 1:
o[3] = 64
}
for (var u = 0; u < o.length; ++u) e += n.charAt(o[u])
}
return e
};
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function() {
return function(t, e) {
var r = t.name + "_image";
if (t.data && t.type === i.Resource.TYPE.JSON && t.data.frames && !this.resources[r]) {
var n = {
crossOrigin: t.crossOrigin,
metadata: t.metadata.imageMetadata,
parentResource: t
},
o = u(t, this.baseUrl);
this.add(r, o, n, function(r) {
if (r.error) e(r.error);
else {
var n = new s.Spritesheet(r.texture.baseTexture, t.data, t.url);
n.parse(function() {
t.spritesheet = n, t.textures = n.textures, e()
})
}
})
} else e()
}
}, e.getResourcePath = u;
var n, i = r(15),
o = r(58),
a = (n = o) && n.__esModule ? n : {
default: n
},
s = r(0);
function u(t, e) {
return t.isDataUrl ? t.data.meta.image : a.default.resolve(t.url.replace(e, ""), t.data.meta.image)
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function() {
return function(t, e) {
t.data && t.type === i.Resource.TYPE.IMAGE && (t.texture = a.default.fromLoader(t.data, t.url, t.name)), e()
}
};
var n, i = r(15),
o = r(8),
a = (n = o) && n.__esModule ? n : {
default: n
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(16),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = function(t) {
function e(r, n, i) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var a = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return a._ready = !0, a.verticesX = n || 10, a.verticesY = i || 10, a.drawMode = o.default.DRAW_MODES.TRIANGLES, a.refresh(), a
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._refresh = function() {
for (var t = this._texture, e = this.verticesX * this.verticesY, r = [], n = [], i = [], o = this.verticesX - 1, a = this.verticesY - 1, s = t.width / o, u = t.height / a, l = 0; l < e; l++) {
var h = l % this.verticesX,
c = l / this.verticesX | 0;
r.push(h * s, c * u), n.push(h / o, c / a)
}
for (var f = o * a, d = 0; d < f; d++) {
var p = d % o,
v = d / o | 0,
y = v * this.verticesX + p,
g = v * this.verticesX + p + 1,
m = (v + 1) * this.verticesX + p,
_ = (v + 1) * this.verticesX + p + 1;
i.push(y, g, m), i.push(g, _, m)
}
this.vertices = new Float32Array(r), this.uvs = new Float32Array(n), this.colors = new Float32Array([]), this.indices = new Uint16Array(i), this.dirty++, this.indexDirty++, this.multiplyUvs()
}, e.prototype._onTextureUpdate = function() {
o.default.prototype._onTextureUpdate.call(this), this._ready && this.refresh()
}, e
}(o.default);
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.maxItemsPerFrame = e, this.itemsLeft = 0
}
return t.prototype.beginFrame = function() {
this.itemsLeft = this.maxItemsPerFrame
}, t.prototype.allowedToUpload = function() {
return this.itemsLeft-- > 0
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Text = void 0;
var n = r(2);
e.Text = function(t) {
function e(t, r) {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e), r.constructor !== n.TextStyle && (r = new n.TextStyle(r)),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, n.Text), e
}()
}, function(t, e) {
var r, n, i, o = this && this.__extends || (r = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(t, e) {
t.__proto__ = e
} || function(t, e) {
for (var r in e) e.hasOwnProperty(r) && (t[r] = e[r])
},
function(t, e) {
function n() {
this.constructor = t
}
r(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
});
! function(t) {
! function(t) {
var e, r, n, i = function() {
function t(t, e, r) {
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.duration = r
}
return t.prototype.apply = function(t, e, r, n, i, o, a, s) {
if (null == t) throw new Error("skeleton cannot be null.");
n && 0 != this.duration && (r %= this.duration, e > 0 && (e %= this.duration));
for (var u = this.timelines, l = 0, h = u.length; l < h; l++) u[l].apply(t, e, r, i, o, a, s)
}, t.binarySearch = function(t, e, r) {
void 0 === r && (r = 1);
var n = 0,
i = t.length / r - 2;
if (0 == i) return r;
for (var o = i >>> 1;;) {
if (t[(o + 1) * r] <= e ? n = o + 1 : i = o, n == i) return (n + 1) * r;
o = n + i >>> 1
}
}, t.linearSearch = function(t, e, r) {
for (var n = 0, i = t.length - r; n <= i; n += r)
if (t[n] > e) return n;
return -1
}, t
}();
t.Animation = i,
function(t) {
t[t.setup = 0] = "setup", t[t.current = 1] = "current", t[t.currentLayered = 2] = "currentLayered"
}(e = t.MixPose || (t.MixPose = {})),
function(t) {
t[t.in = 0] = "in", t[t.out = 1] = "out"
}(r = 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(r) {
if (r <= 0) throw new Error("frameCount must be > 0: " + r);
this.curves = t.Utils.newFloatArray((r - 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 r = t * e.BEZIER_SIZE;
if (r == this.curves.length) return e.LINEAR;
var n = this.curves[r];
return n == e.LINEAR ? e.LINEAR : n == e.STEPPED ? e.STEPPED : e.BEZIER
}, e.prototype.setCurve = function(t, r, n, i, o) {
var a = .03 * (2 * -r + i),
s = .03 * (2 * -n + o),
u = .006 * (3 * (r - i) + 1),
l = .006 * (3 * (n - o) + 1),
h = 2 * a + u,
c = 2 * s + l,
f = .3 * r + a + .16666667 * u,
d = .3 * n + s + .16666667 * l,
p = t * e.BEZIER_SIZE,
v = this.curves;
v[p++] = e.BEZIER;
for (var y = f, g = d, m = p + e.BEZIER_SIZE - 1; p < m; p += 2) v[p] = y, v[p + 1] = g, f += h, d += c, h += u, c += l, y += f, g += d
}, e.prototype.getCurvePercent = function(r, n) {
n = t.MathUtils.clamp(n, 0, 1);
var i = this.curves,
o = r * e.BEZIER_SIZE,
a = i[o];
if (a == e.LINEAR) return n;
if (a == e.STEPPED) return 0;
for (var s = 0, u = ++o, l = o + e.BEZIER_SIZE - 1; o < l; o += 2)
if ((s = i[o]) >= n) {
var h = void 0,
c = void 0;
return o == u ? (h = 0, c = 0) : (h = i[o - 2], c = i[o - 1]), c + (i[o + 1] - c) * (n - h) / (s - h)
}
var f = i[o - 1];
return f + (1 - f) * (n - s) / (1 - s)
}, e.LINEAR = 0, e.STEPPED = 1, e.BEZIER = 2, e.BEZIER_SIZE = 19, e
}();
t.CurveTimeline = a;
var s = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e << 1), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.rotate << 24) + this.boneIndex
}, a.prototype.setFrame = function(t, e, r) {
t <<= 1, this.frames[t] = e, this.frames[t + a.ROTATION] = r
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = this.frames,
c = t.bones[this.boneIndex];
if (n < h[0]) switch (u) {
case e.setup:
return void(c.rotation = c.data.rotation);
case e.current:
var f = c.data.rotation - c.rotation;
f -= 360 * (16384 - (16384.499999999996 - f / 360 | 0)), c.rotation += f * s
} else if (n >= h[h.length - a.ENTRIES])
if (u == e.setup) c.rotation = c.data.rotation + h[h.length + a.PREV_ROTATION] * s;
else {
var d = c.data.rotation + h[h.length + a.PREV_ROTATION] - c.rotation;
d -= 360 * (16384 - (16384.499999999996 - d / 360 | 0)), c.rotation += d * s
}
else {
var p = i.binarySearch(h, n, a.ENTRIES),
v = h[p + a.PREV_ROTATION],
y = h[p],
g = this.getCurvePercent((p >> 1) - 1, 1 - (n - y) / (h[p + a.PREV_TIME] - y)),
m = h[p + a.ROTATION] - v;
m = v + (m -= 360 * (16384 - (16384.499999999996 - m / 360 | 0))) * g, u == e.setup ? (m -= 360 * (16384 - (16384.499999999996 - m / 360 | 0)), c.rotation = c.data.rotation + m * s) : (m = c.data.rotation + m - c.rotation, m -= 360 * (16384 - (16384.499999999996 - m / 360 | 0)), c.rotation += m * s)
}
}, a.ENTRIES = 2, a.PREV_TIME = -2, a.PREV_ROTATION = -1, a.ROTATION = 1, a
}(a);
t.RotateTimeline = s;
var u = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.translate << 24) + this.boneIndex
}, a.prototype.setFrame = function(t, e, r, n) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.X] = r, this.frames[t + a.Y] = n
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = this.frames,
c = t.bones[this.boneIndex];
if (n < h[0]) switch (u) {
case e.setup:
return c.x = c.data.x, void(c.y = c.data.y);
case e.current:
c.x += (c.data.x - c.x) * s, c.y += (c.data.y - c.y) * s
} else {
var f = 0,
d = 0;
if (n >= h[h.length - a.ENTRIES]) f = h[h.length + a.PREV_X], d = h[h.length + a.PREV_Y];
else {
var p = i.binarySearch(h, n, a.ENTRIES);
f = h[p + a.PREV_X], d = h[p + a.PREV_Y];
var v = h[p],
y = this.getCurvePercent(p / a.ENTRIES - 1, 1 - (n - v) / (h[p + a.PREV_TIME] - v));
f += (h[p + a.X] - f) * y, d += (h[p + a.Y] - d) * y
}
u == e.setup ? (c.x = c.data.x + f * s, c.y = c.data.y + d * s) : (c.x += (c.data.x + f - c.x) * s, c.y += (c.data.y + d - c.y) * s)
}
}, 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 = u;
var l = function(a) {
function s(t) {
return a.call(this, t) || this
}
return o(s, a), s.prototype.getPropertyId = function() {
return (n.scale << 24) + this.boneIndex
}, s.prototype.apply = function(n, o, a, u, l, h, c) {
var f = this.frames,
d = n.bones[this.boneIndex];
if (a < f[0]) switch (h) {
case e.setup:
return d.scaleX = d.data.scaleX, void(d.scaleY = d.data.scaleY);
case e.current:
d.scaleX += (d.data.scaleX - d.scaleX) * l, d.scaleY += (d.data.scaleY - d.scaleY) * l
} else {
var p = 0,
v = 0;
if (a >= f[f.length - s.ENTRIES]) p = f[f.length + s.PREV_X] * d.data.scaleX, v = f[f.length + s.PREV_Y] * d.data.scaleY;
else {
var y = i.binarySearch(f, a, s.ENTRIES);
p = f[y + s.PREV_X], v = f[y + s.PREV_Y];
var g = f[y],
m = this.getCurvePercent(y / s.ENTRIES - 1, 1 - (a - g) / (f[y + s.PREV_TIME] - g));
p = (p + (f[y + s.X] - p) * m) * d.data.scaleX, v = (v + (f[y + s.Y] - v) * m) * d.data.scaleY
}
if (1 == l) d.scaleX = p, d.scaleY = v;
else {
var _ = 0,
b = 0;
h == e.setup ? (_ = d.data.scaleX, b = d.data.scaleY) : (_ = d.scaleX, b = d.scaleY), c == r.out ? (p = Math.abs(p) * t.MathUtils.signum(_), v = Math.abs(v) * t.MathUtils.signum(b)) : (_ = Math.abs(_) * t.MathUtils.signum(p), b = Math.abs(b) * t.MathUtils.signum(v)), d.scaleX = _ + (p - _) * l, d.scaleY = b + (v - b) * l
}
}
}, s
}(u);
t.ScaleTimeline = l;
var h = function(t) {
function r(e) {
return t.call(this, e) || this
}
return o(r, t), r.prototype.getPropertyId = function() {
return (n.shear << 24) + this.boneIndex
}, r.prototype.apply = function(t, n, o, a, s, u, l) {
var h = this.frames,
c = t.bones[this.boneIndex];
if (o < h[0]) switch (u) {
case e.setup:
return c.shearX = c.data.shearX, void(c.shearY = c.data.shearY);
case e.current:
c.shearX += (c.data.shearX - c.shearX) * s, c.shearY += (c.data.shearY - c.shearY) * s
} else {
var f = 0,
d = 0;
if (o >= h[h.length - r.ENTRIES]) f = h[h.length + r.PREV_X], d = h[h.length + r.PREV_Y];
else {
var p = i.binarySearch(h, o, r.ENTRIES);
f = h[p + r.PREV_X], d = h[p + r.PREV_Y];
var v = h[p],
y = this.getCurvePercent(p / r.ENTRIES - 1, 1 - (o - v) / (h[p + r.PREV_TIME] - v));
f += (h[p + r.X] - f) * y, d += (h[p + r.Y] - d) * y
}
u == e.setup ? (c.shearX = c.data.shearX + f * s, c.shearY = c.data.shearY + d * s) : (c.shearX += (c.data.shearX + f - c.shearX) * s, c.shearY += (c.data.shearY + d - c.shearY) * s)
}
}, r
}(u);
t.ShearTimeline = h;
var c = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.color << 24) + this.slotIndex
}, a.prototype.setFrame = function(t, e, r, n, i, o) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.R] = r, this.frames[t + a.G] = n, this.frames[t + a.B] = i, this.frames[t + a.A] = o
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = t.slots[this.slotIndex],
c = this.frames;
if (n < c[0]) switch (u) {
case e.setup:
return void h.color.setFromColor(h.data.color);
case e.current:
var f = h.color,
d = h.data.color;
f.add((d.r - f.r) * s, (d.g - f.g) * s, (d.b - f.b) * s, (d.a - f.a) * s)
} else {
var p = 0,
v = 0,
y = 0,
g = 0;
if (n >= c[c.length - a.ENTRIES]) {
var m = c.length;
p = c[m + a.PREV_R], v = c[m + a.PREV_G], y = c[m + a.PREV_B], g = c[m + a.PREV_A]
} else {
var _ = i.binarySearch(c, n, a.ENTRIES);
p = c[_ + a.PREV_R], v = c[_ + a.PREV_G], y = c[_ + a.PREV_B], g = c[_ + a.PREV_A];
var b = c[_],
x = this.getCurvePercent(_ / a.ENTRIES - 1, 1 - (n - b) / (c[_ + a.PREV_TIME] - b));
p += (c[_ + a.R] - p) * x, v += (c[_ + a.G] - v) * x, y += (c[_ + a.B] - y) * x, g += (c[_ + a.A] - g) * x
}
if (1 == s) h.color.set(p, v, y, g);
else {
f = h.color;
u == e.setup && f.setFromColor(h.data.color), f.add((p - f.r) * s, (v - f.g) * s, (y - f.b) * s, (g - f.a) * s)
}
}
}, 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(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.twoColor << 24) + this.slotIndex
}, a.prototype.setFrame = function(t, e, r, n, i, o, s, u, l) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.R] = r, this.frames[t + a.G] = n, this.frames[t + a.B] = i, this.frames[t + a.A] = o, this.frames[t + a.R2] = s, this.frames[t + a.G2] = u, this.frames[t + a.B2] = l
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = t.slots[this.slotIndex],
c = this.frames;
if (n < c[0]) switch (u) {
case e.setup:
return h.color.setFromColor(h.data.color), void h.darkColor.setFromColor(h.data.darkColor);
case e.current:
var f = h.color,
d = h.darkColor,
p = h.data.color,
v = h.data.darkColor;
f.add((p.r - f.r) * s, (p.g - f.g) * s, (p.b - f.b) * s, (p.a - f.a) * s), d.add((v.r - d.r) * s, (v.g - d.g) * s, (v.b - d.b) * s, 0)
} else {
var y = 0,
g = 0,
m = 0,
_ = 0,
b = 0,
x = 0,
w = 0;
if (n >= c[c.length - a.ENTRIES]) {
var T = c.length;
y = c[T + a.PREV_R], g = c[T + a.PREV_G], m = c[T + a.PREV_B], _ = c[T + a.PREV_A], b = c[T + a.PREV_R2], x = c[T + a.PREV_G2], w = c[T + a.PREV_B2]
} else {
var E = i.binarySearch(c, n, a.ENTRIES);
y = c[E + a.PREV_R], g = c[E + a.PREV_G], m = c[E + a.PREV_B], _ = c[E + a.PREV_A], b = c[E + a.PREV_R2], x = c[E + a.PREV_G2], w = c[E + a.PREV_B2];
var S = c[E],
M = this.getCurvePercent(E / a.ENTRIES - 1, 1 - (n - S) / (c[E + a.PREV_TIME] - S));
y += (c[E + a.R] - y) * M, g += (c[E + a.G] - g) * M, m += (c[E + a.B] - m) * M, _ += (c[E + a.A] - _) * M, b += (c[E + a.R2] - b) * M, x += (c[E + a.G2] - x) * M, w += (c[E + a.B2] - w) * M
}
if (1 == s) h.color.set(y, g, m, _), h.darkColor.set(b, x, w, 1);
else {
f = h.color, d = h.darkColor;
u == e.setup && (f.setFromColor(h.data.color), d.setFromColor(h.data.darkColor)), f.add((y - f.r) * s, (g - f.g) * s, (m - f.b) * s, (_ - f.a) * s), d.add((b - d.r) * s, (x - d.g) * s, (w - d.b) * s, 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 o(e) {
this.frames = t.Utils.newFloatArray(e), this.attachmentNames = new Array(e)
}
return o.prototype.getPropertyId = function() {
return (n.attachment << 24) + this.slotIndex
}, o.prototype.getFrameCount = function() {
return this.frames.length
}, o.prototype.setFrame = function(t, e, r) {
this.frames[t] = e, this.attachmentNames[t] = r
}, o.prototype.apply = function(t, n, o, a, s, u, l) {
var h = t.slots[this.slotIndex];
if (l != r.out || u != e.setup) {
var c = this.frames;
if (o < c[0]) {
if (u == e.setup) {
var f = h.data.attachmentName;
h.setAttachment(null == f ? null : t.getAttachment(this.slotIndex, f))
}
} else {
var d = 0;
d = o >= c[c.length - 1] ? c.length - 1 : i.binarySearch(c, o, 1) - 1;
var p = this.attachmentNames[d];
t.slots[this.slotIndex].setAttachment(null == p ? null : t.getAttachment(this.slotIndex, p))
}
} else {
var v = h.data.attachmentName;
h.setAttachment(null == v ? null : t.getAttachment(this.slotIndex, v))
}
}, o
}();
t.AttachmentTimeline = d;
var p = null,
v = function(r) {
function a(e) {
var n = r.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 o(a, r), a.prototype.getPropertyId = function() {
return (n.deform << 27) + +this.attachment.id + this.slotIndex
}, a.prototype.setFrame = function(t, e, r) {
this.frames[t] = e, this.frameVertices[t] = r
}, a.prototype.apply = function(r, n, o, a, s, u, l) {
var h = r.slots[this.slotIndex],
c = h.getAttachment();
if (c instanceof t.VertexAttachment && c.applyDeform(this.attachment)) {
var f = h.attachmentVertices,
d = this.frameVertices,
v = d[0].length,
y = t.Utils.setArraySize(f, v),
g = this.frames;
if (o < g[0]) {
var m = c;
switch (u) {
case e.setup:
var _ = void 0;
return null == m.bones ? _ = m.vertices : (_ = p).length < v && (p = _ = t.Utils.newFloatArray(v)), void t.Utils.arrayCopy(_, 0, y, 0, v);
case e.current:
if (1 == s) break;
if (null == m.bones)
for (var b = m.vertices, x = 0; x < v; x++) y[x] += (b[x] - y[x]) * s;
else {
s = 1 - s;
for (var w = 0; w < v; w++) y[w] *= s
}
}
} else if (o >= g[g.length - 1]) {
var T = d[g.length - 1];
if (1 == s) t.Utils.arrayCopy(T, 0, y, 0, v);
else if (u == e.setup) {
if (null == (m = c).bones) {
b = m.vertices;
for (var E = 0; E < v; E++) {
var S = b[E];
y[E] = S + (T[E] - S) * s
}
} else
for (var M = 0; M < v; M++) y[M] = T[M] * s
} else
for (var P = 0; P < v; P++) y[P] += (T[P] - y[P]) * s
} else {
var O = i.binarySearch(g, o),
C = d[O - 1],
A = d[O],
R = g[O],
I = this.getCurvePercent(O - 1, 1 - (o - R) / (g[O - 1] - R));
if (1 == s)
for (var D = 0; D < v; D++) {
var k = C[D];
y[D] = k + (A[D] - k) * I
} else if (u == e.setup) {
if (null == (m = c).bones) {
b = m.vertices;
for (var N = 0; N < v; N++) {
k = C[N], S = b[N];
y[N] = S + (k + (A[N] - k) * I - S) * s
}
} else
for (var L = 0; L < v; L++) {
k = C[L];
y[L] = (k + (A[L] - k) * I) * s
}
} else
for (var j = 0; j < v; j++) {
k = C[j];
y[j] += (k + (A[j] - k) * I - y[j]) * s
}
}
}
}, a
}(a);
t.DeformTimeline = v;
var y = function() {
function e(e) {
this.frames = t.Utils.newFloatArray(e), this.events = new Array(e)
}
return e.prototype.getPropertyId = function() {
return n.event << 24
}, e.prototype.getFrameCount = function() {
return this.frames.length
}, e.prototype.setFrame = function(t, e) {
this.frames[t] = e.time, this.events[t] = e
}, e.prototype.apply = function(t, e, r, n, o, a, s) {
if (null != n) {
var u = this.frames,
l = this.frames.length;
if (e > r) this.apply(t, e, Number.MAX_VALUE, n, o, a, s), e = -1;
else if (e >= u[l - 1]) return;
if (!(r < u[0])) {
var h = 0;
if (e < u[0]) h = 0;
else
for (var c = u[h = i.binarySearch(u, e)]; h > 0 && u[h - 1] == c;) h--;
for (; h < l && r >= u[h]; h++) n.push(this.events[h])
}
}
}, e
}();
t.EventTimeline = y;
var g = function() {
function o(e) {
this.frames = t.Utils.newFloatArray(e), this.drawOrders = new Array(e)
}
return o.prototype.getPropertyId = function() {
return n.drawOrder << 24
}, o.prototype.getFrameCount = function() {
return this.frames.length
}, o.prototype.setFrame = function(t, e, r) {
this.frames[t] = e, this.drawOrders[t] = r
}, o.prototype.apply = function(n, o, a, s, u, l, h) {
var c = n.drawOrder,
f = n.slots;
if (h != r.out || l != e.setup) {
var d = this.frames;
if (a < d[0]) l == e.setup && t.Utils.arrayCopy(n.slots, 0, n.drawOrder, 0, n.slots.length);
else {
var p = 0;
p = a >= d[d.length - 1] ? d.length - 1 : i.binarySearch(d, a) - 1;
var v = this.drawOrders[p];
if (null == v) t.Utils.arrayCopy(f, 0, c, 0, f.length);
else
for (var y = 0, g = v.length; y < g; y++) c[y] = f[v[y]]
}
} else t.Utils.arrayCopy(n.slots, 0, n.drawOrder, 0, n.slots.length)
}, o
}();
t.DrawOrderTimeline = g;
var m = function(a) {
function s(e) {
var r = a.call(this, e) || this;
return r.frames = t.Utils.newFloatArray(e * s.ENTRIES), r
}
return o(s, a), s.prototype.getPropertyId = function() {
return (n.ikConstraint << 24) + this.ikConstraintIndex
}, s.prototype.setFrame = function(t, e, r, n) {
t *= s.ENTRIES, this.frames[t] = e, this.frames[t + s.MIX] = r, this.frames[t + s.BEND_DIRECTION] = n
}, s.prototype.apply = function(t, n, o, a, u, l, h) {
var c = this.frames,
f = t.ikConstraints[this.ikConstraintIndex];
if (o < c[0]) switch (l) {
case e.setup:
return f.mix = f.data.mix, void(f.bendDirection = f.data.bendDirection);
case e.current:
f.mix += (f.data.mix - f.mix) * u, f.bendDirection = f.data.bendDirection
} else if (o >= c[c.length - s.ENTRIES]) l == e.setup ? (f.mix = f.data.mix + (c[c.length + s.PREV_MIX] - f.data.mix) * u, f.bendDirection = h == r.out ? f.data.bendDirection : c[c.length + s.PREV_BEND_DIRECTION]) : (f.mix += (c[c.length + s.PREV_MIX] - f.mix) * u, h == r.in && (f.bendDirection = c[c.length + s.PREV_BEND_DIRECTION]));
else {
var d = i.binarySearch(c, o, s.ENTRIES),
p = c[d + s.PREV_MIX],
v = c[d],
y = this.getCurvePercent(d / s.ENTRIES - 1, 1 - (o - v) / (c[d + s.PREV_TIME] - v));
l == e.setup ? (f.mix = f.data.mix + (p + (c[d + s.MIX] - p) * y - f.data.mix) * u, f.bendDirection = h == r.out ? f.data.bendDirection : c[d + s.PREV_BEND_DIRECTION]) : (f.mix += (p + (c[d + s.MIX] - p) * y - f.mix) * u, h == r.in && (f.bendDirection = c[d + s.PREV_BEND_DIRECTION]))
}
}, s.ENTRIES = 3, s.PREV_TIME = -3, s.PREV_MIX = -2, s.PREV_BEND_DIRECTION = -1, s.MIX = 1, s.BEND_DIRECTION = 2, s
}(a);
t.IkConstraintTimeline = m;
var _ = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.transformConstraint << 24) + this.transformConstraintIndex
}, a.prototype.setFrame = function(t, e, r, n, i, o) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.ROTATE] = r, this.frames[t + a.TRANSLATE] = n, this.frames[t + a.SCALE] = i, this.frames[t + a.SHEAR] = o
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = this.frames,
c = t.transformConstraints[this.transformConstraintIndex];
if (n < h[0]) {
var f = c.data;
switch (u) {
case e.setup:
return c.rotateMix = f.rotateMix, c.translateMix = f.translateMix, c.scaleMix = f.scaleMix, void(c.shearMix = f.shearMix);
case e.current:
c.rotateMix += (f.rotateMix - c.rotateMix) * s, c.translateMix += (f.translateMix - c.translateMix) * s, c.scaleMix += (f.scaleMix - c.scaleMix) * s, c.shearMix += (f.shearMix - c.shearMix) * s
}
} else {
var d = 0,
p = 0,
v = 0,
y = 0;
if (n >= h[h.length - a.ENTRIES]) {
var g = h.length;
d = h[g + a.PREV_ROTATE], p = h[g + a.PREV_TRANSLATE], v = h[g + a.PREV_SCALE], y = h[g + a.PREV_SHEAR]
} else {
var m = i.binarySearch(h, n, a.ENTRIES);
d = h[m + a.PREV_ROTATE], p = h[m + a.PREV_TRANSLATE], v = h[m + a.PREV_SCALE], y = h[m + a.PREV_SHEAR];
var _ = h[m],
b = this.getCurvePercent(m / a.ENTRIES - 1, 1 - (n - _) / (h[m + a.PREV_TIME] - _));
d += (h[m + a.ROTATE] - d) * b, p += (h[m + a.TRANSLATE] - p) * b, v += (h[m + a.SCALE] - v) * b, y += (h[m + a.SHEAR] - y) * b
}
if (u == e.setup) {
f = c.data;
c.rotateMix = f.rotateMix + (d - f.rotateMix) * s, c.translateMix = f.translateMix + (p - f.translateMix) * s, c.scaleMix = f.scaleMix + (v - f.scaleMix) * s, c.shearMix = f.shearMix + (y - f.shearMix) * s
} else c.rotateMix += (d - c.rotateMix) * s, c.translateMix += (p - c.translateMix) * s, c.scaleMix += (v - c.scaleMix) * s, c.shearMix += (y - c.shearMix) * s
}
}, 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 = _;
var b = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.pathConstraintPosition << 24) + this.pathConstraintIndex
}, a.prototype.setFrame = function(t, e, r) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.VALUE] = r
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = this.frames,
c = t.pathConstraints[this.pathConstraintIndex];
if (n < h[0]) switch (u) {
case e.setup:
return void(c.position = c.data.position);
case e.current:
c.position += (c.data.position - c.position) * s
} else {
var f = 0;
if (n >= h[h.length - a.ENTRIES]) f = h[h.length + a.PREV_VALUE];
else {
var d = i.binarySearch(h, n, a.ENTRIES);
f = h[d + a.PREV_VALUE];
var p = h[d],
v = this.getCurvePercent(d / a.ENTRIES - 1, 1 - (n - p) / (h[d + a.PREV_TIME] - p));
f += (h[d + a.VALUE] - f) * v
}
u == e.setup ? c.position = c.data.position + (f - c.data.position) * s : c.position += (f - c.position) * s
}
}, a.ENTRIES = 2, a.PREV_TIME = -2, a.PREV_VALUE = -1, a.VALUE = 1, a
}(a);
t.PathConstraintPositionTimeline = b;
var x = function(t) {
function r(e) {
return t.call(this, e) || this
}
return o(r, t), r.prototype.getPropertyId = function() {
return (n.pathConstraintSpacing << 24) + this.pathConstraintIndex
}, r.prototype.apply = function(t, n, o, a, s, u, l) {
var h = this.frames,
c = t.pathConstraints[this.pathConstraintIndex];
if (o < h[0]) switch (u) {
case e.setup:
return void(c.spacing = c.data.spacing);
case e.current:
c.spacing += (c.data.spacing - c.spacing) * s
} else {
var f = 0;
if (o >= h[h.length - r.ENTRIES]) f = h[h.length + r.PREV_VALUE];
else {
var d = i.binarySearch(h, o, r.ENTRIES);
f = h[d + r.PREV_VALUE];
var p = h[d],
v = this.getCurvePercent(d / r.ENTRIES - 1, 1 - (o - p) / (h[d + r.PREV_TIME] - p));
f += (h[d + r.VALUE] - f) * v
}
u == e.setup ? c.spacing = c.data.spacing + (f - c.data.spacing) * s : c.spacing += (f - c.spacing) * s
}
}, r
}(b);
t.PathConstraintSpacingTimeline = x;
var w = function(r) {
function a(e) {
var n = r.call(this, e) || this;
return n.frames = t.Utils.newFloatArray(e * a.ENTRIES), n
}
return o(a, r), a.prototype.getPropertyId = function() {
return (n.pathConstraintMix << 24) + this.pathConstraintIndex
}, a.prototype.setFrame = function(t, e, r, n) {
t *= a.ENTRIES, this.frames[t] = e, this.frames[t + a.ROTATE] = r, this.frames[t + a.TRANSLATE] = n
}, a.prototype.apply = function(t, r, n, o, s, u, l) {
var h = this.frames,
c = t.pathConstraints[this.pathConstraintIndex];
if (n < h[0]) switch (u) {
case e.setup:
return c.rotateMix = c.data.rotateMix, void(c.translateMix = c.data.translateMix);
case e.current:
c.rotateMix += (c.data.rotateMix - c.rotateMix) * s, c.translateMix += (c.data.translateMix - c.translateMix) * s
} else {
var f = 0,
d = 0;
if (n >= h[h.length - a.ENTRIES]) f = h[h.length + a.PREV_ROTATE], d = h[h.length + a.PREV_TRANSLATE];
else {
var p = i.binarySearch(h, n, a.ENTRIES);
f = h[p + a.PREV_ROTATE], d = h[p + a.PREV_TRANSLATE];
var v = h[p],
y = this.getCurvePercent(p / a.ENTRIES - 1, 1 - (n - v) / (h[p + a.PREV_TIME] - v));
f += (h[p + a.ROTATE] - f) * y, d += (h[p + a.TRANSLATE] - d) * y
}
u == e.setup ? (c.rotateMix = c.data.rotateMix + (f - c.data.rotateMix) * s, c.translateMix = c.data.translateMix + (d - c.data.translateMix) * s) : (c.rotateMix += (f - c.rotateMix) * s, c.translateMix += (d - c.translateMix) * s)
}
}, 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 = w
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(e) {
this.tracks = new Array, this.events = new Array, this.listeners = new Array, this.queue = new i(this), this.propertyIDs = new t.IntSet, this.mixingTo = new Array, this.animationsChanged = !1, this.timeScale = 1, this.trackEntryPool = new t.Pool(function() {
return new r
}), this.data = e
}
return e.prototype.update = function(t) {
t *= this.timeScale;
for (var e = this.tracks, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (null != i) {
i.animationLast = i.nextAnimationLast, i.trackLast = i.nextTrackLast;
var o = t * i.timeScale;
if (i.delay > 0) {
if (i.delay -= o, i.delay > 0) continue;
o = -i.delay, i.delay = 0
}
var a = i.next;
if (null != a) {
var s = i.trackLast - a.delay;
if (s >= 0) {
for (a.delay = 0, a.trackTime = s + t * a.timeScale, i.trackTime += o, this.setCurrent(r, a, !0); null != a.mixingFrom;) a.mixTime += o, a = a.mixingFrom;
continue
}
} else if (i.trackLast >= i.trackEnd && null == i.mixingFrom) {
e[r] = null, this.queue.end(i), this.disposeNext(i);
continue
}
if (null != i.mixingFrom && this.updateMixingFrom(i, t)) {
var u = i.mixingFrom;
for (i.mixingFrom = null; null != u;) this.queue.end(u), u = u.mixingFrom
}
i.trackTime += o
}
}
this.queue.drain()
}, e.prototype.updateMixingFrom = function(t, e) {
var r = t.mixingFrom;
if (null == r) return !0;
var n = this.updateMixingFrom(r, e);
return t.mixTime > 0 && (t.mixTime >= t.mixDuration || 0 == t.timeScale) ? (0 == r.totalAlpha && (t.mixingFrom = r.mixingFrom, t.interruptAlpha = r.interruptAlpha, this.queue.end(r)), n) : (r.animationLast = r.nextAnimationLast, r.trackLast = r.nextTrackLast, r.trackTime += e * r.timeScale, t.mixTime += e * t.timeScale, !1)
}, e.prototype.apply = function(r) {
if (null == r) throw new Error("skeleton cannot be null.");
this.animationsChanged && this._animationsChanged();
for (var n = this.events, i = this.tracks, o = !1, a = 0, s = i.length; a < s; a++) {
var u = i[a];
if (!(null == u || u.delay > 0)) {
o = !0;
var l = 0 == a ? t.MixPose.current : t.MixPose.currentLayered,
h = u.alpha;
null != u.mixingFrom ? h *= this.applyMixingFrom(u, r, l) : u.trackTime >= u.trackEnd && null == u.next && (h = 0);
var c = u.animationLast,
f = u.getAnimationTime(),
d = u.animation.timelines.length,
p = u.animation.timelines;
if (1 == h)
for (var v = 0; v < d; v++) p[v].apply(r, c, f, n, 1, t.MixPose.setup, t.MixDirection.in);
else {
var y = u.timelineData,
g = 0 == u.timelinesRotation.length;
g && t.Utils.setArraySize(u.timelinesRotation, d << 1, null);
var m = u.timelinesRotation;
for (v = 0; v < d; v++) {
var _ = p[v],
b = y[v] >= e.FIRST ? t.MixPose.setup : l;
_ instanceof t.RotateTimeline ? this.applyRotateTimeline(_, r, f, h, b, m, v << 1, g) : _.apply(r, c, f, n, h, b, t.MixDirection.in)
}
}
this.queueEvents(u, f), n.length = 0, u.nextAnimationLast = f, u.nextTrackLast = u.trackTime
}
}
return this.queue.drain(), o
}, e.prototype.applyMixingFrom = function(r, n, i) {
var o = r.mixingFrom;
null != o.mixingFrom && this.applyMixingFrom(o, n, i);
var a = 0;
0 == r.mixDuration ? a = 1 : (a = r.mixTime / r.mixDuration) > 1 && (a = 1);
var s = a < o.eventThreshold ? this.events : null,
u = a < o.attachmentThreshold,
l = a < o.drawOrderThreshold,
h = o.animationLast,
c = o.getAnimationTime(),
f = o.animation.timelines.length,
d = o.animation.timelines,
p = o.timelineData,
v = o.timelineDipMix,
y = 0 == o.timelinesRotation.length;
y && t.Utils.setArraySize(o.timelinesRotation, f << 1, null);
var g, m = o.timelinesRotation,
_ = o.alpha * r.interruptAlpha,
b = _ * (1 - a),
x = 0;
o.totalAlpha = 0;
for (var w = 0; w < f; w++) {
var T = d[w];
switch (p[w]) {
case e.SUBSEQUENT:
if (!u && T instanceof t.AttachmentTimeline) continue;
if (!l && T instanceof t.DrawOrderTimeline) continue;
g = i, x = b;
break;
case e.FIRST:
g = t.MixPose.setup, x = b;
break;
case e.DIP:
g = t.MixPose.setup, x = _;
break;
default:
g = t.MixPose.setup, x = _;
var E = v[w];
x *= Math.max(0, 1 - E.mixTime / E.mixDuration)
}
o.totalAlpha += x, T instanceof t.RotateTimeline ? this.applyRotateTimeline(T, n, c, x, g, m, w << 1, y) : T.apply(n, h, c, s, x, g, t.MixDirection.out)
}
return r.mixDuration > 0 && this.queueEvents(o, c), this.events.length = 0, o.nextAnimationLast = c, o.nextTrackLast = o.trackTime, a
}, e.prototype.applyRotateTimeline = function(e, r, n, i, o, a, s, u) {
if (u && (a[s] = 0), 1 != i) {
var l = e,
h = l.frames,
c = r.bones[l.boneIndex];
if (n < h[0]) o == t.MixPose.setup && (c.rotation = c.data.rotation);
else {
var f = 0;
if (n >= h[h.length - t.RotateTimeline.ENTRIES]) f = c.data.rotation + h[h.length + t.RotateTimeline.PREV_ROTATION];
else {
var d = t.Animation.binarySearch(h, n, t.RotateTimeline.ENTRIES),
p = h[d + t.RotateTimeline.PREV_ROTATION],
v = h[d],
y = l.getCurvePercent((d >> 1) - 1, 1 - (n - v) / (h[d + t.RotateTimeline.PREV_TIME] - v));
f = h[d + t.RotateTimeline.ROTATION] - p, f = p + (f -= 360 * (16384 - (16384.499999999996 - f / 360 | 0))) * y + c.data.rotation, f -= 360 * (16384 - (16384.499999999996 - f / 360 | 0))
}
var g = o == t.MixPose.setup ? c.data.rotation : c.rotation,
m = 0,
_ = f - g;
if (0 == _) m = a[s];
else {
_ -= 360 * (16384 - (16384.499999999996 - _ / 360 | 0));
var b = 0,
x = 0;
u ? (b = 0, x = _) : (b = a[s], x = a[s + 1]);
var w = _ > 0,
T = b >= 0;
t.MathUtils.signum(x) != t.MathUtils.signum(_) && Math.abs(x) <= 90 && (Math.abs(b) > 180 && (b += 360 * t.MathUtils.signum(b)), T = w), m = _ + b - b % 360, T != w && (m += 360 * t.MathUtils.signum(b)), a[s] = m
}
a[s + 1] = _, g += m * i, c.rotation = g - 360 * (16384 - (16384.499999999996 - g / 360 | 0))
}
} else e.apply(r, 0, n, null, 1, o, t.MixDirection.in)
}, e.prototype.queueEvents = function(t, e) {
for (var r = t.animationStart, n = t.animationEnd, i = n - r, o = t.trackLast % i, a = this.events, s = 0, u = a.length; s < u; s++) {
var l = a[s];
if (l.time < o) break;
l.time > n || this.queue.event(t, l)
}
for ((t.loop ? o > t.trackTime % i : e >= n && t.animationLast < n) && this.queue.complete(t); s < u; s++) {
a[s].time < r || this.queue.event(t, a[s])
}
}, e.prototype.clearTracks = function() {
var t = this.queue.drainDisabled;
this.queue.drainDisabled = !0;
for (var e = 0, r = this.tracks.length; e < r; e++) this.clearTrack(e);
this.tracks.length = 0, this.queue.drainDisabled = t, this.queue.drain()
}, e.prototype.clearTrack = function(t) {
if (!(t >= this.tracks.length)) {
var e = this.tracks[t];
if (null != e) {
this.queue.end(e), this.disposeNext(e);
for (var r = e;;) {
var n = r.mixingFrom;
if (null == n) break;
this.queue.end(n), r.mixingFrom = null, r = n
}
this.tracks[e.trackIndex] = null, this.queue.drain()
}
}
}, e.prototype.setCurrent = function(t, e, r) {
var n = this.expandToIndex(t);
this.tracks[t] = e, null != n && (r && this.queue.interrupt(n), e.mixingFrom = n, 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, r) {
var n = this.data.skeletonData.findAnimation(e);
if (null == n) throw new Error("Animation not found: " + e);
return this.setAnimationWith(t, n, r)
}, e.prototype.setAnimationWith = function(t, e, r) {
if (null == e) throw new Error("animation cannot be null.");
var n = !0,
i = this.expandToIndex(t);
null != i && (-1 == i.nextTrackLast ? (this.tracks[t] = i.mixingFrom, this.queue.interrupt(i), this.queue.end(i), this.disposeNext(i), i = i.mixingFrom, n = !1) : this.disposeNext(i));
var o = this.trackEntry(t, e, r, i);
return this.setCurrent(t, o, n), this.queue.drain(), o
}, e.prototype.addAnimation = function(t, e, r, n) {
var i = this.data.skeletonData.findAnimation(e);
if (null == i) throw new Error("Animation not found: " + e);
return this.addAnimationWith(t, i, r, n)
}, e.prototype.addAnimationWith = function(t, e, r, n) {
if (null == e) throw new Error("animation cannot be null.");
var i = this.expandToIndex(t);
if (null != i)
for (; null != i.next;) i = i.next;
var o = this.trackEntry(t, e, r, i);
if (null == i) this.setCurrent(t, o, !0), this.queue.drain();
else if (i.next = o, n <= 0) {
var a = i.animationEnd - i.animationStart;
0 != a ? n += a * (1 + (i.trackTime / a | 0)) - this.data.getMix(i.animation, e) : n = 0
}
return o.delay = n, o
}, e.prototype.setEmptyAnimation = function(t, r) {
var n = this.setAnimationWith(t, e.emptyAnimation, !1);
return n.mixDuration = r, n.trackEnd = r, n
}, e.prototype.addEmptyAnimation = function(t, r, n) {
n <= 0 && (n -= r);
var i = this.addAnimationWith(t, e.emptyAnimation, !1, n);
return i.mixDuration = r, i.trackEnd = r, i
}, e.prototype.setEmptyAnimations = function(t) {
var e = this.queue.drainDisabled;
this.queue.drainDisabled = !0;
for (var r = 0, n = this.tracks.length; r < n; r++) {
var i = this.tracks[r];
null != i && this.setEmptyAnimation(i.trackIndex, t)
}
this.queue.drainDisabled = e, this.queue.drain()
}, e.prototype.expandToIndex = function(e) {
return e < this.tracks.length ? this.tracks[e] : (t.Utils.ensureArrayCapacity(this.tracks, e - this.tracks.length + 1, null), this.tracks.length = e + 1, null)
}, e.prototype.trackEntry = function(t, e, r, n) {
var i = this.trackEntryPool.obtain();
return i.trackIndex = t, i.animation = e, i.loop = r, i.eventThreshold = 0, i.attachmentThreshold = 0, i.drawOrderThreshold = 0, i.animationStart = 0, i.animationEnd = e.duration, i.animationLast = -1, i.nextAnimationLast = -1, i.delay = 0, i.trackTime = 0, i.trackLast = -1, i.nextTrackLast = -1, i.trackEnd = Number.MAX_VALUE, i.timeScale = 1, i.alpha = 1, i.interruptAlpha = 1, i.mixTime = 0, i.mixDuration = null == n ? 0 : this.data.getMix(n.animation, e), i
}, e.prototype.disposeNext = function(t) {
for (var e = t.next; null != e;) this.queue.dispose(e), e = e.next;
t.next = null
}, e.prototype._animationsChanged = function() {
this.animationsChanged = !1;
var t = this.propertyIDs;
t.clear();
for (var e = this.mixingTo, r = 0, n = this.tracks.length; r < n; r++) {
var i = this.tracks[r];
null != i && i.setTimelineData(null, e, t)
}
}, 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.prototype.setAnimationByName = function(t, r, n) {
e.deprecatedWarning1 || (e.deprecatedWarning1 = !0, console.warn("Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")), this.setAnimation(t, r, n)
}, e.prototype.addAnimationByName = function(t, r, n, i) {
e.deprecatedWarning2 || (e.deprecatedWarning2 = !0, console.warn("Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")), this.addAnimation(t, r, n, i)
}, e.prototype.hasAnimation = function(t) {
return null !== this.data.skeletonData.findAnimation(t)
}, e.prototype.hasAnimationByName = function(t) {
return e.deprecatedWarning3 || (e.deprecatedWarning3 = !0, console.warn("Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")), this.hasAnimation(t)
}, e.emptyAnimation = new t.Animation("<empty>", [], 0), e.SUBSEQUENT = 0, e.FIRST = 1, e.DIP = 2, e.DIP_MIX = 3, e.deprecatedWarning1 = !1, e.deprecatedWarning2 = !1, e.deprecatedWarning3 = !1, e
}();
t.AnimationState = e;
var r = function() {
function r() {
this.timelineData = new Array, this.timelineDipMix = new Array, this.timelinesRotation = new Array
}
return r.prototype.reset = function() {
this.next = null, this.mixingFrom = null, this.animation = null, this.listener = null, this.timelineData.length = 0, this.timelineDipMix.length = 0, this.timelinesRotation.length = 0
}, r.prototype.setTimelineData = function(r, n, i) {
null != r && n.push(r);
var o = null != this.mixingFrom ? this.mixingFrom.setTimelineData(this, n, i) : this;
null != r && n.pop();
var a = n,
s = n.length - 1,
u = this.animation.timelines,
l = this.animation.timelines.length,
h = t.Utils.setArraySize(this.timelineData, l);
this.timelineDipMix.length = 0;
var c = t.Utils.setArraySize(this.timelineDipMix, l);
t: for (var f = 0; f < l; f++) {
var d = u[f].getPropertyId();
if (i.add(d))
if (null != r && r.hasTimeline(d)) {
for (var p = s; p >= 0; p--) {
var v = a[p];
if (!v.hasTimeline(d) && v.mixDuration > 0) {
h[f] = e.DIP_MIX, c[f] = v;
continue t
}
}
h[f] = e.DIP
} else h[f] = e.FIRST;
else h[f] = e.SUBSEQUENT
}
return o
}, r.prototype.hasTimeline = function(t) {
for (var e = this.animation.timelines, r = 0, n = e.length; r < n; r++)
if (e[r].getPropertyId() == t) return !0;
return !1
}, r.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)
}, r.prototype.setAnimationLast = function(t) {
this.animationLast = t, this.nextAnimationLast = t
}, r.prototype.isComplete = function() {
return this.trackTime >= this.animationEnd - this.animationStart
}, r.prototype.resetRotationDirections = function() {
this.timelinesRotation.length = 0
}, Object.defineProperty(r.prototype, "time", {
get: function() {
return r.deprecatedWarning1 || (r.deprecatedWarning1 = !0, console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")), this.trackTime
},
set: function(t) {
r.deprecatedWarning1 || (r.deprecatedWarning1 = !0, console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")), this.trackTime = t
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(r.prototype, "endTime", {
get: function() {
return r.deprecatedWarning2 || (r.deprecatedWarning2 = !0, console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")), this.trackTime
},
set: function(t) {
r.deprecatedWarning2 || (r.deprecatedWarning2 = !0, console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")), this.trackTime = t
},
enumerable: !0,
configurable: !0
}), r.prototype.loopsCount = function() {
return Math.floor(this.trackTime / this.trackEnd)
}, r.deprecatedWarning1 = !1, r.deprecatedWarning2 = !1, r
}();
t.TrackEntry = r;
var n, i = function() {
function e(t) {
this.objects = [], this.drainDisabled = !1, this.animState = t
}
return e.prototype.start = function(t) {
this.objects.push(n.start), this.objects.push(t), this.animState.animationsChanged = !0
}, e.prototype.interrupt = function(t) {
this.objects.push(n.interrupt), this.objects.push(t)
}, e.prototype.end = function(t) {
this.objects.push(n.end), this.objects.push(t), this.animState.animationsChanged = !0
}, e.prototype.dispose = function(t) {
this.objects.push(n.dispose), this.objects.push(t)
}, e.prototype.complete = function(t) {
this.objects.push(n.complete), this.objects.push(t)
}, e.prototype.event = function(t, e) {
this.objects.push(n.event), this.objects.push(t), this.objects.push(e)
}, e.prototype.deprecateStuff = function() {
return e.deprecatedWarning1 || (e.deprecatedWarning1 = !0, console.warn("Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")), !0
}, e.prototype.drain = function() {
if (!this.drainDisabled) {
this.drainDisabled = !0;
for (var e = this.objects, r = this.animState.listeners, i = 0; i < e.length; i += 2) {
var o = e[i],
a = e[i + 1];
switch (o) {
case n.start:
null != a.listener && a.listener.start && a.listener.start(a);
for (var s = 0; s < r.length; s++) r[s].start && r[s].start(a);
a.onStart && this.deprecateStuff() && a.onStart(a.trackIndex), this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(a.trackIndex);
break;
case n.interrupt:
null != a.listener && a.listener.interrupt && a.listener.interrupt(a);
for (s = 0; s < r.length; s++) r[s].interrupt && r[s].interrupt(a);
break;
case n.end:
null != a.listener && a.listener.end && a.listener.end(a);
for (s = 0; s < r.length; s++) r[s].end && r[s].end(a);
a.onEnd && this.deprecateStuff() && a.onEnd(a.trackIndex), this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(a.trackIndex);
case n.dispose:
null != a.listener && a.listener.dispose && a.listener.dispose(a);
for (s = 0; s < r.length; s++) r[s].dispose && r[s].dispose(a);
this.animState.trackEntryPool.free(a);
break;
case n.complete:
null != a.listener && a.listener.complete && a.listener.complete(a);
for (s = 0; s < r.length; s++) r[s].complete && r[s].complete(a);
var u = t.MathUtils.toInt(a.loopsCount());
a.onComplete && this.deprecateStuff() && a.onComplete(a.trackIndex, u), this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(a.trackIndex, u);
break;
case n.event:
var l = e[2 + i++];
null != a.listener && a.listener.event && a.listener.event(a, l);
for (s = 0; s < r.length; s++) r[s].event && r[s].event(a, l);
a.onEvent && this.deprecateStuff() && a.onEvent(a.trackIndex, l), this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(a.trackIndex, l)
}
}
this.clear(), this.drainDisabled = !1
}
}, e.prototype.clear = function() {
this.objects.length = 0
}, e.deprecatedWarning1 = !1, e
}();
t.EventQueue = i,
function(t) {
t[t.start = 0] = "start", t[t.interrupt = 1] = "interrupt", t[t.end = 2] = "end", t[t.dispose = 3] = "dispose", t[t.complete = 4] = "complete", t[t.event = 5] = "event"
}(n = t.EventType || (t.EventType = {}));
var o = function() {
function t() {}
return t.prototype.start = function(t) {}, t.prototype.interrupt = function(t) {}, t.prototype.end = function(t) {}, t.prototype.dispose = function(t) {}, t.prototype.complete = function(t) {}, t.prototype.event = function(t, e) {}, t
}();
t.AnimationStateAdapter2 = o
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function t(t) {
if (this.animationToMixTime = {}, this.defaultMix = 0, null == t) throw new Error("skeletonData cannot be null.");
this.skeletonData = t
}
return t.prototype.setMix = function(t, e, r) {
var n = this.skeletonData.findAnimation(t);
if (null == n) throw new Error("Animation not found: " + t);
var i = this.skeletonData.findAnimation(e);
if (null == i) throw new Error("Animation not found: " + e);
this.setMixWith(n, i, r)
}, t.prototype.setMixByName = function(e, r, n) {
t.deprecatedWarning1 || (t.deprecatedWarning1 = !0, console.warn("Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.")), this.setMix(e, r, n)
}, t.prototype.setMixWith = function(t, e, r) {
if (null == t) throw new Error("from cannot be null.");
if (null == e) throw new Error("to cannot be null.");
var n = t.name + e.name;
this.animationToMixTime[n] = r
}, t.prototype.getMix = function(t, e) {
var r = t.name + e.name,
n = this.animationToMixTime[r];
return void 0 === n ? this.defaultMix : n
}, t.deprecatedWarning1 = !1, t
}();
t.AnimationStateData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t) {
this.atlas = t
}
return e.prototype.newRegionAttachment = function(e, r, n) {
var i = this.atlas.findRegion(n);
if (null == i) throw new Error("Region not found in atlas: " + n + " (region attachment: " + r + ")");
var o = new t.RegionAttachment(r);
return o.region = i, o
}, e.prototype.newMeshAttachment = function(e, r, n) {
var i = this.atlas.findRegion(n);
if (null == i) throw new Error("Region not found in atlas: " + n + " (mesh attachment: " + r + ")");
var o = new t.MeshAttachment(r);
return o.region = i, o
}, e.prototype.newBoundingBoxAttachment = function(e, r) {
return new t.BoundingBoxAttachment(r)
}, e.prototype.newPathAttachment = function(e, r) {
return new t.PathAttachment(r)
}, e.prototype.newPointAttachment = function(e, r) {
return new t.PointAttachment(r)
}, e.prototype.newClippingAttachment = function(e, r) {
return new t.ClippingAttachment(r)
}, e
}();
t.AtlasAttachmentLoader = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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 = {}))
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t, e, r) {
if (this.matrix = new PIXI.Matrix, 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.sorted = !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 = r, this.setToSetupPose()
}
return Object.defineProperty(e.prototype, "worldX", {
get: function() {
return this.matrix.tx
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(e.prototype, "worldY", {
get: function() {
return this.matrix.ty
},
enumerable: !0,
configurable: !0
}), 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(r, n, i, o, a, s, u) {
this.ax = r, this.ay = n, this.arotation = i, this.ascaleX = o, this.ascaleY = a, this.ashearX = s, this.ashearY = u, this.appliedValid = !0;
var l = this.parent,
h = this.matrix;
if (null == l) {
var c = i + 90 + u,
f = t.MathUtils.cosDeg(i + s) * o,
d = t.MathUtils.cosDeg(c) * a,
p = t.MathUtils.sinDeg(i + s) * o,
v = t.MathUtils.sinDeg(c) * a,
y = this.skeleton;
return y.flipX && (r = -r, f = -f, d = -d), y.flipY !== e.yDown && (n = -n, p = -p, v = -v), h.a = f, h.c = d, h.b = p, h.d = v, h.tx = r + y.x, void(h.ty = n + y.y)
}
var g = l.matrix.a,
m = l.matrix.c,
_ = l.matrix.b,
b = l.matrix.d;
switch (h.tx = g * r + m * n + l.matrix.tx, h.ty = _ * r + b * n + l.matrix.ty, this.data.transformMode) {
case t.TransformMode.Normal:
c = i + 90 + u, f = t.MathUtils.cosDeg(i + s) * o, d = t.MathUtils.cosDeg(c) * a, p = t.MathUtils.sinDeg(i + s) * o, v = t.MathUtils.sinDeg(c) * a;
return h.a = g * f + m * p, h.c = g * d + m * v, h.b = _ * f + b * p, void(h.d = _ * d + b * v);
case t.TransformMode.OnlyTranslation:
c = i + 90 + u;
h.a = t.MathUtils.cosDeg(i + s) * o, h.c = t.MathUtils.cosDeg(c) * a, h.b = t.MathUtils.sinDeg(i + s) * o, h.d = t.MathUtils.sinDeg(c) * a;
break;
case t.TransformMode.NoRotationOrReflection:
var x = 0;
(E = g * g + _ * _) > 1e-4 ? (m = _ * (E = Math.abs(g * b - m * _) / E), b = g * E, x = Math.atan2(_, g) * t.MathUtils.radDeg) : (g = 0, _ = 0, x = 90 - Math.atan2(b, m) * t.MathUtils.radDeg);
var w = i + s - x,
T = i + u - x + 90;
f = t.MathUtils.cosDeg(w) * o, d = t.MathUtils.cosDeg(T) * a, p = t.MathUtils.sinDeg(w) * o, v = t.MathUtils.sinDeg(T) * a;
h.a = g * f - m * p, h.c = g * d - m * v, h.b = _ * f + b * p, h.d = _ * d + b * v;
break;
case t.TransformMode.NoScale:
case t.TransformMode.NoScaleOrReflection:
var E, S = t.MathUtils.cosDeg(i),
M = t.MathUtils.sinDeg(i),
P = g * S + m * M,
O = _ * S + b * M;
(E = Math.sqrt(P * P + O * O)) > 1e-5 && (E = 1 / E), P *= E, O *= E, E = Math.sqrt(P * P + O * O);
var C = Math.PI / 2 + Math.atan2(O, P),
A = Math.cos(C) * E,
R = Math.sin(C) * E;
f = t.MathUtils.cosDeg(s) * o, d = t.MathUtils.cosDeg(90 + u) * a, p = t.MathUtils.sinDeg(s) * o, v = t.MathUtils.sinDeg(90 + u) * a;
return h.a = P * f + A * p, h.c = P * d + A * v, h.b = O * f + R * p, h.d = O * d + R * v, void((this.data.transformMode != t.TransformMode.NoScaleOrReflection ? g * b - m * _ < 0 : this.skeleton.flipX != this.skeleton.flipY != e.yDown) && (h.c = -h.c, h.d = -h.d))
}
this.skeleton.flipX && (h.a = -h.a, h.c = -h.c), this.skeleton.flipY != e.yDown && (h.b = -h.b, h.d = -h.d)
}, 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.matrix.b, this.matrix.a) * t.MathUtils.radDeg
}, e.prototype.getWorldRotationY = function() {
return Math.atan2(this.matrix.d, this.matrix.c) * t.MathUtils.radDeg
}, e.prototype.getWorldScaleX = function() {
var t = this.matrix;
return Math.sqrt(t.a * t.a + t.c * t.c)
}, e.prototype.getWorldScaleY = function() {
var t = this.matrix;
return Math.sqrt(t.b * t.b + t.d * t.d)
}, e.prototype.updateAppliedTransform = function() {
this.appliedValid = !0;
var e = this.parent,
r = this.matrix;
if (null == e) return this.ax = r.tx, this.ay = r.ty, this.arotation = Math.atan2(r.b, r.a) * t.MathUtils.radDeg, this.ascaleX = Math.sqrt(r.a * r.a + r.b * r.b), this.ascaleY = Math.sqrt(r.c * r.c + r.d * r.d), this.ashearX = 0, void(this.ashearY = Math.atan2(r.a * r.c + r.b * r.d, r.a * r.d - r.b * r.c) * t.MathUtils.radDeg);
var n = e.matrix,
i = 1 / (n.a * n.d - n.b * n.c),
o = r.tx - n.tx,
a = r.ty - n.ty;
this.ax = o * n.d * i - a * n.c * i, this.ay = a * n.a * i - o * n.b * i;
var s = i * n.d,
u = i * n.a,
l = i * n.c,
h = i * n.b,
c = s * r.a - l * r.b,
f = s * r.c - l * r.d,
d = u * r.b - h * r.a,
p = u * r.d - h * r.c;
if (this.ashearX = 0, this.ascaleX = Math.sqrt(c * c + d * d), this.ascaleX > 1e-4) {
var v = c * p - f * d;
this.ascaleY = v / this.ascaleX, this.ashearY = Math.atan2(c * f + d * p, v) * t.MathUtils.radDeg, this.arotation = Math.atan2(d, c) * t.MathUtils.radDeg
} else this.ascaleX = 0, this.ascaleY = Math.sqrt(f * f + p * p), this.ashearY = 0, this.arotation = 90 - Math.atan2(p, f) * t.MathUtils.radDeg
}, e.prototype.worldToLocal = function(t) {
var e = this.matrix,
r = e.a,
n = e.c,
i = e.b,
o = e.d,
a = 1 / (r * o - n * i),
s = t.x - e.tx,
u = t.y - e.ty;
return t.x = s * o * a - u * n * a, t.y = u * r * a - s * i * a, t
}, e.prototype.localToWorld = function(t) {
var e = this.matrix,
r = t.x,
n = t.y;
return t.x = r * e.a + n * e.c + e.tx, t.y = r * e.b + n * e.d + e.ty, t
}, e.prototype.worldToLocalRotation = function(e) {
var r = t.MathUtils.sinDeg(e),
n = t.MathUtils.cosDeg(e),
i = this.matrix;
return Math.atan2(i.a * r - i.b * n, i.d * n - i.c * r) * t.MathUtils.radDeg
}, e.prototype.localToWorldRotation = function(e) {
var r = t.MathUtils.sinDeg(e),
n = t.MathUtils.cosDeg(e),
i = this.matrix;
return Math.atan2(n * i.b + r * i.d, n * i.a + r * i.c) * t.MathUtils.radDeg
}, e.prototype.rotateWorld = function(e) {
var r = this.matrix,
n = r.a,
i = r.c,
o = r.b,
a = r.d,
s = t.MathUtils.cosDeg(e),
u = t.MathUtils.sinDeg(e);
r.a = s * n - u * o, r.c = s * i - u * a, r.b = u * n + s * o, r.d = u * i + s * a, this.appliedValid = !1
}, e.yDown = !1, e
}();
t.Bone = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e, r = function() {
return function(t, r, n) {
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, t < 0) throw new Error("index must be >= 0.");
if (null == r) throw new Error("name cannot be null.");
this.index = t, this.name = r, this.parent = n
}
}();
t.BoneData = r,
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 = {}))
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t, e) {
if (null == e) throw new Error("data cannot be null.");
this.time = t, this.data = e
}
}();
t.Event = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t) {
this.name = t
}
}();
t.EventData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t, e) {
if (this.mix = 1, this.bendDirection = 0, 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.bendDirection = t.bendDirection, this.bones = new Array;
for (var r = 0; r < t.bones.length; r++) this.bones.push(e.findBone(t.bones[r].name));
this.target = e.findBone(t.target.name)
}
return e.prototype.getOrder = function() {
return this.data.order
}, e.prototype.apply = function() {
this.update()
}, e.prototype.update = function() {
var t = this.target,
e = this.bones;
switch (e.length) {
case 1:
this.apply1(e[0], t.worldX, t.worldY, this.mix);
break;
case 2:
this.apply2(e[0], e[1], t.worldX, t.worldY, this.bendDirection, this.mix)
}
}, e.prototype.apply1 = function(e, r, n, i) {
e.appliedValid || e.updateAppliedTransform();
var o = e.parent.matrix,
a = 1 / (o.a * o.d - o.b * o.c),
s = r - o.tx,
u = n - o.ty,
l = (s * o.d - u * o.c) * a - e.ax,
h = (u * o.a - s * o.b) * a - e.ay,
c = Math.atan2(h, l) * t.MathUtils.radDeg - e.ashearX - e.arotation;
e.ascaleX < 0 && (c += 180), c > 180 ? c -= 360 : c < -180 && (c += 360), e.updateWorldTransformWith(e.ax, e.ay, e.arotation + c * i, e.ascaleX, e.ascaleY, e.ashearX, e.ashearY)
}, e.prototype.apply2 = function(e, r, n, i, o, a) {
if (0 != a) {
e.appliedValid || e.updateAppliedTransform(), r.appliedValid || r.updateAppliedTransform();
var s = e.ax,
u = e.ay,
l = e.ascaleX,
h = e.ascaleY,
c = r.ascaleX,
f = e.matrix,
d = 0,
p = 0,
v = 0;
l < 0 ? (l = -l, d = 180, v = -1) : (d = 0, v = 1), h < 0 && (h = -h, v = -v), c < 0 ? (c = -c, p = 180) : p = 0;
var y = r.ax,
g = 0,
m = 0,
_ = 0,
b = f.a,
x = f.c,
w = f.b,
T = f.d,
E = Math.abs(l - h) <= 1e-4;
E ? (m = b * y + x * (g = r.ay) + f.tx, _ = w * y + T * g + f.ty) : (g = 0, m = b * y + f.tx, _ = w * y + f.ty);
var S = e.parent.matrix;
b = S.a, x = S.c, w = S.b;
var M = 1 / (b * (T = S.d) - x * w),
P = n - S.tx,
O = i - S.ty,
C = (P * T - O * x) * M - s,
A = (O * b - P * w) * M - u,
R = ((P = m - S.tx) * T - (O = _ - S.ty) * x) * M - s,
I = (O * b - P * w) * M - u,
D = Math.sqrt(R * R + I * I),
k = r.data.length * c,
N = 0,
L = 0;
t: if (E) {
var j = (C * C + A * A - D * D - (k *= l) * k) / (2 * D * k);
j < -1 ? j = -1 : j > 1 && (j = 1), L = Math.acos(j) * o, b = D + k * j, x = k * Math.sin(L), N = Math.atan2(A * b - C * x, C * b + A * x)
} else {
var F = (b = l * k) * b,
B = (x = h * k) * x,
U = C * C + A * A,
X = Math.atan2(A, C),
V = -2 * B * D,
W = B - F;
if ((T = V * V - 4 * W * (w = B * D * D + F * U - F * B)) >= 0) {
var Y = Math.sqrt(T);
V < 0 && (Y = -Y);
var G = (Y = -(V + Y) / 2) / W,
H = w / Y,
z = Math.abs(G) < Math.abs(H) ? G : H;
if (z * z <= U) {
O = Math.sqrt(U - z * z) * o, N = X - Math.atan2(O, z), L = Math.atan2(O / h, (z - D) / l);
break t
}
}
var q = t.MathUtils.PI,
Z = D - b,
K = Z * Z,
J = 0,
Q = 0,
$ = D + b,
tt = $ * $,
et = 0;
(w = -b * D / (F - B)) >= -1 && w <= 1 && (w = Math.acos(w), (T = (P = b * Math.cos(w) + D) * P + (O = x * Math.sin(w)) * O) < K && (q = w, K = T, Z = P, J = O), T > tt && (Q = w, tt = T, $ = P, et = O)), U <= (K + tt) / 2 ? (N = X - Math.atan2(J * o, Z), L = q * o) : (N = X - Math.atan2(et * o, $), L = Q * o)
}
var rt = Math.atan2(g, y) * v,
nt = e.arotation;
(N = (N - rt) * t.MathUtils.radDeg + d - nt) > 180 ? N -= 360 : N < -180 && (N += 360), e.updateWorldTransformWith(s, u, nt + N * a, e.ascaleX, e.ascaleY, 0, 0), nt = r.arotation, (L = ((L + rt) * t.MathUtils.radDeg - r.ashearX) * v + p - nt) > 180 ? L -= 360 : L < -180 && (L += 360), r.updateWorldTransformWith(y, g, nt + L * a, r.ascaleX, r.ascaleY, r.ashearX, r.ashearY)
} else r.updateWorldTransform()
}, e
}();
t.IkConstraint = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t) {
this.order = 0, this.bones = new Array, this.bendDirection = 1, this.mix = 1, this.name = t
}
}();
t.IkConstraintData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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, 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 r = 0, n = t.bones.length; r < n; r++) this.bones.push(e.findBone(t.bones[r].name));
this.target = e.findSlot(t.target.name), this.position = t.position, this.spacing = t.spacing, this.rotateMix = t.rotateMix, this.translateMix = t.translateMix
}
return e.prototype.apply = function() {
this.update()
}, e.prototype.update = function() {
var e = this.target.getAttachment();
if (e instanceof t.PathAttachment) {
var r = this.rotateMix,
n = this.translateMix,
i = r > 0;
if (n > 0 || i) {
var o = this.data,
a = o.spacingMode,
s = a == t.SpacingMode.Length,
u = o.rotateMode,
l = u == t.RotateMode.Tangent,
h = u == t.RotateMode.ChainScale,
c = this.bones.length,
f = l ? c : c + 1,
d = this.bones,
p = t.Utils.setArraySize(this.spaces, f),
v = null,
y = this.spacing;
if (h || s) {
h && (v = t.Utils.setArraySize(this.lengths, c));
for (var g = 0, m = f - 1; g < m;) {
var _ = (C = d[g]).data.length,
b = _ * C.matrix.a,
x = _ * C.matrix.b,
w = Math.sqrt(b * b + x * x);
h && (v[g] = w), p[++g] = (s ? _ + y : y) * w / _
}
} else
for (g = 1; g < f; g++) p[g] = y;
var T = this.computeWorldPositions(e, f, l, o.positionMode == t.PositionMode.Percent, a == t.SpacingMode.Percent),
E = T[0],
S = T[1],
M = o.offsetRotation,
P = !1;
if (0 == M) P = u == t.RotateMode.Chain;
else P = !1, M *= (O = this.target.bone.matrix).a * O.d - O.b * O.c > 0 ? t.MathUtils.degRad : -t.MathUtils.degRad;
g = 0;
for (var O = 3; g < c; g++, O += 3) {
var C, A = (C = d[g]).matrix;
A.tx += (E - A.tx) * n, A.ty += (S - A.ty) * n;
var R = (b = T[O]) - E,
I = (x = T[O + 1]) - S;
if (h) {
var D = v[g];
if (0 != D) {
var k = (Math.sqrt(R * R + I * I) / D - 1) * r + 1;
A.a *= k, A.b *= k
}
}
if (E = b, S = x, i) {
var N = A.a,
L = A.c,
j = A.b,
F = A.d,
B = 0,
U = 0,
X = 0;
if (B = l ? T[O - 1] : 0 == p[g + 1] ? T[O + 2] : Math.atan2(I, R), B -= Math.atan2(j, N), P) {
U = Math.cos(B), X = Math.sin(B);
var V = C.data.length;
E += (V * (U * N - X * j) - R) * r, S += (V * (X * N + U * j) - I) * r
} else B += M;
B > t.MathUtils.PI ? B -= t.MathUtils.PI2 : B < -t.MathUtils.PI && (B += t.MathUtils.PI2), B *= r, U = Math.cos(B), X = Math.sin(B), A.a = U * N - X * j, A.c = U * L - X * F, A.b = X * N + U * j, A.d = X * L + U * F
}
C.appliedValid = !1
}
}
}
}, e.prototype.computeWorldPositions = function(r, n, i, o, a) {
var s = this.target,
u = this.position,
l = this.spaces,
h = t.Utils.setArraySize(this.positions, 3 * n + 2),
c = null,
f = r.closed,
d = r.worldVerticesLength,
p = d / 6,
v = e.NONE;
if (!r.constantSpeed) {
var y = r.lengths,
g = y[p -= f ? 1 : 2];
if (o && (u *= g), a)
for (var m = 0; m < n; m++) l[m] *= g;
c = t.Utils.setArraySize(this.world, 8);
m = 0;
for (var _ = 0, b = 0; m < n; m++, _ += 3) {
var x = u += G = l[m];
if (f)(x %= g) < 0 && (x += g), b = 0;
else {
if (x < 0) {
v != e.BEFORE && (v = e.BEFORE, r.computeWorldVertices(s, 2, 4, c, 0, 2)), this.addBeforePosition(x, c, 0, h, _);
continue
}
if (x > g) {
v != e.AFTER && (v = e.AFTER, r.computeWorldVertices(s, d - 6, 4, c, 0, 2)), this.addAfterPosition(x - g, c, 0, h, _);
continue
}
}
for (;; b++) {
var w = y[b];
if (!(x > w)) {
if (0 == b) x /= w;
else x = (x - (Z = y[b - 1])) / (w - Z);
break
}
}
b != v && (v = b, f && b == p ? (r.computeWorldVertices(s, d - 4, 4, c, 0, 2), r.computeWorldVertices(s, 0, 4, c, 4, 2)) : r.computeWorldVertices(s, 6 * b + 2, 8, c, 0, 2)), this.addCurvePosition(x, c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], h, _, i || m > 0 && 0 == G)
}
return h
}
f ? (d += 2, c = t.Utils.setArraySize(this.world, d), r.computeWorldVertices(s, 2, d - 4, c, 0, 2), r.computeWorldVertices(s, 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), r.computeWorldVertices(s, 2, d, c, 0, 2));
for (var T = t.Utils.setArraySize(this.curves, p), E = 0, S = c[0], M = c[1], P = 0, O = 0, C = 0, A = 0, R = 0, I = 0, D = 0, k = 0, N = 0, L = 0, j = 0, F = 0, B = 0, U = 0, X = (m = 0, 2); m < p; m++, X += 6) P = c[X], O = c[X + 1], C = c[X + 2], A = c[X + 3], j = 2 * (D = .1875 * (S - 2 * P + C)) + (N = .09375 * (3 * (P - C) - S + (R = c[X + 4]))), F = 2 * (k = .1875 * (M - 2 * O + A)) + (L = .09375 * (3 * (O - A) - M + (I = c[X + 5]))), B = .75 * (P - S) + D + .16666667 * N, U = .75 * (O - M) + k + .16666667 * L, E += Math.sqrt(B * B + U * U), B += j, U += F, j += N, F += L, E += Math.sqrt(B * B + U * U), B += j, U += F, E += Math.sqrt(B * B + U * U), B += j + N, U += F + L, E += Math.sqrt(B * B + U * U), T[m] = E, S = R, M = I;
if (o && (u *= E), a)
for (m = 0; m < n; m++) l[m] *= E;
for (var V = this.segments, W = 0, Y = (m = 0, _ = 0, b = 0, 0); m < n; m++, _ += 3) {
var G;
x = u += G = l[m];
if (f)(x %= E) < 0 && (x += E), b = 0;
else {
if (x < 0) {
this.addBeforePosition(x, c, 0, h, _);
continue
}
if (x > E) {
this.addAfterPosition(x - E, c, d - 4, h, _);
continue
}
}
for (;; b++) {
var H = T[b];
if (!(x > H)) {
if (0 == b) x /= H;
else x = (x - (Z = T[b - 1])) / (H - Z);
break
}
}
if (b != v) {
v = b;
var z = 6 * b;
for (S = c[z], M = c[z + 1], P = c[z + 2], O = c[z + 3], C = c[z + 4], A = c[z + 5], j = 2 * (D = .03 * (S - 2 * P + C)) + (N = .006 * (3 * (P - C) - S + (R = c[z + 6]))), F = 2 * (k = .03 * (M - 2 * O + A)) + (L = .006 * (3 * (O - A) - M + (I = c[z + 7]))), B = .3 * (P - S) + D + .16666667 * N, U = .3 * (O - M) + k + .16666667 * L, W = Math.sqrt(B * B + U * U), V[0] = W, z = 1; z < 8; z++) B += j, U += F, j += N, F += L, W += Math.sqrt(B * B + U * U), V[z] = W;
B += j, U += F, W += Math.sqrt(B * B + U * U), V[8] = W, B += j + N, U += F + L, W += Math.sqrt(B * B + U * U), V[9] = W, Y = 0
}
for (x *= W;; Y++) {
var q = V[Y];
if (!(x > q)) {
var Z;
if (0 == Y) x /= q;
else x = Y + (x - (Z = V[Y - 1])) / (q - Z);
break
}
}
this.addCurvePosition(.1 * x, S, M, P, O, C, A, R, I, h, _, i || m > 0 && 0 == G)
}
return h
}, e.prototype.addBeforePosition = function(t, e, r, n, i) {
var o = e[r],
a = e[r + 1],
s = e[r + 2] - o,
u = e[r + 3] - a,
l = Math.atan2(u, s);
n[i] = o + t * Math.cos(l), n[i + 1] = a + t * Math.sin(l), n[i + 2] = l
}, e.prototype.addAfterPosition = function(t, e, r, n, i) {
var o = e[r + 2],
a = e[r + 3],
s = o - e[r],
u = a - e[r + 1],
l = Math.atan2(u, s);
n[i] = o + t * Math.cos(l), n[i + 1] = a + t * Math.sin(l), n[i + 2] = l
}, e.prototype.addCurvePosition = function(t, e, r, n, i, o, a, s, u, l, h, c) {
(0 == t || isNaN(t)) && (t = 1e-4);
var f = t * t,
d = f * t,
p = 1 - t,
v = p * p,
y = v * p,
g = p * t,
m = 3 * g,
_ = p * m,
b = m * t,
x = e * y + n * _ + o * b + s * d,
w = r * y + i * _ + a * b + u * d;
l[h] = x, l[h + 1] = w, c && (l[h + 2] = Math.atan2(w - (r * v + i * g * 2 + a * f), x - (e * v + n * g * 2 + o * f)))
}, e.prototype.getOrder = function() {
return this.data.order
}, e.NONE = -1, e.BEFORE = -2, e.AFTER = -3, e
}();
t.PathConstraint = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t) {
this.order = 0, this.bones = new Array, this.name = t
}
}();
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 = {}))
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(e) {
if (this._updateCache = new Array, this.updateCacheReset = new Array, this.time = 0, this.flipX = !1, this.flipY = !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 r = 0; r < e.bones.length; r++) {
var n = e.bones[r],
i = void 0;
if (null == n.parent) i = new t.Bone(n, this, null);
else {
var o = this.bones[n.parent.index];
i = new t.Bone(n, this, o), o.children.push(i)
}
this.bones.push(i)
}
this.slots = new Array, this.drawOrder = new Array;
for (r = 0; r < e.slots.length; r++) {
var a = e.slots[r],
s = (i = this.bones[a.boneData.index], new t.Slot(a, i));
this.slots.push(s), this.drawOrder.push(s)
}
this.ikConstraints = new Array;
for (r = 0; r < e.ikConstraints.length; r++) {
var u = e.ikConstraints[r];
this.ikConstraints.push(new t.IkConstraint(u, this))
}
this.transformConstraints = new Array;
for (r = 0; r < e.transformConstraints.length; r++) {
var l = e.transformConstraints[r];
this.transformConstraints.push(new t.TransformConstraint(l, this))
}
this.pathConstraints = new Array;
for (r = 0; r < e.pathConstraints.length; r++) {
var h = e.pathConstraints[r];
this.pathConstraints.push(new t.PathConstraint(h, this))
}
this.color = new t.Color(1, 1, 1, 1), this.updateCache()
}
return e.prototype.updateCache = function() {
this._updateCache.length = 0, this.updateCacheReset.length = 0;
for (var t = this.bones, e = 0, r = t.length; e < r; e++) t[e].sorted = !1;
var n = this.ikConstraints,
i = this.transformConstraints,
o = this.pathConstraints,
a = n.length,
s = i.length,
u = o.length,
l = a + s + u;
t: for (e = 0; e < l; e++) {
for (var h = 0; h < a; h++) {
if ((c = n[h]).data.order == e) {
this.sortIkConstraint(c);
continue t
}
}
for (h = 0; h < s; h++) {
if ((c = i[h]).data.order == e) {
this.sortTransformConstraint(c);
continue t
}
}
for (h = 0; h < u; h++) {
var c;
if ((c = o[h]).data.order == e) {
this.sortPathConstraint(c);
continue t
}
}
}
for (e = 0, r = t.length; e < r; e++) this.sortBone(t[e])
}, e.prototype.sortIkConstraint = function(t) {
var e = t.target;
this.sortBone(e);
var r = t.bones,
n = r[0];
if (this.sortBone(n), r.length > 1) {
var i = r[r.length - 1];
this._updateCache.indexOf(i) > -1 || this.updateCacheReset.push(i)
}
this._updateCache.push(t), this.sortReset(n.children), r[r.length - 1].sorted = !0
}, e.prototype.sortPathConstraint = function(e) {
var r = e.target,
n = r.data.index,
i = r.bone;
null != this.skin && this.sortPathConstraintAttachment(this.skin, n, i), null != this.data.defaultSkin && this.data.defaultSkin != this.skin && this.sortPathConstraintAttachment(this.data.defaultSkin, n, i);
for (var o = 0, a = this.data.skins.length; o < a; o++) this.sortPathConstraintAttachment(this.data.skins[o], n, i);
var s = r.getAttachment();
s instanceof t.PathAttachment && this.sortPathConstraintAttachmentWith(s, i);
var u = e.bones,
l = u.length;
for (o = 0; o < l; o++) this.sortBone(u[o]);
this._updateCache.push(e);
for (o = 0; o < l; o++) this.sortReset(u[o].children);
for (o = 0; o < l; o++) u[o].sorted = !0
}, e.prototype.sortTransformConstraint = function(t) {
this.sortBone(t.target);
var e = t.bones,
r = e.length;
if (t.data.local)
for (var n = 0; n < r; n++) {
var i = e[n];
this.sortBone(i.parent), this._updateCache.indexOf(i) > -1 || this.updateCacheReset.push(i)
} else
for (n = 0; n < r; n++) this.sortBone(e[n]);
this._updateCache.push(t);
for (var o = 0; o < r; o++) this.sortReset(e[o].children);
for (o = 0; o < r; o++) e[o].sorted = !0
}, e.prototype.sortPathConstraintAttachment = function(t, e, r) {
var n = t.attachments[e];
if (n)
for (var i in n) this.sortPathConstraintAttachmentWith(n[i], r)
}, e.prototype.sortPathConstraintAttachmentWith = function(e, r) {
if (e instanceof t.PathAttachment) {
var n = e.bones;
if (null == n) this.sortBone(r);
else
for (var i = this.bones, o = 0; o < n.length;)
for (var a = n[o++], s = o + a; o < s; o++) {
var u = n[o];
this.sortBone(i[u])
}
}
}, e.prototype.sortBone = function(t) {
if (!t.sorted) {
var e = t.parent;
null != e && this.sortBone(e), t.sorted = !0, this._updateCache.push(t)
}
}, e.prototype.sortReset = function(t) {
for (var e = 0, r = t.length; e < r; e++) {
var n = t[e];
n.sorted && this.sortReset(n.children), n.sorted = !1
}
}, e.prototype.updateWorldTransform = function() {
for (var t = this.updateCacheReset, e = 0, r = t.length; e < r; e++) {
var n = t[e];
n.ax = n.x, n.ay = n.y, n.arotation = n.rotation, n.ascaleX = n.scaleX, n.ascaleY = n.scaleY, n.ashearX = n.shearX, n.ashearY = n.shearY, n.appliedValid = !0
}
var i = this._updateCache;
for (e = 0, r = i.length; e < r; e++) i[e].update()
}, e.prototype.setToSetupPose = function() {
this.setBonesToSetupPose(), this.setSlotsToSetupPose()
}, e.prototype.setBonesToSetupPose = function() {
for (var t = this.bones, e = 0, r = t.length; e < r; e++) t[e].setToSetupPose();
var n = this.ikConstraints;
for (e = 0, r = n.length; e < r; e++) {
(s = n[e]).bendDirection = s.data.bendDirection, s.mix = s.data.mix
}
var i = this.transformConstraints;
for (e = 0, r = i.length; e < r; e++) {
var o = (s = i[e]).data;
s.rotateMix = o.rotateMix, s.translateMix = o.translateMix, s.scaleMix = o.scaleMix, s.shearMix = o.shearMix
}
var a = this.pathConstraints;
for (e = 0, r = a.length; e < r; e++) {
var s;
o = (s = a[e]).data;
s.position = o.position, s.spacing = o.spacing, s.rotateMix = o.rotateMix, s.translateMix = o.translateMix
}
}, e.prototype.setSlotsToSetupPose = function() {
var e = this.slots;
t.Utils.arrayCopy(e, 0, this.drawOrder, 0, e.length);
for (var r = 0, n = e.length; r < n; r++) e[r].setToSetupPose()
}, e.prototype.getRootBone = function() {
return 0 == this.bones.length ? null : this.bones[0]
}, e.prototype.findBone = function(t) {
if (null == t) throw new Error("boneName cannot be null.");
for (var e = this.bones, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.data.name == t) return i
}
return null
}, e.prototype.findBoneIndex = function(t) {
if (null == t) throw new Error("boneName cannot be null.");
for (var e = this.bones, r = 0, n = e.length; r < n; r++)
if (e[r].data.name == t) return r;
return -1
}, e.prototype.findSlot = function(t) {
if (null == t) throw new Error("slotName cannot be null.");
for (var e = this.slots, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.data.name == t) return i
}
return null
}, e.prototype.findSlotIndex = function(t) {
if (null == t) throw new Error("slotName cannot be null.");
for (var e = this.slots, r = 0, n = e.length; r < n; r++)
if (e[r].data.name == t) return r;
return -1
}, e.prototype.setSkinByName = function(t) {
var e = this.data.findSkin(t);
if (null == e) throw new Error("Skin not found: " + t);
this.setSkin(e)
}, e.prototype.setSkin = function(t) {
if (null != t)
if (null != this.skin) t.attachAll(this, this.skin);
else
for (var e = this.slots, r = 0, n = e.length; r < n; r++) {
var i = e[r],
o = i.data.attachmentName;
if (null != o) {
var a = t.getAttachment(r, o);
null != a && i.setAttachment(a)
}
}
this.skin = t
}, e.prototype.getAttachmentByName = function(t, e) {
return this.getAttachment(this.data.findSlotIndex(t), e)
}, e.prototype.getAttachment = function(t, e) {
if (null == e) throw new Error("attachmentName cannot be null.");
if (null != this.skin) {
var r = this.skin.getAttachment(t, e);
if (null != r) return r
}
return null != this.data.defaultSkin ? this.data.defaultSkin.getAttachment(t, e) : null
}, e.prototype.setAttachment = function(t, e) {
if (null == t) throw new Error("slotName cannot be null.");
for (var r = this.slots, n = 0, i = r.length; n < i; n++) {
var o = r[n];
if (o.data.name == t) {
var a = null;
if (null != e && null == (a = this.getAttachment(n, e))) throw new Error("Attachment not found: " + e + ", for slot: " + t);
return void o.setAttachment(a)
}
}
throw new Error("Slot not found: " + t)
}, e.prototype.findIkConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.ikConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.data.name == t) return i
}
return null
}, e.prototype.findTransformConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.transformConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.data.name == t) return i
}
return null
}, e.prototype.findPathConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.pathConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.data.name == t) return i
}
return null
}, e.prototype.getBounds = function(e, r, n) {
if (null == e) throw new Error("offset cannot be null.");
if (null == r) throw new Error("size cannot be null.");
for (var i = this.drawOrder, o = Number.POSITIVE_INFINITY, a = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, l = 0, h = i.length; l < h; l++) {
var c = i[l],
f = 0,
d = null,
p = c.getAttachment();
if (p instanceof t.RegionAttachment) f = 8, d = t.Utils.setArraySize(n, f, 0), p.computeWorldVertices(c.bone, d, 0, 2);
else if (p instanceof t.MeshAttachment) {
var v = p;
f = v.worldVerticesLength, d = t.Utils.setArraySize(n, f, 0), v.computeWorldVertices(c, 0, f, d, 0, 2)
}
if (null != d)
for (var y = 0, g = d.length; y < g; y += 2) {
var m = d[y],
_ = d[y + 1];
o = Math.min(o, m), a = Math.min(a, _), s = Math.max(s, m), u = Math.max(u, _)
}
}
e.set(o, a), r.set(s - o, u - a)
}, e.prototype.update = function(t) {
this.time += t
}, e
}();
t.Skeleton = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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, r) {
if (null == e) throw new Error("skeleton cannot be null.");
var n = this.boundingBoxes,
i = this.polygons,
o = this.polygonPool,
a = e.slots,
s = a.length;
n.length = 0, o.freeAll(i), i.length = 0;
for (var u = 0; u < s; u++) {
var l = a[u],
h = l.getAttachment();
if (h instanceof t.BoundingBoxAttachment) {
var c = h;
n.push(c);
var f = o.obtain();
f.length != c.worldVerticesLength && (f = t.Utils.newFloatArray(c.worldVerticesLength)), i.push(f), c.computeWorldVertices(l, 0, c.worldVerticesLength, f, 0, 2)
}
}
r ? this.aabbCompute() : (this.minX = Number.POSITIVE_INFINITY, this.minY = Number.POSITIVE_INFINITY, this.maxX = Number.NEGATIVE_INFINITY, this.maxY = Number.NEGATIVE_INFINITY)
}, e.prototype.aabbCompute = function() {
for (var t = Number.POSITIVE_INFINITY, e = Number.POSITIVE_INFINITY, r = Number.NEGATIVE_INFINITY, n = Number.NEGATIVE_INFINITY, i = this.polygons, o = 0, a = i.length; o < a; o++)
for (var s = i[o], u = s, l = 0, h = s.length; l < h; l += 2) {
var c = u[l],
f = u[l + 1];
t = Math.min(t, c), e = Math.min(e, f), r = Math.max(r, c), n = Math.max(n, f)
}
this.minX = t, this.minY = e, this.maxX = r, this.maxY = n
}, e.prototype.aabbContainsPoint = function(t, e) {
return t >= this.minX && t <= this.maxX && e >= this.minY && e <= this.maxY
}, e.prototype.aabbIntersectsSegment = function(t, e, r, n) {
var i = this.minX,
o = this.minY,
a = this.maxX,
s = this.maxY;
if (t <= i && r <= i || e <= o && n <= o || t >= a && r >= a || e >= s && n >= s) return !1;
var u = (n - e) / (r - t),
l = u * (i - t) + e;
if (l > o && l < s) return !0;
if ((l = u * (a - t) + e) > o && l < s) return !0;
var h = (o - e) / u + t;
return h > i && h < a || (h = (s - e) / u + t) > i && h < a
}, e.prototype.aabbIntersectsSkeleton = function(t) {
return this.minX < t.maxX && this.maxX > t.minX && this.minY < t.maxY && this.maxY > t.minY
}, e.prototype.containsPoint = function(t, e) {
for (var r = this.polygons, n = 0, i = r.length; n < i; n++)
if (this.containsPointPolygon(r[n], t, e)) return this.boundingBoxes[n];
return null
}, e.prototype.containsPointPolygon = function(t, e, r) {
for (var n = t, i = t.length, o = i - 2, a = !1, s = 0; s < i; s += 2) {
var u = n[s + 1],
l = n[o + 1];
if (u < r && l >= r || l < r && u >= r) {
var h = n[s];
h + (r - u) / (l - u) * (n[o] - h) < e && (a = !a)
}
o = s
}
return a
}, e.prototype.intersectsSegment = function(t, e, r, n) {
for (var i = this.polygons, o = 0, a = i.length; o < a; o++)
if (this.intersectsSegmentPolygon(i[o], t, e, r, n)) return this.boundingBoxes[o];
return null
}, e.prototype.intersectsSegmentPolygon = function(t, e, r, n, i) {
for (var o = t, a = t.length, s = e - n, u = r - i, l = e * i - r * n, h = o[a - 2], c = o[a - 1], f = 0; f < a; f += 2) {
var d = o[f],
p = o[f + 1],
v = h * p - c * d,
y = h - d,
g = c - p,
m = s * g - u * y,
_ = (l * y - s * v) / m;
if ((_ >= h && _ <= d || _ >= d && _ <= h) && (_ >= e && _ <= n || _ >= n && _ <= e)) {
var b = (l * g - u * v) / m;
if ((b >= c && b <= p || b >= p && b <= c) && (b >= r && b <= i || b >= i && b <= r)) return !0
}
h = 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
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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(r, n) {
if (null != this.clipAttachment) return 0;
this.clipAttachment = n;
var i = n.worldVerticesLength,
o = t.Utils.setArraySize(this.clippingPolygon, i);
n.computeWorldVertices(r, 0, i, o, 0, 2);
var a = this.clippingPolygon;
e.makeClockwise(a);
for (var s = this.clippingPolygons = this.triangulator.decompose(a, this.triangulator.triangulate(a)), u = 0, l = s.length; u < l; u++) {
var h = s[u];
e.makeClockwise(h), h.push(h[0]), h.push(h[1])
}
return s.length
}, e.prototype.clipEndWithSlot = function(t) {
null != this.clipAttachment && this.clipAttachment.endSlot == t.data && this.clipEnd()
}, e.prototype.clipEnd = function() {
null != this.clipAttachment && (this.clipAttachment = null, this.clippingPolygons = null, this.clippedVertices.length = 0, this.clippedTriangles.length = 0, this.clippingPolygon.length = 0)
}, e.prototype.isClipping = function() {
return null != this.clipAttachment
}, e.prototype.clipTriangles = function(e, r, n, i, o, a, s, u) {
var l = this.clipOutput,
h = this.clippedVertices,
c = this.clippedTriangles,
f = this.clippingPolygons,
d = this.clippingPolygons.length,
p = u ? 12 : 8,
v = 0;
h.length = 0, c.length = 0;
t: for (var y = 0; y < i; y += 3)
for (var g = n[y] << 1, m = e[g], _ = e[g + 1], b = o[g], x = o[g + 1], w = e[g = n[y + 1] << 1], T = e[g + 1], E = o[g], S = o[g + 1], M = e[g = n[y + 2] << 1], P = e[g + 1], O = o[g], C = o[g + 1], A = 0; A < d; A++) {
var R = h.length;
if (!this.clip(m, _, w, T, M, P, f[A], l)) {
(U = t.Utils.setArraySize(h, R + 3 * p))[R] = m, U[R + 1] = _, U[R + 2] = a.r, U[R + 3] = a.g, U[R + 4] = a.b, U[R + 5] = a.a, u ? (U[R + 6] = b, U[R + 7] = x, U[R + 8] = s.r, U[R + 9] = s.g, U[R + 10] = s.b, U[R + 11] = s.a, U[R + 12] = w, U[R + 13] = T, U[R + 14] = a.r, U[R + 15] = a.g, U[R + 16] = a.b, U[R + 17] = a.a, U[R + 18] = E, U[R + 19] = S, U[R + 20] = s.r, U[R + 21] = s.g, U[R + 22] = s.b, U[R + 23] = s.a, U[R + 24] = M, U[R + 25] = P, U[R + 26] = a.r, U[R + 27] = a.g, U[R + 28] = a.b, U[R + 29] = a.a, U[R + 30] = O, U[R + 31] = C, U[R + 32] = s.r, U[R + 33] = s.g, U[R + 34] = s.b, U[R + 35] = s.a) : (U[R + 6] = b, U[R + 7] = x, U[R + 8] = w, U[R + 9] = T, U[R + 10] = a.r, U[R + 11] = a.g, U[R + 12] = a.b, U[R + 13] = a.a, U[R + 14] = E, U[R + 15] = S, U[R + 16] = M, U[R + 17] = P, U[R + 18] = a.r, U[R + 19] = a.g, U[R + 20] = a.b, U[R + 21] = a.a, U[R + 22] = O, U[R + 23] = C), R = c.length, (Z = t.Utils.setArraySize(c, R + 3))[R] = v, Z[R + 1] = v + 1, Z[R + 2] = v + 2, v += 3;
continue t
}
var I = l.length;
if (0 != I) {
for (var D = T - P, k = M - w, N = m - M, L = P - _, j = 1 / (D * N + k * (_ - P)), F = I >> 1, B = this.clipOutput, U = t.Utils.setArraySize(h, R + F * p), X = 0; X < I; X += 2) {
var V = B[X],
W = B[X + 1];
U[R] = V, U[R + 1] = W, U[R + 2] = a.r, U[R + 3] = a.g, U[R + 4] = a.b, U[R + 5] = a.a;
var Y = V - M,
G = W - P,
H = (D * Y + k * G) * j,
z = (L * Y + N * G) * j,
q = 1 - H - z;
U[R + 6] = b * H + E * z + O * q, U[R + 7] = x * H + S * z + C * q, u && (U[R + 8] = s.r, U[R + 9] = s.g, U[R + 10] = s.b, U[R + 11] = s.a), R += p
}
R = c.length;
var Z = t.Utils.setArraySize(c, R + 3 * (F - 2));
F--;
for (X = 1; X < F; X++) Z[R] = v, Z[R + 1] = v + X, Z[R + 2] = v + X + 1, R += 3;
v += F + 1
}
}
}, e.prototype.clip = function(t, e, r, n, i, o, a, s) {
var u = s,
l = !1,
h = null;
a.length % 4 >= 2 ? (h = s, s = this.scratch) : h = this.scratch, h.length = 0, h.push(t), h.push(e), h.push(r), h.push(n), h.push(i), h.push(o), h.push(t), h.push(e), s.length = 0;
for (var c = a, f = a.length - 4, d = 0;; d += 2) {
for (var p = c[d], v = c[d + 1], y = c[d + 2], g = c[d + 3], m = p - y, _ = v - g, b = h, x = h.length - 2, w = s.length, T = 0; T < x; T += 2) {
var E = b[T],
S = b[T + 1],
M = b[T + 2],
P = b[T + 3],
O = m * (P - g) - _ * (M - y) > 0;
if (m * (S - g) - _ * (E - y) > 0) {
if (O) {
s.push(M), s.push(P);
continue
}
var C = ((R = M - E) * (v - S) - (A = P - S) * (p - E)) / (A * (y - p) - R * (g - v));
s.push(p + (y - p) * C), s.push(v + (g - v) * C)
} else if (O) {
var A, R;
C = ((R = M - E) * (v - S) - (A = P - S) * (p - E)) / (A * (y - p) - R * (g - v));
s.push(p + (y - p) * C), s.push(v + (g - v) * C), s.push(M), s.push(P)
}
l = !0
}
if (w == s.length) return u.length = 0, !0;
if (s.push(s[0]), s.push(s[1]), d == f) break;
var I = s;
(s = h).length = 0, h = I
}
if (u != s) {
u.length = 0;
d = 0;
for (var D = s.length - 2; d < D; d++) u[d] = s[d]
} else u.length = u.length - 2;
return l
}, e.makeClockwise = function(t) {
for (var e = t, r = t.length, n = e[r - 2] * e[1] - e[0] * e[r - 1], i = 0, o = 0, a = 0, s = 0, u = r - 3; s < u; s += 2) i = e[s], o = e[s + 1], a = e[s + 2], n += i * e[s + 3] - a * o;
if (!(n < 0)) {
s = 0;
var l = r - 2;
for (u = r >> 1; s < u; s += 2) {
var h = e[s],
c = e[s + 1],
f = l - s;
e[s] = e[f], e[s + 1] = e[f + 1], e[f] = h, e[f + 1] = c
}
}
}, e
}();
t.SkeletonClipping = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function t() {
this.bones = new Array, this.slots = new Array, this.skins = new Array, this.events = new Array, this.animations = new Array, this.ikConstraints = new Array, this.transformConstraints = new Array, this.pathConstraints = new Array, this.fps = 0
}
return t.prototype.findBone = function(t) {
if (null == t) throw new Error("boneName cannot be null.");
for (var e = this.bones, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findBoneIndex = function(t) {
if (null == t) throw new Error("boneName cannot be null.");
for (var e = this.bones, r = 0, n = e.length; r < n; r++)
if (e[r].name == t) return r;
return -1
}, t.prototype.findSlot = function(t) {
if (null == t) throw new Error("slotName cannot be null.");
for (var e = this.slots, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findSlotIndex = function(t) {
if (null == t) throw new Error("slotName cannot be null.");
for (var e = this.slots, r = 0, n = e.length; r < n; r++)
if (e[r].name == t) return r;
return -1
}, t.prototype.findSkin = function(t) {
if (null == t) throw new Error("skinName cannot be null.");
for (var e = this.skins, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findEvent = function(t) {
if (null == t) throw new Error("eventDataName cannot be null.");
for (var e = this.events, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findAnimation = function(t) {
if (null == t) throw new Error("animationName cannot be null.");
for (var e = this.animations, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findIkConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.ikConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findTransformConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.transformConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findPathConstraint = function(t) {
if (null == t) throw new Error("constraintName cannot be null.");
for (var e = this.pathConstraints, r = 0, n = e.length; r < n; r++) {
var i = e[r];
if (i.name == t) return i
}
return null
}, t.prototype.findPathConstraintIndex = function(t) {
if (null == t) throw new Error("pathConstraintName cannot be null.");
for (var e = this.pathConstraints, r = 0, n = e.length; r < n; r++)
if (e[r].name == t) return r;
return -1
}, t
}();
t.SkeletonData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t) {
this.scale = 1, this.linkedMeshes = new Array, this.attachmentLoader = t
}
return e.prototype.readSkeletonData = function(r) {
var n = this.scale,
i = new t.SkeletonData,
o = "string" == typeof r ? JSON.parse(r) : r,
a = o.skeleton;
if (null != a && (i.hash = a.hash, i.version = a.spine, i.width = a.width, i.height = a.height, i.fps = a.fps, i.imagesPath = a.images), o.bones)
for (var s = 0; s < o.bones.length; s++) {
var u = o.bones[s],
l = null,
h = this.getValue(u, "parent", null);
if (null != h && null == (l = i.findBone(h))) throw new Error("Parent bone not found: " + h);
(p = new t.BoneData(i.bones.length, u.name, l)).length = this.getValue(u, "length", 0) * n, p.x = this.getValue(u, "x", 0) * n, p.y = this.getValue(u, "y", 0) * n, p.rotation = this.getValue(u, "rotation", 0), p.scaleX = this.getValue(u, "scaleX", 1), p.scaleY = this.getValue(u, "scaleY", 1), p.shearX = this.getValue(u, "shearX", 0), p.shearY = this.getValue(u, "shearY", 0), p.transformMode = e.transformModeFromString(this.getValue(u, "transform", "normal")), i.bones.push(p)
}
if (o.slots)
for (s = 0; s < o.slots.length; s++) {
var c = (S = o.slots[s]).name,
f = S.bone,
d = i.findBone(f);
if (null == d) throw new Error("Slot bone not found: " + f);
var p = new t.SlotData(i.slots.length, c, d),
v = this.getValue(S, "color", null);
null != v && p.color.setFromString(v);
var y = this.getValue(S, "dark", null);
null != y && (p.darkColor = new t.Color(1, 1, 1, 1), p.darkColor.setFromString(y)), p.attachmentName = this.getValue(S, "attachment", null), p.blendMode = e.blendModeFromString(this.getValue(S, "blend", "normal")), i.slots.push(p)
}
if (o.ik)
for (s = 0; s < o.ik.length; s++) {
var g = o.ik[s];
(p = new t.IkConstraintData(g.name)).order = this.getValue(g, "order", 0);
for (var m = 0; m < g.bones.length; m++) {
f = g.bones[m];
if (null == (b = i.findBone(f))) throw new Error("IK bone not found: " + f);
p.bones.push(b)
}
var _ = g.target;
if (p.target = i.findBone(_), null == p.target) throw new Error("IK target bone not found: " + _);
p.bendDirection = this.getValue(g, "bendPositive", !0) ? 1 : -1, p.mix = this.getValue(g, "mix", 1), i.ikConstraints.push(p)
}
if (o.transform)
for (s = 0; s < o.transform.length; s++) {
g = o.transform[s];
(p = new t.TransformConstraintData(g.name)).order = this.getValue(g, "order", 0);
for (m = 0; m < g.bones.length; m++) {
f = g.bones[m];
if (null == (b = i.findBone(f))) throw new Error("Transform constraint bone not found: " + f);
p.bones.push(b)
}
_ = g.target;
if (p.target = i.findBone(_), null == p.target) throw new Error("Transform constraint target bone not found: " + _);
p.local = this.getValue(g, "local", !1), p.relative = this.getValue(g, "relative", !1), p.offsetRotation = this.getValue(g, "rotation", 0), p.offsetX = this.getValue(g, "x", 0) * n, p.offsetY = this.getValue(g, "y", 0) * n, p.offsetScaleX = this.getValue(g, "scaleX", 0), p.offsetScaleY = this.getValue(g, "scaleY", 0), p.offsetShearY = this.getValue(g, "shearY", 0), p.rotateMix = this.getValue(g, "rotateMix", 1), p.translateMix = this.getValue(g, "translateMix", 1), p.scaleMix = this.getValue(g, "scaleMix", 1), p.shearMix = this.getValue(g, "shearMix", 1), i.transformConstraints.push(p)
}
if (o.path)
for (s = 0; s < o.path.length; s++) {
g = o.path[s];
(p = new t.PathConstraintData(g.name)).order = this.getValue(g, "order", 0);
for (m = 0; m < g.bones.length; m++) {
var b;
f = g.bones[m];
if (null == (b = i.findBone(f))) throw new Error("Transform constraint bone not found: " + f);
p.bones.push(b)
}
_ = g.target;
if (p.target = i.findSlot(_), null == p.target) throw new Error("Path target slot not found: " + _);
p.positionMode = e.positionModeFromString(this.getValue(g, "positionMode", "percent")), p.spacingMode = e.spacingModeFromString(this.getValue(g, "spacingMode", "length")), p.rotateMode = e.rotateModeFromString(this.getValue(g, "rotateMode", "tangent")), p.offsetRotation = this.getValue(g, "rotation", 0), p.position = this.getValue(g, "position", 0), p.positionMode == t.PositionMode.Fixed && (p.position *= n), p.spacing = this.getValue(g, "spacing", 0), p.spacingMode != t.SpacingMode.Length && p.spacingMode != t.SpacingMode.Fixed || (p.spacing *= n), p.rotateMix = this.getValue(g, "rotateMix", 1), p.translateMix = this.getValue(g, "translateMix", 1), i.pathConstraints.push(p)
}
if (o.skins)
for (var x in o.skins) {
var w = o.skins[x],
T = new t.Skin(x);
for (var c in w) {
var E = i.findSlotIndex(c);
if (-1 == E) throw new Error("Slot not found: " + c);
var S = w[c];
for (var M in S) {
var P = this.readAttachment(S[M], T, E, M, i);
null != P && T.addAttachment(E, M, P)
}
}
i.skins.push(T), "default" == T.name && (i.defaultSkin = T)
}
s = 0;
for (var O = this.linkedMeshes.length; s < O; s++) {
var C = this.linkedMeshes[s];
if (null == (T = null == C.skin ? i.defaultSkin : i.findSkin(C.skin))) throw new Error("Skin not found: " + C.skin);
var A = T.getAttachment(C.slotIndex, C.parent);
if (null == A) throw new Error("Parent mesh not found: " + C.parent);
C.mesh.setParentMesh(A)
}
if (this.linkedMeshes.length = 0, o.events)
for (var R in o.events) {
var I = o.events[R];
(p = new t.EventData(R)).intValue = this.getValue(I, "int", 0), p.floatValue = this.getValue(I, "float", 0), p.stringValue = this.getValue(I, "string", ""), i.events.push(p)
}
if (o.animations)
for (var D in o.animations) {
var k = o.animations[D];
this.readAnimation(k, D, i)
}
return i
}, e.prototype.readAttachment = function(e, n, i, o, a) {
var s = this.scale;
switch (o = this.getValue(e, "name", o), this.getValue(e, "type", "region")) {
case "region":
var u = this.getValue(e, "path", o),
l = this.attachmentLoader.newRegionAttachment(n, o, u);
return null == l ? null : (l.path = u, l.x = this.getValue(e, "x", 0) * s, l.y = this.getValue(e, "y", 0) * s, l.scaleX = this.getValue(e, "scaleX", 1), l.scaleY = this.getValue(e, "scaleY", 1), l.rotation = this.getValue(e, "rotation", 0), l.width = e.width * s, l.height = e.height * s, null != (x = this.getValue(e, "color", null)) && l.color.setFromString(x), l);
case "boundingbox":
var h = this.attachmentLoader.newBoundingBoxAttachment(n, o);
return null == h ? null : (this.readVertices(e, h, e.vertexCount << 1), null != (x = this.getValue(e, "color", null)) && h.color.setFromString(x), h);
case "mesh":
case "linkedmesh":
u = this.getValue(e, "path", o);
var c = this.attachmentLoader.newMeshAttachment(n, o, u);
if (null == c) return null;
c.path = u, null != (x = this.getValue(e, "color", null)) && c.color.setFromString(x);
var f = this.getValue(e, "parent", null);
if (null != f) return c.inheritDeform = this.getValue(e, "deform", !0), this.linkedMeshes.push(new r(c, this.getValue(e, "skin", null), i, f)), c;
var d = e.uvs;
return this.readVertices(e, c, d.length), c.triangles = e.triangles, c.regionUVs = d, c.hullLength = 2 * this.getValue(e, "hull", 0), c;
case "path":
if (null == (u = this.attachmentLoader.newPathAttachment(n, o))) return null;
u.closed = this.getValue(e, "closed", !1), u.constantSpeed = this.getValue(e, "constantSpeed", !0);
var p = e.vertexCount;
this.readVertices(e, u, p << 1);
for (var v = t.Utils.newArray(p / 3, 0), y = 0; y < e.lengths.length; y++) v[y] = e.lengths[y] * s;
return u.lengths = v, null != (x = this.getValue(e, "color", null)) && u.color.setFromString(x), u;
case "point":
var g = this.attachmentLoader.newPointAttachment(n, o);
return null == g ? null : (g.x = this.getValue(e, "x", 0) * s, g.y = this.getValue(e, "y", 0) * s, g.rotation = this.getValue(e, "rotation", 0), null != (x = this.getValue(e, "color", null)) && g.color.setFromString(x), g);
case "clipping":
var m = this.attachmentLoader.newClippingAttachment(n, o);
if (null == m) return null;
var _ = this.getValue(e, "end", null);
if (null != _) {
var b = a.findSlot(_);
if (null == b) throw new Error("Clipping end slot not found: " + _);
m.endSlot = b
}
var x;
p = e.vertexCount;
return this.readVertices(e, m, p << 1), null != (x = this.getValue(e, "color", null)) && m.color.setFromString(x), m
}
return null
}, e.prototype.readVertices = function(e, r, n) {
var i = this.scale;
r.worldVerticesLength = n;
var o = e.vertices;
if (n != o.length) {
var a = new Array,
s = new Array;
for (c = 0, f = o.length; c < f;) {
var u = o[c++];
s.push(u);
for (var l = c + 4 * u; c < l; c += 4) s.push(o[c]), a.push(o[c + 1] * i), a.push(o[c + 2] * i), a.push(o[c + 3])
}
r.bones = s, r.vertices = t.Utils.toFloatArray(a)
} else {
var h = t.Utils.toFloatArray(o);
if (1 != i)
for (var c = 0, f = o.length; c < f; c++) h[c] *= i;
r.vertices = h
}
}, e.prototype.readAnimation = function(e, r, n) {
var i = this.scale,
o = new Array,
a = 0;
if (e.slots)
for (var s in e.slots) {
var u = e.slots[s];
if (-1 == (Z = n.findSlotIndex(s))) throw new Error("Slot not found: " + s);
for (var l in u) {
var h = u[l];
if ("attachment" == l) {
(b = new t.AttachmentTimeline(h.length)).slotIndex = Z;
for (var c = 0, f = 0; f < h.length; f++) {
var d = h[f];
b.setFrame(c++, d.time, d.name)
}
o.push(b), a = Math.max(a, b.frames[b.getFrameCount() - 1])
} else if ("color" == l) {
(b = new t.ColorTimeline(h.length)).slotIndex = Z;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
var p = new t.Color;
p.setFromString(d.color || "ffffffff"), b.setFrame(c, d.time, p.r, p.g, p.b, p.a), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.ColorTimeline.ENTRIES])
} else {
if ("twoColor" != l) throw new Error("Invalid timeline type for a slot: " + l + " (" + s + ")");
(b = new t.TwoColorTimeline(h.length)).slotIndex = Z;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
var v = new t.Color,
y = new t.Color;
v.setFromString(d.light), y.setFromString(d.dark), b.setFrame(c, d.time, v.r, v.g, v.b, v.a, y.r, y.g, y.b), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.TwoColorTimeline.ENTRIES])
}
}
}
if (e.bones)
for (var g in e.bones) {
var m = e.bones[g],
_ = n.findBoneIndex(g);
if (-1 == _) throw new Error("Bone not found: " + g);
for (var l in m) {
h = m[l];
if ("rotate" === l) {
(b = new t.RotateTimeline(h.length)).boneIndex = _;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
b.setFrame(c, d.time, d.angle), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.RotateTimeline.ENTRIES])
} else {
if ("translate" !== l && "scale" !== l && "shear" !== l) throw new Error("Invalid timeline type for a bone: " + l + " (" + g + ")");
var b = null,
x = 1;
"scale" === l ? b = new t.ScaleTimeline(h.length) : "shear" === l ? b = new t.ShearTimeline(h.length) : (b = new t.TranslateTimeline(h.length), x = i), b.boneIndex = _;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
var w = this.getValue(d, "x", 0),
T = this.getValue(d, "y", 0);
b.setFrame(c, d.time, w * x, T * x), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.TranslateTimeline.ENTRIES])
}
}
}
if (e.ik)
for (var E in e.ik) {
var S = e.ik[E],
M = n.findIkConstraint(E);
(b = new t.IkConstraintTimeline(S.length)).ikConstraintIndex = n.ikConstraints.indexOf(M);
for (c = 0, f = 0; f < S.length; f++) {
d = S[f];
b.setFrame(c, d.time, this.getValue(d, "mix", 1), this.getValue(d, "bendPositive", !0) ? 1 : -1), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.IkConstraintTimeline.ENTRIES])
}
if (e.transform)
for (var E in e.transform) {
S = e.transform[E], M = n.findTransformConstraint(E);
(b = new t.TransformConstraintTimeline(S.length)).transformConstraintIndex = n.transformConstraints.indexOf(M);
for (c = 0, f = 0; f < S.length; f++) {
d = S[f];
b.setFrame(c, d.time, this.getValue(d, "rotateMix", 1), this.getValue(d, "translateMix", 1), this.getValue(d, "scaleMix", 1), this.getValue(d, "shearMix", 1)), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.TransformConstraintTimeline.ENTRIES])
}
if (e.paths)
for (var E in e.paths) {
S = e.paths[E];
var P = n.findPathConstraintIndex(E);
if (-1 == P) throw new Error("Path constraint not found: " + E);
var O = n.pathConstraints[P];
for (var l in S) {
h = S[l];
if ("position" === l || "spacing" === l) {
b = null, x = 1;
"spacing" === l ? (b = new t.PathConstraintSpacingTimeline(h.length), O.spacingMode != t.SpacingMode.Length && O.spacingMode != t.SpacingMode.Fixed || (x = i)) : (b = new t.PathConstraintPositionTimeline(h.length), O.positionMode == t.PositionMode.Fixed && (x = i)), b.pathConstraintIndex = P;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
b.setFrame(c, d.time, this.getValue(d, l, 0) * x), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.PathConstraintPositionTimeline.ENTRIES])
} else if ("mix" === l) {
(b = new t.PathConstraintMixTimeline(h.length)).pathConstraintIndex = P;
for (c = 0, f = 0; f < h.length; f++) {
d = h[f];
b.setFrame(c, d.time, this.getValue(d, "rotateMix", 1), this.getValue(d, "translateMix", 1)), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[(b.getFrameCount() - 1) * t.PathConstraintMixTimeline.ENTRIES])
}
}
}
if (e.deform)
for (var C in e.deform) {
var A = e.deform[C],
R = n.findSkin(C);
if (null == R) throw new Error("Skin not found: " + C);
for (var s in A) {
u = A[s];
if (-1 == (Z = n.findSlotIndex(s))) throw new Error("Slot not found: " + u.name);
for (var l in u) {
h = u[l];
var I = R.getAttachment(Z, l);
if (null == I) throw new Error("Deform attachment not found: " + h.name);
var D = null != I.bones,
k = I.vertices,
N = D ? k.length / 3 * 2 : k.length;
(b = new t.DeformTimeline(h.length)).slotIndex = Z, b.attachment = I;
c = 0;
for (var L = 0; L < h.length; L++) {
d = h[L];
var j = void 0,
F = this.getValue(d, "vertices", null);
if (null == F) j = D ? t.Utils.newFloatArray(N) : k;
else {
j = t.Utils.newFloatArray(N);
var B = this.getValue(d, "offset", 0);
if (t.Utils.arrayCopy(F, 0, j, B, F.length), 1 != i)
for (var U = (f = B) + F.length; f < U; f++) j[f] *= i;
if (!D)
for (f = 0; f < N; f++) j[f] += k[f]
}
b.setFrame(c, d.time, j), this.readCurve(d, b, c), c++
}
o.push(b), a = Math.max(a, b.frames[b.getFrameCount() - 1])
}
}
}
var X = e.drawOrder;
if (null == X && (X = e.draworder), null != X) {
b = new t.DrawOrderTimeline(X.length);
var V = n.slots.length;
for (c = 0, L = 0; L < X.length; L++) {
var W = X[L],
Y = null,
G = this.getValue(W, "offsets", null);
if (null != G) {
Y = t.Utils.newArray(V, -1);
var H = t.Utils.newArray(V - G.length, 0),
z = 0,
q = 0;
for (f = 0; f < G.length; f++) {
var Z, K = G[f];
if (-1 == (Z = n.findSlotIndex(K.slot))) throw new Error("Slot not found: " + K.slot);
for (; z != Z;) H[q++] = z++;
Y[z + K.offset] = z++
}
for (; z < V;) H[q++] = z++;
for (f = V - 1; f >= 0; f--) - 1 == Y[f] && (Y[f] = H[--q])
}
b.setFrame(c++, W.time, Y)
}
o.push(b), a = Math.max(a, b.frames[b.getFrameCount() - 1])
}
if (e.events) {
for (b = new t.EventTimeline(e.events.length), c = 0, f = 0; f < e.events.length; f++) {
var J = e.events[f],
Q = n.findEvent(J.name);
if (null == Q) throw new Error("Event not found: " + J.name);
var $ = new t.Event(t.Utils.toSinglePrecision(J.time), Q);
$.intValue = this.getValue(J, "int", Q.intValue), $.floatValue = this.getValue(J, "float", Q.floatValue), $.stringValue = this.getValue(J, "string", Q.stringValue), b.setFrame(c++, $)
}
o.push(b), a = Math.max(a, b.frames[b.getFrameCount() - 1])
}
if (isNaN(a)) throw new Error("Error while parsing animation, duration is NaN");
n.animations.push(new t.Animation(r, o, a))
}, e.prototype.readCurve = function(t, e, r) {
if (t.curve)
if ("stepped" === t.curve) e.setStepped(r);
else if ("[object Array]" === Object.prototype.toString.call(t.curve)) {
var n = t.curve;
e.setCurve(r, n[0], n[1], n[2], n[3])
}
}, e.prototype.getValue = function(t, e, r) {
return void 0 !== t[e] ? t[e] : r
}, e.blendModeFromString = function(e) {
if ("normal" == (e = e.toLowerCase())) return t.BlendMode.Normal;
if ("additive" == e) return t.BlendMode.Additive;
if ("multiply" == e) return t.BlendMode.Multiply;
if ("screen" == e) return t.BlendMode.Screen;
throw new Error("Unknown blend mode: " + e)
}, e.positionModeFromString = function(e) {
if ("fixed" == (e = e.toLowerCase())) return t.PositionMode.Fixed;
if ("percent" == e) return t.PositionMode.Percent;
throw new Error("Unknown position mode: " + e)
}, e.spacingModeFromString = function(e) {
if ("length" == (e = e.toLowerCase())) return t.SpacingMode.Length;
if ("fixed" == e) return t.SpacingMode.Fixed;
if ("percent" == e) return t.SpacingMode.Percent;
throw new Error("Unknown position mode: " + e)
}, e.rotateModeFromString = function(e) {
if ("tangent" == (e = e.toLowerCase())) return t.RotateMode.Tangent;
if ("chain" == e) return t.RotateMode.Chain;
if ("chainscale" == e) return t.RotateMode.ChainScale;
throw new Error("Unknown rotate mode: " + e)
}, e.transformModeFromString = function(e) {
if ("normal" == (e = e.toLowerCase())) return t.TransformMode.Normal;
if ("onlytranslation" == e) return t.TransformMode.OnlyTranslation;
if ("norotationorreflection" == e) return t.TransformMode.NoRotationOrReflection;
if ("noscale" == e) return t.TransformMode.NoScale;
if ("noscaleorreflection" == e) return t.TransformMode.NoScaleOrReflection;
throw new Error("Unknown transform mode: " + e)
}, e
}();
t.SkeletonJson = e;
var r = function() {
return function(t, e, r, n) {
this.mesh = t, this.skin = e, this.slotIndex = r, this.parent = n
}
}()
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function t(t) {
if (this.attachments = new Array, null == t) throw new Error("name cannot be null.");
this.name = t
}
return t.prototype.addAttachment = function(t, e, r) {
if (null == r) throw new Error("attachment cannot be null.");
var n = this.attachments;
t >= n.length && (n.length = t + 1), n[t] || (n[t] = {}), n[t][e] = r
}, t.prototype.getAttachment = function(t, e) {
var r = this.attachments[t];
return r ? r[e] : null
}, t.prototype.attachAll = function(t, e) {
for (var r = 0, n = 0; n < t.slots.length; n++) {
var i = t.slots[n],
o = i.getAttachment();
if (o && r < e.attachments.length) {
var a = e.attachments[r];
for (var s in a) {
if (o == a[s]) {
var u = this.getAttachment(r, name);
null != u && i.setAttachment(u);
break
}
}
}
r++
}
}, t
}();
t.Skin = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(e, r) {
if (this.attachmentVertices = new Array, null == e) throw new Error("data cannot be null.");
if (null == r) throw new Error("bone cannot be null.");
this.data = e, this.bone = r, this.color = new t.Color, this.darkColor = null == e.darkColor ? null : new t.Color, this.setToSetupPose(), this.blendMode = this.data.blendMode
}
return e.prototype.getAttachment = function() {
return this.attachment
}, e.prototype.setAttachment = function(t) {
this.attachment != t && (this.attachment = t, this.attachmentTime = this.bone.skeleton.time, this.attachmentVertices.length = 0)
}, e.prototype.setAttachmentTime = function(t) {
this.attachmentTime = this.bone.skeleton.time - t
}, e.prototype.getAttachmentTime = function() {
return this.bone.skeleton.time - this.attachmentTime
}, e.prototype.setToSetupPose = function() {
this.color.setFromColor(this.data.color), null != this.darkColor && this.darkColor.setFromColor(this.data.darkColor), null == this.data.attachmentName ? this.attachment = null : (this.attachment = null, this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName)))
}, e
}();
t.Slot = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(e, r, n) {
if (this.color = new t.Color(1, 1, 1, 1), e < 0) throw new Error("index must be >= 0.");
if (null == r) throw new Error("name cannot be null.");
if (null == n) throw new Error("boneData cannot be null.");
this.index = e, this.name = r, this.boneData = n
}
}();
t.SlotData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e, r, 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 " + t)
}
}, t.wrapFromString = function(t) {
switch (t.toLowerCase()) {
case "mirroredtepeat":
return r.MirroredRepeat;
case "clamptoedge":
return r.ClampToEdge;
case "repeat":
return r.Repeat;
default:
throw new Error("Unknown texture wrap " + 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"
}(r = t.TextureWrap || (t.TextureWrap = {}));
var i = function() {
function t() {
this.size = null
}
return Object.defineProperty(t.prototype, "width", {
get: function() {
var t = this.texture;
return "3" == PIXI.VERSION[0] ? t.crop.width : t.trim ? t.trim.width : t.orig.width
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "height", {
get: function() {
var t = this.texture;
return "3" == PIXI.VERSION[0] ? t.crop.height : t.trim ? t.trim.height : t.orig.height
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "u", {
get: function() {
return this.texture._uvs.x0
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "v", {
get: function() {
return this.texture._uvs.y0
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "u2", {
get: function() {
return this.texture._uvs.x2
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "v2", {
get: function() {
return this.texture._uvs.y2
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "offsetX", {
get: function() {
var t = this.texture;
return t.trim ? t.trim.x : 0
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "offsetY", {
get: function() {
return console.warn("Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on."), this.spineOffsetY
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "pixiOffsetY", {
get: function() {
var t = this.texture;
return t.trim ? t.trim.y : 0
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "spineOffsetY", {
get: function() {
var t = this.texture;
return this.originalHeight - this.height - (t.trim ? t.trim.y : 0)
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "originalWidth", {
get: function() {
var t = this.texture;
return "3" == PIXI.VERSION[0] ? t.trim ? t.trim.width : t.crop.width : t.orig.width
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "originalHeight", {
get: function() {
var t = this.texture;
return "3" == PIXI.VERSION[0] ? t.trim ? t.trim.height : t.crop.height : t.orig.height
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "x", {
get: function() {
return this.texture.frame.x
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "y", {
get: function() {
return this.texture.frame.y
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t.prototype, "rotate", {
get: function() {
return 0 !== this.texture.rotate
},
enumerable: !0,
configurable: !0
}), t
}();
t.TextureRegion = i
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t, e, r) {
this.pages = new Array, this.regions = new Array, t && this.addSpineAtlas(t, e, r)
}
return e.prototype.addTexture = function(e, r) {
for (var o = this.pages, a = null, s = 0; s < o.length; s++)
if (o[s].baseTexture === r.baseTexture) {
a = o[s];
break
}
if (null === a) {
(a = new n).name = "texturePage";
var u = r.baseTexture;
a.width = u.realWidth, a.height = u.realHeight, a.baseTexture = u, a.minFilter = a.magFilter = t.TextureFilter.Nearest, a.uWrap = t.TextureWrap.ClampToEdge, a.vWrap = t.TextureWrap.ClampToEdge, o.push(a)
}
var l = new i;
return l.name = e, l.page = a, l.texture = r, l.index = -1, this.regions.push(l), l
}, e.prototype.addTextureHash = function(t, e) {
for (var r in t) t.hasOwnProperty(r) && this.addTexture(e && -1 !== r.indexOf(".") ? r.substr(0, r.lastIndexOf(".")) : r, t[r])
}, e.prototype.addSpineAtlas = function(t, e, r) {
return this.load(t, e, r)
}, e.prototype.load = function(e, o, a) {
var s = this;
if (null == o) throw new Error("textureLoader cannot be null.");
var u = new r(e),
l = new Array(4),
h = null,
c = function() {
for (;;) {
var e = u.readLine();
if (null == e) return a && a(s);
if (0 == (e = e.trim()).length) h = null;
else {
if (!h) {
(h = new n).name = e, 2 == u.readTuple(l) && (h.width = parseInt(l[0]), h.height = parseInt(l[1]), u.readTuple(l)), u.readTuple(l), h.minFilter = t.Texture.filterFromString(l[0]), h.magFilter = t.Texture.filterFromString(l[1]);
var r = u.readValue();
h.uWrap = t.TextureWrap.ClampToEdge, h.vWrap = t.TextureWrap.ClampToEdge, "x" == r ? h.uWrap = t.TextureWrap.Repeat : "y" == r ? h.vWrap = t.TextureWrap.Repeat : "xy" == r && (h.uWrap = h.vWrap = t.TextureWrap.Repeat), o(e, function(t) {
h.baseTexture = t, t.hasLoaded || (t.width = h.width, t.height = h.height), s.pages.push(h), h.setFilters(), h.width && h.height || (h.width = t.realWidth, h.height = t.realHeight, h.width && h.height || console.log("ERROR spine atlas page " + h.name + ": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")), c()
}), s.pages.push(h);
break
}
var f = new i;
f.name = e, f.page = h;
var d = "true" == u.readValue() ? 6 : 0;
u.readTuple(l);
var p = parseInt(l[0]),
v = parseInt(l[1]);
u.readTuple(l);
var y = parseInt(l[0]),
g = parseInt(l[1]),
m = h.baseTexture.resolution;
p /= m, v /= m, y /= m, g /= m;
var _ = new PIXI.Rectangle(p, v, d ? g : y, d ? y : g);
4 == u.readTuple(l) && 4 == u.readTuple(l) && u.readTuple(l);
var b = parseInt(l[0]) / m,
x = parseInt(l[1]) / m;
u.readTuple(l);
var w = parseInt(l[0]) / m,
T = parseInt(l[1]) / m,
E = new PIXI.Rectangle(0, 0, b, x),
S = new PIXI.Rectangle(w, x - g - T, y, g);
if ("3" != PIXI.VERSION[0]) f.texture = new PIXI.Texture(f.page.baseTexture, _, E, S, d);
else {
var M = new PIXI.Rectangle(p, v, y, g),
P = M.clone();
S.width = b, S.height = x, f.texture = new PIXI.Texture(f.page.baseTexture, M, P, S, d)
}
f.index = parseInt(u.readValue()), f.texture._updateUvs(), s.regions.push(f)
}
}
};
c()
}, e.prototype.findRegion = function(t) {
for (var e = 0; e < this.regions.length; e++)
if (this.regions[e].name == t) return this.regions[e];
return null
}, e.prototype.dispose = function() {
for (var t = 0; t < this.pages.length; t++) this.pages[t].baseTexture.dispose()
}, e
}();
t.TextureAtlas = e;
var r = function() {
function t(t) {
this.index = 0, this.lines = t.split(/\r\n|\r|\n/)
}
return t.prototype.readLine = function() {
return this.index >= 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(),
r = e.indexOf(":");
if (-1 == r) throw new Error("Invalid line: " + e);
for (var n = 0, i = r + 1; n < 3; n++) {
var o = e.indexOf(",", i);
if (-1 == o) break;
t[n] = e.substr(i, o - i).trim(), i = o + 1
}
return t[n] = e.substring(i).trim(), n + 1
}, t
}(),
n = function() {
function e() {}
return e.prototype.setFilters = function() {
var e = this.baseTexture,
r = this.minFilter;
r == t.TextureFilter.Linear ? e.scaleMode = PIXI.SCALE_MODES.LINEAR : this.minFilter == t.TextureFilter.Nearest ? e.scaleMode = PIXI.SCALE_MODES.NEAREST : (e.mipmap = !0, r == t.TextureFilter.MipMapNearestNearest ? e.scaleMode = PIXI.SCALE_MODES.NEAREST : e.scaleMode = PIXI.SCALE_MODES.LINEAR)
}, e
}();
t.TextureAtlasPage = n;
var i = function(t) {
function e() {
return null !== t && t.apply(this, arguments) || this
}
return o(e, t), e
}(t.TextureRegion);
t.TextureAtlasRegion = i
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(e, r) {
if (this.rotateMix = 0, this.translateMix = 0, this.scaleMix = 0, this.shearMix = 0, this.temp = new t.Vector2, null == e) throw new Error("data cannot be null.");
if (null == r) 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; n < e.bones.length; n++) this.bones.push(r.findBone(e.bones[n].name));
this.target = r.findBone(e.target.name)
}
return e.prototype.apply = function() {
this.update()
}, e.prototype.update = function() {
this.data.local ? this.data.relative ? this.applyRelativeLocal() : this.applyAbsoluteLocal() : this.data.relative ? this.applyRelativeWorld() : this.applyAbsoluteWorld()
}, e.prototype.applyAbsoluteWorld = function() {
for (var e = this.rotateMix, r = this.translateMix, n = this.scaleMix, i = this.shearMix, o = this.target, a = o.matrix, s = a.a, u = a.c, l = a.b, h = a.d, c = s * h - u * l > 0 ? t.MathUtils.degRad : -t.MathUtils.degRad, f = this.data.offsetRotation * c, d = this.data.offsetShearY * c, p = this.bones, v = 0, y = p.length; v < y; v++) {
var g = p[v],
m = !1,
_ = g.matrix;
if (0 != e) {
var b = _.a,
x = _.c,
w = _.b,
T = _.d;
(C = Math.atan2(l, s) - Math.atan2(w, b) + f) > t.MathUtils.PI ? C -= t.MathUtils.PI2 : C < -t.MathUtils.PI && (C += t.MathUtils.PI2), C *= e;
var E = Math.cos(C),
S = Math.sin(C);
_.a = E * b - S * w, _.c = E * x - S * T, _.b = S * b + E * w, _.d = S * x + E * T, m = !0
}
if (0 != r) {
var M = this.temp;
o.localToWorld(M.set(this.data.offsetX, this.data.offsetY)), _.tx += (M.x - _.tx) * r, _.ty += (M.y - _.ty) * r, m = !0
}
if (n > 0) {
var P = Math.sqrt(_.a * _.a + _.b * _.b),
O = Math.sqrt(s * s + l * l);
P > 1e-5 && (P = (P + (O - P + this.data.offsetScaleX) * n) / P), _.a *= P, _.b *= P, P = Math.sqrt(_.c * _.c + _.d * _.d), O = Math.sqrt(u * u + h * h), P > 1e-5 && (P = (P + (O - P + this.data.offsetScaleY) * n) / P), _.c *= P, _.d *= P, m = !0
}
if (i > 0) {
x = _.c, T = _.d;
var C, A = Math.atan2(T, x);
(C = Math.atan2(h, u) - Math.atan2(l, s) - (A - Math.atan2(_.b, _.a))) > t.MathUtils.PI ? C -= t.MathUtils.PI2 : C < -t.MathUtils.PI && (C += t.MathUtils.PI2), C = A + (C + d) * i;
P = Math.sqrt(x * x + T * T);
_.c = Math.cos(C) * P, _.d = Math.sin(C) * P, m = !0
}
m && (g.appliedValid = !1)
}
}, e.prototype.applyRelativeWorld = function() {
for (var e = this.rotateMix, r = this.translateMix, n = this.scaleMix, i = this.shearMix, o = this.target, a = o.matrix, s = a.a, u = a.c, l = a.b, h = a.d, c = s * h - u * l > 0 ? t.MathUtils.degRad : -t.MathUtils.degRad, f = this.data.offsetRotation * c, d = this.data.offsetShearY * c, p = this.bones, v = 0, y = p.length; v < y; v++) {
var g = p[v],
m = !1,
_ = g.matrix;
if (0 != e) {
var b = _.a,
x = _.c,
w = _.b,
T = _.d;
(O = Math.atan2(l, s) + f) > t.MathUtils.PI ? O -= t.MathUtils.PI2 : O < -t.MathUtils.PI && (O += t.MathUtils.PI2), O *= e;
var E = Math.cos(O),
S = Math.sin(O);
_.a = E * b - S * w, _.c = E * x - S * T, _.b = S * b + E * w, _.d = S * x + E * T, m = !0
}
if (0 != r) {
var M = this.temp;
o.localToWorld(M.set(this.data.offsetX, this.data.offsetY)), _.tx += M.x * r, _.ty += M.y * r, m = !0
}
if (n > 0) {
var P = (Math.sqrt(s * s + l * l) - 1 + this.data.offsetScaleX) * n + 1;
_.a *= P, _.b *= P, P = (Math.sqrt(u * u + h * h) - 1 + this.data.offsetScaleY) * n + 1, _.c *= P, _.d *= P, m = !0
}
if (i > 0) {
var O;
(O = Math.atan2(h, u) - Math.atan2(l, s)) > t.MathUtils.PI ? O -= t.MathUtils.PI2 : O < -t.MathUtils.PI && (O += t.MathUtils.PI2);
x = _.c, T = _.d;
O = Math.atan2(T, x) + (O - t.MathUtils.PI / 2 + d) * i;
P = Math.sqrt(x * x + T * T);
_.c = Math.cos(O) * P, _.d = Math.sin(O) * P, m = !0
}
m && (g.appliedValid = !1)
}
}, e.prototype.applyAbsoluteLocal = function() {
var t = this.rotateMix,
e = this.translateMix,
r = this.scaleMix,
n = this.shearMix,
i = this.target;
i.appliedValid || i.updateAppliedTransform();
for (var o = this.bones, a = 0, s = o.length; a < s; a++) {
var u = o[a];
u.appliedValid || u.updateAppliedTransform();
var l = u.arotation;
if (0 != t) {
var h = i.arotation - l + this.data.offsetRotation;
l += (h -= 360 * (16384 - (16384.499999999996 - h / 360 | 0))) * t
}
var c = u.ax,
f = u.ay;
0 != e && (c += (i.ax - c + this.data.offsetX) * e, f += (i.ay - f + this.data.offsetY) * e);
var d = u.ascaleX,
p = u.ascaleY;
r > 0 && (d > 1e-5 && (d = (d + (i.ascaleX - d + this.data.offsetScaleX) * r) / d), p > 1e-5 && (p = (p + (i.ascaleY - p + this.data.offsetScaleY) * r) / p));
var v = u.ashearY;
if (n > 0) {
h = i.ashearY - v + this.data.offsetShearY;
h -= 360 * (16384 - (16384.499999999996 - h / 360 | 0)), u.shearY += h * n
}
u.updateWorldTransformWith(c, f, l, d, p, u.ashearX, v)
}
}, e.prototype.applyRelativeLocal = function() {
var t = this.rotateMix,
e = this.translateMix,
r = this.scaleMix,
n = this.shearMix,
i = this.target;
i.appliedValid || i.updateAppliedTransform();
for (var o = this.bones, a = 0, s = o.length; a < s; a++) {
var u = o[a];
u.appliedValid || u.updateAppliedTransform();
var l = u.arotation;
0 != t && (l += (i.arotation + this.data.offsetRotation) * t);
var h = u.ax,
c = u.ay;
0 != e && (h += (i.ax + this.data.offsetX) * e, c += (i.ay + this.data.offsetY) * e);
var f = u.ascaleX,
d = u.ascaleY;
r > 0 && (f > 1e-5 && (f *= (i.ascaleX - 1 + this.data.offsetScaleX) * r + 1), d > 1e-5 && (d *= (i.ascaleY - 1 + this.data.offsetScaleY) * r + 1));
var p = u.ashearY;
n > 0 && (p += (i.ashearY + this.data.offsetShearY) * n), u.updateWorldTransformWith(h, c, l, f, d, u.ashearX, p)
}
}, e.prototype.getOrder = function() {
return this.data.order
}, e
}();
t.TransformConstraint = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t) {
if (this.order = 0, this.bones = new Array, this.rotateMix = 0, this.translateMix = 0, this.scaleMix = 0, this.shearMix = 0, this.offsetRotation = 0, this.offsetX = 0, this.offsetY = 0, this.offsetScaleX = 0, this.offsetScaleY = 0, this.offsetShearY = 0, this.relative = !1, this.local = !1, null == t) throw new Error("name cannot be null.");
this.name = t
}
}();
t.TransformConstraintData = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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 r = t,
n = t.length >> 1,
i = this.indicesArray;
i.length = 0;
for (var o = 0; o < n; o++) i[o] = o;
var a = this.isConcaveArray;
a.length = 0;
o = 0;
for (var s = n; o < s; ++o) a[o] = e.isConcave(o, n, r, i);
var u = this.triangles;
for (u.length = 0; n > 3;) {
for (var l = n - 1, h = (o = 0, 1);;) {
t: if (!a[o]) {
for (var c = i[l] << 1, f = i[o] << 1, d = i[h] << 1, p = r[c], v = r[c + 1], y = r[f], g = r[f + 1], m = r[d], _ = r[d + 1], b = (h + 1) % n; b != l; b = (b + 1) % n)
if (a[b]) {
var x = i[b] << 1,
w = r[x],
T = r[x + 1];
if (e.positiveArea(m, _, p, v, w, T) && e.positiveArea(p, v, y, g, w, T) && e.positiveArea(y, g, m, _, w, T)) break t
}
break
}if (0 == h) {
do {
if (!a[o]) break;
o--
} while (o > 0);
break
}
l = o,
o = h,
h = (h + 1) % n
}
u.push(i[(n + o - 1) % n]), u.push(i[o]), u.push(i[(o + 1) % n]), i.splice(o, 1), a.splice(o, 1);
var E = (--n + o - 1) % n,
S = o == n ? 0 : o;
a[E] = e.isConcave(E, n, r, i), a[S] = e.isConcave(S, n, r, i)
}
return 3 == n && (u.push(i[2]), u.push(i[0]), u.push(i[1])), u
}, e.prototype.decompose = function(t, r) {
var n = t,
i = this.convexPolygons;
this.polygonPool.freeAll(i), i.length = 0;
var o = this.convexPolygonsIndices;
this.polygonIndicesPool.freeAll(o), o.length = 0;
var a = this.polygonIndicesPool.obtain();
a.length = 0;
var s = this.polygonPool.obtain();
s.length = 0;
for (var u = -1, l = 0, h = 0, c = r.length; h < c; h += 3) {
var f = r[h] << 1,
d = r[h + 1] << 1,
p = r[h + 2] << 1,
v = n[f],
y = n[f + 1],
g = n[d],
m = n[d + 1],
_ = n[p],
b = n[p + 1],
x = !1;
if (u == f) {
var w = s.length - 4,
T = e.winding(s[w], s[w + 1], s[w + 2], s[w + 3], _, b),
E = e.winding(_, b, s[0], s[1], s[2], s[3]);
T == l && E == l && (s.push(_), s.push(b), a.push(p), x = !0)
}
x || (s.length > 0 ? (i.push(s), o.push(a)) : (this.polygonPool.free(s), this.polygonIndicesPool.free(a)), (s = this.polygonPool.obtain()).length = 0, s.push(v), s.push(y), s.push(g), s.push(m), s.push(_), s.push(b), (a = this.polygonIndicesPool.obtain()).length = 0, a.push(f), a.push(d), a.push(p), l = e.winding(v, y, g, m, _, b), u = f)
}
s.length > 0 && (i.push(s), o.push(a));
for (h = 0, c = i.length; h < c; h++)
if (0 != (a = o[h]).length)
for (var S = a[0], M = a[a.length - 1], P = (s = i[h])[w = s.length - 4], O = s[w + 1], C = s[w + 2], A = s[w + 3], R = s[0], I = s[1], D = s[2], k = s[3], N = e.winding(P, O, C, A, R, I), L = 0; L < c; L++)
if (L != h) {
var j = o[L];
if (3 == j.length) {
var F = j[0],
B = j[1],
U = j[2],
X = i[L];
_ = X[X.length - 2], b = X[X.length - 1];
if (F == S && B == M) {
T = e.winding(P, O, C, A, _, b), E = e.winding(_, b, R, I, D, k);
T == N && E == N && (X.length = 0, j.length = 0, s.push(_), s.push(b), a.push(U), P = C, O = A, C = _, A = b, L = 0)
}
}
}
for (h = i.length - 1; h >= 0; h--) 0 == (s = i[h]).length && (i.splice(h, 1), this.polygonPool.free(s), a = o[h], o.splice(h, 1), this.polygonIndicesPool.free(a));
return i
}, e.isConcave = function(t, e, r, n) {
var i = n[(e + t - 1) % e] << 1,
o = n[t] << 1,
a = n[(t + 1) % e] << 1;
return !this.positiveArea(r[i], r[i + 1], r[o], r[o + 1], r[a], r[a + 1])
}, e.positiveArea = function(t, e, r, n, i, o) {
return t * (o - n) + r * (e - o) + i * (n - e) >= 0
}, e.winding = function(t, e, r, n, i, o) {
var a = r - t,
s = n - e;
return i * s - o * a + a * e - t * s >= 0 ? 1 : -1
}, e
}();
t.Triangulator = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! 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 r = function() {
function t(t, e, r, n) {
void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === r && (r = 0), void 0 === n && (n = 0), this.r = t, this.g = e, this.b = r, this.a = n
}
return t.prototype.set = function(t, e, r, n) {
return this.r = t, this.g = e, this.b = r, 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, r, n) {
return this.r += t, this.g += e, this.b += r, 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.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 = r;
var n = function() {
function t() {}
return t.clamp = function(t, e, r) {
return t < e ? e : t > r ? r : 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, r) {
return t.randomTriangularWith(e, r, .5 * (e + r))
}, t.randomTriangularWith = function(t, e, r) {
var n = Math.random(),
i = e - t;
return n <= (r - t) / i ? t + Math.sqrt(n * i * (r - t)) : e - Math.sqrt((1 - n) * i * (e - r))
}, 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 i = function() {
function t() {}
return t.prototype.apply = function(t, e, r) {
return t + (e - t) * this.applyInternal(r)
}, t
}();
t.Interpolation = i;
var a = function(t) {
function e(e) {
var r = t.call(this) || this;
return r.power = 2, r.power = e, r
}
return o(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
}(i);
t.Pow = a;
var s = function(t) {
function e(e) {
return t.call(this, e) || this
}
return o(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 = s;
var u = function() {
function t() {}
return t.arrayCopy = function(t, e, r, n, i) {
for (var o = e, a = n; o < e + i; o++, a++) r[a] = t[o]
}, t.setArraySize = function(t, e, r) {
void 0 === r && (r = 0);
var n = t.length;
if (n == e) return t;
if (t.length = e, n < e)
for (var i = n; i < e; i++) t[i] = r;
return t
}, t.ensureArrayCapacity = function(e, r, n) {
return void 0 === n && (n = 0), e.length >= r ? e : t.setArraySize(e, r, n)
}, t.newArray = function(t, e) {
for (var r = new Array(t), n = 0; n < t; n++) r[n] = e;
return r
}, t.newFloatArray = function(e) {
if (t.SUPPORTS_TYPED_ARRAYS) return new Float32Array(e);
for (var r = new Array(e), n = 0; n < r.length; n++) r[n] = 0;
return r
}, t.newShortArray = function(e) {
if (t.SUPPORTS_TYPED_ARRAYS) return new Int16Array(e);
for (var r = new Array(e), n = 0; n < r.length; n++) r[n] = 0;
return r
}, t.toFloatArray = function(e) {
return t.SUPPORTS_TYPED_ARRAYS ? new Float32Array(e) : e
}, t.toSinglePrecision = function(e) {
return t.SUPPORTS_TYPED_ARRAYS ? Math.fround(e) : e
}, t.SUPPORTS_TYPED_ARRAYS = "undefined" != typeof Float32Array, t
}();
t.Utils = u;
var l = function() {
function t() {}
return t.logBones = function(t) {
for (var e = 0; e < t.bones.length; e++) {
var r = t.bones[e],
n = r.matrix;
console.log(r.data.name + ", " + n.a + ", " + n.b + ", " + n.c + ", " + n.d + ", " + n.tx + ", " + n.ty)
}
}, t
}();
t.DebugUtils = l;
var h = function() {
function t(t) {
this.items = new Array, this.instantiator = t
}
return t.prototype.obtain = function() {
return this.items.length > 0 ? 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; e < t.length; e++) t[e].reset && t[e].reset(), this.items[e] = t[e]
}, t.prototype.clear = function() {
this.items.length = 0
}, t
}();
t.Pool = h;
var c = function() {
function t(t, e) {
void 0 === t && (t = 0), void 0 === e && (e = 0), this.x = t, this.y = e
}
return t.prototype.set = function(t, e) {
return this.x = t, this.y = e, this
}, t.prototype.length = function() {
var t = this.x,
e = this.y;
return Math.sqrt(t * t + e * e)
}, t.prototype.normalize = function() {
var t = this.length();
return 0 != t && (this.x /= t, this.y /= t), this
}, t
}();
t.Vector2 = c;
var f = function() {
function t() {
this.maxDelta = .064, this.framesPerSecond = 0, this.delta = 0, this.totalTime = 0, this.lastTime = Date.now() / 1e3, this.frameCount = 0, this.frameTime = 0
}
return t.prototype.update = function() {
var t = Date.now() / 1e3;
this.delta = t - this.lastTime, this.frameTime += this.delta, this.totalTime += this.delta, this.delta > this.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.addedValues < this.values.length && this.addedValues++, this.values[this.lastValue++] = t, this.lastValue > this.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 < this.values.length; e++) t += this.values[e];
this.mean = t / this.values.length, this.dirty = !1
}
return this.mean
}
return 0
}, t
}();
t.WindowedMean = d
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
return function(t) {
if (null == t) throw new Error("name cannot be null.");
this.name = t
}
}();
t.Attachment = e;
var r = function(t) {
function e(r) {
var n = t.call(this, r) || this;
return n.id = (65535 & e.nextID++) << 11, n.worldVerticesLength = 0, n
}
return o(e, t), e.prototype.computeWorldVerticesOld = function(t, e) {
this.computeWorldVertices(t, 0, this.worldVerticesLength, e, 0, 2)
}, e.prototype.computeWorldVertices = function(t, e, r, n, i, o) {
r = i + (r >> 1) * o;
var a = t.bone.skeleton,
s = t.attachmentVertices,
u = this.vertices,
l = this.bones;
if (null != l) {
for (var h = 0, c = 0, f = 0; f < e; f += 2) {
h += (y = l[h]) + 1, c += y
}
var d = a.bones;
if (0 == s.length)
for (O = i, E = 3 * c; O < r; O += o) {
var p = 0,
v = 0,
y = l[h++];
for (y += h; h < y; h++, E += 3) {
b = d[l[h]].matrix, C = u[E], A = u[E + 1];
var g = u[E + 2];
p += (C * b.a + A * b.c + b.tx) * g, v += (C * b.b + A * b.d + b.ty) * g
}
n[O] = p, n[O + 1] = v
} else
for (var m = s, _ = (O = i, E = 3 * c, c << 1); O < r; O += o) {
p = 0, v = 0, y = l[h++];
for (y += h; h < y; h++, E += 3, _ += 2) {
b = d[l[h]].matrix, C = u[E] + m[_], A = u[E + 1] + m[_ + 1], g = u[E + 2];
p += (C * b.a + A * b.c + b.tx) * g, v += (C * b.b + A * b.d + b.ty) * g
}
n[O] = p, n[O + 1] = v
}
} else {
s.length > 0 && (u = s);
for (var b, x = (b = t.bone.matrix).tx, w = b.ty, T = b.a, E = b.c, S = b.b, M = b.d, P = e, O = i; O < r; P += 2, O += o) {
var C = u[P],
A = u[P + 1];
n[O] = C * T + A * E + x, n[O + 1] = C * S + A * M + w
}
}
}, e.prototype.applyDeform = function(t) {
return this == t
}, e.nextID = 0, e
}(e);
t.VertexAttachment = r
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
! function(t) {
t[t.Region = 0] = "Region", t[t.BoundingBox = 1] = "BoundingBox", t[t.Mesh = 2] = "Mesh", t[t.LinkedMesh = 3] = "LinkedMesh", t[t.Path = 4] = "Path", t[t.Point = 5] = "Point"
}(t.AttachmentType || (t.AttachmentType = {}))
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.color = new t.Color(1, 1, 1, 1), n
}
return o(r, e), r
}(t.VertexAttachment);
t.BoundingBoxAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.color = new t.Color(.2275, .2275, .8078, 1), n
}
return o(r, e), r
}(t.VertexAttachment);
t.ClippingAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.color = new t.Color(1, 1, 1, 1), n.inheritDeform = !1, n.tempColor = new t.Color(0, 0, 0, 0), n
}
return o(r, e), r.prototype.updateUVs = function(e, r) {
var n = this.regionUVs.length;
if (r && r.length == n || (r = t.Utils.newFloatArray(n)), null != e) {
for (var i = e.texture._uvs, o = e.width, a = e.height, s = e.originalWidth, u = e.originalHeight, l = e.offsetX, h = e.pixiOffsetY, c = 0; c < n; c += 2) {
var f = this.regionUVs[c],
d = this.regionUVs[c + 1];
f = (f * s - l) / o, d = (d * u - h) / a, r[c] = (i.x0 * (1 - f) + i.x1 * f) * (1 - d) + (i.x3 * (1 - f) + i.x2 * f) * d, r[c + 1] = (i.y0 * (1 - f) + i.y1 * f) * (1 - d) + (i.y3 * (1 - f) + i.y2 * f) * d
}
return r
}
}, r.prototype.applyDeform = function(t) {
return this == t || this.inheritDeform && this.parentMesh == t
}, r.prototype.getParentMesh = function() {
return this.parentMesh
}, r.prototype.setParentMesh = function(t) {
this.parentMesh = t, null != t && (this.bones = t.bones, this.vertices = t.vertices, this.worldVerticesLength = t.worldVerticesLength, this.regionUVs = t.regionUVs, this.triangles = t.triangles, this.hullLength = t.hullLength, this.worldVerticesLength = t.worldVerticesLength)
}, r
}(t.VertexAttachment);
t.MeshAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.closed = !1, n.constantSpeed = !1, n.color = new t.Color(1, 1, 1, 1), n
}
return o(r, e), r
}(t.VertexAttachment);
t.PathAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.color = new t.Color(.38, .94, 0, 1), n
}
return o(r, e), r.prototype.computeWorldPosition = function(t, e) {
var r = t.matrix;
return e.x = this.x * r.a + this.y * r.c + t.worldX, e.y = this.x * r.b + this.y * r.d + t.worldY, e
}, r.prototype.computeWorldRotation = function(e) {
var r = e.matrix,
n = t.MathUtils.cosDeg(this.rotation),
i = t.MathUtils.sinDeg(this.rotation),
o = n * r.a + i * r.c,
a = n * r.b + i * r.d;
return Math.atan2(a, o) * t.MathUtils.radDeg
}, r
}(t.VertexAttachment);
t.PointAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function(e) {
function r(r) {
var n = e.call(this, r) || this;
return n.x = 0, n.y = 0, n.scaleX = 1, n.scaleY = 1, n.rotation = 0, n.width = 0, n.height = 0, n.color = new t.Color(1, 1, 1, 1), n.offset = t.Utils.newFloatArray(8), n.uvs = t.Utils.newFloatArray(8), n.tempColor = new t.Color(1, 1, 1, 1), n
}
return o(r, e), r.prototype.updateOffset = function() {
var t = this.width / this.region.originalWidth * this.scaleX,
e = this.height / this.region.originalHeight * this.scaleY,
n = -this.width / 2 * this.scaleX + this.region.offsetX * t,
i = -this.height / 2 * this.scaleY + this.region.offsetY * e,
o = n + this.region.width * t,
a = i + this.region.height * e,
s = this.rotation * Math.PI / 180,
u = Math.cos(s),
l = Math.sin(s),
h = n * u + this.x,
c = n * l,
f = i * u + this.y,
d = i * l,
p = o * u + this.x,
v = o * l,
y = a * u + this.y,
g = a * l,
m = this.offset;
m[r.OX1] = h - d, m[r.OY1] = f + c, m[r.OX2] = h - g, m[r.OY2] = y + c, m[r.OX3] = p - g, m[r.OY3] = y + v, m[r.OX4] = p - d, m[r.OY4] = f + v
}, r.prototype.setRegion = function(t) {
this.region = t;
var e = this.uvs;
t.rotate ? (e[2] = t.u, e[3] = t.v2, e[4] = t.u, e[5] = t.v, e[6] = t.u2, e[7] = t.v, e[0] = t.u2, e[1] = t.v2) : (e[0] = t.u, e[1] = t.v2, e[2] = t.u, e[3] = t.v, e[4] = t.u2, e[5] = t.v, e[6] = t.u2, e[7] = t.v2)
}, r.prototype.computeWorldVertices = function(t, e, n, i) {
var o = this.offset,
a = t.matrix,
s = a.tx,
u = a.ty,
l = a.a,
h = a.c,
c = a.b,
f = a.d,
d = 0,
p = 0;
d = o[r.OX1], p = o[r.OY1], e[n] = d * l + p * h + s, e[n + 1] = d * c + p * f + u, n += i, d = o[r.OX2], p = o[r.OY2], e[n] = d * l + p * h + s, e[n + 1] = d * c + p * f + u, n += i, d = o[r.OX3], p = o[r.OY3], e[n] = d * l + p * h + s, e[n + 1] = d * c + p * f + u, n += i, d = o[r.OX4], p = o[r.OY4], e[n] = d * l + p * h + s, e[n + 1] = d * c + p * f + u
}, r.OX1 = 0, r.OY1 = 1, r.OX2 = 2, r.OY2 = 3, r.OX3 = 4, r.OY3 = 5, r.OX4 = 6, r.OY4 = 7, r.X1 = 0, r.Y1 = 1, r.C1R = 2, r.C1G = 3, r.C1B = 4, r.C1A = 5, r.U1 = 6, r.V1 = 7, r.X2 = 8, r.Y2 = 9, r.C2R = 10, r.C2G = 11, r.C2B = 12, r.C2A = 13, r.U2 = 14, r.V2 = 15, r.X3 = 16, r.Y3 = 17, r.C3R = 18, r.C3G = 19, r.C3B = 20, r.C3A = 21, r.U3 = 22, r.V3 = 23, r.X4 = 24, r.Y4 = 25, r.C4R = 26, r.C4G = 27, r.C4B = 28, r.C4A = 29, r.U4 = 30, r.V4 = 31, r
}(t.Attachment);
t.RegionAttachment = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t, e) {
this.jitterX = 0, this.jitterY = 0, this.jitterX = t, this.jitterY = e
}
return e.prototype.begin = function(t) {}, e.prototype.transform = function(e, r, n, i) {
e.x += t.MathUtils.randomTriangular(-this.jitterX, this.jitterY), e.y += t.MathUtils.randomTriangular(-this.jitterX, this.jitterY)
}, e.prototype.end = function() {}, e
}();
t.JitterEffect = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
! function(t) {
var e = function() {
function e(t) {
this.centerX = 0, this.centerY = 0, this.radius = 0, this.angle = 0, this.worldX = 0, this.worldY = 0, this.radius = t
}
return e.prototype.begin = function(t) {
this.worldX = t.x + this.centerX, this.worldY = t.y + this.centerY
}, e.prototype.transform = function(r, n, i, o) {
var a = this.angle * t.MathUtils.degreesToRadians,
s = r.x - this.worldX,
u = r.y - this.worldY,
l = Math.sqrt(s * s + u * u);
if (l < this.radius) {
var h = e.interpolation.apply(0, a, (this.radius - l) / this.radius),
c = Math.cos(h),
f = Math.sin(h);
r.x = c * s - f * u + this.worldX, r.y = f * s + c * u + this.worldY
}
}, e.prototype.end = function() {}, e.interpolation = new t.PowOut(2), e
}();
t.SwirlEffect = e
}(t.core || (t.core = {}))
}(i || (i = {})),
function(t) {
PIXI.spine = t;
var e = PIXI.Texture.prototype;
e._updateUvs || (e._updateUvs = e.updateUvs)
}(i || (i = {})),
function(t) {
function e() {
return function(e, i) {
if (!e.data || ! function(t) {
return t.type === PIXI.loaders.Resource.TYPE.JSON
}(e) || !e.data.bones) return i();
var o = e.metadata || {},
a = o ? e.metadata.spineSkeletonScale : null,
s = o ? e.metadata.spineAtlas : null;
if (!1 === s) return i();
if (s && s.pages) {
var u = new t.core.SkeletonJson(new t.core.AtlasAttachmentLoader(s)).readSkeletonData(e.data);
return e.spineData = u, e.spineAtlas = s, i()
}
var l = o.spineAtlasSuffix || ".atlas",
h = e.url.substr(0, e.url.lastIndexOf(".")) + l;
e.metadata && e.metadata.spineAtlasFile && (h = e.metadata.spineAtlasFile), h = h.replace(this.baseUrl, "");
var c = {
crossOrigin: e.crossOrigin,
xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,
metadata: o.spineMetadata || null,
parentResource: e
},
f = {
crossOrigin: e.crossOrigin,
metadata: o.imageMetadata || null,
parentResource: e
},
d = e.url.substr(0, e.url.lastIndexOf("/") + 1);
d = d.replace(this.baseUrl, "");
var p = o.images ? n(o.images) : o.image ? n({
default: o.image
}) : o.imageLoader ? o.imageLoader(this, e.name + "_atlas_page_", d, f) : r(this, e.name + "_atlas_page_", d, f),
v = function(r) {
new t.core.TextureAtlas(r, p, function(r) {
var n = new t.core.SkeletonJson(new t.core.AtlasAttachmentLoader(r));
a && (n.scale = a), e.spineData = n.readSkeletonData(e.data), e.spineAtlas = r, i()
})
};
e.metadata && e.metadata.atlasRawData ? v(e.metadata.atlasRawData) : this.add(e.name + "_atlas", h, c, function(t) {
v(t.xhr.responseText)
})
}
}
function r(t, e, r, n) {
return r && r.lastIndexOf("/") !== r.length - 1 && (r += "/"),
function(i, o) {
var a = e + i,
s = r + i;
t.add(a, s, n, function(t) {
o(t.texture.baseTexture)
})
}
}
function n(t) {
return function(e, r) {
var n = t[e] || t.default;
n && n.baseTexture ? r(n.baseTexture) : r(n)
}
}
t.atlasParser = e, t.imageLoaderAdapter = r, t.syncImageLoaderAdapter = function(t, e) {
return t && t.lastIndexOf("/") !== t.length - 1 && (t += "/"),
function(t, r) {
r(PIXI.BaseTexture.fromImage(t, e))
}
}, t.staticImageLoader = n, PIXI.loaders.Loader.addPixiMiddleware(e), PIXI.loader.use(e())
}(i || (i = {})), Math.fround || (Math.fround = Math.fround = (n = new Float32Array(1), function(t) {
return n[0] = t, n[0]
})),
function(t) {
t.core.Bone.yDown = !0;
var e = [0, 0, 0],
r = function(t) {
function e() {
var e = null !== t && t.apply(this, arguments) || this;
return e.region = null, e
}
return o(e, t), e
}(PIXI.Sprite);
t.SpineSprite = r;
var n = function(t) {
function e(e, r, n, i, o) {
return t.call(this, e, r, n, i, o) || this
}
return o(e, t), e
}(PIXI.mesh.Mesh);
t.SpineMesh = n;
var i = function(i) {
function s(e) {
var r = i.call(this) || this;
if (!e) throw new Error("The spineData param is required.");
if ("string" == typeof e) throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');
r.spineData = e, r.skeleton = new t.core.Skeleton(e), r.skeleton.updateWorldTransform(), r.stateData = new t.core.AnimationStateData(e), r.state = new t.core.AnimationState(r.stateData), r.slotContainers = [], r.tempClipContainers = [];
for (var n = 0, o = r.skeleton.slots.length; n < o; n++) {
var a = r.skeleton.slots[n],
s = a.attachment,
u = r.newContainer();
if (r.slotContainers.push(u), r.addChild(u), r.tempClipContainers.push(null), s instanceof t.core.RegionAttachment) {
var l = s.region.name,
h = r.createSprite(a, s, l);
a.currentSprite = h, a.currentSpriteName = l, u.addChild(h)
} else if (s instanceof t.core.MeshAttachment) {
var c = r.createMesh(a, s);
a.currentMesh = c, a.currentMeshName = s.name, u.addChild(c)
} else {
if (!(s instanceof t.core.ClippingAttachment)) continue;
r.createGraphics(a, s), u.addChild(a.clippingContainer), u.addChild(a.currentGraphics)
}
}
return r.autoUpdate = !0, r.tintRgb = new Float32Array([1, 1, 1]), r
}
return o(s, i), Object.defineProperty(s.prototype, "autoUpdate", {
get: function() {
return this.updateTransform === s.prototype.autoUpdateTransform
},
set: function(t) {
this.updateTransform = t ? s.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(s.prototype, "tint", {
get: function() {
return PIXI.utils.rgb2hex(this.tintRgb)
},
set: function(t) {
this.tintRgb = PIXI.utils.hex2rgb(t, this.tintRgb)
},
enumerable: !0,
configurable: !0
}), s.prototype.update = function(r) {
this.state.update(r), this.state.apply(this.skeleton), this.skeleton.updateWorldTransform();
var n = this.skeleton.slots,
i = this.color,
o = null,
s = null;
i ? (o = i.light, s = i.dark) : o = this.tintRgb;
for (var u = PIXI.TransformBase && 1 == this.transformHack(), l = 0, h = n.length; l < h; l++) {
var c = (R = n[l]).attachment,
f = this.slotContainers[l];
if (c) {
var d = null,
p = c.color;
if (c instanceof t.core.RegionAttachment) {
var v = c.region;
if (v) {
R.currentMesh && (R.currentMesh.visible = !1, R.currentMesh = null, R.currentMeshName = void 0);
var y = v;
if (!R.currentSpriteName || R.currentSpriteName !== y.name) {
var g = y.name;
if (R.currentSprite && (R.currentSprite.visible = !1), R.sprites = R.sprites || {}, void 0 !== R.sprites[g]) R.sprites[g].visible = !0;
else {
var m = this.createSprite(R, c, g);
f.addChild(m)
}
R.currentSprite = R.sprites[g], R.currentSpriteName = g
}
}
if (f.transform) {
var _ = x = f.transform,
b = null;
_.matrix2d ? (b = _.matrix2d, _._dirtyVersion++, _.version = _._dirtyVersion, _.isStatic = !0, _.operMode = 0) : u ? (_.position && ((x = new PIXI.TransformBase)._parentID = -1, x._worldID = f.transform._worldID, f.transform = x), b = x.localTransform) : _.setFromMatrix(R.bone.matrix), b && R.bone.matrix.copy(b)
} else {
b = f.localTransform || new PIXI.Matrix;
R.bone.matrix.copy(b), f.localTransform = b, f.displayObjectUpdateTransform = a
}
R.currentSprite.color ? d = R.currentSprite.color : (e[0] = o[0] * R.color.r * p.r, e[1] = o[1] * R.color.g * p.g, e[2] = o[2] * R.color.b * p.b, R.currentSprite.tint = PIXI.utils.rgb2hex(e)), R.currentSprite.blendMode = R.blendMode
} else if (c instanceof t.core.MeshAttachment) {
var x;
if (R.currentSprite)
if (R.currentSprite.visible = !1, R.currentSprite = null, R.currentSpriteName = void 0, f.transform)(x = new PIXI.TransformStatic)._parentID = -1, x._worldID = f.transform._worldID, f.transform = x;
else f.localTransform = new PIXI.Matrix, f.displayObjectUpdateTransform = PIXI.DisplayObject.prototype.updateTransform;
if (!R.currentMeshName || R.currentMeshName !== c.name) {
var w = c.name;
if (R.currentMesh && (R.currentMesh.visible = !1), R.meshes = R.meshes || {}, void 0 !== R.meshes[w]) R.meshes[w].visible = !0;
else {
var T = this.createMesh(R, c);
f.addChild(T)
}
R.currentMesh = R.meshes[w], R.currentMeshName = w
}
if (c.computeWorldVerticesOld(R, R.currentMesh.vertices), R.currentMesh.color) d = R.currentMesh.color;
else if ("3" !== PIXI.VERSION[0]) {
var E = R.currentMesh.tintRgb;
E[0] = o[0] * R.color.r * p.r, E[1] = o[1] * R.color.g * p.g, E[2] = o[2] * R.color.b * p.b
}
R.currentMesh.blendMode = R.blendMode
} else {
if (!(c instanceof t.core.ClippingAttachment)) {
f.visible = !1;
continue
}
R.currentGraphics || (this.createGraphics(R, c), f.addChild(R.clippingContainer), f.addChild(R.currentGraphics)), this.updateGraphics(R, c)
}
if (f.visible = !0, d) {
var S = R.color.r * p.r,
M = R.color.g * p.g,
P = R.color.b * p.b;
d.setLight(o[0] * S + s[0] * (1 - S), o[1] * M + s[1] * (1 - M), o[2] * P + s[2] * (1 - P)), R.darkColor ? (S = R.darkColor.r, M = R.darkColor.g, P = R.darkColor.b) : (S = 0, M = 0, P = 0), d.setDark(o[0] * S + s[0] * (1 - S), o[1] * M + s[1] * (1 - M), o[2] * P + s[2] * (1 - P))
}
f.alpha = R.color.a
} else f.visible = !1
}
var O = this.skeleton.drawOrder,
C = null,
A = null;
for (l = 0, h = O.length; l < h; l++) {
var R = n[O[l].data.index];
f = this.slotContainers[O[l].data.index];
if (A || f.parent !== this && (f.parent.removeChild(f), f.parent = this), R.currentGraphics && R.attachment) A = R.clippingContainer, C = R.attachment, A.children.length = 0, this.children[l] = f, C.endSlot == R.data && (C.endSlot = null);
else if (A) {
var I = this.tempClipContainers[l];
I || ((I = this.tempClipContainers[l] = this.newContainer()).visible = !1), this.children[l] = I, f.parent = null, A.addChild(f), C.endSlot == R.data && (A.renderable = !0, A = null, C = null)
} else this.children[l] = f
}
}, s.prototype.setSpriteRegion = function(t, e, r) {
e.region = r, e.texture = r.texture, r.size ? (e.scale.x = r.size.width / r.originalWidth, e.scale.y = -r.size.height / r.originalHeight) : (e.scale.x = t.scaleX * t.width / r.originalWidth, e.scale.y = -t.scaleY * t.height / r.originalHeight)
}, s.prototype.setMeshRegion = function(t, e, r) {
e.region = r, e.texture = r.texture, r.texture._updateUvs(), t.updateUVs(r, e.uvs), e.dirty++
}, s.prototype.autoUpdateTransform = function() {
if (s.globalAutoUpdate) {
this.lastTime = this.lastTime || Date.now();
var t = .001 * (Date.now() - this.lastTime);
this.lastTime = Date.now(), this.update(t)
} else this.lastTime = 0;
PIXI.Container.prototype.updateTransform.call(this)
}, s.prototype.createSprite = function(e, r, n) {
var i = r.region;
e.tempAttachment === r && (i = e.tempRegion, e.tempAttachment = null, e.tempRegion = null);
var o = i.texture,
a = this.newSprite(o);
return a.rotation = r.rotation * t.core.MathUtils.degRad, a.anchor.x = .5, a.anchor.y = .5, a.position.x = r.x, a.position.y = r.y, a.alpha = r.color.a, a.region = r.region, this.setSpriteRegion(r, a, r.region), e.sprites = e.sprites || {}, e.sprites[n] = a, a
}, s.prototype.createMesh = function(t, e) {
var r = e.region;
t.tempAttachment === e && (r = t.tempRegion, t.tempAttachment = null, t.tempRegion = null);
var n = this.newMesh(r.texture, new Float32Array(e.regionUVs.length), new Float32Array(e.regionUVs.length), new Uint16Array(e.triangles), PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);
return n.canvasPadding = 1.5, n.alpha = e.color.a, n.region = e.region, this.setMeshRegion(e, n, r), t.meshes = t.meshes || {}, t.meshes[e.name] = n, n
}, s.prototype.createGraphics = function(t, e) {
var r = this.newGraphics(),
n = new PIXI.Polygon([]);
return r.clear(), r.beginFill(16777215, 1), r.drawPolygon(n), r.renderable = !1, t.currentGraphics = r, t.clippingContainer = this.newContainer(), t.clippingContainer.mask = t.currentGraphics, r
}, s.prototype.updateGraphics = function(t, e) {
var r = t.currentGraphics.graphicsData[0].shape.points,
n = e.worldVerticesLength;
r.length = n, e.computeWorldVertices(t, 0, n, r, 0, 2), t.currentGraphics.dirty++, t.currentGraphics.clearDirty++
}, s.prototype.hackTextureBySlotIndex = function(e, r, n) {
void 0 === r && (r = null), void 0 === n && (n = null);
var i = this.skeleton.slots[e];
if (!i) return !1;
var o = i.attachment,
a = o.region;
return r && ((a = new t.core.TextureRegion).texture = r, a.size = n), i.currentSprite && i.currentSprite.region != a ? (this.setSpriteRegion(o, i.currentSprite, a), i.currentSprite.region = a) : i.currentMesh && i.currentMesh.region != a ? this.setMeshRegion(o, i.currentMesh, a) : (i.tempRegion = a, i.tempAttachment = o), !0
}, s.prototype.hackTextureBySlotName = function(t, e, r) {
void 0 === e && (e = null), void 0 === r && (r = null);
var n = this.skeleton.findSlotIndex(t);
return -1 != n && this.hackTextureBySlotIndex(n, e, r)
}, s.prototype.newContainer = function() {
return new PIXI.Container
}, s.prototype.newSprite = function(t) {
return new r(t)
}, s.prototype.newGraphics = function() {
return new PIXI.Graphics
}, s.prototype.newMesh = function(t, e, r, i, o) {
return new n(t, e, r, i, o)
}, s.prototype.transformHack = function() {
return 1
}, s.globalAutoUpdate = !0, s.clippingPolygon = [], s
}(PIXI.Container);
function a() {
var t = this.parent.worldTransform,
e = this.worldTransform,
r = this.localTransform;
e.a = r.a * t.a + r.b * t.c, e.b = r.a * t.b + r.b * t.d, e.c = r.c * t.a + r.d * t.c, e.d = r.c * t.b + r.d * t.d, e.tx = r.tx * t.a + r.ty * t.c + t.tx, e.ty = r.tx * t.b + r.ty * t.d + t.ty, this.worldAlpha = this.alpha * this.parent.worldAlpha, this._currentBounds = null
}
t.Spine = i
}(i || (i = {}))
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Resolution = void 0;
var n = r(227),
i = r(228);
var o = function(t) {
function e() {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, n.WindowResizeManager), e
}();
e.default = o, o.Resolution = i.Resolution, e.Resolution = i.Resolution
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.LoadingScene = void 0;
var n = r(99),
i = r(95),
o = r(41),
a = r(22);
e.LoadingScene = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var t = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)),
r = i.Text.new("Loading", {
fill: 16777215,
fontSize: 48
});
return r.addTo(t, o.game.width - r.width, o.game.height - r.height, {
anchor: .5
}), a.Tween.new(r).to({
y: r.y - 10
}, 200).to({
y: r.y
}, 200).loop(), t
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, n.Scene), e
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Scene = void 0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(2);
e.Scene = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var t = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
return t.on("enter", function() {
t.interactiveChildren = !0
}), t.on("exit", function() {
t.interactiveChildren = !1
}), t
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, i.Container), n(e, [{
key: "updateAll",
value: function(t) {
this._ezgUpdate(t)
}
}]), e
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.SoundManager = void 0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(101);
var o = "default";
e.SoundManager = function() {
function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this._volume = .5, this._sounds = {}, this._sounds[o] = []
}
return n(t, [{
key: "add",
value: function(t) {
var e = this,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o;
this._sounds[r] || (this._sounds[r] = []), this._sounds[r].push(t), t.on("ended", function() {
return e.remove(t, r)
})
}
}, {
key: "remove",
value: function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o,
r = this._sounds[e],
n = r.indexOf(t); - 1 !== n && r.splice(n, 1)[0].stop()
}
}, {
key: "removeAll",
value: function() {
var t = this;
Object.keys(this._sounds).forEach(function(e) {
t._sounds[e].concat().forEach(function(e) {
t.remove(e)
})
})
}
}, {
key: "play",
value: function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
r = e.group,
n = void 0 === r ? o : r,
a = e.volume,
s = void 0 === a ? 1 : a,
u = e.loop,
l = void 0 !== u && u,
h = new i.Sound(t, this._volume * s);
return this.add(h, n), h.play(l)
}
}, {
key: "setVolume",
value: function(t) {
var e = this,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o;
this._sounds[r].forEach(function(r) {
r.volume = r.volume / e._volume * t
})
}
}, {
key: "mute",
value: function() {
var t = this;
Object.keys(this._sounds).forEach(function(e) {
t._sounds[e].forEach(function(t) {
t.mute()
})
})
}
}, {
key: "unmute",
value: function() {
var t = this;
Object.keys(this._sounds).forEach(function(e) {
t._sounds[e].forEach(function(t) {
t.unmute()
})
})
}
}]), t
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Sound = void 0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(2),
o = r(22);
e.Sound = function(t) {
function e(t) {
var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .5;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)),
o = i.loader.resources[t];
if (!o) throw new Error("sound " + t + " is not found");
return n._buffer = o.buffer, n._gainNode = i.utils.audioContext.createGain(), n._loop = !1, n._volume = r, n._mutedVolume = 0, n._loopStart = 0, n._loopEnd = n._buffer.duration, n._startedTime = 0, n._source = null, n._isMuted = !1, n._paused = !1, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, i.utils.EventEmitter), n(e, [{
key: "play",
value: function() {
var t = this,
e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
if (this._source) return this;
this._loop = e;
var n = i.utils.audioContext;
return this._source = n.createBufferSource(), this._source.loop = this._loop, this._source.loopStart = this._loopStart, this._source.loopEnd = this._loopEnd, this._source.buffer = this._buffer, this._source.connect(this._gainNode), this._source.onended = function() {
return t.emit("ended")
}, this._gainNode.gain.value = this._volume, this._gainNode.connect(n.destination), this._currentTime = r, this._startedTime = n.currentTime, this._source.start(0, Math.max(0, r)), this
}
}, {
key: "stop",
value: function() {
return this._source ? (this._source.stop(), this._source.disconnect(), this._source = null, this) : this
}
}, {
key: "pause",
value: function() {
return this.stop(), this._currentTime += i.utils.audioContext.currentTime - this._startedTime, this._paused = !0, this
}
}, {
key: "resume",
value: function() {
return this.play(this._loop, this._currentTime), this._paused = !1, this
}
}, {
key: "restart",
value: function() {
var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.stop(), this.play(t, e), this
}
}, {
key: "fadeIn",
value: function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1e3,
e = this.volume;
return this.volume = 0, this.play(), o.Tween.new(this).to({
volume: e
}, t), this
}
}, {
key: "fadeOut",
value: function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1e3;
return o.Tween.new(this).to({
volume: 0
}, t).call(this.stop, this), this
}
}, {
key: "mute",
value: function() {
return this._isMuted ? this : (this._mutedVolume = this.volume, this.volume = 0, this._isMuted = !0, this)
}
}, {
key: "unmute",
value: function() {
return this._isMuted ? (this.volume = this._mutedVolume, this._isMuted = !1, this) : this
}
}, {
key: "duration",
get: function() {
return this._source.buffer.duration
}
}, {
key: "volume",
get: function() {
return this._volume
},
set: function(t) {
this._volume = t, this._gainNode.gain.value = Math.max(0, this._volume)
}
}, {
key: "loop",
get: function() {
return this._loop
},
set: function(t) {
this._loop = t
}
}, {
key: "loopStart",
get: function() {
return this._loopStart
},
set: function(t) {
this._loopStart = t
}
}, {
key: "loopEnd",
get: function() {
return this._loopEnd
},
set: function(t) {
this._loopEnd = t
}
}, {
key: "currentTime",
get: function() {
return this._paused ? this._currentTime : this._currentTime + i.utils.audioContext.currentTime - this._startedTime
}
}]), e
}()
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.Resolution = e.loader = e.prepare = e.particles = e.mesh = e.loaders = e.interaction = e.filters = e.extract = e.accessibility = e.Filter = e.SpriteMaskFilter = e.Quad = e.RenderTarget = e.ObjectRenderer = e.WebGLManager = e.Shader = e.CanvasRenderTarget = e.TextureUvs = e.VideoBaseTexture = e.BaseRenderTexture = e.RenderTexture = e.BaseTexture = e.Texture = e.CanvasGraphicsRenderer = e.GraphicsRenderer = e.GraphicsData = e.Graphics = e.TextStyle = e.SpriteRenderer = e.DisplayObject = e.Container = e.CanvasTinter = e.CanvasSpriteRenderer = e.TransformBase = e.TransformStatic = e.Transform = e.Bounds = e.autoDetectRenderer = e.WebGLRenderer = e.CanvasRenderer = e.settings = e.ticker = e.utils = e.Circle = e.Rectangle = e.RoundedRectangle = e.Polygon = e.Ellipse = e.GroupD8 = e.Matrix = e.ObservablePoint = e.Point = e.TEXT_GRADIENT = e.TRANSFORM_MODE = e.PRECISION = e.SHAPES = e.SVG_SIZE = e.DATA_URI = e.URL_FILE_EXTENSION = e.GC_MODES = e.WRAP_MODES = e.SCALE_MODES = e.BLEND_MODES = e.RENDERER_TYPE = e.DEG_TO_RAD = e.RAD_TO_DEG = e.PI_2 = void 0;
var n = r(103);
Object.keys(n).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return n[t]
}
})
});
var i = r(2);
Object.defineProperty(e, "PI_2", {
enumerable: !0,
get: function() {
return i.PI_2
}
}), Object.defineProperty(e, "RAD_TO_DEG", {
enumerable: !0,
get: function() {
return i.RAD_TO_DEG
}
}), Object.defineProperty(e, "DEG_TO_RAD", {
enumerable: !0,
get: function() {
return i.DEG_TO_RAD
}
}), Object.defineProperty(e, "RENDERER_TYPE", {
enumerable: !0,
get: function() {
return i.RENDERER_TYPE
}
}), Object.defineProperty(e, "BLEND_MODES", {
enumerable: !0,
get: function() {
return i.BLEND_MODES
}
}), Object.defineProperty(e, "SCALE_MODES", {
enumerable: !0,
get: function() {
return i.SCALE_MODES
}
}), Object.defineProperty(e, "WRAP_MODES", {
enumerable: !0,
get: function() {
return i.WRAP_MODES
}
}), Object.defineProperty(e, "GC_MODES", {
enumerable: !0,
get: function() {
return i.GC_MODES
}
}), Object.defineProperty(e, "URL_FILE_EXTENSION", {
enumerable: !0,
get: function() {
return i.URL_FILE_EXTENSION
}
}), Object.defineProperty(e, "DATA_URI", {
enumerable: !0,
get: function() {
return i.DATA_URI
}
}), Object.defineProperty(e, "SVG_SIZE", {
enumerable: !0,
get: function() {
return i.SVG_SIZE
}
}), Object.defineProperty(e, "SHAPES", {
enumerable: !0,
get: function() {
return i.SHAPES
}
}), Object.defineProperty(e, "PRECISION", {
enumerable: !0,
get: function() {
return i.PRECISION
}
}), Object.defineProperty(e, "TRANSFORM_MODE", {
enumerable: !0,
get: function() {
return i.TRANSFORM_MODE
}
}), Object.defineProperty(e, "TEXT_GRADIENT", {
enumerable: !0,
get: function() {
return i.TEXT_GRADIENT
}
}), Object.defineProperty(e, "Point", {
enumerable: !0,
get: function() {
return i.Point
}
}), Object.defineProperty(e, "ObservablePoint", {
enumerable: !0,
get: function() {
return i.ObservablePoint
}
}), Object.defineProperty(e, "Matrix", {
enumerable: !0,
get: function() {
return i.Matrix
}
}), Object.defineProperty(e, "GroupD8", {
enumerable: !0,
get: function() {
return i.GroupD8
}
}), Object.defineProperty(e, "Ellipse", {
enumerable: !0,
get: function() {
return i.Ellipse
}
}), Object.defineProperty(e, "Polygon", {
enumerable: !0,
get: function() {
return i.Polygon
}
}), Object.defineProperty(e, "RoundedRectangle", {
enumerable: !0,
get: function() {
return i.RoundedRectangle
}
}), Object.defineProperty(e, "Rectangle", {
enumerable: !0,
get: function() {
return i.Rectangle
}
}), Object.defineProperty(e, "Circle", {
enumerable: !0,
get: function() {
return i.Circle
}
}), Object.defineProperty(e, "utils", {
enumerable: !0,
get: function() {
return i.utils
}
}), Object.defineProperty(e, "ticker", {
enumerable: !0,
get: function() {
return i.ticker
}
}), Object.defineProperty(e, "settings", {
enumerable: !0,
get: function() {
return i.settings
}
}), Object.defineProperty(e, "CanvasRenderer", {
enumerable: !0,
get: function() {
return i.CanvasRenderer
}
}), Object.defineProperty(e, "WebGLRenderer", {
enumerable: !0,
get: function() {
return i.WebGLRenderer
}
}), Object.defineProperty(e, "autoDetectRenderer", {
enumerable: !0,
get: function() {
return i.autoDetectRenderer
}
}), Object.defineProperty(e, "Bounds", {
enumerable: !0,
get: function() {
return i.Bounds
}
}), Object.defineProperty(e, "Transform", {
enumerable: !0,
get: function() {
return i.Transform
}
}), Object.defineProperty(e, "TransformStatic", {
enumerable: !0,
get: function() {
return i.TransformStatic
}
}), Object.defineProperty(e, "TransformBase", {
enumerable: !0,
get: function() {
return i.TransformBase
}
}), Object.defineProperty(e, "CanvasSpriteRenderer", {
enumerable: !0,
get: function() {
return i.CanvasSpriteRenderer
}
}), Object.defineProperty(e, "CanvasTinter", {
enumerable: !0,
get: function() {
return i.CanvasTinter
}
}), Object.defineProperty(e, "Container", {
enumerable: !0,
get: function() {
return i.Container
}
}), Object.defineProperty(e, "DisplayObject", {
enumerable: !0,
get: function() {
return i.DisplayObject
}
}), Object.defineProperty(e, "SpriteRenderer", {
enumerable: !0,
get: function() {
return i.SpriteRenderer
}
}), Object.defineProperty(e, "TextStyle", {
enumerable: !0,
get: function() {
return i.TextStyle
}
}), Object.defineProperty(e, "Graphics", {
enumerable: !0,
get: function() {
return i.Graphics
}
}), Object.defineProperty(e, "GraphicsData", {
enumerable: !0,
get: function() {
return i.GraphicsData
}
}), Object.defineProperty(e, "GraphicsRenderer", {
enumerable: !0,
get: function() {
return i.GraphicsRenderer
}
}), Object.defineProperty(e, "CanvasGraphicsRenderer", {
enumerable: !0,
get: function() {
return i.CanvasGraphicsRenderer
}
}), Object.defineProperty(e, "Texture", {
enumerable: !0,
get: function() {
return i.Texture
}
}), Object.defineProperty(e, "BaseTexture", {
enumerable: !0,
get: function() {
return i.BaseTexture
}
}), Object.defineProperty(e, "RenderTexture", {
enumerable: !0,
get: function() {
return i.RenderTexture
}
}), Object.defineProperty(e, "BaseRenderTexture", {
enumerable: !0,
get: function() {
return i.BaseRenderTexture
}
}), Object.defineProperty(e, "VideoBaseTexture", {
enumerable: !0,
get: function() {
return i.VideoBaseTexture
}
}), Object.defineProperty(e, "TextureUvs", {
enumerable: !0,
get: function() {
return i.TextureUvs
}
}), Object.defineProperty(e, "CanvasRenderTarget", {
enumerable: !0,
get: function() {
return i.CanvasRenderTarget
}
}), Object.defineProperty(e, "Shader", {
enumerable: !0,
get: function() {
return i.Shader
}
}), Object.defineProperty(e, "WebGLManager", {
enumerable: !0,
get: function() {
return i.WebGLManager
}
}), Object.defineProperty(e, "ObjectRenderer", {
enumerable: !0,
get: function() {
return i.ObjectRenderer
}
}), Object.defineProperty(e, "RenderTarget", {
enumerable: !0,
get: function() {
return i.RenderTarget
}
}), Object.defineProperty(e, "Quad", {
enumerable: !0,
get: function() {
return i.Quad
}
}), Object.defineProperty(e, "SpriteMaskFilter", {
enumerable: !0,
get: function() {
return i.SpriteMaskFilter
}
}), Object.defineProperty(e, "Filter", {
enumerable: !0,
get: function() {
return i.Filter
}
}), Object.defineProperty(e, "accessibility", {
enumerable: !0,
get: function() {
return i.accessibility
}
}), Object.defineProperty(e, "extract", {
enumerable: !0,
get: function() {
return i.extract
}
}), Object.defineProperty(e, "filters", {
enumerable: !0,
get: function() {
return i.filters
}
}), Object.defineProperty(e, "interaction", {
enumerable: !0,
get: function() {
return i.interaction
}
}), Object.defineProperty(e, "loaders", {
enumerable: !0,
get: function() {
return i.loaders
}
}), Object.defineProperty(e, "mesh", {
enumerable: !0,
get: function() {
return i.mesh
}
}), Object.defineProperty(e, "particles", {
enumerable: !0,
get: function() {
return i.particles
}
}), Object.defineProperty(e, "prepare", {
enumerable: !0,
get: function() {
return i.prepare
}
}), Object.defineProperty(e, "loader", {
enumerable: !0,
get: function() {
return i.loader
}
});
var o = r(17);
Object.keys(o).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return o[t]
}
})
});
var a = r(95);
Object.keys(a).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return a[t]
}
})
});
var s = r(205);
Object.keys(s).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return s[t]
}
})
});
var u = r(220);
Object.keys(u).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return u[t]
}
})
});
var l = r(222);
Object.keys(l).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return l[t]
}
})
});
var h = r(223);
Object.keys(h).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return h[t]
}
})
});
var c = r(41);
Object.keys(c).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return c[t]
}
})
});
var f = r(231);
Object.keys(f).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return f[t]
}
})
});
var d = r(232);
Object.keys(d).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return d[t]
}
})
});
var p = r(39);
Object.keys(p).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return p[t]
}
})
});
var v = r(98);
Object.keys(v).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return v[t]
}
})
});
var y = r(99);
Object.keys(y).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return y[t]
}
})
});
var g = r(42);
Object.keys(g).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return g[t]
}
})
});
var m = r(235);
Object.keys(m).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return m[t]
}
})
});
var _ = r(236);
Object.keys(_).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return _[t]
}
})
});
var b = r(22);
Object.keys(b).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return b[t]
}
})
});
var x = r(40);
Object.keys(x).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return x[t]
}
})
});
var w = r(101);
Object.keys(w).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return w[t]
}
})
});
var T = r(100);
Object.keys(T).forEach(function(t) {
"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
enumerable: !0,
get: function() {
return T[t]
}
})
});
var E = r(97);
Object.defineProperty(e, "Resolution", {
enumerable: !0,
get: function() {
return E.Resolution
}
});
var S, M = r(237),
P = (S = M) && S.__esModule ? S : {
default: S
};
i.utils.audioExts.forEach(function(t) {
i.loaders.Resource.setExtensionXhrType(t, i.loaders.Resource.XHR_RESPONSE_TYPE.BUFFER)
}), // Copyright © 2018 BXD Inc. All rights reserved.
i.loaders.Loader.addPixiMiddleware(P.default), i.loader.use((0, P.default)())
}, function(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), e.utils = void 0;
var n = r(2);
window.AudioContext = window.AudioContext || window.webkitAudioContext, n.utils.audioContext = new AudioContext, n.utils.audioExts = ["mp3", "m4a", "wav", "ogg"], n.utils.getExts = function(t) {
return t.split("?").shift().split(".").pop().toLowerCase()
}, n.utils.setUpSound = function() {
var t = !0;
document.body.addEventListener("touchend", function e() {
if (t) {
var r = n.utils.audioContext.createBufferSource();
r.buffer = n.utils.audioContext.createBuffer(1, 1, 44100), r.connect(n.utils.audioContext.destination), r.start(0), r.disconnect(), t = !1, document.body.removeEventListener("touchend", e)
}
})
}, n.utils.setPrototypeOf = function(t, e) {
Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e
}, n.utils.copyProps = function(t, e) {
t.new = e.new
}, e.utils = n.utils
}, function(t, e, r) {
"use strict";
r(105), r(107), r(108), window.ArrayBuffer || (window.ArrayBuffer = Array), window.Float32Array || (window.Float32Array = Array), window.Uint32Array || (window.Uint32Array = Array), window.Uint16Array || (window.Uint16Array = Array)
}, function(t, e, r) {
"use strict";
var n, i = r(106),
o = (n = i) && n.__esModule ? n : {
default: n
};
Object.assign || (Object.assign = o.default)
}, function(t, e, r) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var n = Object.getOwnPropertySymbols,
i = Object.prototype.hasOwnProperty,
o = Object.prototype.propertyIsEnumerable;
t.exports = function() {
try {
if (!Object.assign) return !1;
var t = new String("abc");
if (t[5] = "de", "5" === Object.getOwnPropertyNames(t)[0]) return !1;
for (var e = {}, r = 0; r < 10; r++) e["_" + String.fromCharCode(r)] = r;
if ("0123456789" !== Object.getOwnPropertyNames(e).map(function(t) {
return e[t]
}).join("")) return !1;
var n = {};
return "abcdefghijklmnopqrst".split("").forEach(function(t) {
n[t] = t
}), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, n)).join("")
} catch (t) {
return !1
}
}() ? Object.assign : function(t, e) {
for (var r, a, s = function(t) {
if (null == t) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(t)
}(t), u = 1; u < arguments.length; u++) {
for (var l in r = Object(arguments[u])) i.call(r, l) && (s[l] = r[l]);
if (n) {
a = n(r);
for (var h = 0; h < a.length; h++) o.call(r, a[h]) && (s[a[h]] = r[a[h]])
}
}
return s
}
}, function(t, e, r) {
"use strict";
(function(t) {
if (Date.now && Date.prototype.getTime || (Date.now = function() {
return (new Date).getTime()
}), !t.performance || !t.performance.now) {
var e = Date.now();
t.performance || (t.performance = {}), t.performance.now = function() {
return Date.now() - e
}
}
for (var r = Date.now(), n = ["ms", "moz", "webkit", "o"], i = 0; i < n.length && !t.requestAnimationFrame; ++i) {
var o = n[i];
t.requestAnimationFrame = t[o + "RequestAnimationFrame"], t.cancelAnimationFrame = t[o + "CancelAnimationFrame"] || t[o + "CancelRequestAnimationFrame"]
}
t.requestAnimationFrame || (t.requestAnimationFrame = function(t) {
if ("function" != typeof t) throw new TypeError(t + "is not a function");
var e = Date.now(),
n = 16 + r - e;
return n < 0 && (n = 0), r = e, setTimeout(function() {
r = Date.now(), t(performance.now())
}, n)
}), t.cancelAnimationFrame || (t.cancelAnimationFrame = function(t) {
return clearTimeout(t)
})
}).call(this, r(23))
}, function(t, e, r) {
"use strict";
Math.sign || (Math.sign = function(t) {
return 0 === (t = Number(t)) || isNaN(t) ? t : t > 0 ? 1 : -1
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(26),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(1);
var s = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x = e, this.y = r, this.radius = n, this.type = a.SHAPES.CIRC
}
return t.prototype.clone = function() {
return new t(this.x, this.y, this.radius)
}, t.prototype.contains = function(t, e) {
if (this.radius <= 0) return !1;
var r = this.radius * this.radius,
n = this.x - t,
i = this.y - e;
return (n *= n) + (i *= i) <= r
}, t.prototype.getBounds = function() {
return new o.default(this.x - this.radius, this.y - this.radius, 2 * this.radius, 2 * this.radius)
}, t
}();
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(26),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(1);
var s = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x = e, this.y = r, this.width = n, this.height = i, this.type = a.SHAPES.ELIP
}
return t.prototype.clone = function() {
return new t(this.x, this.y, this.width, this.height)
}, t.prototype.contains = function(t, e) {
if (this.width <= 0 || this.height <= 0) return !1;
var r = (t - this.x) / this.width,
n = (e - this.y) / this.height;
return (r *= r) + (n *= n) <= 1
}, t.prototype.getBounds = function() {
return new o.default(this.x - this.width, this.y - this.height, this.width, this.height)
}, t
}();
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(24),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(1);
var s = function() {
function t() {
for (var e = arguments.length, r = Array(e), n = 0; n < e; n++) r[n] = arguments[n];
if (function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), Array.isArray(r[0]) && (r = r[0]), r[0] instanceof o.default) {
for (var i = [], s = 0, u = r.length; s < u; s++) i.push(r[s].x, r[s].y);
r = i
}
this.closed = !0, this.points = r, this.type = a.SHAPES.POLY
}
return t.prototype.clone = function() {
return new t(this.points.slice())
}, t.prototype.close = function() {
var t = this.points;
t[0] === t[t.length - 2] && t[1] === t[t.length - 1] || t.push(t[0], t[1])
}, t.prototype.contains = function(t, e) {
for (var r = !1, n = this.points.length / 2, i = 0, o = n - 1; i < n; o = i++) {
var a = this.points[2 * i],
s = this.points[2 * i + 1],
u = this.points[2 * o],
l = this.points[2 * o + 1];
s > e != l > e && t < (e - s) / (l - s) * (u - a) + a && (r = !r)
}
return r
}, t
}();
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(1);
var i = function() {
function t() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0,
a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 20;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.x = e, this.y = r, this.width = i, this.height = o, this.radius = a, this.type = n.SHAPES.RREC
}
return t.prototype.clone = function() {
return new t(this.x, this.y, this.width, this.height, this.radius)
}, t.prototype.contains = function(t, e) {
if (this.width <= 0 || this.height <= 0) return !1;
if (t >= this.x && t <= this.x + this.width && e >= this.y && e <= this.y + this.height) {
if (e >= this.y + this.radius && e <= this.y + this.height - this.radius || t >= this.x + this.radius && t <= this.x + this.width - this.radius) return !0;
var r = t - (this.x + this.radius),
n = e - (this.y + this.radius),
i = this.radius * this.radius;
if (r * r + n * n <= i) return !0;
if ((r = t - (this.x + this.width - this.radius)) * r + n * n <= i) return !0;
if (r * r + (n = e - (this.y + this.height - this.radius)) * n <= i) return !0;
if ((r = t - (this.x + this.radius)) * r + n * n <= i) return !0
}
return !1
}, t
}();
e.default = i
}, function(t, e) {
t.exports = function(t, e) {
var r = t.getContext("webgl", e) || t.getContext("experimental-webgl", e);
if (!r) throw new Error("This browser does not support webGL. Try using the canvas renderer");
return r
}
}, function(t, e) {
var r = new ArrayBuffer(0),
n = function(t, e, n, i) {
this.gl = t, this.buffer = t.createBuffer(), this.type = e || t.ARRAY_BUFFER, this.drawType = i || t.STATIC_DRAW, this.data = r, n && this.upload(n), this._updateID = 0
};
n.prototype.upload = function(t, e, r) {
r || this.bind();
var n = this.gl;
t = t || this.data, e = e || 0, this.data.byteLength >= t.byteLength ? n.bufferSubData(this.type, e, t) : n.bufferData(this.type, t, this.drawType), this.data = t
}, n.prototype.bind = function() {
this.gl.bindBuffer(this.type, this.buffer)
}, n.createVertexBuffer = function(t, e, r) {
return new n(t, t.ARRAY_BUFFER, e, r)
}, n.createIndexBuffer = function(t, e, r) {
return new n(t, t.ELEMENT_ARRAY_BUFFER, e, r)
}, n.create = function(t, e, r, i) {
return new n(t, e, r, i)
}, n.prototype.destroy = function() {
this.gl.deleteBuffer(this.buffer)
}, t.exports = n
}, function(t, e, r) {
var n = r(46),
i = function(t, e, r) {
this.gl = t, this.framebuffer = t.createFramebuffer(), this.stencil = null, this.texture = null, this.width = e || 100, this.height = r || 100
};
i.prototype.enableTexture = function(t) {
var e = this.gl;
this.texture = t || new n(e), this.texture.bind(), this.bind(), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, this.texture.texture, 0)
}, i.prototype.enableStencil = function() {
if (!this.stencil) {
var t = this.gl;
this.stencil = t.createRenderbuffer(), t.bindRenderbuffer(t.RENDERBUFFER, this.stencil), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, t.RENDERBUFFER, this.stencil), t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_STENCIL, this.width, this.height)
}
}, i.prototype.clear = function(t, e, r, n) {
this.bind();
var i = this.gl;
i.clearColor(t, e, r, n), i.clear(i.COLOR_BUFFER_BIT | i.DEPTH_BUFFER_BIT)
}, i.prototype.bind = function() {
var t = this.gl;
t.bindFramebuffer(t.FRAMEBUFFER, this.framebuffer)
}, i.prototype.unbind = function() {
var t = this.gl;
t.bindFramebuffer(t.FRAMEBUFFER, null)
}, i.prototype.resize = function(t, e) {
var r = this.gl;
this.width = t, this.height = e, this.texture && this.texture.uploadData(null, t, e), this.stencil && (r.bindRenderbuffer(r.RENDERBUFFER, this.stencil), r.renderbufferStorage(r.RENDERBUFFER, r.DEPTH_STENCIL, t, e))
}, i.prototype.destroy = function() {
var t = this.gl;
this.texture && this.texture.destroy(), t.deleteFramebuffer(this.framebuffer), this.gl = null, this.stencil = null, this.texture = null
}, i.createRGBA = function(t, e, r, o) {
var a = n.fromData(t, null, e, r);
a.enableNearestScaling(), a.enableWrapClamp();
var s = new i(t, e, r);
return s.enableTexture(a), s.unbind(), s
}, i.createFloat32 = function(t, e, r, o) {
var a = new n.fromData(t, o, e, r);
a.enableNearestScaling(), a.enableWrapClamp();
var s = new i(t, e, r);
return s.enableTexture(a), s.unbind(), s
}, t.exports = i
}, function(t, e, r) {
var n = r(47),
i = r(48),
o = r(50),
a = r(52),
s = r(53),
u = function(t, e, r, u, l) {
this.gl = t, u && (e = a(e, u), r = a(r, u)), this.program = n(t, e, r, l), this.attributes = i(t, this.program), this.uniformData = o(t, this.program), this.uniforms = s(t, this.uniformData)
};
u.prototype.bind = function() {
return this.gl.useProgram(this.program), this
}, u.prototype.destroy = function() {
this.attributes = null, this.uniformData = null, this.uniforms = null, this.gl.deleteProgram(this.program)
}, t.exports = u
}, function(t, e, r) {
var n = r(45);
function i(t, e) {
if (this.nativeVaoExtension = null, i.FORCE_NATIVE || (this.nativeVaoExtension = t.getExtension("OES_vertex_array_object") || t.getExtension("MOZ_OES_vertex_array_object") || t.getExtension("WEBKIT_OES_vertex_array_object")), this.nativeState = e, this.nativeVaoExtension) {
this.nativeVao = this.nativeVaoExtension.createVertexArrayOES();
var r = t.getParameter(t.MAX_VERTEX_ATTRIBS);
this.nativeState = {
tempAttribState: new Array(r),
attribState: new Array(r)
}
}
this.gl = t, this.attributes = [], this.indexBuffer = null, this.dirty = !1
}
i.prototype.constructor = i, t.exports = i, i.FORCE_NATIVE = !1, i.prototype.bind = function() {
if (this.nativeVao) {
if (this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao), this.dirty) return this.dirty = !1, this.activate(), this;
this.indexBuffer && this.indexBuffer.bind()
} else this.activate();
return this
}, i.prototype.unbind = function() {
return this.nativeVao && this.nativeVaoExtension.bindVertexArrayOES(null), this
}, i.prototype.activate = function() {
for (var t = this.gl, e = null, r = 0; r < this.attributes.length; r++) {
var i = this.attributes[r];
e !== i.buffer && (i.buffer.bind(), e = i.buffer), t.vertexAttribPointer(i.attribute.location, i.attribute.size, i.type || t.FLOAT, i.normalized || !1, i.stride || 0, i.start || 0)
}
return n(t, this.attributes, this.nativeState), this.indexBuffer && this.indexBuffer.bind(), this
}, i.prototype.addAttribute = function(t, e, r, n, i, o) {
return this.attributes.push({
buffer: t,
attribute: e,
location: e.location,
type: r || this.gl.FLOAT,
normalized: n || !1,
stride: i || 0,
start: o || 0
}), this.dirty = !0, this
}, i.prototype.addIndex = function(t) {
return this.indexBuffer = t, this.dirty = !0, this
}, i.prototype.clear = function() {
return this.nativeVao && this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao), this.attributes.length = 0, this.indexBuffer = null, this
}, i.prototype.draw = function(t, e, r) {
var n = this.gl;
return this.indexBuffer ? n.drawElements(t, e || this.indexBuffer.data.length, n.UNSIGNED_SHORT, 2 * (r || 0)) : n.drawArrays(t, r, e || this.getSize()), this
}, i.prototype.destroy = function() {
this.gl = null, this.indexBuffer = null, this.attributes = null, this.nativeState = null, this.nativeVao && this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao), this.nativeVaoExtension = null, this.nativeVao = null
}, i.prototype.getSize = function() {
var t = this.attributes[0];
return t.buffer.data.length / (t.stride / 4 || t.attribute.size)
}
}, function(t, e, r) {
t.exports = {
compileProgram: r(47),
defaultValue: r(51),
extractAttributes: r(48),
extractUniforms: r(50),
generateUniformAccessObject: r(53),
setPrecision: r(52),
mapSize: r(49),
mapType: r(27)
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
if (o.default.tablet || o.default.phone) return 4;
return t
};
var n, i = r(29),
o = (n = i) && n.__esModule ? n : {
default: n
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function() {
return !(navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform))
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = {
mixin: function(t) {
! function(t) {
t.__plugins = {}, t.registerPlugin = function(e, r) {
t.__plugins[e] = r
}, t.prototype.initPlugins = function() {
for (var e in this.plugins = this.plugins || {}, t.__plugins) this.plugins[e] = new t.__plugins[e](this)
}, t.prototype.destroyPlugins = function() {
for (var t in this.plugins) this.plugins[t].destroy(), this.plugins[t] = null;
this.plugins = null
}
}(t)
}
}
}, function(t, e, r) {
"use strict";
function n(t, e) {
if (t && e)
for (var r = Object.keys(e), n = 0; n < r.length; ++n) {
var i = r[n];
Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i))
}
}
e.__esModule = !0, e.mixin = n, e.delayMixin = function(t, e) {
i.push(t, e)
}, e.performMixins = function() {
for (var t = 0; t < i.length; t += 2) n(i[t], i[t + 1]);
i.length = 0
};
var i = []
}, function(t, e, r) {
"use strict";
t.exports = function(t, e, r) {
var n, i = t.length;
if (!(e >= i || 0 === r)) {
var o = i - (r = e + r > i ? i - e : r);
for (n = e; n < o; ++n) t[n] = t[n + r];
t.length = o
}
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function() {
for (var t = [], e = [], r = 0; r < 32; r++) t[r] = r, e[r] = r;
t[n.BLEND_MODES.NORMAL_NPM] = n.BLEND_MODES.NORMAL, t[n.BLEND_MODES.ADD_NPM] = n.BLEND_MODES.ADD, t[n.BLEND_MODES.SCREEN_NPM] = n.BLEND_MODES.SCREEN, e[n.BLEND_MODES.NORMAL] = n.BLEND_MODES.NORMAL_NPM, e[n.BLEND_MODES.ADD] = n.BLEND_MODES.ADD_NPM, e[n.BLEND_MODES.SCREEN] = n.BLEND_MODES.SCREEN_NPM;
var i = [];
return i.push(e), i.push(t), i
};
var n = r(1)
}, function(t, e, r) {
(function(t, n) {
var i; /*! https://mths.be/punycode v1.4.1 by @mathias */
! function(o) {
"object" == typeof e && e && e.nodeType, "object" == typeof t && t && t.nodeType;
var a = "object" == typeof n && n;
a.global !== a && a.window !== a && a.self;
var s, u = 2147483647,
l = 36,
h = 1,
c = 26,
f = 38,
d = 700,
p = 72,
v = 128,
y = "-",
g = /^xn--/,
m = /[^\x20-\x7E]/,
_ = /[\x2E\u3002\uFF0E\uFF61]/g,
b = {
overflow: "Overflow: input needs wider integers to process",
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
"invalid-input": "Invalid input"
},
x = l - h,
w = Math.floor,
T = String.fromCharCode;
function E(t) {
throw new RangeError(b[t])
}
function S(t, e) {
for (var r = t.length, n = []; r--;) n[r] = e(t[r]);
return n
}
function M(t, e) {
var r = t.split("@"),
n = "";
return r.length > 1 && (n = r[0] + "@", t = r[1]), n + S((t = t.replace(_, ".")).split("."), e).join(".")
}
function P(t) {
for (var e, r, n = [], i = 0, o = t.length; i < o;)(e = t.charCodeAt(i++)) >= 55296 && e <= 56319 && i < o ? 56320 == (64512 & (r = t.charCodeAt(i++))) ? n.push(((1023 & e) << 10) + (1023 & r) + 65536) : (n.push(e), i--) : n.push(e);
return n
}
function O(t) {
return S(t, function(t) {
var e = "";
return t > 65535 && (e += T((t -= 65536) >>> 10 & 1023 | 55296), t = 56320 | 1023 & t), e += T(t)
}).join("")
}
function C(t, e) {
return t + 22 + 75 * (t < 26) - ((0 != e) << 5)
}
function A(t, e, r) {
var n = 0;
for (t = r ? w(t / d) : t >> 1, t += w(t / e); t > x * c >> 1; n += l) t = w(t / x);
return w(n + (x + 1) * t / (t + f))
}
function R(t) {
var e, r, n, i, o, a, s, f, d, g, m, _ = [],
b = t.length,
x = 0,
T = v,
S = p;
for ((r = t.lastIndexOf(y)) < 0 && (r = 0), n = 0; n < r; ++n) t.charCodeAt(n) >= 128 && E("not-basic"), _.push(t.charCodeAt(n));
for (i = r > 0 ? r + 1 : 0; i < b;) {
for (o = x, a = 1, s = l; i >= b && E("invalid-input"), ((f = (m = t.charCodeAt(i++)) - 48 < 10 ? m - 22 : m - 65 < 26 ? m - 65 : m - 97 < 26 ? m - 97 : l) >= l || f > w((u - x) / a)) && E("overflow"), x += f * a, !(f < (d = s <= S ? h : s >= S + c ? c : s - S)); s += l) a > w(u / (g = l - d)) && E("overflow"), a *= g;
S = A(x - o, e = _.length + 1, 0 == o), w(x / e) > u - T && E("overflow"), T += w(x / e), x %= e, _.splice(x++, 0, T)
}
return O(_)
}
function I(t) {
var e, r, n, i, o, a, s, f, d, g, m, _, b, x, S, M = [];
for (_ = (t = P(t)).length, e = v, r = 0, o = p, a = 0; a < _; ++a)(m = t[a]) < 128 && M.push(T(m));
for (n = i = M.length, i && M.push(y); n < _;) {
for (s = u, a = 0; a < _; ++a)(m = t[a]) >= e && m < s && (s = m);
for (s - e > w((u - r) / (b = n + 1)) && E("overflow"), r += (s - e) * b, e = s, a = 0; a < _; ++a)
if ((m = t[a]) < e && ++r > u && E("overflow"), m == e) {
for (f = r, d = l; !(f < (g = d <= o ? h : d >= o + c ? c : d - o)); d += l) S = f - g, x = l - g, M.push(T(C(g + S % x, 0))), f = w(S / x);
M.push(T(C(f, 0))), o = A(r, b, n == i), r = 0, ++n
}++r, ++e
}
return M.join("")
}
s = {
version: "1.4.1",
ucs2: {
decode: P,
encode: O
},
decode: R,
encode: I,
toASCII: function(t) {
return M(t, function(t) {
return m.test(t) ? "xn--" + I(t) : t
})
},
toUnicode: function(t) {
return M(t, function(t) {
return g.test(t) ? R(t.slice(4).toLowerCase()) : t
})
}
}, void 0 === (i = function() {
return s
}.call(e, r, e, t)) || (t.exports = i)
}()
}).call(this, r(126)(t), r(23))
}, function(t, e) {
t.exports = function(t) {
return t.webpackPolyfill || (t.deprecate = function() {}, t.paths = [], t.children || (t.children = []), Object.defineProperty(t, "loaded", {
enumerable: !0,
get: function() {
return t.l
}
}), Object.defineProperty(t, "id", {
enumerable: !0,
get: function() {
return t.i
}
}), t.webpackPolyfill = 1), t
}
}, function(t, e, r) {
"use strict";
t.exports = {
isString: function(t) {
return "string" == typeof t
},
isObject: function(t) {
return "object" == typeof t && null !== t
},
isNull: function(t) {
return null === t
},
isNullOrUndefined: function(t) {
return null == t
}
}
}, function(t, e, r) {
"use strict";
e.decode = e.parse = r(129), e.encode = e.stringify = r(130)
}, function(t, e, r) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
function n(t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}
t.exports = function(t, e, r, o) {
e = e || "&", r = r || "=";
var a = {};
if ("string" != typeof t || 0 === t.length) return a;
var s = /\+/g;
t = t.split(e);
var u = 1e3;
o && "number" == typeof o.maxKeys && (u = o.maxKeys);
var l = t.length;
u > 0 && l > u && (l = u);
for (var h = 0; h < l; ++h) {
var c, f, d, p, v = t[h].replace(s, "%20"),
y = v.indexOf(r);
y >= 0 ? (c = v.substr(0, y), f = v.substr(y + 1)) : (c = v, f = ""), d = decodeURIComponent(c), p = decodeURIComponent(f), n(a, d) ? i(a[d]) ? a[d].push(p) : a[d] = [a[d], p] : a[d] = p
}
return a
};
var i = Array.isArray || function(t) {
return "[object Array]" === Object.prototype.toString.call(t)
}
}, function(t, e, r) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var n = function(t) {
switch (typeof t) {
case "string":
return t;
case "boolean":
return t ? "true" : "false";
case "number":
return isFinite(t) ? t : "";
default:
return ""
}
};
t.exports = function(t, e, r, s) {
return e = e || "&", r = r || "=", null === t && (t = void 0), "object" == typeof t ? o(a(t), function(a) {
var s = encodeURIComponent(n(a)) + r;
return i(t[a]) ? o(t[a], function(t) {
return s + encodeURIComponent(n(t))
}).join(e) : s + encodeURIComponent(n(t[a]))
}).join(e) : s ? encodeURIComponent(n(s)) + r + encodeURIComponent(n(t)) : ""
};
var i = Array.isArray || function(t) {
return "[object Array]" === Object.prototype.toString.call(t)
};
function o(t, e) {
if (t.map) return t.map(e);
for (var r = [], n = 0; n < t.length; n++) r.push(e(t[n], n));
return r
}
var a = Object.keys || function(t) {
var e = [];
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r);
return e
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = s(r(4)),
o = r(1),
a = s(r(132));
function s(t) {
return t && t.__esModule ? t : {
default: t
}
}
var u = function() {
function t() {
var e = this;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this._head = new a.default(null, null, 1 / 0), this._requestId = null, this._maxElapsedMS = 100, this.autoStart = !1, this.deltaTime = 1, this.elapsedMS = 1 / i.default.TARGET_FPMS, this.lastTime = -1, this.speed = 1, this.started = !1, this._tick = function(t) {
e._requestId = null, e.started && (e.update(t), e.started && null === e._requestId && e._head.next && (e._requestId = requestAnimationFrame(e._tick)))
}
}
return t.prototype._requestIfNeeded = function() {
null === this._requestId && this._head.next && (this.lastTime = performance.now(), this._requestId = requestAnimationFrame(this._tick))
}, t.prototype._cancelIfNeeded = function() {
null !== this._requestId && (cancelAnimationFrame(this._requestId), this._requestId = null)
}, t.prototype._startIfPossible = function() {
this.started ? this._requestIfNeeded() : this.autoStart && this.start()
}, t.prototype.add = function(t, e) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : o.UPDATE_PRIORITY.NORMAL;
return this._addListener(new a.default(t, e, r))
}, t.prototype.addOnce = function(t, e) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : o.UPDATE_PRIORITY.NORMAL;
return this._addListener(new a.default(t, e, r, !0))
}, t.prototype._addListener = function(t) {
var e = this._head.next,
r = this._head;
if (e) {
for (; e;) {
if (t.priority > e.priority) {
t.connect(r);
break
}
r = e, e = e.next
}
t.previous || t.connect(r)
} else t.connect(r);
return this._startIfPossible(), this
}, t.prototype.remove = function(t, e) {
for (var r = this._head.next; r;) r = r.match(t, e) ? r.destroy() : r.next;
return this._head.next || this._cancelIfNeeded(), this
}, t.prototype.start = function() {
this.started || (this.started = !0, this._requestIfNeeded())
}, t.prototype.stop = function() {
this.started && (this.started = !1, this._cancelIfNeeded())
}, t.prototype.destroy = function() {
this.stop();
for (var t = this._head.next; t;) t = t.destroy(!0);
this._head.destroy(), this._head = null
}, t.prototype.update = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : performance.now(),
e = void 0;
if (t > this.lastTime) {
(e = this.elapsedMS = t - this.lastTime) > this._maxElapsedMS && (e = this._maxElapsedMS), this.deltaTime = e * i.default.TARGET_FPMS * this.speed;
for (var r = this._head, n = r.next; n;) n = n.emit(this.deltaTime);
r.next || this._cancelIfNeeded()
} else this.deltaTime = this.elapsedMS = 0;
this.lastTime = t
}, n(t, [{
key: "FPS",
get: function() {
return 1e3 / this.elapsedMS
}
}, {
key: "minFPS",
get: function() {
return 1e3 / this._maxElapsedMS
},
set: function(t) {
var e = Math.min(Math.max(0, t) / 1e3, i.default.TARGET_FPMS);
this._maxElapsedMS = 1 / e
}
}]), t
}();
e.default = u
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e) {
var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null,
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
i = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.fn = e, this.context = r, this.priority = n, this.once = i, this.next = null, this.previous = null, this._destroyed = !1
}
return t.prototype.match = function(t, e) {
return e = e || null, this.fn === t && this.context === e
}, t.prototype.emit = function(t) {
this.fn && (this.context ? this.fn.call(this.context, t) : this.fn(t));
var e = this.next;
return this.once && this.destroy(!0), this._destroyed && (this.next = null), e
}, t.prototype.connect = function(t) {
this.previous = t, t.next && (t.next.previous = this), this.next = t.next, t.next = this
}, t.prototype.destroy = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
this._destroyed = !0, this.fn = null, this.context = null, this.previous && (this.previous.next = this.next), this.next && (this.next.previous = this.previous);
var e = this.previous;
return this.next = t ? null : e, this.previous = null, e
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = s(r(12)),
i = r(1),
o = r(5),
a = s(r(35));
function s(t) {
return t && t.__esModule ? t : {
default: t
}
}
var u = new o.Matrix,
l = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e
}
return t.prototype.render = function(t) {
var e = t._texture,
r = this.renderer,
n = e._frame.width,
s = e._frame.height,
l = t.transform.worldTransform,
h = 0,
c = 0;
if (!(e.orig.width <= 0 || e.orig.height <= 0) && e.baseTexture.source && (r.setBlendMode(t.blendMode), e.valid)) {
r.context.globalAlpha = t.worldAlpha;
var f = e.baseTexture.scaleMode === i.SCALE_MODES.LINEAR;
r.smoothProperty && r.context[r.smoothProperty] !== f && (r.context[r.smoothProperty] = f), e.trim ? (h = e.trim.width / 2 + e.trim.x - t.anchor.x * e.orig.width, c = e.trim.height / 2 + e.trim.y - t.anchor.y * e.orig.height) : (h = (.5 - t.anchor.x) * e.orig.width, c = (.5 - t.anchor.y) * e.orig.height), e.rotate && (l.copy(u), l = u, o.GroupD8.matrixAppendRotationInv(l, e.rotate, h, c), h = 0, c = 0), h -= n / 2, c -= s / 2, r.roundPixels ? (r.context.setTransform(l.a, l.b, l.c, l.d, l.tx * r.resolution | 0, l.ty * r.resolution | 0), h |= 0, c |= 0) : r.context.setTransform(l.a, l.b, l.c, l.d, l.tx * r.resolution, l.ty * r.resolution);
var d = e.baseTexture.resolution;
16777215 !== t.tint ? (t.cachedTint === t.tint && t.tintedTexture.tintId === t._texture._updateID || (t.cachedTint = t.tint, t.tintedTexture = a.default.getTintedTexture(t, t.tint)), r.context.drawImage(t.tintedTexture, 0, 0, n * d, s * d, h * r.resolution, c * r.resolution, n * r.resolution, s * r.resolution)) : r.context.drawImage(e.baseTexture.source, e._frame.x * d, e._frame.y * d, n * d, s * d, h * r.resolution, c * r.resolution, n * r.resolution, s * r.resolution)
}
}, t.prototype.destroy = function() {
this.renderer = null
}, t
}();
e.default = l, n.default.registerPlugin("sprite", l)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(1);
var i = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e
}
return t.prototype.pushMask = function(t) {
var e = this.renderer;
e.context.save();
var r = t.alpha,
n = t.transform.worldTransform,
i = e.resolution;
e.context.setTransform(n.a * i, n.b * i, n.c * i, n.d * i, n.tx * i, n.ty * i), t._texture || (this.renderGraphicsShape(t), e.context.clip()), t.worldAlpha = r
}, t.prototype.renderGraphicsShape = function(t) {
var e = this.renderer.context,
r = t.graphicsData.length;
if (0 !== r) {
e.beginPath();
for (var i = 0; i < r; i++) {
var o = t.graphicsData[i],
a = o.shape;
if (o.type === n.SHAPES.POLY) {
var s = a.points;
e.moveTo(s[0], s[1]);
for (var u = 1; u < s.length / 2; u++) e.lineTo(s[2 * u], s[2 * u + 1]);
s[0] === s[s.length - 2] && s[1] === s[s.length - 1] && e.closePath()
} else if (o.type === n.SHAPES.RECT) e.rect(a.x, a.y, a.width, a.height), e.closePath();
else if (o.type === n.SHAPES.CIRC) e.arc(a.x, a.y, a.radius, 0, 2 * Math.PI), e.closePath();
else if (o.type === n.SHAPES.ELIP) {
var l = 2 * a.width,
h = 2 * a.height,
c = a.x - l / 2,
f = a.y - h / 2,
d = l / 2 * .5522848,
p = h / 2 * .5522848,
v = c + l,
y = f + h,
g = c + l / 2,
m = f + h / 2;
e.moveTo(c, m), e.bezierCurveTo(c, m - p, g - d, f, g, f), e.bezierCurveTo(g + d, f, v, m - p, v, m), e.bezierCurveTo(v, m + p, g + d, y, g, y), e.bezierCurveTo(g - d, y, c, m + p, c, m), e.closePath()
} else if (o.type === n.SHAPES.RREC) {
var _ = a.x,
b = a.y,
x = a.width,
w = a.height,
T = a.radius,
E = Math.min(x, w) / 2 | 0;
T = T > E ? E : T, e.moveTo(_, b + T), e.lineTo(_, b + w - T), e.quadraticCurveTo(_, b + w, _ + T, b + w), e.lineTo(_ + x - T, b + w), e.quadraticCurveTo(_ + x, b + w, _ + x, b + w - T), e.lineTo(_ + x, b + T), e.quadraticCurveTo(_ + x, b, _ + x - T, b), e.lineTo(_ + T, b), e.quadraticCurveTo(_, b, _, b + T), e.closePath()
}
}
}
}, t.prototype.popMask = function(t) {
t.context.restore(), t.invalidateBlendMode()
}, t.prototype.destroy = function() {}, t
}();
e.default = i
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
(0, a.default)() ? (t[i.BLEND_MODES.NORMAL] = "source-over", t[i.BLEND_MODES.ADD] = "lighter", t[i.BLEND_MODES.MULTIPLY] = "multiply", t[i.BLEND_MODES.SCREEN] = "screen", t[i.BLEND_MODES.OVERLAY] = "overlay", t[i.BLEND_MODES.DARKEN] = "darken", t[i.BLEND_MODES.LIGHTEN] = "lighten", t[i.BLEND_MODES.COLOR_DODGE] = "color-dodge", t[i.BLEND_MODES.COLOR_BURN] = "color-burn", t[i.BLEND_MODES.HARD_LIGHT] = "hard-light", t[i.BLEND_MODES.SOFT_LIGHT] = "soft-light", t[i.BLEND_MODES.DIFFERENCE] = "difference", t[i.BLEND_MODES.EXCLUSION] = "exclusion", t[i.BLEND_MODES.HUE] = "hue", t[i.BLEND_MODES.SATURATION] = "saturate", t[i.BLEND_MODES.COLOR] = "color", t[i.BLEND_MODES.LUMINOSITY] = "luminosity") : (t[i.BLEND_MODES.NORMAL] = "source-over", t[i.BLEND_MODES.ADD] = "lighter", t[i.BLEND_MODES.MULTIPLY] = "source-over", t[i.BLEND_MODES.SCREEN] = "source-over", t[i.BLEND_MODES.OVERLAY] = "source-over", t[i.BLEND_MODES.DARKEN] = "source-over", t[i.BLEND_MODES.LIGHTEN] = "source-over", t[i.BLEND_MODES.COLOR_DODGE] = "source-over", t[i.BLEND_MODES.COLOR_BURN] = "source-over", t[i.BLEND_MODES.HARD_LIGHT] = "source-over", t[i.BLEND_MODES.SOFT_LIGHT] = "source-over", t[i.BLEND_MODES.DIFFERENCE] = "source-over", t[i.BLEND_MODES.EXCLUSION] = "source-over", t[i.BLEND_MODES.HUE] = "source-over", t[i.BLEND_MODES.SATURATION] = "source-over", t[i.BLEND_MODES.COLOR] = "source-over", t[i.BLEND_MODES.LUMINOSITY] = "source-over");
return t[i.BLEND_MODES.NORMAL_NPM] = t[i.BLEND_MODES.NORMAL], t[i.BLEND_MODES.ADD_NPM] = t[i.BLEND_MODES.ADD], t[i.BLEND_MODES.SCREEN_NPM] = t[i.BLEND_MODES.SCREEN], t
};
var n, i = r(1),
o = r(64),
a = (n = o) && n.__esModule ? n : {
default: n
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = d(r(18)),
i = d(r(19)),
o = d(r(36)),
a = d(r(149)),
s = d(r(150)),
u = d(r(151)),
l = d(r(4)),
h = r(3),
c = d(r(6)),
f = d(r(32));
function d(t) {
return t && t.__esModule ? t : {
default: t
}
}
var p = 0,
v = 0,
y = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
n.vertSize = 5, n.vertByteSize = 4 * n.vertSize, n.size = l.default.SPRITE_BATCH_SIZE, n.buffers = [];
for (var i = 1; i <= f.default.nextPow2(n.size); i *= 2) n.buffers.push(new u.default(4 * i * n.vertByteSize));
n.indices = (0, o.default)(n.size), n.shader = null, n.currentIndex = 0, n.groups = [];
for (var a = 0; a < n.size; a++) n.groups[a] = {
textures: [],
textureCount: 0,
ids: [],
size: 0,
start: 0,
blend: 0
};
return n.sprites = [], n.vertexBuffers = [], n.vaos = [], n.vaoMax = 2, n.vertexCount = 0, n.renderer.on("prerender", n.onPrerender, n), n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.onContextChange = function() {
var t = this.renderer.gl;
this.renderer.legacy ? this.MAX_TEXTURES = 1 : (this.MAX_TEXTURES = Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), l.default.SPRITE_MAX_TEXTURES), this.MAX_TEXTURES = (0, s.default)(this.MAX_TEXTURES, t)), this.shader = (0, a.default)(t, this.MAX_TEXTURES), this.indexBuffer = c.default.GLBuffer.createIndexBuffer(t, this.indices, t.STATIC_DRAW), this.renderer.bindVao(null);
for (var e = this.shader.attributes, r = 0; r < this.vaoMax; r++) {
var n = this.vertexBuffers[r] = c.default.GLBuffer.createVertexBuffer(t, null, t.STREAM_DRAW),
i = this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(n, e.aVertexPosition, t.FLOAT, !1, this.vertByteSize, 0).addAttribute(n, e.aTextureCoord, t.UNSIGNED_SHORT, !0, this.vertByteSize, 8).addAttribute(n, e.aColor, t.UNSIGNED_BYTE, !0, this.vertByteSize, 12);
e.aTextureId && i.addAttribute(n, e.aTextureId, t.FLOAT, !1, this.vertByteSize, 16), this.vaos[r] = i
}
this.vao = this.vaos[0], this.currentBlendMode = 99999, this.boundTextures = new Array(this.MAX_TEXTURES)
}, e.prototype.onPrerender = function() {
this.vertexCount = 0
}, e.prototype.render = function(t) {
this.currentIndex >= this.size && this.flush(), t._texture._uvs && (this.sprites[this.currentIndex++] = t)
}, e.prototype.flush = function() {
if (0 !== this.currentIndex) {
var t = this.renderer.gl,
e = this.MAX_TEXTURES,
r = f.default.nextPow2(this.currentIndex),
n = f.default.log2(r),
i = this.buffers[n],
o = this.sprites,
a = this.groups,
s = i.float32View,
u = i.uint32View,
d = this.boundTextures,
y = this.renderer.boundTextures,
g = this.renderer.textureGC.count,
m = 0,
_ = void 0,
b = void 0,
x = 1,
w = 0,
T = a[0],
E = void 0,
S = void 0,
M = h.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha ? 1 : 0][o[0].blendMode];
T.textureCount = 0, T.start = 0, T.blend = M, p++;
var P = void 0;
for (P = 0; P < e; ++P) {
var O = y[P];
O._enabled !== p ? (d[P] = O, O._virtalBoundId = P, O._enabled = p) : d[P] = this.renderer.emptyTextures[P]
}
for (p++, P = 0; P < this.currentIndex; ++P) {
var C = o[P];
_ = C._texture.baseTexture;
var A = h.premultiplyBlendMode[Number(_.premultipliedAlpha)][C.blendMode];
if (M !== A && (M = A, b = null, w = e, p++), b !== _ && (b = _, _._enabled !== p)) {
if (w === e && (p++, T.size = P - T.start, w = 0, (T = a[x++]).blend = M, T.textureCount = 0, T.start = P), _.touched = g, -1 === _._virtalBoundId)
for (var R = 0; R < e; ++R) {
var I = (R + v) % e,
D = d[I];
if (D._enabled !== p) {
v++, D._virtalBoundId = -1, _._virtalBoundId = I, d[I] = _;
break
}
}
_._enabled = p, T.textureCount++, T.ids[w] = _._virtalBoundId, T.textures[w++] = _
}
if (E = C.vertexData, S = C._texture._uvs.uvsUint32, this.renderer.roundPixels) {
var k = this.renderer.resolution;
s[m] = (E[0] * k | 0) / k, s[m + 1] = (E[1] * k | 0) / k, s[m + 5] = (E[2] * k | 0) / k, s[m + 6] = (E[3] * k | 0) / k, s[m + 10] = (E[4] * k | 0) / k, s[m + 11] = (E[5] * k | 0) / k, s[m + 15] = (E[6] * k | 0) / k, s[m + 16] = (E[7] * k | 0) / k
} else s[m] = E[0], s[m + 1] = E[1], s[m + 5] = E[2], s[m + 6] = E[3], s[m + 10] = E[4], s[m + 11] = E[5], s[m + 15] = E[6], s[m + 16] = E[7];
u[m + 2] = S[0], u[m + 7] = S[1], u[m + 12] = S[2], u[m + 17] = S[3];
var N = Math.min(C.worldAlpha, 1),
L = N < 1 && _.premultipliedAlpha ? (0, h.premultiplyTint)(C._tintRGB, N) : C._tintRGB + (255 * N << 24);
u[m + 3] = u[m + 8] = u[m + 13] = u[m + 18] = L, s[m + 4] = s[m + 9] = s[m + 14] = s[m + 19] = _._virtalBoundId, m += 20
}
if (T.size = P - T.start, l.default.CAN_UPLOAD_SAME_BUFFER) this.vertexBuffers[this.vertexCount].upload(i.vertices, 0, !0);
else {
if (this.vaoMax <= this.vertexCount) {
this.vaoMax++;
var j = this.shader.attributes,
F = this.vertexBuffers[this.vertexCount] = c.default.GLBuffer.createVertexBuffer(t, null, t.STREAM_DRAW),
B = this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(F, j.aVertexPosition, t.FLOAT, !1, this.vertByteSize, 0).addAttribute(F, j.aTextureCoord, t.UNSIGNED_SHORT, !0, this.vertByteSize, 8).addAttribute(F, j.aColor, t.UNSIGNED_BYTE, !0, this.vertByteSize, 12);
j.aTextureId && B.addAttribute(F, j.aTextureId, t.FLOAT, !1, this.vertByteSize, 16), this.vaos[this.vertexCount] = B
}
this.renderer.bindVao(this.vaos[this.vertexCount]), this.vertexBuffers[this.vertexCount].upload(i.vertices, 0, !1), this.vertexCount++
}
for (P = 0; P < e; ++P) y[P]._virtalBoundId = -1;
for (P = 0; P < x; ++P) {
for (var U = a[P], X = U.textureCount, V = 0; V < X; V++) b = U.textures[V], y[U.ids[V]] !== b && this.renderer.bindTexture(b, U.ids[V], !0), b._virtalBoundId = -1;
this.renderer.state.setBlendMode(U.blend), t.drawElements(t.TRIANGLES, 6 * U.size, t.UNSIGNED_SHORT, 6 * U.start * 2)
}
this.currentIndex = 0
}
}, e.prototype.start = function() {
this.renderer.bindShader(this.shader), l.default.CAN_UPLOAD_SAME_BUFFER && (this.renderer.bindVao(this.vaos[this.vertexCount]), this.vertexBuffers[this.vertexCount].bind())
}, e.prototype.stop = function() {
this.flush()
}, e.prototype.destroy = function() {
for (var e = 0; e < this.vaoMax; e++) this.vertexBuffers[e] && this.vertexBuffers[e].destroy(), this.vaos[e] && this.vaos[e].destroy();
this.indexBuffer && this.indexBuffer.destroy(), this.renderer.off("prerender", this.onPrerender, this), t.prototype.destroy.call(this), this.shader && (this.shader.destroy(), this.shader = null), this.vertexBuffers = null, this.vaos = null, this.indexBuffer = null, this.indices = null, this.sprites = null;
for (var r = 0; r < this.buffers.length; ++r) this.buffers[r].destroy()
}, e
}(n.default);
e.default = y, i.default.registerPlugin("sprite", y)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = o(r(13)),
i = o(r(65));
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
var a = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return n.scissor = !1, n.scissorData = null, n.scissorRenderTarget = null, n.enableScissor = !0, n.alphaMaskPool = [], n.alphaMaskIndex = 0, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.pushMask = function(t, e) {
if (e.texture) this.pushSpriteMask(t, e);
else if (this.enableScissor && !this.scissor && this.renderer._activeRenderTarget.root && !this.renderer.stencilManager.stencilMaskStack.length && e.isFastRect()) {
var r = e.worldTransform,
n = Math.atan2(r.b, r.a);
(n = Math.round(n * (180 / Math.PI))) % 90 ? this.pushStencilMask(e) : this.pushScissorMask(t, e)
} else this.pushStencilMask(e)
}, e.prototype.popMask = function(t, e) {
e.texture ? this.popSpriteMask(t, e) : this.enableScissor && !this.renderer.stencilManager.stencilMaskStack.length ? this.popScissorMask(t, e) : this.popStencilMask(t, e)
}, e.prototype.pushSpriteMask = function(t, e) {
var r = this.alphaMaskPool[this.alphaMaskIndex];
r || (r = this.alphaMaskPool[this.alphaMaskIndex] = [new i.default(e)]), r[0].resolution = this.renderer.resolution, r[0].maskSprite = e, t.filterArea = e.getBounds(!0), this.renderer.filterManager.pushFilter(t, r), this.alphaMaskIndex++
}, e.prototype.popSpriteMask = function() {
this.renderer.filterManager.popFilter(), this.alphaMaskIndex--
}, e.prototype.pushStencilMask = function(t) {
this.renderer.currentRenderer.stop(), this.renderer.stencilManager.pushStencil(t)
}, e.prototype.popStencilMask = function() {
this.renderer.currentRenderer.stop(), this.renderer.stencilManager.popStencil()
}, e.prototype.pushScissorMask = function(t, e) {
e.renderable = !0;
var r = this.renderer._activeRenderTarget,
n = e.getBounds();
n.fit(r.size), e.renderable = !1, this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);
var i = this.renderer.resolution;
this.renderer.gl.scissor(n.x * i, (r.root ? r.size.height - n.y - n.height : n.y) * i, n.width * i, n.height * i), this.scissorRenderTarget = r, this.scissorData = e, this.scissor = !0
}, e.prototype.popScissorMask = function() {
this.scissorRenderTarget = null, this.scissorData = null, this.scissor = !1;
var t = this.renderer.gl;
t.disable(t.SCISSOR_TEST)
}, e
}(n.default);
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
var n = a(t),
i = a(e);
return Object.assign(n, i)
};
var n, i = r(6);
var o = ((n = i) && n.__esModule ? n : {
default: n
}).default.shader.defaultValue;
function a(t) {
for (var e = new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"), r = {}, n = void 0, i = t.replace(/\s+/g, " ").split(/\s*;\s*/), a = 0; a < i.length; a++) {
var s = i[a].trim();
if (s.indexOf("uniform") > -1) {
var u = s.split(" "),
l = u[1],
h = u[2],
c = 1;
h.indexOf("[") > -1 && (h = (n = h.split(/\[|]/))[0], c *= Number(n[1])), h.match(e) || (r[h] = {
value: o(l, c),
name: h,
type: l
})
}
}
return r
}
}, function(t, e) {
var r, n, i = t.exports = {};
function o() {
throw new Error("setTimeout has not been defined")
}
function a() {
throw new Error("clearTimeout has not been defined")
}
function s(t) {
if (r === setTimeout) return setTimeout(t, 0);
if ((r === o || !r) && setTimeout) return r = setTimeout, setTimeout(t, 0);
try {
return r(t, 0)
} catch (e) {
try {
return r.call(null, t, 0)
} catch (e) {
return r.call(this, t, 0)
}
}
}! function() {
try {
r = "function" == typeof setTimeout ? setTimeout : o
} catch (t) {
r = o
}
try {
n = "function" == typeof clearTimeout ? clearTimeout : a
} catch (t) {
n = a
}
}();
var u, l = [],
h = !1,
c = -1;
function f() {
h && u && (h = !1, u.length ? l = u.concat(l) : c = -1, l.length && d())
}
function d() {
if (!h) {
var t = s(f);
h = !0;
for (var e = l.length; e;) {
for (u = l, l = []; ++c < e;) u && u[c].run();
c = -1, e = l.length
}
u = null, h = !1,
function(t) {
if (n === clearTimeout) return clearTimeout(t);
if ((n === a || !n) && clearTimeout) return n = clearTimeout, clearTimeout(t);
try {
n(t)
} catch (e) {
try {
return n.call(null, t)
} catch (e) {
return n.call(this, t)
}
}
}(t)
}
}
function p(t, e) {
this.fun = t, this.array = e
}
function v() {}
i.nextTick = function(t) {
var e = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
l.push(new p(t, e)), 1 !== l.length || h || s(d)
}, p.prototype.run = function() {
this.fun.apply(null, this.array)
}, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {}, i.on = v, i.addListener = v, i.once = v, i.off = v, i.removeListener = v, i.removeAllListeners = v, i.emit = v, i.prependListener = v, i.prependOnceListener = v, i.listeners = function(t) {
return []
}, i.binding = function(t) {
throw new Error("process.binding is not supported")
}, i.cwd = function() {
return "/"
}, i.chdir = function(t) {
throw new Error("process.chdir is not supported")
}, i.umask = function() {
return 0
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(13),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return n.stencilMaskStack = null, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.setMaskStack = function(t) {
this.stencilMaskStack = t;
var e = this.renderer.gl;
0 === t.length ? e.disable(e.STENCIL_TEST) : e.enable(e.STENCIL_TEST)
}, e.prototype.pushStencil = function(t) {
this.renderer.setObjectRenderer(this.renderer.plugins.graphics), this.renderer._activeRenderTarget.attachStencilBuffer();
var e = this.renderer.gl,
r = this.stencilMaskStack.length;
0 === r && e.enable(e.STENCIL_TEST), this.stencilMaskStack.push(t), e.colorMask(!1, !1, !1, !1), e.stencilFunc(e.EQUAL, r, this._getBitwiseMask()), e.stencilOp(e.KEEP, e.KEEP, e.INCR), this.renderer.plugins.graphics.render(t), this._useCurrent()
}, e.prototype.popStencil = function() {
this.renderer.setObjectRenderer(this.renderer.plugins.graphics);
var t = this.renderer.gl,
e = this.stencilMaskStack.pop();
0 === this.stencilMaskStack.length ? (t.disable(t.STENCIL_TEST), t.clear(t.STENCIL_BUFFER_BIT), t.clearStencil(0)) : (t.colorMask(!1, !1, !1, !1), t.stencilOp(t.KEEP, t.KEEP, t.DECR), this.renderer.plugins.graphics.render(e), this._useCurrent())
}, e.prototype._useCurrent = function() {
var t = this.renderer.gl;
t.colorMask(!0, !0, !0, !0), t.stencilFunc(t.EQUAL, this.stencilMaskStack.length, this._getBitwiseMask()), t.stencilOp(t.KEEP, t.KEEP, t.KEEP)
}, e.prototype._getBitwiseMask = function() {
return (1 << this.stencilMaskStack.length) - 1
}, e.prototype.destroy = function() {
o.default.prototype.destroy.call(this), this.stencilMaskStack.stencilStack = null
}, e
}(o.default);
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = h(r(13)),
i = h(r(20)),
o = h(r(68)),
a = r(5),
s = h(r(14)),
u = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(142)),
l = h(r(32));
function h(t) {
return t && t.__esModule ? t : {
default: t
}
}
function c(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}
var f = function t() {
c(this, t), this.renderTarget = null, this.sourceFrame = new a.Rectangle, this.destinationFrame = new a.Rectangle, this.filters = [], this.target = null, this.resolution = 1
},
d = function(t) {
function e(r) {
c(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return n.gl = n.renderer.gl, n.quad = new o.default(n.gl, r.state.attribState), n.shaderCache = {}, n.pool = {}, n.filterData = null, n.managedFilters = [], n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.pushFilter = function(t, e) {
var r = this.renderer,
n = this.filterData;
if (!n) {
n = this.renderer._activeRenderTarget.filterStack;
var i = new f;
i.sourceFrame = i.destinationFrame = this.renderer._activeRenderTarget.size, i.renderTarget = r._activeRenderTarget, this.renderer._activeRenderTarget.filterData = n = {
index: 0,
stack: [i]
}, this.filterData = n
}
var o = n.stack[++n.index];
o || (o = n.stack[n.index] = new f);
var a = e[0].resolution,
s = 0 | e[0].padding,
u = t.filterArea || t.getBounds(!0),
l = o.sourceFrame,
h = o.destinationFrame;
l.x = (u.x * a | 0) / a, l.y = (u.y * a | 0) / a, l.width = (u.width * a | 0) / a, l.height = (u.height * a | 0) / a, n.stack[0].renderTarget.transform || e[0].autoFit && l.fit(n.stack[0].destinationFrame), l.pad(s), h.width = l.width, h.height = l.height;
var c = this.getPotRenderTarget(r.gl, l.width, l.height, a);
o.target = t, o.filters = e, o.resolution = a, o.renderTarget = c, c.setFrame(h, l), r.bindRenderTarget(c), c.clear()
}, e.prototype.popFilter = function() {
var t = this.filterData,
e = t.stack[t.index - 1],
r = t.stack[t.index];
this.quad.map(r.renderTarget.size, r.sourceFrame).upload();
var n = r.filters;
if (1 === n.length) n[0].apply(this, r.renderTarget, e.renderTarget, !1, r), this.freePotRenderTarget(r.renderTarget);
else {
var i = r.renderTarget,
o = this.getPotRenderTarget(this.renderer.gl, r.sourceFrame.width, r.sourceFrame.height, r.resolution);
o.setFrame(r.destinationFrame, r.sourceFrame), o.clear();
var a = 0;
for (a = 0; a < n.length - 1; ++a) {
n[a].apply(this, i, o, !0, r);
var s = i;
i = o, o = s
}
n[a].apply(this, i, e.renderTarget, !1, r), this.freePotRenderTarget(i), this.freePotRenderTarget(o)
}
t.index--, 0 === t.index && (this.filterData = null)
}, e.prototype.applyFilter = function(t, e, r, n) {
var i = this.renderer,
o = i.gl,
a = t.glShaders[i.CONTEXT_UID];
a || (t.glShaderKey ? (a = this.shaderCache[t.glShaderKey]) || (a = new s.default(this.gl, t.vertexSrc, t.fragmentSrc), t.glShaders[i.CONTEXT_UID] = this.shaderCache[t.glShaderKey] = a, this.managedFilters.push(t)) : (a = t.glShaders[i.CONTEXT_UID] = new s.default(this.gl, t.vertexSrc, t.fragmentSrc), this.managedFilters.push(t)), i.bindVao(null), this.quad.initVao(a)), i.bindVao(this.quad.vao), i.bindRenderTarget(r), n && (o.disable(o.SCISSOR_TEST), i.clear(), o.enable(o.SCISSOR_TEST)), r === i.maskManager.scissorRenderTarget && i.maskManager.pushScissorMask(null, i.maskManager.scissorData), i.bindShader(a);
var u = this.renderer.emptyTextures[0];
this.renderer.boundTextures[0] = u, this.syncUniforms(a, t), i.state.setBlendMode(t.blendMode), o.activeTexture(o.TEXTURE0), o.bindTexture(o.TEXTURE_2D, e.texture.texture), this.quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0), o.bindTexture(o.TEXTURE_2D, u._glTextures[this.renderer.CONTEXT_UID].texture)
}, e.prototype.syncUniforms = function(t, e) {
var r = e.uniformData,
n = e.uniforms,
i = 1,
o = void 0;
if (t.uniforms.filterArea) {
o = this.filterData.stack[this.filterData.index];
var a = t.uniforms.filterArea;
a[0] = o.renderTarget.size.width, a[1] = o.renderTarget.size.height, a[2] = o.sourceFrame.x, a[3] = o.sourceFrame.y, t.uniforms.filterArea = a
}
if (t.uniforms.filterClamp) {
o = o || this.filterData.stack[this.filterData.index];
var s = t.uniforms.filterClamp;
s[0] = 0, s[1] = 0, s[2] = (o.sourceFrame.width - 1) / o.renderTarget.size.width, s[3] = (o.sourceFrame.height - 1) / o.renderTarget.size.height, t.uniforms.filterClamp = s
}
for (var u in r) {
var l = r[u].type;
if ("sampler2d" === l && 0 !== n[u]) {
if (n[u].baseTexture) t.uniforms[u] = this.renderer.bindTexture(n[u].baseTexture, i);
else {
t.uniforms[u] = i;
var h = this.renderer.gl;
this.renderer.boundTextures[i] = this.renderer.emptyTextures[i], h.activeTexture(h.TEXTURE0 + i), n[u].texture.bind()
}
i++
} else if ("mat3" === l) void 0 !== n[u].a ? t.uniforms[u] = n[u].toArray(!0) : t.uniforms[u] = n[u];
else if ("vec2" === l)
if (void 0 !== n[u].x) {
var c = t.uniforms[u] || new Float32Array(2);
c[0] = n[u].x, c[1] = n[u].y, t.uniforms[u] = c
} else t.uniforms[u] = n[u];
else "float" === l ? t.uniforms.data[u].value !== r[u] && (t.uniforms[u] = n[u]) : t.uniforms[u] = n[u]
}
}, e.prototype.getRenderTarget = function(t, e) {
var r = this.filterData.stack[this.filterData.index],
n = this.getPotRenderTarget(this.renderer.gl, r.sourceFrame.width, r.sourceFrame.height, e || r.resolution);
return n.setFrame(r.destinationFrame, r.sourceFrame), n
}, e.prototype.returnRenderTarget = function(t) {
this.freePotRenderTarget(t)
}, e.prototype.calculateScreenSpaceMatrix = function(t) {
var e = this.filterData.stack[this.filterData.index];
return u.calculateScreenSpaceMatrix(t, e.sourceFrame, e.renderTarget.size)
}, e.prototype.calculateNormalizedScreenSpaceMatrix = function(t) {
var e = this.filterData.stack[this.filterData.index];
return u.calculateNormalizedScreenSpaceMatrix(t, e.sourceFrame, e.renderTarget.size, e.destinationFrame)
}, e.prototype.calculateSpriteMatrix = function(t, e) {
var r = this.filterData.stack[this.filterData.index];
return u.calculateSpriteMatrix(t, r.sourceFrame, r.renderTarget.size, e)
}, e.prototype.destroy = function() {
for (var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], e = this.renderer, r = this.managedFilters, n = 0; n < r.length; n++) t || r[n].glShaders[e.CONTEXT_UID].destroy(), delete r[n].glShaders[e.CONTEXT_UID];
this.shaderCache = {}, t ? this.pool = {} : this.emptyPool()
}, e.prototype.getPotRenderTarget = function(t, e, r, n) {
var o = (65535 & (e = l.default.nextPow2(e * n))) << 16 | 65535 & (r = l.default.nextPow2(r * n));
this.pool[o] || (this.pool[o] = []);
var a = this.pool[o].pop();
if (!a) {
var s = this.renderer.boundTextures[0];
t.activeTexture(t.TEXTURE0), a = new i.default(t, e, r, null, 1), t.bindTexture(t.TEXTURE_2D, s._glTextures[this.renderer.CONTEXT_UID].texture)
}
return a.resolution = n, a.defaultFrame.width = a.size.width = e / n, a.defaultFrame.height = a.size.height = r / n, a
}, e.prototype.emptyPool = function() {
for (var t in this.pool) {
var e = this.pool[t];
if (e)
for (var r = 0; r < e.length; r++) e[r].destroy(!0)
}
this.pool = {}
}, e.prototype.freePotRenderTarget = function(t) {
var e = (65535 & t.size.width * t.resolution) << 16 | 65535 & t.size.height * t.resolution;
this.pool[e].push(t)
}, e
}(n.default);
e.default = d
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.calculateScreenSpaceMatrix = function(t, e, r) {
var n = t.identity();
return n.translate(e.x / r.width, e.y / r.height), n.scale(r.width, r.height), n
}, e.calculateNormalizedScreenSpaceMatrix = function(t, e, r) {
var n = t.identity();
n.translate(e.x / r.width, e.y / r.height);
var i = r.width / e.width,
o = r.height / e.height;
return n.scale(i, o), n
}, e.calculateSpriteMatrix = function(t, e, r, i) {
var o = i._texture.orig,
a = t.set(r.width, 0, 0, r.height, e.x, e.y),
s = i.worldTransform.copy(n.Matrix.TEMP_MATRIX);
return s.invert(), a.prepend(s), a.scale(1 / o.width, 1 / o.height), a.translate(i.anchor.x, i.anchor.y), a
};
var n = r(5)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(6),
o = r(1),
a = r(20),
s = (n = a) && n.__esModule ? n : {
default: n
},
u = r(3);
var l = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e, this.gl = e.gl, this._managedTextures = []
}
return t.prototype.bindTexture = function() {}, t.prototype.getTexture = function() {}, t.prototype.updateTexture = function(t, e) {
var r = this.gl,
n = !!t._glRenderTargets;
if (!t.hasLoaded) return null;
var a = this.renderer.boundTextures;
if (void 0 === e) {
e = 0;
for (var u = 0; u < a.length; ++u)
if (a[u] === t) {
e = u;
break
}
}
a[e] = t, r.activeTexture(r.TEXTURE0 + e);
var l = t._glTextures[this.renderer.CONTEXT_UID];
if (l) n ? t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width, t.height) : l.upload(t.source);
else {
if (n) {
var h = new s.default(this.gl, t.width, t.height, t.scaleMode, t.resolution);
h.resize(t.width, t.height), t._glRenderTargets[this.renderer.CONTEXT_UID] = h, l = h.texture
} else(l = new i.GLTexture(this.gl, null, null, null, null)).bind(e), l.premultiplyAlpha = !0, l.upload(t.source);
t._glTextures[this.renderer.CONTEXT_UID] = l, t.on("update", this.updateTexture, this), t.on("dispose", this.destroyTexture, this), this._managedTextures.push(t), t.isPowerOfTwo ? (t.mipmap && l.enableMipmap(), t.wrapMode === o.WRAP_MODES.CLAMP ? l.enableWrapClamp() : t.wrapMode === o.WRAP_MODES.REPEAT ? l.enableWrapRepeat() : l.enableWrapMirrorRepeat()) : l.enableWrapClamp(), t.scaleMode === o.SCALE_MODES.NEAREST ? l.enableNearestScaling() : l.enableLinearScaling()
}
return l
}, t.prototype.destroyTexture = function(t, e) {
if ((t = t.baseTexture || t).hasLoaded) {
var r = this.renderer.CONTEXT_UID,
n = t._glTextures,
i = t._glRenderTargets;
if (n[r] && (this.renderer.unbindTexture(t), n[r].destroy(), t.off("update", this.updateTexture, this), t.off("dispose", this.destroyTexture, this), delete n[r], !e)) {
var o = this._managedTextures.indexOf(t); - 1 !== o && (0, u.removeItems)(this._managedTextures, o, 1)
}
i && i[r] && (i[r].destroy(), delete i[r])
}
}, t.prototype.removeAll = function() {
for (var t = 0; t < this._managedTextures.length; ++t) {
var e = this._managedTextures[t];
e._glTextures[this.renderer.CONTEXT_UID] && delete e._glTextures[this.renderer.CONTEXT_UID]
}
}, t.prototype.destroy = function() {
for (var t = 0; t < this._managedTextures.length; ++t) {
var e = this._managedTextures[t];
this.destroyTexture(e, !0), e.off("update", this.updateTexture, this), e.off("dispose", this.destroyTexture, this)
}
this._managedTextures = null
}, t
}();
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(1),
o = r(4),
a = (n = o) && n.__esModule ? n : {
default: n
};
var s = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e, this.count = 0, this.checkCount = 0, this.maxIdle = a.default.GC_MAX_IDLE, this.checkCountMax = a.default.GC_MAX_CHECK_COUNT, this.mode = a.default.GC_MODE
}
return t.prototype.update = function() {
this.count++, this.mode !== i.GC_MODES.MANUAL && (this.checkCount++, this.checkCount > this.checkCountMax && (this.checkCount = 0, this.run()))
}, t.prototype.run = function() {
for (var t = this.renderer.textureManager, e = t._managedTextures, r = !1, n = 0; n < e.length; n++) {
var i = e[n];
!i._glRenderTargets && this.count - i.touched > this.maxIdle && (t.destroyTexture(i, !0), e[n] = null, r = !0)
}
if (r) {
for (var o = 0, a = 0; a < e.length; a++) null !== e[a] && (e[o++] = e[a]);
e.length = o
}
}, t.prototype.unload = function(t) {
var e = this.renderer.textureManager;
t._texture && t._texture._glRenderTargets && e.destroyTexture(t._texture, !0);
for (var r = t.children.length - 1; r >= 0; r--) this.unload(t.children[r])
}, t
}();
e.default = s
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(146),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.activeState = new Uint8Array(16), this.defaultState = new Uint8Array(16), this.defaultState[0] = 1, this.stackIndex = 0, this.stack = [], this.gl = e, this.maxAttribs = e.getParameter(e.MAX_VERTEX_ATTRIBS), this.attribState = {
tempAttribState: new Array(this.maxAttribs),
attribState: new Array(this.maxAttribs)
}, this.blendModes = (0, o.default)(e), this.nativeVaoExtension = e.getExtension("OES_vertex_array_object") || e.getExtension("MOZ_OES_vertex_array_object") || e.getExtension("WEBKIT_OES_vertex_array_object")
}
return t.prototype.push = function() {
var t = this.stack[this.stackIndex];
t || (t = this.stack[this.stackIndex] = new Uint8Array(16)), ++this.stackIndex;
for (var e = 0; e < this.activeState.length; e++) t[e] = this.activeState[e]
}, t.prototype.pop = function() {
var t = this.stack[--this.stackIndex];
this.setState(t)
}, t.prototype.setState = function(t) {
this.setBlend(t[0]), this.setDepthTest(t[1]), this.setFrontFace(t[2]), this.setCullFace(t[3]), this.setBlendMode(t[4])
}, t.prototype.setBlend = function(t) {
t = t ? 1 : 0, this.activeState[0] !== t && (this.activeState[0] = t, this.gl[t ? "enable" : "disable"](this.gl.BLEND))
}, t.prototype.setBlendMode = function(t) {
if (t !== this.activeState[4]) {
this.activeState[4] = t;
var e = this.blendModes[t];
2 === e.length ? this.gl.blendFunc(e[0], e[1]) : this.gl.blendFuncSeparate(e[0], e[1], e[2], e[3])
}
}, t.prototype.setDepthTest = function(t) {
t = t ? 1 : 0, this.activeState[1] !== t && (this.activeState[1] = t, this.gl[t ? "enable" : "disable"](this.gl.DEPTH_TEST))
}, t.prototype.setCullFace = function(t) {
t = t ? 1 : 0, this.activeState[3] !== t && (this.activeState[3] = t, this.gl[t ? "enable" : "disable"](this.gl.CULL_FACE))
}, t.prototype.setFrontFace = function(t) {
t = t ? 1 : 0, this.activeState[2] !== t && (this.activeState[2] = t, this.gl.frontFace(this.gl[t ? "CW" : "CCW"]))
}, t.prototype.resetAttributes = function() {
for (var t = 0; t < this.attribState.tempAttribState.length; t++) this.attribState.tempAttribState[t] = 0;
for (var e = 0; e < this.attribState.attribState.length; e++) this.attribState.attribState[e] = 0;
for (var r = 1; r < this.maxAttribs; r++) this.gl.disableVertexAttribArray(r)
}, t.prototype.resetToDefault = function() {
this.nativeVaoExtension && this.nativeVaoExtension.bindVertexArrayOES(null), this.resetAttributes();
for (var t = 0; t < this.activeState.length; ++t) this.activeState[t] = 32;
this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1), this.setState(this.defaultState)
}, t
}();
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
return e[n.BLEND_MODES.NORMAL] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.ADD] = [t.ONE, t.DST_ALPHA], e[n.BLEND_MODES.MULTIPLY] = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.SCREEN] = [t.ONE, t.ONE_MINUS_SRC_COLOR], e[n.BLEND_MODES.OVERLAY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.DARKEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.LIGHTEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.COLOR_DODGE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.COLOR_BURN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.HARD_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.SOFT_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.DIFFERENCE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.EXCLUSION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.HUE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.SATURATION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.COLOR] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.LUMINOSITY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.NORMAL_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], e[n.BLEND_MODES.ADD_NPM] = [t.SRC_ALPHA, t.DST_ALPHA, t.ONE, t.DST_ALPHA], e[n.BLEND_MODES.SCREEN_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_COLOR], e
};
var n = r(1)
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
return e[n.DRAW_MODES.POINTS] = t.POINTS, e[n.DRAW_MODES.LINES] = t.LINES, e[n.DRAW_MODES.LINE_LOOP] = t.LINE_LOOP, e[n.DRAW_MODES.LINE_STRIP] = t.LINE_STRIP, e[n.DRAW_MODES.TRIANGLES] = t.TRIANGLES, e[n.DRAW_MODES.TRIANGLE_STRIP] = t.TRIANGLE_STRIP, e[n.DRAW_MODES.TRIANGLE_FAN] = t.TRIANGLE_FAN, e
};
var n = r(1)
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
t.getContextAttributes().stencil || console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e) {
var r = a;
r = (r = r.replace(/%count%/gi, e)).replace(/%forloop%/gi, function(t) {
var e = "";
e += "\n", e += "\n";
for (var r = 0; r < t; r++) r > 0 && (e += "\nelse "), r < t - 1 && (e += "if(textureId == " + r + ".0)"), e += "\n{", e += "\n\tcolor = texture2D(uSamplers[" + r + "], vTextureCoord);", e += "\n}";
return e += "\n", e += "\n"
}(e));
for (var n = new o.default(t, "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n", r), i = [], s = 0; s < e; s++) i[s] = s;
return n.bind(), n.uniforms.uSamplers = i, n
};
var n, i = r(14),
o = (n = i) && n.__esModule ? n : {
default: n
};
r(7);
var a = ["varying vec2 vTextureCoord;", "varying vec4 vColor;", "varying float vTextureId;", "uniform sampler2D uSamplers[%count%];", "void main(void){", "vec4 color;", "float textureId = floor(vTextureId+0.5);", "%forloop%", "gl_FragColor = color * vColor;", "}"].join("\n")
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e) {
var r = !e;
if (0 === t) throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");
if (r) {
var n = document.createElement("canvas");
n.width = 1, n.height = 1, e = o.default.createContext(n)
}
var i = e.createShader(e.FRAGMENT_SHADER);
for (;;) {
var u = a.replace(/%forloop%/gi, s(t));
if (e.shaderSource(i, u), e.compileShader(i), e.getShaderParameter(i, e.COMPILE_STATUS)) break;
t = t / 2 | 0
}
r && e.getExtension("WEBGL_lose_context") && e.getExtension("WEBGL_lose_context").loseContext();
return t
};
var n, i = r(6),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join("\n");
function s(t) {
for (var e = "", r = 0; r < t; ++r) r > 0 && (e += "\nelse "), r < t - 1 && (e += "if(test == " + r + ".0){}");
return e
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.vertices = new ArrayBuffer(e), this.float32View = new Float32Array(this.vertices), this.uint32View = new Uint32Array(this.vertices)
}
return t.prototype.destroy = function() {
this.vertices = null, this.positions = null, this.uvs = null, this.colors = null
}, t
}();
e.default = n
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = d(r(31)),
o = d(r(8)),
a = r(5),
s = r(3),
u = r(1),
l = d(r(4)),
h = d(r(69)),
c = d(r(70)),
f = d(r(153));
function d(t) {
return t && t.__esModule ? t : {
default: t
}
}
var p = {
texture: !0,
children: !1,
baseTexture: !0
},
v = function(t) {
function e(r, n, i) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e), (i = i || document.createElement("canvas")).width = 3, i.height = 3;
var s = o.default.fromCanvas(i, l.default.SCALE_MODE, "text");
s.orig = new a.Rectangle, s.trim = new a.Rectangle;
var u = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, s));
return o.default.addToCache(u._texture, u._texture.baseTexture.textureCacheIds[0]), u.canvas = i, u.context = u.canvas.getContext("2d"), u.resolution = l.default.RESOLUTION, u._text = null, u._style = null, u._styleListener = null, u._font = "", u.text = r, u.style = n, u.localStyleID = -1, u
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.updateText = function(t) {
var e = this._style;
if (this.localStyleID !== e.styleID && (this.dirty = !0, this.localStyleID = e.styleID), this.dirty || !t) {
this._font = this._style.toFontString();
var r = this.context,
n = c.default.measureText(this._text, this._style, this._style.wordWrap, this.canvas),
i = n.width,
o = n.height,
a = n.lines,
s = n.lineHeight,
u = n.lineWidths,
l = n.maxLineWidth,
h = n.fontProperties;
this.canvas.width = Math.ceil((i + 2 * e.padding) * this.resolution), this.canvas.height = Math.ceil((o + 2 * e.padding) * this.resolution), r.scale(this.resolution, this.resolution), r.clearRect(0, 0, this.canvas.width, this.canvas.height), r.font = this._font, r.strokeStyle = e.stroke, r.lineWidth = e.strokeThickness, r.textBaseline = e.textBaseline, r.lineJoin = e.lineJoin, r.miterLimit = e.miterLimit;
var f = void 0,
d = void 0;
if (e.dropShadow) {
r.fillStyle = e.dropShadowColor, r.globalAlpha = e.dropShadowAlpha, r.shadowBlur = e.dropShadowBlur, e.dropShadowBlur > 0 && (r.shadowColor = e.dropShadowColor);
for (var p = Math.cos(e.dropShadowAngle) * e.dropShadowDistance, v = Math.sin(e.dropShadowAngle) * e.dropShadowDistance, y = 0; y < a.length; y++) f = e.strokeThickness / 2, d = e.strokeThickness / 2 + y * s + h.ascent, "right" === e.align ? f += l - u[y] : "center" === e.align && (f += (l - u[y]) / 2), e.fill && (this.drawLetterSpacing(a[y], f + p + e.padding, d + v + e.padding), e.stroke && e.strokeThickness && (r.strokeStyle = e.dropShadowColor, this.drawLetterSpacing(a[y], f + p + e.padding, d + v + e.padding, !0), r.strokeStyle = e.stroke))
}
r.shadowBlur = 0, r.globalAlpha = 1, r.fillStyle = this._generateFillStyle(e, a);
for (var g = 0; g < a.length; g++) f = e.strokeThickness / 2, d = e.strokeThickness / 2 + g * s + h.ascent, "right" === e.align ? f += l - u[g] : "center" === e.align && (f += (l - u[g]) / 2), e.stroke && e.strokeThickness && this.drawLetterSpacing(a[g], f + e.padding, d + e.padding, !0), e.fill && this.drawLetterSpacing(a[g], f + e.padding, d + e.padding);
this.updateTexture()
}
}, e.prototype.drawLetterSpacing = function(t, e, r) {
var n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3],
i = this._style.letterSpacing;
if (0 !== i)
for (var o = String.prototype.split.call(t, ""), a = e, s = 0, u = ""; s < t.length;) u = o[s++], n ? this.context.strokeText(u, a, r) : this.context.fillText(u, a, r), a += this.context.measureText(u).width + i;
else n ? this.context.strokeText(t, e, r) : this.context.fillText(t, e, r)
}, e.prototype.updateTexture = function() {
var t = this.canvas;
if (this._style.trim) {
var e = (0, f.default)(t);
t.width = e.width, t.height = e.height, this.context.putImageData(e.data, 0, 0)
}
var r = this._texture,
n = this._style,
i = n.trim ? 0 : n.padding,
o = r.baseTexture;
o.hasLoaded = !0, o.resolution = this.resolution, o.realWidth = t.width, o.realHeight = t.height, o.width = t.width / this.resolution, o.height = t.height / this.resolution, r.trim.width = r._frame.width = t.width / this.resolution, r.trim.height = r._frame.height = t.height / this.resolution, r.trim.x = -i, r.trim.y = -i, r.orig.width = r._frame.width - 2 * i, r.orig.height = r._frame.height - 2 * i, this._onTextureUpdate(), o.emit("update", o), this.dirty = !1
}, e.prototype.renderWebGL = function(e) {
this.resolution !== e.resolution && (this.resolution = e.resolution, this.dirty = !0), this.updateText(!0), t.prototype.renderWebGL.call(this, e)
}, e.prototype._renderCanvas = function(e) {
this.resolution !== e.resolution && (this.resolution = e.resolution, this.dirty = !0), this.updateText(!0), t.prototype._renderCanvas.call(this, e)
}, e.prototype.getLocalBounds = function(e) {
return this.updateText(!0), t.prototype.getLocalBounds.call(this, e)
}, e.prototype._calculateBounds = function() {
this.updateText(!0), this.calculateVertices(), this._bounds.addQuad(this.vertexData)
}, e.prototype._onStyleChange = function() {
this.dirty = !0
}, e.prototype._generateFillStyle = function(t, e) {
if (!Array.isArray(t.fill)) return t.fill;
if (navigator.isCocoonJS) return t.fill[0];
var r = void 0,
n = void 0,
i = void 0,
o = void 0,
a = this.canvas.width / this.resolution,
s = this.canvas.height / this.resolution,
l = t.fill.slice(),
h = t.fillGradientStops.slice();
if (!h.length)
for (var c = l.length + 1, f = 1; f < c; ++f) h.push(f / c);
if (l.unshift(t.fill[0]), h.unshift(0), l.push(t.fill[t.fill.length - 1]), h.push(1), t.fillGradientType === u.TEXT_GRADIENT.LINEAR_VERTICAL) {
r = this.context.createLinearGradient(a / 2, 0, a / 2, s), n = (l.length + 1) * e.length, i = 0;
for (var d = 0; d < e.length; d++) {
i += 1;
for (var p = 0; p < l.length; p++) o = "number" == typeof h[p] ? h[p] / e.length + d / e.length : i / n, r.addColorStop(o, l[p]), i++
}
} else {
r = this.context.createLinearGradient(0, s / 2, a, s / 2), n = l.length + 1, i = 1;
for (var v = 0; v < l.length; v++) o = "number" == typeof h[v] ? h[v] : i / n, r.addColorStop(o, l[v]), i++
}
return r
}, e.prototype.destroy = function(e) {
"boolean" == typeof e && (e = {
children: e
}), e = Object.assign({}, p, e), t.prototype.destroy.call(this, e), this.context = null, this.canvas = null, this._style = null
}, n(e, [{
key: "width",
get: function() {
return this.updateText(!0), Math.abs(this.scale.x) * this._texture.orig.width
},
set: function(t) {
this.updateText(!0);
var e = (0, s.sign)(this.scale.x) || 1;
this.scale.x = e * t / this._texture.orig.width, this._width = t
}
}, {
key: "height",
get: function() {
return this.updateText(!0), Math.abs(this.scale.y) * this._texture.orig.height
},
set: function(t) {
this.updateText(!0);
var e = (0, s.sign)(this.scale.y) || 1;
this.scale.y = e * t / this._texture.orig.height, this._height = t
}
}, {
key: "style",
get: function() {
return this._style
},
set: function(t) {
(t = t || {}) instanceof h.default ? this._style = t : this._style = new h.default(t), this.localStyleID = -1, this.dirty = !0
}
}, {
key: "text",
get: function() {
return this._text
},
set: function(t) {
t = String("" === t || null == t ? " " : t), this._text !== t && (this._text = t, this.dirty = !0)
}
}]), e
}(i.default);
e.default = v
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t) {
var e = t.width,
r = t.height,
n = t.getContext("2d"),
i = n.getImageData(0, 0, e, r).data,
o = i.length,
a = {
top: null,
left: null,
right: null,
bottom: null
},
s = void 0,
u = void 0,
l = void 0;
for (s = 0; s < o; s += 4) 0 !== i[s + 3] && (u = s / 4 % e, l = ~~(s / 4 / e), null === a.top && (a.top = l), null === a.left ? a.left = u : u < a.left && (a.left = u), null === a.right ? a.right = u + 1 : a.right < u && (a.right = u + 1), null === a.bottom ? a.bottom = l : a.bottom < l && (a.bottom = l));
e = a.right - a.left, r = a.bottom - a.top + 1;
var h = n.getImageData(a.left, a.top, e, r);
return {
height: r,
width: e,
data: h
}
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = p(r(11)),
i = p(r(34)),
o = p(r(8)),
a = p(r(71)),
s = p(r(31)),
u = r(5),
l = r(3),
h = r(1),
c = p(r(28)),
f = p(r(155)),
d = p(r(12));
function p(t) {
return t && t.__esModule ? t : {
default: t
}
}
var v = void 0,
y = new u.Matrix,
g = new u.Point,
m = new Float32Array(4),
_ = new Float32Array(4),
b = function(t) {
function e() {
var r = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return n.fillAlpha = 1, n.lineWidth = 0, n.nativeLines = r, n.lineColor = 0, n.graphicsData = [], n.tint = 16777215, n._prevTint = 16777215, n.blendMode = h.BLEND_MODES.NORMAL, n.currentPath = null, n._webGL = {}, n.isMask = !1, n.boundsPadding = 0, n._localBounds = new c.default, n.dirty = 0, n.fastRectDirty = -1, n.clearDirty = 0, n.boundsDirty = -1, n.cachedSpriteDirty = !1, n._spriteRect = null, n._fastRect = !1, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.clone = function() {
var t = new e;
t.renderable = this.renderable, t.fillAlpha = this.fillAlpha, t.lineWidth = this.lineWidth, t.lineColor = this.lineColor, t.tint = this.tint, t.blendMode = this.blendMode, t.isMask = this.isMask, t.boundsPadding = this.boundsPadding, t.dirty = 0, t.cachedSpriteDirty = this.cachedSpriteDirty;
for (var r = 0; r < this.graphicsData.length; ++r) t.graphicsData.push(this.graphicsData[r].clone());
return t.currentPath = t.graphicsData[t.graphicsData.length - 1], t.updateLocalBounds(), t
}, e.prototype.lineStyle = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
if (this.lineWidth = t, this.lineColor = e, this.lineAlpha = r, this.currentPath)
if (this.currentPath.shape.points.length) {
var n = new u.Polygon(this.currentPath.shape.points.slice(-2));
n.closed = !1, this.drawShape(n)
} else this.currentPath.lineWidth = this.lineWidth, this.currentPath.lineColor = this.lineColor, this.currentPath.lineAlpha = this.lineAlpha;
return this
}, e.prototype.moveTo = function(t, e) {
var r = new u.Polygon([t, e]);
return r.closed = !1, this.drawShape(r), this
}, e.prototype.lineTo = function(t, e) {
return this.currentPath.shape.points.push(t, e), this.dirty++, this
}, e.prototype.quadraticCurveTo = function(t, e, r, n) {
this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0);
var i = this.currentPath.shape.points,
o = 0,
a = 0;
0 === i.length && this.moveTo(0, 0);
for (var s = i[i.length - 2], u = i[i.length - 1], l = 1; l <= 20; ++l) {
var h = l / 20;
o = s + (t - s) * h, a = u + (e - u) * h, i.push(o + (t + (r - t) * h - o) * h, a + (e + (n - e) * h - a) * h)
}
return this.dirty++, this
}, e.prototype.bezierCurveTo = function(t, e, r, n, i, o) {
this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0);
var a = this.currentPath.shape.points,
s = a[a.length - 2],
u = a[a.length - 1];
return a.length -= 2, (0, f.default)(s, u, t, e, r, n, i, o, a), this.dirty++, this
}, e.prototype.arcTo = function(t, e, r, n, i) {
this.currentPath ? 0 === this.currentPath.shape.points.length && this.currentPath.shape.points.push(t, e) : this.moveTo(t, e);
var o = this.currentPath.shape.points,
a = o[o.length - 2],
s = o[o.length - 1] - e,
u = a - t,
l = n - e,
h = r - t,
c = Math.abs(s * h - u * l);
if (c < 1e-8 || 0 === i) o[o.length - 2] === t && o[o.length - 1] === e || o.push(t, e);
else {
var f = s * s + u * u,
d = l * l + h * h,
p = s * l + u * h,
v = i * Math.sqrt(f) / c,
y = i * Math.sqrt(d) / c,
g = v * p / f,
m = y * p / d,
_ = v * h + y * u,
b = v * l + y * s,
x = u * (y + g),
w = s * (y + g),
T = h * (v + m),
E = l * (v + m),
S = Math.atan2(w - b, x - _),
M = Math.atan2(E - b, T - _);
this.arc(_ + t, b + e, i, S, M, u * l > h * s)
}
return this.dirty++, this
}, e.prototype.arc = function(t, e, r, n, i) {
var o = arguments.length > 5 && void 0 !== arguments[5] && arguments[5];
if (n === i) return this;
!o && i <= n ? i += h.PI_2 : o && n <= i && (n += h.PI_2);
var a = i - n,
s = 40 * Math.ceil(Math.abs(a) / h.PI_2);
if (0 === a) return this;
var u = t + Math.cos(n) * r,
l = e + Math.sin(n) * r,
c = this.currentPath ? this.currentPath.shape.points : null;
c ? c[c.length - 2] === u && c[c.length - 1] === l || c.push(u, l) : (this.moveTo(u, l), c = this.currentPath.shape.points);
for (var f = a / (2 * s), d = 2 * f, p = Math.cos(f), v = Math.sin(f), y = s - 1, g = y % 1 / y, m = 0; m <= y; ++m) {
var _ = f + n + d * (m + g * m),
b = Math.cos(_),
x = -Math.sin(_);
c.push((p * b + v * x) * r + t, (p * -x + v * b) * r + e)
}
return this.dirty++, this
}, e.prototype.beginFill = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
return this.filling = !0, this.fillColor = t, this.fillAlpha = e, this.currentPath && this.currentPath.shape.points.length <= 2 && (this.currentPath.fill = this.filling, this.currentPath.fillColor = this.fillColor, this.currentPath.fillAlpha = this.fillAlpha), this
}, e.prototype.endFill = function() {
return this.filling = !1, this.fillColor = null, this.fillAlpha = 1, this
}, e.prototype.drawRect = function(t, e, r, n) {
return this.drawShape(new u.Rectangle(t, e, r, n)), this
}, e.prototype.drawRoundedRect = function(t, e, r, n, i) {
return this.drawShape(new u.RoundedRectangle(t, e, r, n, i)), this
}, e.prototype.drawCircle = function(t, e, r) {
return this.drawShape(new u.Circle(t, e, r)), this
}, e.prototype.drawEllipse = function(t, e, r, n) {
return this.drawShape(new u.Ellipse(t, e, r, n)), this
}, e.prototype.drawPolygon = function(t) {
var e = t,
r = !0;
if (e instanceof u.Polygon && (r = e.closed, e = e.points), !Array.isArray(e)) {
e = new Array(arguments.length);
for (var n = 0; n < e.length; ++n) e[n] = arguments[n]
}
var i = new u.Polygon(e);
return i.closed = r, this.drawShape(i), this
}, e.prototype.drawStar = function(t, e, r, n, i) {
var o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0;
i = i || n / 2;
for (var a = -1 * Math.PI / 2 + o, s = 2 * r, u = h.PI_2 / s, l = [], c = 0; c < s; c++) {
var f = c % 2 ? i : n,
d = c * u + a;
l.push(t + f * Math.cos(d), e + f * Math.sin(d))
}
return this.drawPolygon(l)
}, e.prototype.clear = function() {
return (this.lineWidth || this.filling || this.graphicsData.length > 0) && (this.lineWidth = 0, this.filling = !1, this.boundsDirty = -1, this.dirty++, this.clearDirty++, this.graphicsData.length = 0), this.currentPath = null, this._spriteRect = null, this
}, e.prototype.isFastRect = function() {
return 1 === this.graphicsData.length && this.graphicsData[0].shape.type === h.SHAPES.RECT && !this.graphicsData[0].lineWidth
}, e.prototype._renderWebGL = function(t) {
this.dirty !== this.fastRectDirty && (this.fastRectDirty = this.dirty, this._fastRect = this.isFastRect()), this._fastRect ? this._renderSpriteRect(t) : (t.setObjectRenderer(t.plugins.graphics), t.plugins.graphics.render(this))
}, e.prototype._renderSpriteRect = function(t) {
var e = this.graphicsData[0].shape;
this._spriteRect || (this._spriteRect = new s.default(new o.default(o.default.WHITE)));
var r = this._spriteRect;
if (16777215 === this.tint) r.tint = this.graphicsData[0].fillColor;
else {
var n = m,
i = _;
(0, l.hex2rgb)(this.graphicsData[0].fillColor, n), (0, l.hex2rgb)(this.tint, i), n[0] *= i[0], n[1] *= i[1], n[2] *= i[2], r.tint = (0, l.rgb2hex)(n)
}
r.alpha = this.graphicsData[0].fillAlpha, r.worldAlpha = this.worldAlpha * r.alpha, r.blendMode = this.blendMode, r._texture._frame.width = e.width, r._texture._frame.height = e.height, r.transform.worldTransform = this.transform.worldTransform, r.anchor.set(-e.x / e.width, -e.y / e.height), r._onAnchorUpdate(), r._renderWebGL(t)
}, e.prototype._renderCanvas = function(t) {
!0 !== this.isMask && t.plugins.graphics.render(this)
}, e.prototype._calculateBounds = function() {
this.boundsDirty !== this.dirty && (this.boundsDirty = this.dirty, this.updateLocalBounds(), this.cachedSpriteDirty = !0);
var t = this._localBounds;
this._bounds.addFrame(this.transform, t.minX, t.minY, t.maxX, t.maxY)
}, e.prototype.containsPoint = function(t) {
this.worldTransform.applyInverse(t, g);
for (var e = this.graphicsData, r = 0; r < e.length; ++r) {
var n = e[r];
if (n.fill && (n.shape && n.shape.contains(g.x, g.y))) {
if (n.holes)
for (var i = 0; i < n.holes.length; i++) {
if (n.holes[i].contains(g.x, g.y)) return !1
}
return !0
}
}
return !1
}, e.prototype.updateLocalBounds = function() {
var t = 1 / 0,
e = -1 / 0,
r = 1 / 0,
n = -1 / 0;
if (this.graphicsData.length)
for (var i = 0, o = 0, a = 0, s = 0, u = 0, l = 0; l < this.graphicsData.length; l++) {
var c = this.graphicsData[l],
f = c.type,
d = c.lineWidth;
if (i = c.shape, f === h.SHAPES.RECT || f === h.SHAPES.RREC) o = i.x - d / 2, a = i.y - d / 2, t = o < t ? o : t, e = o + (s = i.width + d) > e ? o + s : e, r = a < r ? a : r, n = a + (u = i.height + d) > n ? a + u : n;
else if (f === h.SHAPES.CIRC) o = i.x, a = i.y, t = o - (s = i.radius + d / 2) < t ? o - s : t, e = o + s > e ? o + s : e, r = a - (u = i.radius + d / 2) < r ? a - u : r, n = a + u > n ? a + u : n;
else if (f === h.SHAPES.ELIP) o = i.x, a = i.y, t = o - (s = i.width + d / 2) < t ? o - s : t, e = o + s > e ? o + s : e, r = a - (u = i.height + d / 2) < r ? a - u : r, n = a + u > n ? a + u : n;
else
for (var p = i.points, v = 0, y = 0, g = 0, m = 0, _ = 0, b = 0, x = 0, w = 0, T = 0; T + 2 < p.length; T += 2) o = p[T], a = p[T + 1], v = p[T + 2], y = p[T + 3], g = Math.abs(v - o), m = Math.abs(y - a), u = d, (s = Math.sqrt(g * g + m * m)) < 1e-9 || (t = (x = (v + o) / 2) - (_ = (u / s * m + g) / 2) < t ? x - _ : t, e = x + _ > e ? x + _ : e, r = (w = (y + a) / 2) - (b = (u / s * g + m) / 2) < r ? w - b : r, n = w + b > n ? w + b : n)
} else t = 0, e = 0, r = 0, n = 0;
var E = this.boundsPadding;
this._localBounds.minX = t - E, this._localBounds.maxX = e + E, this._localBounds.minY = r - E, this._localBounds.maxY = n + E
}, e.prototype.drawShape = function(t) {
this.currentPath && this.currentPath.shape.points.length <= 2 && this.graphicsData.pop(), this.currentPath = null;
var e = new a.default(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.filling, this.nativeLines, t);
return this.graphicsData.push(e), e.type === h.SHAPES.POLY && (e.shape.closed = e.shape.closed || this.filling, this.currentPath = e), this.dirty++, e
}, e.prototype.generateCanvasTexture = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1,
r = this.getLocalBounds(),
n = i.default.create(r.width, r.height, t, e);
v || (v = new d.default), this.transform.updateLocalTransform(), this.transform.localTransform.copy(y), y.invert(), y.tx -= r.x, y.ty -= r.y, v.render(this, n, !0, y);
var a = o.default.fromCanvas(n.baseTexture._canvasRenderTarget.canvas, t, "graphics");
return a.baseTexture.resolution = e, a.baseTexture.update(), a
}, e.prototype.closePath = function() {
var t = this.currentPath;
return t && t.shape && t.shape.close(), this
}, e.prototype.addHole = function() {
var t = this.graphicsData.pop();
return this.currentPath = this.graphicsData[this.graphicsData.length - 1], this.currentPath.addHole(t.shape), this.currentPath = null, this
}, e.prototype.destroy = function(e) {
t.prototype.destroy.call(this, e);
for (var r = 0; r < this.graphicsData.length; ++r) this.graphicsData[r].destroy();
for (var n in this._webgl)
for (var i = 0; i < this._webgl[n].data.length; ++i) this._webgl[n].data[i].destroy();
this._spriteRect && this._spriteRect.destroy(), this.graphicsData = null, this.currentPath = null, this._webgl = null, this._localBounds = null
}, e
}(n.default);
e.default = b, b._SPRITE_TEXTURE = null
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r, n, i, o, a, s) {
var u = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : [],
l = 0,
h = 0,
c = 0,
f = 0,
d = 0;
u.push(t, e);
for (var p = 1, v = 0; p <= 20; ++p) c = (h = (l = 1 - (v = p / 20)) * l) * l, d = (f = v * v) * v, u.push(c * t + 3 * h * v * r + 3 * l * f * i + d * a, c * e + 3 * h * v * n + 3 * l * f * o + d * s);
return u
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(3),
i = r(1),
o = d(r(18)),
a = d(r(19)),
s = d(r(157)),
u = d(r(158)),
l = d(r(159)),
h = d(r(160)),
c = d(r(161)),
f = d(r(162));
function d(t) {
return t && t.__esModule ? t : {
default: t
}
}
var p = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return n.graphicsDataPool = [], n.primitiveShader = null, n.gl = r.gl, n.CONTEXT_UID = 0, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.onContextChange = function() {
this.gl = this.renderer.gl, this.CONTEXT_UID = this.renderer.CONTEXT_UID, this.primitiveShader = new u.default(this.gl)
}, e.prototype.destroy = function() {
o.default.prototype.destroy.call(this);
for (var t = 0; t < this.graphicsDataPool.length; ++t) this.graphicsDataPool[t].destroy();
this.graphicsDataPool = null
}, e.prototype.render = function(t) {
var e = this.renderer,
r = e.gl,
i = void 0,
o = t._webGL[this.CONTEXT_UID];
o && t.dirty === o.dirty || (this.updateGraphics(t), o = t._webGL[this.CONTEXT_UID]);
var a = this.primitiveShader;
e.bindShader(a), e.state.setBlendMode(t.blendMode);
for (var s = 0, u = o.data.length; s < u; s++) {
var l = (i = o.data[s]).shader;
e.bindShader(l), l.uniforms.translationMatrix = t.transform.worldTransform.toArray(!0), l.uniforms.tint = (0, n.hex2rgb)(t.tint), l.uniforms.alpha = t.worldAlpha, e.bindVao(i.vao), i.nativeLines ? r.drawArrays(r.LINES, 0, i.points.length / 6) : i.vao.draw(r.TRIANGLE_STRIP, i.indices.length)
}
}, e.prototype.updateGraphics = function(t) {
var e = this.renderer.gl,
r = t._webGL[this.CONTEXT_UID];
if (r || (r = t._webGL[this.CONTEXT_UID] = {
lastIndex: 0,
data: [],
gl: e,
clearDirty: -1,
dirty: -1
}), r.dirty = t.dirty, t.clearDirty !== r.clearDirty) {
r.clearDirty = t.clearDirty;
for (var n = 0; n < r.data.length; n++) this.graphicsDataPool.push(r.data[n]);
r.data.length = 0, r.lastIndex = 0
}
for (var o = void 0, a = void 0, s = r.lastIndex; s < t.graphicsData.length; s++) {
var u = t.graphicsData[s];
o = this.getWebGLData(r, 0), u.nativeLines && u.lineWidth && (a = this.getWebGLData(r, 0, !0), r.lastIndex++), u.type === i.SHAPES.POLY && (0, l.default)(u, o, a), u.type === i.SHAPES.RECT ? (0, h.default)(u, o, a) : u.type === i.SHAPES.CIRC || u.type === i.SHAPES.ELIP ? (0, f.default)(u, o, a) : u.type === i.SHAPES.RREC && (0, c.default)(u, o, a), r.lastIndex++
}
this.renderer.bindVao(null);
for (var d = 0; d < r.data.length; d++)(o = r.data[d]).dirty && o.upload()
}, e.prototype.getWebGLData = function(t, e, r) {
var n = t.data[t.data.length - 1];
return (!n || n.nativeLines !== r || n.points.length > 32e4) && ((n = this.graphicsDataPool.pop() || new s.default(this.renderer.gl, this.primitiveShader, this.renderer.state.attribsState)).nativeLines = r, n.reset(e), t.data.push(n)), n.dirty = !0, n
}, e
}(o.default);
e.default = p, a.default.registerPlugin("graphics", p)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(6),
o = (n = i) && n.__esModule ? n : {
default: n
};
var a = function() {
function t(e, r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.gl = e, this.color = [0, 0, 0], this.points = [], this.indices = [], this.buffer = o.default.GLBuffer.createVertexBuffer(e), this.indexBuffer = o.default.GLBuffer.createIndexBuffer(e), this.dirty = !0, this.nativeLines = !1, this.glPoints = null, this.glIndices = null, this.shader = r, this.vao = new o.default.VertexArrayObject(e, n).addIndex(this.indexBuffer).addAttribute(this.buffer, r.attributes.aVertexPosition, e.FLOAT, !1, 24, 0).addAttribute(this.buffer, r.attributes.aColor, e.FLOAT, !1, 24, 8)
}
return t.prototype.reset = function() {
this.points.length = 0, this.indices.length = 0
}, t.prototype.upload = function() {
this.glPoints = new Float32Array(this.points), this.buffer.upload(this.glPoints), this.glIndices = new Uint16Array(this.indices), this.indexBuffer.upload(this.glIndices), this.dirty = !1
}, t.prototype.destroy = function() {
this.color = null, this.points = null, this.indices = null, this.vao.destroy(), this.buffer.destroy(), this.indexBuffer.destroy(), this.gl = null, this.buffer = null, this.indexBuffer = null, this.glPoints = null, this.glIndices = null
}, t
}();
e.default = a
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(14);
var o = function(t) {
function e(r) {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r, ["attribute vec2 aVertexPosition;", "attribute vec4 aColor;", "uniform mat3 translationMatrix;", "uniform mat3 projectionMatrix;", "uniform float alpha;", "uniform vec3 tint;", "varying vec4 vColor;", "void main(void){", " gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);", " vColor = aColor * vec4(tint * alpha, alpha);", "}"].join("\n"), ["varying vec4 vColor;", "void main(void){", " gl_FragColor = vColor;", "}"].join("\n")))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e
}(((n = i) && n.__esModule ? n : {
default: n
}).default);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
t.points = t.shape.points.slice();
var a = t.points;
if (t.fill && a.length >= 6) {
for (var s = [], u = t.holes, l = 0; l < u.length; l++) {
var h = u[l];
s.push(a.length / 2), a = a.concat(h.points)
}
var c = e.points,
f = e.indices,
d = a.length / 2,
p = (0, i.hex2rgb)(t.fillColor),
v = t.fillAlpha,
y = p[0] * v,
g = p[1] * v,
m = p[2] * v,
_ = (0, o.default)(a, s, 2);
if (!_) return;
for (var b = c.length / 6, x = 0; x < _.length; x += 3) f.push(_[x] + b), f.push(_[x] + b), f.push(_[x + 1] + b), f.push(_[x + 2] + b), f.push(_[x + 2] + b);
for (var w = 0; w < d; w++) c.push(a[2 * w], a[2 * w + 1], y, g, m, v)
}
t.lineWidth > 0 && (0, n.default)(t, e, r)
};
var n = a(r(21)),
i = r(3),
o = a(r(72));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
var n = t.shape,
i = n.x,
s = n.y,
u = n.width,
l = n.height;
if (t.fill) {
var h = (0, a.hex2rgb)(t.fillColor),
c = t.fillAlpha,
f = h[0] * c,
d = h[1] * c,
p = h[2] * c,
v = e.points,
y = e.indices,
g = v.length / 6;
v.push(i, s), v.push(f, d, p, c), v.push(i + u, s), v.push(f, d, p, c), v.push(i, s + l), v.push(f, d, p, c), v.push(i + u, s + l), v.push(f, d, p, c), y.push(g, g, g + 1, g + 2, g + 3, g + 3)
}
if (t.lineWidth) {
var m = t.points;
t.points = [i, s, i + u, s, i + u, s + l, i, s + l, i, s], (0, o.default)(t, e, r), t.points = m
}
};
var n, i = r(21),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(3)
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
var a = t.shape,
s = a.x,
l = a.y,
h = a.width,
c = a.height,
f = a.radius,
d = [];
if (d.push(s, l + f), u(s, l + c - f, s, l + c, s + f, l + c, d), u(s + h - f, l + c, s + h, l + c, s + h, l + c - f, d), u(s + h, l + f, s + h, l, s + h - f, l, d), u(s + f, l, s, l, s, l + f + 1e-10, d), t.fill) {
for (var p = (0, o.hex2rgb)(t.fillColor), v = t.fillAlpha, y = p[0] * v, g = p[1] * v, m = p[2] * v, _ = e.points, b = e.indices, x = _.length / 6, w = (0, n.default)(d, null, 2), T = 0, E = w.length; T < E; T += 3) b.push(w[T] + x), b.push(w[T] + x), b.push(w[T + 1] + x), b.push(w[T + 2] + x), b.push(w[T + 2] + x);
for (var S = 0, M = d.length; S < M; S++) _.push(d[S], d[++S], y, g, m, v)
}
if (t.lineWidth) {
var P = t.points;
t.points = d, (0, i.default)(t, e, r), t.points = P
}
};
var n = a(r(72)),
i = a(r(21)),
o = r(3);
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
function s(t, e, r) {
return t + (e - t) * r
}
function u(t, e, r, n, i, o) {
for (var a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : [], u = 0, l = 0, h = 0, c = 0, f = 0, d = 0, p = 0, v = 0; p <= 20; ++p) u = s(t, r, v = p / 20), l = s(e, n, v), h = s(r, i, v), c = s(n, o, v), f = s(u, h, v), d = s(l, c, v), a.push(f, d);
return a
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.default = function(t, e, r) {
var n = t.shape,
i = n.x,
u = n.y,
l = void 0,
h = void 0;
t.type === a.SHAPES.CIRC ? (l = n.radius, h = n.radius) : (l = n.width, h = n.height);
if (0 === l || 0 === h) return;
var c = Math.floor(30 * Math.sqrt(n.radius)) || Math.floor(15 * Math.sqrt(n.width + n.height)),
f = 2 * Math.PI / c;
if (t.fill) {
var d = (0, s.hex2rgb)(t.fillColor),
p = t.fillAlpha,
v = d[0] * p,
y = d[1] * p,
g = d[2] * p,
m = e.points,
_ = e.indices,
b = m.length / 6;
_.push(b);
for (var x = 0; x < c + 1; x++) m.push(i, u, v, y, g, p), m.push(i + Math.sin(f * x) * l, u + Math.cos(f * x) * h, v, y, g, p), _.push(b++, b++);
_.push(b - 1)
}
if (t.lineWidth) {
var w = t.points;
t.points = [];
for (var T = 0; T < c + 1; T++) t.points.push(i + Math.sin(f * T) * l, u + Math.cos(f * T) * h);
(0, o.default)(t, e, r), t.points = w
}
};
var n, i = r(21),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(1),
s = r(3)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = r(12),
o = (n = i) && n.__esModule ? n : {
default: n
},
a = r(1);
var s = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e
}
return t.prototype.render = function(t) {
var e = this.renderer,
r = e.context,
n = t.worldAlpha,
i = t.transform.worldTransform,
o = e.resolution;
this._prevTint !== this.tint && (this.dirty = !0), r.setTransform(i.a * o, i.b * o, i.c * o, i.d * o, i.tx * o, i.ty * o), t.dirty && (this.updateGraphicsTint(t), t.dirty = !1), e.setBlendMode(t.blendMode);
for (var s = 0; s < t.graphicsData.length; s++) {
var u = t.graphicsData[s],
l = u.shape,
h = u._fillTint,
c = u._lineTint;
if (r.lineWidth = u.lineWidth, u.type === a.SHAPES.POLY) {
r.beginPath(), this.renderPolygon(l.points, l.closed, r);
for (var f = 0; f < u.holes.length; f++) this.renderPolygon(u.holes[f].points, !0, r);
u.fill && (r.globalAlpha = u.fillAlpha * n, r.fillStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), r.fill()), u.lineWidth && (r.globalAlpha = u.lineAlpha * n, r.strokeStyle = "#" + ("00000" + (0 | c).toString(16)).substr(-6), r.stroke())
} else if (u.type === a.SHAPES.RECT)(u.fillColor || 0 === u.fillColor) && (r.globalAlpha = u.fillAlpha * n, r.fillStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), r.fillRect(l.x, l.y, l.width, l.height)), u.lineWidth && (r.globalAlpha = u.lineAlpha * n, r.strokeStyle = "#" + ("00000" + (0 | c).toString(16)).substr(-6), r.strokeRect(l.x, l.y, l.width, l.height));
else if (u.type === a.SHAPES.CIRC) r.beginPath(), r.arc(l.x, l.y, l.radius, 0, 2 * Math.PI), r.closePath(), u.fill && (r.globalAlpha = u.fillAlpha * n, r.fillStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), r.fill()), u.lineWidth && (r.globalAlpha = u.lineAlpha * n, r.strokeStyle = "#" + ("00000" + (0 | c).toString(16)).substr(-6), r.stroke());
else if (u.type === a.SHAPES.ELIP) {
var d = 2 * l.width,
p = 2 * l.height,
v = l.x - d / 2,
y = l.y - p / 2;
r.beginPath();
var g = d / 2 * .5522848,
m = p / 2 * .5522848,
_ = v + d,
b = y + p,
x = v + d / 2,
w = y + p / 2;
r.moveTo(v, w), r.bezierCurveTo(v, w - m, x - g, y, x, y), r.bezierCurveTo(x + g, y, _, w - m, _, w), r.bezierCurveTo(_, w + m, x + g, b, x, b), r.bezierCurveTo(x - g, b, v, w + m, v, w), r.closePath(), u.fill && (r.globalAlpha = u.fillAlpha * n, r.fillStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), r.fill()), u.lineWidth && (r.globalAlpha = u.lineAlpha * n, r.strokeStyle = "#" + ("00000" + (0 | c).toString(16)).substr(-6), r.stroke())
} else if (u.type === a.SHAPES.RREC) {
var T = l.x,
E = l.y,
S = l.width,
M = l.height,
P = l.radius,
O = Math.min(S, M) / 2 | 0;
P = P > O ? O : P, r.beginPath(), r.moveTo(T, E + P), r.lineTo(T, E + M - P), r.quadraticCurveTo(T, E + M, T + P, E + M), r.lineTo(T + S - P, E + M), r.quadraticCurveTo(T + S, E + M, T + S, E + M - P), r.lineTo(T + S, E + P), r.quadraticCurveTo(T + S, E, T + S - P, E), r.lineTo(T + P, E), r.quadraticCurveTo(T, E, T, E + P), r.closePath(), (u.fillColor || 0 === u.fillColor) && (r.globalAlpha = u.fillAlpha * n, r.fillStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), r.fill()), u.lineWidth && (r.globalAlpha = u.lineAlpha * n, r.strokeStyle = "#" + ("00000" + (0 | c).toString(16)).substr(-6), r.stroke())
}
}
}, t.prototype.updateGraphicsTint = function(t) {
t._prevTint = t.tint;
for (var e = (t.tint >> 16 & 255) / 255, r = (t.tint >> 8 & 255) / 255, n = (255 & t.tint) / 255, i = 0; i < t.graphicsData.length; ++i) {
var o = t.graphicsData[i],
a = 0 | o.fillColor,
s = 0 | o.lineColor;
o._fillTint = ((a >> 16 & 255) / 255 * e * 255 << 16) + ((a >> 8 & 255) / 255 * r * 255 << 8) + (255 & a) / 255 * n * 255, o._lineTint = ((s >> 16 & 255) / 255 * e * 255 << 16) + ((s >> 8 & 255) / 255 * r * 255 << 8) + (255 & s) / 255 * n * 255
}
}, t.prototype.renderPolygon = function(t, e, r) {
r.moveTo(t[0], t[1]);
for (var n = 1; n < t.length / 2; ++n) r.lineTo(t[2 * n], t[2 * n + 1]);
e && r.closePath()
}, t.prototype.destroy = function() {
this.renderer = null
}, t
}();
e.default = s, o.default.registerPlugin("graphics", s)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = r(0),
o = r(3);
var a = function() {
function t(e, r) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.baseTexture = e, this.textures = {}, this.data = r, this.resolution = this._updateResolution(n || this.baseTexture.imageUrl), this._frames = this.data.frames, this._frameKeys = Object.keys(this._frames), this._batchIndex = 0, this._callback = null
}
return n(t, null, [{
key: "BATCH_SIZE",
get: function() {
return 1e3
}
}]), t.prototype._updateResolution = function(t) {
var e = this.data.meta.scale,
r = (0, o.getResolutionOfUrl)(t, null);
return null === r && (r = void 0 !== e ? parseFloat(e) : 1), 1 !== r && (this.baseTexture.resolution = r, this.baseTexture.update()), r
}, t.prototype.parse = function(e) {
this._batchIndex = 0, this._callback = e, this._frameKeys.length <= t.BATCH_SIZE ? (this._processFrames(0), this._parseComplete()) : this._nextBatch()
}, t.prototype._processFrames = function(e) {
for (var r = e, n = t.BATCH_SIZE, o = this.baseTexture.sourceScale; r - e < n && r < this._frameKeys.length;) {
var a = this._frameKeys[r],
s = this._frames[a],
u = s.frame;
if (u) {
var l = null,
h = null,
c = !1 !== s.trimmed && s.sourceSize ? s.sourceSize : s.frame,
f = new i.Rectangle(0, 0, Math.floor(c.w * o) / this.resolution, Math.floor(c.h * o) / this.resolution);
l = s.rotated ? new i.Rectangle(Math.floor(u.x * o) / this.resolution, Math.floor(u.y * o) / this.resolution, Math.floor(u.h * o) / this.resolution, Math.floor(u.w * o) / this.resolution) : new i.Rectangle(Math.floor(u.x * o) / this.resolution, Math.floor(u.y * o) / this.resolution, Math.floor(u.w * o) / this.resolution, Math.floor(u.h * o) / this.resolution), !1 !== s.trimmed && s.spriteSourceSize && (h = new i.Rectangle(Math.floor(s.spriteSourceSize.x * o) / this.resolution, Math.floor(s.spriteSourceSize.y * o) / this.resolution, Math.floor(u.w * o) / this.resolution, Math.floor(u.h * o) / this.resolution)), this.textures[a] = new i.Texture(this.baseTexture, l, f, h, s.rotated ? 2 : 0), i.Texture.addToCache(this.textures[a], a)
}
r++
}
}, t.prototype._parseComplete = function() {
var t = this._callback;
this._callback = null, this._batchIndex = 0, t.call(this, this.textures)
}, t.prototype._nextBatch = function() {
var e = this;
this._processFrames(this._batchIndex * t.BATCH_SIZE), this._batchIndex++, setTimeout(function() {
e._batchIndex * t.BATCH_SIZE < e._frameKeys.length ? e._nextBatch() : e._parseComplete()
}, 0)
}, t.prototype.destroy = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
for (var e in this.textures) this.textures[e].destroy();
this._frames = null, this._frameKeys = null, this.data = null, this.textures = null, t && this.baseTexture.destroy(), this.baseTexture = null
}, t
}();
e.default = a
}, function(t, e, r) {
"use strict";
function n(t) {
var e = (new Error).stack;
void 0 === e ? console.warn("Deprecation Warning: ", t) : (e = e.split("\n").splice(3).join("\n"), console.groupCollapsed ? (console.groupCollapsed("%cDeprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", t), console.warn(e), console.groupEnd()) : (console.warn("Deprecation Warning: ", t), console.warn(e)))
}
e.__esModule = !0, e.default = function(t) {
var e = t.mesh,
r = t.particles,
i = t.extras,
o = t.filters,
a = t.prepare,
s = t.loaders,
u = t.interaction;
Object.defineProperties(t, {
SpriteBatch: {
get: function() {
throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")
}
},
AssetLoader: {
get: function() {
throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")
}
},
Stage: {
get: function() {
return n("You do not need to use a PIXI Stage any more, you can simply render any container."), t.Container
}
},
DisplayObjectContainer: {
get: function() {
return n("DisplayObjectContainer has been shortened to Container, please use Container from now on."), t.Container
}
},
Strip: {
get: function() {
return n("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."), e.Mesh
}
},
Rope: {
get: function() {
return n("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."), e.Rope
}
},
ParticleContainer: {
get: function() {
return n("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."), r.ParticleContainer
}
},
MovieClip: {
get: function() {
return n("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."), i.AnimatedSprite
}
},
TilingSprite: {
get: function() {
return n("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."), i.TilingSprite
}
},
BitmapText: {
get: function() {
return n("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."), i.BitmapText
}
},
blendModes: {
get: function() {
return n("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."), t.BLEND_MODES
}
},
scaleModes: {
get: function() {
return n("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."), t.SCALE_MODES
}
},
BaseTextureCache: {
get: function() {
return n("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."), t.utils.BaseTextureCache
}
},
TextureCache: {
get: function() {
return n("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."), t.utils.TextureCache
}
},
math: {
get: function() {
return n("The math namespace is deprecated, please access members already accessible on PIXI."), t
}
},
AbstractFilter: {
get: function() {
return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"), t.Filter
}
},
TransformManual: {
get: function() {
return n("TransformManual has been renamed to TransformBase, please update your pixi-spine"), t.TransformBase
}
},
TARGET_FPMS: {
get: function() {
return n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"), t.settings.TARGET_FPMS
},
set: function(e) {
n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"), t.settings.TARGET_FPMS = e
}
},
FILTER_RESOLUTION: {
get: function() {
return n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"), t.settings.FILTER_RESOLUTION
},
set: function(e) {
n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"), t.settings.FILTER_RESOLUTION = e
}
},
RESOLUTION: {
get: function() {
return n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"), t.settings.RESOLUTION
},
set: function(e) {
n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"), t.settings.RESOLUTION = e
}
},
MIPMAP_TEXTURES: {
get: function() {
return n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"), t.settings.MIPMAP_TEXTURES
},
set: function(e) {
n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"), t.settings.MIPMAP_TEXTURES = e
}
},
SPRITE_BATCH_SIZE: {
get: function() {
return n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"), t.settings.SPRITE_BATCH_SIZE
},
set: function(e) {
n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"), t.settings.SPRITE_BATCH_SIZE = e
}
},
SPRITE_MAX_TEXTURES: {
get: function() {
return n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"), t.settings.SPRITE_MAX_TEXTURES
},
set: function(e) {
n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"), t.settings.SPRITE_MAX_TEXTURES = e
}
},
RETINA_PREFIX: {
get: function() {
return n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"), t.settings.RETINA_PREFIX
},
set: function(e) {
n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"), t.settings.RETINA_PREFIX = e
}
},
DEFAULT_RENDER_OPTIONS: {
get: function() {
return n("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"), t.settings.RENDER_OPTIONS
}
}
});
for (var l = [{
parent: "TRANSFORM_MODE",
target: "TRANSFORM_MODE"
}, {
parent: "GC_MODES",
target: "GC_MODE"
}, {
parent: "WRAP_MODES",
target: "WRAP_MODE"
}, {
parent: "SCALE_MODES",
target: "SCALE_MODE"
}, {
parent: "PRECISION",
target: "PRECISION_FRAGMENT"
}], h = function(e) {
var r = l[e];
Object.defineProperty(t[r.parent], "DEFAULT", {
get: function() {
return n("PIXI." + r.parent + ".DEFAULT has been deprecated, please use PIXI.settings." + r.target), t.settings[r.target]
},
set: function(e) {
n("PIXI." + r.parent + ".DEFAULT has been deprecated, please use PIXI.settings." + r.target), t.settings[r.target] = e
}
})
}, c = 0; c < l.length; c++) h(c);
Object.defineProperties(t.settings, {
PRECISION: {
get: function() {
return n("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"), t.settings.PRECISION_FRAGMENT
},
set: function(e) {
n("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"), t.settings.PRECISION_FRAGMENT = e
}
}
}), i.AnimatedSprite && Object.defineProperties(i, {
MovieClip: {
get: function() {
return n("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."), i.AnimatedSprite
}
}
});
i && Object.defineProperties(i, {
TextureTransform: {
get: function() {
return n("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."), t.TextureMatrix
}
}
});
t.DisplayObject.prototype.generateTexture = function(t, e, r) {
return n("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"), t.generateTexture(this, e, r)
}, t.Graphics.prototype.generateTexture = function(t, e) {
return n("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"), this.generateCanvasTexture(t, e)
}, t.GroupD8.isSwapWidthHeight = function(e) {
return n("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"), t.GroupD8.isVertical(e)
}, t.RenderTexture.prototype.render = function(t, e, r, i) {
this.legacyRenderer.render(t, this, r, e, !i), n("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")
}, t.RenderTexture.prototype.getImage = function(t) {
return n("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"), this.legacyRenderer.extract.image(t)
}, t.RenderTexture.prototype.getBase64 = function(t) {
return n("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"), this.legacyRenderer.extract.base64(t)
}, t.RenderTexture.prototype.getCanvas = function(t) {
return n("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"), this.legacyRenderer.extract.canvas(t)
}, t.RenderTexture.prototype.getPixels = function(t) {
return n("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"), this.legacyRenderer.pixels(t)
}, t.Sprite.prototype.setTexture = function(t) {
this.texture = t, n("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")
}, i.BitmapText && (i.BitmapText.prototype.setText = function(t) {
this.text = t, n("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")
});
t.Text.prototype.setText = function(t) {
this.text = t, n("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")
}, t.Text.calculateFontProperties = function(e) {
return n("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"), t.TextMetrics.measureFont(e)
}, Object.defineProperties(t.Text, {
fontPropertiesCache: {
get: function() {
return n("Text.fontPropertiesCache is deprecated"), t.TextMetrics._fonts
}
},
fontPropertiesCanvas: {
get: function() {
return n("Text.fontPropertiesCanvas is deprecated"), t.TextMetrics._canvas
}
},
fontPropertiesContext: {
get: function() {
return n("Text.fontPropertiesContext is deprecated"), t.TextMetrics._context
}
}
}), t.Text.prototype.setStyle = function(t) {
this.style = t, n("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")
}, t.Text.prototype.determineFontProperties = function(e) {
return n("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"), t.TextMetrics.measureFont(e)
}, t.Text.getFontStyle = function(e) {
return n("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"), (e = e || {}) instanceof t.TextStyle || (e = new t.TextStyle(e)), e.toFontString()
}, Object.defineProperties(t.TextStyle.prototype, {
font: {
get: function() {
n("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");
var t = "number" == typeof this._fontSize ? this._fontSize + "px" : this._fontSize;
return this._fontStyle + " " + this._fontVariant + " " + this._fontWeight + " " + t + " " + this._fontFamily
},
set: function(t) {
n("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"), t.indexOf("italic") > 1 ? this._fontStyle = "italic" : t.indexOf("oblique") > -1 ? this._fontStyle = "oblique" : this._fontStyle = "normal", t.indexOf("small-caps") > -1 ? this._fontVariant = "small-caps" : this._fontVariant = "normal";
var e = t.split(" "),
r = -1;
this._fontSize = 26;
for (var i = 0; i < e.length; ++i)
if (e[i].match(/(px|pt|em|%)/)) {
r = i, this._fontSize = e[i];
break
}
this._fontWeight = "normal";
for (var o = 0; o < r; ++o)
if (e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)) {
this._fontWeight = e[o];
break
}
if (r > -1 && r < e.length - 1) {
this._fontFamily = "";
for (var a = r + 1; a < e.length; ++a) this._fontFamily += e[a] + " ";
this._fontFamily = this._fontFamily.slice(0, -1)
} else this._fontFamily = "Arial";
this.styleID++
}
}
}), t.Texture.prototype.setFrame = function(t) {
this.frame = t, n("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")
}, t.Texture.addTextureToCache = function(e, r) {
t.Texture.addToCache(e, r), n("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")
}, t.Texture.removeTextureFromCache = function(e) {
return n("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"), t.BaseTexture.removeFromCache(e), t.Texture.removeFromCache(e)
}, Object.defineProperties(o, {
AbstractFilter: {
get: function() {
return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"), t.AbstractFilter
}
},
SpriteMaskFilter: {
get: function() {
return n("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."), t.SpriteMaskFilter
}
},
VoidFilter: {
get: function() {
return n("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"), o.AlphaFilter
}
}
}), t.utils.uuid = function() {
return n("utils.uuid() is deprecated, please use utils.uid() from now on."), t.utils.uid()
}, t.utils.canUseNewCanvasBlendModes = function() {
return n("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"), t.CanvasTinter.canUseMultiply
};
var f = !0;
Object.defineProperty(t.utils, "_saidHello", {
set: function(t) {
t && (n("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"), this.skipHello()), f = t
},
get: function() {
return f
}
}), a.BasePrepare && (a.BasePrepare.prototype.register = function(t, e) {
return n("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"), t && this.registerFindHook(t), e && this.registerUploadHook(e), this
});
a.canvas && Object.defineProperty(a.canvas, "UPLOADS_PER_FRAME", {
set: function() {
n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")
},
get: function() {
return n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"), NaN
}
});
a.webgl && Object.defineProperty(a.webgl, "UPLOADS_PER_FRAME", {
set: function() {
n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")
},
get: function() {
return n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"), NaN
}
});
if (s.Loader) {
var d = s.Resource,
p = s.Loader;
Object.defineProperties(d.prototype, {
isJson: {
get: function() {
return n("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."), this.type === d.TYPE.JSON
}
},
isXml: {
get: function() {
return n("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."), this.type === d.TYPE.XML
}
},
isImage: {
get: function() {
return n("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."), this.type === d.TYPE.IMAGE
}
},
isAudio: {
get: function() {
return n("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."), this.type === d.TYPE.AUDIO
}
},
isVideo: {
get: function() {
return n("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."), this.type === d.TYPE.VIDEO
}
}
}), Object.defineProperties(p.prototype, {
before: {
get: function() {
return n("The before() method is deprecated, please use pre()."), this.pre
}
},
after: {
get: function() {
return n("The after() method is deprecated, please use use()."), this.use
}
}
})
}
u.interactiveTarget && Object.defineProperty(u.interactiveTarget, "defaultCursor", {
set: function(t) {
n("Property defaultCursor has been replaced with 'cursor'. "), this.cursor = t
},
get: function() {
return n("Property defaultCursor has been replaced with 'cursor'. "), this.cursor
}
});
u.InteractionManager && (Object.defineProperty(u.InteractionManager, "defaultCursorStyle", {
set: function(t) {
n("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "), this.cursorStyles.default = t
},
get: function() {
return n("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "), this.cursorStyles.default
}
}), Object.defineProperty(u.InteractionManager, "currentCursorStyle", {
set: function(t) {
n("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."), this.currentCursorMode = t
},
get: function() {
return n("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."), this.currentCursorMode
}
}))
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(75);
Object.defineProperty(e, "accessibleTarget", {
enumerable: !0,
get: function() {
return o(n).default
}
});
var i = r(167);
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "AccessibilityManager", {
enumerable: !0,
get: function() {
return o(i).default
}
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
i = a(r(29)),
o = a(r(75));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
n.utils.mixins.delayMixin(n.DisplayObject.prototype, o.default);
var s = 100,
u = 0,
l = 0,
h = 2,
c = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), !i.default.tablet && !i.default.phone || navigator.isCocoonJS || this.createTouchHook();
var r = document.createElement("div");
r.style.width = s + "px", r.style.height = s + "px", r.style.position = "absolute", r.style.top = u + "px", r.style.left = l + "px", r.style.zIndex = h, this.div = r, this.pool = [], this.renderId = 0, this.debug = !1, this.renderer = e, this.children = [], this._onKeyDown = this._onKeyDown.bind(this), this._onMouseMove = this._onMouseMove.bind(this), this.isActive = !1, this.isMobileAccessabillity = !1, window.addEventListener("keydown", this._onKeyDown, !1)
}
return t.prototype.createTouchHook = function() {
var t = this,
e = document.createElement("button");
e.style.width = "1px", e.style.height = "1px", e.style.position = "absolute", e.style.top = "-1000px", e.style.left = "-1000px", e.style.zIndex = 2, e.style.backgroundColor = "#FF0000", e.title = "HOOK DIV", e.addEventListener("focus", function() {
t.isMobileAccessabillity = !0, t.activate(), document.body.removeChild(e)
}), document.body.appendChild(e)
}, t.prototype.activate = function() {
this.isActive || (this.isActive = !0, window.document.addEventListener("mousemove", this._onMouseMove, !0), window.removeEventListener("keydown", this._onKeyDown, !1), this.renderer.on("postrender", this.update, this), this.renderer.view.parentNode && this.renderer.view.parentNode.appendChild(this.div))
}, t.prototype.deactivate = function() {
this.isActive && !this.isMobileAccessabillity && (this.isActive = !1, window.document.removeEventListener("mousemove", this._onMouseMove), window.addEventListener("keydown", this._onKeyDown, !1), this.renderer.off("postrender", this.update), this.div.parentNode && this.div.parentNode.removeChild(this.div))
}, t.prototype.updateAccessibleObjects = function(t) {
if (t.visible) {
t.accessible && t.interactive && (t._accessibleActive || this.addChild(t), t.renderId = this.renderId);
for (var e = t.children, r = e.length - 1; r >= 0; r--) this.updateAccessibleObjects(e[r])
}
}, t.prototype.update = function() {
if (this.renderer.renderingToScreen) {
this.updateAccessibleObjects(this.renderer._lastObjectRendered);
var t = this.renderer.view.getBoundingClientRect(),
e = t.width / this.renderer.width,
r = t.height / this.renderer.height,
i = this.div;
i.style.left = t.left + "px", i.style.top = t.top + "px", i.style.width = this.renderer.width + "px", i.style.height = this.renderer.height + "px";
for (var o = 0; o < this.children.length; o++) {
var a = this.children[o];
if (a.renderId !== this.renderId) a._accessibleActive = !1, n.utils.removeItems(this.children, o, 1), this.div.removeChild(a._accessibleDiv), this.pool.push(a._accessibleDiv), a._accessibleDiv = null, o--, 0 === this.children.length && this.deactivate();
else {
i = a._accessibleDiv;
var s = a.hitArea,
u = a.worldTransform;
a.hitArea ? (i.style.left = (u.tx + s.x * u.a) * e + "px", i.style.top = (u.ty + s.y * u.d) * r + "px", i.style.width = s.width * u.a * e + "px", i.style.height = s.height * u.d * r + "px") : (s = a.getBounds(), this.capHitArea(s), i.style.left = s.x * e + "px", i.style.top = s.y * r + "px", i.style.width = s.width * e + "px", i.style.height = s.height * r + "px")
}
}
this.renderId++
}
}, t.prototype.capHitArea = function(t) {
t.x < 0 && (t.width += t.x, t.x = 0), t.y < 0 && (t.height += t.y, t.y = 0), t.x + t.width > this.renderer.width && (t.width = this.renderer.width - t.x), t.y + t.height > this.renderer.height && (t.height = this.renderer.height - t.y)
}, t.prototype.addChild = function(t) {
var e = this.pool.pop();
e || ((e = document.createElement("button")).style.width = s + "px", e.style.height = s + "px", e.style.backgroundColor = this.debug ? "rgba(255,0,0,0.5)" : "transparent", e.style.position = "absolute", e.style.zIndex = h, e.style.borderStyle = "none", e.addEventListener("click", this._onClick.bind(this)), e.addEventListener("focus", this._onFocus.bind(this)), e.addEventListener("focusout", this._onFocusOut.bind(this))), t.accessibleTitle ? e.title = t.accessibleTitle : t.accessibleTitle || t.accessibleHint || (e.title = "displayObject " + this.tabIndex), t.accessibleHint && e.setAttribute("aria-label", t.accessibleHint), t._accessibleActive = !0, t._accessibleDiv = e, e.displayObject = t, this.children.push(t), this.div.appendChild(t._accessibleDiv), t._accessibleDiv.tabIndex = t.tabIndex
}, t.prototype._onClick = function(t) {
var e = this.renderer.plugins.interaction;
e.dispatchEvent(t.target.displayObject, "click", e.eventData)
}, t.prototype._onFocus = function(t) {
var e = this.renderer.plugins.interaction;
e.dispatchEvent(t.target.displayObject, "mouseover", e.eventData)
}, t.prototype._onFocusOut = function(t) {
var e = this.renderer.plugins.interaction;
e.dispatchEvent(t.target.displayObject, "mouseout", e.eventData)
}, t.prototype._onKeyDown = function(t) {
9 === t.keyCode && this.activate()
}, t.prototype._onMouseMove = function() {
this.deactivate()
}, t.prototype.destroy = function() {
this.div = null;
for (var t = 0; t < this.children.length; t++) this.children[t].div = null;
window.document.removeEventListener("mousemove", this._onMouseMove), window.removeEventListener("keydown", this._onKeyDown), this.pool = null, this.children = null, this.renderer = null
}, t
}();
e.default = c, n.WebGLRenderer.registerPlugin("accessibility", c), n.CanvasRenderer.registerPlugin("accessibility", c)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(169);
Object.defineProperty(e, "webgl", {
enumerable: !0,
get: function() {
return o(n).default
}
});
var i = r(170);
function o(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "canvas", {
enumerable: !0,
get: function() {
return o(i).default
}
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
var i = new n.Rectangle,
o = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e, e.extract = this
}
return t.prototype.image = function(t) {
var e = new Image;
return e.src = this.base64(t), e
}, t.prototype.base64 = function(t) {
return this.canvas(t).toDataURL()
}, t.prototype.canvas = function(t) {
var e = this.renderer,
r = void 0,
o = void 0,
a = void 0,
s = !1,
u = void 0,
l = !1;
t && (t instanceof n.RenderTexture ? u = t : (u = this.renderer.generateTexture(t), l = !0)), u ? (o = (r = u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution, a = u.frame, s = !1) : (o = (r = this.renderer.rootRenderTarget).resolution, s = !0, (a = i).width = r.size.width, a.height = r.size.height);
var h = a.width * o,
c = a.height * o,
f = new n.CanvasRenderTarget(h, c);
if (r) {
e.bindRenderTarget(r);
var d = new Uint8Array(4 * h * c),
p = e.gl;
p.readPixels(a.x * o, a.y * o, h, c, p.RGBA, p.UNSIGNED_BYTE, d);
var v = f.context.getImageData(0, 0, h, c);
v.data.set(d), f.context.putImageData(v, 0, 0), s && (f.context.scale(1, -1), f.context.drawImage(f.canvas, 0, -c))
}
return l && u.destroy(!0), f.canvas
}, t.prototype.pixels = function(t) {
var e = this.renderer,
r = void 0,
o = void 0,
a = void 0,
s = void 0,
u = !1;
t && (t instanceof n.RenderTexture ? s = t : (s = this.renderer.generateTexture(t), u = !0)), s ? (o = (r = s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution, a = s.frame) : (o = (r = this.renderer.rootRenderTarget).resolution, (a = i).width = r.size.width, a.height = r.size.height);
var l = a.width * o,
h = a.height * o,
c = new Uint8Array(4 * l * h);
if (r) {
e.bindRenderTarget(r);
var f = e.gl;
f.readPixels(a.x * o, a.y * o, l, h, f.RGBA, f.UNSIGNED_BYTE, c)
}
return u && s.destroy(!0), c
}, t.prototype.destroy = function() {
this.renderer.extract = null, this.renderer = null
}, t
}();
e.default = o, n.WebGLRenderer.registerPlugin("extract", o)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
var i = new n.Rectangle,
o = function() {
function t(e) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.renderer = e, e.extract = this
}
return t.prototype.image = function(t) {
var e = new Image;
return e.src = this.base64(t), e
}, t.prototype.base64 = function(t) {
return this.canvas(t).toDataURL()
}, t.prototype.canvas = function(t) {
var e = this.renderer,
r = void 0,
o = void 0,
a = void 0,
s = void 0;
t && (s = t instanceof n.RenderTexture ? t : e.generateTexture(t)), s ? (r = s.baseTexture._canvasRenderTarget.context, o = s.baseTexture._canvasRenderTarget.resolution, a = s.frame) : (r = e.rootContext, (a = i).width = this.renderer.width, a.height = this.renderer.height);
var u = a.width * o,
l = a.height * o,
h = new n.CanvasRenderTarget(u, l),
c = r.getImageData(a.x * o, a.y * o, u, l);
return h.context.putImageData(c, 0, 0), h.canvas
}, t.prototype.pixels = function(t) {
var e = this.renderer,
r = void 0,
o = void 0,
a = void 0,
s = void 0;
return t && (s = t instanceof n.RenderTexture ? t : e.generateTexture(t)), s ? (r = s.baseTexture._canvasRenderTarget.context, o = s.baseTexture._canvasRenderTarget.resolution, a = s.frame) : (r = e.rootContext, (a = i).width = e.width, a.height = e.height), r.getImageData(0, 0, a.width * o, a.height * o).data
}, t.prototype.destroy = function() {
this.renderer.extract = null, this.renderer = null
}, t
}();
e.default = o, n.CanvasRenderer.registerPlugin("extract", o)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
var o = function(t) {
function e(r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var o = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r[0] instanceof i.Texture ? r[0] : r[0].texture));
return o._textures = null, o._durations = null, o.textures = r, o._autoUpdate = !1 !== n, o.animationSpeed = 1, o.loop = !0, o.onComplete = null, o.onFrameChange = null, o.onLoop = null, o._currentTime = 0, o.playing = !1, o
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.stop = function() {
this.playing && (this.playing = !1, this._autoUpdate && i.ticker.shared.remove(this.update, this))
}, e.prototype.play = function() {
this.playing || (this.playing = !0, this._autoUpdate && i.ticker.shared.add(this.update, this, i.UPDATE_PRIORITY.HIGH))
}, e.prototype.gotoAndStop = function(t) {
this.stop();
var e = this.currentFrame;
this._currentTime = t, e !== this.currentFrame && this.updateTexture()
}, e.prototype.gotoAndPlay = function(t) {
var e = this.currentFrame;
this._currentTime = t, e !== this.currentFrame && this.updateTexture(), this.play()
}, e.prototype.update = function(t) {
var e = this.animationSpeed * t,
r = this.currentFrame;
if (null !== this._durations) {
var n = this._currentTime % 1 * this._durations[this.currentFrame];
for (n += e / 60 * 1e3; n < 0;) this._currentTime--, n += this._durations[this.currentFrame];
var i = Math.sign(this.animationSpeed * t);
for (this._currentTime = Math.floor(this._currentTime); n >= this._durations[this.currentFrame];) n -= this._durations[this.currentFrame] * i, this._currentTime += i;
this._currentTime += n / this._durations[this.currentFrame]
} else this._currentTime += e;
this._currentTime < 0 && !this.loop ? (this.gotoAndStop(0), this.onComplete && this.onComplete()) : this._currentTime >= this._textures.length && !this.loop ? (this.gotoAndStop(this._textures.length - 1), this.onComplete && this.onComplete()) : r !== this.currentFrame && (this.loop && this.onLoop && (this.animationSpeed > 0 && this.currentFrame < r ? this.onLoop() : this.animationSpeed < 0 && this.currentFrame > r && this.onLoop()), this.updateTexture())
}, e.prototype.updateTexture = function() {
this._texture = this._textures[this.currentFrame], this._textureID = -1, this.cachedTint = 16777215, this.onFrameChange && this.onFrameChange(this.currentFrame)
}, e.prototype.destroy = function(e) {
this.stop(), t.prototype.destroy.call(this, e)
}, e.fromFrames = function(t) {
for (var r = [], n = 0; n < t.length; ++n) r.push(i.Texture.fromFrame(t[n]));
return new e(r)
}, e.fromImages = function(t) {
for (var r = [], n = 0; n < t.length; ++n) r.push(i.Texture.fromImage(t[n]));
return new e(r)
}, n(e, [{
key: "totalFrames",
get: function() {
return this._textures.length
}
}, {
key: "textures",
get: function() {
return this._textures
},
set: function(t) {
if (t[0] instanceof i.Texture) this._textures = t, this._durations = null;
else {
this._textures = [], this._durations = [];
for (var e = 0; e < t.length; e++) this._textures.push(t[e].texture), this._durations.push(t[e].time)
}
this.gotoAndStop(0), this.updateTexture()
}
}, {
key: "currentFrame",
get: function() {
var t = Math.floor(this._currentTime) % this._textures.length;
return t < 0 && (t += this._textures.length), t
}
}]), e
}(i.Sprite);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n, i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
a = r(35),
s = (n = a) && n.__esModule ? n : {
default: n
};
var u = new o.Point,
l = function(t) {
function e(r) {
var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 100,
i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 100;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var a = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return a.tileTransform = new o.TransformStatic, a._width = n, a._height = i, a._canvasPattern = null, a.uvTransform = r.transform || new o.TextureMatrix(r), a.pluginName = "tilingSprite", a.uvRespectAnchor = !1, a
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._onTextureUpdate = function() {
this.uvTransform && (this.uvTransform.texture = this._texture), this.cachedTint = 16777215
}, e.prototype._renderWebGL = function(t) {
var e = this._texture;
e && e.valid && (this.tileTransform.updateLocalTransform(), this.uvTransform.update(), t.setObjectRenderer(t.plugins[this.pluginName]), t.plugins[this.pluginName].render(this))
}, e.prototype._renderCanvas = function(t) {
var e = this._texture;
if (e.baseTexture.hasLoaded) {
var r = t.context,
n = this.worldTransform,
i = t.resolution,
a = e.baseTexture,
u = a.resolution,
l = this.tilePosition.x / this.tileScale.x % e._frame.width * u,
h = this.tilePosition.y / this.tileScale.y % e._frame.height * u;
if (this._textureID !== this._texture._updateID || this.cachedTint !== this.tint) {
this._textureID = this._texture._updateID;
var c = new o.CanvasRenderTarget(e._frame.width, e._frame.height, u);
16777215 !== this.tint ? (this.tintedTexture = s.default.getTintedTexture(this, this.tint), c.context.drawImage(this.tintedTexture, 0, 0)) : c.context.drawImage(a.source, -e._frame.x * u, -e._frame.y * u), this.cachedTint = this.tint, this._canvasPattern = c.context.createPattern(c.canvas, "repeat")
}
r.globalAlpha = this.worldAlpha, r.setTransform(n.a * i, n.b * i, n.c * i, n.d * i, n.tx * i, n.ty * i), t.setBlendMode(this.blendMode), r.fillStyle = this._canvasPattern, r.scale(this.tileScale.x / u, this.tileScale.y / u);
var f = this.anchor.x * -this._width,
d = this.anchor.y * -this._height;
this.uvRespectAnchor ? (r.translate(l, h), r.fillRect(-l + f, -h + d, this._width / this.tileScale.x * u, this._height / this.tileScale.y * u)) : (r.translate(l + f, h + d), r.fillRect(-l, -h, this._width / this.tileScale.x * u, this._height / this.tileScale.y * u))
}
}, e.prototype._calculateBounds = function() {
var t = this._width * -this._anchor._x,
e = this._height * -this._anchor._y,
r = this._width * (1 - this._anchor._x),
n = this._height * (1 - this._anchor._y);
this._bounds.addFrame(this.transform, t, e, r, n)
}, e.prototype.getLocalBounds = function(e) {
return 0 === this.children.length ? (this._bounds.minX = this._width * -this._anchor._x, this._bounds.minY = this._height * -this._anchor._y, this._bounds.maxX = this._width * (1 - this._anchor._x), this._bounds.maxY = this._height * (1 - this._anchor._x), e || (this._localBoundsRect || (this._localBoundsRect = new o.Rectangle), e = this._localBoundsRect), this._bounds.getRectangle(e)) : t.prototype.getLocalBounds.call(this, e)
}, e.prototype.containsPoint = function(t) {
this.worldTransform.applyInverse(t, u);
var e = this._width,
r = this._height,
n = -e * this.anchor._x;
if (u.x >= n && u.x < n + e) {
var i = -r * this.anchor._y;
if (u.y >= i && u.y < i + r) return !0
}
return !1
}, e.prototype.destroy = function(e) {
t.prototype.destroy.call(this, e), this.tileTransform = null, this.uvTransform = null
}, e.from = function(t, r, n) {
return new e(o.Texture.from(t), r, n)
}, e.fromFrame = function(t, r, n) {
var i = o.utils.TextureCache[t];
if (!i) throw new Error('The frameId "' + t + '" does not exist in the texture cache ' + this);
return new e(i, r, n)
}, e.fromImage = function(t, r, n, i, a) {
return new e(o.Texture.fromImage(t, i, a), r, n)
}, i(e, [{
key: "clampMargin",
get: function() {
return this.uvTransform.clampMargin
},
set: function(t) {
this.uvTransform.clampMargin = t, this.uvTransform.update(!0)
}
}, {
key: "tileScale",
get: function() {
return this.tileTransform.scale
},
set: function(t) {
this.tileTransform.scale.copy(t)
}
}, {
key: "tilePosition",
get: function() {
return this.tileTransform.position
},
set: function(t) {
this.tileTransform.position.copy(t)
}
}, {
key: "width",
get: function() {
return this._width
},
set: function(t) {
this._width = t
}
}, {
key: "height",
get: function() {
return this._height
},
set: function(t) {
this._height = t
}
}]), e
}(o.Sprite);
e.default = l
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
i = r(1);
r(7);
var o = new n.Matrix,
a = function(t) {
function e(r) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r));
return n.shader = null, n.simpleShader = null, n.quad = null, n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.onContextChange = function() {
var t = this.renderer.gl;
this.shader = new n.Shader(t, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n", "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"), this.simpleShader = new n.Shader(t, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n", "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"), this.renderer.bindVao(null), this.quad = new n.Quad(t, this.renderer.state.attribState), this.quad.initVao(this.shader)
}, e.prototype.render = function(t) {
var e = this.renderer,
r = this.quad;
e.bindVao(r.vao);
var a = r.vertices;
a[0] = a[6] = t._width * -t.anchor.x, a[1] = a[3] = t._height * -t.anchor.y, a[2] = a[4] = t._width * (1 - t.anchor.x), a[5] = a[7] = t._height * (1 - t.anchor.y), t.uvRespectAnchor && ((a = r.uvs)[0] = a[6] = -t.anchor.x, a[1] = a[3] = -t.anchor.y, a[2] = a[4] = 1 - t.anchor.x, a[5] = a[7] = 1 - t.anchor.y), r.upload();
var s = t._texture,
u = s.baseTexture,
l = t.tileTransform.localTransform,
h = t.uvTransform,
c = u.isPowerOfTwo && s.frame.width === u.width && s.frame.height === u.height;
c && (u._glTextures[e.CONTEXT_UID] ? c = u.wrapMode !== i.WRAP_MODES.CLAMP : u.wrapMode === i.WRAP_MODES.CLAMP && (u.wrapMode = i.WRAP_MODES.REPEAT));
var f = c ? this.simpleShader : this.shader;
e.bindShader(f);
var d = s.width,
p = s.height,
v = t._width,
y = t._height;
o.set(l.a * d / v, l.b * d / y, l.c * p / v, l.d * p / y, l.tx / v, l.ty / y), o.invert(), c ? o.prepend(h.mapCoord) : (f.uniforms.uMapCoord = h.mapCoord.toArray(!0), f.uniforms.uClampFrame = h.uClampFrame, f.uniforms.uClampOffset = h.uClampOffset), f.uniforms.uTransform = o.toArray(!0), f.uniforms.uColor = n.utils.premultiplyTintToRgba(t.tint, t.worldAlpha, f.uniforms.uColor, u.premultipliedAlpha), f.uniforms.translationMatrix = t.transform.worldTransform.toArray(!0), f.uniforms.uSampler = e.bindTexture(s), e.setBlendMode(n.utils.correctBlendMode(t.blendMode, u.premultipliedAlpha)), r.vao.draw(this.renderer.gl.TRIANGLES, 6, 0)
}, e
}(n.ObjectRenderer);
e.default = a, n.WebGLRenderer.registerPlugin("tilingSprite", a)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = u(r(43)),
a = r(3),
s = u(r(4));
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
var l = function(t) {
function e(r) {
var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var i = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return i._textWidth = 0, i._textHeight = 0, i._glyphs = [], i._font = {
tint: void 0 !== n.tint ? n.tint : 16777215,
align: n.align || "left",
name: null,
size: 0
}, i.font = n.font, i._text = r, i._maxWidth = 0, i._maxLineHeight = 0, i._anchor = new o.default(function() {
i.dirty = !0
}, i, 0, 0), i.dirty = !1, i.updateText(), i
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.updateText = function() {
for (var t = e.fonts[this._font.name], r = this._font.size / t.size, n = new i.Point, o = [], a = [], s = null, u = 0, l = 0, h = 0, c = -1, f = 0, d = 0, p = 0, v = 0; v < this.text.length; v++) {
var y = this.text.charCodeAt(v);
if (/(\s)/.test(this.text.charAt(v)) && (c = v, f = u), /(?:\r\n|\r|\n)/.test(this.text.charAt(v))) a.push(u), l = Math.max(l, u), h++, n.x = 0, n.y += t.lineHeight, s = null;
else if (-1 !== c && this._maxWidth > 0 && n.x * r > this._maxWidth) i.utils.removeItems(o, c - d, v - c), v = c, c = -1, ++d, a.push(f), l = Math.max(l, f), h++, n.x = 0, n.y += t.lineHeight, s = null;
else {
var g = t.chars[y];
g && (s && g.kerning[s] && (n.x += g.kerning[s]), o.push({
texture: g.texture,
line: h,
charCode: y,
position: new i.Point(n.x + g.xOffset, n.y + g.yOffset)
}), u = n.x + (g.texture.width + g.xOffset), n.x += g.xAdvance, p = Math.max(p, g.yOffset + g.texture.height), s = y)
}
}
a.push(u), l = Math.max(l, u);
for (var m = [], _ = 0; _ <= h; _++) {
var b = 0;
"right" === this._font.align ? b = l - a[_] : "center" === this._font.align && (b = (l - a[_]) / 2), m.push(b)
}
for (var x = o.length, w = this.tint, T = 0; T < x; T++) {
var E = this._glyphs[T];
E ? E.texture = o[T].texture : (E = new i.Sprite(o[T].texture), this._glyphs.push(E)), E.position.x = (o[T].position.x + m[o[T].line]) * r, E.position.y = o[T].position.y * r, E.scale.x = E.scale.y = r, E.tint = w, E.parent || this.addChild(E)
}
for (var S = x; S < this._glyphs.length; ++S) this.removeChild(this._glyphs[S]);
if (this._textWidth = l * r, this._textHeight = (n.y + t.lineHeight) * r, 0 !== this.anchor.x || 0 !== this.anchor.y)
for (var M = 0; M < x; M++) this._glyphs[M].x -= this._textWidth * this.anchor.x, this._glyphs[M].y -= this._textHeight * this.anchor.y;
this._maxLineHeight = p * r
}, e.prototype.updateTransform = function() {
this.validate(), this.containerUpdateTransform()
}, e.prototype.getLocalBounds = function() {
return this.validate(), t.prototype.getLocalBounds.call(this)
}, e.prototype.validate = function() {
this.dirty && (this.updateText(), this.dirty = !1)
}, e.registerFont = function(t, r) {
var n = {},
o = t.getElementsByTagName("info")[0],
u = t.getElementsByTagName("common")[0],
l = t.getElementsByTagName("page")[0].getAttribute("file"),
h = (0, a.getResolutionOfUrl)(l, s.default.RESOLUTION);
n.font = o.getAttribute("face"), n.size = parseInt(o.getAttribute("size"), 10), n.lineHeight = parseInt(u.getAttribute("lineHeight"), 10) / h, n.chars = {};
for (var c = t.getElementsByTagName("char"), f = 0; f < c.length; f++) {
var d = c[f],
p = parseInt(d.getAttribute("id"), 10),
v = new i.Rectangle(parseInt(d.getAttribute("x"), 10) / h + r.frame.x / h, parseInt(d.getAttribute("y"), 10) / h + r.frame.y / h, parseInt(d.getAttribute("width"), 10) / h, parseInt(d.getAttribute("height"), 10) / h);
n.chars[p] = {
xOffset: parseInt(d.getAttribute("xoffset"), 10) / h,
yOffset: parseInt(d.getAttribute("yoffset"), 10) / h,
xAdvance: parseInt(d.getAttribute("xadvance"), 10) / h,
kerning: {},
texture: new i.Texture(r.baseTexture, v)
}
}
for (var y = t.getElementsByTagName("kerning"), g = 0; g < y.length; g++) {
var m = y[g],
_ = parseInt(m.getAttribute("first"), 10) / h,
b = parseInt(m.getAttribute("second"), 10) / h,
x = parseInt(m.getAttribute("amount"), 10) / h;
n.chars[b] && (n.chars[b].kerning[_] = x)
}
return e.fonts[n.font] = n, n
}, n(e, [{
key: "tint",
get: function() {
return this._font.tint
},
set: function(t) {
this._font.tint = "number" == typeof t && t >= 0 ? t : 16777215, this.dirty = !0
}
}, {
key: "align",
get: function() {
return this._font.align
},
set: function(t) {
this._font.align = t || "left", this.dirty = !0
}
}, {
key: "anchor",
get: function() {
return this._anchor
},
set: function(t) {
"number" == typeof t ? this._anchor.set(t) : this._anchor.copy(t)
}
}, {
key: "font",
get: function() {
return this._font
},
set: function(t) {
t && ("string" == typeof t ? (t = t.split(" "), this._font.name = 1 === t.length ? t[0] : t.slice(1).join(" "), this._font.size = t.length >= 2 ? parseInt(t[0], 10) : e.fonts[this._font.name].size) : (this._font.name = t.name, this._font.size = "number" == typeof t.size ? t.size : parseInt(t.size, 10)), this.dirty = !0)
}
}, {
key: "text",
get: function() {
return this._text
},
set: function(t) {
t = t.toString() || " ", this._text !== t && (this._text = t, this.dirty = !0)
}
}, {
key: "maxWidth",
get: function() {
return this._maxWidth
},
set: function(t) {
this._maxWidth !== t && (this._maxWidth = t, this.dirty = !0)
}
}, {
key: "maxLineHeight",
get: function() {
return this.validate(), this._maxLineHeight
}
}, {
key: "textWidth",
get: function() {
return this.validate(), this._textWidth
}
}, {
key: "textHeight",
get: function() {
return this.validate(), this._textHeight
}
}]), e
}(i.Container);
e.default = l, l.fonts = {}
}, function(t, e, r) {
"use strict";
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
i = s(r(8)),
o = s(r(10)),
a = r(3);
function s(t) {
return t && t.__esModule ? t : {
default: t
}
}
var u = n.DisplayObject,
l = new n.Matrix;
u.prototype._cacheAsBitmap = !1, u.prototype._cacheData = !1;
var h = function t() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.textureCacheId = null, this.originalRenderWebGL = null, this.originalRenderCanvas = null, this.originalCalculateBounds = null, this.originalGetLocalBounds = null, this.originalUpdateTransform = null, this.originalHitTest = null, this.originalDestroy = null, this.originalMask = null, this.originalFilterArea = null, this.sprite = null
};
Object.defineProperties(u.prototype, {
cacheAsBitmap: {
get: function() {
return this._cacheAsBitmap
},
set: function(t) {
if (this._cacheAsBitmap !== t) {
this._cacheAsBitmap = t;
var e = void 0;
t ? (this._cacheData || (this._cacheData = new h), (e = this._cacheData).originalRenderWebGL = this.renderWebGL, e.originalRenderCanvas = this.renderCanvas, e.originalUpdateTransform = this.updateTransform, e.originalCalculateBounds = this._calculateBounds, e.originalGetLocalBounds = this.getLocalBounds, e.originalDestroy = this.destroy, e.originalContainsPoint = this.containsPoint, e.originalMask = this._mask, e.originalFilterArea = this.filterArea, this.renderWebGL = this._renderCachedWebGL, this.renderCanvas = this._renderCachedCanvas, this.destroy = this._cacheAsBitmapDestroy) : ((e = this._cacheData).sprite && this._destroyCachedDisplayObject(), this.renderWebGL = e.originalRenderWebGL, this.renderCanvas = e.originalRenderCanvas, this._calculateBounds = e.originalCalculateBounds, this.getLocalBounds = e.originalGetLocalBounds, this.destroy = e.originalDestroy, this.updateTransform = e.originalUpdateTransform, this.containsPoint = e.originalContainsPoint, this._mask = e.originalMask, this.filterArea = e.originalFilterArea)
}
}
}
}), u.prototype._renderCachedWebGL = function(t) {
!this.visible || this.worldAlpha <= 0 || !this.renderable || (this._initCachedDisplayObject(t), this._cacheData.sprite._transformID = -1, this._cacheData.sprite.worldAlpha = this.worldAlpha, this._cacheData.sprite._renderWebGL(t))
}, u.prototype._initCachedDisplayObject = function(t) {
if (!this._cacheData || !this._cacheData.sprite) {
var e = this.alpha;
this.alpha = 1, t.currentRenderer.flush();
var r = this.getLocalBounds().clone();
if (this._filters) {
var s = this._filters[0].padding;
r.pad(s)
}
var u = t._activeRenderTarget,
h = t.filterManager.filterStack,
c = n.RenderTexture.create(0 | r.width, 0 | r.height),
f = "cacheAsBitmap_" + (0, a.uid)();
this._cacheData.textureCacheId = f, o.default.addToCache(c.baseTexture, f), i.default.addToCache(c, f);
var d = l;
d.tx = -r.x, d.ty = -r.y, this.transform.worldTransform.identity(), this.renderWebGL = this._cacheData.originalRenderWebGL, t.render(this, c, !0, d, !0), t.bindRenderTarget(u), t.filterManager.filterStack = h, this.renderWebGL = this._renderCachedWebGL, this.updateTransform = this.displayObjectUpdateTransform, this._mask = null, this.filterArea = null;
var p = new n.Sprite(c);
p.transform.worldTransform = this.transform.worldTransform, p.anchor.x = -r.x / r.width, p.anchor.y = -r.y / r.height, p.alpha = e, p._bounds = this._bounds, this._calculateBounds = this._calculateCachedBounds, this.getLocalBounds = this._getCachedLocalBounds, this._cacheData.sprite = p, this.transform._parentID = -1, this.parent ? this.updateTransform() : (this.parent = t._tempDisplayObjectParent, this.updateTransform(), this.parent = null), this.containsPoint = p.containsPoint.bind(p)
}
}, u.prototype._renderCachedCanvas = function(t) {
!this.visible || this.worldAlpha <= 0 || !this.renderable || (this._initCachedDisplayObjectCanvas(t), this._cacheData.sprite.worldAlpha = this.worldAlpha, this._cacheData.sprite.renderCanvas(t))
}, u.prototype._initCachedDisplayObjectCanvas = function(t) {
if (!this._cacheData || !this._cacheData.sprite) {
var e = this.getLocalBounds(),
r = this.alpha;
this.alpha = 1;
var s = t.context,
u = n.RenderTexture.create(0 | e.width, 0 | e.height),
h = "cacheAsBitmap_" + (0, a.uid)();
this._cacheData.textureCacheId = h, o.default.addToCache(u.baseTexture, h), i.default.addToCache(u, h);
var c = l;
this.transform.localTransform.copy(c), c.invert(), c.tx -= e.x, c.ty -= e.y, this.renderCanvas = this._cacheData.originalRenderCanvas, t.render(this, u, !0, c, !1), t.context = s, this.renderCanvas = this._renderCachedCanvas, this._calculateBounds = this._calculateCachedBounds, this._mask = null, this.filterArea = null;
var f = new n.Sprite(u);
f.transform.worldTransform = this.transform.worldTransform, f.anchor.x = -e.x / e.width, f.anchor.y = -e.y / e.height, f._bounds = this._bounds, f.alpha = r, this.parent ? this.updateTransform() : (this.parent = t._tempDisplayObjectParent, this.updateTransform(), this.parent = null), this.updateTransform = this.displayObjectUpdateTransform, this._cacheData.sprite = f, this.containsPoint = f.containsPoint.bind(f)
}
}, u.prototype._calculateCachedBounds = function() {
this._cacheData.sprite._calculateBounds()
}, u.prototype._getCachedLocalBounds = function() {
return this._cacheData.sprite.getLocalBounds()
}, u.prototype._destroyCachedDisplayObject = function() {
this._cacheData.sprite._texture.destroy(!0), this._cacheData.sprite = null, o.default.removeFromCache(this._cacheData.textureCacheId), i.default.removeFromCache(this._cacheData.textureCacheId), this._cacheData.textureCacheId = null
}, u.prototype._cacheAsBitmapDestroy = function(t) {
this.cacheAsBitmap = !1, this.destroy(t)
}
}, function(t, e, r) {
"use strict";
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
n.DisplayObject.prototype.name = null, n.Container.prototype.getChildByName = function(t) {
for (var e = 0; e < this.children.length; e++)
if (this.children[e].name === t) return this.children[e];
return null
}
}, function(t, e, r) {
"use strict";
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
n.DisplayObject.prototype.getGlobalPosition = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new n.Point,
e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
return this.parent ? this.parent.toGlobal(this.position, t, e) : (t.x = this.position.x, t.y = this.position.y), t
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(179);
Object.defineProperty(e, "FXAAFilter", {
enumerable: !0,
get: function() {
return c(n).default
}
});
var i = r(180);
Object.defineProperty(e, "NoiseFilter", {
enumerable: !0,
get: function() {
return c(i).default
}
});
var o = r(181);
Object.defineProperty(e, "DisplacementFilter", {
enumerable: !0,
get: function() {
return c(o).default
}
});
var a = r(182);
Object.defineProperty(e, "BlurFilter", {
enumerable: !0,
get: function() {
return c(a).default
}
});
var s = r(77);
Object.defineProperty(e, "BlurXFilter", {
enumerable: !0,
get: function() {
return c(s).default
}
});
var u = r(81);
Object.defineProperty(e, "BlurYFilter", {
enumerable: !0,
get: function() {
return c(u).default
}
});
var l = r(183);
Object.defineProperty(e, "ColorMatrixFilter", {
enumerable: !0,
get: function() {
return c(l).default
}
});
var h = r(184);
function c(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "AlphaFilter", {
enumerable: !0,
get: function() {
return c(h).default
}
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
r(7);
var i = function(t) {
function e() {
return function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e),
function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}", 'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e
}(n.Filter);
e.default = i
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
r(7);
var o = function(t) {
function e() {
var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : .5,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Math.random();
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var i = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));
return i.noise = r, i.seed = n, i
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), n(e, [{
key: "noise",
get: function() {
return this.uniforms.uNoise
},
set: function(t) {
this.uniforms.uNoise = t
}
}, {
key: "seed",
get: function() {
return this.uniforms.uSeed
},
set: function(t) {
this.uniforms.uSeed = t
}
}]), e
}(i.Filter);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
r(7);
var o = function(t) {
function e(r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var o = new i.Matrix;
r.renderable = !1;
var a = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}", "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale / filterArea.xy;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));
return a.maskSprite = r, a.maskMatrix = o, a.uniforms.mapSampler = r._texture, a.uniforms.filterMatrix = o, a.uniforms.scale = {
x: 1,
y: 1
}, null == n && (n = 20), a.scale = new i.Point(n, n), a
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.apply = function(t, e, r) {
this.uniforms.filterMatrix = t.calculateSpriteMatrix(this.maskMatrix, this.maskSprite), this.uniforms.scale.x = this.scale.x, this.uniforms.scale.y = this.scale.y, t.applyFilter(this, e, r)
}, n(e, [{
key: "map",
get: function() {
return this.uniforms.mapSampler
},
set: function(t) {
this.uniforms.mapSampler = t
}
}]), e
}(i.Filter);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = s(r(77)),
a = s(r(81));
function s(t) {
return t && t.__esModule ? t : {
default: t
}
}
var u = function(t) {
function e(r, n, s, u) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var l = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return l.blurXFilter = new o.default(r, n, s, u), l.blurYFilter = new a.default(r, n, s, u), l.padding = 0, l.resolution = s || i.settings.RESOLUTION, l.quality = n || 4, l.blur = r || 8, l
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.apply = function(t, e, r) {
var n = t.getRenderTarget(!0);
this.blurXFilter.apply(t, e, n, !0), this.blurYFilter.apply(t, n, r, !1), t.returnRenderTarget(n)
}, n(e, [{
key: "blur",
get: function() {
return this.blurXFilter.blur
},
set: function(t) {
this.blurXFilter.blur = this.blurYFilter.blur = t, this.padding = 2 * Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength))
}
}, {
key: "quality",
get: function() {
return this.blurXFilter.quality
},
set: function(t) {
this.blurXFilter.quality = this.blurYFilter.quality = t
}
}, {
key: "blurX",
get: function() {
return this.blurXFilter.blur
},
set: function(t) {
this.blurXFilter.blur = t, this.padding = 2 * Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength))
}
}, {
key: "blurY",
get: function() {
return this.blurYFilter.blur
},
set: function(t) {
this.blurYFilter.blur = t, this.padding = 2 * Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength))
}
}, {
key: "blendMode",
get: function() {
return this.blurYFilter._blendMode
},
set: function(t) {
this.blurYFilter._blendMode = t
}
}]), e
}(i.Filter);
e.default = u
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
r(7);
var o = function(t) {
function e() {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var r = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));
return r.uniforms.m = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], r.alpha = 1, r
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype._loadMatrix = function(t) {
var e = t;
arguments.length > 1 && void 0 !== arguments[1] && arguments[1] && (this._multiply(e, this.uniforms.m, t), e = this._colorMatrix(e)), this.uniforms.m = e
}, e.prototype._multiply = function(t, e, r) {
return t[0] = e[0] * r[0] + e[1] * r[5] + e[2] * r[10] + e[3] * r[15], t[1] = e[0] * r[1] + e[1] * r[6] + e[2] * r[11] + e[3] * r[16], t[2] = e[0] * r[2] + e[1] * r[7] + e[2] * r[12] + e[3] * r[17], t[3] = e[0] * r[3] + e[1] * r[8] + e[2] * r[13] + e[3] * r[18], t[4] = e[0] * r[4] + e[1] * r[9] + e[2] * r[14] + e[3] * r[19] + e[4], t[5] = e[5] * r[0] + e[6] * r[5] + e[7] * r[10] + e[8] * r[15], t[6] = e[5] * r[1] + e[6] * r[6] + e[7] * r[11] + e[8] * r[16], t[7] = e[5] * r[2] + e[6] * r[7] + e[7] * r[12] + e[8] * r[17], t[8] = e[5] * r[3] + e[6] * r[8] + e[7] * r[13] + e[8] * r[18], t[9] = e[5] * r[4] + e[6] * r[9] + e[7] * r[14] + e[8] * r[19] + e[9], t[10] = e[10] * r[0] + e[11] * r[5] + e[12] * r[10] + e[13] * r[15], t[11] = e[10] * r[1] + e[11] * r[6] + e[12] * r[11] + e[13] * r[16], t[12] = e[10] * r[2] + e[11] * r[7] + e[12] * r[12] + e[13] * r[17], t[13] = e[10] * r[3] + e[11] * r[8] + e[12] * r[13] + e[13] * r[18], t[14] = e[10] * r[4] + e[11] * r[9] + e[12] * r[14] + e[13] * r[19] + e[14], t[15] = e[15] * r[0] + e[16] * r[5] + e[17] * r[10] + e[18] * r[15], t[16] = e[15] * r[1] + e[16] * r[6] + e[17] * r[11] + e[18] * r[16], t[17] = e[15] * r[2] + e[16] * r[7] + e[17] * r[12] + e[18] * r[17], t[18] = e[15] * r[3] + e[16] * r[8] + e[17] * r[13] + e[18] * r[18], t[19] = e[15] * r[4] + e[16] * r[9] + e[17] * r[14] + e[18] * r[19] + e[19], t
}, e.prototype._colorMatrix = function(t) {
var e = new Float32Array(t);
return e[4] /= 255, e[9] /= 255, e[14] /= 255, e[19] /= 255, e
}, e.prototype.brightness = function(t, e) {
var r = [t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 1, 0];
this._loadMatrix(r, e)
}, e.prototype.greyscale = function(t, e) {
var r = [t, t, t, 0, 0, t, t, t, 0, 0, t, t, t, 0, 0, 0, 0, 0, 1, 0];
this._loadMatrix(r, e)
}, e.prototype.blackAndWhite = function(t) {
this._loadMatrix([.3, .6, .1, 0, 0, .3, .6, .1, 0, 0, .3, .6, .1, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.hue = function(t, e) {
t = (t || 0) / 180 * Math.PI;
var r = Math.cos(t),
n = Math.sin(t),
i = 1 / 3,
o = (0, Math.sqrt)(i),
a = [r + (1 - r) * i, i * (1 - r) - o * n, i * (1 - r) + o * n, 0, 0, i * (1 - r) + o * n, r + i * (1 - r), i * (1 - r) - o * n, 0, 0, i * (1 - r) - o * n, i * (1 - r) + o * n, r + i * (1 - r), 0, 0, 0, 0, 0, 1, 0];
this._loadMatrix(a, e)
}, e.prototype.contrast = function(t, e) {
var r = (t || 0) + 1,
n = -.5 * (r - 1),
i = [r, 0, 0, 0, n, 0, r, 0, 0, n, 0, 0, r, 0, n, 0, 0, 0, 1, 0];
this._loadMatrix(i, e)
}, e.prototype.saturate = function() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
e = arguments[1],
r = 2 * t / 3 + 1,
n = -.5 * (r - 1),
i = [r, n, n, 0, 0, n, r, n, 0, 0, n, n, r, 0, 0, 0, 0, 0, 1, 0];
this._loadMatrix(i, e)
}, e.prototype.desaturate = function() {
this.saturate(-1)
}, e.prototype.negative = function(t) {
this._loadMatrix([0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.sepia = function(t) {
this._loadMatrix([.393, .7689999, .18899999, 0, 0, .349, .6859999, .16799999, 0, 0, .272, .5339999, .13099999, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.technicolor = function(t) {
this._loadMatrix([1.9125277891456083, -.8545344976951645, -.09155508482755585, 0, 11.793603434377337, -.3087833385928097, 1.7658908555458428, -.10601743074722245, 0, -70.35205161461398, -.231103377548616, -.7501899197440212, 1.847597816108189, 0, 30.950940869491138, 0, 0, 0, 1, 0], t)
}, e.prototype.polaroid = function(t) {
this._loadMatrix([1.438, -.062, -.062, 0, 0, -.122, 1.378, -.122, 0, 0, -.016, -.016, 1.483, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.toBGR = function(t) {
this._loadMatrix([0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.kodachrome = function(t) {
this._loadMatrix([1.1285582396593525, -.3967382283601348, -.03992559172921793, 0, 63.72958762196502, -.16404339962244616, 1.0835251566291304, -.05498805115633132, 0, 24.732407896706203, -.16786010706155763, -.5603416277695248, 1.6014850761964943, 0, 35.62982807460946, 0, 0, 0, 1, 0], t)
}, e.prototype.browni = function(t) {
this._loadMatrix([.5997023498159715, .34553243048391263, -.2708298674538042, 0, 47.43192855600873, -.037703249837783157, .8609577587992641, .15059552388459913, 0, -36.96841498319127, .24113635128153335, -.07441037908422492, .44972182064877153, 0, -7.562075277591283, 0, 0, 0, 1, 0], t)
}, e.prototype.vintage = function(t) {
this._loadMatrix([.6279345635605994, .3202183420819367, -.03965408211312453, 0, 9.651285835294123, .02578397704808868, .6441188644374771, .03259127616149294, 0, 7.462829176470591, .0466055556782719, -.0851232987247891, .5241648018700465, 0, 5.159190588235296, 0, 0, 0, 1, 0], t)
}, e.prototype.colorTone = function(t, e, r, n, i) {
var o = ((r = r || 16770432) >> 16 & 255) / 255,
a = (r >> 8 & 255) / 255,
s = (255 & r) / 255,
u = ((n = n || 3375104) >> 16 & 255) / 255,
l = (n >> 8 & 255) / 255,
h = (255 & n) / 255,
c = [.3, .59, .11, 0, 0, o, a, s, t = t || .2, 0, u, l, h, e = e || .15, 0, o - u, a - l, s - h, 0, 0];
this._loadMatrix(c, i)
}, e.prototype.night = function(t, e) {
var r = [-2 * (t = t || .1), -t, 0, 0, 0, -t, 0, t, 0, 0, 0, t, 2 * t, 0, 0, 0, 0, 0, 1, 0];
this._loadMatrix(r, e)
}, e.prototype.predator = function(t, e) {
var r = [11.224130630493164 * t, -4.794486999511719 * t, -2.8746118545532227 * t, 0 * t, .40342438220977783 * t, -3.6330697536468506 * t, 9.193157196044922 * t, -2.951810836791992 * t, 0 * t, -1.316135048866272 * t, -3.2184197902679443 * t, -4.2375030517578125 * t, 7.476448059082031 * t, 0 * t, .8044459223747253 * t, 0, 0, 0, 1, 0];
this._loadMatrix(r, e)
}, e.prototype.lsd = function(t) {
this._loadMatrix([2, -.4, .5, 0, 0, -.5, 2, -.4, 0, 0, -.4, -.5, 3, 0, 0, 0, 0, 0, 1, 0], t)
}, e.prototype.reset = function() {
this._loadMatrix([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], !1)
}, n(e, [{
key: "matrix",
get: function() {
return this.uniforms.m
},
set: function(t) {
this.uniforms.m = t
}
}, {
key: "alpha",
get: function() {
return this.uniforms.uAlpha
},
set: function(t) {
this.uniforms.uAlpha = t
}
}]), e
}(i.Filter);
e.default = o, o.prototype.grayscale = o.prototype.greyscale
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0));
r(7);
var o = function(t) {
function e() {
var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var n = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));
return n.alpha = r, n.glShaderKey = "alpha", n
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), n(e, [{
key: "alpha",
get: function() {
return this.uniforms.uAlpha
},
set: function(t) {
this.uniforms.uAlpha = t
}
}]), e
}(i.Filter);
e.default = o
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(82);
Object.defineProperty(e, "InteractionData", {
enumerable: !0,
get: function() {
return u(n).default
}
});
var i = r(186);
Object.defineProperty(e, "InteractionManager", {
enumerable: !0,
get: function() {
return u(i).default
}
});
var o = r(85);
Object.defineProperty(e, "interactiveTarget", {
enumerable: !0,
get: function() {
return u(o).default
}
});
var a = r(84);
Object.defineProperty(e, "InteractionTrackingData", {
enumerable: !0,
get: function() {
return u(a).default
}
});
var s = r(83);
function u(t) {
return t && t.__esModule ? t : {
default: t
}
}
Object.defineProperty(e, "InteractionEvent", {
enumerable: !0,
get: function() {
return u(s).default
}
})
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
return typeof t
} : function(t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
},
i = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(0)),
o = h(r(82)),
a = h(r(83)),
s = h(r(84)),
u = h(r(9)),
l = h(r(85));
function h(t) {
return t && t.__esModule ? t : {
default: t
}
}
i.utils.mixins.delayMixin(i.DisplayObject.prototype, l.default);
var c = 1,
f = {
target: null,
data: {
global: null
}
},
d = function(t) {
function e(r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var s = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this));
return n = n || {}, s.renderer = r, s.autoPreventDefault = void 0 === n.autoPreventDefault || n.autoPreventDefault, s.interactionFrequency = n.interactionFrequency || 10, s.mouse = new o.default, s.mouse.identifier = c, s.mouse.global.set(-999999), s.activeInteractionData = {}, s.activeInteractionData[c] = s.mouse, s.interactionDataPool = [], s.eventData = new a.default, s.interactionDOMElement = null, s.moveWhenInside = !1, s.eventsAdded = !1, s.mouseOverRenderer = !1, s.supportsTouchEvents = "ontouchstart" in window, s.supportsPointerEvents = !!window.PointerEvent, s.onPointerUp = s.onPointerUp.bind(s), s.processPointerUp = s.processPointerUp.bind(s), s.onPointerCancel = s.onPointerCancel.bind(s), s.processPointerCancel = s.processPointerCancel.bind(s), s.onPointerDown = s.onPointerDown.bind(s), s.processPointerDown = s.processPointerDown.bind(s), s.onPointerMove = s.onPointerMove.bind(s), s.processPointerMove = s.processPointerMove.bind(s), s.onPointerOut = s.onPointerOut.bind(s), s.processPointerOverOut = s.processPointerOverOut.bind(s), s.onPointerOver = s.onPointerOver.bind(s), s.cursorStyles = {
default: "inherit",
pointer: "pointer"
}, s.currentCursorMode = null, s.cursor = null, s._tempPoint = new i.Point, s.resolution = 1, s.setTargetElement(s.renderer.view, s.renderer.resolution), s
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.prototype.hitTest = function(t, e) {
return f.target = null, f.data.global = t, e || (e = this.renderer._lastObjectRendered), this.processInteractive(f, e, null, !0), f.target
}, e.prototype.setTargetElement = function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
this.removeEvents(), this.interactionDOMElement = t, this.resolution = e, this.addEvents()
}, e.prototype.addEvents = function() {
this.interactionDOMElement && (i.ticker.shared.add(this.update, this, i.UPDATE_PRIORITY.INTERACTION), window.navigator.msPointerEnabled ? (this.interactionDOMElement.style["-ms-content-zooming"] = "none", this.interactionDOMElement.style["-ms-touch-action"] = "none") : this.supportsPointerEvents && (this.interactionDOMElement.style["touch-action"] = "none"), this.supportsPointerEvents ? (window.document.addEventListener("pointermove", this.onPointerMove, !0), this.interactionDOMElement.addEventListener("pointerdown", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("pointerleave", this.onPointerOut, !0), this.interactionDOMElement.addEventListener("pointerover", this.onPointerOver, !0), window.addEventListener("pointercancel", this.onPointerCancel, !0), window.addEventListener("pointerup", this.onPointerUp, !0)) : (window.document.addEventListener("mousemove", this.onPointerMove, !0), this.interactionDOMElement.addEventListener("mousedown", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("mouseout", this.onPointerOut, !0), this.interactionDOMElement.addEventListener("mouseover", this.onPointerOver, !0), window.addEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.interactionDOMElement.addEventListener("touchstart", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("touchcancel", this.onPointerCancel, !0), this.interactionDOMElement.addEventListener("touchend", this.onPointerUp, !0), this.interactionDOMElement.addEventListener("touchmove", this.onPointerMove, !0)), this.eventsAdded = !0)
}, e.prototype.removeEvents = function() {
this.interactionDOMElement && (i.ticker.shared.remove(this.update, this), window.navigator.msPointerEnabled ? (this.interactionDOMElement.style["-ms-content-zooming"] = "", this.interactionDOMElement.style["-ms-touch-action"] = "") : this.supportsPointerEvents && (this.interactionDOMElement.style["touch-action"] = ""), this.supportsPointerEvents ? (window.document.removeEventListener("pointermove", this.onPointerMove, !0), this.interactionDOMElement.removeEventListener("pointerdown", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("pointerleave", this.onPointerOut, !0), this.interactionDOMElement.removeEventListener("pointerover", this.onPointerOver, !0), window.removeEventListener("pointercancel", this.onPointerCancel, !0), window.removeEventListener("pointerup", this.onPointerUp, !0)) : (window.document.removeEventListener("mousemove", this.onPointerMove, !0), this.interactionDOMElement.removeEventListener("mousedown", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("mouseout", this.onPointerOut, !0), this.interactionDOMElement.removeEventListener("mouseover", this.onPointerOver, !0), window.removeEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.interactionDOMElement.removeEventListener("touchstart", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("touchcancel", this.onPointerCancel, !0), this.interactionDOMElement.removeEventListener("touchend", this.onPointerUp, !0), this.interactionDOMElement.removeEventListener("touchmove", this.onPointerMove, !0)), this.interactionDOMElement = null, this.eventsAdded = !1)
}, e.prototype.update = function(t) {
if (this._deltaTime += t, !(this._deltaTime < this.interactionFrequency) && (this._deltaTime = 0, this.interactionDOMElement))
if (this.didMove) this.didMove = !1;
else {
for (var e in this.cursor = null, this.activeInteractionData)
if (this.activeInteractionData.hasOwnProperty(e)) {
var r = this.activeInteractionData[e];
if (r.originalEvent && "touch" !== r.pointerType) {
var n = this.configureInteractionEventForDOMEvent(this.eventData, r.originalEvent, r);
this.processInteractive(n, this.renderer._lastObjectRendered, this.processPointerOverOut, !0)
}
}
this.setCursorMode(this.cursor)
}
}, e.prototype.setCursorMode = function(t) {
if (t = t || "default", this.currentCursorMode !== t) {
this.currentCursorMode = t;
var e = this.cursorStyles[t];
if (e) switch (void 0 === e ? "undefined" : n(e)) {
case "string":
this.interactionDOMElement.style.cursor = e;
break;
case "function":
e(t);
break;
case "object":
Object.assign(this.interactionDOMElement.style, e)
} else "string" != typeof t || Object.prototype.hasOwnProperty.call(this.cursorStyles, t) || (this.interactionDOMElement.style.cursor = t)
}
}, e.prototype.dispatchEvent = function(t, e, r) {
r.stopped || (r.currentTarget = t, r.type = e, t.emit(e, r), t[e] && t[e](r))
}, e.prototype.mapPositionToPoint = function(t, e, r) {
var n = void 0;
n = this.interactionDOMElement.parentElement ? this.interactionDOMElement.getBoundingClientRect() : {
x: 0,
y: 0,
width: 0,
height: 0
};
var i = navigator.isCocoonJS ? this.resolution : 1 / this.resolution;
t.x = (e - n.left) * (this.interactionDOMElement.width / n.width) * i, t.y = (r - n.top) * (this.interactionDOMElement.height / n.height) * i
}, e.prototype.processInteractive = function(t, e, r, n, i) {
if (!e || !e.visible) return !1;
var o = t.data.global,
a = !1,
s = i = e.interactive || i,
u = !0;
if (e.hitArea ? (n && (e.worldTransform.applyInverse(o, this._tempPoint), e.hitArea.contains(this._tempPoint.x, this._tempPoint.y) ? a = !0 : (n = !1, u = !1)), s = !1) : e._mask && n && (e._mask.containsPoint(o) || (n = !1, u = !1)), u && e.interactiveChildren && e.children)
for (var l = e.children, h = l.length - 1; h >= 0; h--) {
var c = l[h],
f = this.processInteractive(t, c, r, n, s);
if (f) {
if (!c.parent) continue;
s = !1, f && (t.target && (n = !1), a = !0)
}
}
return i && (n && !t.target && !e.hitArea && e.containsPoint && e.containsPoint(o) && (a = !0), e.interactive && (a && !t.target && (t.target = e), r && r(t, e, !!a))), a
}, e.prototype.onPointerDown = function(t) {
if (!this.supportsTouchEvents || "touch" !== t.pointerType) {
var e = this.normalizeToPointerData(t);
this.autoPreventDefault && e[0].isNormalized && t.preventDefault();
for (var r = e.length, n = 0; n < r; n++) {
var i = e[n],
o = this.getInteractionDataForPointerId(i),
a = this.configureInteractionEventForDOMEvent(this.eventData, i, o);
if (a.data.originalEvent = t, this.processInteractive(a, this.renderer._lastObjectRendered, this.processPointerDown, !0), this.emit("pointerdown", a), "touch" === i.pointerType) this.emit("touchstart", a);
else if ("mouse" === i.pointerType || "pen" === i.pointerType) {
var s = 2 === i.button;
this.emit(s ? "rightdown" : "mousedown", this.eventData)
}
}
}
}, e.prototype.processPointerDown = function(t, e, r) {
var n = t.data,
i = t.data.identifier;
if (r)
if (e.trackedPointers[i] || (e.trackedPointers[i] = new s.default(i)), this.dispatchEvent(e, "pointerdown", t), "touch" === n.pointerType) this.dispatchEvent(e, "touchstart", t);
else if ("mouse" === n.pointerType || "pen" === n.pointerType) {
var o = 2 === n.button;
o ? e.trackedPointers[i].rightDown = !0 : e.trackedPointers[i].leftDown = !0, this.dispatchEvent(e, o ? "rightdown" : "mousedown", t)
}
}, e.prototype.onPointerComplete = function(t, e, r) {
for (var n = this.normalizeToPointerData(t), i = n.length, o = t.target !== this.interactionDOMElement ? "outside" : "", a = 0; a < i; a++) {
var s = n[a],
u = this.getInteractionDataForPointerId(s),
l = this.configureInteractionEventForDOMEvent(this.eventData, s, u);
if (l.data.originalEvent = t, this.processInteractive(l, this.renderer._lastObjectRendered, r, e || !o), this.emit(e ? "pointercancel" : "pointerup" + o, l), "mouse" === s.pointerType || "pen" === s.pointerType) {
var h = 2 === s.button;
this.emit(h ? "rightup" + o : "mouseup" + o, l)
} else "touch" === s.pointerType && (this.emit(e ? "touchcancel" : "touchend" + o, l), this.releaseInteractionDataForPointerId(s.pointerId, u))
}
}, e.prototype.onPointerCancel = function(t) {
this.supportsTouchEvents && "touch" === t.pointerType || this.onPointerComplete(t, !0, this.processPointerCancel)
}, e.prototype.processPointerCancel = function(t, e) {
var r = t.data,
n = t.data.identifier;
void 0 !== e.trackedPointers[n] && (delete e.trackedPointers[n], this.dispatchEvent(e, "pointercancel", t), "touch" === r.pointerType && this.dispatchEvent(e, "touchcancel", t))
}, e.prototype.onPointerUp = function(t) {
this.supportsTouchEvents && "touch" === t.pointerType || this.onPointerComplete(t, !1, this.processPointerUp)
}, e.prototype.processPointerUp = function(t, e, r) {
var n = t.data,
i = t.data.identifier,
o = e.trackedPointers[i],
a = "touch" === n.pointerType;
if ("mouse" === n.pointerType || "pen" === n.pointerType) {
var u = 2 === n.button,
l = s.default.FLAGS,
h = u ? l.RIGHT_DOWN : l.LEFT_DOWN,
c = void 0 !== o && o.flags & h;
r ? (this.dispatchEvent(e, u ? "rightup" : "mouseup", t), c && this.dispatchEvent(e, u ? "rightclick" : "click", t)) : c && this.dispatchEvent(e, u ? "rightupoutside" : "mouseupoutside", t), o && (u ? o.rightDown = !1 : o.leftDown = !1)
}
r ? (this.dispatchEvent(e, "pointerup", t), a && this.dispatchEvent(e, "touchend", t), o && (this.dispatchEvent(e, "pointertap", t), a && (this.dispatchEvent(e, "tap", t), o.over = !1))) : o && (this.dispatchEvent(e, "pointerupoutside", t), a && this.dispatchEvent(e, "touchendoutside", t)), o && o.none && delete e.trackedPointers[i]
}, e.prototype.onPointerMove = function(t) {
if (!this.supportsTouchEvents || "touch" !== t.pointerType) {
var e = this.normalizeToPointerData(t);
"mouse" === e[0].pointerType && (this.didMove = !0, this.cursor = null);
for (var r = e.length, n = 0; n < r; n++) {
var i = e[n],
o = this.getInteractionDataForPointerId(i),
a = this.configureInteractionEventForDOMEvent(this.eventData, i, o);
a.data.originalEvent = t;
var s = "touch" !== i.pointerType || this.moveWhenInside;
this.processInteractive(a, this.renderer._lastObjectRendered, this.processPointerMove, s), this.emit("pointermove", a), "touch" === i.pointerType && this.emit("touchmove", a), "mouse" !== i.pointerType && "pen" !== i.pointerType || this.emit("mousemove", a)
}
"mouse" === e[0].pointerType && this.setCursorMode(this.cursor)
}
}, e.prototype.processPointerMove = function(t, e, r) {
var n = t.data,
i = "touch" === n.pointerType,
o = "mouse" === n.pointerType || "pen" === n.pointerType;
o && this.processPointerOverOut(t, e, r), this.moveWhenInside && !r || (this.dispatchEvent(e, "pointermove", t), i && this.dispatchEvent(e, "touchmove", t), o && this.dispatchEvent(e, "mousemove", t))
}, e.prototype.onPointerOut = function(t) {
if (!this.supportsTouchEvents || "touch" !== t.pointerType) {
var e = this.normalizeToPointerData(t)[0];
"mouse" === e.pointerType && (this.mouseOverRenderer = !1, this.setCursorMode(null));
var r = this.getInteractionDataForPointerId(e),
n = this.configureInteractionEventForDOMEvent(this.eventData, e, r);
n.data.originalEvent = e, this.processInteractive(n, this.renderer._lastObjectRendered, this.processPointerOverOut, !1), this.emit("pointerout", n), "mouse" === e.pointerType || "pen" === e.pointerType ? this.emit("mouseout", n) : this.releaseInteractionDataForPointerId(r.identifier)
}
}, e.prototype.processPointerOverOut = function(t, e, r) {
var n = t.data,
i = t.data.identifier,
o = "mouse" === n.pointerType || "pen" === n.pointerType,
a = e.trackedPointers[i];
r && !a && (a = e.trackedPointers[i] = new s.default(i)), void 0 !== a && (r && this.mouseOverRenderer ? (a.over || (a.over = !0, this.dispatchEvent(e, "pointerover", t), o && this.dispatchEvent(e, "mouseover", t)), o && null === this.cursor && (this.cursor = e.cursor)) : a.over && (a.over = !1, this.dispatchEvent(e, "pointerout", this.eventData), o && this.dispatchEvent(e, "mouseout", t), a.none && delete e.trackedPointers[i]))
}, e.prototype.onPointerOver = function(t) {
var e = this.normalizeToPointerData(t)[0],
r = this.getInteractionDataForPointerId(e),
n = this.configureInteractionEventForDOMEvent(this.eventData, e, r);
n.data.originalEvent = e, "mouse" === e.pointerType && (this.mouseOverRenderer = !0), this.emit("pointerover", n), "mouse" !== e.pointerType && "pen" !== e.pointerType || this.emit("mouseover", n)
}, e.prototype.getInteractionDataForPointerId = function(t) {
var e = t.pointerId,
r = void 0;
return e === c || "mouse" === t.pointerType ? r = this.mouse : this.activeInteractionData[e] ? r = this.activeInteractionData[e] : ((r = this.interactionDataPool.pop() || new o.default).identifier = e, this.activeInteractionData[e] = r), r._copyEvent(t), r
}, e.prototype.releaseInteractionDataForPointerId = function(t) {
var e = this.activeInteractionData[t];
e && (delete this.activeInteractionData[t], e._reset(), this.interactionDataPool.push(e))
}, e.prototype.configureInteractionEventForDOMEvent = function(t, e, r) {
return t.data = r, this.mapPositionToPoint(r.global, e.clientX, e.clientY), navigator.isCocoonJS && "touch" === e.pointerType && (r.global.x = r.global.x / this.resolution, r.global.y = r.global.y / this.resolution), "touch" === e.pointerType && (e.globalX = r.global.x, e.globalY = r.global.y), r.originalEvent = e, t._reset(), t
}, e.prototype.normalizeToPointerData = function(t) {
var e = [];
if (this.supportsTouchEvents && t instanceof TouchEvent)
for (var r = 0, n = t.changedTouches.length; r < n; r++) {
var i = t.changedTouches[r];
void 0 === i.button && (i.button = t.touches.length ? 1 : 0), void 0 === i.buttons && (i.buttons = t.touches.length ? 1 : 0), void 0 === i.isPrimary && (i.isPrimary = 1 === t.touches.length && "touchstart" === t.type), void 0 === i.width && (i.width = i.radiusX || 1), void 0 === i.height && (i.height = i.radiusY || 1), void 0 === i.tiltX && (i.tiltX = 0), void 0 === i.tiltY && (i.tiltY = 0), void 0 === i.pointerType && (i.pointerType = "touch"), void 0 === i.pointerId && (i.pointerId = i.identifier || 0), void 0 === i.pressure && (i.pressure = i.force || .5), i.twist = 0, i.tangentialPressure = 0, void 0 === i.layerX && (i.layerX = i.offsetX = i.clientX), void 0 === i.layerY && (i.layerY = i.offsetY = i.clientY), i.isNormalized = !0, e.push(i)
} else !(t instanceof MouseEvent) || this.supportsPointerEvents && t instanceof window.PointerEvent ? e.push(t) : (void 0 === t.isPrimary && (t.isPrimary = !0), void 0 === t.width && (t.width = 1), void 0 === t.height && (t.height = 1), void 0 === t.tiltX && (t.tiltX = 0), void 0 === t.tiltY && (t.tiltY = 0), void 0 === t.pointerType && (t.pointerType = "mouse"), void 0 === t.pointerId && (t.pointerId = c), void 0 === t.pressure && (t.pressure = .5), t.twist = 0, t.tangentialPressure = 0, t.isNormalized = !0, e.push(t));
return e
}, e.prototype.destroy = function() {
this.removeEvents(), this.removeAllListeners(), this.renderer = null, this.mouse = null, this.eventData = null, this.interactionDOMElement = null, this.onPointerDown = null, this.processPointerDown = null, this.onPointerUp = null, this.processPointerUp = null, this.onPointerCancel = null, this.processPointerCancel = null, this.onPointerMove = null, this.processPointerMove = null, this.onPointerOut = null, this.processPointerOverOut = null, this.onPointerOver = null, this._tempPoint = null
}, e
}(u.default);
e.default = d, i.WebGLRenderer.registerPlugin("interaction", d), i.CanvasRenderer.registerPlugin("interaction", d)
}, function(t, e, r) {
"use strict";
e.__esModule = !0, e.shared = e.Resource = e.textureParser = e.getResourcePath = e.spritesheetParser = e.parseBitmapFontData = e.bitmapFontParser = e.Loader = void 0;
var n = r(86);
Object.defineProperty(e, "bitmapFontParser", {
enumerable: !0,
get: function() {
return l(n).default
}
}), Object.defineProperty(e, "parseBitmapFontData", {
enumerable: !0,
get: function() {
return n.parse
}
});
var i = r(91);
Object.defineProperty(e, "spritesheetParser", {
enumerable: !0,
get: function() {
return l(i).default
}
}), Object.defineProperty(e, "getResourcePath", {
enumerable: !0,
get: function() {
return i.getResourcePath
}
});
var o = r(92);
Object.defineProperty(e, "textureParser", {
enumerable: !0,
get: function() {
return l(o).default
}
});
var a = r(15);
Object.defineProperty(e, "Resource", {
enumerable: !0,
get: function() {
return a.Resource
}
});
var s = l(r(73)),
u = l(r(189));
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
e.Loader = u.default;
var h = new u.default;
h.destroy = function() {}, e.shared = h;
var c = s.default.prototype;
c._loader = null, Object.defineProperty(c, "loader", {
get: function() {
if (!this._loader) {
var t = this._options.sharedLoader;
this._loader = t ? h : new u.default
}
return this._loader
}
}), c._parentDestroy = c.destroy, c.destroy = function(t) {
this._loader && (this._loader.destroy(), this._loader = null), this._parentDestroy(t)
}
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
return typeof t
} : function(t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
},
i = function() {
function t(t, e) {
for (var r = 0; r < e.length; r++) {
var n = e[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
}
}
return function(e, r, n) {
return r && t(e.prototype, r), n && t(e, n), e
}
}(),
o = l(r(87)),
a = l(r(88)),
s = function(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
return e.default = t, e
}(r(89)),
u = l(r(37));
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
var h = /(#[\w-]+)?$/,
c = function() {
function t() {
var e = this,
r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 10;
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, t), this.baseUrl = r, this.progress = 0, this.loading = !1, this.defaultQueryString = "", this._beforeMiddleware = [], this._afterMiddleware = [], this._resourcesParsing = [], this._boundLoadResource = function(t, r) {
return e._loadResource(t, r)
}, this._queue = s.queue(this._boundLoadResource, n), this._queue.pause(), this.resources = {}, this.onProgress = new o.default, this.onError = new o.default, this.onLoad = new o.default, this.onStart = new o.default, this.onComplete = new o.default
}
return t.prototype.add = function(t, e, r, i) {
if (Array.isArray(t)) {
for (var o = 0; o < t.length; ++o) this.add(t[o]);
return this
}
if ("object" === (void 0 === t ? "undefined" : n(t)) && (i = e || t.callback || t.onComplete, r = t, e = t.url, t = t.name || t.key || t.url), "string" != typeof e && (i = r, r = e, e = t), "string" != typeof e) throw new Error("No url passed to add resource to loader.");
if ("function" == typeof r && (i = r, r = null), this.loading && (!r || !r.parentResource)) throw new Error("Cannot add resources while the loader is running.");
if (this.resources[t]) throw new Error('Resource named "' + t + '" already exists.');
if (e = this._prepareUrl(e), this.resources[t] = new u.default(t, e, r), "function" == typeof i && this.resources[t].onAfterMiddleware.once(i), this.loading) {
for (var a = r.parentResource, s = [], l = 0; l < a.children.length; ++l) a.children[l].isComplete || s.push(a.children[l]);
var h = a.progressChunk * (s.length + 1) / (s.length + 2);
a.children.push(this.resources[t]), a.progressChunk = h;
for (var c = 0; c < s.length; ++c) s[c].progressChunk = h;
this.resources[t].progressChunk = h
}
return this._queue.push(this.resources[t]), this
}, t.prototype.pre = function(t) {
return this._beforeMiddleware.push(t), this
}, t.prototype.use = function(t) {
return this._afterMiddleware.push(t), this
}, t.prototype.reset = function() {
for (var t in this.progress = 0, this.loading = !1, this._queue.kill(), this._queue.pause(), this.resources) {
var e = this.resources[t];
e._onLoadBinding && e._onLoadBinding.detach(), e.isLoading && e.abort()
}
return this.resources = {}, this
}, t.prototype.load = function(t) {
if ("function" == typeof t && this.onComplete.once(t), this.loading) return this;
if (this._queue.idle()) this._onStart(), this._onComplete();
else {
for (var e = 100 / this._queue._tasks.length, r = 0; r < this._queue._tasks.length; ++r) this._queue._tasks[r].data.progressChunk = e;
this._onStart(), this._queue.resume()
}
return this
}, t.prototype._prepareUrl = function(t) {
var e = (0, a.default)(t, {
strictMode: !0
}),
r = void 0;
if (r = e.protocol || !e.path || 0 === t.indexOf("//") ? t : this.baseUrl.length && this.baseUrl.lastIndexOf("/") !== this.baseUrl.length - 1 && "/" !== t.charAt(0) ? this.baseUrl + "/" + t : this.baseUrl + t, this.defaultQueryString) {
var n = h.exec(r)[0]; - 1 !== (r = r.substr(0, r.length - n.length)).indexOf("?") ? r += "&" + this.defaultQueryString : r += "?" + this.defaultQueryString, r += n
}
return r
}, t.prototype._loadResource = function(t, e) {
var r = this;
t._dequeue = e, s.eachSeries(this._beforeMiddleware, function(e, n) {
e.call(r, t, function() {
n(t.isComplete ? {} : null)
})
}, function() {
t.isComplete ? r._onLoad(t) : (t._onLoadBinding = t.onComplete.once(r._onLoad, r), t.load())
}, !0)
}, t.prototype._onStart = function() {
this.progress = 0, this.loading = !0, this.onStart.dispatch(this)
}, t.prototype._onComplete = function() {
this.progress = 100, this.loading = !1, this.onComplete.dispatch(this, this.resources)
}, t.prototype._onLoad = function(t) {
var e = this;
t._onLoadBinding = null, this._resourcesParsing.push(t), t._dequeue(), s.eachSeries(this._afterMiddleware, function(r, n) {
r.call(e, t, n)
}, function() {
t.onAfterMiddleware.dispatch(t), e.progress += t.progressChunk, e.onProgress.dispatch(e, t), t.error ? e.onError.dispatch(t.error, e, t) : e.onLoad.dispatch(e, t), e._resourcesParsing.splice(e._resourcesParsing.indexOf(t), 1), e._queue.idle() && 0 === e._resourcesParsing.length && e._onComplete()
}, !0)
}, i(t, [{
key: "concurrency",
get: function() {
return this._queue.concurrency
},
set: function(t) {
this._queue.concurrency = t
}
}]), t
}();
e.default = c
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = l(r(15)),
i = r(190),
o = l(r(9)),
a = l(r(92)),
s = l(r(91)),
u = l(r(86));
function l(t) {
return t && t.__esModule ? t : {
default: t
}
}
var h = function(t) {
function e(r, n) {
! function(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}(this, e);
var i = function(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}(this, t.call(this, r, n));
o.default.call(i);
for (var a = 0; a < e._pixiMiddleware.length; ++a) i.use(e._pixiMiddleware[a]());
return i.onStart.add(function(t) {
return i.emit("start", t)
}), i.onProgress.add(function(t, e) {
return i.emit("progress", t, e)
}), i.onError.add(function(t, e, r) {
return i.emit("error", t, e, r)
}), i.onLoad.add(function(t, e) {
return i.emit("load", t, e)
}), i.onComplete.add(function(t, e) {
return i.emit("complete", t, e)
}), i
}
return function(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}(e, t), e.addPixiMiddleware = function(t) {
e._pixiMiddleware.push(t)
}, e.prototype.destroy = function() {
this.removeAllListeners(), this.reset()
}, e
}(n.default);
for (var c in e.default = h, o.default.prototype) h.prototype[c] = o.default.prototype[c];
h._pixiMiddleware = [i.blobMiddlewareFactory, a.default, s.default, u.default];
var f = n.default.Resource;
f.setExtensionXhrType("fnt", f.XHR_RESPONSE_TYPE.DOCUMENT)
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
return typeof t
} : function(t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
};
e.blobMiddlewareFactory = function() {
return function(t, e) {
if (t.data) {
if (t.xhr && t.xhrType === i.default.XHR_RESPONSE_TYPE.BLOB)
if (window.Blob && "string" != typeof t.data) {
if (0 === t.data.type.indexOf("image")) {
var r = (u = s.createObjectURL(t.data), t.blob = t.data, t.data = new Image, t.data.src = u, t.type = i.default.TYPE.IMAGE, t.data.onload = function() {
s.revokeObjectURL(u), t.data.onload = null, e()
}, {
v: void 0
});
if ("object" === (void 0 === r ? "undefined" : n(r))) return r.v
}
} else {
var a = t.xhr.getResponseHeader("content-type");
if (a && 0 === a.indexOf("image")) return t.data = new Image, t.data.src = "data:" + a + ";base64," + o.default.encodeBinary(t.xhr.responseText), t.type = i.default.TYPE.IMAGE, void(t.data.onload = function() {
t.data.onload = null, e()
})
}
var u;
e()
} else e()
}
};
var i = a(r(37)),
o = a(r(90));
function a(t) {
return t && t.__esModule ? t : {
default: t
}
}
var s = window.URL || window.webkitURL
}, function(t, e, r) {
"use strict";
e.__esModule = !0;
var n = r(16);
Object.defineProperty(e, "Mesh", {
enumerable: !0,
ge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment