modern-canvas 0.14.23 → 0.14.25

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,8 +1,8 @@
1
- import { defineProperty as ts, Observable as ue, Reactivable as rs, parseColor as oi, property as h, isGradient as ni, isColorFillObject as Gr, clearUndef as ss, idGenerator as is, normalizeFill as li, isNone as V, normalizeBackground as ci, normalizeForeground as hi, normalizeOutline as ui, normalizeShadow as di, normalizeShape as pi, getDefaultStyle as fi, normalizeText as _i, normalizeTextContent as mi, getDefaultTextStyle as gi, getDefaultLayoutStyle as vi, RawWeakMap as bi } from "modern-idoc";
1
+ import { defineProperty as es, Observable as ue, Reactivable as ts, parseColor as oi, property as h, isGradient as ni, isColorFillObject as zr, clearUndef as rs, idGenerator as ss, normalizeFill as li, isNone as z, normalizeBackground as ci, normalizeForeground as hi, normalizeOutline as ui, normalizeShadow as di, normalizeShape as fi, getDefaultStyle as pi, normalizeText as _i, normalizeTextContent as mi, getDefaultTextStyle as gi, getDefaultLayoutStyle as vi, RawWeakMap as bi } from "modern-idoc";
2
2
  import { fonts as yi } from "modern-font";
3
3
  import { extend as xi } from "colord";
4
4
  import wi from "colord/plugins/names";
5
- import { Path2D as Ct, Path2DSet as Pi, svgToDom as Ei, svgToPath2DSet as Si, Matrix3 as Vr, BoundingBox as Jt } from "modern-path2d";
5
+ import { Path2D as Ct, Path2DSet as Pi, svgToDom as Ei, svgToPath2DSet as Si, Matrix3 as Gr, BoundingBox as Jt } from "modern-path2d";
6
6
  import { Text as Ti, Character as Ri } from "modern-text";
7
7
  const br = /* @__PURE__ */ new Map();
