vitessce
Version:
This package is the main `vitessce` package on NPM. It exports the `<Vitessce/>` from `@vitessce/all` for backwards compatibility.
1,312 lines (1,311 loc) • 3.91 MB
JavaScript
import { c as Ca, e as Rl, g as mh, b as gh } from "./index.a9498574.mjs";
import yh from "react";
import Th from "react-dom";
function bh(T, g) {
for (var a = 0; a < g.length; a++) {
const h = g[a];
if (typeof h != "string" && !Array.isArray(h)) {
for (const E in h)
if (E !== "default" && !(E in T)) {
const c = Object.getOwnPropertyDescriptor(h, E);
c && Object.defineProperty(T, E, c.get ? c : {
enumerable: !0,
get: () => h[E]
});
}
}
}
return Object.freeze(Object.defineProperty(T, Symbol.toStringTag, { value: "Module" }));
}
var Ll = { exports: {} }, pf = {};
(function(T) {
(function(g) {
var a = g.Promise, h = a && "resolve" in a && "reject" in a && "all" in a && "race" in a && function() {
var b;
return new a(function(I) {
b = I;
}), typeof b == "function";
}();
T ? (T.Promise = h ? a : A, T.Polyfill = A) : h || (g.Promise = A);
var E = "pending", c = "sealed", n = "fulfilled", e = "rejected", o = function() {
};
function r(b) {
return Object.prototype.toString.call(b) === "[object Array]";
}
var l = typeof setImmediate < "u" ? setImmediate : setTimeout, i = [], t;
function s() {
for (var b = 0; b < i.length; b++)
i[b][0](i[b][1]);
i = [], t = !1;
}
function f(b, I) {
i.push([b, I]), t || (t = !0, l(s, 0));
}
function u(b, I) {
function S(O) {
d(I, O);
}
function w(O) {
x(I, O);
}
try {
b(S, w);
} catch (O) {
w(O);
}
}
function p(b) {
var I = b.owner, S = I.state_, w = I.data_, O = b[S], M = b.then;
if (typeof O == "function") {
S = n;
try {
w = O(w);
} catch (D) {
x(M, D);
}
}
v(M, w) || (S === n && d(M, w), S === e && x(M, w));
}
function v(b, I) {
var S;
try {
if (b === I)
throw new TypeError("A promises callback cannot return that same promise.");
if (I && (typeof I == "function" || typeof I == "object")) {
var w = I.then;
if (typeof w == "function")
return w.call(I, function(O) {
S || (S = !0, I !== O ? d(b, O) : m(b, O));
}, function(O) {
S || (S = !0, x(b, O));
}), !0;
}
} catch (O) {
return S || x(b, O), !0;
}
return !1;
}
function d(b, I) {
(b === I || !v(b, I)) && m(b, I);
}
function m(b, I) {
b.state_ === E && (b.state_ = c, b.data_ = I, f(C, b));
}
function x(b, I) {
b.state_ === E && (b.state_ = c, b.data_ = I, f(P, b));
}
function y(b) {
var I = b.then_;
b.then_ = void 0;
for (var S = 0; S < I.length; S++)
p(I[S]);
}
function C(b) {
b.state_ = n, y(b);
}
function P(b) {
b.state_ = e, y(b);
}
function A(b) {
if (typeof b != "function")
throw new TypeError("Promise constructor takes a function argument");
if (!(this instanceof A))
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
this.then_ = [], u(b, this);
}
A.prototype = {
constructor: A,
state_: E,
then_: null,
data_: void 0,
then: function(b, I) {
var S = {
owner: this,
then: new this.constructor(o),
fulfilled: b,
rejected: I
};
return this.state_ === n || this.state_ === e ? f(p, S) : this.then_.push(S), S.then;
},
catch: function(b) {
return this.then(null, b);
}
}, A.all = function(b) {
var I = this;
if (!r(b))
throw new TypeError("You must pass an array to Promise.all().");
return new I(function(S, w) {
var O = [], M = 0;
function D(_) {
return M++, function(N) {
O[_] = N, --M || S(O);
};
}
for (var L = 0, R; L < b.length; L++)
R = b[L], R && typeof R.then == "function" ? R.then(D(L), w) : O[L] = R;
M || S(O);
});
}, A.race = function(b) {
var I = this;
if (!r(b))
throw new TypeError("You must pass an array to Promise.race().");
return new I(function(S, w) {
for (var O = 0, M; O < b.length; O++)
M = b[O], M && typeof M.then == "function" ? M.then(S, w) : S(M);
});
}, A.resolve = function(b) {
var I = this;
return b && typeof b == "object" && b.constructor === I ? b : new I(function(S) {
S(b);
});
}, A.reject = function(b) {
var I = this;
return new I(function(S, w) {
w(b);
});
};
})(typeof window < "u" ? window : typeof Ca < "u" ? Ca : typeof self < "u" ? self : Ca);
})(pf);
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var iu = Object.getOwnPropertySymbols, Sh = Object.prototype.hasOwnProperty, Eh = Object.prototype.propertyIsEnumerable;
function xh(T) {
if (T == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(T);
}
function Ch() {
try {
if (!Object.assign)
return !1;
var T = new String("abc");
if (T[5] = "de", Object.getOwnPropertyNames(T)[0] === "5")
return !1;
for (var g = {}, a = 0; a < 10; a++)
g["_" + String.fromCharCode(a)] = a;
var h = Object.getOwnPropertyNames(g).map(function(c) {
return g[c];
});
if (h.join("") !== "0123456789")
return !1;
var E = {};
return "abcdefghijklmnopqrst".split("").forEach(function(c) {
E[c] = c;
}), Object.keys(Object.assign({}, E)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
var Ah = Ch() ? Object.assign : function(T, g) {
for (var a, h = xh(T), E, c = 1; c < arguments.length; c++) {
a = Object(arguments[c]);
for (var n in a)
Sh.call(a, n) && (h[n] = a[n]);
if (iu) {
E = iu(a);
for (var e = 0; e < E.length; e++)
Eh.call(a, E[e]) && (h[E[e]] = a[E[e]]);
}
}
return h;
};
/*!
* @pixi/polyfill - v5.3.12
* Compiled Wed, 23 Mar 2022 18:34:28 UTC
*
* @pixi/polyfill is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
window.Promise || (window.Promise = pf.Polyfill);
Object.assign || (Object.assign = Ah);
var Ph = 16;
Date.now && Date.prototype.getTime || (Date.now = function() {
return new Date().getTime();
});
if (!(window.performance && window.performance.now)) {
var wh = Date.now();
window.performance || (window.performance = {}), window.performance.now = function() {
return Date.now() - wh;
};
}
var bs = Date.now(), au = ["ms", "moz", "webkit", "o"];
for (var Ss = 0; Ss < au.length && !window.requestAnimationFrame; ++Ss) {
var Es = au[Ss];
window.requestAnimationFrame = window[Es + "RequestAnimationFrame"], window.cancelAnimationFrame = window[Es + "CancelAnimationFrame"] || window[Es + "CancelRequestAnimationFrame"];
}
window.requestAnimationFrame || (window.requestAnimationFrame = function(T) {
if (typeof T != "function")
throw new TypeError(T + "is not a function");
var g = Date.now(), a = Ph + bs - g;
return a < 0 && (a = 0), bs = g, window.setTimeout(function() {
bs = Date.now(), T(performance.now());
}, a);
});
window.cancelAnimationFrame || (window.cancelAnimationFrame = function(T) {
return clearTimeout(T);
});
Math.sign || (Math.sign = function(g) {
return g = Number(g), g === 0 || isNaN(g) ? g : g > 0 ? 1 : -1;
});
Number.isInteger || (Number.isInteger = function(g) {
return typeof g == "number" && isFinite(g) && Math.floor(g) === g;
});
window.ArrayBuffer || (window.ArrayBuffer = Array);
window.Float32Array || (window.Float32Array = Array);
window.Uint32Array || (window.Uint32Array = Array);
window.Uint16Array || (window.Uint16Array = Array);
window.Uint8Array || (window.Uint8Array = Array);
window.Int32Array || (window.Int32Array = Array);
var xs = /iPhone/i, ou = /iPod/i, su = /iPad/i, lu = /\biOS-universal(?:.+)Mac\b/i, Cs = /\bAndroid(?:.+)Mobile\b/i, uu = /Android/i, ba = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, Lo = /Silk/i, Ii = /Windows Phone/i, fu = /\bWindows(?:.+)ARM\b/i, cu = /BlackBerry/i, hu = /BB10/i, du = /Opera Mini/i, pu = /\b(CriOS|Chrome)(?:.+)Mobile/i, vu = /Mobile(?:.+)Firefox\b/i, mu = function(T) {
return typeof T < "u" && T.platform === "MacIntel" && typeof T.maxTouchPoints == "number" && T.maxTouchPoints > 1 && typeof MSStream > "u";
};
function Oh(T) {
return function(g) {
return g.test(T);
};
}
function Ih(T) {
var g = {
userAgent: "",
platform: "",
maxTouchPoints: 0
};
!T && typeof navigator < "u" ? g = {
userAgent: navigator.userAgent,
platform: navigator.platform,
maxTouchPoints: navigator.maxTouchPoints || 0
} : typeof T == "string" ? g.userAgent = T : T && T.userAgent && (g = {
userAgent: T.userAgent,
platform: T.platform,
maxTouchPoints: T.maxTouchPoints || 0
});
var a = g.userAgent, h = a.split("[FBAN");
typeof h[1] < "u" && (a = h[0]), h = a.split("Twitter"), typeof h[1] < "u" && (a = h[0]);
var E = Oh(a), c = {
apple: {
phone: E(xs) && !E(Ii),
ipod: E(ou),
tablet: !E(xs) && (E(su) || mu(g)) && !E(Ii),
universal: E(lu),
device: (E(xs) || E(ou) || E(su) || E(lu) || mu(g)) && !E(Ii)
},
amazon: {
phone: E(ba),
tablet: !E(ba) && E(Lo),
device: E(ba) || E(Lo)
},
android: {
phone: !E(Ii) && E(ba) || !E(Ii) && E(Cs),
tablet: !E(Ii) && !E(ba) && !E(Cs) && (E(Lo) || E(uu)),
device: !E(Ii) && (E(ba) || E(Lo) || E(Cs) || E(uu)) || E(/\bokhttp\b/i)
},
windows: {
phone: E(Ii),
tablet: E(fu),
device: E(Ii) || E(fu)
},
other: {
blackberry: E(cu),
blackberry10: E(hu),
opera: E(du),
firefox: E(vu),
chrome: E(pu),
device: E(cu) || E(hu) || E(du) || E(vu) || E(pu)
},
any: !1,
phone: !1,
tablet: !1
};
return c.any = c.apple.device || c.android.device || c.windows.device || c.other.device, c.phone = c.apple.phone || c.android.phone || c.windows.phone, c.tablet = c.apple.tablet || c.android.tablet || c.windows.tablet, c;
}
/*!
* @pixi/settings - v5.3.12
* Compiled Wed, 23 Mar 2022 18:34:28 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
var ci = Ih(window.navigator);
function Mh(T) {
var g = !0;
if (ci.tablet || ci.phone) {
if (ci.apple.device) {
var a = navigator.userAgent.match(/OS (\d+)_(\d+)?/);
if (a) {
var h = parseInt(a[1], 10);
h < 11 && (g = !1);
}
}
if (ci.android.device) {
var a = navigator.userAgent.match(/Android\s([0-9.]*)/);
if (a) {
var h = parseInt(a[1], 10);
h < 7 && (g = !1);
}
}
}
return g ? T : 4;
}
function Rh() {
return !ci.apple.device;
}
var Pr = {
MIPMAP_TEXTURES: 1,
ANISOTROPIC_LEVEL: 0,
RESOLUTION: 1,
FILTER_RESOLUTION: 1,
SPRITE_MAX_TEXTURES: Mh(32),
SPRITE_BATCH_SIZE: 4096,
RENDER_OPTIONS: {
view: null,
antialias: !1,
autoDensity: !1,
transparent: !1,
backgroundColor: 0,
clearBeforeRender: !0,
preserveDrawingBuffer: !1,
width: 800,
height: 600,
legacy: !1
},
GC_MODE: 0,
GC_MAX_IDLE: 60 * 60,
GC_MAX_CHECK_COUNT: 60 * 10,
WRAP_MODE: 33071,
SCALE_MODE: 1,
PRECISION_VERTEX: "highp",
PRECISION_FRAGMENT: ci.apple.device ? "highp" : "mediump",
CAN_UPLOAD_SAME_BUFFER: Rh(),
CREATE_IMAGE_BITMAP: !1,
ROUND_PIXELS: !1
}, vf = { exports: {} };
(function(T) {
var g = Object.prototype.hasOwnProperty, a = "~";
function h() {
}
Object.create && (h.prototype = /* @__PURE__ */ Object.create(null), new h().__proto__ || (a = !1));
function E(o, r, l) {
this.fn = o, this.context = r, this.once = l || !1;
}
function c(o, r, l, i, t) {
if (typeof l != "function")
throw new TypeError("The listener must be a function");
var s = new E(l, i || o, t), f = a ? a + r : r;
return o._events[f] ? o._events[f].fn ? o._events[f] = [o._events[f], s] : o._events[f].push(s) : (o._events[f] = s, o._eventsCount++), o;
}
function n(o, r) {
--o._eventsCount === 0 ? o._events = new h() : delete o._events[r];
}
function e() {
this._events = new h(), this._eventsCount = 0;
}
e.prototype.eventNames = function() {
var r = [], l, i;
if (this._eventsCount === 0)
return r;
for (i in l = this._events)
g.call(l, i) && r.push(a ? i.slice(1) : i);
return Object.getOwnPropertySymbols ? r.concat(Object.getOwnPropertySymbols(l)) : r;
}, e.prototype.listeners = function(r) {
var l = a ? a + r : r, i = this._events[l];
if (!i)
return [];
if (i.fn)
return [i.fn];
for (var t = 0, s = i.length, f = new Array(s); t < s; t++)
f[t] = i[t].fn;
return f;
}, e.prototype.listenerCount = function(r) {
var l = a ? a + r : r, i = this._events[l];
return i ? i.fn ? 1 : i.length : 0;
}, e.prototype.emit = function(r, l, i, t, s, f) {
var u = a ? a + r : r;
if (!this._events[u])
return !1;
var p = this._events[u], v = arguments.length, d, m;
if (p.fn) {
switch (p.once && this.removeListener(r, p.fn, void 0, !0), v) {
case 1:
return p.fn.call(p.context), !0;
case 2:
return p.fn.call(p.context, l), !0;
case 3:
return p.fn.call(p.context, l, i), !0;
case 4:
return p.fn.call(p.context, l, i, t), !0;
case 5:
return p.fn.call(p.context, l, i, t, s), !0;
case 6:
return p.fn.call(p.context, l, i, t, s, f), !0;
}
for (m = 1, d = new Array(v - 1); m < v; m++)
d[m - 1] = arguments[m];
p.fn.apply(p.context, d);
} else {
var x = p.length, y;
for (m = 0; m < x; m++)
switch (p[m].once && this.removeListener(r, p[m].fn, void 0, !0), v) {
case 1:
p[m].fn.call(p[m].context);
break;
case 2:
p[m].fn.call(p[m].context, l);
break;
case 3:
p[m].fn.call(p[m].context, l, i);
break;
case 4:
p[m].fn.call(p[m].context, l, i, t);
break;
default:
if (!d)
for (y = 1, d = new Array(v - 1); y < v; y++)
d[y - 1] = arguments[y];
p[m].fn.apply(p[m].context, d);
}
}
return !0;
}, e.prototype.on = function(r, l, i) {
return c(this, r, l, i, !1);
}, e.prototype.once = function(r, l, i) {
return c(this, r, l, i, !0);
}, e.prototype.removeListener = function(r, l, i, t) {
var s = a ? a + r : r;
if (!this._events[s])
return this;
if (!l)
return n(this, s), this;
var f = this._events[s];
if (f.fn)
f.fn === l && (!t || f.once) && (!i || f.context === i) && n(this, s);
else {
for (var u = 0, p = [], v = f.length; u < v; u++)
(f[u].fn !== l || t && !f[u].once || i && f[u].context !== i) && p.push(f[u]);
p.length ? this._events[s] = p.length === 1 ? p[0] : p : n(this, s);
}
return this;
}, e.prototype.removeAllListeners = function(r) {
var l;
return r ? (l = a ? a + r : r, this._events[l] && n(this, l)) : (this._events = new h(), this._eventsCount = 0), this;
}, e.prototype.off = e.prototype.removeListener, e.prototype.addListener = e.prototype.on, e.prefixed = a, e.EventEmitter = e, T.exports = e;
})(vf);
const Na = vf.exports;
var da = {}, js = { exports: {} };
/*! https://mths.be/punycode v1.3.2 by @mathias */
(function(T, g) {
(function(a) {
var h = g && !g.nodeType && g, E = T && !T.nodeType && T, c = typeof Ca == "object" && Ca;
(c.global === c || c.window === c || c.self === c) && (a = c);
var n, e = 2147483647, o = 36, r = 1, l = 26, i = 38, t = 700, s = 72, f = 128, u = "-", p = /^xn--/, v = /[^\x20-\x7E]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, m = {
overflow: "Overflow: input needs wider integers to process",
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
"invalid-input": "Invalid input"
}, x = o - r, y = Math.floor, C = String.fromCharCode, P;
function A(F) {
throw RangeError(m[F]);
}
function b(F, B) {
for (var G = F.length, V = []; G--; )
V[G] = B(F[G]);
return V;
}
function I(F, B) {
var G = F.split("@"), V = "";
G.length > 1 && (V = G[0] + "@", F = G[1]), F = F.replace(d, ".");
var H = F.split("."), k = b(H, B).join(".");
return V + k;
}
function S(F) {
for (var B = [], G = 0, V = F.length, H, k; G < V; )
H = F.charCodeAt(G++), H >= 55296 && H <= 56319 && G < V ? (k = F.charCodeAt(G++), (k & 64512) == 56320 ? B.push(((H & 1023) << 10) + (k & 1023) + 65536) : (B.push(H), G--)) : B.push(H);
return B;
}
function w(F) {
return b(F, function(B) {
var G = "";
return B > 65535 && (B -= 65536, G += C(B >>> 10 & 1023 | 55296), B = 56320 | B & 1023), G += C(B), G;
}).join("");
}
function O(F) {
return F - 48 < 10 ? F - 22 : F - 65 < 26 ? F - 65 : F - 97 < 26 ? F - 97 : o;
}
function M(F, B) {
return F + 22 + 75 * (F < 26) - ((B != 0) << 5);
}
function D(F, B, G) {
var V = 0;
for (F = G ? y(F / t) : F >> 1, F += y(F / B); F > x * l >> 1; V += o)
F = y(F / x);
return y(V + (x + 1) * F / (F + i));
}
function L(F) {
var B = [], G = F.length, V, H = 0, k = f, X = s, W, z, U, j, Z, le, $, ie, pe;
for (W = F.lastIndexOf(u), W < 0 && (W = 0), z = 0; z < W; ++z)
F.charCodeAt(z) >= 128 && A("not-basic"), B.push(F.charCodeAt(z));
for (U = W > 0 ? W + 1 : 0; U < G; ) {
for (j = H, Z = 1, le = o; U >= G && A("invalid-input"), $ = O(F.charCodeAt(U++)), ($ >= o || $ > y((e - H) / Z)) && A("overflow"), H += $ * Z, ie = le <= X ? r : le >= X + l ? l : le - X, !($ < ie); le += o)
pe = o - ie, Z > y(e / pe) && A("overflow"), Z *= pe;
V = B.length + 1, X = D(H - j, V, j == 0), y(H / V) > e - k && A("overflow"), k += y(H / V), H %= V, B.splice(H++, 0, k);
}
return w(B);
}
function R(F) {
var B, G, V, H, k, X, W, z, U, j, Z, le = [], $, ie, pe, ee;
for (F = S(F), $ = F.length, B = f, G = 0, k = s, X = 0; X < $; ++X)
Z = F[X], Z < 128 && le.push(C(Z));
for (V = H = le.length, H && le.push(u); V < $; ) {
for (W = e, X = 0; X < $; ++X)
Z = F[X], Z >= B && Z < W && (W = Z);
for (ie = V + 1, W - B > y((e - G) / ie) && A("overflow"), G += (W - B) * ie, B = W, X = 0; X < $; ++X)
if (Z = F[X], Z < B && ++G > e && A("overflow"), Z == B) {
for (z = G, U = o; j = U <= k ? r : U >= k + l ? l : U - k, !(z < j); U += o)
ee = z - j, pe = o - j, le.push(
C(M(j + ee % pe, 0))
), z = y(ee / pe);
le.push(C(M(z, 0))), k = D(G, ie, V == H), G = 0, ++V;
}
++G, ++B;
}
return le.join("");
}
function _(F) {
return I(F, function(B) {
return p.test(B) ? L(B.slice(4).toLowerCase()) : B;
});
}
function N(F) {
return I(F, function(B) {
return v.test(B) ? "xn--" + R(B) : B;
});
}
if (n = {
version: "1.3.2",
ucs2: {
decode: S,
encode: w
},
decode: L,
encode: R,
toASCII: N,
toUnicode: _
}, h && E)
if (T.exports == h)
E.exports = n;
else
for (P in n)
n.hasOwnProperty(P) && (h[P] = n[P]);
else
a.punycode = n;
})(Ca);
})(js, js.exports);
var Lh = {
isString: function(T) {
return typeof T == "string";
},
isObject: function(T) {
return typeof T == "object" && T !== null;
},
isNull: function(T) {
return T === null;
},
isNullOrUndefined: function(T) {
return T == null;
}
}, ho = {};
function Dh(T, g) {
return Object.prototype.hasOwnProperty.call(T, g);
}
var kh = function(T, g, a, h) {
g = g || "&", a = a || "=";
var E = {};
if (typeof T != "string" || T.length === 0)
return E;
var c = /\+/g;
T = T.split(g);
var n = 1e3;
h && typeof h.maxKeys == "number" && (n = h.maxKeys);
var e = T.length;
n > 0 && e > n && (e = n);
for (var o = 0; o < e; ++o) {
var r = T[o].replace(c, "%20"), l = r.indexOf(a), i, t, s, f;
l >= 0 ? (i = r.substr(0, l), t = r.substr(l + 1)) : (i = r, t = ""), s = decodeURIComponent(i), f = decodeURIComponent(t), Dh(E, s) ? Array.isArray(E[s]) ? E[s].push(f) : E[s] = [E[s], f] : E[s] = f;
}
return E;
}, ro = function(T) {
switch (typeof T) {
case "string":
return T;
case "boolean":
return T ? "true" : "false";
case "number":
return isFinite(T) ? T : "";
default:
return "";
}
}, Nh = function(T, g, a, h) {
return g = g || "&", a = a || "=", T === null && (T = void 0), typeof T == "object" ? Object.keys(T).map(function(E) {
var c = encodeURIComponent(ro(E)) + a;
return Array.isArray(T[E]) ? T[E].map(function(n) {
return c + encodeURIComponent(ro(n));
}).join(g) : c + encodeURIComponent(ro(T[E]));
}).join(g) : h ? encodeURIComponent(ro(h)) + a + encodeURIComponent(ro(T)) : "";
};
ho.decode = ho.parse = kh;
ho.encode = ho.stringify = Nh;
var Fh = js.exports, bi = Lh, Bh = da.parse = bo;
da.resolve = Yh;
da.resolveObject = $h;
da.format = Xh;
da.Url = di;
function di() {
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;
}
var Hh = /^([a-z0-9.+-]+:)/i, _h = /:[0-9]*$/, Uh = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, zh = ["<", ">", '"', "`", " ", "\r", `
`, " "], Vh = ["{", "}", "|", "\\", "^", "`"].concat(zh), Ws = ["'"].concat(Vh), gu = ["%", "/", "?", ";", "#"].concat(Ws), yu = ["/", "?", "#"], Gh = 255, Tu = /^[+a-z0-9A-Z_-]{0,63}$/, jh = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Wh = {
javascript: !0,
"javascript:": !0
}, Xs = {
javascript: !0,
"javascript:": !0
}, Aa = {
http: !0,
https: !0,
ftp: !0,
gopher: !0,
file: !0,
"http:": !0,
"https:": !0,
"ftp:": !0,
"gopher:": !0,
"file:": !0
}, Ys = ho;
function bo(T, g, a) {
if (T && bi.isObject(T) && T instanceof di)
return T;
var h = new di();
return h.parse(T, g, a), h;
}
di.prototype.parse = function(T, g, a) {
if (!bi.isString(T))
throw new TypeError("Parameter 'url' must be a string, not " + typeof T);
var h = T.indexOf("?"), E = h !== -1 && h < T.indexOf("#") ? "?" : "#", c = T.split(E), n = /\\/g;
c[0] = c[0].replace(n, "/"), T = c.join(E);
var e = T;
if (e = e.trim(), !a && T.split("#").length === 1) {
var o = Uh.exec(e);
if (o)
return this.path = e, this.href = e, this.pathname = o[1], o[2] ? (this.search = o[2], g ? this.query = Ys.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : g && (this.search = "", this.query = {}), this;
}
var r = Hh.exec(e);
if (r) {
r = r[0];
var l = r.toLowerCase();
this.protocol = l, e = e.substr(r.length);
}
if (a || r || e.match(/^\/\/[^@\/]+@[^@\/]+/)) {
var i = e.substr(0, 2) === "//";
i && !(r && Xs[r]) && (e = e.substr(2), this.slashes = !0);
}
if (!Xs[r] && (i || r && !Aa[r])) {
for (var t = -1, s = 0; s < yu.length; s++) {
var f = e.indexOf(yu[s]);
f !== -1 && (t === -1 || f < t) && (t = f);
}
var u, p;
t === -1 ? p = e.lastIndexOf("@") : p = e.lastIndexOf("@", t), p !== -1 && (u = e.slice(0, p), e = e.slice(p + 1), this.auth = decodeURIComponent(u)), t = -1;
for (var s = 0; s < gu.length; s++) {
var f = e.indexOf(gu[s]);
f !== -1 && (t === -1 || f < t) && (t = f);
}
t === -1 && (t = e.length), this.host = e.slice(0, t), e = e.slice(t), this.parseHost(), this.hostname = this.hostname || "";
var v = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
if (!v)
for (var d = this.hostname.split(/\./), s = 0, m = d.length; s < m; s++) {
var x = d[s];
if (!!x && !x.match(Tu)) {
for (var y = "", C = 0, P = x.length; C < P; C++)
x.charCodeAt(C) > 127 ? y += "x" : y += x[C];
if (!y.match(Tu)) {
var A = d.slice(0, s), b = d.slice(s + 1), I = x.match(jh);
I && (A.push(I[1]), b.unshift(I[2])), b.length && (e = "/" + b.join(".") + e), this.hostname = A.join(".");
break;
}
}
}
this.hostname.length > Gh ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), v || (this.hostname = Fh.toASCII(this.hostname));
var S = this.port ? ":" + this.port : "", w = this.hostname || "";
this.host = w + S, this.href += this.host, v && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), e[0] !== "/" && (e = "/" + e));
}
if (!Wh[l])
for (var s = 0, m = Ws.length; s < m; s++) {
var O = Ws[s];
if (e.indexOf(O) !== -1) {
var M = encodeURIComponent(O);
M === O && (M = escape(O)), e = e.split(O).join(M);
}
}
var D = e.indexOf("#");
D !== -1 && (this.hash = e.substr(D), e = e.slice(0, D));
var L = e.indexOf("?");
if (L !== -1 ? (this.search = e.substr(L), this.query = e.substr(L + 1), g && (this.query = Ys.parse(this.query)), e = e.slice(0, L)) : g && (this.search = "", this.query = {}), e && (this.pathname = e), Aa[l] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
var S = this.pathname || "", R = this.search || "";
this.path = S + R;
}
return this.href = this.format(), this;
};
function Xh(T) {
return bi.isString(T) && (T = bo(T)), T instanceof di ? T.format() : di.prototype.format.call(T);
}
di.prototype.format = function() {
var T = this.auth || "";
T && (T = encodeURIComponent(T), T = T.replace(/%3A/i, ":"), T += "@");
var g = this.protocol || "", a = this.pathname || "", h = this.hash || "", E = !1, c = "";
this.host ? E = T + this.host : this.hostname && (E = T + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (E += ":" + this.port)), this.query && bi.isObject(this.query) && Object.keys(this.query).length && (c = Ys.stringify(this.query));
var n = this.search || c && "?" + c || "";
return g && g.substr(-1) !== ":" && (g += ":"), this.slashes || (!g || Aa[g]) && E !== !1 ? (E = "//" + (E || ""), a && a.charAt(0) !== "/" && (a = "/" + a)) : E || (E = ""), h && h.charAt(0) !== "#" && (h = "#" + h), n && n.charAt(0) !== "?" && (n = "?" + n), a = a.replace(/[?#]/g, function(e) {
return encodeURIComponent(e);
}), n = n.replace("#", "%23"), g + E + a + n + h;
};
function Yh(T, g) {
return bo(T, !1, !0).resolve(g);
}
di.prototype.resolve = function(T) {
return this.resolveObject(bo(T, !1, !0)).format();
};
function $h(T, g) {
return T ? bo(T, !1, !0).resolveObject(g) : g;
}
di.prototype.resolveObject = function(T) {
if (bi.isString(T)) {
var g = new di();
g.parse(T, !1, !0), T = g;
}
for (var a = new di(), h = Object.keys(this), E = 0; E < h.length; E++) {
var c = h[E];
a[c] = this[c];
}
if (a.hash = T.hash, T.href === "")
return a.href = a.format(), a;
if (T.slashes && !T.protocol) {
for (var n = Object.keys(T), e = 0; e < n.length; e++) {
var o = n[e];
o !== "protocol" && (a[o] = T[o]);
}
return Aa[a.protocol] && a.hostname && !a.pathname && (a.path = a.pathname = "/"), a.href = a.format(), a;
}
if (T.protocol && T.protocol !== a.protocol) {
if (!Aa[T.protocol]) {
for (var r = Object.keys(T), l = 0; l < r.length; l++) {
var i = r[l];
a[i] = T[i];
}
return a.href = a.format(), a;
}
if (a.protocol = T.protocol, !T.host && !Xs[T.protocol]) {
for (var m = (T.pathname || "").split("/"); m.length && !(T.host = m.shift()); )
;
T.host || (T.host = ""), T.hostname || (T.hostname = ""), m[0] !== "" && m.unshift(""), m.length < 2 && m.unshift(""), a.pathname = m.join("/");
} else
a.pathname = T.pathname;
if (a.search = T.search, a.query = T.query, a.host = T.host || "", a.auth = T.auth, a.hostname = T.hostname || T.host, a.port = T.port, a.pathname || a.search) {
var t = a.pathname || "", s = a.search || "";
a.path = t + s;
}
return a.slashes = a.slashes || T.slashes, a.href = a.format(), a;
}
var f = a.pathname && a.pathname.charAt(0) === "/", u = T.host || T.pathname && T.pathname.charAt(0) === "/", p = u || f || a.host && T.pathname, v = p, d = a.pathname && a.pathname.split("/") || [], m = T.pathname && T.pathname.split("/") || [], x = a.protocol && !Aa[a.protocol];
if (x && (a.hostname = "", a.port = null, a.host && (d[0] === "" ? d[0] = a.host : d.unshift(a.host)), a.host = "", T.protocol && (T.hostname = null, T.port = null, T.host && (m[0] === "" ? m[0] = T.host : m.unshift(T.host)), T.host = null), p = p && (m[0] === "" || d[0] === "")), u)
a.host = T.host || T.host === "" ? T.host : a.host, a.hostname = T.hostname || T.hostname === "" ? T.hostname : a.hostname, a.search = T.search, a.query = T.query, d = m;
else if (m.length)
d || (d = []), d.pop(), d = d.concat(m), a.search = T.search, a.query = T.query;
else if (!bi.isNullOrUndefined(T.search)) {
if (x) {
a.hostname = a.host = d.shift();
var y = a.host && a.host.indexOf("@") > 0 ? a.host.split("@") : !1;
y && (a.auth = y.shift(), a.host = a.hostname = y.shift());
}
return a.search = T.search, a.query = T.query, (!bi.isNull(a.pathname) || !bi.isNull(a.search)) && (a.path = (a.pathname ? a.pathname : "") + (a.search ? a.search : "")), a.href = a.format(), a;
}
if (!d.length)
return a.pathname = null, a.search ? a.path = "/" + a.search : a.path = null, a.href = a.format(), a;
for (var C = d.slice(-1)[0], P = (a.host || T.host || d.length > 1) && (C === "." || C === "..") || C === "", A = 0, b = d.length; b >= 0; b--)
C = d[b], C === "." ? d.splice(b, 1) : C === ".." ? (d.splice(b, 1), A++) : A && (d.splice(b, 1), A--);
if (!p && !v)
for (; A--; A)
d.unshift("..");
p && d[0] !== "" && (!d[0] || d[0].charAt(0) !== "/") && d.unshift(""), P && d.join("/").substr(-1) !== "/" && d.push("");
var I = d[0] === "" || d[0] && d[0].charAt(0) === "/";
if (x) {
a.hostname = a.host = I ? "" : d.length ? d.shift() : "";
var y = a.host && a.host.indexOf("@") > 0 ? a.host.split("@") : !1;
y && (a.auth = y.shift(), a.host = a.hostname = y.shift());
}
return p = p || a.host && d.length, p && !I && d.unshift(""), d.length ? a.pathname = d.join("/") : (a.pathname = null, a.path = null), (!bi.isNull(a.pathname) || !bi.isNull(a.search)) && (a.path = (a.pathname ? a.pathname : "") + (a.search ? a.search : "")), a.auth = T.auth || a.auth, a.slashes = a.slashes || T.slashes, a.href = a.format(), a;
};
di.prototype.parseHost = function() {
var T = this.host, g = _h.exec(T);
g && (g = g[0], g !== ":" && (this.port = g.substr(1)), T = T.substr(0, T.length - g.length)), T && (this.hostname = T);
};
/*!
* @pixi/constants - v5.3.12
* Compiled Wed, 23 Mar 2022 18:34:28 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
var Ei;
(function(T) {
T[T.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", T[T.WEBGL = 1] = "WEBGL", T[T.WEBGL2 = 2] = "WEBGL2";
})(Ei || (Ei = {}));
var wa;
(function(T) {
T[T.UNKNOWN = 0] = "UNKNOWN", T[T.WEBGL = 1] = "WEBGL", T[T.CANVAS = 2] = "CANVAS";
})(wa || (wa = {}));
var po;
(function(T) {
T[T.COLOR = 16384] = "COLOR", T[T.DEPTH = 256] = "DEPTH", T[T.STENCIL = 1024] = "STENCIL";
})(po || (po = {}));
var wr;
(function(T) {
T[T.NORMAL = 0] = "NORMAL", T[T.ADD = 1] = "ADD", T[T.MULTIPLY = 2] = "MULTIPLY", T[T.SCREEN = 3] = "SCREEN", T[T.OVERLAY = 4] = "OVERLAY", T[T.DARKEN = 5] = "DARKEN", T[T.LIGHTEN = 6] = "LIGHTEN", T[T.COLOR_DODGE = 7] = "COLOR_DODGE", T[T.COLOR_BURN = 8] = "COLOR_BURN", T[T.HARD_LIGHT = 9] = "HARD_LIGHT", T[T.SOFT_LIGHT = 10] = "SOFT_LIGHT", T[T.DIFFERENCE = 11] = "DIFFERENCE", T[T.EXCLUSION = 12] = "EXCLUSION", T[T.HUE = 13] = "HUE", T[T.SATURATION = 14] = "SATURATION", T[T.COLOR = 15] = "COLOR", T[T.LUMINOSITY = 16] = "LUMINOSITY", T[T.NORMAL_NPM = 17] = "NORMAL_NPM", T[T.ADD_NPM = 18] = "ADD_NPM", T[T.SCREEN_NPM = 19] = "SCREEN_NPM", T[T.NONE = 20] = "NONE", T[T.SRC_OVER = 0] = "SRC_OVER", T[T.SRC_IN = 21] = "SRC_IN", T[T.SRC_OUT = 22] = "SRC_OUT", T[T.SRC_ATOP = 23] = "SRC_ATOP", T[T.DST_OVER = 24] = "DST_OVER", T[T.DST_IN = 25] = "DST_IN", T[T.DST_OUT = 26] = "DST_OUT", T[T.DST_ATOP = 27] = "DST_ATOP", T[T.ERASE = 26] = "ERASE", T[T.SUBTRACT = 28] = "SUBTRACT", T[T.XOR = 29] = "XOR";
})(wr || (wr = {}));
var hi;
(function(T) {
T[T.POINTS = 0] = "POINTS", T[T.LINES = 1] = "LINES", T[T.LINE_LOOP = 2] = "LINE_LOOP", T[T.LINE_STRIP = 3] = "LINE_STRIP", T[T.TRIANGLES = 4] = "TRIANGLES", T[T.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", T[T.TRIANGLE_FAN = 6] = "TRIANGLE_FAN";
})(hi || (hi = {}));
var Oa;
(function(T) {
T[T.RGBA = 6408] = "RGBA", T[T.RGB = 6407] = "RGB", T[T.ALPHA = 6406] = "ALPHA", T[T.LUMINANCE = 6409] = "LUMINANCE", T[T.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", T[T.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", T[T.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL";
})(Oa || (Oa = {}));
var Gi;
(function(T) {
T[T.TEXTURE_2D = 3553] = "TEXTURE_2D", T[T.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", T[T.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", T[T.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", T[T.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", T[T.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", T[T.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", T[T.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", T[T.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
})(Gi || (Gi = {}));
var On;
(function(T) {
T[T.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", T[T.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", T[T.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", T[T.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", T[T.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", T[T.FLOAT = 5126] = "FLOAT", T[T.HALF_FLOAT = 36193] = "HALF_FLOAT";
})(On || (On = {}));
var Si;
(function(T) {
T[T.NEAREST = 0] = "NEAREST", T[T.LINEAR = 1] = "LINEAR";
})(Si || (Si = {}));
var Di;
(function(T) {
T[T.CLAMP = 33071] = "CLAMP", T[T.REPEAT = 10497] = "REPEAT", T[T.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT";
})(Di || (Di = {}));
var Ia;
(function(T) {
T[T.OFF = 0] = "OFF", T[T.POW2 = 1] = "POW2", T[T.ON = 2] = "ON";
})(Ia || (Ia = {}));
var Ni;
(function(T) {
T[T.NPM = 0] = "NPM", T[T.UNPACK = 1] = "UNPACK", T[T.PMA = 2] = "PMA", T[T.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", T[T.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", T[T.PREMULTIPLY_ALPHA = 2] = "PREMULTIPLY_ALPHA";
})(Ni || (Ni = {}));
var gi;
(function(T) {
T[T.NO = 0] = "NO", T[T.YES = 1] = "YES", T[T.AUTO = 2] = "AUTO", T[T.BLEND = 0] = "BLEND", T[T.CLEAR = 1] = "CLEAR", T[T.BLIT = 2] = "BLIT";
})(gi || (gi = {}));
var Zo;
(function(T) {
T[T.AUTO = 0] = "AUTO", T[T.MANUAL = 1] = "MANUAL";
})(Zo || (Zo = {}));
var yi;
(function(T) {
T.LOW = "lowp", T.MEDIUM = "mediump", T.HIGH = "highp";
})(yi || (yi = {}));
var ri;
(function(T) {
T[T.NONE = 0] = "NONE", T[T.SCISSOR = 1] = "SCISSOR", T[T.STENCIL = 2] = "STENCIL", T[T.SPRITE = 3] = "SPRITE";
})(ri || (ri = {}));
var sa;
(function(T) {
T[T.NONE = 0] = "NONE", T[T.LOW = 2] = "LOW", T[T.MEDIUM = 4] = "MEDIUM", T[T.HIGH = 8] = "HIGH";
})(sa || (sa = {}));
/*!
* @pixi/utils - v5.3.12
* Compiled Wed, 23 Mar 2022 18:34:28 UTC
*
* @pixi/utils is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
Pr.RETINA_PREFIX = /@([0-9\.]+)x/;
Pr.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !0;
var $s = !1, bu = "5.3.12";
function Kh() {
$s = !0;
}
function mf(T) {
var g;
if (!$s) {
if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) {
var a = [
`
%c %c %c PixiJS ` + bu + " - \u2730 " + T + ` \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665
`,
"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;"
];
(g = window.console).log.apply(g, a);
} else
window.console && window.console.log("PixiJS " + bu + " - " + T + " - http://www.pixijs.com/");
$s = !0;
}
}
var As;
function gf() {
return typeof As > "u" && (As = function() {
var g = {
stencil: !0,
failIfMajorPerformanceCaveat: Pr.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
};
try {
if (!window.WebGLRenderingContext)
return !1;
var a = document.createElement("canvas"), h = a.getContext("webgl", g) || a.getContext("experimental-webgl", g), E = !!(h && h.getContextAttributes().stencil);
if (h) {
var c = h.getExtension("WEBGL_lose_context");
c && c.loseContext();
}
return h = null, E;
} catch {
return !1;
}
}()), As;
}
function la(T, g) {
return g === void 0 && (g = []), g[0] = (T >> 16 & 255) / 255, g[1] = (T >> 8 & 255) / 255, g[2] = (T & 255) / 255, g;
}
function Dl(T) {
var g = T.toString(16);
return g = "000000".substr(0, 6 - g.length) + g, "#" + g;
}
function kl(T) {
return typeof T == "string" && T[0] === "#" && (T = T.substr(1)), parseInt(T, 16);
}
function Zh(T) {
return (T[0] * 255 << 16) + (T[1] * 255 << 8) + (T[2] * 255 | 0);
}
function Qh() {
for (var T = [], g = [], a = 0; a < 32; a++)
T[a] = a, g[a] = a;
T[wr.NORMAL_NPM] = wr.NORMAL, T[wr.ADD_NPM] = wr.ADD, T[wr.SCREEN_NPM] = wr.SCREEN, g[wr.NORMAL] = wr.NORMAL_NPM, g[wr.ADD] = wr.ADD_NPM, g[wr.SCREEN] = wr.SCREEN_NPM;
var h = [];
return h.push(g), h.push(T), h;
}
var Nl = Qh();
function Fl(T, g) {
return Nl[g ? 1 : 0][T];
}
function yf(T, g, a, h) {
return a = a || new Float32Array(4), h || h === void 0 ? (a[0] = T[0] * g, a[1] = T[1] * g, a[2] = T[2] * g) : (a[0] = T[0], a[1] = T[1], a[2] = T[2]), a[3] = g, a;
}
function rs(T, g) {
if (g === 1)
return (g * 255 << 24) + T;
if (g === 0)
return 0;
var a = T >> 16 & 255, h = T >> 8 & 255, E = T & 255;
return a = a * g + 0.5 | 0, h = h * g + 0.5 | 0, E = E * g + 0.5 | 0, (g * 255 << 24) + (a << 16) + (h << 8) + E;
}
function Bl(T, g, a, h) {
return a = a || new Float32Array(4), a[0] = (T >> 16 & 255) / 255, a[1] = (T >> 8 & 255) / 255, a[2] = (T & 255) / 255, (h || h === void 0) && (a[0] *= g, a[1] *= g, a[2] *= g), a[3] = g, a;
}
function Tf(T, g) {
g === void 0 && (g = null);
var a = T * 6;
if (g = g || new Uint16Array(a), g.length !== a)
throw new Error("Out buffer length is incorrect, got " + g.length + " and expected " + a);
for (var h = 0, E = 0; h < a; h += 6, E += 4)
g[h + 0] = E + 0, g[h + 1] = E + 1, g[h + 2] = E + 2, g[h + 3] = E + 0, g[h + 4] = E + 2, g[h + 5] = E + 3;
return g;
}
function bf(T) {
if (T.BYTES_PER_ELEMENT === 4)
return T instanceof Float32Array ? "Float32Array" : T instanceof Uint32Array ? "Uint32Array" : "Int32Array";
if (T.BYTES_PER_ELEMENT === 2) {
if (T instanceof Uint16Array)
return "Uint16Array";
} else if (T.BYTES_PER_ELEMENT === 1 && T instanceof Uint8Array)
return "Uint8Array";
return null;
}
var Jh = { Float32Array, Uint32Array, Int32Array, Uint8Array };
function qh(T, g) {
for (var a = 0, h = 0, E = {}, c = 0; c < T.length; c++)
h += g[c], a += T[c].length;
for (var n = new ArrayBuffer(a * 4), e = null, o = 0, c = 0; c < T.length; c++) {
var r = g[c], l = T[c], i = bf(l);
E[i] || (E[i] = new Jh[i](n)), e = E[i];
for (var t = 0; t < l.length; t++) {
var s = (t / r | 0) * h + o, f = t % r;
e[s + f] = l[t];
}
o += r;
}
return new Float32Array(n);
}
function vo(T) {
return T += T === 0 ? 1 : 0, --T, T |= T >>> 1, T |= T >>> 2, T |= T >>> 4, T |= T >>> 8, T |= T >>> 16, T + 1;
}
function Ks(T) {
return !(T & T - 1) && !!T;
}
function Zs(T) {
var g = (T > 65535 ? 1 : 0) << 4;
T >>>= g;
var a = (T > 255 ? 1 : 0) << 3;
return T >>>= a, g |= a, a = (T > 15 ? 1 : 0) << 2, T >>>= a, g |= a, a = (T > 3 ? 1 : 0) << 1, T >>>= a, g |= a, g | T >> 1;
}
function oa(T, g, a) {
var h = T.length, E;
if (!(g >= h || a === 0)) {
a = g + a > h ? h - g : a;
var c = h - a;
for (E = g; E < c; ++E)
T[E] = T[E + a];
T.length = c;
}
}
function ia(T) {
return T === 0 ? 0 : T < 0 ? -1 : 1;
}
var ed = 0;
function ua() {
return ++ed;
}
var Su = {};
function er(T, g, a) {
if (a === void 0 && (a = 3), !Su[g]) {
var h = new Error().stack;
typeof h > "u" ? console.warn("PixiJS Deprecation Warning: ", g + `
Deprecated since v` + T) : (h = h.split(`
`).splice(a).join(`
`), console.groupCollapsed ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", g + `
Deprecated since v` + T), console.warn(h), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", g + `
Deprecated since v` + T), console.warn(h))), Su[g] = !0;
}
}
var Qs = {}, ni = /* @__PURE__ */ Object.create(null), fi = /* @__PURE__ */ Object.create(null);
function td() {
var T;
for (T in ni)
ni[T].destroy();
for (T in fi)
fi[T].destroy();
}
function rd() {
var T;
for (T in ni)
delete ni[T];
for (T in fi)
delete fi[T];
}
var Js = function() {
function T(g, a, h) {
this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.resolution = h || Pr.RESOLUTION, this.resize(g, a);
}
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(g, a) {
this.canvas.width = g * this.resolution, this.canvas.height = a * this.resolution;
}, T.prototype.destroy = function() {
this.context = null, this.canvas = null;
}, Object.defineProperty(T.prototype, "width", {
get: function() {
return this.canvas.width;
},
set: function(g) {
this.canvas.width = g;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(T.prototype, "height", {
get: function() {
return this.canvas.height;
},
set: function(g) {
this.canvas.height = g;
},
enumerable: !1,
configurable: !0
}), T;
}();
function Sf(T) {
var g = T.width, a = T.height, h = T.getContext("2d"), E = h.getImageData(0, 0, g, a), c = E.data, n = c.length, e = {
top: null,
left: null,
right: null,
bottom: null
}, o = null, r, l, i;
for (r = 0; r < n; r += 4)
c[r + 3] !== 0 && (l = r / 4 % g, i = ~~(r / 4 / g), e.top === null && (e.top = i), (e.left === null || l < e.left) && (e.left = l), (e.right === null || e.right < l) && (e.right = l + 1), (e.bottom === null || e.bottom < i) && (e.bottom = i));
return e.top !== null && (g = e.right - e.left, a = e.bottom - e.top + 1, o = h.getImageData(e.left, e.top, g, a)), {
height: a,
width: g,
data: o
};
}
var Ef = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
function nd(T) {
var g = Ef.exec(T);
if (g)
return {
mediaType: g[1] ? g[1].toLowerCase() : void 0,
subType: g[2] ? g[2].toLowerCase() : void 0,
charset: g[3] ? g[3].toLowerCase() : void 0,
encoding: g[4] ? g[4].toLowerCase() : void 0,
data: g[5]
};
}
var Do;
function xf(T, g) {
if (g === void 0 && (g = window.location), T.indexOf("data:") === 0)
return "";
g = g || window.location, Do || (Do = document.createElement("a")), Do.href = T;
var a = Bh(Do.href), h = !a.port && g.port === "" || a.port === g.port;
return a.hostname !== g.hostname || !h || a.protocol !== g.protocol ? "anonymous" : "";
}
function mo(T, g) {
var a = Pr.RETINA_PREFIX.exec(T);
return a ? parseFloat(a[1]) : g !== void 0 ? g : 1;
}
const id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
BaseTextureCache: fi,
CanvasRenderTarget: Js,
DATA_URI: Ef,
ProgramCache: Qs,
TextureCache: ni,
clearTextureCache: rd,
correctBlendMode: Fl,
createIndicesForQuads: Tf,
decomposeDataUri: nd,
deprecation: er,
destroyTextureCache: td,
determineCrossOrigin: xf,
getBufferType: bf,
getResolutionOfUrl: mo,
hex2rgb: la,
hex2string: Dl,
interleaveTypedArrays: qh,
isPow2: Ks,
isWebGLSupported: gf,
log2: Zs,
nextPow2: vo,
premultiplyBlendMode: Nl,
premultiplyRgba: yf,
premultiplyTint: rs,
premultiplyTintToRgba: Bl,
removeItems: oa,
rgb2hex: Zh,
sayHello: mf,
sign: ia,
skipHello: Kh,
string2hex: kl,
trimCanvas: Sf,
uid: ua,
isMobile: ci,
EventEmitter: Na,
earcut: Rl.exports,
url: da
}, Symbol.toStringTag, { value: "Module" }));
/*!
* @pixi/math - v5.3.12
* Compiled Wed, 23 Mar 2022 18:34:28 UTC
*
* @pixi/math is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
var Ma = Math.PI * 2, Cf = 180 / Math.PI, Af = Math.PI / 180, An;
(function(T) {
T[T.POLY = 0] = "POLY", T[T.RECT = 1] = "RECT", T[T.CIRC = 2] = "CIRC", T[T.ELIP = 3] = "ELIP", T[T.RREC = 4] = "RREC";
})(An || (An = {}));
var rn = function() {
function T(g, a, h, E) {
g === void 0 && (g = 0), a === void 0 && (a = 0), h === void 0 && (h = 0), E === void 0 && (E = 0), this.x = Number(g), this.y = Number(a), this.width = Number(h), this.height = Number(E), this.type = An.RECT;
}
return Object.defineProperty(T.prototype, "left", {
get: function() {
return this.x;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(T.prototype, "right", {
get: function() {
return this.x + this.width;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(T.prototype, "top", {
get: function() {
return this.y;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(T.prototype, "bottom", {
get: function() {
return this.y + this.height;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(T, "EMPTY", {
get: function() {
return new T(0, 0, 0, 0);
},
enumerable: !1,
configurable: !0
}), T.prototype.clone = function() {
return new T(this.x, this.y, this.width, this.height);
}, T.prototype.copyFrom = function(g) {
return this.x = g.x, this.y = g.y, this.width = g.width, this.height = g.height, this;
}, T.prototype.copyTo = function(g) {
return g.x = this.x, g.y = this.y, g.width = this.width, g.height = this.height, g;
}, T.prototype.contains = function(g, a) {
return this.width <= 0 || this.height <= 0 ? !1 : g >= this.x && g < this.x + this.width && a >= this.y && a < this.y + this.height;
}, T.prototype.pad = function(g, a) {
return g === void 0 && (g = 0), a === void 0 && (a = g), this.x -= g, this.y -= a, this.width += g * 2, this.height += a * 2, this;
}, T.prototype.fit = function(g) {
var a = Math.max(this.x, g.x), h = Math.min(this.x + this.width, g.x + g.width), E = Math.max(this.y, g.y), c = Math.min(this.y + this.height, g.y + g.height);
return this.x = a, this.width = Math.max(h - a, 0), this.y = E, this.height = Math.max(c - E, 0), this;
}, T.prototype.ceil = function(g, a) {
g === void 0 && (g = 1), a === void 0 && (a = 1e-3);
var h = Math.ceil((this.x + this.width - a) * g) / g, E = Math.ceil((this.y + this.height - a) * g) / g;
return this.x = Math.floor((this.x + a) * g) / g, this.y = Math.floor((this.y + a) * g) / g, this.width = h - this.x, this.height = E - this.y, this;
}, T.prototype.enlarge = function(g) {
var a = Math.min(this.x, g.x), h = Math.max(this.x + this.width, g.x + g.width), E = Math.min(this.y, g.y), c = Math.max(this.y + this.height, g.y + g.height);
return this.x = a, this.width = h - a, this.y = E, this.height = c - E, this;
}, T;
}(), Pf = function() {
function T(g, a, h) {
g === void 0 && (g = 0), a === void 0 && (a = 0), h === void 0 && (h = 0), this.x = g, this.y = a, this.radius = h, this.type = An.CIRC;
}
return T.prototype.clone = function() {
return new T(this.x, this.y, this.radius);
}, T.prototype.contains = function(g, a) {
if (this.radius <= 0)
return !1;
var h = this.radius * this.radius, E = this.x - g, c = this.y - a;
return E *= E, c *= c, E + c <= h;
}, T.prototype.getBounds = function() {
return new rn(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);
}, T;
}(), wf = function() {
function T(g, a, h, E) {
g === void 0 && (g = 0), a === void 0 && (a = 0), h === void 0 && (h = 0), E === void 0 && (E = 0), this.x = g, this.y = a, this.width = h, this.height = E, this.type = An.ELIP;
}
return T.prototype.clone = function() {
return new T(this.x, this.y, this.width, this.height);
}, T.prototype.contains = function(g, a) {
if (this.width <= 0 || this.height <= 0)
return !1;
var h = (g - this.x) / this.width, E = (a - this.