UNPKG

vitessce

Version:

This package is the main `vitessce` package on NPM. It exports the `<Vitessce/>` from `@vitessce/all` for backwards compatibility.

1,342 lines (1,341 loc) 3.57 MB
import * as iK from "react"; import C, { isValidElement as oK, PureComponent as c1, Component as Ps, createElement as av, createContext as aK, createRef as jC } from "react"; import Xo, { findDOMNode as BC } from "react-dom"; import { b0 as sv, aI as W0, b1 as FC } from "./index-CiwyZ_Wn.js"; var pm = {}, oI; function sK() { return oI || (oI = 1, function(t) { (function(e) { var n = e.Promise, r = n && // Some of these methods are missing from // Firefox/Chrome experimental implementations "resolve" in n && "reject" in n && "all" in n && "race" in n && // Older version of the spec had a resolver object // as the arg rather than a function function() { var x; return new n(function(k) { x = k; }), typeof x == "function"; }(); t ? (t.Promise = r ? n : S, t.Polyfill = S) : r || (e.Promise = S); var i = "pending", o = "sealed", a = "fulfilled", s = "rejected", c = function() { }; function l(x) { return Object.prototype.toString.call(x) === "[object Array]"; } var u = typeof setImmediate < "u" ? setImmediate : setTimeout, f = [], h; function p() { for (var x = 0; x < f.length; x++) f[x][0](f[x][1]); f = [], h = !1; } function d(x, k) { f.push([x, k]), h || (h = !0, u(p, 0)); } function m(x, k) { function A(D) { g(k, D); } function $(D) { _(k, D); } try { x(A, $); } catch (D) { $(D); } } function v(x) { var k = x.owner, A = k.state_, $ = k.data_, D = x[A], P = x.then; if (typeof D == "function") { A = a; try { $ = D($); } catch (R) { _(P, R); } } b(P, $) || (A === a && g(P, $), A === s && _(P, $)); } function b(x, k) { var A; try { if (x === k) throw new TypeError("A promises callback cannot return that same promise."); if (k && (typeof k == "function" || typeof k == "object")) { var $ = k.then; if (typeof $ == "function") return $.call(k, function(D) { A || (A = !0, k !== D ? g(x, D) : y(x, D)); }, function(D) { A || (A = !0, _(x, D)); }), !0; } } catch (D) { return A || _(x, D), !0; } return !1; } function g(x, k) { (x === k || !b(x, k)) && y(x, k); } function y(x, k) { x.state_ === i && (x.state_ = o, x.data_ = k, d(w, x)); } function _(x, k) { x.state_ === i && (x.state_ = o, x.data_ = k, d(O, x)); } function T(x) { var k = x.then_; x.then_ = void 0; for (var A = 0; A < k.length; A++) v(k[A]); } function w(x) { x.state_ = a, T(x); } function O(x) { x.state_ = s, T(x); } function S(x) { if (typeof x != "function") throw new TypeError("Promise constructor takes a function argument"); if (!(this instanceof S)) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); this.then_ = [], m(x, this); } S.prototype = { constructor: S, state_: i, then_: null, data_: void 0, then: function(x, k) { var A = { owner: this, then: new this.constructor(c), fulfilled: x, rejected: k }; return this.state_ === a || this.state_ === s ? d(v, A) : this.then_.push(A), A.then; }, catch: function(x) { return this.then(null, x); } }, S.all = function(x) { var k = this; if (!l(x)) throw new TypeError("You must pass an array to Promise.all()."); return new k(function(A, $) { var D = [], P = 0; function R(z) { return P++, function(U) { D[z] = U, --P || A(D); }; } for (var B = 0, F; B < x.length; B++) F = x[B], F && typeof F.then == "function" ? F.then(R(B), $) : D[B] = F; P || A(D); }); }, S.race = function(x) { var k = this; if (!l(x)) throw new TypeError("You must pass an array to Promise.race()."); return new k(function(A, $) { for (var D = 0, P; D < x.length; D++) P = x[D], P && typeof P.then == "function" ? P.then(A, $) : A(P); }); }, S.resolve = function(x) { var k = this; return x && typeof x == "object" && x.constructor === k ? x : new k(function(A) { A(x); }); }, S.reject = function(x) { var k = this; return new k(function(A, $) { $(x); }); }; })(typeof window < "u" ? window : typeof sv < "u" ? sv : typeof self < "u" ? self : pm); }(pm)), pm; } var lK = sK(); /* object-assign (c) Sindre Sorhus @license MIT */ var V_, aI; function cK() { if (aI) return V_; aI = 1; var t = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable; function r(o) { if (o == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(o); } function i() { try { if (!Object.assign) return !1; var o = new String("abc"); if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5") return !1; for (var a = {}, s = 0; s < 10; s++) a["_" + String.fromCharCode(s)] = s; var c = Object.getOwnPropertyNames(a).map(function(u) { return a[u]; }); if (c.join("") !== "0123456789") return !1; var l = {}; return "abcdefghijklmnopqrst".split("").forEach(function(u) { l[u] = u; }), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return V_ = i() ? Object.assign : function(o, a) { for (var s, c = r(o), l, u = 1; u < arguments.length; u++) { s = Object(arguments[u]); for (var f in s) e.call(s, f) && (c[f] = s[f]); if (t) { l = t(s); for (var h = 0; h < l.length; h++) n.call(s, l[h]) && (c[l[h]] = s[l[h]]); } } return c; }, V_; } var uK = cK(); const hK = /* @__PURE__ */ W0(uK); /*! * @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 = lK.Polyfill); Object.assign || (Object.assign = hK); var fK = 16; Date.now && Date.prototype.getTime || (Date.now = function() { return (/* @__PURE__ */ new Date()).getTime(); }); if (!(window.performance && window.performance.now)) { var pK = Date.now(); window.performance || (window.performance = {}), window.performance.now = function() { return Date.now() - pK; }; } var X_ = Date.now(), sI = ["ms", "moz", "webkit", "o"]; for (var W_ = 0; W_ < sI.length && !window.requestAnimationFrame; ++W_) { var q_ = sI[W_]; window.requestAnimationFrame = window[q_ + "RequestAnimationFrame"], window.cancelAnimationFrame = window[q_ + "CancelAnimationFrame"] || window[q_ + "CancelRequestAnimationFrame"]; } window.requestAnimationFrame || (window.requestAnimationFrame = function(t) { if (typeof t != "function") throw new TypeError(t + "is not a function"); var e = Date.now(), n = fK + X_ - e; return n < 0 && (n = 0), X_ = e, window.setTimeout(function() { X_ = Date.now(), t(performance.now()); }, n); }); window.cancelAnimationFrame || (window.cancelAnimationFrame = function(t) { return clearTimeout(t); }); Math.sign || (Math.sign = function(e) { return e = Number(e), e === 0 || isNaN(e) ? e : e > 0 ? 1 : -1; }); Number.isInteger || (Number.isInteger = function(e) { return typeof e == "number" && isFinite(e) && Math.floor(e) === e; }); 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 Y_ = /iPhone/i, lI = /iPod/i, cI = /iPad/i, uI = /\biOS-universal(?:.+)Mac\b/i, K_ = /\bAndroid(?:.+)Mobile\b/i, hI = /Android/i, Cc = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, dm = /Silk/i, oa = /Windows Phone/i, fI = /\bWindows(?:.+)ARM\b/i, pI = /BlackBerry/i, dI = /BB10/i, mI = /Opera Mini/i, gI = /\b(CriOS|Chrome)(?:.+)Mobile/i, vI = /Mobile(?:.+)Firefox\b/i, yI = function(t) { return typeof t < "u" && t.platform === "MacIntel" && typeof t.maxTouchPoints == "number" && t.maxTouchPoints > 1 && typeof MSStream > "u"; }; function dK(t) { return function(e) { return e.test(t); }; } function mK(t) { var e = { userAgent: "", platform: "", maxTouchPoints: 0 }; !t && typeof navigator < "u" ? e = { userAgent: navigator.userAgent, platform: navigator.platform, maxTouchPoints: navigator.maxTouchPoints || 0 } : typeof t == "string" ? e.userAgent = t : t && t.userAgent && (e = { userAgent: t.userAgent, platform: t.platform, maxTouchPoints: t.maxTouchPoints || 0 }); var n = e.userAgent, r = n.split("[FBAN"); typeof r[1] < "u" && (n = r[0]), r = n.split("Twitter"), typeof r[1] < "u" && (n = r[0]); var i = dK(n), o = { apple: { phone: i(Y_) && !i(oa), ipod: i(lI), tablet: !i(Y_) && (i(cI) || yI(e)) && !i(oa), universal: i(uI), device: (i(Y_) || i(lI) || i(cI) || i(uI) || yI(e)) && !i(oa) }, amazon: { phone: i(Cc), tablet: !i(Cc) && i(dm), device: i(Cc) || i(dm) }, android: { phone: !i(oa) && i(Cc) || !i(oa) && i(K_), tablet: !i(oa) && !i(Cc) && !i(K_) && (i(dm) || i(hI)), device: !i(oa) && (i(Cc) || i(dm) || i(K_) || i(hI)) || i(/\bokhttp\b/i) }, windows: { phone: i(oa), tablet: i(fI), device: i(oa) || i(fI) }, other: { blackberry: i(pI), blackberry10: i(dI), opera: i(mI), firefox: i(vI), chrome: i(gI), device: i(pI) || i(dI) || i(mI) || i(vI) || i(gI) }, any: !1, phone: !1, tablet: !1 }; return o.any = o.apple.device || o.android.device || o.windows.device || o.other.device, o.phone = o.apple.phone || o.android.phone || o.windows.phone, o.tablet = o.apple.tablet || o.android.tablet || o.windows.tablet, o; } /*! * @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 Vi = mK(window.navigator); function gK(t) { var e = !0; if (Vi.tablet || Vi.phone) { if (Vi.apple.device) { var n = navigator.userAgent.match(/OS (\d+)_(\d+)?/); if (n) { var r = parseInt(n[1], 10); r < 11 && (e = !1); } } if (Vi.android.device) { var n = navigator.userAgent.match(/Android\s([0-9.]*)/); if (n) { var r = parseInt(n[1], 10); r < 7 && (e = !1); } } } return e ? t : 4; } function vK() { return !Vi.apple.device; } var ht = { /** * If set to true WebGL will attempt make textures mimpaped by default. * Mipmapping will only succeed if the base texture uploaded has power of two dimensions. * * @static * @name MIPMAP_TEXTURES * @memberof PIXI.settings * @type {PIXI.MIPMAP_MODES} * @default PIXI.MIPMAP_MODES.POW2 */ MIPMAP_TEXTURES: 1, /** * Default anisotropic filtering level of textures. * Usually from 0 to 16 * * @static * @name ANISOTROPIC_LEVEL * @memberof PIXI.settings * @type {number} * @default 0 */ ANISOTROPIC_LEVEL: 0, /** * Default resolution / device pixel ratio of the renderer. * * @static * @name RESOLUTION * @memberof PIXI.settings * @type {number} * @default 1 */ RESOLUTION: 1, /** * Default filter resolution. * * @static * @name FILTER_RESOLUTION * @memberof PIXI.settings * @type {number} * @default 1 */ FILTER_RESOLUTION: 1, /** * The maximum textures that this device supports. * * @static * @name SPRITE_MAX_TEXTURES * @memberof PIXI.settings * @type {number} * @default 32 */ SPRITE_MAX_TEXTURES: gK(32), // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 /** * The default sprite batch size. * * The default aims to balance desktop and mobile devices. * * @static * @name SPRITE_BATCH_SIZE * @memberof PIXI.settings * @type {number} * @default 4096 */ SPRITE_BATCH_SIZE: 4096, /** * The default render options if none are supplied to {@link PIXI.Renderer} * or {@link PIXI.CanvasRenderer}. * * @static * @name RENDER_OPTIONS * @memberof PIXI.settings * @type {object} * @property {HTMLCanvasElement} view=null * @property {number} resolution=1 * @property {boolean} antialias=false * @property {boolean} autoDensity=false * @property {boolean} transparent=false * @property {number} backgroundColor=0x000000 * @property {boolean} clearBeforeRender=true * @property {boolean} preserveDrawingBuffer=false * @property {number} width=800 * @property {number} height=600 * @property {boolean} legacy=false */ RENDER_OPTIONS: { view: null, antialias: !1, autoDensity: !1, transparent: !1, backgroundColor: 0, clearBeforeRender: !0, preserveDrawingBuffer: !1, width: 800, height: 600, legacy: !1 }, /** * Default Garbage Collection mode. * * @static * @name GC_MODE * @memberof PIXI.settings * @type {PIXI.GC_MODES} * @default PIXI.GC_MODES.AUTO */ GC_MODE: 0, /** * Default Garbage Collection max idle. * * @static * @name GC_MAX_IDLE * @memberof PIXI.settings * @type {number} * @default 3600 */ GC_MAX_IDLE: 60 * 60, /** * Default Garbage Collection maximum check count. * * @static * @name GC_MAX_CHECK_COUNT * @memberof PIXI.settings * @type {number} * @default 600 */ GC_MAX_CHECK_COUNT: 60 * 10, /** * Default wrap modes that are supported by pixi. * * @static * @name WRAP_MODE * @memberof PIXI.settings * @type {PIXI.WRAP_MODES} * @default PIXI.WRAP_MODES.CLAMP */ WRAP_MODE: 33071, /** * Default scale mode for textures. * * @static * @name SCALE_MODE * @memberof PIXI.settings * @type {PIXI.SCALE_MODES} * @default PIXI.SCALE_MODES.LINEAR */ SCALE_MODE: 1, /** * Default specify float precision in vertex shader. * * @static * @name PRECISION_VERTEX * @memberof PIXI.settings * @type {PIXI.PRECISION} * @default PIXI.PRECISION.HIGH */ PRECISION_VERTEX: "highp", /** * Default specify float precision in fragment shader. * iOS is best set at highp due to https://github.com/pixijs/pixi.js/issues/3742 * * @static * @name PRECISION_FRAGMENT * @memberof PIXI.settings * @type {PIXI.PRECISION} * @default PIXI.PRECISION.MEDIUM */ PRECISION_FRAGMENT: Vi.apple.device ? "highp" : "mediump", /** * Can we upload the same buffer in a single frame? * * @static * @name CAN_UPLOAD_SAME_BUFFER * @memberof PIXI.settings * @type {boolean} */ CAN_UPLOAD_SAME_BUFFER: vK(), /** * Enables bitmap creation before image load. This feature is experimental. * * @static * @name CREATE_IMAGE_BITMAP * @memberof PIXI.settings * @type {boolean} * @default false */ CREATE_IMAGE_BITMAP: !1, /** * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. * Advantages can include sharper image quality (like text) and faster rendering on canvas. * The main disadvantage is movement of objects may appear less smooth. * * @static * @constant * @memberof PIXI.settings * @type {boolean} * @default false */ ROUND_PIXELS: !1 }, Z_ = { exports: {} }, bI; function yK() { return bI || (bI = 1, function(t) { var e = Object.prototype.hasOwnProperty, n = "~"; function r() { } Object.create && (r.prototype = /* @__PURE__ */ Object.create(null), new r().__proto__ || (n = !1)); function i(c, l, u) { this.fn = c, this.context = l, this.once = u || !1; } function o(c, l, u, f, h) { if (typeof u != "function") throw new TypeError("The listener must be a function"); var p = new i(u, f || c, h), d = n ? n + l : l; return c._events[d] ? c._events[d].fn ? c._events[d] = [c._events[d], p] : c._events[d].push(p) : (c._events[d] = p, c._eventsCount++), c; } function a(c, l) { --c._eventsCount === 0 ? c._events = new r() : delete c._events[l]; } function s() { this._events = new r(), this._eventsCount = 0; } s.prototype.eventNames = function() { var l = [], u, f; if (this._eventsCount === 0) return l; for (f in u = this._events) e.call(u, f) && l.push(n ? f.slice(1) : f); return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(u)) : l; }, s.prototype.listeners = function(l) { var u = n ? n + l : l, f = this._events[u]; if (!f) return []; if (f.fn) return [f.fn]; for (var h = 0, p = f.length, d = new Array(p); h < p; h++) d[h] = f[h].fn; return d; }, s.prototype.listenerCount = function(l) { var u = n ? n + l : l, f = this._events[u]; return f ? f.fn ? 1 : f.length : 0; }, s.prototype.emit = function(l, u, f, h, p, d) { var m = n ? n + l : l; if (!this._events[m]) return !1; var v = this._events[m], b = arguments.length, g, y; if (v.fn) { switch (v.once && this.removeListener(l, v.fn, void 0, !0), b) { case 1: return v.fn.call(v.context), !0; case 2: return v.fn.call(v.context, u), !0; case 3: return v.fn.call(v.context, u, f), !0; case 4: return v.fn.call(v.context, u, f, h), !0; case 5: return v.fn.call(v.context, u, f, h, p), !0; case 6: return v.fn.call(v.context, u, f, h, p, d), !0; } for (y = 1, g = new Array(b - 1); y < b; y++) g[y - 1] = arguments[y]; v.fn.apply(v.context, g); } else { var _ = v.length, T; for (y = 0; y < _; y++) switch (v[y].once && this.removeListener(l, v[y].fn, void 0, !0), b) { case 1: v[y].fn.call(v[y].context); break; case 2: v[y].fn.call(v[y].context, u); break; case 3: v[y].fn.call(v[y].context, u, f); break; case 4: v[y].fn.call(v[y].context, u, f, h); break; default: if (!g) for (T = 1, g = new Array(b - 1); T < b; T++) g[T - 1] = arguments[T]; v[y].fn.apply(v[y].context, g); } } return !0; }, s.prototype.on = function(l, u, f) { return o(this, l, u, f, !1); }, s.prototype.once = function(l, u, f) { return o(this, l, u, f, !0); }, s.prototype.removeListener = function(l, u, f, h) { var p = n ? n + l : l; if (!this._events[p]) return this; if (!u) return a(this, p), this; var d = this._events[p]; if (d.fn) d.fn === u && (!h || d.once) && (!f || d.context === f) && a(this, p); else { for (var m = 0, v = [], b = d.length; m < b; m++) (d[m].fn !== u || h && !d[m].once || f && d[m].context !== f) && v.push(d[m]); v.length ? this._events[p] = v.length === 1 ? v[0] : v : a(this, p); } return this; }, s.prototype.removeAllListeners = function(l) { var u; return l ? (u = n ? n + l : l, this._events[u] && a(this, u)) : (this._events = new r(), this._eventsCount = 0), this; }, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prefixed = n, s.EventEmitter = s, t.exports = s; }(Z_)), Z_.exports; } var bK = yK(); const uf = /* @__PURE__ */ W0(bK); var Ws = {}, jp = { exports: {} }; /*! https://mths.be/punycode v1.3.2 by @mathias */ var _K = jp.exports, _I; function TK() { return _I || (_I = 1, function(t, e) { (function(n) { var r = e && !e.nodeType && e, i = t && !t.nodeType && t, o = typeof sv == "object" && sv; (o.global === o || o.window === o || o.self === o) && (n = o); var a, s = 2147483647, c = 36, l = 1, u = 26, f = 38, h = 700, p = 72, d = 128, m = "-", v = /^xn--/, b = /[^\x20-\x7E]/, g = /[\x2E\u3002\uFF0E\uFF61]/g, y = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, _ = c - l, T = Math.floor, w = String.fromCharCode, O; function S(V) { throw RangeError(y[V]); } function x(V, ne) { for (var re = V.length, W = []; re--; ) W[re] = ne(V[re]); return W; } function k(V, ne) { var re = V.split("@"), W = ""; re.length > 1 && (W = re[0] + "@", V = re[1]), V = V.replace(g, "."); var X = V.split("."), te = x(X, ne).join("."); return W + te; } function A(V) { for (var ne = [], re = 0, W = V.length, X, te; re < W; ) X = V.charCodeAt(re++), X >= 55296 && X <= 56319 && re < W ? (te = V.charCodeAt(re++), (te & 64512) == 56320 ? ne.push(((X & 1023) << 10) + (te & 1023) + 65536) : (ne.push(X), re--)) : ne.push(X); return ne; } function $(V) { return x(V, function(ne) { var re = ""; return ne > 65535 && (ne -= 65536, re += w(ne >>> 10 & 1023 | 55296), ne = 56320 | ne & 1023), re += w(ne), re; }).join(""); } function D(V) { return V - 48 < 10 ? V - 22 : V - 65 < 26 ? V - 65 : V - 97 < 26 ? V - 97 : c; } function P(V, ne) { return V + 22 + 75 * (V < 26) - ((ne != 0) << 5); } function R(V, ne, re) { var W = 0; for (V = re ? T(V / h) : V >> 1, V += T(V / ne); V > _ * u >> 1; W += c) V = T(V / _); return T(W + (_ + 1) * V / (V + f)); } function B(V) { var ne = [], re = V.length, W, X = 0, te = d, le = p, he, Pe, de, Oe, Ee, me, ke, Ae, Ye; for (he = V.lastIndexOf(m), he < 0 && (he = 0), Pe = 0; Pe < he; ++Pe) V.charCodeAt(Pe) >= 128 && S("not-basic"), ne.push(V.charCodeAt(Pe)); for (de = he > 0 ? he + 1 : 0; de < re; ) { for (Oe = X, Ee = 1, me = c; de >= re && S("invalid-input"), ke = D(V.charCodeAt(de++)), (ke >= c || ke > T((s - X) / Ee)) && S("overflow"), X += ke * Ee, Ae = me <= le ? l : me >= le + u ? u : me - le, !(ke < Ae); me += c) Ye = c - Ae, Ee > T(s / Ye) && S("overflow"), Ee *= Ye; W = ne.length + 1, le = R(X - Oe, W, Oe == 0), T(X / W) > s - te && S("overflow"), te += T(X / W), X %= W, ne.splice(X++, 0, te); } return $(ne); } function F(V) { var ne, re, W, X, te, le, he, Pe, de, Oe, Ee, me = [], ke, Ae, Ye, Je; for (V = A(V), ke = V.length, ne = d, re = 0, te = p, le = 0; le < ke; ++le) Ee = V[le], Ee < 128 && me.push(w(Ee)); for (W = X = me.length, X && me.push(m); W < ke; ) { for (he = s, le = 0; le < ke; ++le) Ee = V[le], Ee >= ne && Ee < he && (he = Ee); for (Ae = W + 1, he - ne > T((s - re) / Ae) && S("overflow"), re += (he - ne) * Ae, ne = he, le = 0; le < ke; ++le) if (Ee = V[le], Ee < ne && ++re > s && S("overflow"), Ee == ne) { for (Pe = re, de = c; Oe = de <= te ? l : de >= te + u ? u : de - te, !(Pe < Oe); de += c) Je = Pe - Oe, Ye = c - Oe, me.push( w(P(Oe + Je % Ye, 0)) ), Pe = T(Je / Ye); me.push(w(P(Pe, 0))), te = R(re, Ae, W == X), re = 0, ++W; } ++re, ++ne; } return me.join(""); } function z(V) { return k(V, function(ne) { return v.test(ne) ? B(ne.slice(4).toLowerCase()) : ne; }); } function U(V) { return k(V, function(ne) { return b.test(ne) ? "xn--" + F(ne) : ne; }); } if (a = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ version: "1.3.2", /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode * @type Object */ ucs2: { decode: A, encode: $ }, decode: B, encode: F, toASCII: U, toUnicode: z }, r && i) if (t.exports == r) i.exports = a; else for (O in a) a.hasOwnProperty(O) && (r[O] = a[O]); else n.punycode = a; })(_K); }(jp, jp.exports)), jp.exports; } var Q_, TI; function wK() { return TI || (TI = 1, Q_ = { 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; } }), Q_; } var kc = {}, J_, wI; function SK() { if (wI) return J_; wI = 1; function t(e, n) { return Object.prototype.hasOwnProperty.call(e, n); } return J_ = function(e, n, r, i) { n = n || "&", r = r || "="; var o = {}; if (typeof e != "string" || e.length === 0) return o; var a = /\+/g; e = e.split(n); var s = 1e3; i && typeof i.maxKeys == "number" && (s = i.maxKeys); var c = e.length; s > 0 && c > s && (c = s); for (var l = 0; l < c; ++l) { var u = e[l].replace(a, "%20"), f = u.indexOf(r), h, p, d, m; f >= 0 ? (h = u.substr(0, f), p = u.substr(f + 1)) : (h = u, p = ""), d = decodeURIComponent(h), m = decodeURIComponent(p), t(o, d) ? Array.isArray(o[d]) ? o[d].push(m) : o[d] = [o[d], m] : o[d] = m; } return o; }, J_; } var eT, SI; function EK() { if (SI) return eT; SI = 1; var t = function(e) { switch (typeof e) { case "string": return e; case "boolean": return e ? "true" : "false"; case "number": return isFinite(e) ? e : ""; default: return ""; } }; return eT = function(e, n, r, i) { return n = n || "&", r = r || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(o) { var a = encodeURIComponent(t(o)) + r; return Array.isArray(e[o]) ? e[o].map(function(s) { return a + encodeURIComponent(t(s)); }).join(n) : a + encodeURIComponent(t(e[o])); }).join(n) : i ? encodeURIComponent(t(i)) + r + encodeURIComponent(t(e)) : ""; }, eT; } var EI; function xK() { return EI || (EI = 1, kc.decode = kc.parse = SK(), kc.encode = kc.stringify = EK()), kc; } var xI; function PK() { if (xI) return Ws; xI = 1; var t = TK(), e = wK(); Ws.parse = g, Ws.resolve = _, Ws.resolveObject = T, Ws.format = y, Ws.Url = n; function n() { 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 r = /^([a-z0-9.+-]+:)/i, i = /:[0-9]*$/, o = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, a = ["<", ">", '"', "`", " ", "\r", ` `, " "], s = ["{", "}", "|", "\\", "^", "`"].concat(a), c = ["'"].concat(s), l = ["%", "/", "?", ";", "#"].concat(c), u = ["/", "?", "#"], f = 255, h = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, d = { javascript: !0, "javascript:": !0 }, m = { javascript: !0, "javascript:": !0 }, v = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b = xK(); function g(w, O, S) { if (w && e.isObject(w) && w instanceof n) return w; var x = new n(); return x.parse(w, O, S), x; } n.prototype.parse = function(w, O, S) { if (!e.isString(w)) throw new TypeError("Parameter 'url' must be a string, not " + typeof w); var x = w.indexOf("?"), k = x !== -1 && x < w.indexOf("#") ? "?" : "#", A = w.split(k), $ = /\\/g; A[0] = A[0].replace($, "/"), w = A.join(k); var D = w; if (D = D.trim(), !S && w.split("#").length === 1) { var P = o.exec(D); if (P) return this.path = D, this.href = D, this.pathname = P[1], P[2] ? (this.search = P[2], O ? this.query = b.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this; } var R = r.exec(D); if (R) { R = R[0]; var B = R.toLowerCase(); this.protocol = B, D = D.substr(R.length); } if (S || R || D.match(/^\/\/[^@\/]+@[^@\/]+/)) { var F = D.substr(0, 2) === "//"; F && !(R && m[R]) && (D = D.substr(2), this.slashes = !0); } if (!m[R] && (F || R && !v[R])) { for (var z = -1, U = 0; U < u.length; U++) { var V = D.indexOf(u[U]); V !== -1 && (z === -1 || V < z) && (z = V); } var ne, re; z === -1 ? re = D.lastIndexOf("@") : re = D.lastIndexOf("@", z), re !== -1 && (ne = D.slice(0, re), D = D.slice(re + 1), this.auth = decodeURIComponent(ne)), z = -1; for (var U = 0; U < l.length; U++) { var V = D.indexOf(l[U]); V !== -1 && (z === -1 || V < z) && (z = V); } z === -1 && (z = D.length), this.host = D.slice(0, z), D = D.slice(z), this.parseHost(), this.hostname = this.hostname || ""; var W = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; if (!W) for (var X = this.hostname.split(/\./), U = 0, te = X.length; U < te; U++) { var le = X[U]; if (le && !le.match(h)) { for (var he = "", Pe = 0, de = le.length; Pe < de; Pe++) le.charCodeAt(Pe) > 127 ? he += "x" : he += le[Pe]; if (!he.match(h)) { var Oe = X.slice(0, U), Ee = X.slice(U + 1), me = le.match(p); me && (Oe.push(me[1]), Ee.unshift(me[2])), Ee.length && (D = "/" + Ee.join(".") + D), this.hostname = Oe.join("."); break; } } } this.hostname.length > f ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), W || (this.hostname = t.toASCII(this.hostname)); var ke = this.port ? ":" + this.port : "", Ae = this.hostname || ""; this.host = Ae + ke, this.href += this.host, W && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), D[0] !== "/" && (D = "/" + D)); } if (!d[B]) for (var U = 0, te = c.length; U < te; U++) { var Ye = c[U]; if (D.indexOf(Ye) !== -1) { var Je = encodeURIComponent(Ye); Je === Ye && (Je = escape(Ye)), D = D.split(Ye).join(Je); } } var He = D.indexOf("#"); He !== -1 && (this.hash = D.substr(He), D = D.slice(0, He)); var at = D.indexOf("?"); if (at !== -1 ? (this.search = D.substr(at), this.query = D.substr(at + 1), O && (this.query = b.parse(this.query)), D = D.slice(0, at)) : O && (this.search = "", this.query = {}), D && (this.pathname = D), v[B] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) { var ke = this.pathname || "", it = this.search || ""; this.path = ke + it; } return this.href = this.format(), this; }; function y(w) { return e.isString(w) && (w = g(w)), w instanceof n ? w.format() : n.prototype.format.call(w); } n.prototype.format = function() { var w = this.auth || ""; w && (w = encodeURIComponent(w), w = w.replace(/%3A/i, ":"), w += "@"); var O = this.protocol || "", S = this.pathname || "", x = this.hash || "", k = !1, A = ""; this.host ? k = w + this.host : this.hostname && (k = w + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (k += ":" + this.port)), this.query && e.isObject(this.query) && Object.keys(this.query).length && (A = b.stringify(this.query)); var $ = this.search || A && "?" + A || ""; return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || v[O]) && k !== !1 ? (k = "//" + (k || ""), S && S.charAt(0) !== "/" && (S = "/" + S)) : k || (k = ""), x && x.charAt(0) !== "#" && (x = "#" + x), $ && $.charAt(0) !== "?" && ($ = "?" + $), S = S.replace(/[?#]/g, function(D) { return encodeURIComponent(D); }), $ = $.replace("#", "%23"), O + k + S + $ + x; }; function _(w, O) { return g(w, !1, !0).resolve(O); } n.prototype.resolve = function(w) { return this.resolveObject(g(w, !1, !0)).format(); }; function T(w, O) { return w ? g(w, !1, !0).resolveObject(O) : O; } return n.prototype.resolveObject = function(w) { if (e.isString(w)) { var O = new n(); O.parse(w, !1, !0), w = O; } for (var S = new n(), x = Object.keys(this), k = 0; k < x.length; k++) { var A = x[k]; S[A] = this[A]; } if (S.hash = w.hash, w.href === "") return S.href = S.format(), S; if (w.slashes && !w.protocol) { for (var $ = Object.keys(w), D = 0; D < $.length; D++) { var P = $[D]; P !== "protocol" && (S[P] = w[P]); } return v[S.protocol] && S.hostname && !S.pathname && (S.path = S.pathname = "/"), S.href = S.format(), S; } if (w.protocol && w.protocol !== S.protocol) { if (!v[w.protocol]) { for (var R = Object.keys(w), B = 0; B < R.length; B++) { var F = R[B]; S[F] = w[F]; } return S.href = S.format(), S; } if (S.protocol = w.protocol, !w.host && !m[w.protocol]) { for (var te = (w.pathname || "").split("/"); te.length && !(w.host = te.shift()); ) ; w.host || (w.host = ""), w.hostname || (w.hostname = ""), te[0] !== "" && te.unshift(""), te.length < 2 && te.unshift(""), S.pathname = te.join("/"); } else S.pathname = w.pathname; if (S.search = w.search, S.query = w.query, S.host = w.host || "", S.auth = w.auth, S.hostname = w.hostname || w.host, S.port = w.port, S.pathname || S.search) { var z = S.pathname || "", U = S.search || ""; S.path = z + U; } return S.slashes = S.slashes || w.slashes, S.href = S.format(), S; } var V = S.pathname && S.pathname.charAt(0) === "/", ne = w.host || w.pathname && w.pathname.charAt(0) === "/", re = ne || V || S.host && w.pathname, W = re, X = S.pathname && S.pathname.split("/") || [], te = w.pathname && w.pathname.split("/") || [], le = S.protocol && !v[S.protocol]; if (le && (S.hostname = "", S.port = null, S.host && (X[0] === "" ? X[0] = S.host : X.unshift(S.host)), S.host = "", w.protocol && (w.hostname = null, w.port = null, w.host && (te[0] === "" ? te[0] = w.host : te.unshift(w.host)), w.host = null), re = re && (te[0] === "" || X[0] === "")), ne) S.host = w.host || w.host === "" ? w.host : S.host, S.hostname = w.hostname || w.hostname === "" ? w.hostname : S.hostname, S.search = w.search, S.query = w.query, X = te; else if (te.length) X || (X = []), X.pop(), X = X.concat(te), S.search = w.search, S.query = w.query; else if (!e.isNullOrUndefined(w.search)) { if (le) { S.hostname = S.host = X.shift(); var he = S.host && S.host.indexOf("@") > 0 ? S.host.split("@") : !1; he && (S.auth = he.shift(), S.host = S.hostname = he.shift()); } return S.search = w.search, S.query = w.query, (!e.isNull(S.pathname) || !e.isNull(S.search)) && (S.path = (S.pathname ? S.pathname : "") + (S.search ? S.search : "")), S.href = S.format(), S; } if (!X.length) return S.pathname = null, S.search ? S.path = "/" + S.search : S.path = null, S.href = S.format(), S; for (var Pe = X.slice(-1)[0], de = (S.host || w.host || X.length > 1) && (Pe === "." || Pe === "..") || Pe === "", Oe = 0, Ee = X.length; Ee >= 0; Ee--) Pe = X[Ee], Pe === "." ? X.splice(Ee, 1) : Pe === ".." ? (X.splice(Ee, 1), Oe++) : Oe && (X.splice(Ee, 1), Oe--); if (!re && !W) for (; Oe--; Oe) X.unshift(".."); re && X[0] !== "" && (!X[0] || X[0].charAt(0) !== "/") && X.unshift(""), de && X.join("/").substr(-1) !== "/" && X.push(""); var me = X[0] === "" || X[0] && X[0].charAt(0) === "/"; if (le) { S.hostname = S.host = me ? "" : X.length ? X.shift() : ""; var he = S.host && S.host.indexOf("@") > 0 ? S.host.split("@") : !1; he && (S.auth = he.shift(), S.host = S.hostname = he.shift()); } return re = re || S.host && X.length, re && !me && X.unshift(""), X.length ? S.pathname = X.join("/") : (S.pathname = null, S.path = null), (!e.isNull(S.pathname) || !e.isNull(S.search)) && (S.path = (S.pathname ? S.pathname : "") + (S.search ? S.search : "")), S.auth = w.auth || S.auth, S.slashes = S.slashes || w.slashes, S.href = S.format(), S; }, n.prototype.parseHost = function() { var w = this.host, O = i.exec(w); O && (O = O[0], O !== ":" && (this.port = O.substr(1)), w = w.substr(0, w.length - O.length)), w && (this.hostname = w); }, Ws; } var KN = PK(); const ZN = /* @__PURE__ */ W0(KN); /*! * @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 Wo; (function(t) { t[t.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t[t.WEBGL = 1] = "WEBGL", t[t.WEBGL2 = 2] = "WEBGL2"; })(Wo || (Wo = {})); var Xu; (function(t) { t[t.UNKNOWN = 0] = "UNKNOWN", t[t.WEBGL = 1] = "WEBGL", t[t.CANVAS = 2] = "CANVAS"; })(Xu || (Xu = {})); var Ad; (function(t) { t[t.COLOR = 16384] = "COLOR", t[t.DEPTH = 256] = "DEPTH", t[t.STENCIL = 1024] = "STENCIL"; })(Ad || (Ad = {})); var yt; (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"; })(yt || (yt = {})); var Xi; (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"; })(Xi || (Xi = {})); var Wu; (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"; })(Wu || (Wu = {})); var gs; (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"; })(gs || (gs = {})); var Wr; (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"; })(Wr || (Wr = {})); var Ho; (function(t) { t[t.NEAREST = 0] = "NEAREST", t[t.LINEAR = 1] = "LINEAR"; })(Ho || (Ho = {})); var Pa; (function(t) { t[t.CLAMP = 33071] = "CLAMP", t[t.REPEAT = 10497] = "REPEAT", t[t.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT"; })(Pa || (Pa = {})); var qu; (function(t) { t[t.OFF = 0] = "OFF", t[t.POW2 = 1] = "POW2", t[t.ON = 2] = "ON"; })(qu || (qu = {})); var Ra; (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"; })(Ra || (Ra = {})); var co; (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"; })(co || (co = {})); var lv; (function(t) { t[t.AUTO = 0] = "AUTO", t[t.MANUAL = 1] = "MANUAL"; })(lv || (lv = {})); var mo; (function(t) { t.LOW = "lowp", t.MEDIUM = "mediump", t.HIGH = "highp"; })(mo || (mo = {})); var ui; (function(t) { t[t.NONE = 0] = "NONE", t[t.SCISSOR = 1] = "SCISSOR", t[t.STENCIL = 2] = "STENCIL", t[t.SPRITE = 3] = "SPRITE"; })(ui || (ui = {})); var $l; (function(t) { t[t.NONE = 0] = "NONE", t[t.LOW = 2] = "LOW", t[t.MEDIUM = 4] = "MEDIUM", t[t.HIGH = 8] = "HIGH"; })($l || ($l = {})); /*! * @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 */ ht.RETINA_PREFIX = /@([0-9\.]+)x/; ht.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !0; var gE = !1, PI = "5.3.12"; function OK() { gE = !0; } function QN(t) { var e; if (!gE) { if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { var n = [ ` %c %c %c PixiJS ` + PI + " - ✰ " + t + ` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ `, "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;" ]; (e = window.console).log.apply(e, n); } else window.console && window.console.log("PixiJS " + PI + " - " + t + " - http://www.pixijs.com/"); gE = !0; } } var tT; function JN() { return typeof tT > "u" && (tT = function() { var e = { stencil: !0, failIfMajorPerformanceCaveat: ht.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT }; try { if (!window.WebGLRenderingContext) return !1; var n = document.createElement("canvas"), r = n.getContext("webgl", e) || n.getContext("experimental-webgl", e), i = !!(r && r.getContextAttributes().stencil); if (r) { var o = r.getExtension("WEBGL_lose_context"); o && o.loseContext(); } return r = null, i; } catch { return !1; } }()), tT; } function jl(t, e) { return e === void 0 && (e = []), e[0] = (t >> 16 & 255) / 255, e[1] = (t >> 8 & 255) / 255, e[2] = (t & 255) / 255, e; } function HC(t) { var e = t.toString(16); return e = "000000".substr(0, 6 - e.length) + e, "#" + e; } function zC(t) { return typeof t == "string" && t[0] === "#" && (t = t.substr(1)), parseInt(t, 16); } function CK(t) { return (t[0] * 255 << 16) + (t[1] * 255 << 8) + (t[2] * 255 | 0); } function kK() { for (var t = [], e = [], n = 0; n < 32; n++) t[n] = n, e[n] = n; t[yt.NORMAL_NPM] = yt.NORMAL, t[yt.ADD_NPM] = yt.ADD, t[yt.SCREEN_NPM] = yt.SCREEN, e[yt.NORMAL] = yt.NORMAL_NPM, e[yt.ADD] = yt.ADD_NPM, e[yt.SCREEN] = yt.SCREEN_NPM; var r = []; return r.push(e), r.push(t), r; } var UC = kK(); function GC(t, e) { return UC[e ? 1 : 0][t]; } function e7(t, e, n, r) { return n = n || new Float32Array(4), r || r === void 0 ? (n[0] = t[0] * e, n[1] = t[1] * e, n[2] = t[2] * e) : (n[0] = t[0], n[1] = t[1], n[2] = t[2]), n[3] = e, n; } function q0(t, e) { if (e === 1) return (e * 255 << 24) + t; if (e === 0) return 0; var n = t >> 16 & 255, r = t >> 8 & 255, i = t & 255; return n = n * e + 0.5 | 0, r = r * e + 0.5 | 0, i = i * e + 0.5 | 0, (e * 255 << 24) + (n << 16) + (r << 8) + i; } function VC(t, e, n, r) { return n = n || new Float32Array(4), n[0] = (t >> 16 & 255) / 255, n[1] = (t >> 8 & 255) / 255, n[2] = (t & 255) / 255, (r || r === void 0) && (n[0] *= e, n[1] *= e, n[2] *= e), n[3] = e, n; } function t7(t, e) { e === void 0 && (e = null); var n = t * 6; if (e = e || new Uint16Array(n), e.length !== n) throw new Error("Out buffer length is incorrect, got " + e.length + " and expected " + n); for (var r = 0, i = 0; r < n; r += 6, i += 4) e[r + 0] = i + 0, e[r + 1] = i + 1, e[r + 2] = i + 2, e[r + 3] = i + 0, e[r + 4] = i + 2, e[r + 5] = i + 3; return e; } function r7(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 AK = { Float32Array, Uint32Array, Int32Array, Uint8Array }; function IK(t, e) { for (var n = 0, r = 0, i = {}, o = 0; o < t.length; o++) r += e[o], n += t[o].length; for (var a = new ArrayBuffer(n * 4), s = null, c = 0, o = 0; o < t.length; o++) { var l = e[o], u = t[o], f = r7(u); i[f] || (i[f] = new AK[f](a)), s = i[f]; for (var h = 0; h < u.length; h++) { var p = (h / l | 0) * r + c, d = h % l; s[p + d] = u[h]; } c += l; } return new Float32Array(a); } function Id(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 vE(t) { return !(t & t - 1) && !!t; } function yE(t) { var e = (t > 65535 ? 1 : 0) << 4; t >>>= e; var n = (t > 255 ? 1 : 0) << 3; return t >>>= n, e |= n, n = (t > 15 ? 1 : 0) << 2, t >>>= n, e |= n, n = (t > 3 ? 1 : 0) << 1, t >>>= n, e |= n, e | t >> 1; } function Al(t, e, n) { var r = t.length, i; if (!(e >= r || n === 0)) { n = e + n > r ? r - e : n; var o = r - n; for (i = e; i < o; ++i) t[i] = t[i + n]; t.length = o; } } function El(t) { return t === 0 ? 0 : t < 0 ? -1 : 1; } var RK = 0; function Bl() { return ++RK; } var OI = {}; function Me(t, e, n) { if (n === void 0 && (n = 3), !OI[e]) { var r = new Error().stack; typeof r > "u" ? console.warn("PixiJS Deprecation Warning: ", e + ` Deprecated since v` + t) : (r = r.split(` `).splice(n).join(` `), console.groupCollapsed ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", e + ` Deprecated since v` + t), console.warn(r), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", e + ` Deprecated since v` + t), console.warn(r))), OI[e] = !0; } } var bE = {}, hi = /* @__PURE__ */ Object.create(null), Bi = /* @__PURE__ */ Object.create(null); function MK() { var t; for (t in hi) hi[t].destroy(); for (t in Bi) Bi[t].destroy(); } function DK() { var t; for (t in hi) delete hi[t]; for (t in Bi) delete Bi[t]; } var _E = ( /** @class */ function() { function t(e, n, r) { this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.resolution = r || ht.RESOLUTION, this.resize(e, n); } 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(e, n) { this.canvas.width = e * this.resolution, this.canvas.height = n * this.resolution; }, t.prototype.destroy = function() { this.context = null, this.canvas = null; }, Object.defineProperty(t.prototype, "width", { /** * The width of the canvas buffer in pixels. * * @member {number} */ get: function() { return this.canvas.width; }, set: function(e) { this.canvas.width = e; }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "height", { /** * The height o