8
8
  function b(r, e) {
@@ -12,7 +12,7 @@ function b(r, e) {
12
12
  enumerable: !0,
13
13
  configurable: !0
14
14
  }), e && Object.keys(e).forEach((s) => {
15
- ts(t, s, {
15
+ es(t, s, {
16
16
  fallback: e[s]
17
17
  });
18
18
  }), br.set(r, t);
@@ -81,7 +81,7 @@ class B {
81
81
  }
82
82
  }
83
83
  B.start();
84
- async function as(r) {
84
+ async function is(r) {
85
85
  return new Promise((e) => {
86
86
  B.on(
87
87
  () => {
@@ -91,12 +91,12 @@ async function as(r) {
91
91
  );
92
92
  });
93
93
  }
94
- const yr = Math.PI, z = yr * 2;
95
- function $r(r) {
94
+ const yr = Math.PI, G = yr * 2;
95
+ function Vr(r) {
96
96
  return !(r & r - 1) && !!r;
97
97
  }
98
98
  const Ai = /([\w-]+)\((.+?)\)/g, Ci = /[^,]+/g, Oi = /([-e.\d]+)(.*)/;
99
- function Hr(r) {
99
+ function $r(r) {
100
100
  return Array.isArray(r) ? r.map((e) => ({
101
101
  name: e.name,
102
102
  args: e.args.map((t) => ({
@@ -110,7 +110,7 @@ function Hr(r) {
110
110
  }
111
111
  function Et(r, e, t = {}) {
112
112
  const s = zt(e, t);
113
- return s.length ? s : os(r, e, t);
113
+ return s.length ? s : as(r, e, t);
114
114
  }
115
115
  function zt(r, e = {}) {
116
116
  const t = [];
@@ -129,14 +129,14 @@ function Di(r, e, t = {}) {
129
129
  let i, a = 0;
130
130
  for (; (i = Ci.exec(e)) !== null; )
131
131
  s.push(
132
- os(r, i[0], {
132
+ as(r, i[0], {
133
133
  ...t,
134
134
  index: a++
135
135
  })
136
136
  );
137
137
  return s;
138
138
  }
139
- function os(r, e, t = {}) {
139
+ function as(r, e, t = {}) {
140
140
  const { width: s = 1, height: i = 1, index: a = 0 } = t, o = e.match(Oi), n = {
141
141
  unit: o?.[2] ?? null,
142
142
  value: e,
@@ -157,7 +157,7 @@ function os(r, e, t = {}) {
157
157
  n.normalizedIntValue = n.intValue / 100;
158
158
  break;
159
159
  case "rad":
160
- n.normalizedIntValue = n.intValue / z;
160
+ n.normalizedIntValue = n.intValue / G;
161
161
  break;
162
162
  case "deg":
163
163
  n.normalizedIntValue = n.intValue / 360;
@@ -179,7 +179,7 @@ function os(r, e, t = {}) {
179
179
  }
180
180
  return n;
181
181
  }
182
- const Ii = "WebGL2RenderingContext" in globalThis, Mi = "ImageBitmap" in globalThis, Ni = "ResizeObserver" in globalThis, Qe = "PointerEvent" in globalThis, ki = "WheelEvent" in globalThis, lc = "MouseEvent" in globalThis, ve = "ontouchstart" in globalThis, Ui = "onclick" in globalThis, cc = "createImageBitmap" in globalThis, ns = "AudioContext" in globalThis, ls = "webkitAudioContext" in globalThis, cs = "OfflineAudioContext" in globalThis, Bi = "webkitOfflineAudioContext" in globalThis, Li = ns || ls, xr = typeof window < "u", Fi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, hs = globalThis.devicePixelRatio || 1, us = (r) => r !== null && typeof r == "object" && r.nodeType === 1, zi = (r) => us(r) && r.tagName === "VIDEO", hc = (r) => us(r) && r.tagName === "IMG";
182
+ const Ii = "WebGL2RenderingContext" in globalThis, Mi = "ImageBitmap" in globalThis, Ni = "ResizeObserver" in globalThis, Qe = "PointerEvent" in globalThis, ki = "WheelEvent" in globalThis, lc = "MouseEvent" in globalThis, ve = "ontouchstart" in globalThis, Ui = "onclick" in globalThis, cc = "createImageBitmap" in globalThis, os = "AudioContext" in globalThis, ns = "webkitAudioContext" in globalThis, ls = "OfflineAudioContext" in globalThis, Bi = "webkitOfflineAudioContext" in globalThis, Li = os || ns, xr = typeof window < "u", Fi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, cs = globalThis.devicePixelRatio || 1, hs = (r) => r !== null && typeof r == "object" && r.nodeType === 1, zi = (r) => hs(r) && r.tagName === "VIDEO", hc = (r) => hs(r) && r.tagName === "IMG";
183
183
  function Gi(r) {
184
184
  return typeof r == "object" && r !== null && r.nodeType === 1 && r.tagName === "CANVAS";
185
185
  }
@@ -249,7 +249,7 @@ class Wi extends Gt {
249
249
  throw new Error("initKeyboardEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
250
250
  }
251
251
  }
252
- class ds extends Gt {
252
+ class us extends Gt {
253
253
  client = { x: 0, y: 0 };
254
254
  get clientX() {
255
255
  return this.client.x;
@@ -312,7 +312,7 @@ class ds extends Gt {
312
312
  return this.global.y;
313
313
  }
314
314
  }
315
- class qi extends ds {
315
+ class qi extends us {
316
316
  width = 0;
317
317
  height = 0;
318
318
  isPrimary = !1;
@@ -323,7 +323,7 @@ class qi extends ds {
323
323
  throw new Error("getPredictedEvents is not supported!");
324
324
  }
325
325
  }
326
- class Yi extends ds {
326
+ class Yi extends us {
327
327
  static DOM_DELTA_PIXEL = 0;
328
328
  DOM_DELTA_PIXEL = 0;
329
329
  static DOM_DELTA_LINE = 1;
@@ -494,7 +494,7 @@ class Zi extends ue {
494
494
  this.removeEventListeners(), super.destroy();
495
495
  }
496
496
  }
497
- class Ee extends rs {
497
+ class Ee extends ts {
498
498
  instanceId = tt();
499
499
  get json() {
500
500
  return this.toJSON();
@@ -503,7 +503,7 @@ class Ee extends rs {
503
503
  this.setProperties(e);
504
504
  }
505
505
  _nextTick() {
506
- return as();
506
+ return is();
507
507
  }
508
508
  equal(e) {
509
509
  return !!(e && this.instanceId === e.instanceId);
@@ -533,11 +533,11 @@ class le extends ue {
533
533
  const { dim: d } = t;
534
534
  switch (e) {
535
535
  case "*":
536
- for (let p = 0; p < d; p++) {
536
+ for (let f = 0; f < d; f++) {
537
537
  let m = 0;
538
- for (let f = 0; f < i; f++)
539
- f < d && (m += n[p * i + f] * (l[f] ?? 0));
540
- u[p] = m;
538
+ for (let p = 0; p < i; p++)
539
+ p < d && (m += n[f * i + p] * (l[p] ?? 0));
540
+ u[f] = m;
541
541
  }
542
542
  break;
543
543
  default:
@@ -547,20 +547,20 @@ class le extends ue {
547
547
  switch (e) {
548
548
  case "*":
549
549
  for (let d = 0; d < i; d++)
550
- for (let p = 0; p < a; p++) {
551
- const m = p * i;
552
- let f = 0;
550
+ for (let f = 0; f < a; f++) {
551
+ const m = f * i;
552
+ let p = 0;
553
553
  for (let _ = 0; _ < a; _++) {
554
554
  const g = m + _, v = _ * i + d;
555
- f += n[g] * (l[v] ?? 0);
555
+ p += n[g] * (l[v] ?? 0);
556
556
  }
557
- u[m + d] = f;
557
+ u[m + d] = p;
558
558
  }
559
559
  break;
560
560
  case "=":
561
561
  for (let d = 0; d < o; d++) {
562
- const p = l[d];
563
- p !== void 0 && (n[d] = p);
562
+ const f = l[d];
563
+ f !== void 0 && (n[d] = f);
564
564
  }
565
565
  return this._onUpdate(n), this.emit("update", n), this;
566
566
  default:
@@ -633,8 +633,8 @@ class Q extends ue {
633
633
  case "*":
634
634
  for (let u = 0; u < i; u++) {
635
635
  let d = 0;
636
- for (let p = 0; p < i; p++)
637
- d += a[u] * o[p * c + u];
636
+ for (let f = 0; f < i; f++)
637
+ d += a[u] * o[f * c + u];
638
638
  l[u] = d;
639
639
  }
640
640
  break;
@@ -1006,7 +1006,7 @@ class Qi extends le {
1006
1006
  super(4, 4, e);
1007
1007
  }
1008
1008
  }
1009
- const pr = yr / 180, uc = 180 / yr;
1009
+ const fr = yr / 180, uc = 180 / yr;
1010
1010
  function ce(r, e, t) {
1011
1011
  return Math.max(e, Math.min(r, t));
1012
1012
  }
@@ -1031,7 +1031,7 @@ class ea extends Q {
1031
1031
  super(4), this.set(e, t, s, i);
1032
1032
  }
1033
1033
  }
1034
- class ps extends le {
1034
+ class ds extends le {
1035
1035
  constructor(e) {
1036
1036
  super(4, 5, e);
1037
1037
  }
@@ -1289,7 +1289,7 @@ class ps extends le {
1289
1289
  return new ea(e[4] / 255, e[9] / 255, e[14] / 255, e[19] / 255);
1290
1290
  }
1291
1291
  }
1292
- class pc extends le {
1292
+ class fc extends le {
1293
1293
  constructor(e) {
1294
1294
  super(2, 2, e);
1295
1295
  }
@@ -1309,7 +1309,7 @@ class fs extends le {
1309
1309
  n,
1310
1310
  l,
1311
1311
  c
1312
- ] = this._array, u = c * a - o * l, d = o * n - c * i, p = l * i - a * n, m = e * u + t * d + s * p;
1312
+ ] = this._array, u = c * a - o * l, d = o * n - c * i, f = l * i - a * n, m = e * u + t * d + s * f;
1313
1313
  if (m === 0)
1314
1314
  return this.set([
1315
1315
  0,
@@ -1322,17 +1322,17 @@ class fs extends le {
1322
1322
  0,
1323
1323
  0
1324
1324
  ]);
1325
- const f = 1 / m;
1325
+ const p = 1 / m;
1326
1326
  return this.set([
1327
- u * f,
1328
- (s * l - c * t) * f,
1329
- (o * t - s * a) * f,
1330
- d * f,
1331
- (c * e - s * n) * f,
1332
- (s * i - o * e) * f,
1333
- p * f,
1334
- (t * n - l * e) * f,
1335
- (a * e - t * i) * f
1327
+ u * p,
1328
+ (s * l - c * t) * p,
1329
+ (o * t - s * a) * p,
1330
+ d * p,
1331
+ (c * e - s * n) * p,
1332
+ (s * i - o * e) * p,
1333
+ f * p,
1334
+ (t * n - l * e) * p,
1335
+ (a * e - t * i) * p
1336
1336
  ]);
1337
1337
  }
1338
1338
  }
@@ -1342,7 +1342,7 @@ class Dt extends ee {
1342
1342
  */
1343
1343
  rotation;
1344
1344
  get rotationDegrees() {
1345
- return this.rotation / pr;
1345
+ return this.rotation / fr;
1346
1346
  }
1347
1347
  constructor(...e) {
1348
1348
  let t, s;
@@ -1354,12 +1354,12 @@ class Dt extends ee {
1354
1354
  {
1355
1355
  const s = (l, c) => Math.abs(l.x * c.x + l.y * c.y), i = (l) => {
1356
1356
  const { width: c, height: u, rotation: d = 0 } = l;
1357
- let p = d / pr;
1358
- p = -p % 180;
1359
- const m = p / 180 * Math.PI, f = { x: Math.cos(m), y: -Math.sin(m) }, _ = { x: Math.sin(m), y: Math.cos(m) };
1357
+ let f = d / fr;
1358
+ f = -f % 180;
1359
+ const m = f / 180 * Math.PI, p = { x: Math.cos(m), y: -Math.sin(m) }, _ = { x: Math.sin(m), y: Math.cos(m) };
1360
1360
  return {
1361
- axis: [f, _],
1362
- projectionRadius: (g) => c / 2 * s(g, f) + u / 2 * s(g, _)
1361
+ axis: [p, _],
1362
+ projectionRadius: (g) => c / 2 * s(g, p) + u / 2 * s(g, _)
1363
1363
  };
1364
1364
  }, a = i(this), o = i(e), n = {
1365
1365
  x: this.left + this.width / 2 - (e.left + e.width / 2),
@@ -1522,7 +1522,7 @@ class M extends fs {
1522
1522
  return a && this.rotateX(a), o && this.rotateY(o), n && this.rotateZ(n), this;
1523
1523
  }
1524
1524
  _rotateToScale(e) {
1525
- const t = e / z;
1525
+ const t = e / G;
1526
1526
  return t <= 0.5 ? t * -4 + 1 : (t - 1) * 4 + 1;
1527
1527
  }
1528
1528
  _rotate3d(e, t, s, i) {
@@ -1533,8 +1533,8 @@ class M extends fs {
1533
1533
  if (e === 0 && t === 0)
1534
1534
  return [0, 0, i];
1535
1535
  {
1536
- const a = Math.cos(i), o = Math.sin(i), n = a + e * e * (1 - a), l = e * t * (1 - a) - s * o, c = e * s * (1 - a) + t * o, u = a + t * t * (1 - a), d = t * s * (1 - a) - e * o, p = a + s * s * (1 - a), m = -Math.atan2(-d, u), f = -Math.atan2(c, Math.sqrt(d * d + p * p)), _ = -Math.atan2(-l, n);
1537
- return [m, f, _];
1536
+ const a = Math.cos(i), o = Math.sin(i), n = a + e * e * (1 - a), l = e * t * (1 - a) - s * o, c = e * s * (1 - a) + t * o, u = a + t * t * (1 - a), d = t * s * (1 - a) - e * o, f = a + s * s * (1 - a), m = -Math.atan2(-d, u), p = -Math.atan2(c, Math.sqrt(d * d + f * f)), _ = -Math.atan2(-l, n);
1537
+ return [m, p, _];
1538
1538
  }
1539
1539
  }
1540
1540
  makeRotation(e) {
@@ -1558,7 +1558,7 @@ class M extends fs {
1558
1558
  rotation: 0
1559
1559
  }) {
1560
1560
  const { a: s, b: i, c: a, d: o, tx: n, ty: l } = this.toObject(), c = -Math.atan2(-a, o), u = Math.atan2(i, s), d = Math.abs(c + u);
1561
- return d < 1e-5 || Math.abs(z - d) < 1e-5 ? (t.rotation = u, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = c, t.skew.y = u), t.scale.x = Math.sqrt(s * s + i * i), t.scale.y = Math.sqrt(a * a + o * o), t.position.x = n + (e.x * s + e.y * a), t.position.y = l + (e.x * i + e.y * o), t;
1561
+ return d < 1e-5 || Math.abs(G - d) < 1e-5 ? (t.rotation = u, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = c, t.skew.y = u), t.scale.x = Math.sqrt(s * s + i * i), t.scale.y = Math.sqrt(a * a + o * o), t.position.x = n + (e.x * s + e.y * a), t.position.y = l + (e.x * i + e.y * o), t;
1562
1562
  }
1563
1563
  apply(e, t) {
1564
1564
  t = t || new O();
@@ -1592,12 +1592,12 @@ class M extends fs {
1592
1592
  return { a: e, c: t, tx: s, b: i, d: a, ty: o, tz: n };
1593
1593
  }
1594
1594
  }
1595
- class fc extends Q {
1595
+ class pc extends Q {
1596
1596
  constructor() {
1597
1597
  super(3);
1598
1598
  }
1599
1599
  }
1600
- var ra = Object.defineProperty, _s = (r, e, t, s) => {
1600
+ var ra = Object.defineProperty, ps = (r, e, t, s) => {
1601
1601
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
1602
1602
  (o = r[a]) && (i = o(e, t, i) || i);
1603
1603
  return i && ra(e, t, i), i;
@@ -1632,10 +1632,10 @@ class wr extends Ee {
1632
1632
  this.stop(), super.destroy();
1633
1633
  }
1634
1634
  }
1635
- _s([
1635
+ ps([
1636
1636
  h({ fallback: 60 })
1637
1637
  ], wr.prototype, "fps");
1638
- _s([
1638
+ ps([
1639
1639
  h({ fallback: 1 })
1640
1640
  ], wr.prototype, "speed");
1641
1641
  var st = /* @__PURE__ */ ((r) => (r[r.elementArrayBuffer = 34963] = "elementArrayBuffer", r[r.arrayBuffer = 34962] = "arrayBuffer", r[r.uniformBuffer = 35345] = "uniformBuffer", r))(st || {});
@@ -1647,12 +1647,12 @@ class sa {
1647
1647
  byteLength = 0;
1648
1648
  dirty = !0;
1649
1649
  }
1650
- var be = /* @__PURE__ */ ((r) => (r[r.mapRead = 1] = "mapRead", r[r.mapWrite = 2] = "mapWrite", r[r.copySrc = 4] = "copySrc", r[r.copyDst = 8] = "copyDst", r[r.index = 16] = "index", r[r.vertex = 32] = "vertex", r[r.uniform = 64] = "uniform", r[r.storage = 128] = "storage", r[r.indirect = 256] = "indirect", r[r.queryResolve = 512] = "queryResolve", r[r.static = 1024] = "static", r))(be || {}), ia = Object.defineProperty, ms = (r, e, t, s) => {
1650
+ var be = /* @__PURE__ */ ((r) => (r[r.mapRead = 1] = "mapRead", r[r.mapWrite = 2] = "mapWrite", r[r.copySrc = 4] = "copySrc", r[r.copyDst = 8] = "copyDst", r[r.index = 16] = "index", r[r.vertex = 32] = "vertex", r[r.uniform = 64] = "uniform", r[r.storage = 128] = "storage", r[r.indirect = 256] = "indirect", r[r.queryResolve = 512] = "queryResolve", r[r.static = 1024] = "static", r))(be || {}), ia = Object.defineProperty, _s = (r, e, t, s) => {
1651
1651
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
1652
1652
  (o = r[a]) && (i = o(e, t, i) || i);
1653
1653
  return i && ia(e, t, i), i;
1654
1654
  };
1655
- class Pr extends rs {
1655
+ class Pr extends ts {
1656
1656
  screen = { x: 0, y: 0, width: 0, height: 0 };
1657
1657
  _updateProperty(e, t, s) {
1658
1658
  switch (super._updateProperty(e, t, s), e) {
@@ -1666,16 +1666,16 @@ class Pr extends rs {
1666
1666
  this.view && (this.view.width = Math.floor(e * this.pixelRatio), this.view.height = Math.floor(t * this.pixelRatio)), this.screen.width = e, this.screen.height = t, s && this.view && (this.view.style.width = `${e}px`, this.view.style.height = `${t}px`);
1667
1667
  }
1668
1668
  }
1669
- ms([
1670
- h({ fallback: hs })
1669
+ _s([
1670
+ h({ fallback: cs })
1671
1671
  ], Pr.prototype, "pixelRatio");
1672
- ms([
1672
+ _s([
1673
1673
  h({ internal: !0 })
1674
1674
  ], Pr.prototype, "view");
1675
- const Qt = /* @__PURE__ */ Object.create(null), Xr = /* @__PURE__ */ Object.create(null);
1675
+ const Qt = /* @__PURE__ */ Object.create(null), Hr = /* @__PURE__ */ Object.create(null);
1676
1676
  function aa(r, e) {
1677
- let t = Xr[r];
1678
- return t === void 0 && (Qt[e] === void 0 && (Qt[e] = 1), Xr[r] = t = Qt[e]++), t;
1677
+ let t = Hr[r];
1678
+ return t === void 0 && (Qt[e] === void 0 && (Qt[e] = 1), Hr[r] = t = Qt[e]++), t;
1679
1679
  }
1680
1680
  class W extends ue {
1681
1681
  get _gl() {
@@ -1777,20 +1777,20 @@ function ha(r, e) {
1777
1777
  ${r}` : r;
1778
1778
  }
1779
1779
  const ua = {}, da = {};
1780
- function pa(r, { name: e = "program" }, t = !0) {
1780
+ function fa(r, { name: e = "program" }, t = !0) {
1781
1781
  e = e.replace(/\s+/g, "-"), e += t ? "-fragment" : "-vertex";
1782
1782
  const s = t ? ua : da;
1783
1783
  return s[e] ? (s[e]++, e += `-${s[e]}`) : s[e] = 1, r.includes("#define SHADER_NAME") ? r : `${`#define SHADER_NAME ${e}`}
1784
1784
  ${r}`;
1785
1785
  }
1786
- function fa(r, e) {
1786
+ function pa(r, e) {
1787
1787
  return e ? r.replace("#version 300 es", "") : r;
1788
1788
  }
1789
1789
  const et = /* @__PURE__ */ Object.create(null), tr = {
1790
- stripVersion: fa,
1790
+ stripVersion: pa,
1791
1791
  ensurePrecision: ca,
1792
1792
  addProgramDefines: la,
1793
- setProgramName: pa,
1793
+ setProgramName: fa,
1794
1794
  insertVersion: ha
1795
1795
  };
1796
1796
  class ot {
@@ -1835,7 +1835,7 @@ class ot {
1835
1835
  return et[t] || (et[t] = new ot(e), et[t]._cacheKey = t), et[t];
1836
1836
  }
1837
1837
  }
1838
- const jr = {
1838
+ const Xr = {
1839
1839
  uint8x2: { size: 2, stride: 2, normalized: !1 },
1840
1840
  uint8x4: { size: 4, stride: 4, normalized: !1 },
1841
1841
  sint8x2: { size: 2, stride: 2, normalized: !1 },
@@ -1868,7 +1868,7 @@ const jr = {
1868
1868
  sint32x4: { size: 4, stride: 16, normalized: !1 }
1869
1869
  };
1870
1870
  function Ot(r) {
1871
- return jr[r] ?? jr.float32;
1871
+ return Xr[r] ?? Xr.float32;
1872
1872
  }
1873
1873
  function rr(r) {
1874
1874
  const e = Array.from({ length: r });
@@ -1926,7 +1926,7 @@ class ma {
1926
1926
  }
1927
1927
  }
1928
1928
  let St;
1929
- const Wr = {
1929
+ const jr = {
1930
1930
  FLOAT: "float",
1931
1931
  FLOAT_VEC2: "vec2",
1932
1932
  FLOAT_VEC3: "vec3",
@@ -1973,19 +1973,19 @@ const Wr = {
1973
1973
  bvec3: "uint32x3",
1974
1974
  bvec4: "uint32x4"
1975
1975
  };
1976
- function gs(r, e) {
1976
+ function ms(r, e) {
1977
1977
  if (!St) {
1978
- const t = Object.keys(Wr);
1978
+ const t = Object.keys(jr);
1979
1979
  St = {};
1980
1980
  for (let s = 0; s < t.length; ++s) {
1981
1981
  const i = t[s];
1982
- St[r[i]] = Wr[i];
1982
+ St[r[i]] = jr[i];
1983
1983
  }
1984
1984
  }
1985
1985
  return St[e];
1986
1986
  }
1987
1987
  function va(r, e) {
1988
- const t = gs(r, e);
1988
+ const t = ms(r, e);
1989
1989
  return ga[t] || "float32";
1990
1990
  }
1991
1991
  class ba extends W {
@@ -2016,11 +2016,11 @@ class ba extends W {
2016
2016
  throw new Error(`Failed to link program: ${t.getProgramInfoLog(s.native)}`);
2017
2017
  const o = /* @__PURE__ */ Object.create(null), n = !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex);
2018
2018
  for (let u = t.getProgramParameter(s.native, t.ACTIVE_ATTRIBUTES), d = 0; d < u; d++) {
2019
- const p = t.getActiveAttrib(s.native, d);
2020
- if (!p || p.name.startsWith("gl_"))
2019
+ const f = t.getActiveAttrib(s.native, d);
2020
+ if (!f || f.name.startsWith("gl_"))
2021
2021
  continue;
2022
- const m = va(t, p.type);
2023
- o[p.name] = {
2022
+ const m = va(t, f.type);
2023
+ o[f.name] = {
2024
2024
  location: 0,
2025
2025
  format: m,
2026
2026
  stride: Ot(m).stride,
@@ -2041,17 +2041,17 @@ class ba extends W {
2041
2041
  e.attributes = o;
2042
2042
  const c = /* @__PURE__ */ Object.create(null);
2043
2043
  for (let u = t.getProgramParameter(s.native, t.ACTIVE_UNIFORMS), d = 0; d < u; d++) {
2044
- const p = t.getActiveUniform(s.native, d);
2045
- if (!p)
2044
+ const f = t.getActiveUniform(s.native, d);
2045
+ if (!f)
2046
2046
  continue;
2047
- const m = p.name.replace(/\[.*?\]$/, ""), f = gs(t, p.type), _ = p.size;
2047
+ const m = f.name.replace(/\[.*?\]$/, ""), p = ms(t, f.type), _ = f.size;
2048
2048
  c[m] = {
2049
2049
  name: m,
2050
2050
  index: d,
2051
- type: f,
2051
+ type: p,
2052
2052
  size: _,
2053
- isArray: !!p.name.match(/\[.*?\]$/),
2054
- value: _a(f, _)
2053
+ isArray: !!f.name.match(/\[.*?\]$/),
2054
+ value: _a(p, _)
2055
2055
  };
2056
2056
  }
2057
2057
  return e.uniforms = c, t.deleteShader(i), t.deleteShader(a), s;
@@ -2076,63 +2076,63 @@ ${s.getShaderInfoLog(i)}`);
2076
2076
  const l = i[n], c = o[n];
2077
2077
  if (!c)
2078
2078
  continue;
2079
- const { type: u, isArray: d, value: p, name: m } = c;
2080
- if (p === l)
2079
+ const { type: u, isArray: d, value: f, name: m } = c;
2080
+ if (f === l)
2081
2081
  continue;
2082
2082
  c.value = l;
2083
- const f = t.getUniformLocation(a.native, m);
2083
+ const p = t.getUniformLocation(a.native, m);
2084
2084
  switch (u) {
2085
2085
  case "float":
2086
- d ? t.uniform1fv(f, l) : t.uniform1f(f, l);
2086
+ d ? t.uniform1fv(p, l) : t.uniform1f(p, l);
2087
2087
  break;
2088
2088
  case "uint":
2089
- d ? t.uniform1uiv(f, l) : t.uniform1ui(f, l);
2089
+ d ? t.uniform1uiv(p, l) : t.uniform1ui(p, l);
2090
2090
  break;
2091
2091
  case "bool":
2092
2092
  case "int":
2093
2093
  case "sampler2D":
2094
2094
  case "samplerCube":
2095
2095
  case "sampler2DArray":
2096
- d ? t.uniform1iv(f, l) : t.uniform1i(f, l);
2096
+ d ? t.uniform1iv(p, l) : t.uniform1i(p, l);
2097
2097
  break;
2098
2098
  case "bvec2":
2099
2099
  case "ivec2":
2100
- t.uniform2iv(f, l);
2100
+ t.uniform2iv(p, l);
2101
2101
  break;
2102
2102
  case "uvec2":
2103
- t.uniform2uiv(f, l);
2103
+ t.uniform2uiv(p, l);
2104
2104
  break;
2105
2105
  case "vec2":
2106
- t.uniform2fv(f, l);
2106
+ t.uniform2fv(p, l);
2107
2107
  break;
2108
2108
  case "bvec3":
2109
2109
  case "ivec3":
2110
- t.uniform3iv(f, l);
2110
+ t.uniform3iv(p, l);
2111
2111
  break;
2112
2112
  case "uvec3":
2113
- t.uniform3uiv(f, l);
2113
+ t.uniform3uiv(p, l);
2114
2114
  break;
2115
2115
  case "vec3":
2116
- t.uniform3fv(f, l);
2116
+ t.uniform3fv(p, l);
2117
2117
  break;
2118
2118
  case "bvec4":
2119
2119
  case "ivec4":
2120
- t.uniform4iv(f, l);
2120
+ t.uniform4iv(p, l);
2121
2121
  break;
2122
2122
  case "uvec4":
2123
- t.uniform4uiv(f, l);
2123
+ t.uniform4uiv(p, l);
2124
2124
  break;
2125
2125
  case "vec4":
2126
- t.uniform4fv(f, l);
2126
+ t.uniform4fv(p, l);
2127
2127
  break;
2128
2128
  case "mat2":
2129
- t.uniformMatrix2fv(f, !1, l);
2129
+ t.uniformMatrix2fv(p, !1, l);
2130
2130
  break;
2131
2131
  case "mat3":
2132
- t.uniformMatrix3fv(f, !1, l);
2132
+ t.uniformMatrix3fv(p, !1, l);
2133
2133
  break;
2134
2134
  case "mat4":
2135
- t.uniformMatrix4fv(f, !1, l);
2135
+ t.uniformMatrix4fv(p, !1, l);
2136
2136
  break;
2137
2137
  }
2138
2138
  }
@@ -2172,7 +2172,7 @@ function ya(r) {
2172
2172
  subtract: [r.ONE, r.ONE, r.ONE, r.ONE, r.FUNC_REVERSE_SUBTRACT, r.FUNC_ADD]
2173
2173
  };
2174
2174
  }
2175
- class ze {
2175
+ class Fe {
2176
2176
  static _properties = [
2177
2177
  "blend",
2178
2178
  "offsets",
@@ -2196,7 +2196,7 @@ class ze {
2196
2196
  });
2197
2197
  }
2198
2198
  static for2D() {
2199
- const e = new ze();
2199
+ const e = new Fe();
2200
2200
  return e.depthTest = !1, e.blend = !0, e;
2201
2201
  }
2202
2202
  _blendMode = nt.normal;
@@ -2220,17 +2220,17 @@ class ze {
2220
2220
  this[t] = e[t];
2221
2221
  }
2222
2222
  }
2223
- ze._init();
2223
+ Fe._init();
2224
2224
  class xa extends W {
2225
2225
  install(e) {
2226
2226
  super.install(e), e.state = this;
2227
2227
  }
2228
2228
  _blendEq = !1;
2229
- _setters = ze._properties.map((e) => this[`set${e.replace(/^\S/, (t) => t.toUpperCase())}`]);
2229
+ _setters = Fe._properties.map((e) => this[`set${e.replace(/^\S/, (t) => t.toUpperCase())}`]);
2230
2230
  boundStateBitmap = 0;
2231
2231
  boundBlendMode;
2232
2232
  blendModes;
2233
- defaultState = new ze({ blend: !0 });
2233
+ defaultState = new Fe({ blend: !0 });
2234
2234
  _updateContext(e) {
2235
2235
  super._updateContext(e), this.blendModes = ya(e);
2236
2236
  }
@@ -2283,7 +2283,7 @@ class wa extends W {
2283
2283
  install(e) {
2284
2284
  super.install(e), e.batch2D = this;
2285
2285
  }
2286
- _state = ze.for2D();
2286
+ _state = Fe.for2D();
2287
2287
  _batchSize = 4096 * 4;
2288
2288
  _batchables = [];
2289
2289
  _vertexCount = 0;
@@ -2411,9 +2411,9 @@ ${Array.from({ length: e }, (l, c) => {
2411
2411
  const i = this._renderer.texture.maxTextureImageUnits, a = this._getBufferData(e), o = new Float32Array(a), n = new Uint8Array(a), l = this._getIndexBufferData(t);
2412
2412
  let c = 0, u = 0;
2413
2413
  const d = [];
2414
- let p = 0;
2415
- for (let f = s.length, _ = { id: ++p }, g = [], v = /* @__PURE__ */ new Map(), w = 0, S = 0, C = 0; C < f; C++) {
2416
- const k = s[C].texture, me = C === f - 1;
2414
+ let f = 0;
2415
+ for (let p = s.length, _ = { id: ++f }, g = [], v = /* @__PURE__ */ new Map(), w = 0, S = 0, C = 0; C < p; C++) {
2416
+ const k = s[C].texture, me = C === p - 1;
2417
2417
  if (!k || v.has(k)) {
2418
2418
  if (!me)
2419
2419
  continue;
@@ -2423,33 +2423,33 @@ ${Array.from({ length: e }, (l, c) => {
2423
2423
  _.textures = g, _.textureLocationMap = v, w = 0, _.start = u;
2424
2424
  for (let ge = S; ge <= C; ge++) {
2425
2425
  const {
2426
- indices: Br,
2426
+ indices: Ur,
2427
2427
  vertices: qt,
2428
- uvs: Lr = new Float32Array(0),
2428
+ uvs: Br = new Float32Array(0),
2429
2429
  size: Qs = { width: 0, height: 0 },
2430
- texture: Fr,
2431
- blendMode: zr = nt.normal,
2430
+ texture: Lr,
2431
+ blendMode: Fr = nt.normal,
2432
2432
  clipOutsideUv: ei,
2433
2433
  roundPixels: ti
2434
2434
  } = s[ge];
2435
- S < ge && _.blendMode !== zr && (_.size = u - _.start, d.push(_), S = ge, _ = { id: ++p }, _.textures = g, _.start = u);
2436
- const { width: Yt, height: Kt } = Qs, ri = c / this._vertexSize, si = (Fr ? v.get(Fr) : 255) ?? 255, ii = ti ? 1 : 0, ai = ei ? 1 : 0;
2435
+ S < ge && _.blendMode !== Fr && (_.size = u - _.start, d.push(_), S = ge, _ = { id: ++f }, _.textures = g, _.start = u);
2436
+ const { width: Yt, height: Kt } = Qs, ri = c / this._vertexSize, si = (Lr ? v.get(Lr) : 255) ?? 255, ii = ti ? 1 : 0, ai = ei ? 1 : 0;
2437
2437
  let xt, wt;
2438
2438
  for (let Zt = qt.length, J = 0; J < Zt; J += 2) {
2439
- xt = Lr[J], wt = Lr[J + 1], Yt > 0 && Kt > 0 && (xt = Math.ceil(xt * Yt) / Yt, wt = Math.ceil(wt * Kt) / Kt), o[c++] = qt[J], o[c++] = qt[J + 1], o[c++] = xt, o[c++] = wt;
2439
+ xt = Br[J], wt = Br[J + 1], Yt > 0 && Kt > 0 && (xt = Math.ceil(xt * Yt) / Yt, wt = Math.ceil(wt * Kt) / Kt), o[c++] = qt[J], o[c++] = qt[J + 1], o[c++] = xt, o[c++] = wt;
2440
2440
  const Pt = c * 4;
2441
2441
  n[Pt] = si, n[Pt + 1] = ai, n[Pt + 2] = ii, n[Pt + 3] = 0, c++;
2442
2442
  }
2443
- for (let Zt = Br.length, J = 0; J < Zt; J++)
2444
- l[u++] = ri + Br[J];
2445
- _.blendMode = zr;
2443
+ for (let Zt = Ur.length, J = 0; J < Zt; J++)
2444
+ l[u++] = ri + Ur[J];
2445
+ _.blendMode = Fr;
2446
2446
  }
2447
- S = C + 1, _.size = u - _.start, d.push(_), _ = { id: ++p }, g = [], v = /* @__PURE__ */ new Map();
2447
+ S = C + 1, _.size = u - _.start, d.push(_), _ = { id: ++f }, g = [], v = /* @__PURE__ */ new Map();
2448
2448
  }
2449
2449
  }
2450
2450
  const m = this._getShader(i);
2451
2451
  m.update(o, l);
2452
- for (let f = d.length, _ = 0; _ < f; _++) {
2452
+ for (let p = d.length, _ = 0; _ < p; _++) {
2453
2453
  const g = d[_], { start: v = 0, textures: w, textureLocationMap: S } = g;
2454
2454
  for (let C = w.length, k = 0; k < C; k++) {
2455
2455
  const me = w[k], ge = S.get(me);
@@ -2462,22 +2462,22 @@ ${Array.from({ length: e }, (l, c) => {
2462
2462
  }
2463
2463
  }
2464
2464
  _getBufferData(e) {
2465
- const t = qr(Math.ceil(e / 8)), s = Yr(t), i = t * 8;
2465
+ const t = Wr(Math.ceil(e / 8)), s = qr(t), i = t * 8;
2466
2466
  this._attributeBuffer.length <= s && (this._indexBuffers.length = s + 1);
2467
2467
  let a = this._attributeBuffer[i];
2468
2468
  return a || (this._attributeBuffer[i] = a = new ArrayBuffer(i * this._vertexSize * 4)), a;
2469
2469
  }
2470
2470
  _getIndexBufferData(e) {
2471
- const t = qr(Math.ceil(e / 12)), s = Yr(t), i = t * 12;
2471
+ const t = Wr(Math.ceil(e / 12)), s = qr(t), i = t * 12;
2472
2472
  this._indexBuffers.length <= s && (this._indexBuffers.length = s + 1);
2473
2473
  let a = this._indexBuffers[s];
2474
2474
  return a || (this._indexBuffers[s] = a = new Uint32Array(i)), a;
2475
2475
  }
2476
2476
  }
2477
- function qr(r) {
2477
+ function Wr(r) {
2478
2478
  return r += r === 0 ? 1 : 0, --r, r |= r >>> 1, r |= r >>> 2, r |= r >>> 4, r |= r >>> 8, r |= r >>> 16, r + 1;
2479
2479
  }
2480
- function Yr(r) {
2480
+ function qr(r) {
2481
2481
  let e = (r > 65535 ? 1 : 0) << 4;
2482
2482
  r >>>= e;
2483
2483
  let t = (r > 255 ? 1 : 0) << 3;
@@ -2512,18 +2512,18 @@ class Pa extends W {
2512
2512
  "x" in s && this._renderer.scissor.pop(), "render" in s && (this._renderer.flush(), a !== 0 ? this._renderer.stencil.bind(D.renderingMaskRemove, a) : (this._renderer.clear(it.stencil), this._renderer.stencil.bind(D.disabled, a)), a--, s.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(D.maskActive, a), this._renderer.colorMask.bind(15)), this._maskStackHash[i] = a;
2513
2513
  }
2514
2514
  }
2515
- var fr = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(fr || {}), vs = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(vs || {}), y = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(y || {});
2515
+ var pr = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(pr || {}), gs = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(gs || {}), y = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(y || {});
2516
2516
  class Ea {
2517
2517
  constructor(e) {
2518
2518
  this.native = e;
2519
2519
  }
2520
- target = vs.TEXTURE_2D;
2520
+ target = gs.TEXTURE_2D;
2521
2521
  width = -1;
2522
2522
  height = -1;
2523
2523
  mipmap = !1;
2524
2524
  type = y.UNSIGNED_BYTE;
2525
- internalFormat = fr.RGBA;
2526
- format = fr.RGBA;
2525
+ internalFormat = pr.RGBA;
2526
+ format = pr.RGBA;
2527
2527
  }
2528
2528
  function Sa(r) {
2529
2529
  return {
@@ -2764,7 +2764,7 @@ const Aa = {
2764
2764
  linear: 9986,
2765
2765
  nearest: 9984
2766
2766
  }
2767
- }, Kr = {
2767
+ }, Yr = {
2768
2768
  linear: 9729,
2769
2769
  nearest: 9728
2770
2770
  }, Ca = {
@@ -2787,24 +2787,24 @@ function Oa(r, e, t, s, i, a, o, n) {
2787
2787
  addressModeV: c = "repeat",
2788
2788
  addressModeW: u = "repeat",
2789
2789
  magFilter: d = "linear",
2790
- minFilter: p = "linear",
2790
+ minFilter: f = "linear",
2791
2791
  mipmapFilter: m = "linear",
2792
- maxAnisotropy: f = 0,
2792
+ maxAnisotropy: p = 0,
2793
2793
  compare: _
2794
2794
  } = r, g = a;
2795
2795
  if (!n || l !== "repeat" || c !== "repeat" || u !== "repeat") {
2796
2796
  const v = sr[o ? "clamp-to-edge" : l], w = sr[o ? "clamp-to-edge" : c], S = sr[o ? "clamp-to-edge" : u];
2797
2797
  e[i](g, e.TEXTURE_WRAP_S, v), e[i](g, e.TEXTURE_WRAP_T, w), e.TEXTURE_WRAP_R && e[i](g, e.TEXTURE_WRAP_R, S);
2798
2798
  }
2799
- if ((!n || d !== "linear") && e[i](g, e.TEXTURE_MAG_FILTER, Kr[d]), t) {
2799
+ if ((!n || d !== "linear") && e[i](g, e.TEXTURE_MAG_FILTER, Yr[d]), t) {
2800
2800
  if (!n || m !== "linear") {
2801
- const v = Aa[p][m];
2801
+ const v = Aa[f][m];
2802
2802
  e[i](g, e.TEXTURE_MIN_FILTER, v);
2803
2803
  }
2804
2804
  } else
2805
- e[i](g, e.TEXTURE_MIN_FILTER, Kr[p]);
2806
- if (s && f > 1) {
2807
- const v = Math.min(f, e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2805
+ e[i](g, e.TEXTURE_MIN_FILTER, Yr[f]);
2806
+ if (s && p > 1) {
2807
+ const v = Math.min(p, e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2808
2808
  e[i](g, s.TEXTURE_MAX_ANISOTROPY_EXT, v);
2809
2809
  }
2810
2810
  _ && e[i](g, e.TEXTURE_COMPARE_FUNC, Ca[_]);
@@ -3026,7 +3026,7 @@ class Na extends W {
3026
3026
  this._premultiplyAlpha = !1, e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha);
3027
3027
  }
3028
3028
  }
3029
- const Zr = {
3029
+ const Kr = {
3030
3030
  uint8x2: y.UNSIGNED_BYTE,
3031
3031
  uint8x4: y.UNSIGNED_BYTE,
3032
3032
  sint8x2: y.BYTE,
@@ -3059,7 +3059,7 @@ const Zr = {
3059
3059
  sint32x4: y.INT
3060
3060
  };
3061
3061
  function ka(r) {
3062
- return Zr[r] ?? Zr.float32;
3062
+ return Kr[r] ?? Kr.float32;
3063
3063
  }
3064
3064
  const Ua = {
3065
3065
  "point-list": 0,
@@ -3143,26 +3143,26 @@ class Ba extends W {
3143
3143
  const l = a[n], c = l.buffer, u = i.getGlBuffer(c), d = t.attributes[n];
3144
3144
  if (d) {
3145
3145
  o !== u && (i.bind(c), o = u);
3146
- const p = d.location;
3147
- s.enableVertexAttribArray(p);
3148
- const m = Ot(l.format), f = ka(l.format);
3146
+ const f = d.location;
3147
+ s.enableVertexAttribArray(f);
3148
+ const m = Ot(l.format), p = ka(l.format);
3149
3149
  if (d.format?.substring(1, 4) === "int" ? s.vertexAttribIPointer(
3150
- p,
3151
- m.size,
3152
3150
  f,
3151
+ m.size,
3152
+ p,
3153
3153
  l.stride ?? 0,
3154
3154
  l.start ?? 0
3155
3155
  ) : s.vertexAttribPointer(
3156
- p,
3157
- m.size,
3158
3156
  f,
3157
+ m.size,
3158
+ p,
3159
3159
  m.normalized,
3160
3160
  l.stride ?? 0,
3161
3161
  l.start ?? 0
3162
3162
  ), l.instance)
3163
3163
  if (this.hasInstance) {
3164
3164
  const _ = l.divisor ?? 1;
3165
- s.vertexAttribDivisor(p, _);
3165
+ s.vertexAttribDivisor(f, _);
3166
3166
  } else
3167
3167
  throw new Error("geometry error, GPU Instancing is not supported on this device");
3168
3168
  }
@@ -3228,15 +3228,15 @@ class La extends W {
3228
3228
  }
3229
3229
  }
3230
3230
  function Tt(r, e, t) {
3231
- const [s, i, a, o, n, l, c, u, d] = r, p = s * e + o * t + c, m = i * e + n * t + u, f = a * e + l * t + d;
3232
- return { x: p / f, y: m / f };
3231
+ const [s, i, a, o, n, l, c, u, d] = r, f = s * e + o * t + c, m = i * e + n * t + u, p = a * e + l * t + d;
3232
+ return { x: f / p, y: m / p };
3233
3233
  }
3234
3234
  function Fa(r, e) {
3235
- const { x: t, y: s, width: i, height: a } = e, o = Tt(r, t, s), n = Tt(r, t + i, s), l = Tt(r, t + i, s + a), c = Tt(r, t, s + a), u = [o, n, l, c], d = u.map((v) => v.x), p = u.map((v) => v.y), m = Math.min(...d), f = Math.max(...d), _ = Math.min(...p), g = Math.max(...p);
3235
+ const { x: t, y: s, width: i, height: a } = e, o = Tt(r, t, s), n = Tt(r, t + i, s), l = Tt(r, t + i, s + a), c = Tt(r, t, s + a), u = [o, n, l, c], d = u.map((v) => v.x), f = u.map((v) => v.y), m = Math.min(...d), p = Math.max(...d), _ = Math.min(...f), g = Math.max(...f);
3236
3236
  return {
3237
3237
  x: m,
3238
3238
  y: _,
3239
- width: f - m,
3239
+ width: p - m,
3240
3240
  height: g - _
3241
3241
  };
3242
3242
  }
@@ -3287,13 +3287,13 @@ class za extends W {
3287
3287
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3288
3288
  }
3289
3289
  }
3290
- const Ne = [];
3291
- Ne[D.none] = {};
3292
- Ne[D.disabled] = {
3290
+ const Me = [];
3291
+ Me[D.none] = {};
3292
+ Me[D.disabled] = {
3293
3293
  stencilWriteMask: 0,
3294
3294
  stencilReadMask: 0
3295
3295
  };
3296
- Ne[D.renderingMaskAdd] = {
3296
+ Me[D.renderingMaskAdd] = {
3297
3297
  stencilFront: {
3298
3298
  compare: "equal",
3299
3299
  passOp: "increment-clamp"
@@ -3303,7 +3303,7 @@ Ne[D.renderingMaskAdd] = {
3303
3303
  passOp: "increment-clamp"
3304
3304
  }
3305
3305
  };
3306
- Ne[D.renderingMaskRemove] = {
3306
+ Me[D.renderingMaskRemove] = {
3307
3307
  stencilFront: {
3308
3308
  compare: "equal",
3309
3309
  passOp: "decrement-clamp"
@@ -3313,7 +3313,7 @@ Ne[D.renderingMaskRemove] = {
3313
3313
  passOp: "decrement-clamp"
3314
3314
  }
3315
3315
  };
3316
- Ne[D.maskActive] = {
3316
+ Me[D.maskActive] = {
3317
3317
  stencilWriteMask: 0,
3318
3318
  stencilFront: {
3319
3319
  compare: "equal",
@@ -3324,7 +3324,7 @@ Ne[D.maskActive] = {
3324
3324
  passOp: "keep"
3325
3325
  }
3326
3326
  };
3327
- Ne[D.inverseMaskActive] = {
3327
+ Me[D.inverseMaskActive] = {
3328
3328
  stencilWriteMask: 0,
3329
3329
  stencilFront: {
3330
3330
  compare: "not-equal",
@@ -3389,7 +3389,7 @@ class Ga extends W {
3389
3389
  }
3390
3390
  };
3391
3391
  bind(e, t) {
3392
- const s = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], i = this._gl, a = Ne[e], o = this._cache;
3392
+ const s = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], i = this._gl, a = Me[e], o = this._cache;
3393
3393
  if (s.stencilMode = e, s.refCount = t, e === D.disabled) {
3394
3394
  this._cache.enabled && (this._cache.enabled = !1, i.disable(i.STENCIL_TEST));
3395
3395
  return;
@@ -3748,9 +3748,9 @@ class Xa extends Pr {
3748
3748
  return c;
3749
3749
  }
3750
3750
  }
3751
- class ke {
3751
+ class Ne {
3752
3752
  }
3753
- class ja extends ke {
3753
+ class ja extends Ne {
3754
3754
  install(e) {
3755
3755
  const t = async (s) => {
3756
3756
  const { parseFont: i } = await import("modern-font");
@@ -3765,7 +3765,7 @@ class ja extends ke {
3765
3765
  }), e.font = this, this;
3766
3766
  }
3767
3767
  }
3768
- var Wa = Object.defineProperty, bs = (r, e, t, s) => {
3768
+ var Wa = Object.defineProperty, vs = (r, e, t, s) => {
3769
3769
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
3770
3770
  (o = r[a]) && (i = o(e, t, i) || i);
3771
3771
  return i && Wa(e, t, i), i;
@@ -3775,10 +3775,10 @@ class We extends de {
3775
3775
  super(), this.setProperties(e);
3776
3776
  }
3777
3777
  }
3778
- bs([
3778
+ vs([
3779
3779
  h({ fallback: be.index })
3780
3780
  ], We.prototype, "usage");
3781
- bs([
3781
+ vs([
3782
3782
  h({ default: () => new Uint32Array() })
3783
3783
  ], We.prototype, "data");
3784
3784
  var qa = Object.defineProperty, Vt = (r, e, t, s) => {
@@ -3786,7 +3786,7 @@ var qa = Object.defineProperty, Vt = (r, e, t, s) => {
3786
3786
  (o = r[a]) && (i = o(e, t, i) || i);
3787
3787
  return i && qa(e, t, i), i;
3788
3788
  };
3789
- class Ue extends de {
3789
+ class ke extends de {
3790
3790
  constructor(e = {}) {
3791
3791
  super(), this.setProperties(e);
3792
3792
  }
@@ -3796,17 +3796,17 @@ class Ue extends de {
3796
3796
  }
3797
3797
  Vt([
3798
3798
  h({ fallback: "triangle-list" })
3799
- ], Ue.prototype, "topology");
3799
+ ], ke.prototype, "topology");
3800
3800
  Vt([
3801
3801
  h({ default: () => ({}) })
3802
- ], Ue.prototype, "attributes");
3802
+ ], ke.prototype, "attributes");
3803
3803
  Vt([
3804
3804
  h({ default: () => new We() })
3805
- ], Ue.prototype, "indexBuffer");
3805
+ ], ke.prototype, "indexBuffer");
3806
3806
  Vt([
3807
3807
  h({ fallback: 1 })
3808
- ], Ue.prototype, "instanceCount");
3809
- var Ya = Object.defineProperty, ys = (r, e, t, s) => {
3808
+ ], ke.prototype, "instanceCount");
3809
+ var Ya = Object.defineProperty, bs = (r, e, t, s) => {
3810
3810
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
3811
3811
  (o = r[a]) && (i = o(e, t, i) || i);
3812
3812
  return i && Ya(e, t, i), i;
@@ -3816,13 +3816,13 @@ class ye extends de {
3816
3816
  super(), this.setProperties(e);
3817
3817
  }
3818
3818
  }
3819
- ys([
3819
+ bs([
3820
3820
  h({ fallback: be.vertex })
3821
3821
  ], ye.prototype, "usage");
3822
- ys([
3822
+ bs([
3823
3823
  h({ default: () => new Float32Array() })
3824
3824
  ], ye.prototype, "data");
3825
- var Ka = Object.defineProperty, Be = (r, e, t, s) => {
3825
+ var Ka = Object.defineProperty, Ue = (r, e, t, s) => {
3826
3826
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
3827
3827
  (o = r[a]) && (i = o(e, t, i) || i);
3828
3828
  return i && Ka(e, t, i), i;
@@ -3832,28 +3832,28 @@ class H extends de {
3832
3832
  super(), this.setProperties(e);
3833
3833
  }
3834
3834
  }
3835
- Be([
3835
+ Ue([
3836
3836
  h({ default: () => new ye() })
3837
3837
  ], H.prototype, "buffer");
3838
- Be([
3838
+ Ue([
3839
3839
  h({ fallback: "float32" })
3840
3840
  ], H.prototype, "format");
3841
- Be([
3841
+ Ue([
3842
3842
  h()
3843
3843
  ], H.prototype, "instance");
3844
- Be([
3844
+ Ue([
3845
3845
  h()
3846
3846
  ], H.prototype, "stride");
3847
- Be([
3847
+ Ue([
3848
3848
  h()
3849
3849
  ], H.prototype, "offset");
3850
- Be([
3850
+ Ue([
3851
3851
  h()
3852
3852
  ], H.prototype, "start");
3853
- Be([
3853
+ Ue([
3854
3854
  h()
3855
3855
  ], H.prototype, "divisor");
3856
- class _c extends Ue {
3856
+ class _c extends ke {
3857
3857
  constructor() {
3858
3858
  super({
3859
3859
  topology: "triangle-strip",
@@ -4015,7 +4015,7 @@ void main(void) {
4015
4015
  });
4016
4016
  }
4017
4017
  }
4018
- class P extends Ue {
4018
+ class P extends ke {
4019
4019
  static _instance;
4020
4020
  static get instance() {
4021
4021
  return this._instance ??= new this();
@@ -4045,7 +4045,7 @@ class P extends Ue {
4045
4045
  });
4046
4046
  }
4047
4047
  }
4048
- class mc extends Ue {
4048
+ class mc extends ke {
4049
4049
  positionBuffer;
4050
4050
  uvBuffer;
4051
4051
  constructor(e) {
@@ -4158,7 +4158,7 @@ class x extends de {
4158
4158
  switch (super._updateProperty(e, t, s), e) {
4159
4159
  case "width":
4160
4160
  case "height":
4161
- this.isPowerOfTwo = $r(this.pixelWidth) && $r(this.pixelHeight);
4161
+ this.isPowerOfTwo = Vr(this.pixelWidth) && Vr(this.pixelHeight);
4162
4162
  break;
4163
4163
  case "source":
4164
4164
  this.updateSize();
@@ -4252,7 +4252,7 @@ class ao extends de {
4252
4252
  });
4253
4253
  }
4254
4254
  }
4255
- class xs extends x {
4255
+ class ys extends x {
4256
4256
  constructor(e = {}) {
4257
4257
  super({
4258
4258
  pixelRatio: 2,
@@ -4302,7 +4302,7 @@ class $t extends x {
4302
4302
  const a = i.getContext("2d");
4303
4303
  if (!a)
4304
4304
  throw new Error("Failed to parse linear gradient, get canvas context is null.");
4305
- const { angle: o = 0, stops: n } = e, l = t, c = s, u = l / 2, d = c / 2, p = (o + 90) * Math.PI / 180, m = Math.sin(p), f = -Math.cos(p), _ = Math.abs(l * Math.sin(p)) + Math.abs(c * Math.cos(p)), g = u - m * (_ / 2), v = d - f * (_ / 2), w = u + m * (_ / 2), S = d + f * (_ / 2), C = a.createLinearGradient(g, v, w, S);
4305
+ const { angle: o = 0, stops: n } = e, l = t, c = s, u = l / 2, d = c / 2, f = (o + 90) * Math.PI / 180, m = Math.sin(f), p = -Math.cos(f), _ = Math.abs(l * Math.sin(f)) + Math.abs(c * Math.cos(f)), g = u - m * (_ / 2), v = d - p * (_ / 2), w = u + m * (_ / 2), S = d + p * (_ / 2), C = a.createLinearGradient(g, v, w, S);
4306
4306
  for (const me of n) C.addColorStop(me.offset, me.color);
4307
4307
  a.fillStyle = C, a.fillRect(0, 0, l, c);
4308
4308
  const k = a.getImageData(0, 0, i.width, i.height);
@@ -4327,7 +4327,7 @@ class oo extends x {
4327
4327
  });
4328
4328
  }
4329
4329
  }
4330
- var no = Object.defineProperty, ws = (r, e, t, s) => {
4330
+ var no = Object.defineProperty, xs = (r, e, t, s) => {
4331
4331
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
4332
4332
  (o = r[a]) && (i = o(e, t, i) || i);
4333
4333
  return i && no(e, t, i), i;
@@ -4343,7 +4343,7 @@ function lo(r) {
4343
4343
  playsinline: !!(r?.playsinline ?? !0)
4344
4344
  };
4345
4345
  }
4346
- const Sr = class Ps extends x {
4346
+ const Sr = class ws extends x {
4347
4347
  static mimeTypes = new Map(Object.entries({
4348
4348
  ogv: "video/ogg",
4349
4349
  mov: "video/quicktime",
@@ -4387,7 +4387,7 @@ const Sr = class Ps extends x {
4387
4387
  l = n.slice(5, n.indexOf(";"));
4388
4388
  else if (!n.startsWith("blob:")) {
4389
4389
  const u = n.split("?").shift().toLowerCase(), d = u.slice(u.lastIndexOf(".") + 1);
4390
- l = l || Ps.mimeTypes.get(d) || `video/${d}`;
4390
+ l = l || ws.mimeTypes.get(d) || `video/${d}`;
4391
4391
  }
4392
4392
  const c = document.createElement("source");
4393
4393
  c.src = n, l && (c.type = l), a.appendChild(c);
@@ -4452,10 +4452,10 @@ const Sr = class Ps extends x {
4452
4452
  e && (e.removeEventListener("play", this._onPlayStart), e.removeEventListener("pause", this._onPlayStop), e.removeEventListener("seeked", this._onSeeked), e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlay), e.removeEventListener("error", this._onError, !0), e.pause(), e.src = "", e.load());
4453
4453
  }
4454
4454
  };
4455
- ws([
4455
+ xs([
4456
4456
  h({ internal: !0, fallback: !0 })
4457
4457
  ], Sr.prototype, "autoUpdate");
4458
- ws([
4458
+ xs([
4459
4459
  h({ internal: !0, fallback: 0 })
4460
4460
  ], Sr.prototype, "fps");
4461
4461
  let co = Sr;
@@ -4491,7 +4491,7 @@ class ho extends Ct {
4491
4491
  t = this.style.stroke;
4492
4492
  break;
4493
4493
  case "object":
4494
- Gr(this.style.stroke) && (t = this.style.stroke.color);
4494
+ zr(this.style.stroke) && (t = this.style.stroke.color);
4495
4495
  break;
4496
4496
  }
4497
4497
  this._draws.push({
@@ -4526,7 +4526,7 @@ class ho extends Ct {
4526
4526
  t = this.style.fill;
4527
4527
  break;
4528
4528
  case "object":
4529
- Gr(this.style.fill) && (t = this.style.fill.color);
4529
+ zr(this.style.fill) && (t = this.style.fill.color);
4530
4530
  break;
4531
4531
  }
4532
4532
  this._draws.push({
@@ -4617,7 +4617,7 @@ class uo {
4617
4617
  return [...this.default];
4618
4618
  }
4619
4619
  }
4620
- class po extends Ee {
4620
+ class fo extends Ee {
4621
4621
  constructor(e) {
4622
4622
  return super(), this.parent = e, new Proxy(this, {
4623
4623
  get: (t, s, i) => Reflect.has(t, s) || String(s).startsWith("_") ? Reflect.get(t, s, i) : t.getProperty(String(s)),
@@ -4637,18 +4637,18 @@ class po extends Ee {
4637
4637
  return { internalKey: `____${e}` };
4638
4638
  }
4639
4639
  }
4640
- var fo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, se = (r, e, t, s) => {
4640
+ var po = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, se = (r, e, t, s) => {
4641
4641
  for (var i = s > 1 ? void 0 : s ? _o(e, t) : e, a = r.length - 1, o; a >= 0; a--)
4642
4642
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
4643
- return s && i && fo(e, t, i), i;
4643
+ return s && i && po(e, t, i), i;
4644
4644
  };
4645
- const Jr = {};
4645
+ const Zr = {};
4646
4646
  function mo(r) {
4647
- let e = Jr[r] ?? 0;
4648
- return e++, Jr[r] = e, e;
4647
+ let e = Zr[r] ?? 0;
4648
+ return e++, Zr[r] = e, e;
4649
4649
  }
4650
4650
  let I = class extends Ee {
4651
- _meta = new po(this);
4651
+ _meta = new fo(this);
4652
4652
  get meta() {
4653
4653
  return this._meta;
4654
4654
  }
@@ -5026,7 +5026,7 @@ let I = class extends Ee {
5026
5026
  );
5027
5027
  }
5028
5028
  toJSON() {
5029
- return ss({
5029
+ return rs({
5030
5030
  ...super.toJSON(),
5031
5031
  is: this.meta.inCanvasIs ? void 0 : this.is,
5032
5032
  children: this.children.length ? [...this.children.map((r) => r.toJSON())] : void 0,
@@ -5041,10 +5041,10 @@ let I = class extends Ee {
5041
5041
  }
5042
5042
  };
5043
5043
  se([
5044
- h({ default: () => is() })
5044
+ h({ default: () => ss() })
5045
5045
  ], I.prototype, "id", 2);
5046
5046
  se([
5047
- h({ default: () => is() })
5047
+ h({ default: () => ss() })
5048
5048
  ], I.prototype, "name", 2);
5049
5049
  se([
5050
5050
  h({ fallback: "inherit" })
@@ -5145,7 +5145,7 @@ var bo = Object.defineProperty, yo = Object.getOwnPropertyDescriptor, Ht = (r, e
5145
5145
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5146
5146
  return s && i && bo(e, t, i), i;
5147
5147
  };
5148
- let Ge = class extends q {
5148
+ let ze = class extends q {
5149
5149
  _parentGlobalVisible;
5150
5150
  _globalVisible;
5151
5151
  get globalVisible() {
@@ -5260,8 +5260,8 @@ let Ge = class extends q {
5260
5260
  1 + -a / e.height
5261
5261
  ), l = new Float32Array(o.length);
5262
5262
  for (let c = o.length, u = 0; u < c; u += 2) {
5263
- const { x: d, y: p } = n.apply({ x: o[u], y: o[u + 1] });
5264
- l[u] = d, l[u + 1] = p;
5263
+ const { x: d, y: f } = n.apply({ x: o[u], y: o[u + 1] });
5264
+ l[u] = d, l[u + 1] = f;
5265
5265
  }
5266
5266
  return r.uvs = l, e.texture;
5267
5267
  }
@@ -5282,17 +5282,17 @@ let Ge = class extends q {
5282
5282
  };
5283
5283
  Ht([
5284
5284
  h()
5285
- ], Ge.prototype, "blendMode", 2);
5285
+ ], ze.prototype, "blendMode", 2);
5286
5286
  Ht([
5287
5287
  h({ internal: !0, fallback: !0 })
5288
- ], Ge.prototype, "visible", 2);
5288
+ ], ze.prototype, "visible", 2);
5289
5289
  Ht([
5290
5290
  h({ internal: !0, fallback: 1 })
5291
- ], Ge.prototype, "opacity", 2);
5292
- Ge = Ht([
5291
+ ], ze.prototype, "opacity", 2);
5292
+ ze = Ht([
5293
5293
  b("CanvasItem")
5294
- ], Ge);
5295
- var xo = Object.defineProperty, wo = Object.getOwnPropertyDescriptor, Le = (r, e, t, s) => {
5294
+ ], ze);
5295
+ var xo = Object.defineProperty, wo = Object.getOwnPropertyDescriptor, Be = (r, e, t, s) => {
5296
5296
  for (var i = s > 1 ? void 0 : s ? wo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5297
5297
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5298
5298
  return s && i && xo(e, t, i), i;
@@ -5373,28 +5373,28 @@ let X = class extends I {
5373
5373
  return this.canvasTransform.apply(r, e);
5374
5374
  }
5375
5375
  };
5376
- Le([
5376
+ Be([
5377
5377
  h({ fallback: 0 })
5378
5378
  ], X.prototype, "x", 2);
5379
- Le([
5379
+ Be([
5380
5380
  h({ fallback: 0 })
5381
5381
  ], X.prototype, "y", 2);
5382
- Le([
5382
+ Be([
5383
5383
  h({ fallback: 0 })
5384
5384
  ], X.prototype, "width", 2);
5385
- Le([
5385
+ Be([
5386
5386
  h({ fallback: 0 })
5387
5387
  ], X.prototype, "height", 2);
5388
- Le([
5388
+ Be([
5389
5389
  h({ fallback: 0 })
5390
5390
  ], X.prototype, "mipLevel", 2);
5391
- Le([
5391
+ Be([
5392
5392
  h({ fallback: !1 })
5393
5393
  ], X.prototype, "msaa", 2);
5394
- X = Le([
5394
+ X = Be([
5395
5395
  b("Viewport")
5396
5396
  ], X);
5397
- var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, ft = (r, e, t, s) => {
5397
+ var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, pt = (r, e, t, s) => {
5398
5398
  for (var i = s > 1 ? void 0 : s ? Eo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5399
5399
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5400
5400
  return s && i && Po(e, t, i), i;
@@ -5460,8 +5460,8 @@ let T = class extends q {
5460
5460
  const a = {
5461
5461
  minX: Number.MAX_SAFE_INTEGER,
5462
5462
  minY: Number.MAX_SAFE_INTEGER,
5463
- maxX: 0,
5464
- maxY: 0
5463
+ maxX: Number.MIN_SAFE_INTEGER,
5464
+ maxY: Number.MIN_SAFE_INTEGER
5465
5465
  };
5466
5466
  if (t.forEach((n, l) => {
5467
5467
  const c = n.renderable;
@@ -5475,7 +5475,7 @@ let T = class extends q {
5475
5475
  }
5476
5476
  s = s ?? l, i = l;
5477
5477
  }
5478
- }), s === void 0 || i === void 0)
5478
+ }), s === void 0 || i === void 0 || a.minX === Number.MAX_SAFE_INTEGER || a.minY === Number.MAX_SAFE_INTEGER || a.maxX === Number.MIN_SAFE_INTEGER || a.maxY === Number.MIN_SAFE_INTEGER)
5479
5479
  return;
5480
5480
  const o = {
5481
5481
  x: a.minX,
@@ -5483,7 +5483,7 @@ let T = class extends q {
5483
5483
  width: a.maxX - a.minX,
5484
5484
  height: a.maxY - a.minY
5485
5485
  };
5486
- o.width === Number.MAX_SAFE_INTEGER || o.height === Number.MAX_SAFE_INTEGER || (!this.needsRender && (this._rect.width !== o.width || this._rect.height !== o.height) && this.requestRender(), this.needsRender ? (t.splice(i + 1, 0, r.createCall(this)), t.splice(s, 0, r.createCall(this))) : t.splice(s, i + 1, r.createCall(this)), (this._rect.x !== o.x || this._rect.y !== o.y || this._rect.width !== o.width || this._rect.height !== o.height) && (this._rect = o, this.emit("updateRect")));
5486
+ !this.needsRender && (this._rect.width !== o.width || this._rect.height !== o.height) && this.requestRender(), this.needsRender ? (t.splice(i + 1, 0, r.createCall(this)), t.splice(s, 0, r.createCall(this))) : t.splice(s, i + 1, r.createCall(this)), (this._rect.x !== o.x || this._rect.y !== o.y || this._rect.width !== o.width || this._rect.height !== o.height) && (this._rect = o, this.emit("updateRect"));
5487
5487
  }
5488
5488
  _processChildren() {
5489
5489
  this.children.length && (super.emit("process"), this._tree?.renderStack.push(this));
@@ -5586,19 +5586,19 @@ let T = class extends q {
5586
5586
  }));
5587
5587
  }
5588
5588
  };
5589
- ft([
5589
+ pt([
5590
5590
  h({ internal: !0 })
5591
5591
  ], T.prototype, "material", 2);
5592
- ft([
5592
+ pt([
5593
5593
  h()
5594
5594
  ], T.prototype, "effectMode", 2);
5595
- ft([
5595
+ pt([
5596
5596
  h()
5597
5597
  ], T.prototype, "glsl", 2);
5598
- ft([
5598
+ pt([
5599
5599
  h()
5600
5600
  ], T.prototype, "glslSrc", 2);
5601
- T = ft([
5601
+ T = pt([
5602
5602
  b("Effect")
5603
5603
  ], T);
5604
5604
  class So {
@@ -5652,20 +5652,10 @@ let xe = class extends I {
5652
5652
  }
5653
5653
  return this;
5654
5654
  }
5655
- _updateProperty(r, e, t) {
5656
- switch (super._updateProperty(r, e, t), r) {
5657
- case "startTime":
5658
- this.startTime = Math.min(e, this.endTime);
5659
- break;
5660
- case "endTime":
5661
- this.endTime = e || Number.MAX_SAFE_INTEGER;
5662
- break;
5663
- }
5664
- }
5665
5655
  addTime(r) {
5666
- const e = this.startTime, t = this.endTime;
5656
+ const e = this.endTime, t = Math.min(this.startTime, this.endTime);
5667
5657
  let s = this.currentTime;
5668
- return s = s + r, this.loop && s > t && (s = e + s % t), s = ce(s, e, t), this.currentTime = s, this.emit("updateCurrentTime", s, r), this;
5658
+ return s = s + r, this.loop && s > e && (s = t + s % e), s = ce(s, t, e), this.currentTime = s, this.emit("updateCurrentTime", s, r), this;
5669
5659
  }
5670
5660
  _process(r) {
5671
5661
  super._process(r), this.paused || this.addTime(r);
@@ -5713,7 +5703,7 @@ var Oo = Object.defineProperty, Te = (r, e, t, s) => {
5713
5703
  (o = r[a]) && (i = o(e, t, i) || i);
5714
5704
  return i && Oo(e, t, i), i;
5715
5705
  };
5716
- class pe extends wr {
5706
+ class fe extends wr {
5717
5707
  input = new Zi();
5718
5708
  renderStack = new So();
5719
5709
  root = new _r().setTree(this);
@@ -5762,51 +5752,51 @@ class pe extends wr {
5762
5752
  }
5763
5753
  Te([
5764
5754
  h({ alias: "root.msaa" })
5765
- ], pe.prototype, "msaa");
5755
+ ], fe.prototype, "msaa");
5766
5756
  Te([
5767
5757
  h({ fallback: !1 })
5768
- ], pe.prototype, "pixelate");
5758
+ ], fe.prototype, "pixelate");
5769
5759
  Te([
5770
5760
  h({ fallback: !1 })
5771
- ], pe.prototype, "roundPixels");
5761
+ ], fe.prototype, "roundPixels");
5772
5762
  Te([
5773
5763
  h()
5774
- ], pe.prototype, "backgroundColor");
5764
+ ], fe.prototype, "backgroundColor");
5775
5765
  Te([
5776
5766
  h({ internal: !0, fallback: !1 })
5777
- ], pe.prototype, "debug");
5767
+ ], fe.prototype, "debug");
5778
5768
  Te([
5779
5769
  h({ internal: !0, fallback: !1 })
5780
- ], pe.prototype, "processPaused");
5770
+ ], fe.prototype, "processPaused");
5781
5771
  Te([
5782
5772
  h({ internal: !0, default: () => yi })
5783
- ], pe.prototype, "fonts");
5773
+ ], fe.prototype, "fonts");
5784
5774
  Te([
5785
5775
  h({ internal: !0, default: () => new xe() })
5786
- ], pe.prototype, "timeline");
5776
+ ], fe.prototype, "timeline");
5787
5777
  var Do = Object.getOwnPropertyDescriptor, Io = (r, e, t, s) => {
5788
5778
  for (var i = s > 1 ? void 0 : s ? Do(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5789
5779
  (o = r[a]) && (i = o(i) || i);
5790
5780
  return i;
5791
5781
  };
5792
- let Ve = class extends T {
5782
+ let Ge = class extends T {
5793
5783
  constructor(r, e = []) {
5794
5784
  super(), this.setProperties(r).append(e);
5795
5785
  }
5796
5786
  };
5797
- Ve = Io([
5787
+ Ge = Io([
5798
5788
  b("Transition", {
5799
5789
  effectMode: "transition",
5800
5790
  processMode: "pausable",
5801
5791
  duration: 2e3
5802
5792
  })
5803
- ], Ve);
5793
+ ], Ge);
5804
5794
  var Mo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Rr = (r, e, t, s) => {
5805
5795
  for (var i = s > 1 ? void 0 : s ? No(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5806
5796
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5807
5797
  return s && i && Mo(e, t, i), i;
5808
5798
  };
5809
- let Ie = class extends Ge {
5799
+ let Ie = class extends ze {
5810
5800
  position = new O().on("update", () => this.updateGlobalTransform());
5811
5801
  scale = new O(1, 1).on("update", () => this.updateGlobalTransform());
5812
5802
  skew = new O().on("update", () => this.updateGlobalTransform());
@@ -5847,8 +5837,8 @@ let Ie = class extends Ge {
5847
5837
  const { a: e, c: t, tx: s, b: i, d: a, ty: o } = this.globalTransform.toObject(), n = r.vertices.slice(), l = r.transformVertex ?? (() => {
5848
5838
  });
5849
5839
  let c, u;
5850
- for (let d = n.length, p = 0; p < d; p += 2)
5851
- c = n[p], u = n[p + 1], n[p] = e * c + t * u + s, n[p + 1] = i * c + a * u + o, l(n, p);
5840
+ for (let d = n.length, f = 0; f < d; f += 2)
5841
+ c = n[f], u = n[f + 1], n[f] = e * c + t * u + s, n[f + 1] = i * c + a * u + o, l(n, f);
5852
5842
  return n;
5853
5843
  }
5854
5844
  _relayout(r) {
@@ -6010,7 +6000,7 @@ Nt = Ar([
6010
6000
  renderMode: "disabled"
6011
6001
  })
6012
6002
  ], Nt);
6013
- const Qr = {
6003
+ const Jr = {
6014
6004
  brightness: 1,
6015
6005
  contrast: 1,
6016
6006
  grayscale: 0,
@@ -6021,18 +6011,18 @@ const Qr = {
6021
6011
  sepia: 0
6022
6012
  };
6023
6013
  function gc(r) {
6024
- const e = new ps();
6014
+ const e = new ds();
6025
6015
  if (r === "none")
6026
6016
  return e;
6027
6017
  const t = zt(r).reduce((s, { name: i, args: a }) => (s[i] = a[0].normalizedIntValue, s), {});
6028
- Object.keys(Qr).forEach((s) => {
6029
- t[s] = t[s] ?? Qr[s];
6018
+ Object.keys(Jr).forEach((s) => {
6019
+ t[s] = t[s] ?? Jr[s];
6030
6020
  });
6031
6021
  for (const s in t) {
6032
6022
  const i = t[s];
6033
6023
  switch (s) {
6034
6024
  case "hue-rotate":
6035
- e.hueRotate(i * z);
6025
+ e.hueRotate(i * G);
6036
6026
  break;
6037
6027
  case "saturate":
6038
6028
  e.saturate(i);
@@ -6095,23 +6085,23 @@ function Bo(r, e, t, s = new M()) {
6095
6085
  s.scale3d(o[0], o[1] ?? o[0], o[2] ?? o[1] ?? o[0]);
6096
6086
  break;
6097
6087
  case "rotate":
6098
- s.rotate(o[0] * z);
6088
+ s.rotate(o[0] * G);
6099
6089
  break;
6100
6090
  case "rotateX":
6101
- s.rotateX(o[0] * z);
6091
+ s.rotateX(o[0] * G);
6102
6092
  break;
6103
6093
  case "rotateY":
6104
- s.rotateY(o[0] * z);
6094
+ s.rotateY(o[0] * G);
6105
6095
  break;
6106
6096
  case "rotateZ":
6107
- s.rotateZ(o[0] * z);
6097
+ s.rotateZ(o[0] * G);
6108
6098
  break;
6109
6099
  case "rotate3d":
6110
6100
  s.rotate3d(
6111
- o[0] * z,
6112
- (o[1] ?? o[0]) * z,
6113
- (o[2] ?? o[1] ?? o[0]) * z,
6114
- (o[3] ?? o[2] ?? o[1] ?? o[0]) * z
6101
+ o[0] * G,
6102
+ (o[1] ?? o[0]) * G,
6103
+ (o[2] ?? o[1] ?? o[0]) * G,
6104
+ (o[3] ?? o[2] ?? o[1] ?? o[0]) * G
6115
6105
  );
6116
6106
  break;
6117
6107
  case "skew":
@@ -6146,10 +6136,10 @@ function Lo(r) {
6146
6136
  }
6147
6137
  });
6148
6138
  }
6149
- var Es = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, fe = (r, e, t, s) => {
6139
+ var Ps = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, pe = (r, e, t, s) => {
6150
6140
  for (var i = s > 1 ? void 0 : s ? Fo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6151
6141
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6152
- return s && i && Es(e, t, i), i;
6142
+ return s && i && Ps(e, t, i), i;
6153
6143
  }, Go = (r, e, t) => zo(r, e + "", t);
6154
6144
  let j = class extends T {
6155
6145
  constructor(r, e = []) {
@@ -6208,45 +6198,45 @@ void main(void) {
6208
6198
  }`
6209
6199
  }
6210
6200
  }));
6211
- fe([
6201
+ pe([
6212
6202
  h({ fallback: 1 })
6213
6203
  ], j.prototype, "saturation", 2);
6214
- fe([
6204
+ pe([
6215
6205
  h({ fallback: 1 })
6216
6206
  ], j.prototype, "contrast", 2);
6217
- fe([
6207
+ pe([
6218
6208
  h({ fallback: 1 })
6219
6209
  ], j.prototype, "brightness", 2);
6220
- fe([
6210
+ pe([
6221
6211
  h({ fallback: 1 })
6222
6212
  ], j.prototype, "red", 2);
6223
- fe([
6213
+ pe([
6224
6214
  h({ fallback: 1 })
6225
6215
  ], j.prototype, "green", 2);
6226
- fe([
6216
+ pe([
6227
6217
  h({ fallback: 1 })
6228
6218
  ], j.prototype, "blue", 2);
6229
- fe([
6219
+ pe([
6230
6220
  h({ fallback: 1 })
6231
6221
  ], j.prototype, "alpha", 2);
6232
- fe([
6222
+ pe([
6233
6223
  h({ fallback: 1 })
6234
6224
  ], j.prototype, "gamma", 2);
6235
- j = fe([
6225
+ j = pe([
6236
6226
  b("ColorAdjustEffect")
6237
6227
  ], j);
6238
- var Ss = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, $o = (r, e, t) => e in r ? Ss(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ts = (r, e, t, s) => {
6228
+ var Es = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, $o = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ss = (r, e, t, s) => {
6239
6229
  for (var i = s > 1 ? void 0 : s ? Vo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6240
6230
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6241
- return s && i && Ss(e, t, i), i;
6231
+ return s && i && Es(e, t, i), i;
6242
6232
  }, Ho = (r, e, t) => $o(r, e + "", t);
6243
- let $e = class extends T {
6244
- _colorMatrix = new ps();
6233
+ let Ve = class extends T {
6234
+ _colorMatrix = new ds();
6245
6235
  constructor(r, e = []) {
6246
6236
  super(), this.setProperties(r).append(e);
6247
6237
  }
6248
6238
  _updateProperty(r, e, t) {
6249
- super._updateProperty(r, e, t), r === "filter" && (this.renderMode = this.filter ? "inherit" : "disabled");
6239
+ super._updateProperty(r, e, t), r === "filter" && (this.renderMode = this.filter ? "inherit" : "disabled", this.requestRender());
6250
6240
  }
6251
6241
  apply(r, e) {
6252
6242
  if (!this.filter)
@@ -6257,7 +6247,7 @@ let $e = class extends T {
6257
6247
  switch (i) {
6258
6248
  case "hue-rotate":
6259
6249
  case "hueRotate":
6260
- s.hueRotate(o[0] * z);
6250
+ s.hueRotate(o[0] * G);
6261
6251
  break;
6262
6252
  case "saturate":
6263
6253
  s.saturate(o[0]);
@@ -6282,14 +6272,14 @@ let $e = class extends T {
6282
6272
  break;
6283
6273
  }
6284
6274
  }), e.redraw(r, () => {
6285
- P.draw(r, $e.material, {
6275
+ P.draw(r, Ve.material, {
6286
6276
  sampler: 0,
6287
6277
  m: s.toArray()
6288
6278
  });
6289
6279
  });
6290
6280
  }
6291
6281
  };
6292
- Ho($e, "material", new E({
6282
+ Ho(Ve, "material", new E({
6293
6283
  gl: {
6294
6284
  vertex: `attribute vec2 position;
6295
6285
  attribute vec2 uv;
@@ -6316,19 +6306,19 @@ void main(void) {
6316
6306
  }`
6317
6307
  }
6318
6308
  }));
6319
- Ts([
6309
+ Ss([
6320
6310
  h()
6321
- ], $e.prototype, "filter", 2);
6322
- $e = Ts([
6311
+ ], Ve.prototype, "filter", 2);
6312
+ Ve = Ss([
6323
6313
  b("ColorFilterEffect")
6324
- ], $e);
6325
- var Rs = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, jo = (r, e, t) => e in r ? Rs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Cr = (r, e, t, s) => {
6314
+ ], Ve);
6315
+ var Ts = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, jo = (r, e, t) => e in r ? Ts(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Cr = (r, e, t, s) => {
6326
6316
  for (var i = s > 1 ? void 0 : s ? Xo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6327
6317
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6328
- return s && i && Rs(e, t, i), i;
6318
+ return s && i && Ts(e, t, i), i;
6329
6319
  }, Wo = (r, e, t) => jo(r, e + "", t);
6330
6320
  const at = 50;
6331
- let He = class extends T {
6321
+ let $e = class extends T {
6332
6322
  _color = new ne();
6333
6323
  constructor(r, e = []) {
6334
6324
  super(), this.setProperties(r).append(e);
@@ -6342,14 +6332,14 @@ let He = class extends T {
6342
6332
  });
6343
6333
  for (; t.length < at; )
6344
6334
  t.push([0, 0, 0, 0]);
6345
- P.draw(r, He.material, {
6335
+ P.draw(r, $e.material, {
6346
6336
  sampler: 0,
6347
6337
  colors: t.slice(0, at).flatMap((s) => s)
6348
6338
  });
6349
6339
  });
6350
6340
  }
6351
6341
  };
6352
- Wo(He, "material", new E({
6342
+ Wo($e, "material", new E({
6353
6343
  gl: {
6354
6344
  vertex: `precision mediump float;
6355
6345
  attribute vec2 position;
@@ -6400,19 +6390,19 @@ void main(void) {
6400
6390
  }));
6401
6391
  Cr([
6402
6392
  h({ default: () => [] })
6403
- ], He.prototype, "colors", 2);
6393
+ ], $e.prototype, "colors", 2);
6404
6394
  Cr([
6405
6395
  h({ fallback: 0.5 })
6406
- ], He.prototype, "alpha", 2);
6407
- He = Cr([
6396
+ ], $e.prototype, "alpha", 2);
6397
+ $e = Cr([
6408
6398
  b("ColorOverlayEffect")
6409
- ], He);
6410
- var As = Object.defineProperty, qo = Object.getOwnPropertyDescriptor, Yo = (r, e, t) => e in r ? As(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Or = (r, e, t, s) => {
6399
+ ], $e);
6400
+ var Rs = Object.defineProperty, qo = Object.getOwnPropertyDescriptor, Yo = (r, e, t) => e in r ? Rs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Or = (r, e, t, s) => {
6411
6401
  for (var i = s > 1 ? void 0 : s ? qo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6412
6402
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6413
- return s && i && As(e, t, i), i;
6403
+ return s && i && Rs(e, t, i), i;
6414
6404
  }, Ko = (r, e, t) => Yo(r, e + "", t);
6415
- let Xe = class extends T {
6405
+ let He = class extends T {
6416
6406
  _color = new ne();
6417
6407
  constructor(r, e = []) {
6418
6408
  super(), this.setProperties(r).append(e);
@@ -6424,7 +6414,7 @@ let Xe = class extends T {
6424
6414
  i.slice(0, 50).forEach((a, o) => {
6425
6415
  s[o * 3] = a[0], s[o * 3 + 1] = a[1], s[o * 3 + 2] = a[2];
6426
6416
  }), e.redraw(r, () => {
6427
- P.draw(r, Xe.material, {
6417
+ P.draw(r, He.material, {
6428
6418
  sampler: 0,
6429
6419
  epsilon: this.epsilon,
6430
6420
  originalColors: s
@@ -6432,7 +6422,7 @@ let Xe = class extends T {
6432
6422
  });
6433
6423
  }
6434
6424
  };
6435
- Ko(Xe, "material", new E({
6425
+ Ko(He, "material", new E({
6436
6426
  gl: {
6437
6427
  vertex: `precision mediump float;
6438
6428
  attribute vec2 position;
@@ -6469,20 +6459,20 @@ void main(void) {
6469
6459
  }));
6470
6460
  Or([
6471
6461
  h({ default: () => [] })
6472
- ], Xe.prototype, "colors", 2);
6462
+ ], He.prototype, "colors", 2);
6473
6463
  Or([
6474
6464
  h({ fallback: 0.5 })
6475
- ], Xe.prototype, "epsilon", 2);
6476
- Xe = Or([
6465
+ ], He.prototype, "epsilon", 2);
6466
+ He = Or([
6477
6467
  b("ColorRemoveEffect")
6478
- ], Xe);
6479
- var Cs = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, Jo = (r, e, t) => e in r ? Cs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Dr = (r, e, t, s) => {
6468
+ ], He);
6469
+ var As = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, Jo = (r, e, t) => e in r ? As(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Dr = (r, e, t, s) => {
6480
6470
  for (var i = s > 1 ? void 0 : s ? Zo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6481
6471
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6482
- return s && i && Cs(e, t, i), i;
6472
+ return s && i && As(e, t, i), i;
6483
6473
  }, Qo = (r, e, t) => Jo(r, e + "", t);
6484
6474
  const rt = 50;
6485
- let je = class extends T {
6475
+ let Xe = class extends T {
6486
6476
  _color = new ne();
6487
6477
  constructor(r, e = []) {
6488
6478
  super(), this.setProperties(r).append(e);
@@ -6506,7 +6496,7 @@ let je = class extends T {
6506
6496
  t.slice(0, rt).forEach(([o, n], l) => {
6507
6497
  i[l * 3] = o[0], i[l * 3 + 1] = o[1], i[l * 3 + 2] = o[2], a[l * 3] = n[0], a[l * 3 + 1] = n[1], a[l * 3 + 2] = n[2];
6508
6498
  }), e.redraw(r, () => {
6509
- P.draw(r, je.material, {
6499
+ P.draw(r, Xe.material, {
6510
6500
  sampler: 0,
6511
6501
  epsilon: s,
6512
6502
  originalColors: i,
@@ -6515,7 +6505,7 @@ let je = class extends T {
6515
6505
  });
6516
6506
  }
6517
6507
  };
6518
- Qo(je, "material", new E({
6508
+ Qo(Xe, "material", new E({
6519
6509
  gl: {
6520
6510
  vertex: `precision mediump float;
6521
6511
  attribute vec2 position;
@@ -6559,13 +6549,13 @@ void main(void) {
6559
6549
  }));
6560
6550
  Dr([
6561
6551
  h({ default: () => [] })
6562
- ], je.prototype, "colors", 2);
6552
+ ], Xe.prototype, "colors", 2);
6563
6553
  Dr([
6564
6554
  h({ fallback: 0.05 })
6565
- ], je.prototype, "epsilon", 2);
6566
- je = Dr([
6555
+ ], Xe.prototype, "epsilon", 2);
6556
+ Xe = Dr([
6567
6557
  b("ColorReplaceEffect")
6568
- ], je);
6558
+ ], Xe);
6569
6559
  const en = `precision highp float;
6570
6560
 
6571
6561
  in vec2 vUv;
@@ -6717,10 +6707,10 @@ void main(void) {
6717
6707
  gl_FragColor = color;
6718
6708
  }
6719
6709
  `;
6720
- var Os = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, rn = (r, e, t) => e in r ? Os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Re = (r, e, t, s) => {
6710
+ var Cs = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, rn = (r, e, t) => e in r ? Cs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Re = (r, e, t, s) => {
6721
6711
  for (var i = s > 1 ? void 0 : s ? tn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6722
6712
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6723
- return s && i && Os(e, t, i), i;
6713
+ return s && i && Cs(e, t, i), i;
6724
6714
  }, sn = (r, e, t) => rn(r, e + "", t);
6725
6715
  let Y = class extends T {
6726
6716
  _watermark;
@@ -6810,12 +6800,12 @@ Re([
6810
6800
  Y = Re([
6811
6801
  b("DrawboardEffect")
6812
6802
  ], Y);
6813
- var Ds = Object.defineProperty, an = Object.getOwnPropertyDescriptor, on = (r, e, t) => e in r ? Ds(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ir = (r, e, t, s) => {
6803
+ var Os = Object.defineProperty, an = Object.getOwnPropertyDescriptor, on = (r, e, t) => e in r ? Os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ir = (r, e, t, s) => {
6814
6804
  for (var i = s > 1 ? void 0 : s ? an(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6815
6805
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6816
- return s && i && Ds(e, t, i), i;
6817
- }, Is = (r, e, t) => on(r, typeof e != "symbol" ? e + "" : e, t);
6818
- const Ms = `varying vec2 vUv[9];
6806
+ return s && i && Os(e, t, i), i;
6807
+ }, Ds = (r, e, t) => on(r, typeof e != "symbol" ? e + "" : e, t);
6808
+ const Is = `varying vec2 vUv[9];
6819
6809
  uniform sampler2D sampler;
6820
6810
 
6821
6811
  void main(void) {
@@ -6872,7 +6862,7 @@ let he = class extends T {
6872
6862
  });
6873
6863
  }
6874
6864
  };
6875
- Is(he, "materialX", new E({
6865
+ Ds(he, "materialX", new E({
6876
6866
  gl: {
6877
6867
  vertex: `attribute vec2 position;
6878
6868
  attribute vec2 uv;
@@ -6891,10 +6881,10 @@ void main(void) {
6891
6881
  vUv[7] = uv + vec2(3.0 * uStrength, 0.0);
6892
6882
  vUv[8] = uv + vec2(4.0 * uStrength, 0.0);
6893
6883
  }`,
6894
- fragment: Ms
6884
+ fragment: Is
6895
6885
  }
6896
6886
  }));
6897
- Is(he, "materialY", new E({
6887
+ Ds(he, "materialY", new E({
6898
6888
  gl: {
6899
6889
  vertex: `attribute vec2 position;
6900
6890
  attribute vec2 uv;
@@ -6913,7 +6903,7 @@ void main(void) {
6913
6903
  vUv[7] = uv + vec2(0.0, 3.0 * uStrength);
6914
6904
  vUv[8] = uv + vec2(0.0, 4.0 * uStrength);
6915
6905
  }`,
6916
- fragment: Ms
6906
+ fragment: Is
6917
6907
  }
6918
6908
  }));
6919
6909
  Ir([
@@ -6925,10 +6915,10 @@ Ir([
6925
6915
  he = Ir([
6926
6916
  b("GaussianBlurEffect")
6927
6917
  ], he);
6928
- var Ns = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, ln = (r, e, t) => e in r ? Ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ye = (r, e, t, s) => {
6918
+ var Ms = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, ln = (r, e, t) => e in r ? Ms(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ye = (r, e, t, s) => {
6929
6919
  for (var i = s > 1 ? void 0 : s ? nn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6930
6920
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6931
- return s && i && Ns(e, t, i), i;
6921
+ return s && i && Ms(e, t, i), i;
6932
6922
  }, cn = (r, e, t) => ln(r, e + "", t);
6933
6923
  let re = class extends T {
6934
6924
  blurEffect = new he();
@@ -6999,10 +6989,10 @@ Ye([
6999
6989
  re = Ye([
7000
6990
  b("DropShadowEffect")
7001
6991
  ], re);
7002
- var ks = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, un = (r, e, t) => e in r ? ks(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Us = (r, e, t, s) => {
6992
+ var Ns = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, un = (r, e, t) => e in r ? Ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ks = (r, e, t, s) => {
7003
6993
  for (var i = s > 1 ? void 0 : s ? hn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7004
6994
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
7005
- return s && i && ks(e, t, i), i;
6995
+ return s && i && Ns(e, t, i), i;
7006
6996
  }, dn = (r, e, t) => un(r, e + "", t);
7007
6997
  let lt = class extends T {
7008
6998
  constructor(r, e = []) {
@@ -7046,18 +7036,18 @@ void main(void) {
7046
7036
  }`
7047
7037
  }
7048
7038
  }));
7049
- Us([
7039
+ ks([
7050
7040
  h({ fallback: 5 })
7051
7041
  ], lt.prototype, "strength", 2);
7052
- lt = Us([
7042
+ lt = ks([
7053
7043
  b("EmbossEffect")
7054
7044
  ], lt);
7055
- var Bs = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, fn = (r, e, t) => e in r ? Bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ie = (r, e, t, s) => {
7056
- for (var i = s > 1 ? void 0 : s ? pn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7045
+ var Us = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, pn = (r, e, t) => e in r ? Us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ie = (r, e, t, s) => {
7046
+ for (var i = s > 1 ? void 0 : s ? fn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7057
7047
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
7058
- return s && i && Bs(e, t, i), i;
7059
- }, _n = (r, e, t) => fn(r, e + "", t);
7060
- let G = class extends T {
7048
+ return s && i && Us(e, t, i), i;
7049
+ }, _n = (r, e, t) => pn(r, e + "", t);
7050
+ let V = class extends T {
7061
7051
  _canvas;
7062
7052
  _texture;
7063
7053
  _sizes;
@@ -7081,7 +7071,7 @@ let G = class extends T {
7081
7071
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
7082
7072
  const t = e.width, s = e.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
7083
7073
  e.redraw(r, () => {
7084
- this._texture.activate(r, 1), P.draw(r, G.material, {
7074
+ this._texture.activate(r, 1), P.draw(r, V.material, {
7085
7075
  sampler: 0,
7086
7076
  filterClamp: [0, 0, 1, 1],
7087
7077
  filterArea: [t, s, 0, 0],
@@ -7100,7 +7090,7 @@ let G = class extends T {
7100
7090
  });
7101
7091
  }
7102
7092
  };
7103
- _n(G, "material", new E({
7093
+ _n(V, "material", new E({
7104
7094
  gl: {
7105
7095
  vertex: `in vec2 position;
7106
7096
  in vec2 uv;
@@ -7207,38 +7197,38 @@ void main(void) {
7207
7197
  }));
7208
7198
  ie([
7209
7199
  h({ fallback: 10 })
7210
- ], G.prototype, "slices", 2);
7200
+ ], V.prototype, "slices", 2);
7211
7201
  ie([
7212
7202
  h({ fallback: 512 })
7213
- ], G.prototype, "sampleSize", 2);
7203
+ ], V.prototype, "sampleSize", 2);
7214
7204
  ie([
7215
7205
  h({ fallback: 100 })
7216
- ], G.prototype, "offset", 2);
7206
+ ], V.prototype, "offset", 2);
7217
7207
  ie([
7218
7208
  h({ fallback: 0 })
7219
- ], G.prototype, "direction", 2);
7209
+ ], V.prototype, "direction", 2);
7220
7210
  ie([
7221
7211
  h({ fallback: 2 })
7222
- ], G.prototype, "fillMode", 2);
7212
+ ], V.prototype, "fillMode", 2);
7223
7213
  ie([
7224
7214
  h({ fallback: 0 })
7225
- ], G.prototype, "seed", 2);
7215
+ ], V.prototype, "seed", 2);
7226
7216
  ie([
7227
7217
  h({ default: () => [2, 2] })
7228
- ], G.prototype, "red", 2);
7218
+ ], V.prototype, "red", 2);
7229
7219
  ie([
7230
7220
  h({ default: () => [-10, 4] })
7231
- ], G.prototype, "green", 2);
7221
+ ], V.prototype, "green", 2);
7232
7222
  ie([
7233
7223
  h({ default: () => [10, -4] })
7234
- ], G.prototype, "blue", 2);
7235
- G = ie([
7224
+ ], V.prototype, "blue", 2);
7225
+ V = ie([
7236
7226
  b("GlitchEffect")
7237
- ], G);
7238
- var Ls = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, gn = (r, e, t) => e in r ? Ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ae = (r, e, t, s) => {
7227
+ ], V);
7228
+ var Bs = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, gn = (r, e, t) => e in r ? Bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ae = (r, e, t, s) => {
7239
7229
  for (var i = s > 1 ? void 0 : s ? mn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7240
7230
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
7241
- return s && i && Ls(e, t, i), i;
7231
+ return s && i && Bs(e, t, i), i;
7242
7232
  }, vn = (r, e, t) => gn(r, e + "", t);
7243
7233
  const bn = `vec3 mod289(vec3 x) {
7244
7234
  return x - floor(x * (1.0 / 289.0)) * 289.0;
@@ -7526,31 +7516,25 @@ Xt([
7526
7516
  ct = Xt([
7527
7517
  b("KawaseBlurEffect")
7528
7518
  ], ct);
7529
- var Fs = Object.defineProperty, En = Object.getOwnPropertyDescriptor, Sn = (r, e, t) => e in r ? Fs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Mr = (r, e, t, s) => {
7519
+ var Ls = Object.defineProperty, En = Object.getOwnPropertyDescriptor, Sn = (r, e, t) => e in r ? Ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Fs = (r, e, t, s) => {
7530
7520
  for (var i = s > 1 ? void 0 : s ? En(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7531
7521
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
7532
- return s && i && Fs(e, t, i), i;
7522
+ return s && i && Ls(e, t, i), i;
7533
7523
  }, Tn = (r, e, t) => Sn(r, e + "", t);
7534
- let Me = class extends T {
7524
+ let je = class extends T {
7525
+ texture;
7535
7526
  constructor(r, e = []) {
7536
7527
  super(), this.setProperties(r).append(e);
7537
7528
  }
7538
7529
  async load() {
7539
- this.texture = void 0, this.image && (this.texture = await $.texture.load(this.image), this.requestRender());
7530
+ this.image ? (this.texture = await $.texture.load(this.image), this.requestRender()) : this.texture = void 0;
7540
7531
  }
7541
7532
  _updateProperty(r, e, t) {
7542
- switch (super._updateProperty(r, e, t), r) {
7543
- case "image":
7544
- this.load();
7545
- break;
7546
- case "texture":
7547
- t?.free?.();
7548
- break;
7549
- }
7533
+ super._updateProperty(r, e, t), r === "image" && this.load();
7550
7534
  }
7551
7535
  apply(r, e, t) {
7552
7536
  this.texture && e.redraw(r, () => {
7553
- this.texture.activate(r, 1), P.draw(r, Me.material, {
7537
+ this.texture.activate(r, 1), P.draw(r, je.material, {
7554
7538
  sampler: 0,
7555
7539
  mask: 1,
7556
7540
  rotation: t.target?.globalRotation ?? 0
@@ -7558,7 +7542,7 @@ let Me = class extends T {
7558
7542
  });
7559
7543
  }
7560
7544
  };
7561
- Tn(Me, "material", new E({
7545
+ Tn(je, "material", new E({
7562
7546
  gl: {
7563
7547
  vertex: `attribute vec2 position;
7564
7548
  in vec2 uv;
@@ -7593,15 +7577,12 @@ void main(void) {
7593
7577
  }`
7594
7578
  }
7595
7579
  }));
7596
- Mr([
7597
- h({ internal: !0 })
7598
- ], Me.prototype, "texture", 2);
7599
- Mr([
7580
+ Fs([
7600
7581
  h({ fallback: "" })
7601
- ], Me.prototype, "image", 2);
7602
- Me = Mr([
7582
+ ], je.prototype, "image", 2);
7583
+ je = Fs([
7603
7584
  b("MaskEffect")
7604
- ], Me);
7585
+ ], je);
7605
7586
  var zs = Object.defineProperty, Rn = Object.getOwnPropertyDescriptor, An = (r, e, t) => e in r ? zs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ce = (r, e, t, s) => {
7606
7587
  for (var i = s > 1 ? void 0 : s ? Rn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7607
7588
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
@@ -7927,12 +7908,12 @@ function kt(r, e) {
7927
7908
  1 / Math.abs(1 + (-v - S))
7928
7909
  ), o = !0;
7929
7910
  }
7930
- const { a: l, c, tx: u, b: d, d: p, ty: m } = n.toObject();
7931
- let f, _;
7911
+ const { a: l, c, tx: u, b: d, d: f, ty: m } = n.toObject();
7912
+ let p, _;
7932
7913
  return {
7933
7914
  clipOutsideUv: o,
7934
7915
  transformUv: (g, v) => {
7935
- f = g[v], _ = g[v + 1], g[v] = l * f + c * _ + u, g[v + 1] = d * f + p * _ + m;
7916
+ p = g[v], _ = g[v + 1], g[v] = l * p + c * _ + u, g[v + 1] = d * p + f * _ + m;
7936
7917
  }
7937
7918
  };
7938
7919
  }
@@ -7952,7 +7933,7 @@ class F extends Ee {
7952
7933
  }
7953
7934
  setProperties(e) {
7954
7935
  return this._setProperties(
7955
- V(e) ? void 0 : li(e)
7936
+ z(e) ? void 0 : li(e)
7956
7937
  );
7957
7938
  }
7958
7939
  _updateProperty(e, t, s) {
@@ -7981,7 +7962,7 @@ class F extends Ee {
7981
7962
  Math.floor(this.parent.size.width),
7982
7963
  Math.floor(this.parent.size.height)
7983
7964
  );
7984
- else if (V(this.image))
7965
+ else if (z(this.image))
7985
7966
  this.animatedTexture = void 0, this.texture = void 0;
7986
7967
  else if (this.parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
7987
7968
  let e = this.image.split("?")[0].endsWith(".gif");
@@ -8074,7 +8055,7 @@ var Bn = Object.defineProperty, Ln = (r, e, t, s) => {
8074
8055
  class Xs extends F {
8075
8056
  setProperties(e) {
8076
8057
  return super._setProperties(
8077
- V(e) ? void 0 : ci(e)
8058
+ z(e) ? void 0 : ci(e)
8078
8059
  );
8079
8060
  }
8080
8061
  _updateProperty(e, t, s) {
@@ -8092,7 +8073,7 @@ var Fn = Object.defineProperty, zn = (r, e, t, s) => {
8092
8073
  class js extends F {
8093
8074
  setProperties(e) {
8094
8075
  return super._setProperties(
8095
- V(e) ? void 0 : hi(e)
8076
+ z(e) ? void 0 : hi(e)
8096
8077
  );
8097
8078
  }
8098
8079
  _updateProperty(e, t, s) {
@@ -8110,7 +8091,7 @@ var Gn = Object.defineProperty, gt = (r, e, t, s) => {
8110
8091
  class Ke extends F {
8111
8092
  setProperties(e) {
8112
8093
  return super._setProperties(
8113
- V(e) ? void 0 : ui(e)
8094
+ z(e) ? void 0 : ui(e)
8114
8095
  );
8115
8096
  }
8116
8097
  _updateProperty(e, t, s) {
@@ -8160,7 +8141,7 @@ class Ze extends Ee {
8160
8141
  }
8161
8142
  setProperties(e) {
8162
8143
  return super.setProperties(
8163
- V(e) ? void 0 : di(e)
8144
+ z(e) ? void 0 : di(e)
8164
8145
  );
8165
8146
  }
8166
8147
  _updateProperty(e, t, s) {
@@ -8206,7 +8187,7 @@ class Je extends Ee {
8206
8187
  _path2DSet = new Pi();
8207
8188
  setProperties(e) {
8208
8189
  return super.setProperties(
8209
- V(e) ? void 0 : pi(e)
8190
+ z(e) ? void 0 : fi(e)
8210
8191
  );
8211
8192
  }
8212
8193
  _updateProperty(e, t, s) {
@@ -8238,14 +8219,14 @@ class Je extends Ee {
8238
8219
  }
8239
8220
  const [t, s, i, a] = e;
8240
8221
  this._path2DSet.paths.forEach((o) => {
8241
- o.applyTransform(new Vr().translate(-t, -s).scale(1 / i, 1 / a));
8222
+ o.applyTransform(new Gr().translate(-t, -s).scale(1 / i, 1 / a));
8242
8223
  });
8243
8224
  }
8244
8225
  draw(e = !1) {
8245
8226
  if (!e && this.isValid()) {
8246
8227
  const t = this.parent.context, { width: s, height: i } = this.parent.size;
8247
8228
  this._path2DSet.paths.forEach((a) => {
8248
- t.addPath(a.clone().applyTransform(new Vr().scale(s, i)));
8229
+ t.addPath(a.clone().applyTransform(new Gr().scale(s, i)));
8249
8230
  });
8250
8231
  } else
8251
8232
  this._drawRect();
@@ -8275,15 +8256,15 @@ class Ws extends de {
8275
8256
  super(), this.setProperties(e);
8276
8257
  }
8277
8258
  }
8278
- const es = {
8279
- ...fi(),
8259
+ const Qr = {
8260
+ ...pi(),
8280
8261
  left: 0,
8281
8262
  top: 0,
8282
8263
  width: 0,
8283
8264
  height: 0
8284
8265
  };
8285
- for (const r in es)
8286
- ts(Ws, r, { fallback: es[r] });
8266
+ for (const r in Qr)
8267
+ es(Ws, r, { fallback: Qr[r] });
8287
8268
  var Hn = Object.defineProperty, _e = (r, e, t, s) => {
8288
8269
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
8289
8270
  (o = r[a]) && (i = o(e, t, i) || i);
@@ -8294,15 +8275,22 @@ class ae extends Ee {
8294
8275
  super(), this.parent = e, this.base = new Ti(), this.base.setPropertyAccessor(this);
8295
8276
  }
8296
8277
  base;
8278
+ get innerText() {
8279
+ return this._innerText;
8280
+ }
8281
+ set innerText(e) {
8282
+ this.setContent(e);
8283
+ }
8284
+ _innerText = "";
8297
8285
  _autoDrawMode;
8298
8286
  _autoDrawThreshold = 100;
8299
- _texture = new xs({
8287
+ _texture = new ys({
8300
8288
  mipmap: !0
8301
8289
  });
8302
8290
  _textureMap = /* @__PURE__ */ new Map();
8303
8291
  setProperties(e) {
8304
8292
  return super.setProperties(
8305
- V(e) ? void 0 : _i(e)
8293
+ z(e) ? void 0 : _i(e)
8306
8294
  );
8307
8295
  }
8308
8296
  _updateProperty(e, t, s) {
@@ -8321,6 +8309,7 @@ class ae extends Ee {
8321
8309
  this.update(), this._updateTextureMap();
8322
8310
  break;
8323
8311
  }
8312
+ e === "content" && (this._innerText = this.getStringContent());
8324
8313
  }
8325
8314
  update() {
8326
8315
  this.base.fonts = this.base.fonts ?? this.parent.tree?.fonts, this.base.update();
@@ -8362,7 +8351,7 @@ class ae extends Ee {
8362
8351
  e.linearGradient ?? e.radialGradient,
8363
8352
  t.width,
8364
8353
  t.height
8365
- ) : V(e.image) ? void 0 : (this.parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
8354
+ ) : z(e.image) ? void 0 : (this.parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
8366
8355
  }
8367
8356
  setContent(e) {
8368
8357
  this.content = mi(e);
@@ -8381,9 +8370,9 @@ class ae extends Ee {
8381
8370
  if (e.scale.x > 0 && e.scale.y > 0)
8382
8371
  return;
8383
8372
  const t = e.scale.x * e.scale.y, s = e.pivot, i = new M().translate(-s.x, -s.y).scale(t > 0 ? 1 : -1, 1).translate(s.x, s.y), { a, c: o, tx: n, b: l, d: c, ty: u } = i.toObject();
8384
- let d, p;
8385
- return (m, f) => {
8386
- d = m[f], p = m[f + 1], m[f] = a * d + o * p + n, m[f + 1] = l * d + c * p + u;
8373
+ let d, f;
8374
+ return (m, p) => {
8375
+ d = m[p], f = m[p + 1], m[p] = a * d + o * f + n, m[p + 1] = l * d + c * f + u;
8387
8376
  };
8388
8377
  }
8389
8378
  useTextureDraw() {
@@ -8396,7 +8385,7 @@ class ae extends Ee {
8396
8385
  const i = s.getMeta();
8397
8386
  if (i instanceof Ri) {
8398
8387
  const a = i.parent.index, o = i.parent.parent.index;
8399
- if (s.style.fill && !V(s.style.fill))
8388
+ if (s.style.fill && !z(s.style.fill))
8400
8389
  if (typeof s.style.fill == "object") {
8401
8390
  const n = s.style.fill, l = this._textureMap.get(`${o}.${a}.fill`) ?? this._textureMap.get(`${o}.fill`) ?? this._textureMap.get("fill");
8402
8391
  n.enabled !== !1 && (l || n.color) && (e.addPath(s), e.style = { ...s.style }, e.fillStyle = l?.texture ?? n.color, e.fill({
@@ -8415,7 +8404,7 @@ class ae extends Ee {
8415
8404
  e.addPath(s), e.style = { ...s.style }, e.fill({
8416
8405
  transformVertex: this._createTransformVertex()
8417
8406
  });
8418
- if (s.style.stroke && !V(s.style.stroke))
8407
+ if (s.style.stroke && !z(s.style.stroke))
8419
8408
  if (typeof s.style.stroke == "object") {
8420
8409
  const n = s.style.stroke, l = this._textureMap.get(`${o}.${a}.outline`) ?? this._textureMap.get(`${o}.outline`) ?? this._textureMap.get("outline");
8421
8410
  n.enabled !== !1 && (l || n.color) && (n.width === void 0 || n.width) && (e.addPath(s), e.style = { ...s.style }, e.lineWidth = n.width || 1, e.strokeStyle = l?.texture ?? n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke({
@@ -8444,11 +8433,11 @@ class ae extends Ee {
8444
8433
  _textureDraw(e) {
8445
8434
  const { left: t = 0, top: s = 0, width: i, height: a } = this.base.boundingBox;
8446
8435
  e.fillStyle = this._texture, e.rect(t, s, i, a);
8447
- const o = new M().translate(-t, -s).scale(1 / i, 1 / a), { a: n, c: l, tx: c, b: u, d, ty: p } = o.toObject();
8448
- let m, f;
8436
+ const o = new M().translate(-t, -s).scale(1 / i, 1 / a), { a: n, c: l, tx: c, b: u, d, ty: f } = o.toObject();
8437
+ let m, p;
8449
8438
  e.fill({
8450
8439
  transformUv: (_, g) => {
8451
- m = _[g], f = _[g + 1], _[g] = n * m + l * f + c, _[g + 1] = u * m + d * f + p;
8440
+ m = _[g], p = _[g + 1], _[g] = n * m + l * p + c, _[g + 1] = u * m + d * p + f;
8452
8441
  },
8453
8442
  transformVertex: this._createTransformVertex()
8454
8443
  });
@@ -8602,7 +8591,7 @@ const R = {
8602
8591
  "content-box": 1
8603
8592
  // BoxSizing.ContentBox
8604
8593
  };
8605
- class Nr {
8594
+ class Mr {
8606
8595
  constructor(e) {
8607
8596
  this._el = e, this._addChild = this._addChild.bind(this), this._removeChild = this._removeChild.bind(this), this._el.on("addChild", this._addChild), this._el.on("removeChild", this._removeChild);
8608
8597
  }
@@ -8611,7 +8600,7 @@ class Nr {
8611
8600
  const { loadYoga: e } = await import("yoga-layout/load");
8612
8601
  this._yoga = await e();
8613
8602
  }
8614
- node = Nr._yoga?.Node.create();
8603
+ node = Mr._yoga?.Node.create();
8615
8604
  _addChild(e, t) {
8616
8605
  if (e instanceof Pe && e.flexbox.node && this.node) {
8617
8606
  this.node.insertChild(e.flexbox.node, t);
@@ -8801,7 +8790,7 @@ let Pe = class extends Ie {
8801
8790
  get globalDisplay() {
8802
8791
  return this._globalDisplay;
8803
8792
  }
8804
- flexbox = new Nr(this);
8793
+ flexbox = new Mr(this);
8805
8794
  size = new O().on("update", () => {
8806
8795
  this.onUpdateStyleProperty("transformOrigin", this.style.transformOrigin, void 0), this.onUpdateStyleProperty("transform", this.style.transform, void 0), this.updateGlobalTransform(), this.requestDraw();
8807
8796
  });
@@ -8865,7 +8854,8 @@ let Pe = class extends Ie {
8865
8854
  set shadow(r) {
8866
8855
  this._shadow.resetProperties().setProperties(r);
8867
8856
  }
8868
- _styleFilter;
8857
+ _colorFilterEffect;
8858
+ _maskEffect;
8869
8859
  constructor(r, e = []) {
8870
8860
  super(), this.setProperties(r).append(e);
8871
8861
  }
@@ -8898,7 +8888,7 @@ let Pe = class extends Ie {
8898
8888
  this.updateGlobalDisplay();
8899
8889
  break;
8900
8890
  case "rotate":
8901
- this.rotation = e * pr;
8891
+ this.rotation = e * fr;
8902
8892
  break;
8903
8893
  case "scaleX":
8904
8894
  this.scale.x = e, this.text.isValid() && (e ^ t) < 0 && this.requestDraw();
@@ -8935,10 +8925,10 @@ let Pe = class extends Ie {
8935
8925
  this.visible = e === "visible";
8936
8926
  break;
8937
8927
  case "filter":
8938
- e ? this._getStyleFilter().filter = e : (this._styleFilter?.remove(), this._styleFilter = void 0), this.requestPaint();
8928
+ this._updateStyleFilter(e);
8939
8929
  break;
8940
8930
  case "maskImage":
8941
- this._updateMaskImage(e);
8931
+ this._updateStyleMaskImage(e);
8942
8932
  break;
8943
8933
  case "backgroundColor":
8944
8934
  this.background.color = e;
@@ -8962,7 +8952,7 @@ let Pe = class extends Ie {
8962
8952
  this._overflowHidden = e === "hidden";
8963
8953
  break;
8964
8954
  case "pointerEvents":
8965
- this._allowPointerEvents = !V(e);
8955
+ this._allowPointerEvents = !z(e);
8966
8956
  break;
8967
8957
  case "borderRadius":
8968
8958
  this.requestDraw();
@@ -8997,18 +8987,17 @@ let Pe = class extends Ie {
8997
8987
  const e = this.getParent();
8998
8988
  this._parentGlobalDisplay !== e?.globalDisplay && this.updateGlobalDisplay(), this.flexbox.update(), super._process(r);
8999
8989
  }
9000
- _getStyleFilter() {
9001
- return this._styleFilter || (this._styleFilter = new $e({ internalMode: "front" }), this.append(this._styleFilter)), this._styleFilter;
8990
+ _updateStyleFilter(r) {
8991
+ z(r) ? (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender()) : (this._colorFilterEffect || (this._colorFilterEffect = new Ve({
8992
+ name: "styleFilter",
8993
+ internalMode: "front"
8994
+ }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = r);
9002
8995
  }
9003
- _updateMaskImage(r) {
9004
- const e = "__$style.maskImage";
9005
- if (r && r !== "none") {
9006
- const t = this.getNode(e);
9007
- t ? t.image = r : this.appendChild(new Me({ name: e, image: r }), "back");
9008
- } else {
9009
- const t = this.getNode(e);
9010
- t && this.removeChild(t);
9011
- }
8996
+ _updateStyleMaskImage(r) {
8997
+ z(r) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new je({
8998
+ name: "styleMaskImage",
8999
+ internalMode: "back"
9000
+ }), this.append(this._maskEffect)), this._maskEffect.image = r);
9012
9001
  }
9013
9002
  updateGlobalTransform() {
9014
9003
  super.updateGlobalTransform(), this._updateMask();
@@ -9123,7 +9112,7 @@ let Pe = class extends Ie {
9123
9112
  }
9124
9113
  toJSON() {
9125
9114
  const r = (e) => Object.keys(e).length > 0 ? e : void 0;
9126
- return ss({
9115
+ return rs({
9127
9116
  ...super.toJSON(),
9128
9117
  style: r(this.style.toJSON()),
9129
9118
  background: r(this.background.toJSON()),
@@ -9154,7 +9143,7 @@ var Kn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Ys = (r, e
9154
9143
  return s && i && Kn(e, t, i), i;
9155
9144
  };
9156
9145
  let mr = class extends qs {
9157
- texture = new xs();
9146
+ texture = new ys();
9158
9147
  animation;
9159
9148
  constructor(r, e = []) {
9160
9149
  super(), this.setProperties(r), this.append(e);
@@ -9265,11 +9254,11 @@ var sl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, jt = (r, e
9265
9254
  };
9266
9255
  const al = (r) => r, ol = yt(0.25, 0.1, 0.25, 1), nl = yt(0.42, 0, 1, 1), ll = yt(0, 0, 0.58, 1), cl = yt(0.42, 0, 0.58, 1);
9267
9256
  function yt(r, e, t, s) {
9268
- const a = 3 * r - 3 * t + 1, o = 3 * t - 6 * r, n = 3 * r, l = 3 * e - 3 * s + 1, c = 3 * s - 6 * e, u = 3 * e, d = (_) => (3 * a * _ + 2 * o) * _ + n, p = (_) => ((a * _ + o) * _ + n) * _, m = (_) => ((l * _ + c) * _ + u) * _;
9269
- function f(_) {
9257
+ const a = 3 * r - 3 * t + 1, o = 3 * t - 6 * r, n = 3 * r, l = 3 * e - 3 * s + 1, c = 3 * s - 6 * e, u = 3 * e, d = (_) => (3 * a * _ + 2 * o) * _ + n, f = (_) => ((a * _ + o) * _ + n) * _, m = (_) => ((l * _ + c) * _ + u) * _;
9258
+ function p(_) {
9270
9259
  let g = _, v, w;
9271
9260
  for (let k = 0; k < 8; k++) {
9272
- if (w = p(g) - _, Math.abs(w) < 1e-6)
9261
+ if (w = f(g) - _, Math.abs(w) < 1e-6)
9273
9262
  return g;
9274
9263
  if (v = d(g), Math.abs(v) < 1e-6)
9275
9264
  break;
@@ -9277,13 +9266,13 @@ function yt(r, e, t, s) {
9277
9266
  }
9278
9267
  let S = 1, C = 0;
9279
9268
  for (g = _; S > C; ) {
9280
- if (w = p(g) - _, Math.abs(w) < 1e-6)
9269
+ if (w = f(g) - _, Math.abs(w) < 1e-6)
9281
9270
  return g;
9282
9271
  w > 0 ? S = g : C = g, g = (S + C) / 2;
9283
9272
  }
9284
9273
  return g;
9285
9274
  }
9286
- return (_) => m(f(_));
9275
+ return (_) => m(p(_));
9287
9276
  }
9288
9277
  const ur = {
9289
9278
  linear: al,
@@ -9395,11 +9384,11 @@ let ut = class extends q {
9395
9384
  const {
9396
9385
  offset: u,
9397
9386
  easing: d
9398
- } = t, p = { ...t.props };
9399
- return e.forEach((m, f) => {
9400
- (!(f in p) || p[f] === null) && (p[f] = m), (!(f in c) || c[f] === null) && (c[f] = m);
9387
+ } = t, f = { ...t.props };
9388
+ return e.forEach((m, p) => {
9389
+ (!(p in f) || f[p] === null) && (f[p] = m), (!(p in c) || c[p] === null) && (c[p] = m);
9401
9390
  }), [
9402
- { offset: u, easing: d, props: p },
9391
+ { offset: u, easing: d, props: f },
9403
9392
  { offset: n, easing: l, props: c }
9404
9393
  ];
9405
9394
  }
@@ -9408,20 +9397,20 @@ let ut = class extends q {
9408
9397
  return null;
9409
9398
  }
9410
9399
  _commitStyle(r, e, t, s, i) {
9411
- const { offset: a, easing: o, props: n } = s, { offset: l, props: c } = i, u = l - a, d = o((r - a) / u), p = {
9400
+ const { offset: a, easing: o, props: n } = s, { offset: l, props: c } = i, u = l - a, d = o((r - a) / u), f = {
9412
9401
  width: e.size.x,
9413
9402
  height: e.size.y,
9414
9403
  fontSize: e.style.fontSize
9415
9404
  };
9416
- t.forEach((m, f) => {
9405
+ t.forEach((m, p) => {
9417
9406
  e.onUpdateStyleProperty(
9418
- f,
9407
+ p,
9419
9408
  this._getDiffValue(
9420
- f,
9421
- n[f],
9422
- c[f],
9409
+ p,
9410
+ n[p],
9411
+ c[p],
9423
9412
  d,
9424
- p
9413
+ f
9425
9414
  ),
9426
9415
  void 0
9427
9416
  );
@@ -9431,25 +9420,25 @@ let ut = class extends q {
9431
9420
  let a, o;
9432
9421
  if (e === "none" && (e = void 0), t === "none" && (t = void 0), e === void 0 || t === void 0)
9433
9422
  if (e !== void 0)
9434
- a = Et(r, String(e), i), o = Hr(a);
9423
+ a = Et(r, String(e), i), o = $r(a);
9435
9424
  else if (t !== void 0)
9436
- o = Et(r, String(t), i), a = Hr(o);
9425
+ o = Et(r, String(t), i), a = $r(o);
9437
9426
  else
9438
9427
  return;
9439
9428
  else
9440
9429
  a = Et(r, String(e), i), o = Et(r, String(t), i);
9441
9430
  if (Array.isArray(a) && Array.isArray(o)) {
9442
9431
  const n = /* @__PURE__ */ new Set(), l = {}, c = {};
9443
- a.forEach(({ name: d, args: p }) => {
9444
- l[d] = p, n.add(d);
9445
- }), o.forEach(({ name: d, args: p }) => {
9446
- c[d] = p, n.add(d);
9432
+ a.forEach(({ name: d, args: f }) => {
9433
+ l[d] = f, n.add(d);
9434
+ }), o.forEach(({ name: d, args: f }) => {
9435
+ c[d] = f, n.add(d);
9447
9436
  });
9448
9437
  let u = "";
9449
9438
  return n.forEach((d) => {
9450
- const p = Math.max(l[d]?.length ?? 0, c[d]?.length ?? 0), m = l[d], f = c[d];
9451
- u += `${d}(${Array.from({ length: p }, (_, g) => {
9452
- const v = m?.[g], w = f?.[g], S = v?.normalizedIntValue ?? 0, C = w?.normalizedIntValue ?? 0;
9439
+ const f = Math.max(l[d]?.length ?? 0, c[d]?.length ?? 0), m = l[d], p = c[d];
9440
+ u += `${d}(${Array.from({ length: f }, (_, g) => {
9441
+ const v = m?.[g], w = p?.[g], S = v?.normalizedIntValue ?? 0, C = w?.normalizedIntValue ?? 0;
9453
9442
  return Number.isNaN(S) || Number.isNaN(C) ? w?.value ?? 0 : A(S, C, s);
9454
9443
  }).join(", ")}) `;
9455
9444
  }), u;
@@ -9493,10 +9482,10 @@ ut = jt([
9493
9482
  duration: 2e3
9494
9483
  })
9495
9484
  ], ut);
9496
- class kr extends ue {
9485
+ class Nr extends ue {
9497
9486
  static _instance;
9498
9487
  static get instance() {
9499
- return this._instance || (this._instance = new kr()), this._instance;
9488
+ return this._instance || (this._instance = new Nr()), this._instance;
9500
9489
  }
9501
9490
  playbackRate = 1;
9502
9491
  muted = !1;
@@ -9680,7 +9669,7 @@ class hl {
9680
9669
  return !!this.source && this.source.readyState === 4;
9681
9670
  }
9682
9671
  get context() {
9683
- return kr.instance;
9672
+ return Nr.instance;
9684
9673
  }
9685
9674
  async load() {
9686
9675
  return new Promise((e) => {
@@ -9724,16 +9713,16 @@ class vc {
9724
9713
  }
9725
9714
  }
9726
9715
  function ul() {
9727
- if (ns)
9716
+ if (os)
9728
9717
  return new AudioContext();
9729
- if (ls) {
9718
+ if (ns) {
9730
9719
  const r = globalThis.webkitAudioContext;
9731
9720
  return new r();
9732
9721
  } else
9733
9722
  throw new Error("Failed to createAudioContext");
9734
9723
  }
9735
9724
  function dl(r, e, t) {
9736
- if (cs)
9725
+ if (ls)
9737
9726
  return new OfflineAudioContext(r, e, t);
9738
9727
  if (Bi) {
9739
9728
  const s = globalThis.webkitOfflineAudioContext;
@@ -9789,7 +9778,7 @@ class Oe extends Zs {
9789
9778
  const e = ul(), t = dl(
9790
9779
  1,
9791
9780
  2,
9792
- cs ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9781
+ ls ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9793
9782
  ), s = e.createDynamicsCompressor(), i = e.createAnalyser();
9794
9783
  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" && (ve || Ui), xr && (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));
9795
9784
  }
@@ -9833,7 +9822,7 @@ class Oe extends Zs {
9833
9822
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
9834
9823
  }
9835
9824
  }
9836
- class pl extends ue {
9825
+ class fl extends ue {
9837
9826
  _audio = null;
9838
9827
  _sourceNode = null;
9839
9828
  _gain = null;
@@ -9988,7 +9977,7 @@ class pl extends ue {
9988
9977
  super.destroy(), this._stop(), this._gain?.disconnect(), this._gain = null, this._audio?.context.off("refresh", this.refresh), this._audio?.context.off("refreshPaused", this.refreshPaused), this._audio = null, this._processors.forEach((e) => e.disconnect()), this._processors.length = 0, this._end = 0, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
9989
9978
  }
9990
9979
  }
9991
- class fl extends Zs {
9980
+ class pl extends Zs {
9992
9981
  constructor(e) {
9993
9982
  const t = Oe.audioContext, s = t.createBufferSource(), i = t.createGain(), a = t.createAnalyser();
9994
9983
  s.connect(a), a.connect(i), i.connect(Oe.instance.destination), super(a, i), this.parent = e, this._sourceNode = s, this.gain = i, this.analyser = a;
@@ -10035,7 +10024,7 @@ class fl extends Zs {
10035
10024
  return s.buffer = t.buffer, s.loop = t.loop, e.setParamValue(s.playbackRate, t.playbackRate.value), s.connect(i), i.connect(this.destination), { source: s, gain: i };
10036
10025
  }
10037
10026
  createSound() {
10038
- return new pl();
10027
+ return new fl();
10039
10028
  }
10040
10029
  }
10041
10030
  var _l = Object.defineProperty, ml = Object.getOwnPropertyDescriptor, gl = (r, e, t) => e in r ? _l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, vl = (r, e, t, s) => {
@@ -10046,7 +10035,7 @@ var _l = Object.defineProperty, ml = Object.getOwnPropertyDescriptor, gl = (r, e
10046
10035
  let De = class extends q {
10047
10036
  _sounds = [];
10048
10037
  /** PlatformAudio */
10049
- _platformAudio = Li ? new fl(this) : new hl(this);
10038
+ _platformAudio = Li ? new pl(this) : new hl(this);
10050
10039
  get platformAudio() {
10051
10040
  return this._platformAudio;
10052
10041
  }
@@ -10242,13 +10231,13 @@ let dt = class extends Pe {
10242
10231
  a.fillStyle = this.color;
10243
10232
  const o = e.getChannelData(0), n = Math.ceil(o.length / s), l = i / 2;
10244
10233
  for (let c = 1, u = -1, d = 0; d < s; d++) {
10245
- for (let p = 0; p < n; p++) {
10246
- const m = o[d * n + p];
10234
+ for (let f = 0; f < n; f++) {
10235
+ const m = o[d * n + f];
10247
10236
  m < c && (c = m), m > u && (u = m);
10248
10237
  }
10249
10238
  if (!this.gap || d % (this.gap * 2) === 0) {
10250
- const p = d, m = (1 + c) * l, f = this.gap || 1, _ = Math.max(1, (u - c) * l);
10251
- a.fillRect(p, m, f, _), c = 1, u = -1;
10239
+ const f = d, m = (1 + c) * l, p = this.gap || 1, _ = Math.max(1, (u - c) * l);
10240
+ a.fillRect(f, m, p, _), c = 1, u = -1;
10252
10241
  }
10253
10242
  }
10254
10243
  this._src?.requestUpdate("source"), this.requestDraw();
@@ -10274,7 +10263,7 @@ var wl = Object.defineProperty, Pl = Object.getOwnPropertyDescriptor, El = (r, e
10274
10263
  (o = r[a]) && (i = o(i) || i);
10275
10264
  return i;
10276
10265
  }, Tl = (r, e, t) => El(r, e + "", t);
10277
- let Bt = class extends Ve {
10266
+ let Bt = class extends Ge {
10278
10267
  blur = 10;
10279
10268
  quality = 10;
10280
10269
  apply(r, e) {
@@ -10288,14 +10277,14 @@ let Bt = class extends Ve {
10288
10277
  for (let w = 1; w < o; w++)
10289
10278
  g -= v, u.push(g);
10290
10279
  }
10291
- const d = 1 / n, p = 1 / l, m = [];
10292
- let f;
10280
+ const d = 1 / n, f = 1 / l, m = [];
10281
+ let p;
10293
10282
  const _ = o - 1;
10294
10283
  for (let g = 0; g < _; g++)
10295
- f = u[g] + 0.5, m[0] = f * d, m[1] = f * p, c.push({
10284
+ p = u[g] + 0.5, m[0] = p * d, m[1] = p * f, c.push({
10296
10285
  offset: m
10297
10286
  });
10298
- f = u[_] + 0.5, m[0] = f * d, m[1] = f * p, c.push({
10287
+ p = u[_] + 0.5, m[0] = p * d, m[1] = p * f, c.push({
10299
10288
  offset: m
10300
10289
  }), c.forEach((g) => {
10301
10290
  P.draw(r, Bt.material, {
@@ -10341,7 +10330,7 @@ var Rl = Object.defineProperty, Al = Object.getOwnPropertyDescriptor, Cl = (r, e
10341
10330
  (o = r[a]) && (i = o(i) || i);
10342
10331
  return i;
10343
10332
  }, Dl = (r, e, t) => Cl(r, e + "", t);
10344
- let Lt = class extends Ve {
10333
+ let Lt = class extends Ge {
10345
10334
  apply(r) {
10346
10335
  P.draw(r, Lt.material, {
10347
10336
  previous: 0,
@@ -10389,36 +10378,36 @@ var Il = Object.defineProperty, Ml = Object.getOwnPropertyDescriptor, Nl = (r, e
10389
10378
  (o = r[a]) && (i = o(i) || i);
10390
10379
  return i;
10391
10380
  }, Ul = (r, e, t) => Nl(r, e + "", t);
10392
- let pt = class extends Ve {
10381
+ let ft = class extends Ge {
10393
10382
  blur = 100;
10394
10383
  gradientBlur = 600;
10395
10384
  apply(r, e) {
10396
10385
  const t = this.currentTimeProgress;
10397
10386
  let s, i;
10398
10387
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
10399
- const a = e.width, o = e.height, n = [0, o / 2], l = [600, o / 2], c = [a, o], u = l[0] - n[0], d = l[1] - n[1], p = Math.sqrt(u * u + d * d);
10400
- P.draw(r, pt.material, {
10388
+ const a = e.width, o = e.height, n = [0, o / 2], l = [600, o / 2], c = [a, o], u = l[0] - n[0], d = l[1] - n[1], f = Math.sqrt(u * u + d * d);
10389
+ P.draw(r, ft.material, {
10401
10390
  sampler: s,
10402
10391
  progress: i,
10403
10392
  blur: this.blur,
10404
10393
  gradientBlur: this.gradientBlur,
10405
10394
  start: n,
10406
10395
  end: l,
10407
- delta: [u / p, d / p],
10396
+ delta: [u / f, d / f],
10408
10397
  texSize: c
10409
- }), P.draw(r, pt.material, {
10398
+ }), P.draw(r, ft.material, {
10410
10399
  sampler: s,
10411
10400
  progress: i,
10412
10401
  blur: this.blur,
10413
10402
  gradientBlur: this.gradientBlur,
10414
10403
  start: n,
10415
10404
  end: l,
10416
- delta: [-d / p, u / p],
10405
+ delta: [-d / f, u / f],
10417
10406
  texSize: c
10418
10407
  });
10419
10408
  }
10420
10409
  };
10421
- Ul(pt, "material", new E({
10410
+ Ul(ft, "material", new E({
10422
10411
  gl: {
10423
10412
  vertex: `attribute vec2 position;
10424
10413
  attribute vec2 uv;
@@ -10468,15 +10457,15 @@ void main(void) {
10468
10457
  }`
10469
10458
  }
10470
10459
  }));
10471
- pt = kl([
10460
+ ft = kl([
10472
10461
  b("TiltShiftTransition")
10473
- ], pt);
10462
+ ], ft);
10474
10463
  var Bl = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, Fl = (r, e, t) => e in r ? Bl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, zl = (r, e, t, s) => {
10475
10464
  for (var i = s > 1 ? void 0 : s ? Ll(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10476
10465
  (o = r[a]) && (i = o(i) || i);
10477
10466
  return i;
10478
10467
  }, Gl = (r, e, t) => Fl(r, e + "", t);
10479
- let Ft = class extends Ve {
10468
+ let Ft = class extends Ge {
10480
10469
  radius;
10481
10470
  angle = 4;
10482
10471
  padding = 20;
@@ -10552,7 +10541,7 @@ void main(void) {
10552
10541
  Ft = zl([
10553
10542
  b("TwistTransition")
10554
10543
  ], Ft);
10555
- class Vl extends ke {
10544
+ class Vl extends Ne {
10556
10545
  install(e) {
10557
10546
  const t = async (s) => {
10558
10547
  const { decodeFrames: i } = await import("modern-gif");
@@ -10580,7 +10569,7 @@ class Vl extends ke {
10580
10569
  }), e.gif = this, this;
10581
10570
  }
10582
10571
  }
10583
- class $l extends ke {
10572
+ class $l extends Ne {
10584
10573
  install(e) {
10585
10574
  const t = async (s) => JSON.parse(await s.text());
10586
10575
  return this.load = (s) => typeof s == "string" ? e.loadBy(s).then(t) : t(s), [
@@ -10590,7 +10579,7 @@ class $l extends ke {
10590
10579
  }), e.json = this, this;
10591
10580
  }
10592
10581
  }
10593
- class Hl extends ke {
10582
+ class Hl extends Ne {
10594
10583
  install(e) {
10595
10584
  return this.load = async (t, s) => (await import("lottie-web").then((a) => a.default)).loadAnimation({
10596
10585
  container: null,
@@ -10607,13 +10596,13 @@ class Hl extends ke {
10607
10596
  }), e.lottie = this, this;
10608
10597
  }
10609
10598
  }
10610
- class Xl extends ke {
10599
+ class Xl extends Ne {
10611
10600
  install(e) {
10612
10601
  const t = async (s) => s.text();
10613
10602
  return this.load = (s) => typeof s == "string" ? e.loadBy(s).then(t) : t(s), e.text = this, this;
10614
10603
  }
10615
10604
  }
10616
- class jl extends ke {
10605
+ class jl extends Ne {
10617
10606
  install(e) {
10618
10607
  const t = (s) => e.fetchImageBitmap(s, { premultiplyAlpha: "premultiply" }).then((i) => new x({
10619
10608
  source: i,
@@ -10638,7 +10627,7 @@ class jl extends ke {
10638
10627
  }), e.texture = this, this;
10639
10628
  }
10640
10629
  }
10641
- class Wl extends ke {
10630
+ class Wl extends Ne {
10642
10631
  install(e) {
10643
10632
  return this.load = (t) => new co(t).load(), e.video = this, this;
10644
10633
  }
@@ -10774,7 +10763,7 @@ var Jl = Object.defineProperty, Js = (r, e, t, s) => {
10774
10763
  (o = r[a]) && (i = o(e, t, i) || i);
10775
10764
  return i && Jl(e, t, i), i;
10776
10765
  };
10777
- const Fe = {
10766
+ const Le = {
10778
10767
  alpha: !0,
10779
10768
  stencil: !0,
10780
10769
  antialias: !1,
@@ -10782,7 +10771,7 @@ const Fe = {
10782
10771
  preserveDrawingBuffer: !1,
10783
10772
  powerPreference: "default"
10784
10773
  };
10785
- class Ur extends pe {
10774
+ class kr extends fe {
10786
10775
  renderer;
10787
10776
  get view() {
10788
10777
  return this.renderer.view;
@@ -10817,17 +10806,17 @@ class Ur extends pe {
10817
10806
  view: t,
10818
10807
  width: s,
10819
10808
  height: i,
10820
- pixelRatio: a = hs,
10809
+ pixelRatio: a = cs,
10821
10810
  autoResize: o,
10822
10811
  data: n
10823
10812
  } = e;
10824
10813
  super(), this.renderer = new Xa(t, {
10825
- alpha: Fe.alpha ?? e.alpha,
10826
- stencil: Fe.stencil ?? e.stencil,
10827
- antialias: Fe.antialias ?? e.antialias,
10828
- premultipliedAlpha: Fe.premultipliedAlpha ?? e.premultipliedAlpha,
10829
- preserveDrawingBuffer: Fe.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
10830
- powerPreference: Fe.powerPreference ?? e.powerPreference
10814
+ alpha: Le.alpha ?? e.alpha,
10815
+ stencil: Le.stencil ?? e.stencil,
10816
+ antialias: Le.antialias ?? e.antialias,
10817
+ premultipliedAlpha: Le.premultipliedAlpha ?? e.premultipliedAlpha,
10818
+ preserveDrawingBuffer: Le.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
10819
+ powerPreference: Le.powerPreference ?? e.powerPreference
10831
10820
  }), this._setupInput(), this.pixelRatio = a, o ? !t && this.renderer.view && (this.renderer.view.style.width = "100%", this.renderer.view.style.height = "100%") : this.resize(
10832
10821
  s || this.gl.drawingBufferWidth || this.view?.clientWidth || 200,
10833
10822
  i || this.gl.drawingBufferHeight || this.view?.clientHeight || 200,
@@ -10864,7 +10853,7 @@ class Ur extends pe {
10864
10853
  return this.renderer.resize(e, t, s), this.root.width = e, this.root.height = t, this.render(), this;
10865
10854
  }
10866
10855
  nextTick() {
10867
- return as();
10856
+ return is();
10868
10857
  }
10869
10858
  async waitUntilLoad() {
10870
10859
  await $.waitUntilLoad(), await this.nextTick();
@@ -10916,10 +10905,10 @@ class Ur extends pe {
10916
10905
  }
10917
10906
  Js([
10918
10907
  h({ fallback: !1 })
10919
- ], Ur.prototype, "autoResize");
10908
+ ], kr.prototype, "autoResize");
10920
10909
  Js([
10921
10910
  h({ fallback: !1 })
10922
- ], Ur.prototype, "autoStart");
10911
+ ], kr.prototype, "autoStart");
10923
10912
  let U;
10924
10913
  const vr = [];
10925
10914
  let dr = !1;
@@ -10951,25 +10940,25 @@ async function ec(r) {
10951
10940
  onKeyframe: l,
10952
10941
  ...c
10953
10942
  } = r;
10954
- return U ??= new Ur({
10943
+ return U ??= new kr({
10955
10944
  pixelRatio: 1,
10956
10945
  width: 1,
10957
10946
  height: 1,
10958
10947
  preserveDrawingBuffer: !0
10959
10948
  }), U.resetProperties(), U.setProperties(c), U.debug = e, U.fonts = t, U.timeline.currentTime = 0, U.resize(s, i, !0), U.root.removeChildren(), U.root.append(a), await n?.(U), await U.waitAndRender(), o.length && await new Promise((u) => {
10960
10949
  let d = 0;
10961
- const p = o.length, m = o[p - 1];
10962
- async function f() {
10963
- if (d === p)
10950
+ const f = o.length, m = o[f - 1];
10951
+ async function p() {
10952
+ if (d === f)
10964
10953
  return u();
10965
10954
  const _ = o[d++], v = (o[d] || _) - _;
10966
10955
  U.timeline.currentTime = _, U.render(), await l?.(U.toPixels(), {
10967
10956
  currentTime: _,
10968
10957
  duration: v,
10969
10958
  progress: m !== 0 ? _ / m : 1
10970
- }), requestAnimationFrame(f);
10959
+ }), requestAnimationFrame(p);
10971
10960
  }
10972
- f();
10961
+ p();
10973
10962
  }), U.toCanvas2D();
10974
10963
  }
10975
10964
  async function yc(r) {
@@ -10990,19 +10979,19 @@ export {
10990
10979
  be as BufferUsage,
10991
10980
  Nt as Camera2D,
10992
10981
  ho as CanvasContext,
10993
- Ge as CanvasItem,
10994
- xs as CanvasTexture,
10982
+ ze as CanvasItem,
10983
+ ys as CanvasTexture,
10995
10984
  ne as Color,
10996
10985
  j as ColorAdjustEffect,
10997
- $e as ColorFilterEffect,
10998
- ps as ColorMatrix,
10999
- He as ColorOverlayEffect,
11000
- Xe as ColorRemoveEffect,
11001
- je as ColorReplaceEffect,
10986
+ Ve as ColorFilterEffect,
10987
+ ds as ColorMatrix,
10988
+ $e as ColorOverlayEffect,
10989
+ He as ColorRemoveEffect,
10990
+ Xe as ColorReplaceEffect,
11002
10991
  Er as ColorTexture,
11003
10992
  Ee as CoreObject,
11004
- pr as DEG_TO_RAD,
11005
- hs as DEVICE_PIXEL_RATIO,
10993
+ fr as DEG_TO_RAD,
10994
+ cs as DEVICE_PIXEL_RATIO,
11006
10995
  Y as DrawboardEffect,
11007
10996
  re as DropShadowEffect,
11008
10997
  T as Effect,
@@ -11017,11 +11006,11 @@ export {
11017
11006
  Ws as Element2DStyle,
11018
11007
  ae as Element2DText,
11019
11008
  lt as EmbossEffect,
11020
- Ur as Engine,
11021
- Nr as Flexbox,
11009
+ kr as Engine,
11010
+ Mr as Flexbox,
11022
11011
  ja as FontLoader,
11023
11012
  he as GaussianBlurEffect,
11024
- Ue as Geometry,
11013
+ ke as Geometry,
11025
11014
  Vl as GifLoader,
11026
11015
  wa as GlBatch2DSystem,
11027
11016
  nt as GlBlendMode,
@@ -11034,16 +11023,16 @@ export {
11034
11023
  Ha as GlRenderTargetSystem,
11035
11024
  Xa as GlRenderer,
11036
11025
  ba as GlShaderSystem,
11037
- ze as GlState,
11026
+ Fe as GlState,
11038
11027
  xa as GlStateSystem,
11039
11028
  Ga as GlStencilSystem,
11040
11029
  W as GlSystem,
11041
11030
  Va as GlViewportSystem,
11042
- G as GlitchEffect,
11031
+ V as GlitchEffect,
11043
11032
  K as GodrayEffect,
11044
11033
  $t as GradientTexture,
11045
11034
  hl as HTMLAudio,
11046
- kr as HTMLAudioContext,
11035
+ Nr as HTMLAudioContext,
11047
11036
  Ut as HTMLSound,
11048
11037
  xr as IN_BROWSER,
11049
11038
  Fi as IN_MAC_OS,
@@ -11055,24 +11044,24 @@ export {
11055
11044
  Bt as KawaseTransition,
11056
11045
  Wi as KeyboardInputEvent,
11057
11046
  Lt as LeftEraseTransition,
11058
- ke as Loader,
11047
+ Ne as Loader,
11059
11048
  mr as Lottie2D,
11060
11049
  Hl as LottieLoader,
11061
11050
  wr as MainLoop,
11062
- Me as MaskEffect,
11051
+ je as MaskEffect,
11063
11052
  E as Material,
11064
11053
  le as Matrix,
11065
- pc as Matrix2,
11054
+ fc as Matrix2,
11066
11055
  fs as Matrix3,
11067
11056
  Qi as Matrix4,
11068
- po as Meta,
11069
- ds as MouseInputEvent,
11057
+ fo as Meta,
11058
+ us as MouseInputEvent,
11070
11059
  I as Node,
11071
11060
  Ie as Node2D,
11072
11061
  Dt as Obb2D,
11073
11062
  L as OutlineEffect,
11074
11063
  yr as PI,
11075
- z as PI_2,
11064
+ G as PI_2,
11076
11065
  ht as PixelateEffect,
11077
11066
  oo as PixelsTexture,
11078
11067
  qi as PointerInputEvent,
@@ -11084,38 +11073,38 @@ export {
11084
11073
  te as RenderTarget,
11085
11074
  Pr as Renderer,
11086
11075
  de as Resource,
11087
- ns as SUPPORTS_AUDIO_CONTEXT,
11076
+ os as SUPPORTS_AUDIO_CONTEXT,
11088
11077
  Ui as SUPPORTS_CLICK_EVENTS,
11089
11078
  cc as SUPPORTS_CREATE_IMAGE_BITMAP,
11090
11079
  Mi as SUPPORTS_IMAGE_BITMAP,
11091
11080
  lc as SUPPORTS_MOUSE_EVENTS,
11092
- cs as SUPPORTS_OFFLINE_AUDIO_CONTEXT,
11081
+ ls as SUPPORTS_OFFLINE_AUDIO_CONTEXT,
11093
11082
  Qe as SUPPORTS_POINTER_EVENTS,
11094
11083
  Ni as SUPPORTS_RESIZE_OBSERVER,
11095
11084
  ve as SUPPORTS_TOUCH_EVENTS,
11096
11085
  Ii as SUPPORTS_WEBGL2,
11097
- ls as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
11086
+ ns as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
11098
11087
  Bi as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT,
11099
11088
  Li as SUPPORTS_WEB_AUDIO,
11100
11089
  ki as SUPPORTS_WHEEL_EVENTS,
11101
- pe as SceneTree,
11090
+ fe as SceneTree,
11102
11091
  Xl as TextLoader,
11103
11092
  x as Texture2D,
11104
11093
  jl as TextureLoader,
11105
11094
  qs as TextureRect2D,
11106
11095
  B as Ticker,
11107
- pt as TiltShiftTransition,
11096
+ ft as TiltShiftTransition,
11108
11097
  xe as Timeline,
11109
11098
  q as TimelineNode,
11110
11099
  M as Transform2D,
11111
11100
  el as TransformRect2D,
11112
- Ve as Transition,
11101
+ Ge as Transition,
11113
11102
  Ft as TwistTransition,
11114
11103
  mc as UvGeometry,
11115
11104
  Mt as UvMaterial,
11116
11105
  Q as Vector,
11117
11106
  O as Vector2,
11118
- fc as Vector3,
11107
+ pc as Vector3,
11119
11108
  ea as Vector4,
11120
11109
  H as VertexAttribute,
11121
11110
  ye as VertexBuffer,
@@ -11124,9 +11113,9 @@ export {
11124
11113
  co as VideoTexture,
11125
11114
  X as Viewport,
11126
11115
  Tr as ViewportTexture,
11127
- fl as WebAudio,
11116
+ pl as WebAudio,
11128
11117
  Oe as WebAudioContext,
11129
- pl as WebSound,
11118
+ fl as WebSound,
11130
11119
  Yi as WheelInputEvent,
11131
11120
  _r as Window,
11132
11121
  we as ZoomBlurEffect,
@@ -11143,7 +11132,7 @@ export {
11143
11132
  dc as curves,
11144
11133
  b as customNode,
11145
11134
  br as customNodes,
11146
- Fe as defaultOptions,
11135
+ Le as defaultOptions,
11147
11136
  Hi as determineCrossOrigin,
11148
11137
  Rt as directionMap,
11149
11138
  ir as displayMap,
@@ -11155,22 +11144,22 @@ export {
11155
11144
  ar as flexDirectionMap,
11156
11145
  or as flexWrapMap,
11157
11146
  wn as frag,
11158
- Hr as getDefaultCssPropertyValue,
11147
+ $r as getDefaultCssPropertyValue,
11159
11148
  Xn as gutterMap,
11160
11149
  tt as instanceId,
11161
11150
  Gi as isCanvasElement,
11162
- us as isElementNode,
11151
+ hs as isElementNode,
11163
11152
  hc as isImageElement,
11164
- $r as isPow2,
11153
+ Vr as isPow2,
11165
11154
  zi as isVideoElement,
11166
11155
  Vi as isWebgl2,
11167
11156
  nr as justifyMap,
11168
11157
  A as lerp,
11169
11158
  al as linear,
11170
- Yr as log2,
11159
+ qr as log2,
11171
11160
  ya as mapGlBlendModes,
11172
- qr as nextPow2,
11173
- as as nextTick,
11161
+ Wr as nextPow2,
11162
+ is as nextTick,
11174
11163
  lr as overflowMap,
11175
11164
  gc as parseCssFilter,
11176
11165
  zt as parseCssFunctions,
@@ -11179,6 +11168,6 @@ export {
11179
11168
  Lo as parseCssTransformOrigin,
11180
11169
  cr as positionTypeMap,
11181
11170
  yc as render,
11182
- Ne as stencilModeMap,
11171
+ Me as stencilModeMap,
11183
11172
  ur as timingFunctions
11184
11173
  };