modern-canvas 0.13.4 → 0.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { defineProperty as qt, Observable as fe, Reactivable as Dr, parseColor as Ls, property as u, RawWeakMap as Ir, isGradient as Fs, isColorFillObject as _r, clearUndef as Br, idGenerator as zr, normalizeFill as $s, isNone as F, normalizeBackground as Vs, normalizeForeground as Gs, normalizeOutline as Ws, normalizeShadow as js, normalizeShape as qs, getDefaultStyle as Xs, normalizeText as Hs, normalizeTextContent as Ys, getDefaultTextStyle as Ks, getDefaultLayoutStyle as Zs } from "modern-idoc";
1
+ import { defineProperty as Xt, Observable as fe, Reactivable as Dr, parseColor as Ls, property as u, RawWeakMap as Ir, isGradient as Fs, isColorFillObject as mr, clearUndef as Br, idGenerator as Nr, normalizeFill as Vs, isNone as F, normalizeBackground as $s, normalizeForeground as Gs, normalizeOutline as Ws, normalizeShadow as js, normalizeShape as qs, getDefaultStyle as Xs, normalizeText as Hs, normalizeTextContent as Ys, getDefaultTextStyle as Ks, getDefaultLayoutStyle as Zs } from "modern-idoc";
2
2
  import { fonts as Js } from "modern-font";
3
3
  import { extend as Qs } from "colord";
4
4
  import ei from "colord/plugins/names";
5
- import { Path2D as bt, Path2DSet as ti, svgToDom as ri, svgToPath2DSet as si, Matrix3 as mr, BoundingBox as Nt } from "modern-path2d";
5
+ import { Path2D as yt, Path2DSet as ti, svgToDom as ri, svgToPath2DSet as si, Matrix3 as gr, BoundingBox as Lt } from "modern-path2d";
6
6
  import { Text as ii, Character as oi } from "modern-text";
7
- const Xt = /* @__PURE__ */ new Map();
7
+ const Ht = /* @__PURE__ */ new Map();
8
8
  function g(r, e) {
9
9
  return function(t) {
10
10
  Object.defineProperty(t.prototype, "is", {
@@ -12,14 +12,14 @@ function g(r, e) {
12
12
  enumerable: !0,
13
13
  configurable: !0
14
14
  }), e && Object.keys(e).forEach((s) => {
15
- qt(t, s, {
15
+ Xt(t, s, {
16
16
  fallback: e[s]
17
17
  });
18
- }), Xt.set(r, t);
18
+ }), Ht.set(r, t);
19
19
  };
20
20
  }
21
21
  function bl(r = "node", e = {}) {
22
- const t = Xt.get(r);
22
+ const t = Ht.get(r);
23
23
  if (!t)
24
24
  throw new Error(`Failed to createNode, tag: ${r}`);
25
25
  return new t().setProperties(e);
@@ -81,7 +81,7 @@ class U {
81
81
  }
82
82
  }
83
83
  U.start();
84
- async function Nr(r) {
84
+ async function zr(r) {
85
85
  return new Promise((e) => {
86
86
  U.on(
87
87
  () => {
@@ -91,16 +91,16 @@ async function Nr(r) {
91
91
  );
92
92
  });
93
93
  }
94
- const Ht = Math.PI, B = Ht * 2;
94
+ const Yt = Math.PI, B = Yt * 2;
95
95
  let ai = 0;
96
96
  function ni(r) {
97
97
  return r?.__SPECTOR_Object_TAG?.id ?? ++ai;
98
98
  }
99
- function gr(r) {
99
+ function vr(r) {
100
100
  return !(r & r - 1) && !!r;
101
101
  }
102
102
  const li = /([\w-]+)\((.+?)\)/g, hi = /[^,]+/g, ci = /([-e.\d]+)(.*)/;
103
- function vr(r) {
103
+ function br(r) {
104
104
  return Array.isArray(r) ? r.map((e) => ({
105
105
  name: e.name,
106
106
  args: e.args.map((t) => ({
@@ -112,11 +112,11 @@ function vr(r) {
112
112
  normalizedIntValue: r.normalizedDefaultIntValue
113
113
  };
114
114
  }
115
- function mt(r, e, t = {}) {
116
- const s = Rt(e, t);
115
+ function gt(r, e, t = {}) {
116
+ const s = Ot(e, t);
117
117
  return s.length ? s : Lr(r, e, t);
118
118
  }
119
- function Rt(r, e = {}) {
119
+ function Ot(r, e = {}) {
120
120
  const t = [];
121
121
  let s;
122
122
  for (; (s = li.exec(r)) !== null; ) {
@@ -187,7 +187,7 @@ function Lr(r, e, t = {}) {
187
187
  }
188
188
  return n;
189
189
  }
190
- const di = "WebGL2RenderingContext" in globalThis, fi = "ImageBitmap" in globalThis, pi = "ResizeObserver" in globalThis, He = "PointerEvent" in globalThis, _i = "WheelEvent" in globalThis, yl = "MouseEvent" in globalThis, ce = "ontouchstart" in globalThis, mi = "onclick" in globalThis, Fr = "createImageBitmap" in globalThis, $r = "AudioContext" in globalThis, Vr = "webkitAudioContext" in globalThis, Gr = "OfflineAudioContext" in globalThis, gi = "webkitOfflineAudioContext" in globalThis, vi = $r || Vr, Ot = typeof window < "u", bi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Wr = globalThis.devicePixelRatio || 1, jr = (r) => r !== null && typeof r == "object" && r.nodeType === 1, yi = (r) => jr(r) && r.tagName === "VIDEO", xl = (r) => jr(r) && r.tagName === "IMG";
190
+ const di = "WebGL2RenderingContext" in globalThis, fi = "ImageBitmap" in globalThis, pi = "ResizeObserver" in globalThis, He = "PointerEvent" in globalThis, _i = "WheelEvent" in globalThis, yl = "MouseEvent" in globalThis, ce = "ontouchstart" in globalThis, mi = "onclick" in globalThis, Fr = "createImageBitmap" in globalThis, Vr = "AudioContext" in globalThis, $r = "webkitAudioContext" in globalThis, Gr = "OfflineAudioContext" in globalThis, gi = "webkitOfflineAudioContext" in globalThis, vi = Vr || $r, Mt = typeof window < "u", bi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Wr = globalThis.devicePixelRatio || 1, jr = (r) => r !== null && typeof r == "object" && r.nodeType === 1, yi = (r) => jr(r) && r.tagName === "VIDEO", xl = (r) => jr(r) && r.tagName === "IMG";
191
191
  function xi(r) {
192
192
  return typeof r == "object" && r !== null && r.nodeType === 1 && r.tagName === "CANVAS";
193
193
  }
@@ -195,7 +195,7 @@ function wi(r) {
195
195
  return di && r instanceof globalThis.WebGL2RenderingContext;
196
196
  }
197
197
  function Pi() {
198
- if (Ot)
198
+ if (Mt)
199
199
  return globalThis.document.createElement("canvas");
200
200
  }
201
201
  function Ti(r, e = globalThis.location) {
@@ -245,7 +245,7 @@ class qr {
245
245
  return this._map.set(this._toRaw(e), this._toRaw(t)), this;
246
246
  }
247
247
  }
248
- class Mt {
248
+ class kt {
249
249
  cursor;
250
250
  // Event
251
251
  bubbles = !1;
@@ -253,7 +253,7 @@ class Mt {
253
253
  cancelable = !1;
254
254
  composed = !1;
255
255
  defaultPrevented = !1;
256
- eventPhase = Mt.prototype.NONE;
256
+ eventPhase = kt.prototype.NONE;
257
257
  isTrusted = !1;
258
258
  timeStamp = 0;
259
259
  type = "";
@@ -282,7 +282,7 @@ class Mt {
282
282
  throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
283
283
  }
284
284
  }
285
- class Si extends Mt {
285
+ class Si extends kt {
286
286
  getModifierState(...e) {
287
287
  throw new Error("getModifierState() is a legacy DOM API. It is not implemented in the Federated Events API.");
288
288
  }
@@ -290,7 +290,7 @@ class Si extends Mt {
290
290
  throw new Error("initKeyboardEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
291
291
  }
292
292
  }
293
- class Xr extends Mt {
293
+ class Xr extends kt {
294
294
  client = { x: 0, y: 0 };
295
295
  get clientX() {
296
296
  return this.client.x;
@@ -545,7 +545,7 @@ class pe extends Dr {
545
545
  this.setProperties(e);
546
546
  }
547
547
  _nextTick() {
548
- return Nr();
548
+ return zr();
549
549
  }
550
550
  equal(e) {
551
551
  return !!(e && this.instanceId === e.instanceId);
@@ -848,7 +848,7 @@ class Ui extends se {
848
848
  super(4, 4, e);
849
849
  }
850
850
  }
851
- const Di = Ht / 180, wl = 180 / Ht;
851
+ const Di = Yt / 180, wl = 180 / Yt;
852
852
  function ie(r, e, t) {
853
853
  return Math.max(e, Math.min(r, t));
854
854
  }
@@ -1352,8 +1352,8 @@ class ye {
1352
1352
  };
1353
1353
  }
1354
1354
  }
1355
- class O extends Yr {
1356
- static _t2d = /* @__PURE__ */ new O();
1355
+ class R extends Yr {
1356
+ static _t2d = /* @__PURE__ */ new R();
1357
1357
  premultiply(e) {
1358
1358
  return e.multiply(this, this);
1359
1359
  }
@@ -1364,7 +1364,7 @@ class O extends Yr {
1364
1364
  return this.skew(0, e);
1365
1365
  }
1366
1366
  skew(e, t) {
1367
- return this.premultiply(O._t2d.makeSkew(e, t));
1367
+ return this.premultiply(R._t2d.makeSkew(e, t));
1368
1368
  }
1369
1369
  makeSkew(e, t) {
1370
1370
  const s = Math.tan(e), i = Math.tan(t);
@@ -1393,7 +1393,7 @@ class O extends Yr {
1393
1393
  return this.translate(e, t, s);
1394
1394
  }
1395
1395
  translate(e, t, s = 0) {
1396
- return this.premultiply(O._t2d.makeTranslation(e, t, s));
1396
+ return this.premultiply(R._t2d.makeTranslation(e, t, s));
1397
1397
  }
1398
1398
  makeTranslation(e, t, s = 0) {
1399
1399
  return this.set([
@@ -1418,7 +1418,7 @@ class O extends Yr {
1418
1418
  return this.scale(e, t, s);
1419
1419
  }
1420
1420
  scale(e, t, s = 1) {
1421
- return this.premultiply(O._t2d.makeScale(e, t, s));
1421
+ return this.premultiply(R._t2d.makeScale(e, t, s));
1422
1422
  }
1423
1423
  makeScale(e, t, s = 1) {
1424
1424
  return this.set([
@@ -1443,7 +1443,7 @@ class O extends Yr {
1443
1443
  return this.rotate(e);
1444
1444
  }
1445
1445
  rotate(e) {
1446
- return this.premultiply(O._t2d.makeRotation(e));
1446
+ return this.premultiply(R._t2d.makeRotation(e));
1447
1447
  }
1448
1448
  rotate3d(e, t, s, i) {
1449
1449
  const [o, a, n] = this._rotate3d(e, t, s, i);
@@ -1525,12 +1525,12 @@ class El extends Z {
1525
1525
  super(3);
1526
1526
  }
1527
1527
  }
1528
- var zi = Object.defineProperty, Kr = (r, e, t, s) => {
1528
+ var Ni = Object.defineProperty, Kr = (r, e, t, s) => {
1529
1529
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
1530
1530
  (a = r[o]) && (i = a(e, t, i) || i);
1531
- return i && zi(e, t, i), i;
1531
+ return i && Ni(e, t, i), i;
1532
1532
  };
1533
- class Yt extends pe {
1533
+ class Kt extends pe {
1534
1534
  _starting = !1;
1535
1535
  _nextDeltaTime = 0;
1536
1536
  _startedProcess;
@@ -1562,16 +1562,16 @@ class Yt extends pe {
1562
1562
  }
1563
1563
  Kr([
1564
1564
  u({ fallback: 60 })
1565
- ], Yt.prototype, "fps");
1565
+ ], Kt.prototype, "fps");
1566
1566
  Kr([
1567
1567
  u({ fallback: 1 })
1568
- ], Yt.prototype, "speed");
1569
- var Ni = Object.defineProperty, Zr = (r, e, t, s) => {
1568
+ ], Kt.prototype, "speed");
1569
+ var zi = Object.defineProperty, Zr = (r, e, t, s) => {
1570
1570
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
1571
1571
  (a = r[o]) && (i = a(e, t, i) || i);
1572
- return i && Ni(e, t, i), i;
1572
+ return i && zi(e, t, i), i;
1573
1573
  };
1574
- class Kt extends Dr {
1574
+ class Zt extends Dr {
1575
1575
  screen = { x: 0, y: 0, width: 0, height: 0 };
1576
1576
  related = new qr();
1577
1577
  _updateProperty(e, t, s) {
@@ -1595,10 +1595,10 @@ class Kt extends Dr {
1595
1595
  }
1596
1596
  Zr([
1597
1597
  u({ fallback: Wr })
1598
- ], Kt.prototype, "pixelRatio");
1598
+ ], Zt.prototype, "pixelRatio");
1599
1599
  Zr([
1600
1600
  u({ internal: !0 })
1601
- ], Kt.prototype, "view");
1601
+ ], Zt.prototype, "view");
1602
1602
  var Ze = /* @__PURE__ */ ((r) => (r.NORMAL = "normal", r.ADD = "add", r.MULTIPLY = "multiply", r.SCREEN = "screen", r.NONE = "none", r.NORMAL_NPM = "normal_npm", r.ADD_NPM = "add_npm", r.SCREEN_NPM = "screen_npm", r.SRC_IN = "src_in", r.SRC_OUT = "src_out", r.SRC_ATOP = "src_atop", r.DST_OVER = "dst_over", r.DST_IN = "dst_in", r.DST_OUT = "dst_out", r.DST_ATOP = "dst_atop", r.XOR = "xor", r.SUBTRACT = "subtract", r))(Ze || {});
1603
1603
  function Li(r) {
1604
1604
  return {
@@ -1749,7 +1749,7 @@ class Fi extends H {
1749
1749
  e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), this.bind(this.defaultState), this._blendEq = !0, this.setBlendMode(Ze.NORMAL);
1750
1750
  }
1751
1751
  }
1752
- class $i extends H {
1752
+ class Vi extends H {
1753
1753
  install(e) {
1754
1754
  super.install(e), e.batch2D = this;
1755
1755
  }
@@ -1917,8 +1917,8 @@ void main(void) {
1917
1917
  const i = this._renderer.texture.maxUnits, o = this._getAttributeBuffer(e), a = new Float32Array(o), n = new Uint8Array(o), h = this._getIndexBuffer(t);
1918
1918
  let l = 0, c = 0;
1919
1919
  const d = [];
1920
- for (let _ = s.length, p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map(), y = 0, P = 0, R = 0; R < _; R++) {
1921
- const A = s[R].texture, L = R === _ - 1;
1920
+ for (let _ = s.length, p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map(), y = 0, P = 0, O = 0; O < _; O++) {
1921
+ const A = s[O].texture, L = O === _ - 1;
1922
1922
  if (!A || v.has(A)) {
1923
1923
  if (!L)
1924
1924
  continue;
@@ -1926,22 +1926,22 @@ void main(void) {
1926
1926
  m.push(A), v.set(A, y++);
1927
1927
  if (L || y >= i) {
1928
1928
  p.textures = m, p.textureLocationMap = v, y = 0, p.first = c;
1929
- for (let G = P; G <= R; G++) {
1929
+ for (let G = P; G <= O; G++) {
1930
1930
  const {
1931
- indices: cr,
1932
- vertices: Bt,
1933
- uvs: ur = new Float32Array(0),
1934
- size: dr = new Float32Array(0),
1935
- texture: fr,
1931
+ indices: ur,
1932
+ vertices: Nt,
1933
+ uvs: dr = new Float32Array(0),
1934
+ size: fr = new Float32Array(0),
1935
+ texture: pr,
1936
1936
  modulate: qe = this._defaultModulate,
1937
1937
  backgroundColor: Xe = this._defaultBackgroundColor,
1938
- blendMode: pr = Ze.NORMAL,
1938
+ blendMode: _r = Ze.NORMAL,
1939
1939
  disableWrapMode: Us = !1
1940
- } = s[G], Ds = dr[0] || 0, Is = dr[1] || 0;
1941
- P < G && p.blendMode !== pr && (p.count = c - p.first, d.push(p), P = G, p = { id: ++this._drawCallUid }, p.textures = m, p.first = c);
1942
- const Bs = l / this._vertexSize, zs = (fr ? v.get(fr) : -1) ?? -1, Ns = Us ? 1 : 0;
1943
- for (let zt = Bt.length, K = 0; K < zt; K += 2) {
1944
- if (a[l++] = zs, a[l++] = Bt[K], a[l++] = Bt[K + 1], a[l++] = Ds, a[l++] = Is, a[l++] = ur[K], a[l++] = ur[K + 1], qe) {
1940
+ } = s[G], Ds = fr[0] || 0, Is = fr[1] || 0;
1941
+ P < G && p.blendMode !== _r && (p.count = c - p.first, d.push(p), P = G, p = { id: ++this._drawCallUid }, p.textures = m, p.first = c);
1942
+ const Bs = l / this._vertexSize, Ns = (pr ? v.get(pr) : -1) ?? -1, zs = Us ? 1 : 0;
1943
+ for (let zt = Nt.length, K = 0; K < zt; K += 2) {
1944
+ if (a[l++] = Ns, a[l++] = Nt[K], a[l++] = Nt[K + 1], a[l++] = Ds, a[l++] = Is, a[l++] = dr[K], a[l++] = dr[K + 1], qe) {
1945
1945
  const re = l * 4;
1946
1946
  n[re] = qe[0], n[re + 1] = qe[1], n[re + 2] = qe[2], n[re + 3] = qe[3];
1947
1947
  }
@@ -1949,20 +1949,20 @@ void main(void) {
1949
1949
  const re = l * 4;
1950
1950
  n[re] = Xe[0], n[re + 1] = Xe[1], n[re + 2] = Xe[2], n[re + 3] = Xe[3];
1951
1951
  }
1952
- l++, a[l++] = Ns;
1952
+ l++, a[l++] = zs;
1953
1953
  }
1954
- for (let zt = cr.length, K = 0; K < zt; K++)
1955
- h[c++] = Bs + cr[K];
1956
- p.blendMode = pr;
1954
+ for (let zt = ur.length, K = 0; K < zt; K++)
1955
+ h[c++] = Bs + ur[K];
1956
+ p.blendMode = _r;
1957
1957
  }
1958
- P = R + 1, p.count = c - p.first, d.push(p), p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map();
1958
+ P = O + 1, p.count = c - p.first, d.push(p), p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map();
1959
1959
  }
1960
1960
  }
1961
1961
  const f = this._getShader(i);
1962
1962
  f.update(o, h);
1963
1963
  for (let _ = d.length, p = 0; p < _; p++) {
1964
1964
  const m = d[p], { first: v = 0, textures: y, textureLocationMap: P } = m;
1965
- for (let R = y.length, A = 0; A < R; A++) {
1965
+ for (let O = y.length, A = 0; A < O; A++) {
1966
1966
  const L = y[A], G = P.get(L);
1967
1967
  G !== void 0 && this._renderer.texture.bind({
1968
1968
  target: "texture_2d",
@@ -1979,28 +1979,28 @@ void main(void) {
1979
1979
  }
1980
1980
  }
1981
1981
  _getAttributeBuffer(e) {
1982
- const t = br(Math.ceil(e / 8)), s = yr(t), i = t * 8;
1982
+ const t = yr(Math.ceil(e / 8)), s = xr(t), i = t * 8;
1983
1983
  this._attributeBuffer.length <= s && (this._indexBuffers.length = s + 1);
1984
1984
  let o = this._attributeBuffer[i];
1985
1985
  return o || (this._attributeBuffer[i] = o = new ArrayBuffer(i * this._vertexSize * 4)), o;
1986
1986
  }
1987
1987
  _getIndexBuffer(e) {
1988
- const t = br(Math.ceil(e / 12)), s = yr(t), i = t * 12;
1988
+ const t = yr(Math.ceil(e / 12)), s = xr(t), i = t * 12;
1989
1989
  this._indexBuffers.length <= s && (this._indexBuffers.length = s + 1);
1990
1990
  let o = this._indexBuffers[s];
1991
1991
  return o || (this._indexBuffers[s] = o = new Uint16Array(i)), o;
1992
1992
  }
1993
1993
  }
1994
- function br(r) {
1994
+ function yr(r) {
1995
1995
  return r += r === 0 ? 1 : 0, --r, r |= r >>> 1, r |= r >>> 2, r |= r >>> 4, r |= r >>> 8, r |= r >>> 16, r + 1;
1996
1996
  }
1997
- function yr(r) {
1997
+ function xr(r) {
1998
1998
  let e = (r > 65535 ? 1 : 0) << 4;
1999
1999
  r >>>= e;
2000
2000
  let t = (r > 255 ? 1 : 0) << 3;
2001
2001
  return r >>>= t, e |= t, t = (r > 15 ? 1 : 0) << 2, r >>>= t, e |= t, t = (r > 3 ? 1 : 0) << 1, r >>>= t, e |= t, e | r >> 1;
2002
2002
  }
2003
- class Vi extends H {
2003
+ class $i extends H {
2004
2004
  install(e) {
2005
2005
  super.install(e), e.buffer = this;
2006
2006
  }
@@ -2528,12 +2528,12 @@ function qi(r) {
2528
2528
  return 1;
2529
2529
  }
2530
2530
  }
2531
- function gt(r, e, t) {
2531
+ function vt(r, e, t) {
2532
2532
  const [s, i, o, a, n, h, l, c, d] = r, f = s * e + a * t + l, _ = i * e + n * t + c, p = o * e + h * t + d;
2533
2533
  return { x: f / p, y: _ / p };
2534
2534
  }
2535
2535
  function Xi(r, e) {
2536
- const { x: t, y: s, width: i, height: o } = e, a = gt(r, t, s), n = gt(r, t + i, s), h = gt(r, t + i, s + o), l = gt(r, t, s + o), c = [a, n, h, l], d = c.map((y) => y.x), f = c.map((y) => y.y), _ = Math.min(...d), p = Math.max(...d), m = Math.min(...f), v = Math.max(...f);
2536
+ const { x: t, y: s, width: i, height: o } = e, a = vt(r, t, s), n = vt(r, t + i, s), h = vt(r, t + i, s + o), l = vt(r, t, s + o), c = [a, n, h, l], d = c.map((y) => y.x), f = c.map((y) => y.y), _ = Math.min(...d), p = Math.max(...d), m = Math.min(...f), v = Math.max(...f);
2537
2537
  return {
2538
2538
  x: _,
2539
2539
  y: m,
@@ -2867,10 +2867,10 @@ class Qi extends H {
2867
2867
  super.reset(), this.boundViewport = { x: 0, y: 0, width: 0, height: 0 };
2868
2868
  }
2869
2869
  }
2870
- class eo extends Kt {
2870
+ class eo extends Zt {
2871
2871
  _modules = [
2872
2872
  new Zi(),
2873
- new Vi(),
2873
+ new $i(),
2874
2874
  new Gi(),
2875
2875
  new ji(),
2876
2876
  new Ji(),
@@ -2879,7 +2879,7 @@ class eo extends Kt {
2879
2879
  new Wi(),
2880
2880
  new Hi(),
2881
2881
  new Yi(),
2882
- new $i()
2882
+ new Vi()
2883
2883
  ];
2884
2884
  bindPoints = /* @__PURE__ */ new Map();
2885
2885
  constructor(e = Pi(), t) {
@@ -3012,7 +3012,7 @@ class to extends Ce {
3012
3012
  }), e.font = this, this;
3013
3013
  }
3014
3014
  }
3015
- class Zt extends _e {
3015
+ class Jt extends _e {
3016
3016
  vertexAttributes;
3017
3017
  indexBuffer;
3018
3018
  instanceCount;
@@ -3070,7 +3070,7 @@ var ro = Object.defineProperty, Jr = (r, e, t, s) => {
3070
3070
  (a = r[o]) && (i = a(e, t, i) || i);
3071
3071
  return i && ro(e, t, i), i;
3072
3072
  };
3073
- class nt extends _e {
3073
+ class lt extends _e {
3074
3074
  needsUpload = !1;
3075
3075
  constructor(e) {
3076
3076
  super(), this.setProperties(e);
@@ -3105,10 +3105,10 @@ class nt extends _e {
3105
3105
  }
3106
3106
  Jr([
3107
3107
  u({ internal: !0, fallback: null })
3108
- ], nt.prototype, "data");
3108
+ ], lt.prototype, "data");
3109
3109
  Jr([
3110
3110
  u({ internal: !0, fallback: !1 })
3111
- ], nt.prototype, "dynamic");
3111
+ ], lt.prototype, "dynamic");
3112
3112
  var so = Object.defineProperty, Qr = (r, e, t, s) => {
3113
3113
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3114
3114
  (a = r[o]) && (i = a(e, t, i) || i);
@@ -3158,7 +3158,7 @@ var io = Object.defineProperty, Ae = (r, e, t, s) => {
3158
3158
  (a = r[o]) && (i = a(e, t, i) || i);
3159
3159
  return i && io(e, t, i), i;
3160
3160
  };
3161
- class $ extends _e {
3161
+ class V extends _e {
3162
3162
  needsUpload = !1;
3163
3163
  constructor(e) {
3164
3164
  super(), this.setProperties({
@@ -3186,30 +3186,30 @@ class $ extends _e {
3186
3186
  }
3187
3187
  Ae([
3188
3188
  u({ internal: !0 })
3189
- ], $.prototype, "buffer");
3189
+ ], V.prototype, "buffer");
3190
3190
  Ae([
3191
3191
  u({ fallback: 0 })
3192
- ], $.prototype, "size");
3192
+ ], V.prototype, "size");
3193
3193
  Ae([
3194
3194
  u({ fallback: !1 })
3195
- ], $.prototype, "normalized");
3195
+ ], V.prototype, "normalized");
3196
3196
  Ae([
3197
3197
  u({ fallback: "float" })
3198
- ], $.prototype, "type");
3198
+ ], V.prototype, "type");
3199
3199
  Ae([
3200
3200
  u()
3201
- ], $.prototype, "stride");
3201
+ ], V.prototype, "stride");
3202
3202
  Ae([
3203
3203
  u()
3204
- ], $.prototype, "offset");
3204
+ ], V.prototype, "offset");
3205
3205
  Ae([
3206
3206
  u()
3207
- ], $.prototype, "divisor");
3208
- class Sl extends Zt {
3207
+ ], V.prototype, "divisor");
3208
+ class Sl extends Jt {
3209
3209
  constructor() {
3210
3210
  super({
3211
3211
  vertexAttributes: {
3212
- position: new $({
3212
+ position: new V({
3213
3213
  buffer: new ue({
3214
3214
  data: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
3215
3215
  dynamic: !1
@@ -3219,7 +3219,7 @@ class Sl extends Zt {
3219
3219
  type: "float"
3220
3220
  })
3221
3221
  },
3222
- indexBuffer: new nt({
3222
+ indexBuffer: new lt({
3223
3223
  data: new Uint16Array([0, 1, 3, 2]),
3224
3224
  dynamic: !1
3225
3225
  }),
@@ -3275,7 +3275,7 @@ function no(r) {
3275
3275
  }
3276
3276
  return Number(r);
3277
3277
  }
3278
- class yt extends w {
3278
+ class xt extends w {
3279
3279
  vert = `attribute vec2 position;
3280
3280
  attribute vec2 uv;
3281
3281
  varying vec2 vUv;
@@ -3306,8 +3306,8 @@ void main() {
3306
3306
  constructor(e) {
3307
3307
  super();
3308
3308
  const t = this.has;
3309
- for (const i in yt.RE)
3310
- t[i] = yt.RE[i].test(e);
3309
+ for (const i in xt.RE)
3310
+ t[i] = xt.RE[i].test(e);
3311
3311
  this.frag = `precision highp float;
3312
3312
  varying vec2 vUv;
3313
3313
  uniform float ratio;
@@ -3329,7 +3329,7 @@ void main(void) { gl_FragColor = transition(vUv); }` : ""}`;
3329
3329
  });
3330
3330
  }
3331
3331
  }
3332
- class xt extends w {
3332
+ class wt extends w {
3333
3333
  static _instance;
3334
3334
  static get instance() {
3335
3335
  return this._instance ??= new this();
@@ -3360,18 +3360,18 @@ void main(void) {
3360
3360
  });
3361
3361
  }
3362
3362
  }
3363
- class b extends Zt {
3363
+ class b extends Jt {
3364
3364
  static _instance;
3365
3365
  static get instance() {
3366
3366
  return this._instance ??= new this();
3367
3367
  }
3368
- static draw(e, t = xt.instance, s) {
3368
+ static draw(e, t = wt.instance, s) {
3369
3369
  this.instance.draw(e, t, s);
3370
3370
  }
3371
3371
  constructor() {
3372
3372
  super({
3373
3373
  vertexAttributes: {
3374
- position: new $({
3374
+ position: new V({
3375
3375
  buffer: new ue({
3376
3376
  data: new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]),
3377
3377
  dynamic: !1
@@ -3380,7 +3380,7 @@ class b extends Zt {
3380
3380
  normalized: !1,
3381
3381
  type: "float"
3382
3382
  }),
3383
- uv: new $({
3383
+ uv: new V({
3384
3384
  buffer: new ue({
3385
3385
  data: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
3386
3386
  dynamic: !1
@@ -3390,41 +3390,41 @@ class b extends Zt {
3390
3390
  type: "float"
3391
3391
  })
3392
3392
  },
3393
- indexBuffer: new nt({
3393
+ indexBuffer: new lt({
3394
3394
  data: new Uint16Array([0, 1, 2, 0, 2, 3]),
3395
3395
  dynamic: !1
3396
3396
  })
3397
3397
  });
3398
3398
  }
3399
3399
  }
3400
- class Cl extends Zt {
3400
+ class Cl extends Jt {
3401
3401
  positionBuffer;
3402
3402
  uvBuffer;
3403
3403
  constructor() {
3404
3404
  const e = new ue({ data: new Float32Array(), dynamic: !0 }), t = new ue({ data: new Float32Array(), dynamic: !0 });
3405
3405
  super({
3406
3406
  vertexAttributes: {
3407
- position: new $({
3407
+ position: new V({
3408
3408
  buffer: e,
3409
3409
  size: 2,
3410
3410
  normalized: !1,
3411
3411
  type: "float"
3412
3412
  }),
3413
- uv: new $({
3413
+ uv: new V({
3414
3414
  buffer: t,
3415
3415
  size: 2,
3416
3416
  normalized: !1,
3417
3417
  type: "float"
3418
3418
  })
3419
3419
  },
3420
- indexBuffer: new nt({
3420
+ indexBuffer: new lt({
3421
3421
  data: new Uint16Array(),
3422
3422
  dynamic: !0
3423
3423
  })
3424
3424
  }), this.positionBuffer = e, this.uvBuffer = t;
3425
3425
  }
3426
3426
  }
3427
- var lo = Object.defineProperty, Ne = (r, e, t, s) => {
3427
+ var lo = Object.defineProperty, ze = (r, e, t, s) => {
3428
3428
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3429
3429
  (a = r[o]) && (i = a(e, t, i) || i);
3430
3430
  return i && lo(e, t, i), i;
@@ -3497,7 +3497,7 @@ class T extends _e {
3497
3497
  }
3498
3498
  }
3499
3499
  _updatePOT() {
3500
- this._isPowerOfTwo = gr(this.realWidth) && gr(this.realHeight), this.requestUpload();
3500
+ this._isPowerOfTwo = vr(this.realWidth) && vr(this.realHeight), this.requestUpload();
3501
3501
  }
3502
3502
  updateSize() {
3503
3503
  const e = this.source;
@@ -3526,22 +3526,22 @@ class T extends _e {
3526
3526
  fi && this.source instanceof ImageBitmap && this.source.close();
3527
3527
  }
3528
3528
  }
3529
- Ne([
3529
+ ze([
3530
3530
  u({ internal: !0 })
3531
3531
  ], T.prototype, "source");
3532
- Ne([
3532
+ ze([
3533
3533
  u({ fallback: 0 })
3534
3534
  ], T.prototype, "width");
3535
- Ne([
3535
+ ze([
3536
3536
  u({ fallback: 0 })
3537
3537
  ], T.prototype, "height");
3538
- Ne([
3538
+ ze([
3539
3539
  u({ fallback: "linear" })
3540
3540
  ], T.prototype, "filterMode");
3541
- Ne([
3541
+ ze([
3542
3542
  u({ fallback: "clamp_to_edge" })
3543
3543
  ], T.prototype, "wrapMode");
3544
- Ne([
3544
+ ze([
3545
3545
  u({ fallback: 1 })
3546
3546
  ], T.prototype, "pixelRatio");
3547
3547
  class $t extends _e {
@@ -3575,7 +3575,7 @@ var ho = Object.defineProperty, co = (r, e, t, s) => {
3575
3575
  (a = r[o]) && (i = a(e, t, i) || i);
3576
3576
  return i && ho(e, t, i), i;
3577
3577
  };
3578
- class Jt extends T {
3578
+ class Qt extends T {
3579
3579
  constructor(e = document.createElement("canvas")) {
3580
3580
  super(e);
3581
3581
  }
@@ -3593,7 +3593,7 @@ class Jt extends T {
3593
3593
  }
3594
3594
  co([
3595
3595
  u({ fallback: 2 })
3596
- ], Jt.prototype, "pixelRatio");
3596
+ ], Qt.prototype, "pixelRatio");
3597
3597
  class Al extends T {
3598
3598
  static _cached = /* @__PURE__ */ new Map();
3599
3599
  static get(e) {
@@ -3614,7 +3614,7 @@ class Al extends T {
3614
3614
  });
3615
3615
  }
3616
3616
  }
3617
- class kt extends T {
3617
+ class Ut extends T {
3618
3618
  static test(e) {
3619
3619
  return Fs(e);
3620
3620
  }
@@ -3625,7 +3625,7 @@ class kt extends T {
3625
3625
  const o = i.getContext("2d");
3626
3626
  if (!o)
3627
3627
  throw new Error("Failed to parse linear gradient, get canvas context is null.");
3628
- const { angle: a = 0, stops: n } = e, h = t, l = s, c = h / 2, d = l / 2, f = (a + 90) * Math.PI / 180, _ = Math.sin(f), p = -Math.cos(f), m = Math.abs(h * Math.sin(f)) + Math.abs(l * Math.cos(f)), v = c - _ * (m / 2), y = d - p * (m / 2), P = c + _ * (m / 2), R = d + p * (m / 2), A = o.createLinearGradient(v, y, P, R);
3628
+ const { angle: a = 0, stops: n } = e, h = t, l = s, c = h / 2, d = l / 2, f = (a + 90) * Math.PI / 180, _ = Math.sin(f), p = -Math.cos(f), m = Math.abs(h * Math.sin(f)) + Math.abs(l * Math.cos(f)), v = c - _ * (m / 2), y = d - p * (m / 2), P = c + _ * (m / 2), O = d + p * (m / 2), A = o.createLinearGradient(v, y, P, O);
3629
3629
  for (const G of n) A.addColorStop(G.offset, G.color);
3630
3630
  o.fillStyle = A, o.fillRect(0, 0, h, l);
3631
3631
  const L = o.getImageData(0, 0, i.width, i.height);
@@ -3637,7 +3637,7 @@ class kt extends T {
3637
3637
  }
3638
3638
  constructor(e, t, s) {
3639
3639
  super(
3640
- kt.linearGradient(e, t, s)
3640
+ Ut.linearGradient(e, t, s)
3641
3641
  );
3642
3642
  }
3643
3643
  }
@@ -3699,7 +3699,7 @@ class Rl extends T {
3699
3699
  return this.genBitmap(), !1;
3700
3700
  } else {
3701
3701
  const s = this.source;
3702
- if (Ot && s instanceof HTMLImageElement && (!s.complete || s.naturalWidth === 0))
3702
+ if (Mt && s instanceof HTMLImageElement && (!s.complete || s.naturalWidth === 0))
3703
3703
  return !1;
3704
3704
  }
3705
3705
  const t = super.upload(e);
@@ -3718,13 +3718,13 @@ class es extends T {
3718
3718
  _updateProperty(e, t, s) {
3719
3719
  switch (e) {
3720
3720
  case "width":
3721
- this.source.width = Math.round(this.width * this.pixelRatio);
3721
+ this.source.width = this.realWidth;
3722
3722
  break;
3723
3723
  case "height":
3724
- this.source.height = Math.round(this.height * this.pixelRatio);
3724
+ this.source.height = this.realHeight;
3725
3725
  break;
3726
3726
  case "pixelRatio":
3727
- this.source.width = Math.round(this.width * this.pixelRatio), this.source.height = Math.round(this.height * this.pixelRatio);
3727
+ this.source.width = this.realWidth, this.source.height = this.realHeight;
3728
3728
  break;
3729
3729
  }
3730
3730
  super._updateProperty(e, t, s);
@@ -3746,7 +3746,7 @@ function po(r) {
3746
3746
  playsinline: !!(r?.playsinline ?? !0)
3747
3747
  };
3748
3748
  }
3749
- const Qt = class rs extends T {
3749
+ const er = class rs extends T {
3750
3750
  static mimeTypes = new Map(Object.entries({
3751
3751
  ogv: "video/ogg",
3752
3752
  mov: "video/quicktime",
@@ -3857,15 +3857,15 @@ const Qt = class rs extends T {
3857
3857
  };
3858
3858
  ts([
3859
3859
  u({ internal: !0, fallback: !0 })
3860
- ], Qt.prototype, "autoUpdate");
3860
+ ], er.prototype, "autoUpdate");
3861
3861
  ts([
3862
3862
  u({ internal: !0, fallback: 0 })
3863
- ], Qt.prototype, "fps");
3864
- let _o = Qt;
3865
- class xr extends es {
3863
+ ], er.prototype, "fps");
3864
+ let _o = er;
3865
+ class Je extends es {
3866
3866
  //
3867
3867
  }
3868
- class mo extends bt {
3868
+ class mo extends yt {
3869
3869
  fillStyle;
3870
3870
  strokeStyle;
3871
3871
  strokeAlignment;
@@ -3894,14 +3894,14 @@ class mo extends bt {
3894
3894
  t = this.style.stroke;
3895
3895
  break;
3896
3896
  case "object":
3897
- _r(this.style.stroke) && (t = this.style.stroke.color);
3897
+ mr(this.style.stroke) && (t = this.style.stroke.color);
3898
3898
  break;
3899
3899
  }
3900
3900
  this._draws.push({
3901
3901
  ...e,
3902
3902
  ...this._parseDrawStyle(t),
3903
3903
  type: "stroke",
3904
- path: new bt(this),
3904
+ path: new yt(this),
3905
3905
  uvTransform: this.uvTransform,
3906
3906
  vertTransform: this.vertTransform,
3907
3907
  lineStyle: {
@@ -3929,7 +3929,7 @@ class mo extends bt {
3929
3929
  t = this.style.fill;
3930
3930
  break;
3931
3931
  case "object":
3932
- _r(this.style.fill) && (t = this.style.fill.color);
3932
+ mr(this.style.fill) && (t = this.style.fill.color);
3933
3933
  break;
3934
3934
  }
3935
3935
  this._draws.push({
@@ -3938,7 +3938,7 @@ class mo extends bt {
3938
3938
  ...e,
3939
3939
  ...this._parseDrawStyle(t),
3940
3940
  type: "fill",
3941
- path: new bt(this)
3941
+ path: new yt(this)
3942
3942
  }), this.resetStatus();
3943
3943
  }
3944
3944
  copy(e) {
@@ -4429,15 +4429,15 @@ let M = class extends pe {
4429
4429
  static parse(r) {
4430
4430
  if (Array.isArray(r))
4431
4431
  return r.map((n) => this.parse(n));
4432
- const { meta: e = {}, children: t, ...s } = r, { inCanvasIs: i = "Node" } = e, o = Xt.get(i) ?? M, a = new o({ ...s, meta: e });
4432
+ const { meta: e = {}, children: t, ...s } = r, { inCanvasIs: i = "Node" } = e, o = Ht.get(i) ?? M, a = new o({ ...s, meta: e });
4433
4433
  return t?.forEach((n) => a.appendChild(this.parse(n))), a;
4434
4434
  }
4435
4435
  };
4436
4436
  ne([
4437
- u({ fallback: zr() })
4437
+ u({ fallback: Nr() })
4438
4438
  ], M.prototype, "id", 2);
4439
4439
  ne([
4440
- u({ fallback: zr() })
4440
+ u({ fallback: Nr() })
4441
4441
  ], M.prototype, "name", 2);
4442
4442
  ne([
4443
4443
  u({ internal: !0, fallback: "inherit" })
@@ -4530,7 +4530,7 @@ Le([
4530
4530
  W = Le([
4531
4531
  g("TimelineNode")
4532
4532
  ], W);
4533
- var To = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, lt = (r, e, t, s) => {
4533
+ var To = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, ht = (r, e, t, s) => {
4534
4534
  for (var i = s > 1 ? void 0 : s ? Eo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4535
4535
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4536
4536
  return s && i && To(e, t, i), i;
@@ -4633,31 +4633,46 @@ let Pe = class extends W {
4633
4633
  let e = this._relayouting, t = this._repainting, s;
4634
4634
  r && (this._originalBatchables = this._redraw(), e = !0), e && (this._layoutedBatchables = this._relayout(this._originalBatchables), t = !0), t && (s = this._repaint(this._layoutedBatchables)), r && this._resetContext && this.context.reset(), s && (this._batchables = s, this._redrawing = !1, this._relayouting = !1, this._repainting = !1);
4635
4635
  }
4636
+ _handleViewportTexture(r) {
4637
+ const e = this.tree?.getPreviousViewport();
4638
+ if (e && "getRect" in this) {
4639
+ const { a: t, d: s, tx: i, ty: o } = e.canvasTransform.toObject(), { vertices: a } = r, n = new R().scale(1 / e.width * t, -1 / e.height * s).translate(
4640
+ - -i / e.width,
4641
+ 1 + -o / e.height
4642
+ ), h = new Float32Array(a.length);
4643
+ for (let l = a.length, c = 0; c < l; c += 2) {
4644
+ const { x: d, y: f } = n.apply({ x: a[c], y: a[c + 1] });
4645
+ h[c] = d, h[c + 1] = f;
4646
+ }
4647
+ return r.uvs = h, e.texture;
4648
+ }
4649
+ }
4636
4650
  _render(r) {
4637
4651
  this._updateBatchables();
4638
4652
  const e = this._tree?.pixelate;
4639
4653
  this._batchables.forEach((t) => {
4640
- t.texture?.upload(r), r.batch2D.render({
4654
+ let s = t.texture;
4655
+ s instanceof Je ? s = this._handleViewportTexture(t) : s?.upload(r), r.batch2D.render({
4641
4656
  ...t,
4642
4657
  size: e ? t.size : void 0,
4643
- texture: t.texture?._glTexture(r)
4658
+ texture: s?._glTexture(r)
4644
4659
  });
4645
4660
  }), super._render(r);
4646
4661
  }
4647
4662
  };
4648
- lt([
4663
+ ht([
4649
4664
  u()
4650
4665
  ], Pe.prototype, "modulate", 2);
4651
- lt([
4666
+ ht([
4652
4667
  u()
4653
4668
  ], Pe.prototype, "blendMode", 2);
4654
- lt([
4669
+ ht([
4655
4670
  u({ internal: !0, fallback: !0 })
4656
4671
  ], Pe.prototype, "visible", 2);
4657
- lt([
4672
+ ht([
4658
4673
  u({ internal: !0, fallback: 1 })
4659
4674
  ], Pe.prototype, "opacity", 2);
4660
- Pe = lt([
4675
+ Pe = ht([
4661
4676
  g("CanvasItem")
4662
4677
  ], Pe);
4663
4678
  var So = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, Fe = (r, e, t, s) => {
@@ -4670,11 +4685,11 @@ let j = class extends M {
4670
4685
  super(), this.flipY = r, this.projection.flipY(r);
4671
4686
  }
4672
4687
  projection = new Bi();
4673
- canvasTransform = new O();
4688
+ canvasTransform = new R();
4674
4689
  _framebufferIndex = 0;
4675
4690
  _framebuffers = [
4676
- { texture: new xr(), needsUpload: !1 },
4677
- { texture: new xr(), needsUpload: !1 }
4691
+ { texture: new Je(), needsUpload: !1 },
4692
+ { texture: new Je(), needsUpload: !1 }
4678
4693
  ];
4679
4694
  get valid() {
4680
4695
  return !!(this.width && this.height);
@@ -4750,7 +4765,7 @@ let j = class extends M {
4750
4765
  return !1;
4751
4766
  }
4752
4767
  activateWithCopy(r, e) {
4753
- this.resize(e.width, e.height), this.activate(r) && (r.clear(), e.texture.activate(r, 0), b.draw(r, xt.instance, {
4768
+ this.resize(e.width, e.height), this.activate(r) && (r.clear(), e.texture.activate(r, 0), b.draw(r, wt.instance, {
4754
4769
  sampler: 0
4755
4770
  }));
4756
4771
  }
@@ -4786,7 +4801,7 @@ Fe([
4786
4801
  j = Fe([
4787
4802
  g("Viewport")
4788
4803
  ], j);
4789
- var Ao = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, ht = (r, e, t, s) => {
4804
+ var Ao = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, ct = (r, e, t, s) => {
4790
4805
  for (var i = s > 1 ? void 0 : s ? Ro(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4791
4806
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4792
4807
  return s && i && Ao(e, t, i), i;
@@ -4811,12 +4826,12 @@ let x = class extends W {
4811
4826
  _updateProperty(r, e, t) {
4812
4827
  switch (super._updateProperty(r, e, t), r) {
4813
4828
  case "glsl": {
4814
- const s = new yt(e);
4829
+ const s = new xt(e);
4815
4830
  !this.effectMode && s.has.transition && (this.effectMode = "transition"), this.material = s;
4816
4831
  break;
4817
4832
  }
4818
4833
  case "glslSrc": {
4819
- e ? z.text.load(e).then((s) => this.glsl = s) : this.glsl = "";
4834
+ e ? N.text.load(e).then((s) => this.glsl = s) : this.glsl = "";
4820
4835
  break;
4821
4836
  }
4822
4837
  }
@@ -4950,19 +4965,19 @@ let x = class extends W {
4950
4965
  }));
4951
4966
  }
4952
4967
  };
4953
- ht([
4968
+ ct([
4954
4969
  u({ internal: !0 })
4955
4970
  ], x.prototype, "material", 2);
4956
- ht([
4971
+ ct([
4957
4972
  u()
4958
4973
  ], x.prototype, "effectMode", 2);
4959
- ht([
4974
+ ct([
4960
4975
  u()
4961
4976
  ], x.prototype, "glsl", 2);
4962
- ht([
4977
+ ct([
4963
4978
  u()
4964
4979
  ], x.prototype, "glslSrc", 2);
4965
- x = ht([
4980
+ x = ct([
4966
4981
  g("Effect")
4967
4982
  ], x);
4968
4983
  class Oo {
@@ -4988,7 +5003,7 @@ class Oo {
4988
5003
  }), this.calls = [];
4989
5004
  }
4990
5005
  }
4991
- var Mo = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, $e = (r, e, t, s) => {
5006
+ var Mo = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, Ve = (r, e, t, s) => {
4992
5007
  for (var i = s > 1 ? void 0 : s ? ko(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4993
5008
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4994
5009
  return s && i && Mo(e, t, i), i;
@@ -5024,22 +5039,22 @@ let oe = class extends M {
5024
5039
  super._process(r), this.paused || this.addTime(r);
5025
5040
  }
5026
5041
  };
5027
- $e([
5042
+ Ve([
5028
5043
  u({ fallback: 0 })
5029
5044
  ], oe.prototype, "startTime", 2);
5030
- $e([
5045
+ Ve([
5031
5046
  u({ fallback: 0 })
5032
5047
  ], oe.prototype, "currentTime", 2);
5033
- $e([
5048
+ Ve([
5034
5049
  u({ fallback: Number.MAX_SAFE_INTEGER })
5035
5050
  ], oe.prototype, "endTime", 2);
5036
- $e([
5051
+ Ve([
5037
5052
  u({ fallback: !1 })
5038
5053
  ], oe.prototype, "loop", 2);
5039
- $e([
5054
+ Ve([
5040
5055
  u({ fallback: !1 })
5041
5056
  ], oe.prototype, "paused", 2);
5042
- oe = $e([
5057
+ oe = Ve([
5043
5058
  g("Timeline")
5044
5059
  ], oe);
5045
5060
  var Uo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ss = (r, e, t, s) => {
@@ -5047,7 +5062,7 @@ var Uo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ss = (r, e
5047
5062
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5048
5063
  return s && i && Uo(e, t, i), i;
5049
5064
  };
5050
- let wt = class extends j {
5065
+ let Pt = class extends j {
5051
5066
  finish(r) {
5052
5067
  r.framebuffer.finishRenderPass(
5053
5068
  this._glFramebuffer(r)
@@ -5059,26 +5074,30 @@ let wt = class extends j {
5059
5074
  };
5060
5075
  ss([
5061
5076
  u({ fallback: !1 })
5062
- ], wt.prototype, "msaa", 2);
5063
- wt = ss([
5077
+ ], Pt.prototype, "msaa", 2);
5078
+ Pt = ss([
5064
5079
  g("Window")
5065
- ], wt);
5080
+ ], Pt);
5066
5081
  var Io = Object.defineProperty, Re = (r, e, t, s) => {
5067
5082
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
5068
5083
  (a = r[o]) && (i = a(e, t, i) || i);
5069
5084
  return i && Io(e, t, i), i;
5070
5085
  };
5071
- class me extends Yt {
5086
+ class me extends Kt {
5072
5087
  input = new Oi();
5073
5088
  renderStack = new Oo();
5074
- root = new wt(!0).setTree(this);
5089
+ root = new Pt(!0).setTree(this);
5075
5090
  _backgroundColor = new J();
5091
+ _previousViewport;
5076
5092
  _currentViewport;
5077
5093
  getCurrentViewport() {
5078
5094
  return this._currentViewport;
5079
5095
  }
5096
+ getPreviousViewport() {
5097
+ return this._previousViewport;
5098
+ }
5080
5099
  setCurrentViewport(e) {
5081
- this._currentViewport = e;
5100
+ this._currentViewport && !this._currentViewport.equal(e) && (this._previousViewport = this._currentViewport), this._currentViewport = e;
5082
5101
  }
5083
5102
  constructor(e) {
5084
5103
  super(), this.setProperties(e);
@@ -5137,7 +5156,7 @@ Re([
5137
5156
  Re([
5138
5157
  u({ internal: !0, default: () => new oe() })
5139
5158
  ], me.prototype, "timeline");
5140
- var Bo = Object.getOwnPropertyDescriptor, zo = (r, e, t, s) => {
5159
+ var Bo = Object.getOwnPropertyDescriptor, No = (r, e, t, s) => {
5141
5160
  for (var i = s > 1 ? void 0 : s ? Bo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5142
5161
  (a = r[o]) && (i = a(i) || i);
5143
5162
  return i;
@@ -5147,29 +5166,29 @@ let Ue = class extends x {
5147
5166
  super(), this.setProperties(r).append(e);
5148
5167
  }
5149
5168
  };
5150
- Ue = zo([
5169
+ Ue = No([
5151
5170
  g("Transition", {
5152
5171
  effectMode: "transition",
5153
5172
  processMode: "pausable",
5154
5173
  duration: 2e3
5155
5174
  })
5156
5175
  ], Ue);
5157
- var No = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, er = (r, e, t, s) => {
5176
+ var zo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, tr = (r, e, t, s) => {
5158
5177
  for (var i = s > 1 ? void 0 : s ? Lo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5159
5178
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5160
- return s && i && No(e, t, i), i;
5179
+ return s && i && zo(e, t, i), i;
5161
5180
  };
5162
5181
  let Te = class extends Pe {
5163
5182
  position = new C().on("update", () => this.updateGlobalTransform());
5164
5183
  scale = new C(1, 1).on("update", () => this.updateGlobalTransform());
5165
5184
  skew = new C().on("update", () => this.updateGlobalTransform());
5166
5185
  pivot = new C().on("update", () => this.updateGlobalTransform());
5167
- extraTransform = new O();
5168
- transform = new O();
5186
+ extraTransform = new R();
5187
+ transform = new R();
5169
5188
  globalPosition = new C();
5170
5189
  globalScale = new C();
5171
5190
  globalSkew = new C();
5172
- globalTransform = new O();
5191
+ globalTransform = new R();
5173
5192
  _parentTransformDirtyId;
5174
5193
  constructor(r, e = []) {
5175
5194
  super(), this.setProperties(r).append(e);
@@ -5232,22 +5251,22 @@ let Te = class extends Pe {
5232
5251
  return this.globalTransform.apply(r, e);
5233
5252
  }
5234
5253
  };
5235
- er([
5254
+ tr([
5236
5255
  u({ internal: !0, fallback: 0 })
5237
5256
  ], Te.prototype, "rotation", 2);
5238
- er([
5257
+ tr([
5239
5258
  u({ internal: !0, fallback: 0 })
5240
5259
  ], Te.prototype, "globalRotation", 2);
5241
- Te = er([
5260
+ Te = tr([
5242
5261
  g("Node2D")
5243
5262
  ], Te);
5244
- var Fo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, tr = (r, e, t, s) => {
5245
- for (var i = s > 1 ? void 0 : s ? $o(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5263
+ var Fo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, rr = (r, e, t, s) => {
5264
+ for (var i = s > 1 ? void 0 : s ? Vo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5246
5265
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5247
5266
  return s && i && Fo(e, t, i), i;
5248
5267
  };
5249
- let Pt = class extends Te {
5250
- canvasTransform = new O();
5268
+ let Tt = class extends Te {
5269
+ canvasTransform = new R();
5251
5270
  _screenOffset = { x: 0, y: 0 };
5252
5271
  _zoom = new C(1, 1).on("update", () => this.updateTransform());
5253
5272
  get zoom() {
@@ -5359,18 +5378,18 @@ let Pt = class extends Te {
5359
5378
  };
5360
5379
  }
5361
5380
  };
5362
- tr([
5381
+ rr([
5363
5382
  u({ internal: !0, fallback: !1 })
5364
- ], Pt.prototype, "spaceKey", 2);
5365
- tr([
5383
+ ], Tt.prototype, "spaceKey", 2);
5384
+ rr([
5366
5385
  u({ internal: !0, fallback: !1 })
5367
- ], Pt.prototype, "grabbing", 2);
5368
- Pt = tr([
5386
+ ], Tt.prototype, "grabbing", 2);
5387
+ Tt = rr([
5369
5388
  g("Camera2D", {
5370
5389
  processMode: "disabled",
5371
5390
  renderMode: "disabled"
5372
5391
  })
5373
- ], Pt);
5392
+ ], Tt);
5374
5393
  const Pr = {
5375
5394
  brightness: 1,
5376
5395
  contrast: 1,
@@ -5385,7 +5404,7 @@ function Ol(r) {
5385
5404
  const e = new Hr();
5386
5405
  if (r === "none")
5387
5406
  return e;
5388
- const t = Rt(r).reduce((s, { name: i, args: o }) => (s[i] = o[0].normalizedIntValue, s), {});
5407
+ const t = Ot(r).reduce((s, { name: i, args: o }) => (s[i] = o[0].normalizedIntValue, s), {});
5389
5408
  Object.keys(Pr).forEach((s) => {
5390
5409
  t[s] = t[s] ?? Pr[s];
5391
5410
  });
@@ -5420,8 +5439,8 @@ function Ol(r) {
5420
5439
  }
5421
5440
  return e;
5422
5441
  }
5423
- function Vo(r, e, t, s = new O()) {
5424
- return r = !r || r === "none" ? "" : r, Rt(r, { width: e, height: t }).reverse().forEach(({ name: i, args: o }) => {
5442
+ function $o(r, e, t, s = new R()) {
5443
+ return r = !r || r === "none" ? "" : r, Ot(r, { width: e, height: t }).reverse().forEach(({ name: i, args: o }) => {
5425
5444
  const a = o.map((n) => n.normalizedIntValue);
5426
5445
  switch (i) {
5427
5446
  case "translate":
@@ -5512,13 +5531,13 @@ var is = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, jo = (r, e
5512
5531
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5513
5532
  return s && i && is(e, t, i), i;
5514
5533
  }, qo = (r, e, t) => jo(r, e + "", t);
5515
- let V = class extends x {
5534
+ let $ = class extends x {
5516
5535
  constructor(r, e = []) {
5517
5536
  super(), this.setProperties(r).append(e);
5518
5537
  }
5519
5538
  apply(r, e) {
5520
5539
  e.redraw(r, () => {
5521
- b.draw(r, V.material, {
5540
+ b.draw(r, $.material, {
5522
5541
  sampler: 0,
5523
5542
  saturation: this.saturation,
5524
5543
  contrast: this.contrast,
@@ -5532,7 +5551,7 @@ let V = class extends x {
5532
5551
  });
5533
5552
  }
5534
5553
  };
5535
- qo(V, "material", new w({
5554
+ qo($, "material", new w({
5536
5555
  vert: `precision mediump float;
5537
5556
  attribute vec2 position;
5538
5557
  attribute vec2 uv;
@@ -5569,37 +5588,37 @@ void main(void) {
5569
5588
  }));
5570
5589
  le([
5571
5590
  u({ fallback: 1 })
5572
- ], V.prototype, "saturation", 2);
5591
+ ], $.prototype, "saturation", 2);
5573
5592
  le([
5574
5593
  u({ fallback: 1 })
5575
- ], V.prototype, "contrast", 2);
5594
+ ], $.prototype, "contrast", 2);
5576
5595
  le([
5577
5596
  u({ fallback: 1 })
5578
- ], V.prototype, "brightness", 2);
5597
+ ], $.prototype, "brightness", 2);
5579
5598
  le([
5580
5599
  u({ fallback: 1 })
5581
- ], V.prototype, "red", 2);
5600
+ ], $.prototype, "red", 2);
5582
5601
  le([
5583
5602
  u({ fallback: 1 })
5584
- ], V.prototype, "green", 2);
5603
+ ], $.prototype, "green", 2);
5585
5604
  le([
5586
5605
  u({ fallback: 1 })
5587
- ], V.prototype, "blue", 2);
5606
+ ], $.prototype, "blue", 2);
5588
5607
  le([
5589
5608
  u({ fallback: 1 })
5590
- ], V.prototype, "alpha", 2);
5609
+ ], $.prototype, "alpha", 2);
5591
5610
  le([
5592
5611
  u({ fallback: 1 })
5593
- ], V.prototype, "gamma", 2);
5594
- V = le([
5612
+ ], $.prototype, "gamma", 2);
5613
+ $ = le([
5595
5614
  g("ColorAdjustEffect")
5596
- ], V);
5615
+ ], $);
5597
5616
  var os = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Ho = (r, e, t) => e in r ? os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, as = (r, e, t, s) => {
5598
5617
  for (var i = s > 1 ? void 0 : s ? Xo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5599
5618
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5600
5619
  return s && i && os(e, t, i), i;
5601
5620
  }, Yo = (r, e, t) => Ho(r, e + "", t);
5602
- let Je = class extends x {
5621
+ let Qe = class extends x {
5603
5622
  _colorMatrix = new Hr();
5604
5623
  constructor(r, e = []) {
5605
5624
  super(), this.setProperties(r).append(e);
@@ -5607,7 +5626,7 @@ let Je = class extends x {
5607
5626
  apply(r, e) {
5608
5627
  if (!this.filter)
5609
5628
  return;
5610
- const t = Rt(this.filter), s = this._colorMatrix.identity();
5629
+ const t = Ot(this.filter), s = this._colorMatrix.identity();
5611
5630
  t.forEach(({ name: i, args: o }) => {
5612
5631
  const a = o.map((n) => n.normalizedIntValue);
5613
5632
  switch (i) {
@@ -5638,14 +5657,14 @@ let Je = class extends x {
5638
5657
  break;
5639
5658
  }
5640
5659
  }), e.redraw(r, () => {
5641
- b.draw(r, Je.material, {
5660
+ b.draw(r, Qe.material, {
5642
5661
  sampler: 0,
5643
5662
  m: s.toArray()
5644
5663
  });
5645
5664
  });
5646
5665
  }
5647
5666
  };
5648
- Yo(Je, "material", new w({
5667
+ Yo(Qe, "material", new w({
5649
5668
  vert: `precision mediump float;
5650
5669
  attribute vec2 position;
5651
5670
  attribute vec2 uv;
@@ -5674,11 +5693,11 @@ void main(void) {
5674
5693
  }));
5675
5694
  as([
5676
5695
  u()
5677
- ], Je.prototype, "filter", 2);
5678
- Je = as([
5696
+ ], Qe.prototype, "filter", 2);
5697
+ Qe = as([
5679
5698
  g("ColorFilterEffect")
5680
- ], Je);
5681
- var ns = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Zo = (r, e, t) => e in r ? ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, rr = (r, e, t, s) => {
5699
+ ], Qe);
5700
+ var ns = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Zo = (r, e, t) => e in r ? ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, sr = (r, e, t, s) => {
5682
5701
  for (var i = s > 1 ? void 0 : s ? Ko(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5683
5702
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5684
5703
  return s && i && ns(e, t, i), i;
@@ -5752,16 +5771,16 @@ void main(void) {
5752
5771
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
5753
5772
  }`
5754
5773
  }));
5755
- rr([
5774
+ sr([
5756
5775
  u({ default: () => [] })
5757
5776
  ], De.prototype, "colors", 2);
5758
- rr([
5777
+ sr([
5759
5778
  u({ fallback: 0.5 })
5760
5779
  ], De.prototype, "alpha", 2);
5761
- De = rr([
5780
+ De = sr([
5762
5781
  g("ColorOverlayEffect")
5763
5782
  ], De);
5764
- var ls = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ea = (r, e, t) => e in r ? ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, sr = (r, e, t, s) => {
5783
+ var ls = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ea = (r, e, t) => e in r ? ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ir = (r, e, t, s) => {
5765
5784
  for (var i = s > 1 ? void 0 : s ? Qo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5766
5785
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5767
5786
  return s && i && ls(e, t, i), i;
@@ -5819,16 +5838,16 @@ void main(void) {
5819
5838
  gl_FragColor = color;
5820
5839
  }`
5821
5840
  }));
5822
- sr([
5841
+ ir([
5823
5842
  u({ default: () => [] })
5824
5843
  ], Ie.prototype, "colors", 2);
5825
- sr([
5844
+ ir([
5826
5845
  u({ fallback: 0.5 })
5827
5846
  ], Ie.prototype, "epsilon", 2);
5828
- Ie = sr([
5847
+ Ie = ir([
5829
5848
  g("ColorRemoveEffect")
5830
5849
  ], Ie);
5831
- var hs = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, sa = (r, e, t) => e in r ? hs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ir = (r, e, t, s) => {
5850
+ var hs = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, sa = (r, e, t) => e in r ? hs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, or = (r, e, t, s) => {
5832
5851
  for (var i = s > 1 ? void 0 : s ? ra(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5833
5852
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5834
5853
  return s && i && hs(e, t, i), i;
@@ -5907,13 +5926,13 @@ void main(void) {
5907
5926
  }
5908
5927
  }`
5909
5928
  }));
5910
- ir([
5929
+ or([
5911
5930
  u({ default: () => [] })
5912
5931
  ], Be.prototype, "colors", 2);
5913
- ir([
5932
+ or([
5914
5933
  u({ fallback: 0.05 })
5915
5934
  ], Be.prototype, "epsilon", 2);
5916
- Be = ir([
5935
+ Be = or([
5917
5936
  g("ColorReplaceEffect")
5918
5937
  ], Be);
5919
5938
  const oa = `precision highp float;
@@ -6085,7 +6104,7 @@ let q = class extends x {
6085
6104
  }
6086
6105
  }
6087
6106
  async _loadWatermark(r) {
6088
- r ? this._watermark = await z.texture.load(r) : this._watermark = void 0;
6107
+ r ? this._watermark = await N.texture.load(r) : this._watermark = void 0;
6089
6108
  }
6090
6109
  _checkerboardStyleMap = {
6091
6110
  grid: 1,
@@ -6162,7 +6181,7 @@ ge([
6162
6181
  q = ge([
6163
6182
  g("DrawboardEffect")
6164
6183
  ], q);
6165
- var us = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ca = (r, e, t) => e in r ? us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, or = (r, e, t, s) => {
6184
+ var us = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ca = (r, e, t) => e in r ? us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ar = (r, e, t, s) => {
6166
6185
  for (var i = s > 1 ? void 0 : s ? ha(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6167
6186
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6168
6187
  return s && i && us(e, t, i), i;
@@ -6264,16 +6283,16 @@ void main(void) {
6264
6283
  }`,
6265
6284
  frag: fs
6266
6285
  }));
6267
- or([
6286
+ ar([
6268
6287
  u({ fallback: 4 })
6269
6288
  ], ae.prototype, "strength", 2);
6270
- or([
6289
+ ar([
6271
6290
  u({ fallback: 3 })
6272
6291
  ], ae.prototype, "quality", 2);
6273
- ae = or([
6292
+ ae = ar([
6274
6293
  g("GaussianBlurEffect")
6275
6294
  ], ae);
6276
- var ps = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, da = (r, e, t) => e in r ? ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ve = (r, e, t, s) => {
6295
+ var ps = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, da = (r, e, t) => e in r ? ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, $e = (r, e, t, s) => {
6277
6296
  for (var i = s > 1 ? void 0 : s ? ua(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6278
6297
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6279
6298
  return s && i && ps(e, t, i), i;
@@ -6295,9 +6314,9 @@ let Q = class extends x {
6295
6314
  uInputSize: [e.width, e.height, 1 / e.width, 1 / e.height]
6296
6315
  });
6297
6316
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(r, this.viewport3), e.redraw(r, () => {
6298
- this.viewport3.texture.activate(r, 1), b.draw(r, xt.instance, {
6317
+ this.viewport3.texture.activate(r, 1), b.draw(r, wt.instance, {
6299
6318
  sampler: 1
6300
- }), this.shadowOnly || b.draw(r, xt.instance, {
6319
+ }), this.shadowOnly || b.draw(r, wt.instance, {
6301
6320
  sampler: 0
6302
6321
  }), r.texture.unbind(1);
6303
6322
  });
@@ -6327,22 +6346,22 @@ void main(void) {
6327
6346
  gl_FragColor = sample;
6328
6347
  }`
6329
6348
  }));
6330
- Ve([
6349
+ $e([
6331
6350
  u({ fallback: "#000000FF" })
6332
6351
  ], Q.prototype, "color", 2);
6333
- Ve([
6352
+ $e([
6334
6353
  u({ fallback: 4 })
6335
6354
  ], Q.prototype, "blur", 2);
6336
- Ve([
6355
+ $e([
6337
6356
  u({ fallback: 4 })
6338
6357
  ], Q.prototype, "offsetX", 2);
6339
- Ve([
6358
+ $e([
6340
6359
  u({ fallback: 4 })
6341
6360
  ], Q.prototype, "offsetY", 2);
6342
- Ve([
6361
+ $e([
6343
6362
  u({ fallback: !1 })
6344
6363
  ], Q.prototype, "shadowOnly", 2);
6345
- Q = Ve([
6364
+ Q = $e([
6346
6365
  g("DropShadowEffect")
6347
6366
  ], Q);
6348
6367
  var _s = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, _a = (r, e, t) => e in r ? _s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ms = (r, e, t, s) => {
@@ -6350,13 +6369,13 @@ var _s = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, _a = (r, e
6350
6369
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6351
6370
  return s && i && _s(e, t, i), i;
6352
6371
  }, ma = (r, e, t) => _a(r, e + "", t);
6353
- let Qe = class extends x {
6372
+ let et = class extends x {
6354
6373
  constructor(r, e = []) {
6355
6374
  super(), this.setProperties(r).append(e);
6356
6375
  }
6357
6376
  apply(r, e) {
6358
6377
  e.redraw(r, () => {
6359
- b.draw(r, Qe.material, {
6378
+ b.draw(r, et.material, {
6360
6379
  sampler: 0,
6361
6380
  strength: this.strength,
6362
6381
  inputSize: [e.width, e.height, 1 / e.width, 1 / e.height]
@@ -6364,7 +6383,7 @@ let Qe = class extends x {
6364
6383
  });
6365
6384
  }
6366
6385
  };
6367
- ma(Qe, "material", new w({
6386
+ ma(et, "material", new w({
6368
6387
  vert: `precision mediump float;
6369
6388
  attribute vec2 position;
6370
6389
  attribute vec2 uv;
@@ -6392,16 +6411,16 @@ void main(void) {
6392
6411
  }));
6393
6412
  ms([
6394
6413
  u({ fallback: 5 })
6395
- ], Qe.prototype, "strength", 2);
6396
- Qe = ms([
6414
+ ], et.prototype, "strength", 2);
6415
+ et = ms([
6397
6416
  g("EmbossEffect")
6398
- ], Qe);
6417
+ ], et);
6399
6418
  var gs = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, va = (r, e, t) => e in r ? gs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ee = (r, e, t, s) => {
6400
6419
  for (var i = s > 1 ? void 0 : s ? ga(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6401
6420
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6402
6421
  return s && i && gs(e, t, i), i;
6403
6422
  }, ba = (r, e, t) => va(r, e + "", t);
6404
- let N = class extends x {
6423
+ let z = class extends x {
6405
6424
  _canvas;
6406
6425
  _texture;
6407
6426
  _sizes;
@@ -6425,7 +6444,7 @@ let N = class extends x {
6425
6444
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6426
6445
  const t = e.width, s = e.height, i = this.direction * (Math.PI / 180), o = Math.sin(i), a = Math.cos(i);
6427
6446
  e.redraw(r, () => {
6428
- this._texture.activate(r, 1), b.draw(r, N.material, {
6447
+ this._texture.activate(r, 1), b.draw(r, z.material, {
6429
6448
  sampler: 0,
6430
6449
  filterClamp: [0, 0, 1, 1],
6431
6450
  filterArea: [t, s, 0, 0],
@@ -6444,7 +6463,7 @@ let N = class extends x {
6444
6463
  });
6445
6464
  }
6446
6465
  };
6447
- ba(N, "material", new w({
6466
+ ba(z, "material", new w({
6448
6467
  vert: `precision mediump float;
6449
6468
  attribute vec2 position;
6450
6469
  attribute vec2 uv;
@@ -6551,34 +6570,34 @@ void main(void) {
6551
6570
  }));
6552
6571
  ee([
6553
6572
  u({ fallback: 10 })
6554
- ], N.prototype, "slices", 2);
6573
+ ], z.prototype, "slices", 2);
6555
6574
  ee([
6556
6575
  u({ fallback: 512 })
6557
- ], N.prototype, "sampleSize", 2);
6576
+ ], z.prototype, "sampleSize", 2);
6558
6577
  ee([
6559
6578
  u({ fallback: 100 })
6560
- ], N.prototype, "offset", 2);
6579
+ ], z.prototype, "offset", 2);
6561
6580
  ee([
6562
6581
  u({ fallback: 0 })
6563
- ], N.prototype, "direction", 2);
6582
+ ], z.prototype, "direction", 2);
6564
6583
  ee([
6565
6584
  u({ fallback: 2 })
6566
- ], N.prototype, "fillMode", 2);
6585
+ ], z.prototype, "fillMode", 2);
6567
6586
  ee([
6568
6587
  u({ fallback: 0 })
6569
- ], N.prototype, "seed", 2);
6588
+ ], z.prototype, "seed", 2);
6570
6589
  ee([
6571
6590
  u({ default: () => [2, 2] })
6572
- ], N.prototype, "red", 2);
6591
+ ], z.prototype, "red", 2);
6573
6592
  ee([
6574
6593
  u({ default: () => [-10, 4] })
6575
- ], N.prototype, "green", 2);
6594
+ ], z.prototype, "green", 2);
6576
6595
  ee([
6577
6596
  u({ default: () => [10, -4] })
6578
- ], N.prototype, "blue", 2);
6579
- N = ee([
6597
+ ], z.prototype, "blue", 2);
6598
+ z = ee([
6580
6599
  g("GlitchEffect")
6581
- ], N);
6600
+ ], z);
6582
6601
  var vs = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, xa = (r, e, t) => e in r ? vs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ve = (r, e, t, s) => {
6583
6602
  for (var i = s > 1 ? void 0 : s ? ya(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6584
6603
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
@@ -6780,7 +6799,7 @@ ve([
6780
6799
  X = ve([
6781
6800
  g("GodrayEffect")
6782
6801
  ], X);
6783
- var Ta = Object.defineProperty, Ea = Object.getOwnPropertyDescriptor, Ut = (r, e, t, s) => {
6802
+ var Ta = Object.defineProperty, Ea = Object.getOwnPropertyDescriptor, Dt = (r, e, t, s) => {
6784
6803
  for (var i = s > 1 ? void 0 : s ? Ea(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6785
6804
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6786
6805
  return s && i && Ta(e, t, i), i;
@@ -6811,7 +6830,7 @@ void main(void) {
6811
6830
  color *= 0.25;
6812
6831
  gl_FragColor = color;
6813
6832
  }`;
6814
- let et = class extends x {
6833
+ let tt = class extends x {
6815
6834
  _kernels = [0];
6816
6835
  constructor(r, e = []) {
6817
6836
  super(), this.material = new w({
@@ -6862,19 +6881,19 @@ void main() {
6862
6881
  });
6863
6882
  }
6864
6883
  };
6865
- Ut([
6884
+ Dt([
6866
6885
  u({ fallback: 4 })
6867
- ], et.prototype, "strength", 2);
6868
- Ut([
6886
+ ], tt.prototype, "strength", 2);
6887
+ Dt([
6869
6888
  u({ fallback: 3 })
6870
- ], et.prototype, "quality", 2);
6871
- Ut([
6889
+ ], tt.prototype, "quality", 2);
6890
+ Dt([
6872
6891
  u({ default: () => [1, 1] })
6873
- ], et.prototype, "pixelSize", 2);
6874
- et = Ut([
6892
+ ], tt.prototype, "pixelSize", 2);
6893
+ tt = Dt([
6875
6894
  g("KawaseBlurEffect")
6876
- ], et);
6877
- var bs = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, Ra = (r, e, t) => e in r ? bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ar = (r, e, t, s) => {
6895
+ ], tt);
6896
+ var bs = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, Ra = (r, e, t) => e in r ? bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, nr = (r, e, t, s) => {
6878
6897
  for (var i = s > 1 ? void 0 : s ? Aa(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6879
6898
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6880
6899
  return s && i && bs(e, t, i), i;
@@ -6884,7 +6903,7 @@ let Ee = class extends x {
6884
6903
  super(), this.setProperties(r).append(e);
6885
6904
  }
6886
6905
  async load() {
6887
- this.texture = void 0, this.src && (this.texture = await z.texture.load(this.src));
6906
+ this.texture = void 0, this.src && (this.texture = await N.texture.load(this.src));
6888
6907
  }
6889
6908
  _updateProperty(r, e, t) {
6890
6909
  switch (super._updateProperty(r, e, t), r) {
@@ -6908,8 +6927,7 @@ let Ee = class extends x {
6908
6927
  }
6909
6928
  };
6910
6929
  Oa(Ee, "material", new w({
6911
- vert: `precision mediump float;
6912
- attribute vec2 position;
6930
+ vert: `attribute vec2 position;
6913
6931
  attribute vec2 uv;
6914
6932
  varying vec2 vUv;
6915
6933
  void main() {
@@ -6954,13 +6972,13 @@ void main(void) {
6954
6972
  }
6955
6973
  }`
6956
6974
  }));
6957
- ar([
6975
+ nr([
6958
6976
  u({ internal: !0 })
6959
6977
  ], Ee.prototype, "texture", 2);
6960
- ar([
6978
+ nr([
6961
6979
  u({ fallback: "" })
6962
6980
  ], Ee.prototype, "src", 2);
6963
- Ee = ar([
6981
+ Ee = nr([
6964
6982
  g("MaskEffect")
6965
6983
  ], Ee);
6966
6984
  var ys = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, ka = (r, e, t) => e in r ? ys(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, be = (r, e, t, s) => {
@@ -7077,68 +7095,58 @@ var ws = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, Ia = (r, e
7077
7095
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
7078
7096
  return s && i && ws(e, t, i), i;
7079
7097
  }, Ba = (r, e, t) => Ia(r, e + "", t);
7080
- let tt = class extends x {
7098
+ let rt = class extends x {
7081
7099
  constructor(r, e = []) {
7082
7100
  super(), this.setProperties(r).append(e);
7083
7101
  }
7084
7102
  apply(r, e) {
7085
7103
  e.redraw(r, () => {
7086
- b.draw(r, tt.material, {
7104
+ const t = r.program.uniforms.viewMatrix, s = [t[0], t[4]], i = [t[6], t[7]], o = {
7087
7105
  sampler: 0,
7088
- uSize: [this.strength, this.strength],
7089
- uInputSize: [e.width, e.height, 1 / e.width, 1 / e.height]
7090
- });
7106
+ offset: [
7107
+ (s[0] + i[0]) / e.width,
7108
+ 1 - (s[1] + i[1]) / e.height
7109
+ ],
7110
+ step: [
7111
+ this.strength * s[0] / e.width,
7112
+ this.strength * s[1] / e.height
7113
+ ]
7114
+ };
7115
+ b.draw(r, rt.material, o);
7091
7116
  });
7092
7117
  }
7093
7118
  };
7094
- Ba(tt, "material", new w({
7095
- vert: `precision mediump float;
7096
- attribute vec2 position;
7119
+ Ba(rt, "material", new w({
7120
+ vert: `attribute vec2 position;
7097
7121
  attribute vec2 uv;
7098
7122
  varying vec2 vUv;
7099
7123
  void main() {
7100
7124
  gl_Position = vec4(position, 0.0, 1.0);
7101
7125
  vUv = uv;
7102
7126
  }`,
7103
- frag: `varying vec2 vUv;
7127
+ frag: `precision highp float;
7128
+ varying vec2 vUv;
7104
7129
  uniform sampler2D sampler;
7105
- uniform vec2 uSize;
7106
- uniform vec4 uInputSize;
7107
-
7108
- vec2 mapCoord(vec2 coord) {
7109
- coord *= uInputSize.xy;
7110
- coord += uInputSize.zw;
7111
- return coord;
7112
- }
7113
-
7114
- vec2 unmapCoord(vec2 coord) {
7115
- coord -= uInputSize.zw;
7116
- coord /= uInputSize.xy;
7117
- return coord;
7118
- }
7119
-
7120
- vec2 pixelate(vec2 coord, vec2 size) {
7121
- return floor(coord / size) * size;
7122
- }
7130
+ uniform vec2 offset;
7131
+ uniform vec2 step;
7123
7132
 
7124
7133
  void main(void) {
7125
- vec2 coord = mapCoord(vUv);
7126
- coord = pixelate(coord, uSize);
7127
- coord = unmapCoord(coord);
7128
- gl_FragColor = texture2D(sampler, coord);
7134
+ vec2 uv = vUv;
7135
+ uv = floor((uv - offset) / step) * step + offset + step / 2.0;
7136
+ gl_FragColor = texture2D(sampler, uv);
7129
7137
  }`
7130
7138
  }));
7131
7139
  Ps([
7132
7140
  u({ fallback: 10 })
7133
- ], tt.prototype, "strength", 2);
7134
- tt = Ps([
7141
+ ], rt.prototype, "strength", 2);
7142
+ rt = Ps([
7135
7143
  g("PixelateEffect")
7136
- ], tt);
7137
- var Ts = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Na = (r, e, t) => e in r ? Ts(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ct = (r, e, t, s) => {
7138
- for (var i = s > 1 ? void 0 : s ? za(e, t) : e, o = r.length - 1, a; o >= 0; o--)
7144
+ ], rt);
7145
+ var Ts = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, za = (r, e, t) => e in r ? Ts(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ut = (r, e, t, s) => {
7146
+ for (var i = s > 1 ? void 0 : s ? Na(e, t) : e, o = r.length - 1, a; o >= 0; o--)
7139
7147
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
7140
7148
  return s && i && Ts(e, t, i), i;
7141
- }, La = (r, e, t) => Na(r, e + "", t);
7149
+ }, La = (r, e, t) => za(r, e + "", t);
7142
7150
  let de = class extends x {
7143
7151
  constructor(r, e = []) {
7144
7152
  super(), this.setProperties(r).append(e);
@@ -7244,24 +7252,24 @@ void main() {
7244
7252
  gl_FragColor = color;
7245
7253
  }`
7246
7254
  }));
7247
- ct([
7255
+ ut([
7248
7256
  u()
7249
7257
  ], de.prototype, "center", 2);
7250
- ct([
7258
+ ut([
7251
7259
  u({ fallback: 20 })
7252
7260
  ], de.prototype, "innerRadius", 2);
7253
- ct([
7261
+ ut([
7254
7262
  u({ fallback: -1 })
7255
7263
  ], de.prototype, "radius", 2);
7256
- ct([
7264
+ ut([
7257
7265
  u({ fallback: 0.1 })
7258
7266
  ], de.prototype, "strength", 2);
7259
- de = ct([
7267
+ de = ut([
7260
7268
  g("ZoomBlurEffect")
7261
7269
  ], de);
7262
- function Tt(r, e) {
7270
+ function Et(r, e) {
7263
7271
  let t = !1;
7264
- const { left: s = 0, top: i = 0, width: o, height: a } = e, n = new O().translate(-s, -i).scale(1 / o, 1 / a);
7272
+ const { left: s = 0, top: i = 0, width: o, height: a } = e, n = new R().translate(-s, -i).scale(1 / o, 1 / a);
7265
7273
  if (r.cropRect) {
7266
7274
  const {
7267
7275
  left: h = 0,
@@ -7314,7 +7322,7 @@ class I extends pe {
7314
7322
  }
7315
7323
  setProperties(e) {
7316
7324
  return this._setProperties(
7317
- F(e) ? void 0 : $s(e)
7325
+ F(e) ? void 0 : Vs(e)
7318
7326
  );
7319
7327
  }
7320
7328
  _updateProperty(e, t, s) {
@@ -7338,30 +7346,27 @@ class I extends pe {
7338
7346
  }
7339
7347
  async loadTexture() {
7340
7348
  if (this.linearGradient || this.radialGradient)
7341
- this.texture = new kt(
7349
+ this.texture = new Ut(
7342
7350
  this.linearGradient ?? this.radialGradient,
7343
7351
  this.parent.size.width,
7344
7352
  this.parent.size.height
7345
7353
  );
7346
- else if (!F(this.image)) {
7347
- this.parent.tree?.log(`load image ${this.image}`);
7354
+ else if (!F(this.image) && (this.parent.tree?.log(`load image ${this.image}`), this.image !== "viewport")) {
7348
7355
  let e = this.image.split("?")[0].endsWith(".gif");
7349
- const t = await z.loadBy(this.image);
7350
- e || (e = t.type.startsWith("image/gif") ?? !1), e ? this.animatedTexture = await z.gif.load(t) : this.texture = await z.texture.load(t);
7356
+ const t = await N.loadBy(this.image);
7357
+ e || (e = t.type.startsWith("image/gif") ?? !1), e ? this.animatedTexture = await N.gif.load(t) : this.texture = await N.texture.load(t);
7351
7358
  }
7352
7359
  }
7353
7360
  async _updateTexture() {
7354
7361
  await this.loadTexture(), this.parent.requestRedraw();
7355
7362
  }
7356
7363
  isValid() {
7357
- return !!(this.enabled && (this.texture || this.animatedTexture || this.color));
7364
+ return !!(this.enabled && (this.texture || this.animatedTexture || this.color || this.image === "viewport"));
7358
7365
  }
7359
7366
  draw() {
7360
- const { width: e, height: t } = this.parent.size, s = this.parent.context, { uvTransform: i, disableWrapMode: o } = Tt(
7361
- this,
7362
- { width: e, height: t }
7363
- );
7364
- s.fillStyle = this.animatedTexture?.currentFrame.texture ?? this.texture ?? this.color, s.fill({
7367
+ const { width: e, height: t } = this.parent.size, s = this.parent.context;
7368
+ let i, o = !1;
7369
+ this.image === "viewport" ? s.fillStyle = new Je() : ({ uvTransform: i, disableWrapMode: o } = Et(this, { width: e, height: t }), s.fillStyle = this.animatedTexture?.currentFrame.texture ?? this.texture ?? this.color), s.fill({
7365
7370
  uvTransform: i,
7366
7371
  disableWrapMode: o,
7367
7372
  size: new Float32Array([e, t])
@@ -7422,15 +7427,15 @@ Y([
7422
7427
  Y([
7423
7428
  u()
7424
7429
  ], I.prototype, "opacity");
7425
- var $a = Object.defineProperty, Va = (r, e, t, s) => {
7430
+ var Va = Object.defineProperty, $a = (r, e, t, s) => {
7426
7431
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7427
7432
  (a = r[o]) && (i = a(e, t, i) || i);
7428
- return i && $a(e, t, i), i;
7433
+ return i && Va(e, t, i), i;
7429
7434
  };
7430
7435
  class Es extends I {
7431
7436
  setProperties(e) {
7432
7437
  return super._setProperties(
7433
- F(e) ? void 0 : Vs(e)
7438
+ F(e) ? void 0 : $s(e)
7434
7439
  );
7435
7440
  }
7436
7441
  _updateProperty(e, t, s) {
@@ -7441,7 +7446,7 @@ class Es extends I {
7441
7446
  }
7442
7447
  }
7443
7448
  }
7444
- Va([
7449
+ $a([
7445
7450
  u()
7446
7451
  ], Es.prototype, "fillWithShape");
7447
7452
  var Ga = Object.defineProperty, Wa = (r, e, t, s) => {
@@ -7466,7 +7471,7 @@ class Ss extends I {
7466
7471
  Wa([
7467
7472
  u()
7468
7473
  ], Ss.prototype, "fillWithShape");
7469
- var ja = Object.defineProperty, ut = (r, e, t, s) => {
7474
+ var ja = Object.defineProperty, dt = (r, e, t, s) => {
7470
7475
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7471
7476
  (a = r[o]) && (i = a(e, t, i) || i);
7472
7477
  return i && ja(e, t, i), i;
@@ -7492,35 +7497,30 @@ class Ge extends I {
7492
7497
  return !!(this.enabled && (this.width || this.color || super.isValid()));
7493
7498
  }
7494
7499
  draw() {
7495
- const e = this.parent.context, { uvTransform: t, disableWrapMode: s } = Tt(
7496
- this,
7497
- {
7498
- width: this.parent.size.width,
7499
- height: this.parent.size.height
7500
- }
7501
- );
7502
- e.lineWidth = this.width || 1, e.strokeStyle = this.texture ?? this.color, e.lineCap = this.lineCap, e.lineJoin = this.lineJoin, e.stroke({
7503
- uvTransform: t,
7504
- disableWrapMode: s
7500
+ const { width: e, height: t } = this.parent.size, s = this.parent.context;
7501
+ let i, o = !1;
7502
+ this.image === "viewport" ? s.strokeStyle = new Je() : ({ uvTransform: i, disableWrapMode: o } = Et(this, { width: e, height: t }), s.strokeStyle = this.texture ?? this.color), s.lineWidth = this.width || 1, s.lineCap = this.lineCap, s.lineJoin = this.lineJoin, s.stroke({
7503
+ uvTransform: i,
7504
+ disableWrapMode: o
7505
7505
  });
7506
7506
  }
7507
7507
  }
7508
- ut([
7508
+ dt([
7509
7509
  u({ fallback: "#00000000" })
7510
7510
  ], Ge.prototype, "color");
7511
- ut([
7511
+ dt([
7512
7512
  u({ fallback: 0 })
7513
7513
  ], Ge.prototype, "width");
7514
- ut([
7514
+ dt([
7515
7515
  u({ fallback: "solid" })
7516
7516
  ], Ge.prototype, "style");
7517
- ut([
7517
+ dt([
7518
7518
  u({ fallback: "butt" })
7519
7519
  ], Ge.prototype, "lineCap");
7520
- ut([
7520
+ dt([
7521
7521
  u({ fallback: "miter" })
7522
7522
  ], Ge.prototype, "lineJoin");
7523
- var qa = Object.defineProperty, dt = (r, e, t, s) => {
7523
+ var qa = Object.defineProperty, ft = (r, e, t, s) => {
7524
7524
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7525
7525
  (a = r[o]) && (i = a(e, t, i) || i);
7526
7526
  return i && qa(e, t, i), i;
@@ -7550,22 +7550,22 @@ class We extends pe {
7550
7550
  this.blur || this.offsetX || this.offsetY ? (t || (t = new Q({ name: e }), this.parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this.parent.removeChild(t);
7551
7551
  }
7552
7552
  }
7553
- dt([
7553
+ ft([
7554
7554
  u({ fallback: !0 })
7555
7555
  ], We.prototype, "enabled");
7556
- dt([
7556
+ ft([
7557
7557
  u({ fallback: "#000000FF" })
7558
7558
  ], We.prototype, "color");
7559
- dt([
7559
+ ft([
7560
7560
  u({ fallback: 0 })
7561
7561
  ], We.prototype, "blur");
7562
- dt([
7562
+ ft([
7563
7563
  u({ fallback: 0 })
7564
7564
  ], We.prototype, "offsetY");
7565
- dt([
7565
+ ft([
7566
7566
  u({ fallback: 0 })
7567
7567
  ], We.prototype, "offsetX");
7568
- var Xa = Object.defineProperty, ft = (r, e, t, s) => {
7568
+ var Xa = Object.defineProperty, pt = (r, e, t, s) => {
7569
7569
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7570
7570
  (a = r[o]) && (i = a(e, t, i) || i);
7571
7571
  return i && Xa(e, t, i), i;
@@ -7597,7 +7597,7 @@ class je extends pe {
7597
7597
  this._path2DSet = si(a), e = this._path2DSet.viewBox;
7598
7598
  } else
7599
7599
  this.paths?.forEach((a, n) => {
7600
- const { data: h, ...l } = a, c = new bt();
7600
+ const { data: h, ...l } = a, c = new yt();
7601
7601
  c.style = l, c.addData(h), this._path2DSet.paths[n] = c;
7602
7602
  });
7603
7603
  if (!e) {
@@ -7606,14 +7606,14 @@ class je extends pe {
7606
7606
  }
7607
7607
  const [t, s, i, o] = e;
7608
7608
  this._path2DSet.paths.forEach((a) => {
7609
- a.applyTransform(new mr().translate(-t, -s).scale(1 / i, 1 / o));
7609
+ a.applyTransform(new gr().translate(-t, -s).scale(1 / i, 1 / o));
7610
7610
  });
7611
7611
  }
7612
7612
  draw(e = !1) {
7613
7613
  if (!e && this.enabled && this._path2DSet.paths.length) {
7614
7614
  const t = this.parent.context, { width: s, height: i } = this.parent.size;
7615
7615
  this._path2DSet.paths.forEach((o) => {
7616
- t.addPath(o.clone().applyTransform(new mr().scale(s, i)));
7616
+ t.addPath(o.clone().applyTransform(new gr().scale(s, i)));
7617
7617
  });
7618
7618
  } else
7619
7619
  this._drawRect();
@@ -7623,22 +7623,22 @@ class je extends pe {
7623
7623
  t && s && (i ? e.roundRect(0, 0, t, s, i) : e.rect(0, 0, t, s));
7624
7624
  }
7625
7625
  }
7626
- ft([
7626
+ pt([
7627
7627
  u({ fallback: !0 })
7628
7628
  ], je.prototype, "enabled");
7629
- ft([
7629
+ pt([
7630
7630
  u()
7631
7631
  ], je.prototype, "preset");
7632
- ft([
7632
+ pt([
7633
7633
  u()
7634
7634
  ], je.prototype, "svg");
7635
- ft([
7635
+ pt([
7636
7636
  u()
7637
7637
  ], je.prototype, "viewBox");
7638
- ft([
7638
+ pt([
7639
7639
  u()
7640
7640
  ], je.prototype, "paths");
7641
- class rt extends _e {
7641
+ class st extends _e {
7642
7642
  constructor(e) {
7643
7643
  super(), this.setProperties(e);
7644
7644
  }
@@ -7646,7 +7646,7 @@ class rt extends _e {
7646
7646
  const Tr = Xs();
7647
7647
  for (const r in Tr) {
7648
7648
  const e = Tr[r];
7649
- qt(rt, r, { fallback: e });
7649
+ Xt(st, r, { fallback: e });
7650
7650
  }
7651
7651
  var Ha = Object.defineProperty, he = (r, e, t, s) => {
7652
7652
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
@@ -7658,7 +7658,7 @@ class te extends pe {
7658
7658
  super(), this.parent = e, this.base = new ii(), this.base.setPropertyAccessor(this);
7659
7659
  }
7660
7660
  base;
7661
- _texture = new Jt();
7661
+ _texture = new Qt();
7662
7662
  _textureMap = /* @__PURE__ */ new Map();
7663
7663
  setProperties(e) {
7664
7664
  return super.setProperties(
@@ -7695,17 +7695,17 @@ class te extends pe {
7695
7695
  const i = [];
7696
7696
  if (t.fragments.forEach((o, a) => {
7697
7697
  if (o.characters.length) {
7698
- const n = Nt.from(
7698
+ const n = Lt.from(
7699
7699
  ...o.characters.map((h) => h.compatibleGlyphBox)
7700
7700
  );
7701
7701
  this._updateTexture(`${s}.${a}.fill`, o.fill, n), this._updateTexture(`${s}.${a}.outline`, o.outline, n), i.push(n);
7702
7702
  }
7703
7703
  }), i.length) {
7704
- const o = Nt.from(...i);
7704
+ const o = Lt.from(...i);
7705
7705
  this._updateTexture(`${s}.fill`, t.fill, o), this._updateTexture(`${s}.outline`, t.outline, o), e.push(o);
7706
7706
  }
7707
7707
  }), e.length) {
7708
- const t = Nt.from(...e);
7708
+ const t = Lt.from(...e);
7709
7709
  this._updateTexture("fill", this.fill, t), this._updateTexture("outline", this.outline, t);
7710
7710
  }
7711
7711
  }
@@ -7716,11 +7716,11 @@ class te extends pe {
7716
7716
  }), this.parent.requestRedraw());
7717
7717
  }
7718
7718
  async _loadTexture(e, t) {
7719
- return e.linearGradient || e.radialGradient ? new kt(
7719
+ return e.linearGradient || e.radialGradient ? new Ut(
7720
7720
  e.linearGradient ?? e.radialGradient,
7721
7721
  t.width,
7722
7722
  t.height
7723
- ) : F(e.image) ? void 0 : (this.parent.tree?.log(`load image ${e.image}`), await z.texture.load(e.image));
7723
+ ) : F(e.image) ? void 0 : (this.parent.tree?.log(`load image ${e.image}`), await N.texture.load(e.image));
7724
7724
  }
7725
7725
  setContent(e) {
7726
7726
  this.content = Ys(e);
@@ -7736,7 +7736,7 @@ class te extends pe {
7736
7736
  if (e.scale.x > 0 && e.scale.y > 0)
7737
7737
  return;
7738
7738
  const t = e.scale.x * e.scale.y, s = e.pivot;
7739
- return new O().translate(-s.x, -s.y).scale(t > 0 ? 1 : -1, 1).translate(s.x, s.y);
7739
+ return new R().translate(-s.x, -s.y).scale(t > 0 ? 1 : -1, 1).translate(s.x, s.y);
7740
7740
  }
7741
7741
  useTextureDraw() {
7742
7742
  let e = this.drawMode;
@@ -7752,7 +7752,7 @@ class te extends pe {
7752
7752
  if (typeof s.style.fill == "object") {
7753
7753
  const n = s.style.fill, h = this._textureMap.get(`${a}.${o}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7754
7754
  if (n.enabled !== !1 && (h || n.color)) {
7755
- const { uvTransform: l, disableWrapMode: c } = Tt(
7755
+ const { uvTransform: l, disableWrapMode: c } = Et(
7756
7756
  n,
7757
7757
  h?.box ?? {
7758
7758
  width: this.parent.size.width,
@@ -7773,7 +7773,7 @@ class te extends pe {
7773
7773
  if (typeof s.style.stroke == "object") {
7774
7774
  const n = s.style.stroke, h = this._textureMap.get(`${a}.${o}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7775
7775
  if (n.enabled !== !1 && (h || n.color) && (n.width === void 0 || n.width)) {
7776
- const { uvTransform: l, disableWrapMode: c } = Tt(
7776
+ const { uvTransform: l, disableWrapMode: c } = Et(
7777
7777
  n,
7778
7778
  h?.box ?? {
7779
7779
  width: this.parent.size.width,
@@ -7800,7 +7800,7 @@ class te extends pe {
7800
7800
  _textureDraw(e) {
7801
7801
  const { left: t = 0, top: s = 0, width: i, height: o } = this.base.boundingBox;
7802
7802
  e.fillStyle = this._texture, e.rect(t, s, i, o), e.fill({
7803
- uvTransform: new O().translate(-t, -s).scale(1 / i, 1 / o),
7803
+ uvTransform: new R().translate(-t, -s).scale(1 / i, 1 / o),
7804
7804
  vertTransform: this._createVertTransform()
7805
7805
  });
7806
7806
  }
@@ -7842,13 +7842,13 @@ var Ya = Object.getOwnPropertyDescriptor, Ka = (r, e, t, s) => {
7842
7842
  return i;
7843
7843
  };
7844
7844
  const Za = new Set(Object.keys(Zs())), Ja = new Set(Object.keys(Ks()));
7845
- let st = class extends Te {
7845
+ let it = class extends Te {
7846
7846
  size = new C().on("update", () => {
7847
7847
  this.onUpdateStyleProperty("transform", this.style.transform, void 0), this.onUpdateStyleProperty("transformOrigin", this.style.transformOrigin, void 0), this.updateGlobalTransform(), this.requestRedraw();
7848
7848
  });
7849
7849
  _allowPointerEvents = !0;
7850
7850
  _overflowHidden = !1;
7851
- _style = new rt().on("updateProperty", (...r) => {
7851
+ _style = new st().on("updateProperty", (...r) => {
7852
7852
  this.onUpdateStyleProperty(r[0], r[1], r[2]);
7853
7853
  });
7854
7854
  get style() {
@@ -7907,7 +7907,7 @@ let st = class extends Te {
7907
7907
  this._shadow.resetProperties().setProperties(r);
7908
7908
  }
7909
7909
  constructor(r, e = []) {
7910
- super(), this.style = new rt(), this.setProperties(r).append(e);
7910
+ super(), this.style = new st(), this.setProperties(r).append(e);
7911
7911
  }
7912
7912
  _treeEnter(r) {
7913
7913
  super._treeEnter(r), this._text.isValid() && this._text.update();
@@ -7950,7 +7950,7 @@ let st = class extends Te {
7950
7950
  this.skew.y = e;
7951
7951
  break;
7952
7952
  case "transform":
7953
- Vo(
7953
+ $o(
7954
7954
  e ?? "",
7955
7955
  this.size.width,
7956
7956
  this.size.height,
@@ -8158,10 +8158,10 @@ let st = class extends Te {
8158
8158
  });
8159
8159
  }
8160
8160
  };
8161
- st = Ka([
8161
+ it = Ka([
8162
8162
  g("BaseElement2D")
8163
- ], st);
8164
- class Cs extends rt {
8163
+ ], it);
8164
+ class Cs extends st {
8165
8165
  constructor(e) {
8166
8166
  super(), this.setProperties(e);
8167
8167
  }
@@ -8173,8 +8173,8 @@ const Er = {
8173
8173
  height: 0
8174
8174
  };
8175
8175
  for (const r in Er)
8176
- qt(Cs, r, { fallback: Er[r] });
8177
- class Qa extends rt {
8176
+ Xt(Cs, r, { fallback: Er[r] });
8177
+ class Qa extends st {
8178
8178
  constructor(e) {
8179
8179
  super(), this.setProperties(e);
8180
8180
  }
@@ -8184,7 +8184,7 @@ var en = Object.getOwnPropertyDescriptor, tn = (r, e, t, s) => {
8184
8184
  (a = r[o]) && (i = a(i) || i);
8185
8185
  return i;
8186
8186
  };
8187
- let Se = class extends st {
8187
+ let Se = class extends it {
8188
8188
  _style = new Cs().on("updateProperty", (...r) => {
8189
8189
  this.onUpdateStyleProperty(r[0], r[1], r[2]);
8190
8190
  });
@@ -8215,7 +8215,7 @@ let Se = class extends st {
8215
8215
  switch (r) {
8216
8216
  case "width":
8217
8217
  case "height":
8218
- this.mask instanceof st && (this.mask.size.width = this.size.width, this.mask.size.height = this.size.height);
8218
+ this.mask instanceof it && (this.mask.size.width = this.size.width, this.mask.size.height = this.size.height);
8219
8219
  break;
8220
8220
  }
8221
8221
  }
@@ -8275,7 +8275,7 @@ const E = {
8275
8275
  // Display.None
8276
8276
  contents: 2
8277
8277
  // Display.Contents
8278
- }, Vt = {
8278
+ }, Gt = {
8279
8279
  inherit: 0,
8280
8280
  // Direction.Inherit
8281
8281
  ltr: 1,
@@ -8331,7 +8331,7 @@ const E = {
8331
8331
  "content-box": 1
8332
8332
  // BoxSizing.ContentBox
8333
8333
  };
8334
- class nr {
8334
+ class lr {
8335
8335
  constructor(e) {
8336
8336
  this._element = e;
8337
8337
  }
@@ -8340,7 +8340,7 @@ class nr {
8340
8340
  const { loadYoga: e } = await import("yoga-layout/load");
8341
8341
  this._yoga = await e();
8342
8342
  }
8343
- _node = nr._yoga.Node.create();
8343
+ _node = lr._yoga.Node.create();
8344
8344
  get _style() {
8345
8345
  return this._element.style;
8346
8346
  }
@@ -8400,7 +8400,7 @@ class nr {
8400
8400
  break;
8401
8401
  case "direction":
8402
8402
  this._node.setDirection(
8403
- t ? Vt[t] : Vt.inherit
8403
+ t ? Gt[t] : Gt.inherit
8404
8404
  );
8405
8405
  break;
8406
8406
  case "display":
@@ -8523,7 +8523,7 @@ var sn = Object.getOwnPropertyDescriptor, on = (r, e, t, s) => {
8523
8523
  (a = r[o]) && (i = a(i) || i);
8524
8524
  return i;
8525
8525
  };
8526
- let Ur = class extends st {
8526
+ let Ur = class extends it {
8527
8527
  _style = new Qa().on("updateProperty", (...r) => {
8528
8528
  this.onUpdateStyleProperty(r[0], r[1], r[2]);
8529
8529
  });
@@ -8533,7 +8533,7 @@ let Ur = class extends st {
8533
8533
  set style(r) {
8534
8534
  this._style.resetProperties().setProperties(r);
8535
8535
  }
8536
- _layout = new nr(this);
8536
+ _layout = new lr(this);
8537
8537
  get offsetLeft() {
8538
8538
  return this._layout.offsetLeft;
8539
8539
  }
@@ -8562,7 +8562,7 @@ let Ur = class extends st {
8562
8562
  super._updateStyleProperty(r, e, t), this._layout.updateStyleProperty(r, e, t), this._layout._node.isDirty() && this.requestRelayout();
8563
8563
  }
8564
8564
  updateTransform() {
8565
- this.calculateLayout(void 0, void 0, Vt.ltr);
8565
+ this.calculateLayout(void 0, void 0, Gt.ltr);
8566
8566
  const { left: r, top: e, width: t, height: s } = this._layout.getComputedLayout();
8567
8567
  this.position.x = r, this.position.y = e, this.size.x = t, this.size.y = s, super.updateTransform();
8568
8568
  }
@@ -8574,12 +8574,12 @@ let Ur = class extends st {
8574
8574
  Ur = on([
8575
8575
  g("FlexElement2D")
8576
8576
  ], Ur);
8577
- var an = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, pt = (r, e, t, s) => {
8577
+ var an = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, _t = (r, e, t, s) => {
8578
8578
  for (var i = s > 1 ? void 0 : s ? nn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8579
8579
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8580
8580
  return s && i && an(e, t, i), i;
8581
8581
  };
8582
- let ze = class extends Se {
8582
+ let Ne = class extends Se {
8583
8583
  get currentFrameTexture() {
8584
8584
  return this.texture?.frames[this._frameIndex]?.texture;
8585
8585
  }
@@ -8627,7 +8627,7 @@ let ze = class extends Se {
8627
8627
  if (this._complete = !1, r)
8628
8628
  try {
8629
8629
  this.setResource(
8630
- this.gif || r?.includes(".gif") ? await z.gif.load(r) : await z.texture.load(r)
8630
+ this.gif || r?.includes(".gif") ? await N.gif.load(r) : await N.texture.load(r)
8631
8631
  ), this.requestRedraw(), this.emit("load");
8632
8632
  } catch (e) {
8633
8633
  console.warn(e), this.emit("error", e);
@@ -8666,7 +8666,7 @@ let ze = class extends Se {
8666
8666
  const { left: e = 0, top: t = 0, right: s = 0, bottom: i = 0 } = this.srcRect ?? {}, { width: o, height: a } = this.size;
8667
8667
  this.context.fillStyle = r;
8668
8668
  const n = Math.abs(1 + (e + s)) * o, h = Math.abs(1 + (t + i)) * a, l = 1 / n, c = 1 / h, d = e * o * l, f = t * a * c;
8669
- this.context.uvTransform = new O().scale(l, c).translate(d, f), this.shape.draw(), this.context.fill();
8669
+ this.context.uvTransform = new R().scale(l, c).translate(d, f), this.shape.draw(), this.context.fill();
8670
8670
  }
8671
8671
  }
8672
8672
  _repaint(r) {
@@ -8676,21 +8676,21 @@ let ze = class extends Se {
8676
8676
  }));
8677
8677
  }
8678
8678
  };
8679
- pt([
8679
+ _t([
8680
8680
  u({ internal: !0 })
8681
- ], ze.prototype, "texture", 2);
8682
- pt([
8681
+ ], Ne.prototype, "texture", 2);
8682
+ _t([
8683
8683
  u({ fallback: "" })
8684
- ], ze.prototype, "src", 2);
8685
- pt([
8684
+ ], Ne.prototype, "src", 2);
8685
+ _t([
8686
8686
  u()
8687
- ], ze.prototype, "srcRect", 2);
8688
- pt([
8687
+ ], Ne.prototype, "srcRect", 2);
8688
+ _t([
8689
8689
  u({ fallback: !1 })
8690
- ], ze.prototype, "gif", 2);
8691
- ze = pt([
8690
+ ], Ne.prototype, "gif", 2);
8691
+ Ne = _t([
8692
8692
  g("Image2D")
8693
- ], ze);
8693
+ ], Ne);
8694
8694
  class As extends Se {
8695
8695
  texture;
8696
8696
  constructor(e, t = []) {
@@ -8705,8 +8705,8 @@ var ln = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, Rs = (r, e
8705
8705
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8706
8706
  return s && i && ln(e, t, i), i;
8707
8707
  };
8708
- let Gt = class extends As {
8709
- texture = new Jt();
8708
+ let Wt = class extends As {
8709
+ texture = new Qt();
8710
8710
  animation;
8711
8711
  constructor(r, e = []) {
8712
8712
  super(), this.setProperties(r), this.append(e);
@@ -8729,7 +8729,7 @@ let Gt = class extends As {
8729
8729
  }
8730
8730
  }
8731
8731
  async _load() {
8732
- this.animation = await z.lottie.load(this.src, this.texture.source), this.duration = this.animation.getDuration(!1) * 1e3, this.texture.requestUpload(), this.requestRedraw();
8732
+ this.animation = await N.lottie.load(this.src, this.texture.source), this.duration = this.animation.getDuration(!1) * 1e3, this.texture.requestUpload(), this.requestRedraw();
8733
8733
  }
8734
8734
  _process(r) {
8735
8735
  this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpload(), this.requestRedraw(), super._process(r);
@@ -8737,10 +8737,10 @@ let Gt = class extends As {
8737
8737
  };
8738
8738
  Rs([
8739
8739
  u({ fallback: "" })
8740
- ], Gt.prototype, "src", 2);
8741
- Gt = Rs([
8740
+ ], Wt.prototype, "src", 2);
8741
+ Wt = Rs([
8742
8742
  g("Lottie2D")
8743
- ], Gt);
8743
+ ], Wt);
8744
8744
  var cn = Object.defineProperty, un = (r, e, t, s) => {
8745
8745
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
8746
8746
  (a = r[o]) && (i = a(e, t, i) || i);
@@ -8777,7 +8777,7 @@ var fn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, Os = (r, e
8777
8777
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8778
8778
  return s && i && fn(e, t, i), i;
8779
8779
  };
8780
- let Wt = class extends As {
8780
+ let jt = class extends As {
8781
8781
  get videoDuration() {
8782
8782
  return (this.texture?.duration ?? 0) * 1e3;
8783
8783
  }
@@ -8796,7 +8796,7 @@ let Wt = class extends As {
8796
8796
  return this._wait;
8797
8797
  }
8798
8798
  async _load(r) {
8799
- this.texture = await z.video.load(r), (!this.style.width || !this.style.height) && (this.style.width = this.texture.width, this.style.height = this.texture.height), this.requestRedraw();
8799
+ this.texture = await N.video.load(r), (!this.style.width || !this.style.height) && (this.style.width = this.texture.width, this.style.height = this.texture.height), this.requestRedraw();
8800
8800
  }
8801
8801
  _updateVideoCurrentTime() {
8802
8802
  let r = this._currentTime;
@@ -8814,17 +8814,17 @@ let Wt = class extends As {
8814
8814
  };
8815
8815
  Os([
8816
8816
  u({ fallback: "" })
8817
- ], Wt.prototype, "src", 2);
8818
- Wt = Os([
8817
+ ], jt.prototype, "src", 2);
8818
+ jt = Os([
8819
8819
  g("Video2D")
8820
- ], Wt);
8821
- var _n = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, Dt = (r, e, t, s) => {
8820
+ ], jt);
8821
+ var _n = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, It = (r, e, t, s) => {
8822
8822
  for (var i = s > 1 ? void 0 : s ? mn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8823
8823
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8824
8824
  return s && i && _n(e, t, i), i;
8825
8825
  };
8826
- const gn = (r) => r, vn = _t(0.25, 0.1, 0.25, 1), bn = _t(0.42, 0, 1, 1), yn = _t(0, 0, 0.58, 1), xn = _t(0.42, 0, 0.58, 1);
8827
- function _t(r, e, t, s) {
8826
+ const gn = (r) => r, vn = mt(0.25, 0.1, 0.25, 1), bn = mt(0.42, 0, 1, 1), yn = mt(0, 0, 0.58, 1), xn = mt(0.42, 0, 0.58, 1);
8827
+ function mt(r, e, t, s) {
8828
8828
  const o = 3 * r - 3 * t + 1, a = 3 * t - 6 * r, n = 3 * r, h = 3 * e - 3 * s + 1, l = 3 * s - 6 * e, c = 3 * e, d = (m) => (3 * o * m + 2 * a) * m + n, f = (m) => ((o * m + a) * m + n) * m, _ = (m) => ((h * m + l) * m + c) * m;
8829
8829
  function p(m) {
8830
8830
  let v = m, y, P;
@@ -8835,24 +8835,24 @@ function _t(r, e, t, s) {
8835
8835
  break;
8836
8836
  v -= P / y;
8837
8837
  }
8838
- let R = 1, A = 0;
8839
- for (v = m; R > A; ) {
8838
+ let O = 1, A = 0;
8839
+ for (v = m; O > A; ) {
8840
8840
  if (P = f(v) - m, Math.abs(P) < 1e-6)
8841
8841
  return v;
8842
- P > 0 ? R = v : A = v, v = (R + A) / 2;
8842
+ P > 0 ? O = v : A = v, v = (O + A) / 2;
8843
8843
  }
8844
8844
  return v;
8845
8845
  }
8846
8846
  return (m) => _(p(m));
8847
8847
  }
8848
- const Lt = {
8848
+ const Ft = {
8849
8849
  linear: gn,
8850
8850
  ease: vn,
8851
8851
  easeIn: bn,
8852
8852
  easeOut: yn,
8853
8853
  easeInOut: xn
8854
8854
  };
8855
- let it = class extends W {
8855
+ let ot = class extends W {
8856
8856
  _keyframes = [];
8857
8857
  _isFirstUpdatePosition = !1;
8858
8858
  _cachedProps = new Ir();
@@ -8946,11 +8946,11 @@ let it = class extends W {
8946
8946
  }
8947
8947
  _parseEasing(r) {
8948
8948
  if (!r)
8949
- return Lt.linear;
8950
- if (r in Lt)
8951
- return Lt[r];
8949
+ return Ft.linear;
8950
+ if (r in Ft)
8951
+ return Ft[r];
8952
8952
  const e = r.replace(/cubic-bezier\((.+)\)/, "$1").split(",").map((t) => Number(t));
8953
- return _t(e[0], e[1], e[2], e[3]);
8953
+ return mt(e[0], e[1], e[2], e[3]);
8954
8954
  }
8955
8955
  _parseKeyframes(r, e) {
8956
8956
  let t;
@@ -9000,13 +9000,13 @@ let it = class extends W {
9000
9000
  let o, a;
9001
9001
  if (e === "none" && (e = void 0), t === "none" && (t = void 0), e === void 0 || t === void 0)
9002
9002
  if (e !== void 0)
9003
- o = mt(r, String(e), i), a = vr(o);
9003
+ o = gt(r, String(e), i), a = br(o);
9004
9004
  else if (t !== void 0)
9005
- a = mt(r, String(t), i), o = vr(a);
9005
+ a = gt(r, String(t), i), o = br(a);
9006
9006
  else
9007
9007
  return;
9008
9008
  else
9009
- o = mt(r, String(e), i), a = mt(r, String(t), i);
9009
+ o = gt(r, String(e), i), a = gt(r, String(t), i);
9010
9010
  if (Array.isArray(o) && Array.isArray(a)) {
9011
9011
  const n = /* @__PURE__ */ new Set(), h = {}, l = {};
9012
9012
  o.forEach(({ name: d, args: f }) => {
@@ -9018,8 +9018,8 @@ let it = class extends W {
9018
9018
  return n.forEach((d) => {
9019
9019
  const f = Math.max(h[d]?.length ?? 0, l[d]?.length ?? 0), _ = h[d], p = l[d];
9020
9020
  c += `${d}(${Array.from({ length: f }, (m, v) => {
9021
- const y = _?.[v], P = p?.[v], R = y?.normalizedIntValue ?? 0, A = P?.normalizedIntValue ?? 0;
9022
- return Number.isNaN(R) || Number.isNaN(A) ? P?.value ?? 0 : S(R, A, s);
9021
+ const y = _?.[v], P = p?.[v], O = y?.normalizedIntValue ?? 0, A = P?.normalizedIntValue ?? 0;
9022
+ return Number.isNaN(O) || Number.isNaN(A) ? P?.value ?? 0 : S(O, A, s);
9023
9023
  }).join(", ")}) `;
9024
9024
  }), c;
9025
9025
  } else if (!Array.isArray(o) && !Array.isArray(a))
@@ -9045,27 +9045,27 @@ let it = class extends W {
9045
9045
  });
9046
9046
  }
9047
9047
  };
9048
- Dt([
9048
+ It([
9049
9049
  u({ fallback: "parent" })
9050
- ], it.prototype, "effectMode", 2);
9051
- Dt([
9050
+ ], ot.prototype, "effectMode", 2);
9051
+ It([
9052
9052
  u({ default: () => [] })
9053
- ], it.prototype, "keyframes", 2);
9054
- Dt([
9053
+ ], ot.prototype, "keyframes", 2);
9054
+ It([
9055
9055
  u()
9056
- ], it.prototype, "easing", 2);
9057
- it = Dt([
9056
+ ], ot.prototype, "easing", 2);
9057
+ ot = It([
9058
9058
  g("Animation", {
9059
9059
  renderMode: "disabled",
9060
9060
  processMode: "pausable",
9061
9061
  processSortMode: "parent_before",
9062
9062
  duration: 2e3
9063
9063
  })
9064
- ], it);
9065
- class lr extends fe {
9064
+ ], ot);
9065
+ class hr extends fe {
9066
9066
  static _instance;
9067
9067
  static get instance() {
9068
- return this._instance || (this._instance = new lr()), this._instance;
9068
+ return this._instance || (this._instance = new hr()), this._instance;
9069
9069
  }
9070
9070
  playbackRate = 1;
9071
9071
  muted = !1;
@@ -9093,7 +9093,7 @@ class lr extends fe {
9093
9093
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
9094
9094
  }
9095
9095
  }
9096
- class Et extends fe {
9096
+ class St extends fe {
9097
9097
  static PADDING = 0.1;
9098
9098
  _source = null;
9099
9099
  _audio = null;
@@ -9214,7 +9214,7 @@ class Et extends fe {
9214
9214
  if (!this._source)
9215
9215
  return;
9216
9216
  const { start: t = 0, end: s = 0 } = e;
9217
- s && console.assert(s > t, "End time is before start time"), e.playbackRate !== void 0 && (this._playbackRate = e.playbackRate), e.volume !== void 0 && (this._volume = e.volume), e.loop !== void 0 && (this._loop = e.loop), e.muted !== void 0 && (this._muted = e.muted), this.refresh(), this.loop && s !== null && (console.warn('Looping not support when specifying an "end" time'), this.loop = !1), this._start = t, this._end = s || this._duration, this._start = Math.max(0, this._start - Et.PADDING), this._end = Math.min(this._end + Et.PADDING, this._duration), this._source.onloadedmetadata = () => {
9217
+ s && console.assert(s > t, "End time is before start time"), e.playbackRate !== void 0 && (this._playbackRate = e.playbackRate), e.volume !== void 0 && (this._volume = e.volume), e.loop !== void 0 && (this._loop = e.loop), e.muted !== void 0 && (this._muted = e.muted), this.refresh(), this.loop && s !== null && (console.warn('Looping not support when specifying an "end" time'), this.loop = !1), this._start = t, this._end = s || this._duration, this._start = Math.max(0, this._start - St.PADDING), this._end = Math.min(this._end + St.PADDING, this._duration), this._source.onloadedmetadata = () => {
9218
9218
  this._source && (this._source.currentTime = t, this._source.onloadedmetadata = null, this.emit("progress", t, this._duration), U.on(this._onUpdate));
9219
9219
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
9220
9220
  }
@@ -9249,7 +9249,7 @@ class wn {
9249
9249
  return !!this.source && this.source.readyState === 4;
9250
9250
  }
9251
9251
  get context() {
9252
- return lr.instance;
9252
+ return hr.instance;
9253
9253
  }
9254
9254
  async load() {
9255
9255
  return new Promise((e) => {
@@ -9257,7 +9257,7 @@ class wn {
9257
9257
  });
9258
9258
  }
9259
9259
  createSound() {
9260
- return new Et();
9260
+ return new St();
9261
9261
  }
9262
9262
  }
9263
9263
  class Ms extends fe {
@@ -9293,9 +9293,9 @@ class Ml {
9293
9293
  }
9294
9294
  }
9295
9295
  function Pn() {
9296
- if ($r)
9296
+ if (Vr)
9297
9297
  return new AudioContext();
9298
- if (Vr) {
9298
+ if ($r) {
9299
9299
  const r = globalThis.webkitAudioContext;
9300
9300
  return new r();
9301
9301
  } else
@@ -9360,7 +9360,7 @@ class xe extends Ms {
9360
9360
  2,
9361
9361
  Gr ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9362
9362
  ), s = e.createDynamicsCompressor(), i = e.createAnalyser();
9363
- i.connect(s), s.connect(e.destination), super(i, s), this._context = e, this._offlineContext = t, this._compressor = s, this._analyser = i, this._locked = e.state === "suspended" && (ce || mi), Ot && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
9363
+ i.connect(s), s.connect(e.destination), super(i, s), this._context = e, this._offlineContext = t, this._compressor = s, this._analyser = i, this._locked = e.state === "suspended" && (ce || mi), Mt && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
9364
9364
  }
9365
9365
  _onFocus() {
9366
9366
  if (!this.autoPause)
@@ -9761,14 +9761,14 @@ we = On([
9761
9761
  class kl extends Te {
9762
9762
  //
9763
9763
  }
9764
- var kn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, It = (r, e, t, s) => {
9764
+ var kn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, Bt = (r, e, t, s) => {
9765
9765
  for (var i = s > 1 ? void 0 : s ? Un(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9766
9766
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
9767
9767
  return s && i && kn(e, t, i), i;
9768
9768
  };
9769
- let ot = class extends Se {
9769
+ let at = class extends Se {
9770
9770
  _audioBuffer;
9771
- _src = Ot ? new T(document.createElement("canvas")) : void 0;
9771
+ _src = Mt ? new T(document.createElement("canvas")) : void 0;
9772
9772
  _needsUpdateTexture = !1;
9773
9773
  constructor(r = {}) {
9774
9774
  super(), this.setProperties(r);
@@ -9825,30 +9825,30 @@ let ot = class extends Se {
9825
9825
  }
9826
9826
  _drawSrc() {
9827
9827
  const r = this._src;
9828
- r?.isValid() && (this.context.fillStyle = r, this.context.uvTransform = new O().scale(
9828
+ r?.isValid() && (this.context.fillStyle = r, this.context.uvTransform = new R().scale(
9829
9829
  1 / this.style.width,
9830
9830
  1 / this.style.height
9831
9831
  ));
9832
9832
  }
9833
9833
  };
9834
- It([
9834
+ Bt([
9835
9835
  u()
9836
- ], ot.prototype, "src", 2);
9837
- It([
9836
+ ], at.prototype, "src", 2);
9837
+ Bt([
9838
9838
  u({ fallback: 0 })
9839
- ], ot.prototype, "gap", 2);
9840
- It([
9839
+ ], at.prototype, "gap", 2);
9840
+ Bt([
9841
9841
  u({ fallback: "#000000" })
9842
- ], ot.prototype, "color", 2);
9843
- ot = It([
9842
+ ], at.prototype, "color", 2);
9843
+ at = Bt([
9844
9844
  g("AudioWaveform")
9845
- ], ot);
9846
- var Dn = Object.defineProperty, In = Object.getOwnPropertyDescriptor, Bn = (r, e, t) => e in r ? Dn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, zn = (r, e, t, s) => {
9845
+ ], at);
9846
+ var Dn = Object.defineProperty, In = Object.getOwnPropertyDescriptor, Bn = (r, e, t) => e in r ? Dn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Nn = (r, e, t, s) => {
9847
9847
  for (var i = s > 1 ? void 0 : s ? In(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9848
9848
  (a = r[o]) && (i = a(i) || i);
9849
9849
  return i;
9850
- }, Nn = (r, e, t) => Bn(r, e + "", t);
9851
- let St = class extends Ue {
9850
+ }, zn = (r, e, t) => Bn(r, e + "", t);
9851
+ let Ct = class extends Ue {
9852
9852
  blur = 10;
9853
9853
  quality = 10;
9854
9854
  apply(r, e) {
@@ -9872,7 +9872,7 @@ let St = class extends Ue {
9872
9872
  p = c[m] + 0.5, _[0] = p * d, _[1] = p * f, l.push({
9873
9873
  offset: _
9874
9874
  }), l.forEach((v) => {
9875
- b.draw(r, St.material, {
9875
+ b.draw(r, Ct.material, {
9876
9876
  sampler: s,
9877
9877
  progress: i,
9878
9878
  ...v
@@ -9880,7 +9880,7 @@ let St = class extends Ue {
9880
9880
  });
9881
9881
  }
9882
9882
  };
9883
- Nn(St, "material", new w({
9883
+ zn(Ct, "material", new w({
9884
9884
  vert: `attribute vec2 position;
9885
9885
  attribute vec2 uv;
9886
9886
  varying vec2 vUv;
@@ -9905,24 +9905,24 @@ void main(void) {
9905
9905
  gl_FragColor = color;
9906
9906
  }`
9907
9907
  }));
9908
- St = zn([
9908
+ Ct = Nn([
9909
9909
  g("KawaseTransition")
9910
- ], St);
9911
- var Ln = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, $n = (r, e, t) => e in r ? Ln(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Vn = (r, e, t, s) => {
9910
+ ], Ct);
9911
+ var Ln = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, Vn = (r, e, t) => e in r ? Ln(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, $n = (r, e, t, s) => {
9912
9912
  for (var i = s > 1 ? void 0 : s ? Fn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9913
9913
  (a = r[o]) && (i = a(i) || i);
9914
9914
  return i;
9915
- }, Gn = (r, e, t) => $n(r, e + "", t);
9916
- let Ct = class extends Ue {
9915
+ }, Gn = (r, e, t) => Vn(r, e + "", t);
9916
+ let At = class extends Ue {
9917
9917
  apply(r) {
9918
- b.draw(r, Ct.material, {
9918
+ b.draw(r, At.material, {
9919
9919
  previous: 0,
9920
9920
  next: 1,
9921
9921
  progress: this.currentTimeProgress
9922
9922
  });
9923
9923
  }
9924
9924
  };
9925
- Gn(Ct, "material", new w({
9925
+ Gn(At, "material", new w({
9926
9926
  vert: `attribute vec2 position;
9927
9927
  attribute vec2 uv;
9928
9928
  varying vec2 vUv;
@@ -9951,15 +9951,15 @@ void main() {
9951
9951
  gl_FragColor = mix(src2Color, src1Color, mixPercent);
9952
9952
  }`
9953
9953
  }));
9954
- Ct = Vn([
9954
+ At = $n([
9955
9955
  g("LeftEraseTransition")
9956
- ], Ct);
9956
+ ], At);
9957
9957
  var Wn = Object.defineProperty, jn = Object.getOwnPropertyDescriptor, qn = (r, e, t) => e in r ? Wn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Xn = (r, e, t, s) => {
9958
9958
  for (var i = s > 1 ? void 0 : s ? jn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9959
9959
  (a = r[o]) && (i = a(i) || i);
9960
9960
  return i;
9961
9961
  }, Hn = (r, e, t) => qn(r, e + "", t);
9962
- let at = class extends Ue {
9962
+ let nt = class extends Ue {
9963
9963
  blur = 100;
9964
9964
  gradientBlur = 600;
9965
9965
  apply(r, e) {
@@ -9967,7 +9967,7 @@ let at = class extends Ue {
9967
9967
  let s, i;
9968
9968
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
9969
9969
  const o = e.width, a = e.height, n = [0, a / 2], h = [600, a / 2], l = [o, a], c = h[0] - n[0], d = h[1] - n[1], f = Math.sqrt(c * c + d * d);
9970
- b.draw(r, at.material, {
9970
+ b.draw(r, nt.material, {
9971
9971
  sampler: s,
9972
9972
  progress: i,
9973
9973
  blur: this.blur,
@@ -9976,7 +9976,7 @@ let at = class extends Ue {
9976
9976
  end: h,
9977
9977
  delta: [c / f, d / f],
9978
9978
  texSize: l
9979
- }), b.draw(r, at.material, {
9979
+ }), b.draw(r, nt.material, {
9980
9980
  sampler: s,
9981
9981
  progress: i,
9982
9982
  blur: this.blur,
@@ -9988,7 +9988,7 @@ let at = class extends Ue {
9988
9988
  });
9989
9989
  }
9990
9990
  };
9991
- Hn(at, "material", new w({
9991
+ Hn(nt, "material", new w({
9992
9992
  vert: `attribute vec2 position;
9993
9993
  attribute vec2 uv;
9994
9994
  varying vec2 vUv;
@@ -10036,15 +10036,15 @@ void main(void) {
10036
10036
  gl_FragColor = color;
10037
10037
  }`
10038
10038
  }));
10039
- at = Xn([
10039
+ nt = Xn([
10040
10040
  g("TiltShiftTransition")
10041
- ], at);
10041
+ ], nt);
10042
10042
  var Yn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Zn = (r, e, t) => e in r ? Yn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Jn = (r, e, t, s) => {
10043
10043
  for (var i = s > 1 ? void 0 : s ? Kn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
10044
10044
  (a = r[o]) && (i = a(i) || i);
10045
10045
  return i;
10046
10046
  }, Qn = (r, e, t) => Zn(r, e + "", t);
10047
- let At = class extends Ue {
10047
+ let Rt = class extends Ue {
10048
10048
  radius;
10049
10049
  angle = 4;
10050
10050
  padding = 20;
@@ -10054,7 +10054,7 @@ let At = class extends Ue {
10054
10054
  let s, i;
10055
10055
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
10056
10056
  const o = e.width, a = e.height;
10057
- b.draw(r, At.material, {
10057
+ b.draw(r, Rt.material, {
10058
10058
  sampler: s,
10059
10059
  progress: i,
10060
10060
  filterArea: [o, a, 0, 0],
@@ -10065,7 +10065,7 @@ let At = class extends Ue {
10065
10065
  });
10066
10066
  }
10067
10067
  };
10068
- Qn(At, "material", new w({
10068
+ Qn(Rt, "material", new w({
10069
10069
  vert: `attribute vec2 position;
10070
10070
  attribute vec2 uv;
10071
10071
  varying vec2 vUv;
@@ -10115,9 +10115,9 @@ void main(void) {
10115
10115
  gl_FragColor = texture2D(sampler, coord);
10116
10116
  }`
10117
10117
  }));
10118
- At = Jn([
10118
+ Rt = Jn([
10119
10119
  g("TwistTransition")
10120
- ], At);
10120
+ ], Rt);
10121
10121
  class el extends Ce {
10122
10122
  install(e) {
10123
10123
  const t = async (s) => {
@@ -10226,18 +10226,18 @@ function ll(r) {
10226
10226
  }
10227
10227
  return e;
10228
10228
  }
10229
- const vt = "WeakRef" in globalThis;
10229
+ const bt = "WeakRef" in globalThis;
10230
10230
  class hl extends fe {
10231
10231
  defaultHandler = (e) => e;
10232
10232
  _handlers = /* @__PURE__ */ new Map();
10233
10233
  _handleing = /* @__PURE__ */ new Map();
10234
10234
  _handled = /* @__PURE__ */ new Map();
10235
- _gc = vt ? new FinalizationRegistry((e) => {
10235
+ _gc = bt ? new FinalizationRegistry((e) => {
10236
10236
  const t = this.get(e);
10237
10237
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
10238
10238
  }) : void 0;
10239
10239
  constructor() {
10240
- super(), vt || U.on(this.gc.bind(this), { sort: 2 });
10240
+ super(), bt || U.on(this.gc.bind(this), { sort: 2 });
10241
10241
  }
10242
10242
  use(e) {
10243
10243
  return e.install(this), this;
@@ -10286,11 +10286,11 @@ class hl extends fe {
10286
10286
  }
10287
10287
  get(e) {
10288
10288
  let t = this._handled.get(e);
10289
- return vt && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
10289
+ return bt && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
10290
10290
  }
10291
10291
  set(e, t) {
10292
10292
  let s = t;
10293
- vt && typeof t == "object" && (this._gc.register(t, e), s = new WeakRef(t)), this._handled.set(e, s);
10293
+ bt && typeof t == "object" && (this._gc.register(t, e), s = new WeakRef(t)), this._handled.set(e, s);
10294
10294
  }
10295
10295
  async loadBy(e, t = () => this.fetch(e).then((s) => s.blob())) {
10296
10296
  const s = this.get(e) ?? this._handleing.get(e);
@@ -10320,7 +10320,7 @@ class hl extends fe {
10320
10320
  }), this._handled.clear();
10321
10321
  }
10322
10322
  }
10323
- const z = new hl().use(new to()).use(new el()).use(new tl()).use(new rl()).use(new sl()).use(new il()).use(new ol());
10323
+ const N = new hl().use(new to()).use(new el()).use(new tl()).use(new rl()).use(new sl()).use(new il()).use(new ol());
10324
10324
  var cl = Object.defineProperty, ks = (r, e, t, s) => {
10325
10325
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
10326
10326
  (a = r[o]) && (i = a(e, t, i) || i);
@@ -10334,7 +10334,7 @@ const Me = {
10334
10334
  preserveDrawingBuffer: !1,
10335
10335
  powerPreference: "default"
10336
10336
  };
10337
- class hr extends me {
10337
+ class cr extends me {
10338
10338
  renderer;
10339
10339
  get view() {
10340
10340
  return this.renderer.view;
@@ -10415,13 +10415,13 @@ class hr extends me {
10415
10415
  return this.renderer.resize(e, t, s), this.root.width = e, this.root.height = t, this.root.requestUpload(), this.render(), this;
10416
10416
  }
10417
10417
  nextTick() {
10418
- return Nr();
10418
+ return zr();
10419
10419
  }
10420
10420
  async waitUntilLoad() {
10421
- await z.waitUntilLoad(), await this.nextTick();
10421
+ await N.waitUntilLoad(), await this.nextTick();
10422
10422
  }
10423
10423
  async waitAndRender(e = 0) {
10424
- await z.waitUntilLoad(), this._process(e), await this.nextTick(), this._render(this.renderer);
10424
+ await N.waitUntilLoad(), this._process(e), await this.nextTick(), this._render(this.renderer);
10425
10425
  }
10426
10426
  render(e = 0) {
10427
10427
  this._process(e), this._render(this.renderer);
@@ -10467,17 +10467,17 @@ class hr extends me {
10467
10467
  }
10468
10468
  ks([
10469
10469
  u({ fallback: !1 })
10470
- ], hr.prototype, "autoResize");
10470
+ ], cr.prototype, "autoResize");
10471
10471
  ks([
10472
10472
  u({ fallback: !1 })
10473
- ], hr.prototype, "autoStart");
10473
+ ], cr.prototype, "autoStart");
10474
10474
  let k;
10475
- const jt = [];
10476
- let Ft = !1;
10475
+ const qt = [];
10476
+ let Vt = !1;
10477
10477
  async function ul(r = 100) {
10478
- if (!Ft) {
10479
- for (Ft = !0; jt.length; ) {
10480
- const e = jt.shift();
10478
+ if (!Vt) {
10479
+ for (Vt = !0; qt.length; ) {
10480
+ const e = qt.shift();
10481
10481
  if (e)
10482
10482
  try {
10483
10483
  await e();
@@ -10487,7 +10487,7 @@ async function ul(r = 100) {
10487
10487
  else
10488
10488
  await new Promise((t) => setTimeout(t, r));
10489
10489
  }
10490
- Ft = !1;
10490
+ Vt = !1;
10491
10491
  }
10492
10492
  }
10493
10493
  async function dl(r) {
@@ -10502,7 +10502,7 @@ async function dl(r) {
10502
10502
  onKeyframe: h,
10503
10503
  ...l
10504
10504
  } = r;
10505
- return k ??= new hr({
10505
+ return k ??= new cr({
10506
10506
  pixelRatio: 1,
10507
10507
  width: 1,
10508
10508
  height: 1,
@@ -10527,34 +10527,34 @@ async function dl(r) {
10527
10527
  }
10528
10528
  async function Ul(r) {
10529
10529
  return new Promise((e) => {
10530
- jt.push(async () => e(await dl(r))), ul();
10530
+ qt.push(async () => e(await dl(r))), ul();
10531
10531
  });
10532
10532
  }
10533
10533
  export {
10534
10534
  $t as AnimatedTexture,
10535
- it as Animation,
10535
+ ot as Animation,
10536
10536
  hl as Assets,
10537
10537
  we as Audio,
10538
10538
  Ms as AudioPipeline,
10539
10539
  Ml as AudioProcessor,
10540
10540
  kl as AudioSpectrum,
10541
- ot as AudioWaveform,
10542
- st as BaseElement2D,
10541
+ at as AudioWaveform,
10542
+ it as BaseElement2D,
10543
10543
  Es as BaseElement2DBackground,
10544
10544
  I as BaseElement2DFill,
10545
10545
  Ss as BaseElement2DForeground,
10546
10546
  Ge as BaseElement2DOutline,
10547
10547
  We as BaseElement2DShadow,
10548
10548
  je as BaseElement2DShape,
10549
- rt as BaseElement2DStyle,
10549
+ st as BaseElement2DStyle,
10550
10550
  te as BaseElement2DText,
10551
- Pt as Camera2D,
10551
+ Tt as Camera2D,
10552
10552
  mo as CanvasContext,
10553
10553
  Pe as CanvasItem,
10554
- Jt as CanvasTexture,
10554
+ Qt as CanvasTexture,
10555
10555
  J as Color,
10556
- V as ColorAdjustEffect,
10557
- Je as ColorFilterEffect,
10556
+ $ as ColorAdjustEffect,
10557
+ Qe as ColorFilterEffect,
10558
10558
  Hr as ColorMatrix,
10559
10559
  De as ColorOverlayEffect,
10560
10560
  Ie as ColorRemoveEffect,
@@ -10566,40 +10566,40 @@ export {
10566
10566
  q as DrawboardEffect,
10567
10567
  Q as DropShadowEffect,
10568
10568
  x as Effect,
10569
- yt as EffectMaterial,
10569
+ xt as EffectMaterial,
10570
10570
  Se as Element2D,
10571
10571
  Cs as Element2DStyle,
10572
- Qe as EmbossEffect,
10573
- hr as Engine,
10572
+ et as EmbossEffect,
10573
+ cr as Engine,
10574
10574
  Ur as FlexElement2D,
10575
10575
  Qa as FlexElement2DStyle,
10576
- nr as FlexLayout,
10576
+ lr as FlexLayout,
10577
10577
  to as FontLoader,
10578
10578
  ae as GaussianBlurEffect,
10579
- Zt as Geometry,
10579
+ Jt as Geometry,
10580
10580
  el as GifLoader,
10581
- N as GlitchEffect,
10581
+ z as GlitchEffect,
10582
10582
  X as GodrayEffect,
10583
- kt as GradientTexture,
10583
+ Ut as GradientTexture,
10584
10584
  wn as HTMLAudio,
10585
- lr as HTMLAudioContext,
10586
- Et as HTMLSound,
10587
- Ot as IN_BROWSER,
10585
+ hr as HTMLAudioContext,
10586
+ St as HTMLSound,
10587
+ Mt as IN_BROWSER,
10588
10588
  bi as IN_MAC_OS,
10589
- ze as Image2D,
10589
+ Ne as Image2D,
10590
10590
  Rl as ImageTexture,
10591
- nt as IndexBuffer,
10591
+ lt as IndexBuffer,
10592
10592
  Oi as Input,
10593
- Mt as InputEvent,
10593
+ kt as InputEvent,
10594
10594
  tl as JsonLoader,
10595
- et as KawaseBlurEffect,
10596
- St as KawaseTransition,
10595
+ tt as KawaseBlurEffect,
10596
+ Ct as KawaseTransition,
10597
10597
  Si as KeyboardInputEvent,
10598
- Ct as LeftEraseTransition,
10598
+ At as LeftEraseTransition,
10599
10599
  Ce as Loader,
10600
- Gt as Lottie2D,
10600
+ Wt as Lottie2D,
10601
10601
  rl as LottieLoader,
10602
- Yt as MainLoop,
10602
+ Kt as MainLoop,
10603
10603
  Ee as MaskEffect,
10604
10604
  w as Material,
10605
10605
  se as Matrix,
@@ -10611,9 +10611,9 @@ export {
10611
10611
  M as Node,
10612
10612
  Te as Node2D,
10613
10613
  D as OutlineEffect,
10614
- Ht as PI,
10614
+ Yt as PI,
10615
10615
  B as PI_2,
10616
- tt as PixelateEffect,
10616
+ rt as PixelateEffect,
10617
10617
  es as PixelsTexture,
10618
10618
  Ci as PointerInputEvent,
10619
10619
  Bi as Projection2D,
@@ -10623,9 +10623,9 @@ export {
10623
10623
  qr as RawWeakMap,
10624
10624
  ye as Rect2,
10625
10625
  ki as RefCounted,
10626
- Kt as Renderer,
10626
+ Zt as Renderer,
10627
10627
  _e as Resource,
10628
- $r as SUPPORTS_AUDIO_CONTEXT,
10628
+ Vr as SUPPORTS_AUDIO_CONTEXT,
10629
10629
  mi as SUPPORTS_CLICK_EVENTS,
10630
10630
  Fr as SUPPORTS_CREATE_IMAGE_BITMAP,
10631
10631
  fi as SUPPORTS_IMAGE_BITMAP,
@@ -10635,7 +10635,7 @@ export {
10635
10635
  pi as SUPPORTS_RESIZE_OBSERVER,
10636
10636
  ce as SUPPORTS_TOUCH_EVENTS,
10637
10637
  di as SUPPORTS_WEBGL2,
10638
- Vr as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
10638
+ $r as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
10639
10639
  gi as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT,
10640
10640
  vi as SUPPORTS_WEB_AUDIO,
10641
10641
  _i as SUPPORTS_WHEEL_EVENTS,
@@ -10645,31 +10645,31 @@ export {
10645
10645
  il as TextureLoader,
10646
10646
  As as TextureRect2D,
10647
10647
  U as Ticker,
10648
- at as TiltShiftTransition,
10648
+ nt as TiltShiftTransition,
10649
10649
  oe as Timeline,
10650
10650
  W as TimelineNode,
10651
- O as Transform2D,
10651
+ R as Transform2D,
10652
10652
  dn as TransformRect2D,
10653
10653
  Ue as Transition,
10654
- At as TwistTransition,
10654
+ Rt as TwistTransition,
10655
10655
  Cl as UvGeometry,
10656
- xt as UvMaterial,
10656
+ wt as UvMaterial,
10657
10657
  Z as Vector,
10658
10658
  C as Vector2,
10659
10659
  El as Vector3,
10660
10660
  Ii as Vector4,
10661
- $ as VertexAttribute,
10661
+ V as VertexAttribute,
10662
10662
  ue as VertexBuffer,
10663
- Wt as Video2D,
10663
+ jt as Video2D,
10664
10664
  ol as VideoLoader,
10665
10665
  _o as VideoTexture,
10666
10666
  j as Viewport,
10667
- xr as ViewportTexture,
10667
+ Je as ViewportTexture,
10668
10668
  Sn as WebAudio,
10669
10669
  xe as WebAudioContext,
10670
- $i as WebGLBatch2DModule,
10670
+ Vi as WebGLBatch2DModule,
10671
10671
  Ze as WebGLBlendMode,
10672
- Vi as WebGLBufferModule,
10672
+ $i as WebGLBufferModule,
10673
10673
  Gi as WebGLFramebufferModule,
10674
10674
  Wi as WebGLMaskModule,
10675
10675
  H as WebGLModule,
@@ -10684,23 +10684,23 @@ export {
10684
10684
  Qi as WebGLViewportModule,
10685
10685
  En as WebSound,
10686
10686
  Ai as WheelInputEvent,
10687
- wt as Window,
10687
+ Pt as Window,
10688
10688
  de as ZoomBlurEffect,
10689
10689
  Oe as alignMap,
10690
- z as assets,
10690
+ N as assets,
10691
10691
  kr as boxSizingMap,
10692
10692
  ie as clamp,
10693
10693
  Ca as clampFrag,
10694
10694
  Pi as createHTMLCanvas,
10695
10695
  bl as createNode,
10696
10696
  Ei as crossOrigin,
10697
- _t as cubicBezier,
10697
+ mt as cubicBezier,
10698
10698
  Pl as curves,
10699
10699
  g as customNode,
10700
- Xt as customNodes,
10700
+ Ht as customNodes,
10701
10701
  Me as defaultOptions,
10702
10702
  Ti as determineCrossOrigin,
10703
- Vt as directionMap,
10703
+ Gt as directionMap,
10704
10704
  Sr as displayMap,
10705
10705
  vn as ease,
10706
10706
  bn as easeIn,
@@ -10710,29 +10710,29 @@ export {
10710
10710
  Cr as flexDirectionMap,
10711
10711
  Ar as flexWrapMap,
10712
10712
  Sa as frag,
10713
- vr as getDefaultCssPropertyValue,
10713
+ br as getDefaultCssPropertyValue,
10714
10714
  rn as gutterMap,
10715
10715
  xi as isCanvasElement,
10716
10716
  jr as isElementNode,
10717
10717
  xl as isImageElement,
10718
- gr as isPow2,
10718
+ vr as isPow2,
10719
10719
  yi as isVideoElement,
10720
10720
  wi as isWebgl2,
10721
10721
  Rr as justifyMap,
10722
10722
  S as lerp,
10723
10723
  gn as linear,
10724
- yr as log2,
10724
+ xr as log2,
10725
10725
  Li as mapWebGLBlendModes,
10726
- br as nextPow2,
10727
- Nr as nextTick,
10726
+ yr as nextPow2,
10727
+ zr as nextTick,
10728
10728
  Or as overflowMap,
10729
10729
  Ol as parseCSSFilter,
10730
- Vo as parseCSSTransform,
10730
+ $o as parseCSSTransform,
10731
10731
  Go as parseCSSTransformOrigin,
10732
- Rt as parseCssFunctions,
10733
- mt as parseCssProperty,
10732
+ Ot as parseCssFunctions,
10733
+ gt as parseCssProperty,
10734
10734
  Mr as positionTypeMap,
10735
10735
  Ul as render,
10736
- Lt as timingFunctions,
10736
+ Ft as timingFunctions,
10737
10737
  ni as uid
10738
10738
  };