modern-canvas 0.23.9 → 0.23.10

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,11 +1,11 @@
1
1
  import { Observable as e, RawWeakMap as t, Reactivable as n, clearUndef as r, defineProperty as i, getDefaultLayoutStyle as a, getDefaultStyle as o, getDefaultTextStyle as s, idGenerator as c, isColorFillObject as l, isGradient as u, isNone as d, normalizeBackground as f, normalizeChart as p, normalizeConnection as m, normalizeFill as h, normalizeForeground as g, normalizeOutline as ee, normalizeShadow as te, normalizeShape as ne, normalizeTable as re, normalizeText as ie, normalizeTextContent as ae, parseColor as oe, property as _, stringifyFilter as se } from "modern-idoc";
2
- import { BoundingBox as ce, Path2D as le, Path2DSet as ue, Transform2D as v, Vector2 as y, svgToDom as de, svgToPath2DSet as fe } from "modern-path2d";
3
- import { extend as pe } from "colord";
4
- import me from "colord/plugins/names";
5
- import { fonts as he } from "modern-font";
6
- import { Character as ge, Text as _e } from "modern-text";
2
+ import { BoundingBox as ce, Path2D as le, Path2DSet as ue, PathMeasure as de, Transform2D as v, Vector2 as y, svgToDom as fe, svgToPath2DSet as pe } from "modern-path2d";
3
+ import { extend as me } from "colord";
4
+ import he from "colord/plugins/names";
5
+ import { fonts as ge } from "modern-font";
6
+ import { Character as _e, Text as ve } from "modern-text";
7
7
  //#region src/core/decorators/customNode.ts
8
- var ve = /* @__PURE__ */ new Map();
8
+ var ye = /* @__PURE__ */ new Map();
9
9
  function b(e, t) {
10
10
  return function(n) {
11
11
  Object.defineProperty(n.prototype, "is", {
@@ -14,13 +14,13 @@ function b(e, t) {
14
14
  configurable: !0
15
15
  }), t && Object.keys(t).forEach((e) => {
16
16
  i(n, e, { fallback: t[e] });
17
- }), ve.set(e, n);
17
+ }), ye.set(e, n);
18
18
  };
19
19
  }
20
20
  //#endregion
21
21
  //#region src/core/global/createNode.ts
22
- function ye(e = "node", t = {}) {
23
- let n = ve.get(e);
22
+ function be(e = "node", t = {}) {
23
+ let n = ye.get(e);
24
24
  if (!n) throw Error(`Failed to createNode, tag: ${e}`);
25
25
  return new n().setProperties(t);
26
26
  }
@@ -86,7 +86,7 @@ var x = class {
86
86
  x.start();
87
87
  //#endregion
88
88
  //#region src/core/global/nextTick.ts
89
- async function be(e) {
89
+ async function xe(e) {
90
90
  return new Promise((t) => {
91
91
  x.on(() => {
92
92
  e?.(), t();
@@ -98,14 +98,14 @@ async function be(e) {
98
98
  }
99
99
  //#endregion
100
100
  //#region src/core/shared/utils.ts
101
- var xe = Math.PI, Se = xe * 2;
102
- function Ce(e) {
101
+ var Se = Math.PI, Ce = Se * 2;
102
+ function we(e) {
103
103
  return !(e & e - 1) && !!e;
104
104
  }
105
105
  //#endregion
106
106
  //#region src/core/shared/css.ts
107
- var we = /([\w-]+)\((.+?)\)/g, Te = /[^,]+/g, Ee = /([-e.\d]+)(.*)/;
108
- function De(e) {
107
+ var Te = /([\w-]+)\((.+?)\)/g, Ee = /[^,]+/g, De = /([-e.\d]+)(.*)/;
108
+ function Oe(e) {
109
109
  return Array.isArray(e) ? e.map((e) => ({
110
110
  name: e.name,
111
111
  args: e.args.map((e) => ({
@@ -117,31 +117,31 @@ function De(e) {
117
117
  normalizedIntValue: e.normalizedDefaultIntValue
118
118
  };
119
119
  }
120
- function Oe(e, t, n = {}) {
121
- let r = ke(t, n);
122
- return r.length ? r : je(e, t, n);
120
+ function ke(e, t, n = {}) {
121
+ let r = Ae(t, n);
122
+ return r.length ? r : Me(e, t, n);
123
123
  }
124
- function ke(e, t = {}) {
124
+ function Ae(e, t = {}) {
125
125
  let n = [], r;
126
- for (; (r = we.exec(e)) !== null;) {
126
+ for (; (r = Te.exec(e)) !== null;) {
127
127
  let [, e, i] = r;
128
128
  e && n.push({
129
129
  name: e,
130
- args: Ae(e, i, t)
130
+ args: je(e, i, t)
131
131
  });
132
132
  }
133
133
  return n;
134
134
  }
135
- function Ae(e, t, n = {}) {
135
+ function je(e, t, n = {}) {
136
136
  let r = [], i, a = 0;
137
- for (; (i = Te.exec(t)) !== null;) r.push(je(e, i[0], {
137
+ for (; (i = Ee.exec(t)) !== null;) r.push(Me(e, i[0], {
138
138
  ...n,
139
139
  index: a++
140
140
  }));
141
141
  return r;
142
142
  }
143
- function je(e, t, n = {}) {
144
- let { width: r = 1, height: i = 1, index: a = 0 } = n, o = t.match(Ee), s = {
143
+ function Me(e, t, n = {}) {
144
+ let { width: r = 1, height: i = 1, index: a = 0 } = n, o = t.match(De), s = {
145
145
  unit: o?.[2] ?? null,
146
146
  value: t,
147
147
  intValue: Number(o?.[1]),
@@ -161,7 +161,7 @@ function je(e, t, n = {}) {
161
161
  s.normalizedIntValue = s.intValue / 100;
162
162
  break;
163
163
  case "rad":
164
- s.normalizedIntValue = s.intValue / Se;
164
+ s.normalizedIntValue = s.intValue / Ce;
165
165
  break;
166
166
  case "deg":
167
167
  s.normalizedIntValue = s.intValue / 360;
@@ -184,48 +184,48 @@ function je(e, t, n = {}) {
184
184
  }
185
185
  //#endregion
186
186
  //#region src/core/shared/dom.ts
187
- var Me = "WebGL2RenderingContext" in globalThis, Ne = "ImageBitmap" in globalThis, Pe = "ResizeObserver" in globalThis, Fe = "PointerEvent" in globalThis, Ie = "WheelEvent" in globalThis, Le = "MouseEvent" in globalThis, Re = "ontouchstart" in globalThis, ze = "onclick" in globalThis, Be = "createImageBitmap" in globalThis, Ve = "AudioContext" in globalThis, He = "webkitAudioContext" in globalThis, Ue = "OfflineAudioContext" in globalThis, We = "webkitOfflineAudioContext" in globalThis, Ge = Ve || He, Ke = typeof window < "u", qe = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Je = globalThis.devicePixelRatio || 1, Ye = (e) => typeof e == "object" && !!e && e.nodeType === 1, Xe = (e) => Ye(e) && e.tagName === "VIDEO", Ze = (e) => Ye(e) && e.tagName === "IMG";
188
- function Qe(e) {
187
+ var Ne = "WebGL2RenderingContext" in globalThis, Pe = "ImageBitmap" in globalThis, Fe = "ResizeObserver" in globalThis, Ie = "PointerEvent" in globalThis, Le = "WheelEvent" in globalThis, Re = "MouseEvent" in globalThis, ze = "ontouchstart" in globalThis, Be = "onclick" in globalThis, Ve = "createImageBitmap" in globalThis, He = "AudioContext" in globalThis, Ue = "webkitAudioContext" in globalThis, We = "OfflineAudioContext" in globalThis, Ge = "webkitOfflineAudioContext" in globalThis, Ke = He || Ue, qe = typeof window < "u", Je = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Ye = globalThis.devicePixelRatio || 1, Xe = (e) => typeof e == "object" && !!e && e.nodeType === 1, Ze = (e) => Xe(e) && e.tagName === "VIDEO", Qe = (e) => Xe(e) && e.tagName === "IMG";
188
+ function $e(e) {
189
189
  return typeof e == "object" && !!e && e.nodeType === 1 && e.tagName === "CANVAS";
190
190
  }
191
- function $e(e) {
192
- return Me && e instanceof globalThis.WebGL2RenderingContext;
191
+ function et(e) {
192
+ return Ne && e instanceof globalThis.WebGL2RenderingContext;
193
193
  }
194
- var et;
195
- function tt(e) {
196
- et = e;
194
+ var tt;
195
+ function nt(e) {
196
+ tt = e;
197
197
  }
198
- function nt() {
199
- return et;
198
+ function rt() {
199
+ return tt;
200
200
  }
201
- var rt;
202
- function it(e) {
203
- rt = e;
201
+ var it;
202
+ function at(e) {
203
+ it = e;
204
204
  }
205
- function at() {
206
- return rt;
205
+ function ot() {
206
+ return it;
207
207
  }
208
208
  function S(e, t) {
209
209
  let n;
210
- return et ? n = et(e, t) : Ke && (n = globalThis.document.createElement("canvas")), n && (e !== void 0 && (n.width = e), t !== void 0 && (n.height = t)), n;
210
+ return tt ? n = tt(e, t) : qe && (n = globalThis.document.createElement("canvas")), n && (e !== void 0 && (n.width = e), t !== void 0 && (n.height = t)), n;
211
211
  }
212
- function ot(e, t = globalThis.location) {
212
+ function st(e, t = globalThis.location) {
213
213
  if (e.startsWith("data:") || !t || typeof document > "u") return "";
214
214
  let n = new URL(e, document.baseURI);
215
215
  return n.hostname !== t.hostname || n.port !== t.port || n.protocol !== t.protocol ? "anonymous" : "";
216
216
  }
217
- function st(e, t, n) {
218
- n === null && !t.startsWith("data:") ? e.crossOrigin = ot(t) : n !== !1 && (e.crossOrigin = typeof n == "string" ? n : "anonymous");
217
+ function ct(e, t, n) {
218
+ n === null && !t.startsWith("data:") ? e.crossOrigin = st(t) : n !== !1 && (e.crossOrigin = typeof n == "string" ? n : "anonymous");
219
219
  }
220
220
  //#endregion
221
221
  //#region src/core/shared/id.ts
222
- var ct = 0;
223
- function lt() {
224
- return ++ct;
222
+ var lt = 0;
223
+ function ut() {
224
+ return ++lt;
225
225
  }
226
226
  //#endregion
227
227
  //#region src/core/input/InputEvent.ts
228
- var ut = class e {
228
+ var dt = class e {
229
229
  cursor;
230
230
  bubbles = !1;
231
231
  cancelBubble = !1;
@@ -260,14 +260,14 @@ var ut = class e {
260
260
  initUIEvent(...e) {
261
261
  throw Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
262
262
  }
263
- }, dt = class extends ut {
263
+ }, ft = class extends dt {
264
264
  getModifierState(...e) {
265
265
  throw Error("getModifierState() is a legacy DOM API. It is not implemented in the Federated Events API.");
266
266
  }
267
267
  initKeyboardEvent(...e) {
268
268
  throw Error("initKeyboardEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
269
269
  }
270
- }, ft = class extends ut {
270
+ }, pt = class extends dt {
271
271
  client = {
272
272
  x: 0,
273
273
  y: 0
@@ -350,7 +350,7 @@ var ut = class e {
350
350
  get globalY() {
351
351
  return this.global.y;
352
352
  }
353
- }, pt = class extends ft {
353
+ }, mt = class extends pt {
354
354
  width = 0;
355
355
  height = 0;
356
356
  isPrimary = !1;
@@ -360,20 +360,20 @@ var ut = class e {
360
360
  getPredictedEvents() {
361
361
  throw Error("getPredictedEvents is not supported!");
362
362
  }
363
- }, mt = class extends ft {
363
+ }, ht = class extends pt {
364
364
  static DOM_DELTA_PIXEL = 0;
365
365
  DOM_DELTA_PIXEL = 0;
366
366
  static DOM_DELTA_LINE = 1;
367
367
  DOM_DELTA_LINE = 1;
368
368
  static DOM_DELTA_PAGE = 2;
369
369
  DOM_DELTA_PAGE = 2;
370
- }, ht = {
370
+ }, gt = {
371
371
  touchstart: "pointerdown",
372
372
  touchend: "pointerup",
373
373
  touchendoutside: "pointerupoutside",
374
374
  touchmove: "pointermove",
375
375
  touchcancel: "pointercancel"
376
- }, gt = class extends e {
376
+ }, _t = class extends e {
377
377
  event;
378
378
  target;
379
379
  cursor = "default";
@@ -391,21 +391,21 @@ var ut = class e {
391
391
  removeEventListeners() {
392
392
  if (!this.setuped || !this.target) return;
393
393
  let e = this.target.style;
394
- globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : Fe && (e.touchAction = ""), Fe ? (this.target.removeEventListener("pointerdown", this._onPointerDown), this.target.removeEventListener("pointerleave", this._onPointerOver), this.target.removeEventListener("pointerover", this._onPointerOver), this.target.removeEventListener("pointermove", this._onPointerMove), this.target.removeEventListener("pointerup", this._onPointerUp)) : (this.target.removeEventListener("mousedown", this._onPointerDown), this.target.removeEventListener("mouseout", this._onPointerOver), this.target.removeEventListener("mouseover", this._onPointerOver), this.target.removeEventListener("mousemove", this._onPointerMove), this.target.removeEventListener("mouseup", this._onPointerUp)), Re && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), typeof document < "u" && (document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp)), this.target = void 0, this.setuped = !1;
394
+ globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : Ie && (e.touchAction = ""), Ie ? (this.target.removeEventListener("pointerdown", this._onPointerDown), this.target.removeEventListener("pointerleave", this._onPointerOver), this.target.removeEventListener("pointerover", this._onPointerOver), this.target.removeEventListener("pointermove", this._onPointerMove), this.target.removeEventListener("pointerup", this._onPointerUp)) : (this.target.removeEventListener("mousedown", this._onPointerDown), this.target.removeEventListener("mouseout", this._onPointerOver), this.target.removeEventListener("mouseover", this._onPointerOver), this.target.removeEventListener("mousemove", this._onPointerMove), this.target.removeEventListener("mouseup", this._onPointerUp)), ze && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), typeof document < "u" && (document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp)), this.target = void 0, this.setuped = !1;
395
395
  }
396
396
  addEventListeners() {
397
397
  if (this.setuped || !this.target) return;
398
398
  let e = this.target.style;
399
- e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : Fe && (e.touchAction = "none")), Fe ? (this.target.addEventListener("pointerdown", this._onPointerDown), this.target.addEventListener("pointerleave", this._onPointerOver), this.target.addEventListener("pointerover", this._onPointerOver), this.target.addEventListener("pointermove", this._onPointerMove), this.target.addEventListener("pointerup", this._onPointerUp)) : (this.target.addEventListener("mousedown", this._onPointerDown), this.target.addEventListener("mouseout", this._onPointerOver), this.target.addEventListener("mouseover", this._onPointerOver), this.target.addEventListener("mousemove", this._onPointerMove), this.target.addEventListener("mouseup", this._onPointerUp)), Re && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), typeof document < "u" && (document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp)), this.setuped = !0;
399
+ e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : Ie && (e.touchAction = "none")), Ie ? (this.target.addEventListener("pointerdown", this._onPointerDown), this.target.addEventListener("pointerleave", this._onPointerOver), this.target.addEventListener("pointerover", this._onPointerOver), this.target.addEventListener("pointermove", this._onPointerMove), this.target.addEventListener("pointerup", this._onPointerUp)) : (this.target.addEventListener("mousedown", this._onPointerDown), this.target.addEventListener("mouseout", this._onPointerOver), this.target.addEventListener("mouseover", this._onPointerOver), this.target.addEventListener("mousemove", this._onPointerMove), this.target.addEventListener("mouseup", this._onPointerUp)), ze && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), typeof document < "u" && (document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp)), this.setuped = !0;
400
400
  }
401
401
  normalize(e) {
402
402
  let t = [];
403
- if (Re && e instanceof globalThis.TouchEvent) for (let n = 0, r = e.changedTouches.length; n < r; n++) {
403
+ if (ze && e instanceof globalThis.TouchEvent) for (let n = 0, r = e.changedTouches.length; n < r; n++) {
404
404
  let r = e.changedTouches[n];
405
405
  r.button === void 0 && (r.button = 0), r.buttons === void 0 && (r.buttons = 1), r.isPrimary === void 0 && (r.isPrimary = e.touches.length === 1 && e.type === "touchstart"), r.width === void 0 && (r.width = r.radiusX || 1), r.height === void 0 && (r.height = r.radiusY || 1), r.tiltX === void 0 && (r.tiltX = 0), r.tiltY === void 0 && (r.tiltY = 0), r.pointerType === void 0 && (r.pointerType = "touch"), r.pointerId === void 0 && (r.pointerId = r.identifier || 0), r.pressure === void 0 && (r.pressure = r.force || .5), r.twist === void 0 && (r.twist = 0), r.tangentialPressure === void 0 && (r.tangentialPressure = 0), r.layerX === void 0 && (r.layerX = r.offsetX = r.clientX), r.layerY === void 0 && (r.layerY = r.offsetY = r.clientY), r.type = e.type, t.push(r);
406
406
  }
407
- else if (Ie && e instanceof globalThis.WheelEvent) t.push(e);
408
- else if (Fe && e instanceof globalThis.PointerEvent) t.push(e);
407
+ else if (Le && e instanceof globalThis.WheelEvent) t.push(e);
408
+ else if (Ie && e instanceof globalThis.PointerEvent) t.push(e);
409
409
  else {
410
410
  let n = e;
411
411
  n.isPrimary === void 0 && (n.isPrimary = !0), n.width === void 0 && (n.width = 1), n.height === void 0 && (n.height = 1), n.tiltX === void 0 && (n.tiltX = 0), n.tiltY === void 0 && (n.tiltY = 0), n.pointerType === void 0 && (n.pointerType = "mouse"), n.pointerId === void 0 && (n.pointerId = 1), n.pressure === void 0 && (n.pressure = .5), n.twist === void 0 && (n.twist = 0), n.tangentialPressure === void 0 && (n.tangentialPressure = 0), t.push(n);
@@ -413,8 +413,8 @@ var ut = class e {
413
413
  return t;
414
414
  }
415
415
  _clonePointerEvent(e) {
416
- let t = new pt();
417
- return t.nativeEvent = e, t.pointerId = e.pointerId, t.width = e.width, t.height = e.height, t.isPrimary = e.isPrimary, t.pointerType = e.pointerType, t.pressure = e.pressure, t.tangentialPressure = e.tangentialPressure, t.tiltX = e.tiltX, t.tiltY = e.tiltY, t.twist = e.twist, t.isTrusted = e.isTrusted, this._copyMouseEvent(t, e), this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t.type === "pointerleave" ? t.type = "pointerout" : t.type.startsWith("mouse") ? t.type = t.type.replace("mouse", "pointer") : t.type.startsWith("touch") && (t.type = ht[t.type] || t.type), t;
416
+ let t = new mt();
417
+ return t.nativeEvent = e, t.pointerId = e.pointerId, t.width = e.width, t.height = e.height, t.isPrimary = e.isPrimary, t.pointerType = e.pointerType, t.pressure = e.pressure, t.tangentialPressure = e.tangentialPressure, t.tiltX = e.tiltX, t.tiltY = e.tiltY, t.twist = e.twist, t.isTrusted = e.isTrusted, this._copyMouseEvent(t, e), this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t.type === "pointerleave" ? t.type = "pointerout" : t.type.startsWith("mouse") ? t.type = t.type.replace("mouse", "pointer") : t.type.startsWith("touch") && (t.type = gt[t.type] || t.type), t;
418
418
  }
419
419
  _copyInputEvent(e, t) {
420
420
  e.nativeEvent = t, e.bubbles = t.bubbles, e.cancelBubble = t.cancelBubble, e.cancelable = t.cancelable, e.composed = t.composed, e.currentTarget = t.currentTarget, e.defaultPrevented = t.defaultPrevented, e.eventPhase = t.eventPhase, e.isTrusted = t.isTrusted, e.returnValue = t.returnValue, e.srcElement = t.srcElement, e.timeStamp = t.timeStamp, e.type = t.type;
@@ -423,11 +423,11 @@ var ut = class e {
423
423
  this._copyInputEvent(e, t), e.altKey = t.altKey, e.button = t.button, e.buttons = t.buttons, e.client.x = t.clientX, e.client.y = t.clientY, e.ctrlKey = t.ctrlKey, e.metaKey = t.metaKey, e.movement.x = t.movementX, e.movement.y = t.movementY, e.page.x = t.pageX, e.page.y = t.pageY, e.relatedTarget = null, e.shiftKey = t.shiftKey;
424
424
  }
425
425
  _cloneWheelEvent(e) {
426
- let t = new mt();
426
+ let t = new ht();
427
427
  return this._copyMouseEvent(t, e), t.wheelDeltaY = e.wheelDeltaY, t.deltaX = e.deltaX, t.deltaY = e.deltaY, t.deltaZ = e.deltaZ, t.deltaMode = e.deltaMode, this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t;
428
428
  }
429
429
  _cloneKeyboardEvent(e) {
430
- let t = new dt();
430
+ let t = new ft();
431
431
  return this._copyInputEvent(t, e), t.altKey = e.altKey, t.charCode = e.charCode, t.code = e.code, t.ctrlKey = e.ctrlKey, t.isComposing = e.isComposing, t.key = e.key, t.keyCode = e.keyCode, t.location = e.location, t.metaKey = e.metaKey, t.repeat = e.repeat, t.shiftKey = e.shiftKey, t;
432
432
  }
433
433
  setCursor(e = "default") {
@@ -475,25 +475,25 @@ var ut = class e {
475
475
  this.event?.cursor && this.setCursor(this.event.cursor);
476
476
  };
477
477
  _onPointerDown = (e) => {
478
- if (Re && e.pointerType === "touch") return;
478
+ if (ze && e.pointerType === "touch") return;
479
479
  let t = this.normalize(e);
480
480
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointerdown", this.event = this._clonePointerEvent(t[e]));
481
481
  this.event?.cursor && this.setCursor(this.event.cursor);
482
482
  };
483
483
  _onPointerOver = (e) => {
484
- if (!this.enableClickEvent || Re && e.pointerType === "touch") return;
484
+ if (!this.enableClickEvent || ze && e.pointerType === "touch") return;
485
485
  let t = this.normalize(e);
486
486
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointerover", this.event = this._clonePointerEvent(t[e]));
487
487
  this.event?.cursor && this.setCursor(this.event.cursor);
488
488
  };
489
489
  _onPointerMove = (e) => {
490
- if (!this.enableMoveEvent || Re && e.pointerType === "touch") return;
490
+ if (!this.enableMoveEvent || ze && e.pointerType === "touch") return;
491
491
  let t = this.normalize(e);
492
492
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointermove", this.event = this._clonePointerEvent(t[e]));
493
493
  this.event?.cursor && this.setCursor(this.event.cursor);
494
494
  };
495
495
  _onPointerUp = (e) => {
496
- if (!this.enableClickEvent || Re && e.pointerType === "touch") return;
496
+ if (!this.enableClickEvent || ze && e.pointerType === "touch") return;
497
497
  let t = e.target;
498
498
  e.composedPath && e.composedPath().length > 0 && (t = e.composedPath()[0]);
499
499
  let n = t === this.target ? "" : "outside", r = this.normalize(e);
@@ -513,7 +513,7 @@ var ut = class e {
513
513
  this.removeEventListeners(), super.destroy();
514
514
  }
515
515
  }, C = class extends n {
516
- instanceId = lt();
516
+ instanceId = ut();
517
517
  destroyed = !1;
518
518
  get json() {
519
519
  return this.toJSON();
@@ -522,7 +522,7 @@ var ut = class e {
522
522
  this.setProperties(e);
523
523
  }
524
524
  _nextTick() {
525
- return be();
525
+ return xe();
526
526
  }
527
527
  equal(e) {
528
528
  return !!(e && this.instanceId === e.instanceId);
@@ -531,7 +531,7 @@ var ut = class e {
531
531
  destroy() {
532
532
  this.destroyed || (this.destroyed = !0, this._destroy(), this.emit("destroy"), this.removeAllListeners());
533
533
  }
534
- }, _t = class extends C {}, w = class extends _t {}, vt = class e {
534
+ }, vt = class extends C {}, w = class extends vt {}, yt = class e {
535
535
  get x() {
536
536
  return this.min.x;
537
537
  }
@@ -664,7 +664,7 @@ var ut = class e {
664
664
  };
665
665
  //#endregion
666
666
  //#region src/core/math/Color.ts
667
- pe([me]);
667
+ me([he]);
668
668
  var T = class {
669
669
  get value() {
670
670
  return this._value;
@@ -748,11 +748,11 @@ var T = class {
748
748
  this.a
749
749
  ];
750
750
  }
751
- }, yt = xe / 180, bt = 180 / xe;
752
- function xt(e, t, n) {
751
+ }, bt = Se / 180, xt = 180 / Se;
752
+ function E(e, t, n) {
753
753
  return Math.max(t, Math.min(e, n));
754
754
  }
755
- function E(e, t, n) {
755
+ function D(e, t, n) {
756
756
  return (1 - n) * e + n * t;
757
757
  }
758
758
  //#endregion
@@ -887,7 +887,7 @@ var St = class {
887
887
  ]);
888
888
  }
889
889
  invert(e = 1) {
890
- let t = E(1, -1, e), n = E(0, 255, e);
890
+ let t = D(1, -1, e), n = D(0, 255, e);
891
891
  return this.multiply([
892
892
  t,
893
893
  0,
@@ -912,21 +912,21 @@ var St = class {
912
912
  ]);
913
913
  }
914
914
  sepia(e = 1) {
915
- let t = xt(e, 0, 1);
915
+ let t = E(e, 0, 1);
916
916
  return this.multiply([
917
- E(1, .393, t),
918
- E(0, .7689999, t),
919
- E(0, .18899999, t),
917
+ D(1, .393, t),
918
+ D(0, .7689999, t),
919
+ D(0, .18899999, t),
920
920
  0,
921
921
  0,
922
- E(0, .349, t),
923
- E(1, .6859999, t),
924
- E(0, .16799999, t),
922
+ D(0, .349, t),
923
+ D(1, .6859999, t),
924
+ D(0, .16799999, t),
925
925
  0,
926
926
  0,
927
- E(0, .272, t),
928
- E(0, .5339999, t),
929
- E(1, .13099999, t),
927
+ D(0, .272, t),
928
+ D(0, .5339999, t),
929
+ D(1, .13099999, t),
930
930
  0,
931
931
  0,
932
932
  0,
@@ -961,7 +961,7 @@ var St = class {
961
961
  ]);
962
962
  }
963
963
  grayscale(e = 1) {
964
- let t = xt(e, 0, 1), n = E(1, .3, t), r = E(0, .3, t), i = E(1, .59, t), a = E(0, .59, t), o = E(1, .11, t), s = E(0, .11, t);
964
+ let t = E(e, 0, 1), n = D(1, .3, t), r = D(0, .3, t), i = D(1, .59, t), a = D(0, .59, t), o = D(1, .11, t), s = D(0, .11, t);
965
965
  return this.multiply([
966
966
  n,
967
967
  a,
@@ -1013,10 +1013,10 @@ var St = class {
1013
1013
  toArray() {
1014
1014
  return this._array;
1015
1015
  }
1016
- }, Ct = class e extends vt {
1016
+ }, Ct = class e extends yt {
1017
1017
  rotation;
1018
1018
  get rotationDegrees() {
1019
- return this.rotation / yt;
1019
+ return this.rotation / bt;
1020
1020
  }
1021
1021
  constructor(...e) {
1022
1022
  let t, n;
@@ -1026,7 +1026,7 @@ var St = class {
1026
1026
  if (!this.rotation && (!("rotation" in e) || !e.rotation)) return super.overlap(e, t);
1027
1027
  {
1028
1028
  let t = (e, t) => Math.abs(e.x * t.x + e.y * t.y), n = (e) => {
1029
- let { width: n, height: r, rotation: i = 0 } = e, a = i / yt;
1029
+ let { width: n, height: r, rotation: i = 0 } = e, a = i / bt;
1030
1030
  a = -a % 180;
1031
1031
  let o = a / 180 * Math.PI, s = {
1032
1032
  x: Math.cos(o),
@@ -1092,12 +1092,12 @@ var St = class {
1092
1092
  };
1093
1093
  //#endregion
1094
1094
  //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateMetadata.js
1095
- function D(e, t) {
1095
+ function O(e, t) {
1096
1096
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
1097
1097
  }
1098
1098
  //#endregion
1099
1099
  //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
1100
- function O(e, t, n, r) {
1100
+ function k(e, t, n, r) {
1101
1101
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
1102
1102
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
1103
1103
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -1135,7 +1135,7 @@ var Tt = class extends C {
1135
1135
  super._destroy(), this.stop();
1136
1136
  }
1137
1137
  };
1138
- O([_({ fallback: 60 }), D("design:type", Number)], Tt.prototype, "fps", void 0), O([_({ fallback: 1 }), D("design:type", Number)], Tt.prototype, "speed", void 0);
1138
+ k([_({ fallback: 60 }), O("design:type", Number)], Tt.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Tt.prototype, "speed", void 0);
1139
1139
  //#endregion
1140
1140
  //#region src/core/renderers/gl/buffer/const.ts
1141
1141
  var Et = /* @__PURE__ */ function(e) {
@@ -1148,7 +1148,7 @@ var Et = /* @__PURE__ */ function(e) {
1148
1148
  constructor(e) {
1149
1149
  this.native = e;
1150
1150
  }
1151
- }, k = /* @__PURE__ */ function(e) {
1151
+ }, A = /* @__PURE__ */ function(e) {
1152
1152
  return e[e.mapRead = 1] = "mapRead", e[e.mapWrite = 2] = "mapWrite", e[e.copySrc = 4] = "copySrc", e[e.copyDst = 8] = "copyDst", e[e.index = 16] = "index", e[e.vertex = 32] = "vertex", e[e.uniform = 64] = "uniform", e[e.storage = 128] = "storage", e[e.indirect = 256] = "indirect", e[e.queryResolve = 512] = "queryResolve", e[e.static = 1024] = "static", e;
1153
1153
  }({}), Ot = class extends n {
1154
1154
  screen = {
@@ -1169,7 +1169,7 @@ var Et = /* @__PURE__ */ function(e) {
1169
1169
  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, n && this.view && (this.view.style.width = `${e}px`, this.view.style.height = `${t}px`);
1170
1170
  }
1171
1171
  };
1172
- O([_({ fallback: Je }), D("design:type", Number)], Ot.prototype, "pixelRatio", void 0), O([_({ internal: !0 }), D("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Ot.prototype, "view", void 0);
1172
+ k([_({ fallback: Ye }), O("design:type", Number)], Ot.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Ot.prototype, "view", void 0);
1173
1173
  //#endregion
1174
1174
  //#region src/core/renderers/shared/shader/UniformGroup.ts
1175
1175
  var kt = 0, At = class {
@@ -1192,7 +1192,7 @@ function Nt(e, t) {
1192
1192
  }
1193
1193
  //#endregion
1194
1194
  //#region src/core/renderers/gl/system/GlSystem.ts
1195
- var A = class extends e {
1195
+ var j = class extends e {
1196
1196
  get _gl() {
1197
1197
  return this._renderer.gl;
1198
1198
  }
@@ -1206,7 +1206,7 @@ var A = class extends e {
1206
1206
  _setup() {}
1207
1207
  flush() {}
1208
1208
  reset() {}
1209
- }, Pt = class extends A {
1209
+ }, Pt = class extends j {
1210
1210
  install(e) {
1211
1211
  super.install(e), e.buffer = this;
1212
1212
  }
@@ -1217,7 +1217,7 @@ var A = class extends e {
1217
1217
  }
1218
1218
  _createGlBuffer(e) {
1219
1219
  let t = this._gl, n = new Dt(t.createBuffer()), r = Et.arrayBuffer;
1220
- return e.usage & k.index ? r = Et.elementArrayBuffer : e.usage & k.uniform && (r = Et.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1220
+ return e.usage & A.index ? r = Et.elementArrayBuffer : e.usage & A.uniform && (r = Et.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1221
1221
  switch (e) {
1222
1222
  case "usage":
1223
1223
  case "data":
@@ -1240,7 +1240,7 @@ var A = class extends e {
1240
1240
  n.dirty = !1;
1241
1241
  let { _gl: r } = this, { usage: i, data: a } = e;
1242
1242
  r.bindBuffer(n.target, n.native);
1243
- let o = i & k.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1243
+ let o = i & A.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1244
1244
  if (a) if (n.byteLength >= a.byteLength) {
1245
1245
  let e = a.length * a.BYTES_PER_ELEMENT;
1246
1246
  r.bufferSubData(n.target, 0, a, 0, e / a.BYTES_PER_ELEMENT);
@@ -1576,7 +1576,7 @@ function en(e, t) {
1576
1576
  }
1577
1577
  //#endregion
1578
1578
  //#region src/core/renderers/gl/shader/GlShaderSystem.ts
1579
- var tn = class extends A {
1579
+ var tn = class extends j {
1580
1580
  install(e) {
1581
1581
  super.install(e), e.shader = this;
1582
1582
  }
@@ -1901,7 +1901,7 @@ var sn = class e {
1901
1901
  }
1902
1902
  };
1903
1903
  sn._init();
1904
- var cn = class extends A {
1904
+ var cn = class extends j {
1905
1905
  install(e) {
1906
1906
  super.install(e), e.state = this;
1907
1907
  }
@@ -1958,7 +1958,7 @@ var cn = class extends A {
1958
1958
  let e = (1 << sn._properties.length) - 1;
1959
1959
  this.boundStateBitmap = ~this.defaultState.bitmap & e, this.boundBlendMode = void 0, this._blendEq = !0, this.bind(this.defaultState);
1960
1960
  }
1961
- }, ln = class extends A {
1961
+ }, ln = class extends j {
1962
1962
  install(e) {
1963
1963
  super.install(e), e.batch2D = this;
1964
1964
  }
@@ -1983,7 +1983,7 @@ var cn = class extends A {
1983
1983
  }
1984
1984
  _createShader(e) {
1985
1985
  let t = this._renderer, n = {
1986
- instanceId: lt(),
1986
+ instanceId: ut(),
1987
1987
  glProgram: new Kt({
1988
1988
  vertex: "precision highp float;\nin vec2 aPosition;\nin vec2 aUv;\nin vec4 aTextureParams;\nin vec4 aModulate;\n\nuniform vec2 size;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\n\nout float vTextureId;\nout float vClipOutsideUv;\nout vec2 vUv;\nout vec4 vModulate;\n\nvec2 roundPixels(vec2 position, vec2 targetSize) {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n}\n\nvoid main(void) {\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n mat3 modelViewProjectionMatrix = projectionMatrix * viewMatrix * modelMatrix;\n gl_Position = vec4((modelViewProjectionMatrix * vec3(aPosition, 1.0)).xy, 0.0, 1.0);\n vTextureId = aTextureParams.x;\n vClipOutsideUv = aTextureParams.y;\n if (aTextureParams.z == 1.) {\n gl_Position.xy = roundPixels(gl_Position.xy, size);\n }\n vUv = aUv;\n vModulate = aModulate;\n}",
1989
1989
  fragment: `precision highp float;
@@ -2013,15 +2013,15 @@ void main(void) {
2013
2013
  }`
2014
2014
  })
2015
2015
  }, r = {
2016
- instanceId: lt(),
2017
- usage: k.vertex,
2016
+ instanceId: ut(),
2017
+ usage: A.vertex,
2018
2018
  data: new Float32Array()
2019
2019
  }, i = {
2020
- instanceId: lt(),
2021
- usage: k.index,
2020
+ instanceId: ut(),
2021
+ usage: A.index,
2022
2022
  data: new Uint32Array()
2023
2023
  }, a = {
2024
- instanceId: lt(),
2024
+ instanceId: ut(),
2025
2025
  topology: "triangle-list",
2026
2026
  attributes: Object.fromEntries(Object.entries(this._attributes).map(([e, t]) => [e, {
2027
2027
  ...t,
@@ -2068,8 +2068,8 @@ void main(void) {
2068
2068
  255
2069
2069
  ] } = n[e];
2070
2070
  m < e && t.blendMode !== te && (t.size = l - t.start, u.push(t), m = e, t = { id: ++d }, t.textures = i, t.textureLocationMap = f, t.start = l);
2071
- let { width: ae, height: oe } = g, _ = c / this._vertexSize, se = (ee ? f.get(ee) : 255) ?? 255, ce = +!!re, le = +!!ne, ue, v, y;
2072
- for (let e = p.length, t = 0; t < e; t += 2) ue = h[t], v = h[t + 1], ae > 0 && oe > 0 && (ue = Math.ceil(ue * ae) / ae, v = Math.ceil(v * oe) / oe), a[c++] = p[t], a[c++] = p[t + 1], a[c++] = ue, a[c++] = v, y = c * 4, o[y] = se, o[y + 1] = le, o[y + 2] = ce, o[y + 3] = 0, c++, y = c * 4, o[y] = ie[0], o[y + 1] = ie[1], o[y + 2] = ie[2], o[y + 3] = ie[3], c++;
2071
+ let { width: ae, height: oe } = g, _ = c / this._vertexSize, se = (ee ? f.get(ee) : 255) ?? 255, ce = +!!re, le = +!!ne, ue, de, v;
2072
+ for (let e = p.length, t = 0; t < e; t += 2) ue = h[t], de = h[t + 1], ae > 0 && oe > 0 && (ue = Math.ceil(ue * ae) / ae, de = Math.ceil(de * oe) / oe), a[c++] = p[t], a[c++] = p[t + 1], a[c++] = ue, a[c++] = de, v = c * 4, o[v] = se, o[v + 1] = le, o[v + 2] = ce, o[v + 3] = 0, c++, v = c * 4, o[v] = ie[0], o[v + 1] = ie[1], o[v + 2] = ie[2], o[v + 3] = ie[3], c++;
2073
2073
  for (let e = r.length, t = 0; t < e; t++) s[l++] = _ + r[t];
2074
2074
  t.blendMode = te;
2075
2075
  }
@@ -2114,11 +2114,11 @@ function dn(e) {
2114
2114
  }
2115
2115
  //#endregion
2116
2116
  //#region src/core/renderers/gl/const.ts
2117
- var j = /* @__PURE__ */ function(e) {
2117
+ var M = /* @__PURE__ */ function(e) {
2118
2118
  return e[e.disabled = 0] = "disabled", e[e.renderingMaskAdd = 1] = "renderingMaskAdd", e[e.maskActive = 2] = "maskActive", e[e.inverseMaskActive = 3] = "inverseMaskActive", e[e.renderingMaskRemove = 4] = "renderingMaskRemove", e[e.none = 5] = "none", e;
2119
2119
  }({}), fn = /* @__PURE__ */ function(e) {
2120
2120
  return e[e.none = 0] = "none", e[e.color = 16384] = "color", e[e.stencil = 1024] = "stencil", e[e.depth = 256] = "depth", e[e.colorDepth = 16640] = "colorDepth", e[e.colorStencil = 17408] = "colorStencil", e[e.depthStencil = 1280] = "depthStencil", e[e.all = 17664] = "all", e;
2121
- }({}), pn = class extends A {
2121
+ }({}), pn = class extends j {
2122
2122
  install(e) {
2123
2123
  super.install(e), e.mask = this;
2124
2124
  }
@@ -2137,16 +2137,16 @@ var j = /* @__PURE__ */ function(e) {
2137
2137
  };
2138
2138
  this.stack.push(n);
2139
2139
  let r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2140
- "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(j.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(j.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2140
+ "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(M.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2141
2141
  }
2142
2142
  pop(e) {
2143
2143
  let t = this.stack.pop();
2144
2144
  if (!t || t.source !== e) return;
2145
2145
  let { mask: n } = t, r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2146
- "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(fn.stencil), this._renderer.stencil.bind(j.disabled, i)) : this._renderer.stencil.bind(j.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(j.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2146
+ "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(fn.stencil), this._renderer.stencil.bind(M.disabled, i)) : this._renderer.stencil.bind(M.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2147
2147
  }
2148
2148
  }, mn = [];
2149
- mn[j.none] = {}, mn[j.disabled] = {}, mn[j.renderingMaskAdd] = {
2149
+ mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2150
2150
  stencilFront: {
2151
2151
  compare: "equal",
2152
2152
  passOp: "increment-clamp"
@@ -2155,7 +2155,7 @@ mn[j.none] = {}, mn[j.disabled] = {}, mn[j.renderingMaskAdd] = {
2155
2155
  compare: "equal",
2156
2156
  passOp: "increment-clamp"
2157
2157
  }
2158
- }, mn[j.renderingMaskRemove] = {
2158
+ }, mn[M.renderingMaskRemove] = {
2159
2159
  stencilFront: {
2160
2160
  compare: "equal",
2161
2161
  passOp: "decrement-clamp"
@@ -2164,7 +2164,7 @@ mn[j.none] = {}, mn[j.disabled] = {}, mn[j.renderingMaskAdd] = {
2164
2164
  compare: "equal",
2165
2165
  passOp: "decrement-clamp"
2166
2166
  }
2167
- }, mn[j.maskActive] = {
2167
+ }, mn[M.maskActive] = {
2168
2168
  stencilFront: {
2169
2169
  compare: "equal",
2170
2170
  passOp: "keep"
@@ -2173,7 +2173,7 @@ mn[j.none] = {}, mn[j.disabled] = {}, mn[j.renderingMaskAdd] = {
2173
2173
  compare: "equal",
2174
2174
  passOp: "keep"
2175
2175
  }
2176
- }, mn[j.inverseMaskActive] = {
2176
+ }, mn[M.inverseMaskActive] = {
2177
2177
  stencilFront: {
2178
2178
  compare: "not-equal",
2179
2179
  passOp: "keep"
@@ -2183,17 +2183,17 @@ mn[j.none] = {}, mn[j.disabled] = {}, mn[j.renderingMaskAdd] = {
2183
2183
  passOp: "keep"
2184
2184
  }
2185
2185
  };
2186
- var hn = class extends A {
2186
+ var hn = class extends j {
2187
2187
  install(e) {
2188
2188
  super.install(e), e.stencil = this;
2189
2189
  }
2190
2190
  _cache = {
2191
2191
  enabled: !1,
2192
- stencilMode: j.none,
2192
+ stencilMode: M.none,
2193
2193
  refCount: 0
2194
2194
  };
2195
2195
  current = { [-1]: {
2196
- stencilMode: j.disabled,
2196
+ stencilMode: M.disabled,
2197
2197
  refCount: 0
2198
2198
  } };
2199
2199
  _passOpMap;
@@ -2223,20 +2223,20 @@ var hn = class extends A {
2223
2223
  super._setup(), this._renderer.renderTarget.on("updateRenderTarget", this._updateRenderTarget);
2224
2224
  }
2225
2225
  reset() {
2226
- this._cache.enabled = !1, this._cache.stencilMode = j.none, this._cache.refCount = 0;
2226
+ this._cache.enabled = !1, this._cache.stencilMode = M.none, this._cache.refCount = 0;
2227
2227
  }
2228
2228
  _updateRenderTarget = (e) => {
2229
2229
  if (e) {
2230
2230
  let t = this.current[e.instanceId];
2231
2231
  t ||= this.current[e.instanceId] = {
2232
- stencilMode: j.disabled,
2232
+ stencilMode: M.disabled,
2233
2233
  refCount: 0
2234
2234
  }, this.bind(t.stencilMode, t.refCount);
2235
2235
  }
2236
2236
  };
2237
2237
  bind(e, t) {
2238
2238
  let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = mn[e], a = this._cache;
2239
- if (n.stencilMode = e, n.refCount = t, e === j.disabled) {
2239
+ if (n.stencilMode = e, n.refCount = t, e === M.disabled) {
2240
2240
  this._cache.enabled && (this._cache.enabled = !1, r.disable(r.STENCIL_TEST));
2241
2241
  return;
2242
2242
  }
@@ -2245,8 +2245,8 @@ var hn = class extends A {
2245
2245
  destroy() {
2246
2246
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
2247
2247
  }
2248
- }, gn = class extends A {
2249
- current = new vt(0, 0, 0, 0);
2248
+ }, gn = class extends j {
2249
+ current = new yt(0, 0, 0, 0);
2250
2250
  install(e) {
2251
2251
  super.install(e), e.viewport = this;
2252
2252
  }
@@ -2265,7 +2265,7 @@ var hn = class extends A {
2265
2265
  constructor(e) {
2266
2266
  this.framebuffer = e;
2267
2267
  }
2268
- }, vn = class extends A {
2268
+ }, vn = class extends j {
2269
2269
  install(e) {
2270
2270
  super.install(e), e.renderTarget = this;
2271
2271
  }
@@ -2392,7 +2392,7 @@ var hn = class extends A {
2392
2392
  return e[e.RGBA = 6408] = "RGBA", e[e.RGB = 6407] = "RGB", e[e.RG = 33319] = "RG", e[e.RED = 6403] = "RED", e[e.RGBA_INTEGER = 36249] = "RGBA_INTEGER", e[e.RGB_INTEGER = 36248] = "RGB_INTEGER", e[e.RG_INTEGER = 33320] = "RG_INTEGER", e[e.RED_INTEGER = 36244] = "RED_INTEGER", e[e.ALPHA = 6406] = "ALPHA", e[e.LUMINANCE = 6409] = "LUMINANCE", e[e.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", e[e.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", e[e.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", e;
2393
2393
  }({}), bn = /* @__PURE__ */ function(e) {
2394
2394
  return e[e.TEXTURE_2D = 3553] = "TEXTURE_2D", e[e.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", e[e.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", e[e.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", e[e.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", e[e.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", e[e.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", e;
2395
- }({}), M = /* @__PURE__ */ function(e) {
2395
+ }({}), N = /* @__PURE__ */ function(e) {
2396
2396
  return e[e.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", e[e.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", e[e.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", e[e.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", e[e.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", e[e.UNSIGNED_INT = 5125] = "UNSIGNED_INT", e[e.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", e[e.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", e[e.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", e[e.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", e[e.BYTE = 5120] = "BYTE", e[e.SHORT = 5122] = "SHORT", e[e.INT = 5124] = "INT", e[e.FLOAT = 5126] = "FLOAT", e[e.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", e[e.HALF_FLOAT = 36193] = "HALF_FLOAT", e;
2397
2397
  }({}), xn = class {
2398
2398
  native;
@@ -2400,7 +2400,7 @@ var hn = class extends A {
2400
2400
  width = -1;
2401
2401
  height = -1;
2402
2402
  mipmap = !1;
2403
- type = M.UNSIGNED_BYTE;
2403
+ type = N.UNSIGNED_BYTE;
2404
2404
  internalFormat = yn.RGBA;
2405
2405
  format = yn.RGBA;
2406
2406
  constructor(e) {
@@ -2681,7 +2681,7 @@ var An = {
2681
2681
  c < o || l < s ? ((i !== o || a !== s) && n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, null), r === 2 ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, c, l, t.format, t.type, e.source) : n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source)) : i === o && a === s ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source) : r === 2 ? n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, e.source) : n.texImage2D(t.target, 0, t.internalFormat, t.format, t.type, e.source), t.width = o, t.height = s;
2682
2682
  }
2683
2683
  }
2684
- }, jn = class extends A {
2684
+ }, jn = class extends j {
2685
2685
  uploaders = { ...An };
2686
2686
  textures = /* @__PURE__ */ new Map();
2687
2687
  glTextures = /* @__PURE__ */ new Map();
@@ -2780,36 +2780,36 @@ var An = {
2780
2780
  this._renderer.contextLost || this.glTextures.forEach((t) => e.deleteTexture(t.native)), this.textures.clear(), this.glTextures.clear(), this._location = 0, this.current.length = 0, this._premultiplyAlpha = !1, this._renderer.contextLost || e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha);
2781
2781
  }
2782
2782
  }, Mn = {
2783
- uint8x2: M.UNSIGNED_BYTE,
2784
- uint8x4: M.UNSIGNED_BYTE,
2785
- sint8x2: M.BYTE,
2786
- sint8x4: M.BYTE,
2787
- unorm8x2: M.UNSIGNED_BYTE,
2788
- unorm8x4: M.UNSIGNED_BYTE,
2789
- snorm8x2: M.BYTE,
2790
- snorm8x4: M.BYTE,
2791
- uint16x2: M.UNSIGNED_SHORT,
2792
- uint16x4: M.UNSIGNED_SHORT,
2793
- sint16x2: M.SHORT,
2794
- sint16x4: M.SHORT,
2795
- unorm16x2: M.UNSIGNED_SHORT,
2796
- unorm16x4: M.UNSIGNED_SHORT,
2797
- snorm16x2: M.SHORT,
2798
- snorm16x4: M.SHORT,
2799
- float16x2: M.HALF_FLOAT,
2800
- float16x4: M.HALF_FLOAT,
2801
- float32: M.FLOAT,
2802
- float32x2: M.FLOAT,
2803
- float32x3: M.FLOAT,
2804
- float32x4: M.FLOAT,
2805
- uint32: M.UNSIGNED_INT,
2806
- uint32x2: M.UNSIGNED_INT,
2807
- uint32x3: M.UNSIGNED_INT,
2808
- uint32x4: M.UNSIGNED_INT,
2809
- sint32: M.INT,
2810
- sint32x2: M.INT,
2811
- sint32x3: M.INT,
2812
- sint32x4: M.INT
2783
+ uint8x2: N.UNSIGNED_BYTE,
2784
+ uint8x4: N.UNSIGNED_BYTE,
2785
+ sint8x2: N.BYTE,
2786
+ sint8x4: N.BYTE,
2787
+ unorm8x2: N.UNSIGNED_BYTE,
2788
+ unorm8x4: N.UNSIGNED_BYTE,
2789
+ snorm8x2: N.BYTE,
2790
+ snorm8x4: N.BYTE,
2791
+ uint16x2: N.UNSIGNED_SHORT,
2792
+ uint16x4: N.UNSIGNED_SHORT,
2793
+ sint16x2: N.SHORT,
2794
+ sint16x4: N.SHORT,
2795
+ unorm16x2: N.UNSIGNED_SHORT,
2796
+ unorm16x4: N.UNSIGNED_SHORT,
2797
+ snorm16x2: N.SHORT,
2798
+ snorm16x4: N.SHORT,
2799
+ float16x2: N.HALF_FLOAT,
2800
+ float16x4: N.HALF_FLOAT,
2801
+ float32: N.FLOAT,
2802
+ float32x2: N.FLOAT,
2803
+ float32x3: N.FLOAT,
2804
+ float32x4: N.FLOAT,
2805
+ uint32: N.UNSIGNED_INT,
2806
+ uint32x2: N.UNSIGNED_INT,
2807
+ uint32x3: N.UNSIGNED_INT,
2808
+ uint32x4: N.UNSIGNED_INT,
2809
+ sint32: N.INT,
2810
+ sint32x2: N.INT,
2811
+ sint32x3: N.INT,
2812
+ sint32x4: N.INT
2813
2813
  };
2814
2814
  function Nn(e) {
2815
2815
  return Mn[e] ?? Mn.float32;
@@ -2822,7 +2822,7 @@ var Pn = {
2822
2822
  "line-strip": 3,
2823
2823
  "triangle-list": 4,
2824
2824
  "triangle-strip": 5
2825
- }, Fn = class extends A {
2825
+ }, Fn = class extends j {
2826
2826
  _geometryVaoHash = {};
2827
2827
  hasInstance = !1;
2828
2828
  current = null;
@@ -2954,7 +2954,7 @@ var Pn = {
2954
2954
  }
2955
2955
  this._geometryVaoHash = {}, this.current = null, this.currentVao = null;
2956
2956
  }
2957
- }, In = class extends A {
2957
+ }, In = class extends j {
2958
2958
  install(e) {
2959
2959
  super.install(e), e.colorMask = this;
2960
2960
  }
@@ -2986,7 +2986,7 @@ function Rn(e, t) {
2986
2986
  height: f - d
2987
2987
  };
2988
2988
  }
2989
- var zn = class extends A {
2989
+ var zn = class extends j {
2990
2990
  install(e) {
2991
2991
  super.install(e), e.scissor = this;
2992
2992
  }
@@ -3048,11 +3048,11 @@ var zn = class extends A {
3048
3048
  };
3049
3049
  constructor(e = S(), t) {
3050
3050
  if (super(), !e) throw Error("Failed to createHTMLCanvas");
3051
- Qe(e) ? this._setupContext(e, t) : (this.gl = e, this.version = $e(this.gl) ? 2 : 1), this._setupBindPoints()._setupExtensions()._setupPolyfill()._setupSupports(), this._systems.forEach((e) => e.install(this)), this._systems.forEach((e) => e.emit("updateContext", this.gl)), this._systems.forEach((e) => e.emit("setup"));
3051
+ $e(e) ? this._setupContext(e, t) : (this.gl = e, this.version = et(this.gl) ? 2 : 1), this._setupBindPoints()._setupExtensions()._setupPolyfill()._setupSupports(), this._systems.forEach((e) => e.install(this)), this._systems.forEach((e) => e.emit("updateContext", this.gl)), this._systems.forEach((e) => e.emit("setup"));
3052
3052
  }
3053
3053
  _setupContext(e, t) {
3054
3054
  this.view = e;
3055
- let n = at()?.(e, t), r = n && $e(n) ? 2 : 1;
3055
+ let n = ot()?.(e, t), r = n && et(n) ? 2 : 1;
3056
3056
  if (n || (n = e.getContext("webgl2", t) || e.getContext("experimental-webgl2", t), r = 2), n || (n = e.getContext("webgl", t) || e.getContext("experimental-webgl", t), r = 1), !n) throw Error("Unable to getContext");
3057
3057
  return this.gl = n, this.version = r, this._contextLost = this._contextLost.bind(this), this._contextRestored = this._contextRestored.bind(this), typeof e.addEventListener == "function" && (e.addEventListener("webglcontextlost", this._contextLost, !1), e.addEventListener("webglcontextrestored", this._contextRestored, !1)), this;
3058
3058
  }
@@ -3165,7 +3165,7 @@ var zn = class extends A {
3165
3165
  super(), this.setProperties(e);
3166
3166
  }
3167
3167
  };
3168
- O([_({ fallback: k.index }), D("design:type", k === void 0 ? Object : k)], Un.prototype, "usage", void 0), O([_({ default: () => new Uint32Array() }), D("design:type", Object)], Un.prototype, "data", void 0);
3168
+ k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], Un.prototype, "usage", void 0), k([_({ default: () => new Uint32Array() }), O("design:type", Object)], Un.prototype, "data", void 0);
3169
3169
  //#endregion
3170
3170
  //#region src/scene/resources/geometries/Geometry.ts
3171
3171
  var Wn = class extends w {
@@ -3176,32 +3176,32 @@ var Wn = class extends w {
3176
3176
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3177
3177
  }
3178
3178
  };
3179
- O([_({ fallback: "triangle-list" }), D("design:type", Object)], Wn.prototype, "topology", void 0), O([_({ default: () => ({}) }), D("design:type", typeof Record > "u" ? Object : Record)], Wn.prototype, "attributes", void 0), O([_({ default: () => new Un() }), D("design:type", Un === void 0 ? Object : Un)], Wn.prototype, "indexBuffer", void 0), O([_({ fallback: 1 }), D("design:type", Number)], Wn.prototype, "instanceCount", void 0);
3179
+ k([_({ fallback: "triangle-list" }), O("design:type", Object)], Wn.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], Wn.prototype, "attributes", void 0), k([_({ default: () => new Un() }), O("design:type", Un === void 0 ? Object : Un)], Wn.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Wn.prototype, "instanceCount", void 0);
3180
3180
  //#endregion
3181
3181
  //#region src/scene/resources/geometries/VertexBuffer.ts
3182
- var N = class extends w {
3182
+ var P = class extends w {
3183
3183
  constructor(e) {
3184
3184
  super(), this.setProperties(e);
3185
3185
  }
3186
3186
  };
3187
- O([_({ fallback: k.vertex }), D("design:type", k === void 0 ? Object : k)], N.prototype, "usage", void 0), O([_({ default: () => new Float32Array() }), D("design:type", Object)], N.prototype, "data", void 0);
3187
+ k([_({ fallback: A.vertex }), O("design:type", A === void 0 ? Object : A)], P.prototype, "usage", void 0), k([_({ default: () => new Float32Array() }), O("design:type", Object)], P.prototype, "data", void 0);
3188
3188
  //#endregion
3189
3189
  //#region src/scene/resources/geometries/VertexAttribute.ts
3190
- var P = class extends w {
3190
+ var F = class extends w {
3191
3191
  constructor(e) {
3192
3192
  super(), this.setProperties(e);
3193
3193
  }
3194
3194
  };
3195
- O([_({ default: () => new N() }), D("design:type", N === void 0 ? Object : N)], P.prototype, "buffer", void 0), O([_({ fallback: "float32" }), D("design:type", Object)], P.prototype, "format", void 0), O([_(), D("design:type", Boolean)], P.prototype, "instance", void 0), O([_(), D("design:type", Number)], P.prototype, "stride", void 0), O([_(), D("design:type", Number)], P.prototype, "offset", void 0), O([_(), D("design:type", Number)], P.prototype, "start", void 0), O([_(), D("design:type", Number)], P.prototype, "divisor", void 0);
3195
+ k([_({ default: () => new P() }), O("design:type", P === void 0 ? Object : P)], F.prototype, "buffer", void 0), k([_({ fallback: "float32" }), O("design:type", Object)], F.prototype, "format", void 0), k([_(), O("design:type", Boolean)], F.prototype, "instance", void 0), k([_(), O("design:type", Number)], F.prototype, "stride", void 0), k([_(), O("design:type", Number)], F.prototype, "offset", void 0), k([_(), O("design:type", Number)], F.prototype, "start", void 0), k([_(), O("design:type", Number)], F.prototype, "divisor", void 0);
3196
3196
  //#endregion
3197
3197
  //#region src/scene/resources/geometries/QuadGeometry.ts
3198
3198
  var Gn = class extends Wn {
3199
3199
  constructor() {
3200
3200
  super({
3201
3201
  topology: "triangle-strip",
3202
- attributes: { position: new P({
3202
+ attributes: { position: new F({
3203
3203
  format: "float32x2",
3204
- buffer: new N({ data: new Float32Array([
3204
+ buffer: new P({ data: new Float32Array([
3205
3205
  0,
3206
3206
  0,
3207
3207
  1,
@@ -3255,7 +3255,7 @@ function Kn() {
3255
3255
  ])
3256
3256
  };
3257
3257
  }
3258
- var F = class extends w {
3258
+ var I = class extends w {
3259
3259
  static instance = new this();
3260
3260
  glProgram;
3261
3261
  constructor(e = {}) {
@@ -3274,7 +3274,7 @@ var F = class extends w {
3274
3274
  }, e.shader.updateUniforms(this);
3275
3275
  }
3276
3276
  };
3277
- O([_({ default: Kn }), D("design:type", typeof Record > "u" ? Object : Record)], F.prototype, "uniforms", void 0);
3277
+ k([_({ default: Kn }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3278
3278
  //#endregion
3279
3279
  //#region src/scene/resources/materials/EffectMaterial.ts
3280
3280
  var qn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Jn = /vec(\d)\((.*)\)/;
@@ -3289,7 +3289,7 @@ function Yn(e) {
3289
3289
  }
3290
3290
  return Number(e);
3291
3291
  }
3292
- var Xn = class e extends F {
3292
+ var Xn = class e extends I {
3293
3293
  static RE = {
3294
3294
  getColor: /\sgetColor\s*\(/,
3295
3295
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3330,7 +3330,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3330
3330
  this.uniforms[t.trim()] = Yn(e[2]);
3331
3331
  });
3332
3332
  }
3333
- }, Zn = class extends F {
3333
+ }, Zn = class extends I {
3334
3334
  static _instance;
3335
3335
  static get instance() {
3336
3336
  return this._instance ??= new this();
@@ -3374,7 +3374,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3374
3374
  }
3375
3375
  });
3376
3376
  }
3377
- }, I = class extends Wn {
3377
+ }, L = class extends Wn {
3378
3378
  static _instance;
3379
3379
  static get instance() {
3380
3380
  return this._instance ??= new this();
@@ -3385,9 +3385,9 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3385
3385
  constructor() {
3386
3386
  super({
3387
3387
  attributes: {
3388
- position: new P({
3388
+ position: new F({
3389
3389
  format: "float32x2",
3390
- buffer: new N({ data: new Float32Array([
3390
+ buffer: new P({ data: new Float32Array([
3391
3391
  -1,
3392
3392
  -1,
3393
3393
  1,
@@ -3398,9 +3398,9 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3398
3398
  1
3399
3399
  ]) })
3400
3400
  }),
3401
- uv: new P({
3401
+ uv: new F({
3402
3402
  format: "float32x2",
3403
- buffer: new N({ data: new Float32Array([
3403
+ buffer: new P({ data: new Float32Array([
3404
3404
  0,
3405
3405
  0,
3406
3406
  1,
@@ -3426,15 +3426,15 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3426
3426
  positionBuffer;
3427
3427
  uvBuffer;
3428
3428
  constructor(e) {
3429
- let t = new N({ data: new Float32Array() }), n = new N({ data: new Float32Array() });
3429
+ let t = new P({ data: new Float32Array() }), n = new P({ data: new Float32Array() });
3430
3430
  super({
3431
3431
  ...e,
3432
3432
  attributes: {
3433
- position: new P({
3433
+ position: new F({
3434
3434
  format: "float32x2",
3435
3435
  buffer: t
3436
3436
  }),
3437
- uv: new P({
3437
+ uv: new F({
3438
3438
  format: "float32x2",
3439
3439
  buffer: n
3440
3440
  })
@@ -3442,7 +3442,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3442
3442
  indexBuffer: new Un({ data: new Uint32Array() })
3443
3443
  }), this.positionBuffer = t, this.uvBuffer = n;
3444
3444
  }
3445
- }, L = class extends w {
3445
+ }, R = class extends w {
3446
3446
  get valid() {
3447
3447
  return !!(this.width && this.height);
3448
3448
  }
@@ -3456,10 +3456,10 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3456
3456
  super._destroy(), this.colorTextures.forEach((e) => e.destroy());
3457
3457
  }
3458
3458
  };
3459
- O([_({ fallback: !1 }), D("design:type", Boolean)], L.prototype, "isRoot", void 0), O([_({ fallback: 0 }), D("design:type", Number)], L.prototype, "x", void 0), O([_({ fallback: 0 }), D("design:type", Number)], L.prototype, "y", void 0), O([_({ fallback: 0 }), D("design:type", Number)], L.prototype, "width", void 0), O([_({ fallback: 0 }), D("design:type", Number)], L.prototype, "height", void 0), O([_({ fallback: 0 }), D("design:type", Number)], L.prototype, "mipLevel", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], L.prototype, "msaa", void 0), O([_({ default: () => [new R()] }), D("design:type", Array)], L.prototype, "colorTextures", void 0);
3459
+ k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "isRoot", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "msaa", void 0), k([_({ default: () => [new z()] }), O("design:type", Array)], R.prototype, "colorTextures", void 0);
3460
3460
  //#endregion
3461
3461
  //#region src/scene/resources/textures/Texture2D.ts
3462
- var R = class extends w {
3462
+ var z = class extends w {
3463
3463
  static get EMPTY() {
3464
3464
  return new this({
3465
3465
  width: 1,
@@ -3550,7 +3550,7 @@ var R = class extends w {
3550
3550
  switch (super._updateProperty(e, t, n), e) {
3551
3551
  case "width":
3552
3552
  case "height":
3553
- this.isPowerOfTwo = Ce(this.pixelWidth) && Ce(this.pixelHeight);
3553
+ this.isPowerOfTwo = we(this.pixelWidth) && we(this.pixelHeight);
3554
3554
  break;
3555
3555
  case "source":
3556
3556
  this.updateSize();
@@ -3567,10 +3567,10 @@ var R = class extends w {
3567
3567
  e.texture.unbind(this);
3568
3568
  }
3569
3569
  _destroy() {
3570
- super._destroy(), Ne && this.source instanceof ImageBitmap && this.source.close();
3570
+ super._destroy(), Pe && this.source instanceof ImageBitmap && this.source.close();
3571
3571
  }
3572
3572
  };
3573
- O([_({ fallback: "unknown" }), D("design:type", String)], R.prototype, "uploadMethodId", void 0), O([_({ internal: !0 }), D("design:type", Object)], R.prototype, "source", void 0), O([_({ fallback: 0 }), D("design:type", Number)], R.prototype, "width", void 0), O([_({ fallback: 0 }), D("design:type", Number)], R.prototype, "height", void 0), O([_({ fallback: 1 }), D("design:type", Number)], R.prototype, "pixelRatio", void 0), O([_({ fallback: "bgra8unorm" }), D("design:type", Object)], R.prototype, "format", void 0), O([_({ fallback: "premultiply-alpha-on-upload" }), D("design:type", Object)], R.prototype, "alphaMode", void 0), O([_({ fallback: 1 }), D("design:type", Number)], R.prototype, "mipLevelCount", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], R.prototype, "mipmap", void 0), O([_({ fallback: "clamp-to-edge" }), D("design:type", Object)], R.prototype, "addressModeU", void 0), O([_({ fallback: "clamp-to-edge" }), D("design:type", Object)], R.prototype, "addressModeV", void 0), O([_({ fallback: "clamp-to-edge" }), D("design:type", Object)], R.prototype, "addressModeW", void 0), O([_({ fallback: "linear" }), D("design:type", Object)], R.prototype, "magFilter", void 0), O([_({ fallback: "linear" }), D("design:type", Object)], R.prototype, "minFilter", void 0), O([_({ fallback: "linear" }), D("design:type", Object)], R.prototype, "mipmapFilter", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], R.prototype, "isPowerOfTwo", void 0);
3573
+ k([_({ fallback: "unknown" }), O("design:type", String)], z.prototype, "uploadMethodId", void 0), k([_({ internal: !0 }), O("design:type", Object)], z.prototype, "source", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "height", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "pixelRatio", void 0), k([_({ fallback: "bgra8unorm" }), O("design:type", Object)], z.prototype, "format", void 0), k([_({ fallback: "premultiply-alpha-on-upload" }), O("design:type", Object)], z.prototype, "alphaMode", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "mipLevelCount", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "mipmap", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeU", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeV", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeW", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "magFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "minFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "mipmapFilter", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "isPowerOfTwo", void 0);
3574
3574
  //#endregion
3575
3575
  //#region src/scene/resources/textures/AnimatedTexture.ts
3576
3576
  var $n = class extends w {
@@ -3583,7 +3583,7 @@ var $n = class extends w {
3583
3583
  super();
3584
3584
  let t;
3585
3585
  if (Array.isArray(e)) t = e;
3586
- else if (e instanceof R) t = [{
3586
+ else if (e instanceof z) t = [{
3587
3587
  texture: e,
3588
3588
  duration: 0
3589
3589
  }];
@@ -3598,7 +3598,7 @@ var $n = class extends w {
3598
3598
  e.texture.destroy();
3599
3599
  });
3600
3600
  }
3601
- }, er = class extends R {
3601
+ }, er = class extends z {
3602
3602
  constructor(e = {}) {
3603
3603
  super({
3604
3604
  pixelRatio: 2,
@@ -3618,7 +3618,7 @@ var $n = class extends w {
3618
3618
  }
3619
3619
  super._updateProperty(e, t, n);
3620
3620
  }
3621
- }, tr = class e extends R {
3621
+ }, tr = class e extends z {
3622
3622
  static _cached = /* @__PURE__ */ new Map();
3623
3623
  static get(t) {
3624
3624
  let n = new T(t), r = n.toHex(), i = this._cached.get(r);
@@ -3639,7 +3639,7 @@ var $n = class extends w {
3639
3639
  mipmap: !0
3640
3640
  });
3641
3641
  }
3642
- }, nr = class e extends R {
3642
+ }, nr = class e extends z {
3643
3643
  static test(e) {
3644
3644
  return u(e);
3645
3645
  }
@@ -3673,7 +3673,7 @@ var $n = class extends w {
3673
3673
  constructor(t, n, r) {
3674
3674
  super(e.linearGradient(t, n, r));
3675
3675
  }
3676
- }, rr = class extends R {
3676
+ }, rr = class extends z {
3677
3677
  constructor(e = {}) {
3678
3678
  super({
3679
3679
  ...e,
@@ -3694,7 +3694,7 @@ function ir(e) {
3694
3694
  playsinline: !!(e?.playsinline ?? !0)
3695
3695
  };
3696
3696
  }
3697
- var ar = class e extends R {
3697
+ var ar = class e extends z {
3698
3698
  static mimeTypes = new Map(Object.entries({
3699
3699
  ogv: "video/ogg",
3700
3700
  mov: "video/quicktime",
@@ -3729,12 +3729,12 @@ var ar = class e extends R {
3729
3729
  _seekResolves = [];
3730
3730
  constructor(t, n) {
3731
3731
  let r = ir(n);
3732
- if (!Xe(t)) {
3732
+ if (!Ze(t)) {
3733
3733
  typeof t == "string" && (t = [t]);
3734
3734
  let n = t[0].src || t[0];
3735
3735
  if (typeof document > "u") throw TypeError("VideoTexture requires a DOM <video> element and is not supported in non-browser environments.");
3736
3736
  let i = document.createElement("video");
3737
- r.autoLoad && i.setAttribute("preload", "auto"), r.playsinline && (i.setAttribute("webkit-playsinline", ""), i.setAttribute("playsinline", "")), r.muted && (i.setAttribute("muted", ""), i.muted = !0), r.loop && i.setAttribute("loop", ""), r.autoPlay && i.setAttribute("autoplay", ""), st(i, n, r.crossorigin);
3737
+ r.autoLoad && i.setAttribute("preload", "auto"), r.playsinline && (i.setAttribute("webkit-playsinline", ""), i.setAttribute("playsinline", "")), r.muted && (i.setAttribute("muted", ""), i.muted = !0), r.loop && i.setAttribute("loop", ""), r.autoPlay && i.setAttribute("autoplay", ""), ct(i, n, r.crossorigin);
3738
3738
  for (let n = 0; n < t.length; ++n) {
3739
3739
  let { src: r, mime: a } = t[n];
3740
3740
  if (r ||= t[n], r.startsWith("data:")) a = r.slice(5, r.indexOf(";"));
@@ -3821,16 +3821,16 @@ var ar = class e extends R {
3821
3821
  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());
3822
3822
  }
3823
3823
  };
3824
- O([_({
3824
+ k([_({
3825
3825
  internal: !0,
3826
3826
  fallback: !0
3827
- }), D("design:type", Boolean)], ar.prototype, "autoUpdate", void 0), O([_({
3827
+ }), O("design:type", Boolean)], ar.prototype, "autoUpdate", void 0), k([_({
3828
3828
  internal: !0,
3829
3829
  fallback: 0
3830
- }), D("design:type", Number)], ar.prototype, "fps", void 0);
3830
+ }), O("design:type", Number)], ar.prototype, "fps", void 0);
3831
3831
  //#endregion
3832
3832
  //#region src/scene/resources/textures/ViewportTexture.ts
3833
- var or = class extends R {}, sr = class extends le {
3833
+ var or = class extends z {}, sr = class extends le {
3834
3834
  fillStyle;
3835
3835
  fillRule;
3836
3836
  strokeStyle;
@@ -3844,7 +3844,7 @@ var or = class extends R {}, sr = class extends le {
3844
3844
  _draws = [];
3845
3845
  _triCache = [];
3846
3846
  _parseDrawStyle(e) {
3847
- return e ? e instanceof R ? { texture: e } : { texture: tr.get(e) } : {};
3847
+ return e ? e instanceof z ? { texture: e } : { texture: tr.get(e) } : {};
3848
3848
  }
3849
3849
  stroke(e) {
3850
3850
  if (!this.curves.length) return;
@@ -4008,10 +4008,10 @@ function fr(e) {
4008
4008
  let t = dr[e] ?? 0;
4009
4009
  return t++, dr[e] = t, t;
4010
4010
  }
4011
- var z = ur = class extends C {
4011
+ var B = ur = class extends C {
4012
4012
  static parse(e, t = "Node") {
4013
4013
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4014
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? ur)({
4014
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ye.get(n ?? r.inCanvasIs ?? t)) ?? ur)({
4015
4015
  ...a,
4016
4016
  meta: r
4017
4017
  });
@@ -4371,13 +4371,13 @@ var z = ur = class extends C {
4371
4371
  });
4372
4372
  }
4373
4373
  };
4374
- O([_({ default: () => c() }), D("design:type", String)], z.prototype, "id", void 0), O([_({ default: () => c() }), D("design:type", String)], z.prototype, "name", void 0), O([_({ fallback: "inherit" }), D("design:type", Object)], z.prototype, "processMode", void 0), O([_({ fallback: "default" }), D("design:type", Object)], z.prototype, "processSortMode", void 0), O([_({ fallback: "inherit" }), D("design:type", Object)], z.prototype, "renderMode", void 0), O([_({ fallback: "inherit" }), D("design:type", Object)], z.prototype, "inputMode", void 0), O([_({ fallback: "default" }), D("design:type", Object)], z.prototype, "internalMode", void 0), O([_({
4374
+ k([_({ default: () => c() }), O("design:type", String)], B.prototype, "id", void 0), k([_({ default: () => c() }), O("design:type", String)], B.prototype, "name", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "processMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], B.prototype, "processSortMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "renderMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "inputMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], B.prototype, "internalMode", void 0), k([_({
4375
4375
  internal: !0,
4376
4376
  default: !0
4377
- }), D("design:type", Boolean)], z.prototype, "needsRender", void 0), z = ur = O([b("Node"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], z);
4377
+ }), O("design:type", Boolean)], B.prototype, "needsRender", void 0), B = ur = k([b("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], B);
4378
4378
  //#endregion
4379
4379
  //#region src/scene/main/TimelineNode.ts
4380
- var B = class extends z {
4380
+ var V = class extends B {
4381
4381
  insideTimeRange = !1;
4382
4382
  get _timeline() {
4383
4383
  return this._tree?.timeline;
@@ -4408,7 +4408,7 @@ var B = class extends z {
4408
4408
  return this._globalStartTime + this._globalDuration;
4409
4409
  }
4410
4410
  get currentTimeProgress() {
4411
- return this._duration ? xt(this._currentTime / this._duration, 0, 1) : 0;
4411
+ return this._duration ? E(this._currentTime / this._duration, 0, 1) : 0;
4412
4412
  }
4413
4413
  isInsideTimeRange() {
4414
4414
  let e = this._currentTime;
@@ -4448,7 +4448,7 @@ var B = class extends z {
4448
4448
  super._process(e), this._updateCurrentTime();
4449
4449
  }
4450
4450
  };
4451
- O([_({ fallback: !1 }), D("design:type", Boolean)], B.prototype, "loop", void 0), O([_({ fallback: 0 }), D("design:type", Number)], B.prototype, "delay", void 0), O([_({ fallback: 0 }), D("design:type", Number)], B.prototype, "duration", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], B.prototype, "paused", void 0), B = O([b("TimelineNode"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], B);
4451
+ k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "loop", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "delay", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "duration", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "paused", void 0), V = k([b("TimelineNode"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4452
4452
  //#endregion
4453
4453
  //#region src/scene/main/CanvasItem.ts
4454
4454
  var pr = [], mr = 0;
@@ -4459,7 +4459,7 @@ function gr(e, t, n, r) {
4459
4459
  let i = pr[mr];
4460
4460
  return i || (i = {}, pr[mr] = i), mr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4461
4461
  }
4462
- var _r = class extends B {
4462
+ var _r = class extends V {
4463
4463
  _blendMode;
4464
4464
  _parentGlobalVisible;
4465
4465
  _globalVisible;
@@ -4539,7 +4539,7 @@ var _r = class extends B {
4539
4539
  }
4540
4540
  _updateGlobalOpacity() {
4541
4541
  this._parentGlobalOpacity = this.getParent()?.opacity;
4542
- let e = xt(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4542
+ let e = E(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4543
4543
  this._globalOpacity !== e && (this._globalOpacity = e, this._updateModulate(), this.requestPaint(), this.updateRenderable());
4544
4544
  }
4545
4545
  _draw() {
@@ -4617,19 +4617,19 @@ var _r = class extends B {
4617
4617
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4618
4618
  }
4619
4619
  };
4620
- O([_(), D("design:type", Object)], _r.prototype, "blendMode", void 0), O([_({
4620
+ k([_(), O("design:type", Object)], _r.prototype, "blendMode", void 0), k([_({
4621
4621
  internal: !0,
4622
4622
  fallback: !0
4623
- }), D("design:type", Boolean)], _r.prototype, "visible", void 0), O([_({
4623
+ }), O("design:type", Boolean)], _r.prototype, "visible", void 0), k([_({
4624
4624
  internal: !0,
4625
4625
  fallback: 1
4626
- }), D("design:type", Number)], _r.prototype, "opacity", void 0), _r = O([b("CanvasItem"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _r);
4626
+ }), O("design:type", Number)], _r.prototype, "opacity", void 0), _r = k([b("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _r);
4627
4627
  //#endregion
4628
4628
  //#region src/scene/main/Viewport.ts
4629
- var V = class extends z {
4629
+ var H = class extends B {
4630
4630
  canvasTransform = new v();
4631
4631
  renderTargetIndex = 0;
4632
- renderTargets = [new L(), new L()];
4632
+ renderTargets = [new R(), new R()];
4633
4633
  get valid() {
4634
4634
  return !!(this.width && this.height);
4635
4635
  }
@@ -4676,7 +4676,7 @@ var V = class extends z {
4676
4676
  return !1;
4677
4677
  }
4678
4678
  activateWithCopy(e, t) {
4679
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), I.draw(e, Zn.instance, { sampler: 0 }));
4679
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, Zn.instance, { sampler: 0 }));
4680
4680
  }
4681
4681
  renderStart(e, t) {
4682
4682
  this.activate(e, t) && e.clear();
@@ -4689,7 +4689,7 @@ var V = class extends z {
4689
4689
  this.renderStart(e), super.render(e, t), this.renderEnd(e, n);
4690
4690
  }
4691
4691
  getRect() {
4692
- return new vt(this.x, this.y, this.width, this.height);
4692
+ return new yt(this.x, this.y, this.width, this.height);
4693
4693
  }
4694
4694
  toCanvasGlobal(e, t) {
4695
4695
  return this.canvasTransform.applyAffineInverse(e, t);
@@ -4701,16 +4701,16 @@ var V = class extends z {
4701
4701
  super._destroy(), this.canvasTransform.destroy(), this.renderTargets.forEach((e) => e.destroy());
4702
4702
  }
4703
4703
  };
4704
- O([_({ fallback: 0 }), D("design:type", Number)], V.prototype, "x", void 0), O([_({ fallback: 0 }), D("design:type", Number)], V.prototype, "y", void 0), O([_({ fallback: 0 }), D("design:type", Number)], V.prototype, "width", void 0), O([_({ fallback: 0 }), D("design:type", Number)], V.prototype, "height", void 0), O([_({ fallback: 0 }), D("design:type", Number)], V.prototype, "mipLevel", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], V.prototype, "msaa", void 0), V = O([b("Viewport")], V);
4704
+ k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], H.prototype, "msaa", void 0), H = k([b("Viewport")], H);
4705
4705
  //#endregion
4706
4706
  //#region src/scene/main/Effect.ts
4707
- var H = class extends B {
4707
+ var U = class extends V {
4708
4708
  material;
4709
4709
  get _effectMode() {
4710
4710
  return this.effectMode ?? "parent";
4711
4711
  }
4712
- viewport1 = new V();
4713
- viewport2 = new V();
4712
+ viewport1 = new H();
4713
+ viewport2 = new H();
4714
4714
  _renderId = 0;
4715
4715
  _renderViewport;
4716
4716
  _previousSibling;
@@ -4762,7 +4762,7 @@ var H = class extends B {
4762
4762
  }
4763
4763
  }
4764
4764
  getRect() {
4765
- return new vt(this._rect);
4765
+ return new yt(this._rect);
4766
4766
  }
4767
4767
  _processParent() {
4768
4768
  let e = this._tree?.renderStack;
@@ -4915,13 +4915,13 @@ var H = class extends B {
4915
4915
  }
4916
4916
  apply(e, t, n) {
4917
4917
  this.material && (n?.redraw ? t.redraw(e, () => {
4918
- I.draw(e, this.material, {
4918
+ L.draw(e, this.material, {
4919
4919
  from: 0,
4920
4920
  to: 1,
4921
4921
  progress: this.currentTimeProgress,
4922
4922
  ratio: t.width / t.height
4923
4923
  });
4924
- }) : I.draw(e, this.material, {
4924
+ }) : L.draw(e, this.material, {
4925
4925
  from: 0,
4926
4926
  to: 1,
4927
4927
  progress: this.currentTimeProgress,
@@ -4932,7 +4932,7 @@ var H = class extends B {
4932
4932
  super._destroy(), this.viewport1.destroy(), this.viewport2.destroy();
4933
4933
  }
4934
4934
  };
4935
- O([_({ internal: !0 }), D("design:type", Object)], H.prototype, "material", void 0), O([_(), D("design:type", Object)], H.prototype, "effectMode", void 0), O([_(), D("design:type", String)], H.prototype, "glsl", void 0), O([_(), D("design:type", String)], H.prototype, "glslSrc", void 0), H = O([b("Effect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4935
+ k([_({ internal: !0 }), O("design:type", Object)], U.prototype, "material", void 0), k([_(), O("design:type", Object)], U.prototype, "effectMode", void 0), k([_(), O("design:type", String)], U.prototype, "glsl", void 0), k([_(), O("design:type", String)], U.prototype, "glslSrc", void 0), U = k([b("Effect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4936
4936
  //#endregion
4937
4937
  //#region src/scene/main/RenderStack.ts
4938
4938
  var vr = class {
@@ -4957,7 +4957,7 @@ var vr = class {
4957
4957
  });
4958
4958
  }), this.calls = [];
4959
4959
  }
4960
- }, yr, br = yr = class extends z {
4960
+ }, yr, br = yr = class extends B {
4961
4961
  currentTime = 0;
4962
4962
  static from(e, t = !1) {
4963
4963
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
@@ -4979,16 +4979,16 @@ var vr = class {
4979
4979
  }
4980
4980
  addTime(e) {
4981
4981
  let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = this.currentTime;
4982
- return r += e, this.loop && r > t && (r = n + r % t), r = xt(r, n, t), this.currentTime = r, this.emit("updateCurrentTime", r, e), this;
4982
+ return r += e, this.loop && r > t && (r = n + r % t), r = E(r, n, t), this.currentTime = r, this.emit("updateCurrentTime", r, e), this;
4983
4983
  }
4984
4984
  _process(e) {
4985
4985
  super._process(e), this.paused || this.addTime(e);
4986
4986
  }
4987
4987
  };
4988
- O([_({ fallback: 0 }), D("design:type", Number)], br.prototype, "startTime", void 0), O([_({ fallback: 2 ** 53 - 1 }), D("design:type", Number)], br.prototype, "endTime", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], br.prototype, "loop", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], br.prototype, "paused", void 0), br = yr = O([b("Timeline"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], br);
4988
+ k([_({ fallback: 0 }), O("design:type", Number)], br.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], br.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], br.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], br.prototype, "paused", void 0), br = yr = k([b("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], br);
4989
4989
  //#endregion
4990
4990
  //#region src/scene/main/Window.ts
4991
- var xr = class extends V {
4991
+ var xr = class extends H {
4992
4992
  constructor() {
4993
4993
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
4994
4994
  }
@@ -4999,14 +4999,14 @@ var xr = class extends V {
4999
4999
  super.flush(e), this.finish(e);
5000
5000
  }
5001
5001
  };
5002
- xr = O([b("Window", {
5002
+ xr = k([b("Window", {
5003
5003
  processMode: "always",
5004
5004
  renderMode: "always"
5005
- }), D("design:paramtypes", [])], xr);
5005
+ }), O("design:paramtypes", [])], xr);
5006
5006
  //#endregion
5007
5007
  //#region src/scene/main/SceneTree.ts
5008
5008
  var Sr = class extends Tt {
5009
- input = new gt();
5009
+ input = new _t();
5010
5010
  renderStack = new vr();
5011
5011
  root = new xr().setTree(this);
5012
5012
  timeline = new br().setTree(this);
@@ -5055,33 +5055,33 @@ var Sr = class extends Tt {
5055
5055
  _renderScreen(e) {
5056
5056
  this.root.finish(e), e.state.reset(), e.renderTarget.unbind(), this.backgroundColor && e.gl.clearColor(...this._backgroundColor.toArray()), e.clear(), this.backgroundColor && e.gl.clearColor(0, 0, 0, 0);
5057
5057
  let t = this.root.texture;
5058
- t.activate(e, 0), I.draw(e), t.inactivate(e);
5058
+ t.activate(e, 0), L.draw(e), t.inactivate(e);
5059
5059
  }
5060
5060
  _destroy() {
5061
5061
  super._destroy(), this.root.destroy(), this.input.destroy(), this.nodeMap.clear();
5062
5062
  }
5063
5063
  };
5064
- O([_({ alias: "root.msaa" }), D("design:type", Boolean)], Sr.prototype, "msaa", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], Sr.prototype, "pixelate", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], Sr.prototype, "roundPixels", void 0), O([_(), D("design:type", Object)], Sr.prototype, "backgroundColor", void 0), O([_({
5064
+ k([_({ alias: "root.msaa" }), O("design:type", Boolean)], Sr.prototype, "msaa", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Sr.prototype, "pixelate", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Sr.prototype, "roundPixels", void 0), k([_(), O("design:type", Object)], Sr.prototype, "backgroundColor", void 0), k([_({
5065
5065
  internal: !0,
5066
5066
  fallback: !1
5067
- }), D("design:type", Boolean)], Sr.prototype, "debug", void 0), O([_({
5067
+ }), O("design:type", Boolean)], Sr.prototype, "debug", void 0), k([_({
5068
5068
  internal: !0,
5069
5069
  fallback: !1
5070
- }), D("design:type", Boolean)], Sr.prototype, "processPaused", void 0), O([_({
5070
+ }), O("design:type", Boolean)], Sr.prototype, "processPaused", void 0), k([_({
5071
5071
  internal: !0,
5072
- default: () => he
5073
- }), D("design:type", Object)], Sr.prototype, "fonts", void 0);
5072
+ default: () => ge
5073
+ }), O("design:type", Object)], Sr.prototype, "fonts", void 0);
5074
5074
  //#endregion
5075
5075
  //#region src/scene/main/Transition.ts
5076
- var Cr = class extends H {
5076
+ var Cr = class extends U {
5077
5077
  constructor(e, t = []) {
5078
5078
  super(), this.setProperties(e).append(t);
5079
5079
  }
5080
5080
  };
5081
- Cr = O([b("Transition", {
5081
+ Cr = k([b("Transition", {
5082
5082
  effectMode: "transition",
5083
5083
  duration: 2e3
5084
- }), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Cr);
5084
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Cr);
5085
5085
  //#endregion
5086
5086
  //#region src/scene/2d/Node2D.ts
5087
5087
  var wr = class extends _r {
@@ -5136,7 +5136,7 @@ var wr = class extends _r {
5136
5136
  super._destroy(), this.position.destroy(), this.scale.destroy(), this.skew.destroy(), this.pivot.destroy(), this.extraTransform.destroy(), this.transform.destroy(), this.globalPosition.destroy(), this.globalScale.destroy(), this.globalSkew.destroy(), this.globalTransform.destroy();
5137
5137
  }
5138
5138
  };
5139
- wr = O([b("Node2D"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5139
+ wr = k([b("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5140
5140
  //#endregion
5141
5141
  //#region src/scene/2d/Camera2D.ts
5142
5142
  var Tr = class extends wr {
@@ -5180,7 +5180,7 @@ var Tr = class extends wr {
5180
5180
  return this.setZoom(this._zoom.x + e, this._zoom.y + t);
5181
5181
  }
5182
5182
  setZoom(e, t = e) {
5183
- return this._zoom.set(xt(e, this._minZoom.x, this._maxZoom.x), xt(t, this._minZoom.y, this._maxZoom.y)), this;
5183
+ return this._zoom.set(E(e, this._minZoom.x, this._maxZoom.x), E(t, this._minZoom.y, this._maxZoom.y)), this;
5184
5184
  }
5185
5185
  setZoomAtOrigin(e, t, n) {
5186
5186
  let r;
@@ -5253,7 +5253,7 @@ var Tr = class extends wr {
5253
5253
  });
5254
5254
  }
5255
5255
  _getZoomByWheel(e, t) {
5256
- let n = e.ctrlKey && qe ? 10 : 1, r = -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * n, i = Math.log(t) + r;
5256
+ let n = e.ctrlKey && Je ? 10 : 1, r = -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * n, i = Math.log(t) + r;
5257
5257
  return Math.round(Math.exp(i) * 1e4) / 1e4;
5258
5258
  }
5259
5259
  _updateTransform() {
@@ -5283,16 +5283,16 @@ var Tr = class extends wr {
5283
5283
  };
5284
5284
  }
5285
5285
  };
5286
- O([_({
5286
+ k([_({
5287
5287
  internal: !0,
5288
5288
  fallback: !1
5289
- }), D("design:type", Boolean)], Tr.prototype, "spaceKey", void 0), O([_({
5289
+ }), O("design:type", Boolean)], Tr.prototype, "spaceKey", void 0), k([_({
5290
5290
  internal: !0,
5291
5291
  fallback: !1
5292
- }), D("design:type", Boolean)], Tr.prototype, "grabbing", void 0), Tr = O([b("Camera2D", {
5292
+ }), O("design:type", Boolean)], Tr.prototype, "grabbing", void 0), Tr = k([b("Camera2D", {
5293
5293
  processMode: "disabled",
5294
5294
  renderMode: "disabled"
5295
- }), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5295
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5296
5296
  //#endregion
5297
5297
  //#region src/scene/2d/element/connectionRouter.ts
5298
5298
  function Er(e, t) {
@@ -5442,7 +5442,7 @@ var Nr = {
5442
5442
  function Pr(e) {
5443
5443
  let t = new St();
5444
5444
  if (e === "none") return t;
5445
- let n = ke(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5445
+ let n = Ae(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5446
5446
  Object.keys(Nr).forEach((e) => {
5447
5447
  n[e] = n[e] ?? Nr[e];
5448
5448
  });
@@ -5450,7 +5450,7 @@ function Pr(e) {
5450
5450
  let r = n[e];
5451
5451
  switch (e) {
5452
5452
  case "hue-rotate":
5453
- t.hueRotate(r * Se);
5453
+ t.hueRotate(r * Ce);
5454
5454
  break;
5455
5455
  case "saturate":
5456
5456
  t.saturate(r);
@@ -5494,11 +5494,11 @@ function Fr(e) {
5494
5494
  }
5495
5495
  //#endregion
5496
5496
  //#region src/scene/effects/ColorAdjustEffect.ts
5497
- var Ir, U = class extends H {
5497
+ var Ir, W = class extends U {
5498
5498
  static {
5499
5499
  Ir = this;
5500
5500
  }
5501
- static material = new F({ gl: {
5501
+ static material = new I({ gl: {
5502
5502
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5503
5503
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n c.rgb *= c.a;\n }\n gl_FragColor = c * alpha;\n}"
5504
5504
  } });
@@ -5507,7 +5507,7 @@ var Ir, U = class extends H {
5507
5507
  }
5508
5508
  apply(e, t) {
5509
5509
  t.redraw(e, () => {
5510
- I.draw(e, Ir.material, {
5510
+ L.draw(e, Ir.material, {
5511
5511
  sampler: 0,
5512
5512
  saturation: this.saturation,
5513
5513
  contrast: this.contrast,
@@ -5521,14 +5521,14 @@ var Ir, U = class extends H {
5521
5521
  });
5522
5522
  }
5523
5523
  };
5524
- O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "saturation", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "contrast", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "brightness", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "red", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "green", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "blue", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "alpha", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "gamma", void 0), U = Ir = O([b("ColorAdjustEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
5524
+ k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "gamma", void 0), W = Ir = k([b("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5525
5525
  //#endregion
5526
5526
  //#region src/scene/effects/ColorFilterEffect.ts
5527
- var Lr, Rr = class extends H {
5527
+ var Lr, Rr = class extends U {
5528
5528
  static {
5529
5529
  Lr = this;
5530
5530
  }
5531
- static material = new F({ gl: {
5531
+ static material = new I({ gl: {
5532
5532
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5533
5533
  fragment: "in vec2 vUv;\nuniform sampler2D sampler;\nuniform float m[20];\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n gl_FragColor = vec4(\n m[0] * c.r + m[1] * c.g + m[2] * c.b + m[3] * c.a + m[4] / 255.0,\n m[5] * c.r + m[6] * c.g + m[7] * c.b + m[8] * c.a + m[9] / 255.0,\n m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14] / 255.0,\n m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19] / 255.0\n );\n}"
5534
5534
  } });
@@ -5545,13 +5545,13 @@ var Lr, Rr = class extends H {
5545
5545
  }
5546
5546
  apply(e, t) {
5547
5547
  if (!this.filter) return;
5548
- let n = ke(this.filter), r = this._colorMatrix.identity();
5548
+ let n = Ae(this.filter), r = this._colorMatrix.identity();
5549
5549
  n.forEach(({ name: e, args: t }) => {
5550
5550
  let n = t.map((e) => e.normalizedIntValue);
5551
5551
  switch (e) {
5552
5552
  case "hue-rotate":
5553
5553
  case "hueRotate":
5554
- r.hueRotate(n[0] * Se);
5554
+ r.hueRotate(n[0] * Ce);
5555
5555
  break;
5556
5556
  case "saturate":
5557
5557
  r.saturate(n[0]);
@@ -5576,21 +5576,21 @@ var Lr, Rr = class extends H {
5576
5576
  break;
5577
5577
  }
5578
5578
  }), t.redraw(e, () => {
5579
- I.draw(e, Lr.material, {
5579
+ L.draw(e, Lr.material, {
5580
5580
  sampler: 0,
5581
5581
  m: r.toArray()
5582
5582
  });
5583
5583
  });
5584
5584
  }
5585
5585
  };
5586
- O([_(), D("design:type", String)], Rr.prototype, "filter", void 0), Rr = Lr = O([b("ColorFilterEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Rr);
5586
+ k([_(), O("design:type", String)], Rr.prototype, "filter", void 0), Rr = Lr = k([b("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Rr);
5587
5587
  //#endregion
5588
5588
  //#region src/scene/effects/ColorOverlayEffect.ts
5589
- var zr, Br = 50, Vr = class extends H {
5589
+ var zr, Br = 50, Vr = class extends U {
5590
5590
  static {
5591
5591
  zr = this;
5592
5592
  }
5593
- static material = new F({ gl: {
5593
+ static material = new I({ gl: {
5594
5594
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5595
5595
  fragment: `precision mediump float;
5596
5596
  uniform sampler2D sampler;
@@ -5647,21 +5647,21 @@ void main(void) {
5647
5647
  0,
5648
5648
  0
5649
5649
  ]);
5650
- I.draw(e, zr.material, {
5650
+ L.draw(e, zr.material, {
5651
5651
  sampler: 0,
5652
5652
  colors: t.slice(0, Br).flatMap((e) => e)
5653
5653
  });
5654
5654
  });
5655
5655
  }
5656
5656
  };
5657
- O([_({ default: () => [] }), D("design:type", Array)], Vr.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], Vr.prototype, "alpha", void 0), Vr = zr = O([b("ColorOverlayEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5657
+ k([_({ default: () => [] }), O("design:type", Array)], Vr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Vr.prototype, "alpha", void 0), Vr = zr = k([b("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5658
5658
  //#endregion
5659
5659
  //#region src/scene/effects/ColorRemoveEffect.ts
5660
- var Hr, Ur = class extends H {
5660
+ var Hr, Ur = class extends U {
5661
5661
  static {
5662
5662
  Hr = this;
5663
5663
  }
5664
- static material = new F({ gl: {
5664
+ static material = new I({ gl: {
5665
5665
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5666
5666
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float epsilon;\nconst int MAX_COLORS = 50;\nuniform vec3 originalColors[MAX_COLORS];\n\nvoid main(void) {\n vec4 color = texture2D(sampler, vUv);\n\n for (int i = 0; i < MAX_COLORS; i++) {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0) {\n break;\n }\n vec3 colorDiff = origColor - color.rgb;\n if (length(colorDiff) < epsilon) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n }\n\n gl_FragColor = color;\n}"
5667
5667
  } });
@@ -5679,7 +5679,7 @@ var Hr, Ur = class extends H {
5679
5679
  r.slice(0, 50).forEach((e, t) => {
5680
5680
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5681
5681
  }), t.redraw(e, () => {
5682
- I.draw(e, Hr.material, {
5682
+ L.draw(e, Hr.material, {
5683
5683
  sampler: 0,
5684
5684
  epsilon: this.epsilon,
5685
5685
  originalColors: n
@@ -5687,14 +5687,14 @@ var Hr, Ur = class extends H {
5687
5687
  });
5688
5688
  }
5689
5689
  };
5690
- O([_({ default: () => [] }), D("design:type", Array)], Ur.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], Ur.prototype, "epsilon", void 0), Ur = Hr = O([b("ColorRemoveEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ur);
5690
+ k([_({ default: () => [] }), O("design:type", Array)], Ur.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Ur.prototype, "epsilon", void 0), Ur = Hr = k([b("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ur);
5691
5691
  //#endregion
5692
5692
  //#region src/scene/effects/ColorReplaceEffect.ts
5693
- var Wr, Gr = 50, Kr = class extends H {
5693
+ var Wr, Gr = 50, Kr = class extends U {
5694
5694
  static {
5695
5695
  Wr = this;
5696
5696
  }
5697
- static material = new F({ gl: {
5697
+ static material = new I({ gl: {
5698
5698
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5699
5699
  fragment: `varying vec2 vUv;
5700
5700
  uniform sampler2D sampler;
@@ -5750,7 +5750,7 @@ void main(void) {
5750
5750
  n.slice(0, Gr).forEach(([e, t], n) => {
5751
5751
  i[n * 3] = e[0], i[n * 3 + 1] = e[1], i[n * 3 + 2] = e[2], a[n * 3] = t[0], a[n * 3 + 1] = t[1], a[n * 3 + 2] = t[2];
5752
5752
  }), t.redraw(e, () => {
5753
- I.draw(e, Wr.material, {
5753
+ L.draw(e, Wr.material, {
5754
5754
  sampler: 0,
5755
5755
  epsilon: r,
5756
5756
  originalColors: i,
@@ -5759,15 +5759,15 @@ void main(void) {
5759
5759
  });
5760
5760
  }
5761
5761
  };
5762
- O([_({ default: () => [] }), D("design:type", Array)], Kr.prototype, "colors", void 0), O([_({ fallback: .05 }), D("design:type", Number)], Kr.prototype, "epsilon", void 0), Kr = Wr = O([b("ColorReplaceEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5762
+ k([_({ default: () => [] }), O("design:type", Array)], Kr.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], Kr.prototype, "epsilon", void 0), Kr = Wr = k([b("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5763
5763
  //#endregion
5764
5764
  //#region src/scene/effects/DrawboardEffect.frag?raw
5765
- var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + dotColorDiff * zoomInterpolationFactor;\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", Jr, W = class extends H {
5765
+ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + dotColorDiff * zoomInterpolationFactor;\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", Jr, G = class extends U {
5766
5766
  static {
5767
5767
  Jr = this;
5768
5768
  }
5769
5769
  _watermark;
5770
- static material = new F({ gl: {
5770
+ static material = new I({ gl: {
5771
5771
  vertex: "attribute vec2 position;\nin vec2 uv;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position.xy, 0.0, 1.0);\n vUv = uv;\n}",
5772
5772
  fragment: qr
5773
5773
  } });
@@ -5818,7 +5818,7 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5818
5818
  zoomedOut: this.dotColor ?? a.zoomedOut,
5819
5819
  diff: this.dotZoomDiff ?? a.diff
5820
5820
  };
5821
- I.draw(e, Jr.material, {
5821
+ L.draw(e, Jr.material, {
5822
5822
  uTexture: 0,
5823
5823
  inputSize: [t.width, t.height],
5824
5824
  zoom: [n[0], n[4]],
@@ -5842,18 +5842,18 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5842
5842
  });
5843
5843
  }
5844
5844
  };
5845
- O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "checkerboard", void 0), O([_({ fallback: "grid" }), D("design:type", Object)], W.prototype, "checkerboardStyle", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "pixelGrid", void 0), O([_(), D("design:type", Number)], W.prototype, "dotBaseColor", void 0), O([_(), D("design:type", Number)], W.prototype, "dotColor", void 0), O([_(), D("design:type", Number)], W.prototype, "dotZoomDiff", void 0), O([_(), D("design:type", String)], W.prototype, "watermark", void 0), O([_({ fallback: 100 }), D("design:type", Number)], W.prototype, "watermarkWidth", void 0), O([_({ fallback: .05 }), D("design:type", Number)], W.prototype, "watermarkAlpha", void 0), O([_({ fallback: .5236 }), D("design:type", Number)], W.prototype, "watermarkRotation", void 0), W = Jr = O([b("DrawboardEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5845
+ k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], G.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "pixelGrid", void 0), k([_(), O("design:type", Number)], G.prototype, "dotBaseColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotZoomDiff", void 0), k([_(), O("design:type", String)], G.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], G.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], G.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], G.prototype, "watermarkRotation", void 0), G = Jr = k([b("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5846
5846
  //#endregion
5847
5847
  //#region src/scene/effects/GaussianBlurEffect.ts
5848
- var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", Zr = class extends H {
5848
+ var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", Zr = class extends U {
5849
5849
  static {
5850
5850
  Yr = this;
5851
5851
  }
5852
- static materialX = new F({ gl: {
5852
+ static materialX = new I({ gl: {
5853
5853
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(-4.0 * uStrength, 0.0);\n vUv[1] = uv + vec2(-3.0 * uStrength, 0.0);\n vUv[2] = uv + vec2(-2.0 * uStrength, 0.0);\n vUv[3] = uv + vec2(-1.0 * uStrength, 0.0);\n vUv[4] = uv + vec2(0.0 * uStrength, 0.0);\n vUv[5] = uv + vec2(1.0 * uStrength, 0.0);\n vUv[6] = uv + vec2(2.0 * uStrength, 0.0);\n vUv[7] = uv + vec2(3.0 * uStrength, 0.0);\n vUv[8] = uv + vec2(4.0 * uStrength, 0.0);\n}",
5854
5854
  fragment: Xr
5855
5855
  } });
5856
- static materialY = new F({ gl: {
5856
+ static materialY = new I({ gl: {
5857
5857
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(0.0, -4.0 * uStrength);\n vUv[1] = uv + vec2(0.0, -3.0 * uStrength);\n vUv[2] = uv + vec2(0.0, -2.0 * uStrength);\n vUv[3] = uv + vec2(0.0, -1.0 * uStrength);\n vUv[4] = uv + vec2(0.0, 0.0 * uStrength);\n vUv[5] = uv + vec2(0.0, 1.0 * uStrength);\n vUv[6] = uv + vec2(0.0, 2.0 * uStrength);\n vUv[7] = uv + vec2(0.0, 3.0 * uStrength);\n vUv[8] = uv + vec2(0.0, 4.0 * uStrength);\n}",
5858
5858
  fragment: Xr
5859
5859
  } });
@@ -5863,39 +5863,39 @@ var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
5863
5863
  apply(e, t) {
5864
5864
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
5865
5865
  for (let r = 0; r < i; r++) t.redraw(e, () => {
5866
- I.draw(e, Yr.materialX, {
5866
+ L.draw(e, Yr.materialX, {
5867
5867
  sampler: 0,
5868
5868
  uStrength: n * (this.strength / i)
5869
5869
  });
5870
5870
  });
5871
5871
  for (let n = 0; n < i; n++) t.redraw(e, () => {
5872
- I.draw(e, Yr.materialY, {
5872
+ L.draw(e, Yr.materialY, {
5873
5873
  sampler: 0,
5874
5874
  uStrength: r * (this.strength / i)
5875
5875
  });
5876
5876
  });
5877
5877
  }
5878
5878
  };
5879
- O([_({ fallback: 4 }), D("design:type", Number)], Zr.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], Zr.prototype, "quality", void 0), Zr = Yr = O([b("GaussianBlurEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Zr);
5879
+ k([_({ fallback: 4 }), O("design:type", Number)], Zr.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], Zr.prototype, "quality", void 0), Zr = Yr = k([b("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Zr);
5880
5880
  //#endregion
5881
5881
  //#region src/scene/effects/DropShadowEffect.ts
5882
- var Qr, $r = class extends H {
5882
+ var Qr, $r = class extends U {
5883
5883
  static {
5884
5884
  Qr = this;
5885
5885
  }
5886
- static material = new F({ gl: {
5886
+ static material = new I({ gl: {
5887
5887
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5888
5888
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float uAlpha;\nuniform vec3 uColor;\nuniform vec2 uOffset;\nuniform vec4 uInputSize;\n\nvoid main(void) {\n vec4 sample = texture2D(sampler, vUv + uOffset * uInputSize.zw);\n sample.rgb = uColor.rgb * sample.a;\n sample *= uAlpha;\n gl_FragColor = sample;\n}"
5889
5889
  } });
5890
5890
  blurEffect = new Zr();
5891
- viewport3 = new V();
5891
+ viewport3 = new H();
5892
5892
  _color = new T();
5893
5893
  constructor(e, t = []) {
5894
5894
  super(), this.setProperties(e).append(t);
5895
5895
  }
5896
5896
  apply(e, t) {
5897
5897
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
5898
- this._color.value = this.color, I.draw(e, Qr.material, {
5898
+ this._color.value = this.color, L.draw(e, Qr.material, {
5899
5899
  sampler: 0,
5900
5900
  uAlpha: this._color.a,
5901
5901
  uColor: this._color.toArray().slice(0, 3),
@@ -5908,18 +5908,18 @@ var Qr, $r = class extends H {
5908
5908
  ]
5909
5909
  });
5910
5910
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
5911
- this.viewport3.texture.activate(e, 1), I.draw(e, Zn.instance, { sampler: 1 }), this.shadowOnly || I.draw(e, Zn.instance, { sampler: 0 }), e.texture.unbind(1);
5911
+ this.viewport3.texture.activate(e, 1), L.draw(e, Zn.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, Zn.instance, { sampler: 0 }), e.texture.unbind(1);
5912
5912
  });
5913
5913
  }
5914
5914
  };
5915
- O([_({ fallback: "#000000FF" }), D("design:type", Object)], $r.prototype, "color", void 0), O([_({ fallback: 4 }), D("design:type", Number)], $r.prototype, "blur", void 0), O([_({ fallback: 4 }), D("design:type", Number)], $r.prototype, "offsetX", void 0), O([_({ fallback: 4 }), D("design:type", Number)], $r.prototype, "offsetY", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], $r.prototype, "shadowOnly", void 0), $r = Qr = O([b("DropShadowEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
5915
+ k([_({ fallback: "#000000FF" }), O("design:type", Object)], $r.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], $r.prototype, "shadowOnly", void 0), $r = Qr = k([b("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
5916
5916
  //#endregion
5917
5917
  //#region src/scene/effects/EmbossEffect.ts
5918
- var ei, ti = class extends H {
5918
+ var ei, ti = class extends U {
5919
5919
  static {
5920
5920
  ei = this;
5921
5921
  }
5922
- static material = new F({ gl: {
5922
+ static material = new I({ gl: {
5923
5923
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5924
5924
  fragment: "precision mediump float;\nuniform sampler2D sampler;\nuniform vec4 inputSize;\nuniform float strength;\nvarying vec2 vUv;\n\nvoid main(void) {\n vec2 onePixel = inputSize.zw;\n vec4 color;\n color.rgb = vec3(0.5);\n color -= texture2D(sampler, vUv - onePixel) * strength;\n color += texture2D(sampler, vUv + onePixel) * strength;\n color.rgb = vec3((color.r + color.g + color.b) / 3.0);\n float alpha = texture2D(sampler, vUv).a;\n gl_FragColor = vec4(color.rgb * alpha, alpha);\n}"
5925
5925
  } });
@@ -5928,7 +5928,7 @@ var ei, ti = class extends H {
5928
5928
  }
5929
5929
  apply(e, t) {
5930
5930
  t.redraw(e, () => {
5931
- I.draw(e, ei.material, {
5931
+ L.draw(e, ei.material, {
5932
5932
  sampler: 0,
5933
5933
  strength: this.strength,
5934
5934
  inputSize: [
@@ -5941,14 +5941,14 @@ var ei, ti = class extends H {
5941
5941
  });
5942
5942
  }
5943
5943
  };
5944
- O([_({ fallback: 5 }), D("design:type", Number)], ti.prototype, "strength", void 0), ti = ei = O([b("EmbossEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ti);
5944
+ k([_({ fallback: 5 }), O("design:type", Number)], ti.prototype, "strength", void 0), ti = ei = k([b("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ti);
5945
5945
  //#endregion
5946
5946
  //#region src/scene/effects/GlitchEffect.ts
5947
- var ni, G = class extends H {
5947
+ var ni, K = class extends U {
5948
5948
  static {
5949
5949
  ni = this;
5950
5950
  }
5951
- static material = new F({ gl: {
5951
+ static material = new I({ gl: {
5952
5952
  vertex: "in vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5953
5953
  fragment: "\nin vec2 vUv;\nuniform sampler2D sampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void) {\n vec2 coord = (vUv * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vUv + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if (coord.x > filterClamp.z) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if (coord.x < filterClamp.x) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if (coord.y > filterClamp.w) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if (coord.y < filterClamp.y) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture(sampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture(sampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture(sampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture(sampler, coord).a;\n}"
5954
5954
  } });
@@ -5961,7 +5961,7 @@ var ni, G = class extends H {
5961
5961
  super(), this.setProperties(e).append(t);
5962
5962
  let n = S(4, this.sampleSize);
5963
5963
  if (!n) throw Error("GlitchEffect requires a canvas; call setCanvasFactory() in non-browser environments.");
5964
- this._canvas = n, this._texture = new R(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
5964
+ this._canvas = n, this._texture = new z(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
5965
5965
  }
5966
5966
  redraw() {
5967
5967
  let e = this.sampleSize, t = this._texture, n = this._canvas.getContext("2d");
@@ -5978,7 +5978,7 @@ var ni, G = class extends H {
5978
5978
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
5979
5979
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
5980
5980
  t.redraw(e, () => {
5981
- this._texture.activate(e, 1), I.draw(e, ni.material, {
5981
+ this._texture.activate(e, 1), L.draw(e, ni.material, {
5982
5982
  sampler: 0,
5983
5983
  filterClamp: [
5984
5984
  0,
@@ -6007,14 +6007,14 @@ var ni, G = class extends H {
6007
6007
  });
6008
6008
  }
6009
6009
  };
6010
- O([_({ fallback: 10 }), D("design:type", Number)], G.prototype, "slices", void 0), O([_({ fallback: 512 }), D("design:type", Number)], G.prototype, "sampleSize", void 0), O([_({ fallback: 100 }), D("design:type", Number)], G.prototype, "offset", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "direction", void 0), O([_({ fallback: 2 }), D("design:type", Number)], G.prototype, "fillMode", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "seed", void 0), O([_({ default: () => [2, 2] }), D("design:type", Array)], G.prototype, "red", void 0), O([_({ default: () => [-10, 4] }), D("design:type", Array)], G.prototype, "green", void 0), O([_({ default: () => [10, -4] }), D("design:type", Array)], G.prototype, "blue", void 0), G = ni = O([b("GlitchEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
6010
+ k([_({ fallback: 10 }), O("design:type", Number)], K.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], K.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], K.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], K.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], K.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], K.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], K.prototype, "blue", void 0), K = ni = k([b("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
6011
6011
  //#endregion
6012
6012
  //#region src/scene/effects/GodrayEffect.ts
6013
- var ri, ii = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", K = class extends H {
6013
+ var ri, ii = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", q = class extends U {
6014
6014
  static {
6015
6015
  ri = this;
6016
6016
  }
6017
- static material = new F({ gl: {
6017
+ static material = new I({ gl: {
6018
6018
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6019
6019
  fragment: `precision highp float;
6020
6020
  varying vec2 vUv;
@@ -6066,7 +6066,7 @@ void main(void) {
6066
6066
  apply(e, t) {
6067
6067
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6068
6068
  t.redraw(e, () => {
6069
- I.draw(e, ri.material, {
6069
+ L.draw(e, ri.material, {
6070
6070
  sampler: 0,
6071
6071
  uDimensions: [t.width, t.height],
6072
6072
  uParallel: +!!this.parallel,
@@ -6088,13 +6088,13 @@ void main(void) {
6088
6088
  });
6089
6089
  }
6090
6090
  };
6091
- O([_({ fallback: 0 }), D("design:type", Number)], K.prototype, "time", void 0), O([_({ fallback: 30 }), D("design:type", Number)], K.prototype, "angle", void 0), O([_({ fallback: .5 }), D("design:type", Number)], K.prototype, "gain", void 0), O([_({ fallback: 2.5 }), D("design:type", Number)], K.prototype, "lacunarity", void 0), O([_({ fallback: !0 }), D("design:type", Boolean)], K.prototype, "parallel", void 0), O([_({ default: () => [0, 0] }), D("design:type", Array)], K.prototype, "center", void 0), O([_({ fallback: 1 }), D("design:type", Number)], K.prototype, "alpha", void 0), K = ri = O([b("GodrayEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
6091
+ k([_({ fallback: 0 }), O("design:type", Number)], q.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], q.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], q.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], q.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], q.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], q.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], q.prototype, "alpha", void 0), q = ri = k([b("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6092
6092
  //#endregion
6093
6093
  //#region src/scene/effects/KawaseBlurEffect.ts
6094
- var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", oi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", si = class extends H {
6094
+ var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", oi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", si = class extends U {
6095
6095
  _kernels = [0];
6096
6096
  constructor(e, t = []) {
6097
- super(), this.material = new F({ gl: {
6097
+ super(), this.material = new I({ gl: {
6098
6098
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6099
6099
  fragment: e?.clamp ? oi : ai
6100
6100
  } }), this.setProperties(e).append(t), this._generateKernels();
@@ -6120,7 +6120,7 @@ var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6120
6120
  this._kernels.forEach((i) => {
6121
6121
  let a = i + .5;
6122
6122
  t.redraw(e, () => {
6123
- I.draw(e, this.material, {
6123
+ L.draw(e, this.material, {
6124
6124
  sampler: 0,
6125
6125
  uOffset: [a * n, a * r],
6126
6126
  uInputClamp: [
@@ -6134,14 +6134,14 @@ var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6134
6134
  });
6135
6135
  }
6136
6136
  };
6137
- O([_({ fallback: 4 }), D("design:type", Number)], si.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], si.prototype, "quality", void 0), O([_({ default: () => [1, 1] }), D("design:type", Array)], si.prototype, "pixelSize", void 0), si = O([b("KawaseBlurEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6137
+ k([_({ fallback: 4 }), O("design:type", Number)], si.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], si.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], si.prototype, "pixelSize", void 0), si = k([b("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6138
6138
  //#endregion
6139
6139
  //#region src/scene/effects/MaskEffect.ts
6140
- var ci, li = class extends H {
6140
+ var ci, li = class extends U {
6141
6141
  static {
6142
6142
  ci = this;
6143
6143
  }
6144
- static material = new F({ gl: {
6144
+ static material = new I({ gl: {
6145
6145
  vertex: "attribute vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6146
6146
  fragment: "in vec2 vUv;\n\nuniform sampler2D sampler;\nuniform sampler2D mask;\nuniform float rotation;\n\nvec2 rotateUV(vec2 uv, float angle) {\n uv -= 0.5;\n float cosAngle = cos(angle);\n float sinAngle = sin(angle);\n mat2 rotationMatrix = mat2(\n cosAngle, -sinAngle,\n sinAngle, cosAngle\n );\n uv = rotationMatrix * uv;\n uv += 0.5;\n return uv;\n}\n\nvoid main(void) {\n vec4 color = texture(sampler, vUv);\n vec4 maskColor = texture(mask, rotateUV(vUv, rotation));\n gl_FragColor = mix(vec4(0.), color, maskColor.a);\n}"
6147
6147
  } });
@@ -6161,7 +6161,7 @@ var ci, li = class extends H {
6161
6161
  }
6162
6162
  apply(e, t, n) {
6163
6163
  this.texture && t.redraw(e, () => {
6164
- this.texture.activate(e, 1), I.draw(e, ci.material, {
6164
+ this.texture.activate(e, 1), L.draw(e, ci.material, {
6165
6165
  sampler: 0,
6166
6166
  mask: 1,
6167
6167
  rotation: n.target?.globalRotation ?? 0
@@ -6169,10 +6169,10 @@ var ci, li = class extends H {
6169
6169
  });
6170
6170
  }
6171
6171
  };
6172
- O([_({ fallback: "" }), D("design:type", String)], li.prototype, "image", void 0), li = ci = O([b("MaskEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6172
+ k([_({ fallback: "" }), O("design:type", String)], li.prototype, "image", void 0), li = ci = k([b("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6173
6173
  //#endregion
6174
6174
  //#region src/scene/effects/OutlineEffect.ts
6175
- var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", q = class extends H {
6175
+ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", J = class extends U {
6176
6176
  static {
6177
6177
  ui = this;
6178
6178
  }
@@ -6183,14 +6183,14 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6183
6183
  }
6184
6184
  _color = new T();
6185
6185
  constructor(e, t = []) {
6186
- super(), this.setProperties(e).append(t), this.material = new F({ gl: {
6186
+ super(), this.setProperties(e).append(t), this.material = new I({ gl: {
6187
6187
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6188
6188
  fragment: di.replace(/\{ANGLE_STEP\}/, ui.getAngleStep(this.quality).toFixed(7))
6189
6189
  } });
6190
6190
  }
6191
6191
  apply(e, t) {
6192
6192
  t.redraw(e, () => {
6193
- this._color.value = this.color, I.draw(e, this.material, {
6193
+ this._color.value = this.color, L.draw(e, this.material, {
6194
6194
  sampler: 0,
6195
6195
  uThickness: [this.width / t.width, this.width / t.height],
6196
6196
  uColor: this._color.toArray().slice(0, 3),
@@ -6207,14 +6207,14 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6207
6207
  });
6208
6208
  }
6209
6209
  };
6210
- O([_({ fallback: "#000000ff" }), D("design:type", Object)], q.prototype, "color", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", String)], q.prototype, "style", void 0), O([_(), D("design:type", Object)], q.prototype, "image", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "opacity", void 0), O([_({ fallback: .1 }), D("design:type", Number)], q.prototype, "quality", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], q.prototype, "knockout", void 0), q = ui = O([b("OutlineEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6210
+ k([_({ fallback: "#000000ff" }), O("design:type", Object)], J.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], J.prototype, "style", void 0), k([_(), O("design:type", Object)], J.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], J.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], J.prototype, "knockout", void 0), J = ui = k([b("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6211
6211
  //#endregion
6212
6212
  //#region src/scene/effects/PixelateEffect.ts
6213
- var fi, pi = class extends H {
6213
+ var fi, pi = class extends U {
6214
6214
  static {
6215
6215
  fi = this;
6216
6216
  }
6217
- static material = new F({ gl: {
6217
+ static material = new I({ gl: {
6218
6218
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6219
6219
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform vec2 step;\n\nvoid main(void) {\n vec2 uv = vUv;\n uv = floor((uv - offset) / step) * step + offset + step / 2.0;\n gl_FragColor = texture2D(sampler, uv);\n}"
6220
6220
  } });
@@ -6228,18 +6228,18 @@ var fi, pi = class extends H {
6228
6228
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6229
6229
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6230
6230
  };
6231
- I.draw(e, fi.material, a);
6231
+ L.draw(e, fi.material, a);
6232
6232
  });
6233
6233
  }
6234
6234
  };
6235
- O([_({ fallback: 10 }), D("design:type", Number)], pi.prototype, "strength", void 0), pi = fi = O([b("PixelateEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6235
+ k([_({ fallback: 10 }), O("design:type", Number)], pi.prototype, "strength", void 0), pi = fi = k([b("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6236
6236
  //#endregion
6237
6237
  //#region src/scene/effects/ZoomBlurEffect.ts
6238
- var mi, hi = class extends H {
6238
+ var mi, hi = class extends U {
6239
6239
  static {
6240
6240
  mi = this;
6241
6241
  }
6242
- static material = new F({ gl: {
6242
+ static material = new I({ gl: {
6243
6243
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6244
6244
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec4 uInputSize;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n float minGradient = uInnerRadius * 0.3;\n float innerRadius1 = (uInnerRadius + minGradient * 0.5) / uInputSize.x;\n\n float gradient = uRadius * 0.3;\n float radius1 = (uRadius - gradient * 0.5) / uInputSize.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / uInputSize.xy - vUv);\n float dist = length(vec2(dir.x, dir.y * uInputSize.y / uInputSize.x));\n\n float strength1 = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius1) {\n delta = innerRadius1 - dist;\n gap = minGradient;\n } else if (radius1 >= 0.0 && dist > radius1) { // radius1 < 0 means it's infinity\n delta = dist - radius1;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / uInputSize.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength1 *= delta;\n if (countLimit < 1.0) {\n gl_FragColor = texture2D(sampler, vUv);\n return;\n }\n }\n\n float offset = rand(vUv, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength1;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vUv + dir * percent;\n color += texture2D(sampler, p) * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n\n gl_FragColor = color;\n}"
6245
6245
  } });
@@ -6248,7 +6248,7 @@ var mi, hi = class extends H {
6248
6248
  }
6249
6249
  apply(e, t) {
6250
6250
  t.redraw(e, () => {
6251
- I.draw(e, mi.material, {
6251
+ L.draw(e, mi.material, {
6252
6252
  sampler: 0,
6253
6253
  uCenter: [t.width / 2, t.height / 2],
6254
6254
  uInnerRadius: this.innerRadius,
@@ -6264,7 +6264,7 @@ var mi, hi = class extends H {
6264
6264
  });
6265
6265
  }
6266
6266
  };
6267
- O([_(), D("design:type", Array)], hi.prototype, "center", void 0), O([_({ fallback: 20 }), D("design:type", Number)], hi.prototype, "innerRadius", void 0), O([_({ fallback: -1 }), D("design:type", Number)], hi.prototype, "radius", void 0), O([_({ fallback: .1 }), D("design:type", Number)], hi.prototype, "strength", void 0), hi = mi = O([b("ZoomBlurEffect"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6267
+ k([_(), O("design:type", Array)], hi.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], hi.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], hi.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], hi.prototype, "strength", void 0), hi = mi = k([b("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6268
6268
  //#endregion
6269
6269
  //#region src/scene/2d/element/utils.ts
6270
6270
  function gi(e, t) {
@@ -6289,7 +6289,7 @@ function gi(e, t) {
6289
6289
  }
6290
6290
  //#endregion
6291
6291
  //#region src/scene/2d/element/Element2DFill.ts
6292
- var J = class extends C {
6292
+ var Y = class extends C {
6293
6293
  _parent;
6294
6294
  texture;
6295
6295
  animatedTexture;
@@ -6384,10 +6384,10 @@ var J = class extends C {
6384
6384
  this.updateFrameIndex();
6385
6385
  }
6386
6386
  };
6387
- O([_({ fallback: !0 }), D("design:type", Boolean)], J.prototype, "enabled", void 0), O([_(), D("design:type", Object)], J.prototype, "color", void 0), O([_(), D("design:type", Object)], J.prototype, "image", void 0), O([_(), D("design:type", Object)], J.prototype, "linearGradient", void 0), O([_(), D("design:type", Object)], J.prototype, "radialGradient", void 0), O([_(), D("design:type", Object)], J.prototype, "cropRect", void 0), O([_(), D("design:type", Object)], J.prototype, "stretchRect", void 0), O([_(), D("design:type", Object)], J.prototype, "dpi", void 0), O([_(), D("design:type", Object)], J.prototype, "rotateWithShape", void 0), O([_(), D("design:type", Object)], J.prototype, "tile", void 0), O([_(), D("design:type", Object)], J.prototype, "opacity", void 0);
6387
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Y.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Y.prototype, "color", void 0), k([_(), O("design:type", Object)], Y.prototype, "image", void 0), k([_(), O("design:type", Object)], Y.prototype, "linearGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "radialGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "cropRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "stretchRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "dpi", void 0), k([_(), O("design:type", Object)], Y.prototype, "rotateWithShape", void 0), k([_(), O("design:type", Object)], Y.prototype, "tile", void 0), k([_(), O("design:type", Object)], Y.prototype, "opacity", void 0);
6388
6388
  //#endregion
6389
6389
  //#region src/scene/2d/element/Element2DBackground.ts
6390
- var _i = class extends J {
6390
+ var _i = class extends Y {
6391
6391
  setProperties(e) {
6392
6392
  return super._setProperties(d(e) ? void 0 : f(e));
6393
6393
  }
@@ -6399,7 +6399,7 @@ var _i = class extends J {
6399
6399
  }
6400
6400
  }
6401
6401
  };
6402
- O([_(), D("design:type", Object)], _i.prototype, "fillWithShape", void 0);
6402
+ k([_(), O("design:type", Object)], _i.prototype, "fillWithShape", void 0);
6403
6403
  //#endregion
6404
6404
  //#region src/scene/2d/element/Element2DChart.ts
6405
6405
  var vi;
@@ -6429,7 +6429,7 @@ function bi(e) {
6429
6429
  };
6430
6430
  }
6431
6431
  }
6432
- var Y = class extends C {
6432
+ var X = class extends C {
6433
6433
  _parent;
6434
6434
  _instance;
6435
6435
  _container;
@@ -6565,7 +6565,7 @@ var Y = class extends C {
6565
6565
  this._teardown();
6566
6566
  }
6567
6567
  };
6568
- O([_({ fallback: !0 }), D("design:type", Boolean)], Y.prototype, "enabled", void 0), O([_({ fallback: "column" }), D("design:type", Object)], Y.prototype, "type", void 0), O([_(), D("design:type", Object)], Y.prototype, "grouping", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Y.prototype, "categories", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Y.prototype, "series", void 0), O([_(), D("design:type", Object)], Y.prototype, "title", void 0), O([_(), D("design:type", Object)], Y.prototype, "legend", void 0), O([_(), D("design:type", Object)], Y.prototype, "categoryAxis", void 0), O([_(), D("design:type", Object)], Y.prototype, "valueAxis", void 0);
6568
+ k([_({ fallback: !0 }), O("design:type", Boolean)], X.prototype, "enabled", void 0), k([_({ fallback: "column" }), O("design:type", Object)], X.prototype, "type", void 0), k([_(), O("design:type", Object)], X.prototype, "grouping", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], X.prototype, "categories", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], X.prototype, "series", void 0), k([_(), O("design:type", Object)], X.prototype, "title", void 0), k([_(), O("design:type", Object)], X.prototype, "legend", void 0), k([_(), O("design:type", Object)], X.prototype, "categoryAxis", void 0), k([_(), O("design:type", Object)], X.prototype, "valueAxis", void 0);
6569
6569
  //#endregion
6570
6570
  //#region src/scene/2d/element/Element2DConnection.ts
6571
6571
  var xi = class extends C {
@@ -6642,7 +6642,7 @@ var xi = class extends C {
6642
6642
  return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Dr(this.mode, e ?? t, t ?? e)), this._routePath;
6643
6643
  }
6644
6644
  };
6645
- O([_(), D("design:type", Object)], xi.prototype, "start", void 0), O([_(), D("design:type", Object)], xi.prototype, "end", void 0), O([_({ fallback: "straight" }), D("design:type", Object)], xi.prototype, "mode", void 0), O([_({ fallback: .5 }), D("design:type", Number)], xi.prototype, "labelPosition", void 0);
6645
+ k([_(), O("design:type", Object)], xi.prototype, "start", void 0), k([_(), O("design:type", Object)], xi.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], xi.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], xi.prototype, "labelPosition", void 0);
6646
6646
  function Si(e, t) {
6647
6647
  if (!t) return e;
6648
6648
  let n = Math.cos(t), r = Math.sin(t);
@@ -6715,7 +6715,7 @@ function Oi(e, t, n, r, i = {}) {
6715
6715
  }
6716
6716
  //#endregion
6717
6717
  //#region src/scene/2d/element/Element2DForeground.ts
6718
- var ki = class extends J {
6718
+ var ki = class extends Y {
6719
6719
  _sourceCanvas;
6720
6720
  _sourceImage;
6721
6721
  setProperties(e) {
@@ -6742,7 +6742,7 @@ var ki = class extends J {
6742
6742
  let e = await this._resolveSourceCanvas();
6743
6743
  if (!e) return;
6744
6744
  let t = e.width, n = e.height, r = await this._resolvePatterns(), i = Oi(e, this.effects, t, n, r);
6745
- this.texture = new R({
6745
+ this.texture = new z({
6746
6746
  source: i,
6747
6747
  width: t,
6748
6748
  height: n,
@@ -6756,7 +6756,7 @@ var ki = class extends J {
6756
6756
  if (!n || d(n) || e[n]) continue;
6757
6757
  let r = await $.loadBy(`${n}#mc-foreground-pattern`, async () => {
6758
6758
  let e = await $.fetchImageBitmap(n), t = this._snapshot(e);
6759
- return Ne && e instanceof ImageBitmap && e.close(), t;
6759
+ return Pe && e instanceof ImageBitmap && e.close(), t;
6760
6760
  });
6761
6761
  r && (e[n] = r);
6762
6762
  }
@@ -6767,7 +6767,7 @@ var ki = class extends J {
6767
6767
  if (d(this.image) || this.image === "viewport") return;
6768
6768
  let e = this.image, t = await $.loadBy(`${e}#mc-foreground-source`, async () => {
6769
6769
  let t = await $.fetchImageBitmap(e), n = this._snapshot(t);
6770
- return Ne && t instanceof ImageBitmap && t.close(), n;
6770
+ return Pe && t instanceof ImageBitmap && t.close(), n;
6771
6771
  });
6772
6772
  return this._sourceImage === e && t && (this._sourceCanvas = t), t;
6773
6773
  }
@@ -6776,14 +6776,14 @@ var ki = class extends J {
6776
6776
  if (!(!r || !i)) return i.drawImage(e, 0, 0, t, n), r;
6777
6777
  }
6778
6778
  };
6779
- O([_(), D("design:type", Object)], ki.prototype, "fillWithShape", void 0), O([_(), D("design:type", Array)], ki.prototype, "effects", void 0);
6779
+ k([_(), O("design:type", Object)], ki.prototype, "fillWithShape", void 0), k([_(), O("design:type", Array)], ki.prototype, "effects", void 0);
6780
6780
  //#endregion
6781
6781
  //#region src/scene/2d/element/Element2DOutline.ts
6782
6782
  var Ai = {
6783
6783
  sm: 4,
6784
6784
  md: 6,
6785
6785
  lg: 8
6786
- }, ji = class extends J {
6786
+ }, ji = class extends Y {
6787
6787
  setProperties(e) {
6788
6788
  return super._setProperties(d(e) ? void 0 : ee(e));
6789
6789
  }
@@ -6832,7 +6832,7 @@ var Ai = {
6832
6832
  ee.fillStyle = i, ee.moveTo(e.x, e.y).lineTo(p + h, m + g).lineTo(p - h, m - g).closePath().fill();
6833
6833
  }
6834
6834
  };
6835
- O([_(), D("design:type", Object)], ji.prototype, "color", void 0), O([_(), D("design:type", Object)], ji.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", Object)], ji.prototype, "style", void 0), O([_({ fallback: "butt" }), D("design:type", Object)], ji.prototype, "lineCap", void 0), O([_({ fallback: "miter" }), D("design:type", Object)], ji.prototype, "lineJoin", void 0), O([_(), D("design:type", Object)], ji.prototype, "headEnd", void 0), O([_(), D("design:type", Object)], ji.prototype, "tailEnd", void 0);
6835
+ k([_(), O("design:type", Object)], ji.prototype, "color", void 0), k([_(), O("design:type", Object)], ji.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], ji.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], ji.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], ji.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], ji.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], ji.prototype, "tailEnd", void 0);
6836
6836
  //#endregion
6837
6837
  //#region src/scene/2d/element/Element2DShadow.ts
6838
6838
  var Mi = class extends C {
@@ -6859,7 +6859,7 @@ var Mi = class extends C {
6859
6859
  this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new $r({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6860
6860
  }
6861
6861
  };
6862
- O([_({ fallback: !0 }), D("design:type", Boolean)], Mi.prototype, "enabled", void 0), O([_({ fallback: "#000000FF" }), D("design:type", Object)], Mi.prototype, "color", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Mi.prototype, "blur", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Mi.prototype, "offsetY", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Mi.prototype, "offsetX", void 0);
6862
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Mi.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Mi.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "offsetX", void 0);
6863
6863
  //#endregion
6864
6864
  //#region src/scene/2d/element/Element2DShape.ts
6865
6865
  var Ni = class extends C {
@@ -6921,8 +6921,8 @@ var Ni = class extends C {
6921
6921
  _updatePath2DSet() {
6922
6922
  let e;
6923
6923
  if (this.svg) {
6924
- let t = de(this.svg);
6925
- this._path2DSet = fe(t), e = this._path2DSet.viewBox;
6924
+ let t = fe(this.svg);
6925
+ this._path2DSet = pe(t), e = this._path2DSet.viewBox;
6926
6926
  } else this._path2DSet.paths.length = 0, this.paths?.forEach((e, t) => {
6927
6927
  let { data: n, ...r } = e, i = new le();
6928
6928
  i.style = r, i.addData(n), this._path2DSet.paths[t] = i;
@@ -6960,7 +6960,7 @@ var Ni = class extends C {
6960
6960
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
6961
6961
  }
6962
6962
  };
6963
- O([_({ fallback: !0 }), D("design:type", Boolean)], Ni.prototype, "enabled", void 0), O([_(), D("design:type", Object)], Ni.prototype, "preset", void 0), O([_(), D("design:type", Object)], Ni.prototype, "svg", void 0), O([_(), D("design:type", Object)], Ni.prototype, "viewBox", void 0), O([_(), D("design:type", Object)], Ni.prototype, "paths", void 0), O([_(), D("design:type", Object)], Ni.prototype, "connectionPoints", void 0);
6963
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Ni.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Ni.prototype, "preset", void 0), k([_(), O("design:type", Object)], Ni.prototype, "svg", void 0), k([_(), O("design:type", Object)], Ni.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Ni.prototype, "paths", void 0), k([_(), O("design:type", Object)], Ni.prototype, "connectionPoints", void 0);
6964
6964
  //#endregion
6965
6965
  //#region src/scene/2d/element/Element2DStyle.ts
6966
6966
  var Pi = class extends w {
@@ -7037,7 +7037,7 @@ var Ii = 100, Li = 40, Ri = class extends C {
7037
7037
  }, r = `${JSON.stringify(e)}|${n.left},${n.top},${n.width},${n.height}`;
7038
7038
  if (this._cellNodes.has(t) && this._cellSnapshots.get(t) === r) continue;
7039
7039
  let i = this._cellNodes.get(t);
7040
- i || (i = z.parse({ is: "Element2D" }, "Element2D"), this._parent.appendChild(i, "back"), this._cellNodes.set(t, i)), this._applyCell(i, e, n), this._cellSnapshots.set(t, r);
7040
+ i || (i = B.parse({ is: "Element2D" }, "Element2D"), this._parent.appendChild(i, "back"), this._cellNodes.set(t, i)), this._applyCell(i, e, n), this._cellSnapshots.set(t, r);
7041
7041
  }
7042
7042
  for (let [e, t] of this._cellNodes) s.has(e) || (this._parent.removeChild(t), t.destroy(), this._cellNodes.delete(e), this._cellSnapshots.delete(e));
7043
7043
  this._parent.requestDraw();
@@ -7049,7 +7049,7 @@ var Ii = 100, Li = 40, Ri = class extends C {
7049
7049
  }, e.background = t.background;
7050
7050
  for (let t of [...e.getChildren(!0)]) e.removeChild(t), t.destroy();
7051
7051
  t.children?.forEach((t) => {
7052
- e.appendChild(z.parse(t, "Element2D"));
7052
+ e.appendChild(B.parse(t, "Element2D"));
7053
7053
  });
7054
7054
  }
7055
7055
  _clearCells() {
@@ -7060,10 +7060,10 @@ var Ii = 100, Li = 40, Ri = class extends C {
7060
7060
  this._clearCells();
7061
7061
  }
7062
7062
  };
7063
- O([_({ fallback: !0 }), D("design:type", Boolean)], Ri.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Ri.prototype, "columns", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Ri.prototype, "rows", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Ri.prototype, "cells", void 0);
7063
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Ri.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "cells", void 0);
7064
7064
  //#endregion
7065
7065
  //#region src/scene/2d/element/Element2DText.ts
7066
- var X = class extends C {
7066
+ var Z = class extends C {
7067
7067
  _parent;
7068
7068
  base;
7069
7069
  get textContent() {
@@ -7077,7 +7077,7 @@ var X = class extends C {
7077
7077
  _texture = new er({ mipmap: !0 });
7078
7078
  _textureMap = /* @__PURE__ */ new Map();
7079
7079
  constructor(e) {
7080
- super(), this._parent = e, this.base = new _e(), this.base.setPropertyAccessor(this);
7080
+ super(), this._parent = e, this.base = new ve(), this.base.setPropertyAccessor(this);
7081
7081
  }
7082
7082
  setProperties(e) {
7083
7083
  return super.setProperties(d(e) ? void 0 : ie(e));
@@ -7170,7 +7170,7 @@ var X = class extends C {
7170
7170
  this.base.pathSets.forEach((n) => {
7171
7171
  n.paths.forEach((n) => {
7172
7172
  let r = n.getMeta();
7173
- if (r instanceof ge) {
7173
+ if (r instanceof _e) {
7174
7174
  let i = r.parent.index, a = r.parent.parent.index;
7175
7175
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7176
7176
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
@@ -7217,10 +7217,10 @@ var X = class extends C {
7217
7217
  }
7218
7218
  process(e) {}
7219
7219
  };
7220
- O([_({ fallback: !0 }), D("design:type", Object)], X.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], X.prototype, "content", void 0), O([_({ alias: "_parent.style.json" }), D("design:type", Object)], X.prototype, "style", void 0), O([_(), D("design:type", Object)], X.prototype, "effects", void 0), O([_(), D("design:type", Object)], X.prototype, "fill", void 0), O([_(), D("design:type", Object)], X.prototype, "outline", void 0), O([_(), D("design:type", Object)], X.prototype, "deformation", void 0), O([_({ alias: "base.measureDom" }), D("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], X.prototype, "measureDom", void 0), O([_({ alias: "base.fonts" }), D("design:type", Object)], X.prototype, "fonts", void 0), O([_({ fallback: "auto" }), D("design:type", Object)], X.prototype, "drawMode", void 0);
7220
+ k([_({ fallback: !0 }), O("design:type", Object)], Z.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Z.prototype, "content", void 0), k([_({ alias: "_parent.style.json" }), O("design:type", Object)], Z.prototype, "style", void 0), k([_(), O("design:type", Object)], Z.prototype, "effects", void 0), k([_(), O("design:type", Object)], Z.prototype, "fill", void 0), k([_(), O("design:type", Object)], Z.prototype, "outline", void 0), k([_(), O("design:type", Object)], Z.prototype, "deformation", void 0), k([_({ alias: "base.measureDom" }), O("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], Z.prototype, "measureDom", void 0), k([_({ alias: "base.fonts" }), O("design:type", Object)], Z.prototype, "fonts", void 0), k([_({ fallback: "auto" }), O("design:type", Object)], Z.prototype, "drawMode", void 0);
7221
7221
  //#endregion
7222
7222
  //#region src/scene/2d/element/Flexbox.ts
7223
- var Z = {
7223
+ var Q = {
7224
7224
  left: 0,
7225
7225
  top: 1,
7226
7226
  right: 2,
@@ -7234,7 +7234,7 @@ var Z = {
7234
7234
  column: 0,
7235
7235
  row: 1,
7236
7236
  all: 2
7237
- }, Q = {
7237
+ }, Bi = {
7238
7238
  auto: 0,
7239
7239
  "flex-start": 1,
7240
7240
  center: 2,
@@ -7244,42 +7244,42 @@ var Z = {
7244
7244
  "space-between": 6,
7245
7245
  "space-around": 7,
7246
7246
  "space-evenly": 8
7247
- }, Bi = {
7247
+ }, Vi = {
7248
7248
  flex: 0,
7249
7249
  none: 1,
7250
7250
  contents: 2
7251
- }, Vi = {
7251
+ }, Hi = {
7252
7252
  inherit: 0,
7253
7253
  ltr: 1,
7254
7254
  rtl: 2
7255
- }, Hi = {
7255
+ }, Ui = {
7256
7256
  column: 0,
7257
7257
  "column-reverse": 1,
7258
7258
  row: 2,
7259
7259
  "row-reverse": 3
7260
- }, Ui = {
7260
+ }, Wi = {
7261
7261
  "no-wrap": 0,
7262
7262
  wrap: 1,
7263
7263
  "Wrap-reverse": 2
7264
- }, Wi = {
7264
+ }, Gi = {
7265
7265
  "flex-start": 0,
7266
7266
  center: 1,
7267
7267
  "flex-end": 2,
7268
7268
  "space-between": 3,
7269
7269
  "space-around": 4,
7270
7270
  "space-evenly": 5
7271
- }, Gi = {
7271
+ }, Ki = {
7272
7272
  visible: 0,
7273
7273
  hidden: 1,
7274
7274
  scroll: 2
7275
- }, Ki = {
7275
+ }, qi = {
7276
7276
  static: 0,
7277
7277
  relative: 1,
7278
7278
  absolute: 2
7279
- }, qi = {
7279
+ }, Ji = {
7280
7280
  "border-box": 0,
7281
7281
  "content-box": 1
7282
- }, Ji = class e {
7282
+ }, Yi = class e {
7283
7283
  _parent;
7284
7284
  static _yoga;
7285
7285
  static async load() {
@@ -7291,51 +7291,51 @@ var Z = {
7291
7291
  this._parent = e, this._addChild = this._addChild.bind(this), this._removeChild = this._removeChild.bind(this), this._parent.on("addChild", this._addChild), this._parent.on("removeChild", this._removeChild);
7292
7292
  }
7293
7293
  _addChild(e, t) {
7294
- if (e instanceof $i && e.flexbox.node && this.node) {
7294
+ if (e instanceof ea && e.flexbox.node && this.node) {
7295
7295
  this.node.insertChild(e.flexbox.node, t);
7296
7296
  let n = e.style.getProperties();
7297
7297
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7298
7298
  }
7299
7299
  }
7300
7300
  _removeChild(e, t) {
7301
- e instanceof $i && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7301
+ e instanceof ea && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7302
7302
  }
7303
7303
  updateStyleProperty(e, t) {
7304
7304
  let n = this.node;
7305
7305
  if (n) {
7306
7306
  switch (e) {
7307
7307
  case "alignContent":
7308
- n.setAlignContent(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7308
+ n.setAlignContent(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7309
7309
  break;
7310
7310
  case "alignItems":
7311
- n.setAlignItems(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7311
+ n.setAlignItems(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7312
7312
  break;
7313
7313
  case "alignSelf":
7314
- n.setAlignSelf(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7314
+ n.setAlignSelf(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7315
7315
  break;
7316
7316
  case "aspectRatio":
7317
7317
  n.setAspectRatio(t);
7318
7318
  break;
7319
7319
  case "borderTop":
7320
- n.setBorder(Z.top, this._parent.style.borderWidth);
7320
+ n.setBorder(Q.top, this._parent.style.borderWidth);
7321
7321
  break;
7322
7322
  case "borderBottom":
7323
- n.setBorder(Z.bottom, this._parent.style.borderWidth);
7323
+ n.setBorder(Q.bottom, this._parent.style.borderWidth);
7324
7324
  break;
7325
7325
  case "borderLeft":
7326
- n.setBorder(Z.left, this._parent.style.borderWidth);
7326
+ n.setBorder(Q.left, this._parent.style.borderWidth);
7327
7327
  break;
7328
7328
  case "borderRight":
7329
- n.setBorder(Z.right, this._parent.style.borderWidth);
7329
+ n.setBorder(Q.right, this._parent.style.borderWidth);
7330
7330
  break;
7331
7331
  case "border":
7332
- n.setBorder(Z.all, this._parent.style.borderWidth);
7332
+ n.setBorder(Q.all, this._parent.style.borderWidth);
7333
7333
  break;
7334
7334
  case "direction":
7335
- n.setDirection(t ? Vi[t] ?? Vi.inherit : Vi.inherit);
7335
+ n.setDirection(t ? Hi[t] ?? Hi.inherit : Hi.inherit);
7336
7336
  break;
7337
7337
  case "display":
7338
- n.setDisplay(t ? Bi[t] ?? Bi.flex : Bi.flex);
7338
+ n.setDisplay(t ? Vi[t] ?? Vi.flex : Vi.flex);
7339
7339
  break;
7340
7340
  case "flex":
7341
7341
  n.setFlex(t);
@@ -7344,7 +7344,7 @@ var Z = {
7344
7344
  n.setFlexBasis(t);
7345
7345
  break;
7346
7346
  case "flexDirection":
7347
- n.setFlexDirection(t ? Hi[t] ?? Hi.row : Hi.row);
7347
+ n.setFlexDirection(t ? Ui[t] ?? Ui.row : Ui.row);
7348
7348
  break;
7349
7349
  case "flexGrow":
7350
7350
  n.setFlexGrow(t);
@@ -7353,31 +7353,31 @@ var Z = {
7353
7353
  n.setFlexShrink(t);
7354
7354
  break;
7355
7355
  case "flexWrap":
7356
- n.setFlexWrap(t ? Ui[t] ?? Ui.wrap : Ui.wrap);
7356
+ n.setFlexWrap(t ? Wi[t] ?? Wi.wrap : Wi.wrap);
7357
7357
  break;
7358
7358
  case "height":
7359
7359
  n.setHeight(t);
7360
7360
  break;
7361
7361
  case "justifyContent":
7362
- n.setJustifyContent(t ? Wi[t] ?? Wi["flex-start"] : Wi["flex-start"]);
7362
+ n.setJustifyContent(t ? Gi[t] ?? Gi["flex-start"] : Gi["flex-start"]);
7363
7363
  break;
7364
7364
  case "gap":
7365
7365
  t !== void 0 && n.setGap(zi.all, t);
7366
7366
  break;
7367
7367
  case "marginTop":
7368
- n.setMargin(Z.top, t);
7368
+ n.setMargin(Q.top, t);
7369
7369
  break;
7370
7370
  case "marginBottom":
7371
- n.setMargin(Z.bottom, t);
7371
+ n.setMargin(Q.bottom, t);
7372
7372
  break;
7373
7373
  case "marginLeft":
7374
- n.setMargin(Z.left, t);
7374
+ n.setMargin(Q.left, t);
7375
7375
  break;
7376
7376
  case "marginRight":
7377
- n.setMargin(Z.right, t);
7377
+ n.setMargin(Q.right, t);
7378
7378
  break;
7379
7379
  case "margin":
7380
- n.setMargin(Z.all, t);
7380
+ n.setMargin(Q.all, t);
7381
7381
  break;
7382
7382
  case "maxHeight":
7383
7383
  n.setMaxHeight(t);
@@ -7392,40 +7392,40 @@ var Z = {
7392
7392
  n.setMinWidth(t);
7393
7393
  break;
7394
7394
  case "overflow":
7395
- n.setOverflow(t ? Gi[t] ?? Gi.visible : Gi.visible);
7395
+ n.setOverflow(t ? Ki[t] ?? Ki.visible : Ki.visible);
7396
7396
  break;
7397
7397
  case "paddingTop":
7398
- n.setPadding(Z.top, t);
7398
+ n.setPadding(Q.top, t);
7399
7399
  break;
7400
7400
  case "paddingBottom":
7401
- n.setPadding(Z.bottom, t);
7401
+ n.setPadding(Q.bottom, t);
7402
7402
  break;
7403
7403
  case "paddingLeft":
7404
- n.setPadding(Z.left, t);
7404
+ n.setPadding(Q.left, t);
7405
7405
  break;
7406
7406
  case "paddingRight":
7407
- n.setPadding(Z.right, t);
7407
+ n.setPadding(Q.right, t);
7408
7408
  break;
7409
7409
  case "padding":
7410
- n.setPadding(Z.all, t);
7410
+ n.setPadding(Q.all, t);
7411
7411
  break;
7412
7412
  case "top":
7413
- n.setPosition(Z.top, t);
7413
+ n.setPosition(Q.top, t);
7414
7414
  break;
7415
7415
  case "bottom":
7416
- n.setPosition(Z.bottom, t);
7416
+ n.setPosition(Q.bottom, t);
7417
7417
  break;
7418
7418
  case "left":
7419
- n.setPosition(Z.left, t);
7419
+ n.setPosition(Q.left, t);
7420
7420
  break;
7421
7421
  case "right":
7422
- n.setPosition(Z.right, t);
7422
+ n.setPosition(Q.right, t);
7423
7423
  break;
7424
7424
  case "position":
7425
- n.setPositionType(t ? Ki[t] ?? Ki.relative : Ki.relative);
7425
+ n.setPositionType(t ? qi[t] ?? qi.relative : qi.relative);
7426
7426
  break;
7427
7427
  case "boxSizing":
7428
- n.setBoxSizing(t ? qi[t] ?? qi["content-box"] : qi["content-box"]);
7428
+ n.setBoxSizing(t ? Ji[t] ?? Ji["content-box"] : Ji["content-box"]);
7429
7429
  break;
7430
7430
  case "width":
7431
7431
  n.setWidth(t);
@@ -7436,7 +7436,7 @@ var Z = {
7436
7436
  }
7437
7437
  update() {
7438
7438
  let e = this._parent, t = this.node;
7439
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Vi.ltr), t.hasNewLayout())) {
7439
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Hi.ltr), t.hasNewLayout())) {
7440
7440
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
7441
7441
  (!Number.isNaN(n) && n !== e.position.x || !Number.isNaN(r) && r !== e.position.y) && e.position.set(n, r), (!Number.isNaN(i) && i !== e.size.x || !Number.isNaN(a) && a !== e.size.y) && e.size.set(i, a), t.markLayoutSeen();
7442
7442
  }
@@ -7444,15 +7444,15 @@ var Z = {
7444
7444
  destroy() {
7445
7445
  this.node?.free(), this.node = void 0;
7446
7446
  }
7447
- }, Yi = new Set(Object.keys(a())), Xi = new Set(Object.keys(s())), Zi = new y(), Qi = [
7447
+ }, Xi = new Set(Object.keys(a())), Zi = new Set(Object.keys(s())), Qi = new y(), $i = [
7448
7448
  [0, 0],
7449
7449
  [1, 0],
7450
7450
  [1, 1],
7451
7451
  [0, 1]
7452
- ], $i = class extends wr {
7453
- flexbox = new Ji(this);
7454
- aabb = new vt();
7455
- globalAabb = new vt();
7452
+ ], ea = class extends wr {
7453
+ flexbox = new Yi(this);
7454
+ aabb = new yt();
7455
+ globalAabb = new yt();
7456
7456
  _parentGlobalDisplay;
7457
7457
  _globalDisplay;
7458
7458
  get globalDisplay() {
@@ -7491,7 +7491,7 @@ var Z = {
7491
7491
  set shape(e) {
7492
7492
  this._shape.resetProperties().setProperties(e);
7493
7493
  }
7494
- _fill = new J(this);
7494
+ _fill = new Y(this);
7495
7495
  get fill() {
7496
7496
  return this._fill;
7497
7497
  }
@@ -7512,7 +7512,7 @@ var Z = {
7512
7512
  set foreground(e) {
7513
7513
  this._foreground.resetProperties().setProperties(e);
7514
7514
  }
7515
- _text = new X(this);
7515
+ _text = new Z(this);
7516
7516
  get text() {
7517
7517
  return this._text;
7518
7518
  }
@@ -7540,7 +7540,7 @@ var Z = {
7540
7540
  set table(e) {
7541
7541
  this._table.resetProperties().setProperties(e);
7542
7542
  }
7543
- _chart = new Y(this);
7543
+ _chart = new X(this);
7544
7544
  get chart() {
7545
7545
  return this._chart;
7546
7546
  }
@@ -7625,7 +7625,7 @@ var Z = {
7625
7625
  this._updateGlobalDisplay();
7626
7626
  break;
7627
7627
  case "rotate":
7628
- this.rotation = (t || 0) * yt, this.updateGlobalTransform();
7628
+ this.rotation = (t || 0) * bt, this.updateGlobalTransform();
7629
7629
  break;
7630
7630
  case "scaleX":
7631
7631
  this.scale.x = t, this.text.isValid() && (t ^ n) < 0 && this.requestDraw();
@@ -7690,7 +7690,7 @@ var Z = {
7690
7690
  this.requestDraw();
7691
7691
  break;
7692
7692
  }
7693
- if ((Xi.has(e) || Yi.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7693
+ if ((Zi.has(e) || Xi.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7694
7694
  else switch (e) {
7695
7695
  case "left":
7696
7696
  this.position.x = Number(t);
@@ -7730,10 +7730,10 @@ var Z = {
7730
7730
  }
7731
7731
  _intersectsViewport(e) {
7732
7732
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
7733
- for (let [e, c] of Qi) t.applyAffineInverse({
7733
+ for (let [e, c] of $i) t.applyAffineInverse({
7734
7734
  x: e * n,
7735
7735
  y: c * r
7736
- }, Zi), i = Math.min(i, Zi.x), a = Math.max(a, Zi.x), o = Math.min(o, Zi.y), s = Math.max(s, Zi.y);
7736
+ }, Qi), i = Math.min(i, Qi.x), a = Math.max(a, Qi.x), o = Math.min(o, Qi.y), s = Math.max(s, Qi.y);
7737
7737
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
7738
7738
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
7739
7739
  }
@@ -7843,10 +7843,10 @@ var Z = {
7843
7843
  super._destroy(), this.flexbox.destroy(), this.aabb.destroy(), this.globalAabb.destroy(), this.size.destroy(), this.style.destroy(), this.background.destroy(), this.shape.destroy(), this.fill.destroy(), this.outline.destroy(), this.text.destroy(), this.foreground.destroy(), this.shadow.destroy(), this.connection.destroy(), this._colorFilterEffect = void 0, this._maskEffect = void 0;
7844
7844
  }
7845
7845
  };
7846
- $i = O([b("Element2D"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $i);
7846
+ ea = k([b("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ea);
7847
7847
  //#endregion
7848
7848
  //#region src/scene/2d/TextureRect2D.ts
7849
- var ea = class extends $i {
7849
+ var ta = class extends ea {
7850
7850
  texture;
7851
7851
  constructor(e, t = []) {
7852
7852
  super(), this.setProperties(e).append(t);
@@ -7860,7 +7860,7 @@ var ea = class extends $i {
7860
7860
  } });
7861
7861
  }
7862
7862
  }
7863
- }, ta = class extends ea {
7863
+ }, na = class extends ta {
7864
7864
  texture = new er();
7865
7865
  animation;
7866
7866
  _lastTime = NaN;
@@ -7891,10 +7891,10 @@ var ea = class extends $i {
7891
7891
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
7892
7892
  }
7893
7893
  };
7894
- O([_({ fallback: "" }), D("design:type", String)], ta.prototype, "src", void 0), ta = O([b("Lottie2D"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ta);
7894
+ k([_({ fallback: "" }), O("design:type", String)], na.prototype, "src", void 0), na = k([b("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], na);
7895
7895
  //#endregion
7896
7896
  //#region src/scene/2d/TransformRect2D.ts
7897
- var na = class extends $i {
7897
+ var ra = class extends ea {
7898
7898
  constructor(e, t = []) {
7899
7899
  super(), this.setProperties(e).append(t);
7900
7900
  }
@@ -7907,20 +7907,20 @@ var na = class extends $i {
7907
7907
  }
7908
7908
  }
7909
7909
  _drawCircle(e, t) {
7910
- this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = R.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
7910
+ this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = z.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
7911
7911
  }
7912
7912
  _drawEllipse(e, t) {
7913
- this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = R.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
7913
+ this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = z.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
7914
7914
  }
7915
7915
  _draw() {
7916
7916
  let { width: e, height: t } = this.getRect();
7917
7917
  this.context.rect(0, 0, e, t), this.context.strokeStyle = "#00FF00", this.context.stroke(), this._drawCircle(0, 0), this._drawCircle(e, t), this._drawCircle(0, t), this._drawEllipse(0, t / 2), this._drawCircle(e, 0), this._drawEllipse(e, t / 2);
7918
7918
  }
7919
7919
  };
7920
- O([_({ fallback: 6 }), D("design:type", Number)], na.prototype, "handleSize", void 0);
7920
+ k([_({ fallback: 6 }), O("design:type", Number)], ra.prototype, "handleSize", void 0);
7921
7921
  //#endregion
7922
7922
  //#region src/scene/2d/Video2D.ts
7923
- var ra = class extends ea {
7923
+ var ia = class extends ta {
7924
7924
  get videoDuration() {
7925
7925
  return (this.texture?.duration ?? 0) * 1e3;
7926
7926
  }
@@ -7960,11 +7960,29 @@ var ra = class extends ea {
7960
7960
  super._process(e), this._updateVideoCurrentTime();
7961
7961
  }
7962
7962
  };
7963
- O([_({ fallback: "" }), D("design:type", String)], ra.prototype, "src", void 0), ra = O([b("Video2D"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ra);
7963
+ k([_({ fallback: "" }), O("design:type", String)], ia.prototype, "src", void 0), ia = k([b("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ia);
7964
7964
  //#endregion
7965
7965
  //#region src/scene/animation/Animation.ts
7966
- var ia = (e) => e, aa = la(.25, .1, .25, 1), oa = la(.42, 0, 1, 1), sa = la(0, 0, .58, 1), ca = la(.42, 0, .58, 1);
7967
- function la(e, t, n, r) {
7966
+ function aa(e) {
7967
+ if (e == null) return 0;
7968
+ let t = String(e).trim(), n = Number.parseFloat(t);
7969
+ return Number.isNaN(n) ? 0 : n / 100;
7970
+ }
7971
+ function oa(e, t) {
7972
+ let n = t * 180 / Math.PI;
7973
+ if (e == null || e === "auto") return n;
7974
+ let r = String(e).trim();
7975
+ if (r === "reverse") return n + 180;
7976
+ if (r.startsWith("auto")) return n + (Number.parseFloat(r.slice(4)) || 0);
7977
+ let i = Number.parseFloat(r);
7978
+ return Number.isNaN(i) ? n : i;
7979
+ }
7980
+ function sa(e) {
7981
+ let t = e.trim(), n = /^path\((.*)\)$/s.exec(t);
7982
+ return n && (t = n[1].trim()), t.length >= 2 && (t[0] === "\"" || t[0] === "'") && t[t.length - 1] === t[0] && (t = t.slice(1, -1)), t.trim();
7983
+ }
7984
+ var ca = (e) => e, la = pa(.25, .1, .25, 1), ua = pa(.42, 0, 1, 1), da = pa(0, 0, .58, 1), fa = pa(.42, 0, .58, 1);
7985
+ function pa(e, t, n, r) {
7968
7986
  let i = 1e-6, a = 3 * e - 3 * n + 1, o = 3 * n - 6 * e, s = 3 * e, c = 3 * t - 3 * r + 1, l = 3 * r - 6 * t, u = 3 * t, d = (e) => (3 * a * e + 2 * o) * e + s, f = (e) => ((a * e + o) * e + s) * e, p = (e) => ((c * e + l) * e + u) * e;
7969
7987
  function m(e) {
7970
7988
  let t = e, n, r;
@@ -7984,17 +8002,18 @@ function la(e, t, n, r) {
7984
8002
  }
7985
8003
  return (e) => p(m(e));
7986
8004
  }
7987
- var ua = {
7988
- linear: ia,
7989
- ease: aa,
7990
- easeIn: oa,
7991
- easeOut: sa,
7992
- easeInOut: ca
7993
- }, da = class extends B {
8005
+ var ma = {
8006
+ linear: ca,
8007
+ ease: la,
8008
+ easeIn: ua,
8009
+ easeOut: da,
8010
+ easeInOut: fa
8011
+ }, ha = class extends V {
7994
8012
  _keyframes = [];
7995
8013
  _isFirstUpdatePosition = !1;
7996
8014
  _cachedProps = new t();
7997
8015
  _stoped = !1;
8016
+ _pathMeasures = /* @__PURE__ */ new Map();
7998
8017
  constructor(e, t = []) {
7999
8018
  super(), this.setProperties(e).append(t);
8000
8019
  }
@@ -8025,9 +8044,10 @@ var ua = {
8025
8044
  e = [this.getParent()].filter(Boolean);
8026
8045
  break;
8027
8046
  }
8028
- return e.filter((e) => e instanceof $i);
8047
+ return e.filter((e) => e instanceof ea);
8029
8048
  }
8030
8049
  _updateKeyframes() {
8050
+ this._pathMeasures.clear();
8031
8051
  let e = [], t = this.keyframes;
8032
8052
  for (let n = t.length, r = 0; r < n; r++) {
8033
8053
  let { offset: i = r === 0 ? 0 : r / (n - 1), easing: a = "linear", ...o } = t[r];
@@ -8057,26 +8077,28 @@ var ua = {
8057
8077
  }
8058
8078
  let e = this._getTargets(), t = 1 / e.length, n = this.currentTimeProgress;
8059
8079
  e.forEach((e, r) => {
8060
- let i = t === 1 ? n : xt(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8080
+ let i = t === 1 ? n : E(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8061
8081
  if (!a) return;
8062
8082
  let o = this._parseKeyframes(i, a);
8063
8083
  o?.length && this._commitStyle(i, e, a, o[0], o[1]);
8064
8084
  });
8065
8085
  }
8066
8086
  _updateCachedProps() {
8067
- this.cancel(), this._getTargets().forEach((e) => {
8068
- let t = /* @__PURE__ */ new Map(), n = this._keyframes;
8069
- for (let r = n.length, i = 0; i < r; i++) Object.keys(n[i].props).forEach((n) => {
8070
- t.set(n, e.style[n]);
8087
+ this.cancel();
8088
+ let e = this._keyframes.some((e) => "offsetPath" in e.props);
8089
+ this._getTargets().forEach((t) => {
8090
+ let n = /* @__PURE__ */ new Map(), r = this._keyframes;
8091
+ for (let e = r.length, i = 0; i < e; i++) Object.keys(r[i].props).forEach((e) => {
8092
+ n.set(e, t.style[e]);
8071
8093
  });
8072
- this._cachedProps.set(e, t);
8094
+ e && n.set("transform", t.style.transform), this._cachedProps.set(t, n);
8073
8095
  });
8074
8096
  }
8075
8097
  _parseEasing(e) {
8076
- if (!e) return ua.linear;
8077
- if (e in ua) return ua[e];
8098
+ if (!e) return ma.linear;
8099
+ if (e in ma) return ma[e];
8078
8100
  let t = e.replace(/cubic-bezier\((.+)\)/, "$1").split(",").map((e) => Number(e));
8079
- return la(t[0], t[1], t[2], t[3]);
8101
+ return pa(t[0], t[1], t[2], t[3]);
8080
8102
  }
8081
8103
  _parseKeyframes(e, t) {
8082
8104
  let n, r = this._keyframes;
@@ -8105,17 +8127,32 @@ var ua = {
8105
8127
  width: t.size.x,
8106
8128
  height: t.size.y,
8107
8129
  fontSize: t.style.fontSize
8108
- };
8109
- n.forEach((e, n) => {
8110
- t.onUpdateStyleProperty(n, this._getDiffValue(n, s[n], l[n], d, f), void 0);
8130
+ }, p = l.offsetPath ?? s.offsetPath, m = p != null;
8131
+ m && this._commitOffsetPath(t, String(p), n, s, l, d), n.forEach((e, n) => {
8132
+ n === "offsetPath" || n === "offsetDistance" || n === "offsetRotate" || m && n === "transform" || t.onUpdateStyleProperty(n, this._getDiffValue(n, s[n], l[n], d, f), void 0);
8111
8133
  });
8112
8134
  }
8135
+ _commitOffsetPath(e, t, n, r, i, a) {
8136
+ let o = sa(t);
8137
+ if (!o) return;
8138
+ let s = this._pathMeasures.get(o);
8139
+ if (!s) {
8140
+ let e = new de(new le(o)), t = e.getPosTanAtProgress(0).position;
8141
+ s = {
8142
+ measure: e,
8143
+ startX: t.x,
8144
+ startY: t.y
8145
+ }, this._pathMeasures.set(o, s);
8146
+ }
8147
+ let c = E(D(aa(r.offsetDistance ?? i.offsetDistance), aa(i.offsetDistance ?? r.offsetDistance), a), 0, 1), { position: l, angle: u } = s.measure.getPosTanAtProgress(c), d = l.x - s.startX, f = l.y - s.startY, p = oa(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8148
+ e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
8149
+ }
8113
8150
  _getDiffValue(e, t, n, r, i) {
8114
8151
  let a, o;
8115
- if (t === "none" && (t = void 0), n === "none" && (n = void 0), t === void 0 || n === void 0) if (t !== void 0) a = Oe(e, String(t), i), o = De(a);
8116
- else if (n !== void 0) o = Oe(e, String(n), i), a = De(o);
8152
+ if (t === "none" && (t = void 0), n === "none" && (n = void 0), t === void 0 || n === void 0) if (t !== void 0) a = ke(e, String(t), i), o = Oe(a);
8153
+ else if (n !== void 0) o = ke(e, String(n), i), a = Oe(o);
8117
8154
  else return;
8118
- else a = Oe(e, String(t), i), o = Oe(e, String(n), i);
8155
+ else a = ke(e, String(t), i), o = ke(e, String(n), i);
8119
8156
  if (Array.isArray(a) && Array.isArray(o)) {
8120
8157
  let e = /* @__PURE__ */ new Set(), t = {}, n = {};
8121
8158
  a.forEach(({ name: n, args: r }) => {
@@ -8128,10 +8165,10 @@ var ua = {
8128
8165
  let a = Math.max(t[e]?.length ?? 0, n[e]?.length ?? 0), o = t[e], s = n[e];
8129
8166
  i += `${e}(${Array.from({ length: a }, (e, t) => {
8130
8167
  let n = o?.[t], i = s?.[t], a = n?.normalizedIntValue ?? 0, c = i?.normalizedIntValue ?? 0;
8131
- return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : E(a, c, r);
8168
+ return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : D(a, c, r);
8132
8169
  }).join(", ")}) `;
8133
8170
  }), i;
8134
- } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : E(a.normalizedIntValue, o.normalizedIntValue, r);
8171
+ } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : D(a.normalizedIntValue, o.normalizedIntValue, r);
8135
8172
  }
8136
8173
  isPlaying() {
8137
8174
  return !this.paused && this.isInsideTimeRange();
@@ -8154,14 +8191,14 @@ var ua = {
8154
8191
  });
8155
8192
  }
8156
8193
  };
8157
- O([_({ fallback: "parent" }), D("design:type", Object)], da.prototype, "effectMode", void 0), O([_({ default: () => [] }), D("design:type", Array)], da.prototype, "keyframes", void 0), O([_(), D("design:type", Object)], da.prototype, "easing", void 0), da = O([b("Animation", {
8194
+ k([_({ fallback: "parent" }), O("design:type", Object)], ha.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], ha.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], ha.prototype, "easing", void 0), ha = k([b("Animation", {
8158
8195
  renderMode: "disabled",
8159
8196
  processSortMode: "parent-before",
8160
8197
  duration: 2e3
8161
- }), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], da);
8198
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ha);
8162
8199
  //#endregion
8163
8200
  //#region src/scene/audio/html/HTMLAudioContext.ts
8164
- var fa = class t extends e {
8201
+ var ga = class t extends e {
8165
8202
  static _instance;
8166
8203
  static get instance() {
8167
8204
  return this._instance ||= new t(), this._instance;
@@ -8191,7 +8228,7 @@ var fa = class t extends e {
8191
8228
  togglePause() {
8192
8229
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
8193
8230
  }
8194
- }, pa = class t extends e {
8231
+ }, _a = class t extends e {
8195
8232
  static PADDING = .1;
8196
8233
  _source = null;
8197
8234
  _audio = null;
@@ -8318,7 +8355,7 @@ var fa = class t extends e {
8318
8355
  let e = this._source;
8319
8356
  e && (e.onended = null, e.onplay = null, e.onpause = null, this._stop()), this._source = null, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._end = 0, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._audio &&= (this._audio.context.off("refresh", this.refresh), this._audio.context.off("refreshPaused", this.refreshPaused), null);
8320
8357
  }
8321
- }, ma = class {
8358
+ }, va = class {
8322
8359
  parent;
8323
8360
  source = new globalThis.Audio();
8324
8361
  _src = "";
@@ -8335,7 +8372,7 @@ var fa = class t extends e {
8335
8372
  return !!this.source && this.source.readyState === 4;
8336
8373
  }
8337
8374
  get context() {
8338
- return fa.instance;
8375
+ return ga.instance;
8339
8376
  }
8340
8377
  constructor(e) {
8341
8378
  this.parent = e;
@@ -8346,9 +8383,9 @@ var fa = class t extends e {
8346
8383
  });
8347
8384
  }
8348
8385
  createSound() {
8349
- return new pa();
8386
+ return new _a();
8350
8387
  }
8351
- }, ha = class extends e {
8388
+ }, ya = class extends e {
8352
8389
  _input;
8353
8390
  _output;
8354
8391
  _processers = [];
@@ -8370,7 +8407,7 @@ var fa = class t extends e {
8370
8407
  get destination() {
8371
8408
  return this._input;
8372
8409
  }
8373
- }, ga = class {
8410
+ }, ba = class {
8374
8411
  destination;
8375
8412
  source;
8376
8413
  constructor(e, t = null) {
@@ -8385,21 +8422,21 @@ var fa = class t extends e {
8385
8422
  };
8386
8423
  //#endregion
8387
8424
  //#region src/scene/audio/web/WebAudioContext.ts
8388
- function _a() {
8389
- if (Ve) return new AudioContext();
8390
- if (He) {
8425
+ function xa() {
8426
+ if (He) return new AudioContext();
8427
+ if (Ue) {
8391
8428
  let e = globalThis.webkitAudioContext;
8392
8429
  return new e();
8393
8430
  } else throw Error("Failed to createAudioContext");
8394
8431
  }
8395
- function va(e, t, n) {
8396
- if (Ue) return new OfflineAudioContext(e, t, n);
8397
- if (We) {
8432
+ function Sa(e, t, n) {
8433
+ if (We) return new OfflineAudioContext(e, t, n);
8434
+ if (Ge) {
8398
8435
  let r = globalThis.webkitOfflineAudioContext;
8399
8436
  return new r(e, t, n);
8400
8437
  } else throw Error("Failed to createOfflineAudioContext");
8401
8438
  }
8402
- var ya = class e extends ha {
8439
+ var Ca = class e extends ya {
8403
8440
  static _instance;
8404
8441
  static get instance() {
8405
8442
  return this._instance ||= new e(), this._instance;
@@ -8440,8 +8477,8 @@ var ya = class e extends ha {
8440
8477
  _compressor;
8441
8478
  _analyser;
8442
8479
  constructor() {
8443
- let e = _a(), t = va(1, 2, Ue ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8444
- r.connect(n), n.connect(e.destination), super(r, n), this._context = e, this._offlineContext = t, this._compressor = n, this._analyser = r, this._locked = e.state === "suspended" && (Re || ze), Ke && (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));
8480
+ let e = xa(), t = Sa(1, 2, We ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8481
+ r.connect(n), n.connect(e.destination), super(r, n), this._context = e, this._offlineContext = t, this._compressor = n, this._analyser = r, this._locked = e.state === "suspended" && (ze || Be), qe && (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));
8445
8482
  }
8446
8483
  _onFocus() {
8447
8484
  if (!this.autoPause) return;
@@ -8481,7 +8518,7 @@ var ya = class e extends ha {
8481
8518
  setParamValue(e, t) {
8482
8519
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
8483
8520
  }
8484
- }, ba = class extends e {
8521
+ }, wa = class extends e {
8485
8522
  _audio = null;
8486
8523
  _sourceNode = null;
8487
8524
  _gain = null;
@@ -8614,7 +8651,7 @@ var ya = class e extends ha {
8614
8651
  destroy() {
8615
8652
  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;
8616
8653
  }
8617
- }, xa = class extends ha {
8654
+ }, Ta = class extends ya {
8618
8655
  parent;
8619
8656
  _sourceBuffer;
8620
8657
  _sourceNode;
@@ -8622,7 +8659,7 @@ var ya = class e extends ha {
8622
8659
  gain;
8623
8660
  analyser;
8624
8661
  get context() {
8625
- return ya.instance;
8662
+ return Ca.instance;
8626
8663
  }
8627
8664
  get isPlayable() {
8628
8665
  return !!this._sourceNode.buffer;
@@ -8637,8 +8674,8 @@ var ya = class e extends ha {
8637
8674
  this._sourceNode.buffer = e;
8638
8675
  }
8639
8676
  constructor(e) {
8640
- let t = ya.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8641
- n.connect(i), i.connect(r), r.connect(ya.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8677
+ let t = Ca.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8678
+ n.connect(i), i.connect(r), r.connect(Ca.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8642
8679
  }
8643
8680
  async load() {
8644
8681
  return this._sourceLoad ||= new Promise((e) => {
@@ -8651,7 +8688,7 @@ var ya = class e extends ha {
8651
8688
  });
8652
8689
  }
8653
8690
  _decode(e) {
8654
- return Promise.resolve(e instanceof AudioBuffer ? e : ya.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8691
+ return Promise.resolve(e instanceof AudioBuffer ? e : Ca.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8655
8692
  }
8656
8693
  cloneSource() {
8657
8694
  let e = this.context, t = this._sourceNode, n = e.audioContext.createBufferSource(), r = e.audioContext.createGain();
@@ -8661,15 +8698,15 @@ var ya = class e extends ha {
8661
8698
  };
8662
8699
  }
8663
8700
  createSound() {
8664
- return new ba();
8701
+ return new wa();
8665
8702
  }
8666
- }, Sa, Ca = class extends B {
8703
+ }, Ea, Da = class extends V {
8667
8704
  static {
8668
- Sa = this;
8705
+ Ea = this;
8669
8706
  }
8670
8707
  static _soundPool = [];
8671
8708
  _sounds = [];
8672
- _platformAudio = Ge ? new xa(this) : new ma(this);
8709
+ _platformAudio = Ke ? new Ta(this) : new va(this);
8673
8710
  get platformAudio() {
8674
8711
  return this._platformAudio;
8675
8712
  }
@@ -8762,7 +8799,7 @@ var ya = class e extends ha {
8762
8799
  this._sounds.length = 0;
8763
8800
  }
8764
8801
  _createSound() {
8765
- return Sa._soundPool.length > 0 ? Sa._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
8802
+ return Ea._soundPool.length > 0 ? Ea._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
8766
8803
  }
8767
8804
  refresh() {
8768
8805
  for (let e = this._sounds.length, t = 0; t < e; t++) this._sounds[t].refresh();
@@ -8778,7 +8815,7 @@ var ya = class e extends ha {
8778
8815
  this._recycleSound(e);
8779
8816
  };
8780
8817
  _recycleSound(e) {
8781
- e.destroy(), Sa._soundPool.includes(e) || Sa._soundPool.push(e);
8818
+ e.destroy(), Ea._soundPool.includes(e) || Ea._soundPool.push(e);
8782
8819
  }
8783
8820
  _prevTime = 0;
8784
8821
  _timer = 0;
@@ -8794,14 +8831,14 @@ var ya = class e extends ha {
8794
8831
  }, 100);
8795
8832
  }
8796
8833
  };
8797
- Ca = Sa = O([b("Audio"), D("design:paramtypes", [Object])], Ca);
8834
+ Da = Ea = k([b("Audio"), O("design:paramtypes", [Object])], Da);
8798
8835
  //#endregion
8799
8836
  //#region src/scene/audio/AudioSpectrum.ts
8800
- var wa = class extends wr {}, Ta = class extends $i {
8837
+ var Oa = class extends wr {}, ka = class extends ea {
8801
8838
  _audioBuffer;
8802
8839
  _src = (() => {
8803
8840
  let e = S();
8804
- return e ? new R({ source: e }) : void 0;
8841
+ return e ? new z({ source: e }) : void 0;
8805
8842
  })();
8806
8843
  _needsUpdateTexture = !1;
8807
8844
  constructor(e = {}) {
@@ -8821,7 +8858,7 @@ var wa = class extends wr {}, Ta = class extends $i {
8821
8858
  }
8822
8859
  }
8823
8860
  async _loadSrc(e) {
8824
- await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => ya.decode(e)).then((e) => {
8861
+ await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => Ca.decode(e)).then((e) => {
8825
8862
  this._audioBuffer = e, this.syncTexture(!0);
8826
8863
  });
8827
8864
  }
@@ -8856,16 +8893,16 @@ var wa = class extends wr {}, Ta = class extends $i {
8856
8893
  this.syncTexture(), super._process(e);
8857
8894
  }
8858
8895
  };
8859
- O([_(), D("design:type", Object)], Ta.prototype, "src", void 0), O([_({ fallback: 0 }), D("design:type", Number)], Ta.prototype, "gap", void 0), O([_({ fallback: "#000000" }), D("design:type", String)], Ta.prototype, "color", void 0), Ta = O([b("AudioWaveform"), D("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Ta);
8896
+ k([_(), O("design:type", Object)], ka.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], ka.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], ka.prototype, "color", void 0), ka = k([b("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], ka);
8860
8897
  //#endregion
8861
8898
  //#region src/scene/transitions/KawaseTransition.ts
8862
- var Ea, Da = class extends Cr {
8899
+ var Aa, ja = class extends Cr {
8863
8900
  static {
8864
- Ea = this;
8901
+ Aa = this;
8865
8902
  }
8866
8903
  blur = 10;
8867
8904
  quality = 10;
8868
- static material = new F({ gl: {
8905
+ static material = new I({ gl: {
8869
8906
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
8870
8907
  fragment: "precision highp float;\nin vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform float progress;\n\nvoid main(void) {\n vec2 offset1 = vec2(offset.x - progress * offset.x, offset.y - progress * offset.y);\n vec4 color = vec4(0.0);\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y - offset1.y));\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y - offset1.y));\n color *= 0.25;\n gl_FragColor = color;\n}"
8871
8908
  } });
@@ -8880,7 +8917,7 @@ var Ea, Da = class extends Cr {
8880
8917
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
8881
8918
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
8882
8919
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
8883
- I.draw(e, Ea.material, {
8920
+ L.draw(e, Aa.material, {
8884
8921
  sampler: r,
8885
8922
  progress: i,
8886
8923
  ...t
@@ -8888,35 +8925,35 @@ var Ea, Da = class extends Cr {
8888
8925
  });
8889
8926
  }
8890
8927
  };
8891
- Da = Ea = O([b("KawaseTransition")], Da);
8928
+ ja = Aa = k([b("KawaseTransition")], ja);
8892
8929
  //#endregion
8893
8930
  //#region src/scene/transitions/LeftEraseTransition.ts
8894
- var Oa, ka = class extends Cr {
8931
+ var Ma, Na = class extends Cr {
8895
8932
  static {
8896
- Oa = this;
8933
+ Ma = this;
8897
8934
  }
8898
- static material = new F({ gl: {
8935
+ static material = new I({ gl: {
8899
8936
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
8900
8937
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform float progress;\nuniform sampler2D previous;\nuniform sampler2D next;\n\nfloat easeInOutQuint(float t) {\n return t < 0.5 ? 16.0*t*t*t*t*t : 1.0+16.0*(--t)*t*t*t*t;\n}\n\nvoid main() {\n vec4 src1Color = texture2D(previous, vUv);\n vec4 src2Color = texture2D(next, vUv);\n float mProgress = 1.0 - progress;\n float mixPercent = 0.0;\n if (vUv.x <= mProgress) {\n mixPercent = 1.0;\n }\n gl_FragColor = mix(src2Color, src1Color, mixPercent);\n}"
8901
8938
  } });
8902
8939
  apply(e) {
8903
- I.draw(e, Oa.material, {
8940
+ L.draw(e, Ma.material, {
8904
8941
  previous: 0,
8905
8942
  next: 1,
8906
8943
  progress: this.currentTimeProgress
8907
8944
  });
8908
8945
  }
8909
8946
  };
8910
- ka = Oa = O([b("LeftEraseTransition")], ka);
8947
+ Na = Ma = k([b("LeftEraseTransition")], Na);
8911
8948
  //#endregion
8912
8949
  //#region src/scene/transitions/TiltShiftTransition.ts
8913
- var Aa, ja = class extends Cr {
8950
+ var Pa, Fa = class extends Cr {
8914
8951
  static {
8915
- Aa = this;
8952
+ Pa = this;
8916
8953
  }
8917
8954
  blur = 100;
8918
8955
  gradientBlur = 600;
8919
- static material = new F({ gl: {
8956
+ static material = new I({ gl: {
8920
8957
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
8921
8958
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\nuniform float progress;\n\nfloat random(vec3 scale, float seed) {\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void) {\n float blur1 = blur - progress * blur;\n float gradientBlur1 = progress * gradientBlur;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientBlur1) * blur1;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample1 = texture2D(sampler, vUv + delta / texSize * percent * radius);\n sample1.rgb *= sample1.a;\n color += sample1 * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}"
8922
8959
  } });
@@ -8924,7 +8961,7 @@ var Aa, ja = class extends Cr {
8924
8961
  let n = this.currentTimeProgress, r, i;
8925
8962
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
8926
8963
  let a = t.width, o = t.height, s = [0, o / 2], c = [600, o / 2], l = [a, o], u = c[0] - s[0], d = c[1] - s[1], f = Math.sqrt(u * u + d * d);
8927
- I.draw(e, Aa.material, {
8964
+ L.draw(e, Pa.material, {
8928
8965
  sampler: r,
8929
8966
  progress: i,
8930
8967
  blur: this.blur,
@@ -8933,7 +8970,7 @@ var Aa, ja = class extends Cr {
8933
8970
  end: c,
8934
8971
  delta: [u / f, d / f],
8935
8972
  texSize: l
8936
- }), I.draw(e, Aa.material, {
8973
+ }), L.draw(e, Pa.material, {
8937
8974
  sampler: r,
8938
8975
  progress: i,
8939
8976
  blur: this.blur,
@@ -8945,18 +8982,18 @@ var Aa, ja = class extends Cr {
8945
8982
  });
8946
8983
  }
8947
8984
  };
8948
- ja = Aa = O([b("TiltShiftTransition")], ja);
8985
+ Fa = Pa = k([b("TiltShiftTransition")], Fa);
8949
8986
  //#endregion
8950
8987
  //#region src/scene/transitions/TwistTransition.ts
8951
- var Ma, Na = class extends Cr {
8988
+ var Ia, La = class extends Cr {
8952
8989
  static {
8953
- Ma = this;
8990
+ Ia = this;
8954
8991
  }
8955
8992
  radius;
8956
8993
  angle = 4;
8957
8994
  padding = 20;
8958
8995
  offset;
8959
- static material = new F({ gl: {
8996
+ static material = new I({ gl: {
8960
8997
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
8961
8998
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\nuniform float progress;\n\nvec2 mapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord *= filterArea.xy;\n return coord;\n}\n\nvec2 unmapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n return coord;\n}\n\nvec2 twist(vec2 coord, float radius) {\n coord -= offset;\n float dist = length(coord);\n if (dist < radius) {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n coord += offset;\n return coord;\n}\n\nvoid main(void) {\n vec2 coord = mapCoord(vUv);\n coord = twist(coord, radius - (progress * radius));\n coord = unmapCoord(coord);\n gl_FragColor = texture2D(sampler, coord);\n}"
8962
8999
  } });
@@ -8964,7 +9001,7 @@ var Ma, Na = class extends Cr {
8964
9001
  let n = this.currentTimeProgress, r, i;
8965
9002
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
8966
9003
  let a = t.width, o = t.height;
8967
- I.draw(e, Ma.material, {
9004
+ L.draw(e, Ia.material, {
8968
9005
  sampler: r,
8969
9006
  progress: i,
8970
9007
  filterArea: [
@@ -8980,10 +9017,10 @@ var Ma, Na = class extends Cr {
8980
9017
  });
8981
9018
  }
8982
9019
  };
8983
- Na = Ma = O([b("TwistTransition")], Na);
9020
+ La = Ia = k([b("TwistTransition")], La);
8984
9021
  //#endregion
8985
9022
  //#region src/asset/loaders/GifLoader.ts
8986
- var Pa = class extends Vn {
9023
+ var Ra = class extends Vn {
8987
9024
  install(e) {
8988
9025
  let t = async (t) => {
8989
9026
  let { decodeFrames: n } = await import("modern-gif");
@@ -9000,14 +9037,14 @@ var Pa = class extends Vn {
9000
9037
  e.register(n, t);
9001
9038
  }), e.gif = this, this;
9002
9039
  }
9003
- }, Fa = class extends Vn {
9040
+ }, za = class extends Vn {
9004
9041
  install(e) {
9005
9042
  let t = async (e) => JSON.parse(await e.text());
9006
9043
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9007
9044
  e.register(n, t);
9008
9045
  }), e.json = this, this;
9009
9046
  }
9010
- }, Ia = class extends Vn {
9047
+ }, Ba = class extends Vn {
9011
9048
  install(e) {
9012
9049
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9013
9050
  container: null,
@@ -9018,14 +9055,14 @@ var Pa = class extends Vn {
9018
9055
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9019
9056
  }), e.lottie = this, this;
9020
9057
  }
9021
- }, La = class extends Vn {
9058
+ }, Va = class extends Vn {
9022
9059
  install(e) {
9023
9060
  let t = async (e) => e.text();
9024
9061
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9025
9062
  }
9026
- }, Ra = class extends Vn {
9063
+ }, Ha = class extends Vn {
9027
9064
  install(e) {
9028
- let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new R({
9065
+ let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new z({
9029
9066
  source: e,
9030
9067
  uploadMethodId: "image",
9031
9068
  mipmap: !0,
@@ -9047,11 +9084,11 @@ var Pa = class extends Vn {
9047
9084
  e.register(n, t);
9048
9085
  }), e.texture = this, this;
9049
9086
  }
9050
- }, za = class extends Vn {
9087
+ }, Ua = class extends Vn {
9051
9088
  install(e) {
9052
9089
  return this.load = (t) => e.awaitBy(() => new ar(t).load()), e.video = this, this;
9053
9090
  }
9054
- }, Ba = Object.entries({
9091
+ }, Wa = Object.entries({
9055
9092
  "font/woff": ["woff"],
9056
9093
  "font/ttf": ["ttf"],
9057
9094
  "font/otf": ["otf"],
@@ -9067,31 +9104,31 @@ var Pa = class extends Vn {
9067
9104
  "image/webp": ["webp"],
9068
9105
  "application/json": ["json"]
9069
9106
  });
9070
- function Va(e) {
9071
- for (let [t, n] of Ba) if (n.includes(e)) return t;
9107
+ function Ga(e) {
9108
+ for (let [t, n] of Wa) if (n.includes(e)) return t;
9072
9109
  }
9073
- function Ha(e) {
9110
+ function Ka(e) {
9074
9111
  let t;
9075
9112
  if (e.startsWith("data:")) t = e.match(/^data:(.+?);/)?.[1];
9076
9113
  else if (e.startsWith("http")) {
9077
9114
  let n = e.split(/[#?]/)[0].split(".").pop()?.trim();
9078
- n && (t = Va(n));
9115
+ n && (t = Ga(n));
9079
9116
  }
9080
9117
  return t;
9081
9118
  }
9082
9119
  //#endregion
9083
9120
  //#region src/asset/Assets.ts
9084
- var Ua = "WeakRef" in globalThis, Wa = class extends e {
9121
+ var qa = "WeakRef" in globalThis, Ja = class extends e {
9085
9122
  defaultHandler = (e) => e;
9086
9123
  _handlers = /* @__PURE__ */ new Map();
9087
9124
  _handleing = /* @__PURE__ */ new Map();
9088
9125
  _handled = /* @__PURE__ */ new Map();
9089
- _gc = Ua ? new FinalizationRegistry((e) => {
9126
+ _gc = qa ? new FinalizationRegistry((e) => {
9090
9127
  let t = this.get(e);
9091
9128
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
9092
9129
  }) : void 0;
9093
9130
  constructor() {
9094
- super(), Ua || x.on(this.gc.bind(this), { sort: 2 });
9131
+ super(), qa || x.on(this.gc.bind(this), { sort: 2 });
9095
9132
  }
9096
9133
  use(e) {
9097
9134
  return e.install(this), this;
@@ -9140,11 +9177,11 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9140
9177
  }
9141
9178
  get(e) {
9142
9179
  let t = this._handled.get(e);
9143
- return Ua && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9180
+ return qa && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9144
9181
  }
9145
9182
  set(e, t) {
9146
9183
  let n = t;
9147
- Ua && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9184
+ qa && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9148
9185
  }
9149
9186
  async awaitBy(e) {
9150
9187
  let t = e(), n = c();
@@ -9159,7 +9196,7 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9159
9196
  return this._handleing.set(e, r), r;
9160
9197
  }
9161
9198
  async load(e, t) {
9162
- let n = await this.loadBy(e), r = Ha(e);
9199
+ let n = await this.loadBy(e), r = Ka(e);
9163
9200
  return r === void 0 && (r = n.type?.split(";")[0] ?? void 0), ((r ? this._handlers.get(r) : void 0) ?? this.defaultHandler)(n, t);
9164
9201
  }
9165
9202
  async waitUntilLoad() {
@@ -9173,14 +9210,14 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9173
9210
  n && "destroy" in n && n.destroy();
9174
9211
  }), this._handled.clear();
9175
9212
  }
9176
- }, $ = new Wa().use(new Hn()).use(new Pa()).use(new Fa()).use(new Ia()).use(new La()).use(new Ra()).use(new za()), Ga = {
9213
+ }, $ = new Ja().use(new Hn()).use(new Ra()).use(new za()).use(new Ba()).use(new Va()).use(new Ha()).use(new Ua()), Ya = {
9177
9214
  alpha: !0,
9178
9215
  stencil: !0,
9179
9216
  antialias: !1,
9180
9217
  premultipliedAlpha: !0,
9181
9218
  preserveDrawingBuffer: !1,
9182
9219
  powerPreference: "default"
9183
- }, Ka = class extends Sr {
9220
+ }, Xa = class extends Sr {
9184
9221
  renderer;
9185
9222
  get view() {
9186
9223
  return this.renderer.view;
@@ -9203,7 +9240,7 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9203
9240
  set pixelRatio(e) {
9204
9241
  this.renderer.pixelRatio = e, this.resize(this.width, this.height);
9205
9242
  }
9206
- _resizeObserver = Pe ? new ResizeObserver((e) => {
9243
+ _resizeObserver = Fe ? new ResizeObserver((e) => {
9207
9244
  let t = e[0];
9208
9245
  if (t.target === this.view) {
9209
9246
  let { inlineSize: e, blockSize: n } = Array.isArray(t.contentBoxSize) ? t.contentBoxSize[0] : t.contentBoxSize;
@@ -9211,14 +9248,14 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9211
9248
  }
9212
9249
  }) : void 0;
9213
9250
  constructor(e = {}) {
9214
- let { view: t, width: n, height: r, pixelRatio: i = Je, autoResize: a, data: o } = e;
9251
+ let { view: t, width: n, height: r, pixelRatio: i = Ye, autoResize: a, data: o } = e;
9215
9252
  super(), this.renderer = new Bn(t, {
9216
- alpha: Ga.alpha ?? e.alpha,
9217
- stencil: Ga.stencil ?? e.stencil,
9218
- antialias: Ga.antialias ?? e.antialias,
9219
- premultipliedAlpha: Ga.premultipliedAlpha ?? e.premultipliedAlpha,
9220
- preserveDrawingBuffer: Ga.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9221
- powerPreference: Ga.powerPreference ?? e.powerPreference
9253
+ alpha: Ya.alpha ?? e.alpha,
9254
+ stencil: Ya.stencil ?? e.stencil,
9255
+ antialias: Ya.antialias ?? e.antialias,
9256
+ premultipliedAlpha: Ya.premultipliedAlpha ?? e.premultipliedAlpha,
9257
+ preserveDrawingBuffer: Ya.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9258
+ powerPreference: Ya.powerPreference ?? e.powerPreference
9222
9259
  }), this._setupInput(), this.pixelRatio = i, a ? !t && this.renderer.view && (this.renderer.view.style.width = "100%", this.renderer.view.style.height = "100%") : this.resize(n || this.gl.drawingBufferWidth || this.view?.clientWidth || 200, r || this.gl.drawingBufferHeight || this.view?.clientHeight || 200, !t), this.setProperties(e), o && this.root.append(o);
9223
9260
  }
9224
9261
  _updateProperty(e, t, n) {
@@ -9251,7 +9288,7 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9251
9288
  return this.renderer.resize(e, t, n), this.root.width = e, this.root.height = t, this.render(), this;
9252
9289
  }
9253
9290
  nextTick() {
9254
- return be();
9291
+ return xe();
9255
9292
  }
9256
9293
  async waitUntilLoad() {
9257
9294
  await $.waitUntilLoad(), await this.nextTick();
@@ -9301,22 +9338,22 @@ var Ua = "WeakRef" in globalThis, Wa = class extends e {
9301
9338
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
9302
9339
  }
9303
9340
  };
9304
- O([_({ fallback: !1 }), D("design:type", Boolean)], Ka.prototype, "autoResize", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], Ka.prototype, "autoStart", void 0);
9341
+ k([_({ fallback: !1 }), O("design:type", Boolean)], Xa.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Xa.prototype, "autoStart", void 0);
9305
9342
  //#endregion
9306
9343
  //#region src/render.ts
9307
- var qa, Ja = [], Ya = !1;
9308
- function Xa() {
9309
- return qa ??= new Ka({
9344
+ var Za, Qa = [], $a = !1;
9345
+ function eo() {
9346
+ return Za ??= new Xa({
9310
9347
  pixelRatio: 1,
9311
9348
  width: 1,
9312
9349
  height: 1,
9313
9350
  preserveDrawingBuffer: !0
9314
9351
  });
9315
9352
  }
9316
- async function Za(e = 100) {
9317
- if (!Ya) {
9318
- for (Ya = !0; Ja.length;) {
9319
- let t = Ja.shift();
9353
+ async function to(e = 100) {
9354
+ if (!$a) {
9355
+ for ($a = !0; Qa.length;) {
9356
+ let t = Qa.shift();
9320
9357
  if (t) try {
9321
9358
  await t();
9322
9359
  } catch (e) {
@@ -9324,11 +9361,11 @@ async function Za(e = 100) {
9324
9361
  }
9325
9362
  else await new Promise((t) => setTimeout(t, e));
9326
9363
  }
9327
- Ya = !1;
9364
+ $a = !1;
9328
9365
  }
9329
9366
  }
9330
- async function Qa(e) {
9331
- let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], onBefore: s, onKeyframe: c, ...l } = e, u = Math.floor(r), d = Math.floor(i), f = Xa();
9367
+ async function no(e) {
9368
+ let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], onBefore: s, onKeyframe: c, ...l } = e, u = Math.floor(r), d = Math.floor(i), f = eo();
9332
9369
  if (f.resetProperties(), f.setProperties(l), f.debug = t, f.fonts = n, f.timeline.currentTime = 0, f.resize(u, d, !0), f.root.removeChildren(!0), f.root.append(a), await s?.(f), await f.waitAndRender(), o.length) {
9333
9370
  let e = o.length, t = o[e - 1];
9334
9371
  for (let n = 0; n < e; n++) {
@@ -9346,15 +9383,15 @@ async function Qa(e) {
9346
9383
  toCanvas2D: () => f.toCanvas2D(new ImageData(p, u, d))
9347
9384
  };
9348
9385
  }
9349
- async function $a(e) {
9386
+ async function ro(e) {
9350
9387
  return new Promise((t) => {
9351
- Ja.push(async () => t(await Qa(e).then((e) => e.toCanvas2D()))), Za();
9388
+ Qa.push(async () => t(await no(e).then((e) => e.toCanvas2D()))), to();
9352
9389
  });
9353
9390
  }
9354
- async function eo(e) {
9391
+ async function io(e) {
9355
9392
  return new Promise((t) => {
9356
- Ja.push(async () => t(await Qa(e).then((e) => e.pixels))), Za();
9393
+ Qa.push(async () => t(await no(e).then((e) => e.pixels))), to();
9357
9394
  });
9358
9395
  }
9359
9396
  //#endregion
9360
- export { vt as Aabb2D, $n as AnimatedTexture, da as Animation, Wa as Assets, Ca as Audio, ha as AudioPipeline, ga as AudioProcessor, wa as AudioSpectrum, Ta as AudioWaveform, k as BufferUsage, Tr as Camera2D, sr as CanvasContext, _r as CanvasItem, er as CanvasTexture, T as Color, U as ColorAdjustEffect, Rr as ColorFilterEffect, St as ColorMatrix, Vr as ColorOverlayEffect, Ur as ColorRemoveEffect, Kr as ColorReplaceEffect, tr as ColorTexture, C as CoreObject, yt as DEG_TO_RAD, Je as DEVICE_PIXEL_RATIO, W as DrawboardEffect, $r as DropShadowEffect, H as Effect, Xn as EffectMaterial, $i as Element2D, _i as Element2DBackground, Y as Element2DChart, xi as Element2DConnection, J as Element2DFill, ki as Element2DForeground, ji as Element2DOutline, Mi as Element2DShadow, Ni as Element2DShape, Pi as Element2DStyle, Ri as Element2DTable, X as Element2DText, ti as EmbossEffect, Ka as Engine, Ji as Flexbox, Hn as FontLoader, Zr as GaussianBlurEffect, Wn as Geometry, Pa as GifLoader, ln as GlBatch2DSystem, an as GlBlendMode, Dt as GlBuffer, Pt as GlBufferSystem, Et as GlBufferTarget, pn as GlMaskSystem, Kt as GlProgram, _n as GlRenderTarget, vn as GlRenderTargetSystem, tn as GlShaderSystem, sn as GlState, cn as GlStateSystem, hn as GlStencilSystem, A as GlSystem, gn as GlViewportSystem, G as GlitchEffect, K as GodrayEffect, nr as GradientTexture, ma as HTMLAudio, fa as HTMLAudioContext, pa as HTMLSound, Ke as IN_BROWSER, qe as IN_MAC_OS, Un as IndexBuffer, gt as Input, ut as InputEvent, Fa as JsonLoader, si as KawaseBlurEffect, Da as KawaseTransition, dt as KeyboardInputEvent, ka as LeftEraseTransition, Vn as Loader, ta as Lottie2D, Ia as LottieLoader, Tt as MainLoop, li as MaskEffect, F as Material, lr as Meta, ft as MouseInputEvent, z as Node, wr as Node2D, Ct as Obb2D, q as OutlineEffect, xe as PI, Se as PI_2, pi as PixelateEffect, rr as PixelsTexture, pt as PointerInputEvent, wt as Projection2D, Gn as QuadGeometry, I as QuadUvGeometry, bt as RAD_TO_DEG, _t as RefCounted, L as RenderTarget, Ot as Renderer, w as Resource, Ve as SUPPORTS_AUDIO_CONTEXT, ze as SUPPORTS_CLICK_EVENTS, Be as SUPPORTS_CREATE_IMAGE_BITMAP, Ne as SUPPORTS_IMAGE_BITMAP, Le as SUPPORTS_MOUSE_EVENTS, Ue as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Fe as SUPPORTS_POINTER_EVENTS, Pe as SUPPORTS_RESIZE_OBSERVER, Re as SUPPORTS_TOUCH_EVENTS, Me as SUPPORTS_WEBGL2, He as SUPPORTS_WEBKIT_AUDIO_CONTEXT, We as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ge as SUPPORTS_WEB_AUDIO, Ie as SUPPORTS_WHEEL_EVENTS, Sr as SceneTree, La as TextLoader, R as Texture2D, Ra as TextureLoader, ea as TextureRect2D, x as Ticker, ja as TiltShiftTransition, br as Timeline, B as TimelineNode, na as TransformRect2D, Cr as Transition, Na as TwistTransition, At as UniformGroup, Qn as UvGeometry, Zn as UvMaterial, P as VertexAttribute, N as VertexBuffer, ra as Video2D, za as VideoLoader, ar as VideoTexture, V as Viewport, or as ViewportTexture, xa as WebAudio, ya as WebAudioContext, Bn as WebGLRenderer, ba as WebSound, mt as WheelInputEvent, xr as Window, hi as ZoomBlurEffect, Q as alignMap, $ as assets, Er as axisDir, qi as boxSizingMap, xt as clamp, oi as clampFrag, S as createHTMLCanvas, Nt as createIdFromString, ye as createNode, st as crossOrigin, la as cubicBezier, b as customNode, ve as customNodes, Ga as defaultOptions, ot as determineCrossOrigin, Vi as directionMap, Bi as displayMap, aa as ease, oa as easeIn, ca as easeInOut, sa as easeOut, Z as edgeMap, Hi as flexDirectionMap, Ui as flexWrapMap, ai as frag, nt as getCanvasFactory, De as getDefaultCssPropertyValue, at as getGlContextProvider, Xa as getRenderEngine, zi as gutterMap, lt as instanceId, Qe as isCanvasElement, Ye as isElementNode, Ze as isImageElement, Ce as isPow2, Xe as isVideoElement, $e as isWebgl2, Wi as justifyMap, E as lerp, ia as linear, dn as log2, on as mapGlBlendModes, un as nextPow2, be as nextTick, Gi as overflowMap, Pr as parseCssFilter, ke as parseCssFunctions, Oe as parseCssProperty, Fr as parseCssTransformOrigin, Ki as positionTypeMap, $a as render, eo as renderPixels, hr as resetBatchPool, Dr as routeConnection, tt as setCanvasFactory, it as setGlContextProvider, mn as stencilModeMap, ua as timingFunctions };
9397
+ export { yt as Aabb2D, $n as AnimatedTexture, ha as Animation, Ja as Assets, Da as Audio, ya as AudioPipeline, ba as AudioProcessor, Oa as AudioSpectrum, ka as AudioWaveform, A as BufferUsage, Tr as Camera2D, sr as CanvasContext, _r as CanvasItem, er as CanvasTexture, T as Color, W as ColorAdjustEffect, Rr as ColorFilterEffect, St as ColorMatrix, Vr as ColorOverlayEffect, Ur as ColorRemoveEffect, Kr as ColorReplaceEffect, tr as ColorTexture, C as CoreObject, bt as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, G as DrawboardEffect, $r as DropShadowEffect, U as Effect, Xn as EffectMaterial, ea as Element2D, _i as Element2DBackground, X as Element2DChart, xi as Element2DConnection, Y as Element2DFill, ki as Element2DForeground, ji as Element2DOutline, Mi as Element2DShadow, Ni as Element2DShape, Pi as Element2DStyle, Ri as Element2DTable, Z as Element2DText, ti as EmbossEffect, Xa as Engine, Yi as Flexbox, Hn as FontLoader, Zr as GaussianBlurEffect, Wn as Geometry, Ra as GifLoader, ln as GlBatch2DSystem, an as GlBlendMode, Dt as GlBuffer, Pt as GlBufferSystem, Et as GlBufferTarget, pn as GlMaskSystem, Kt as GlProgram, _n as GlRenderTarget, vn as GlRenderTargetSystem, tn as GlShaderSystem, sn as GlState, cn as GlStateSystem, hn as GlStencilSystem, j as GlSystem, gn as GlViewportSystem, K as GlitchEffect, q as GodrayEffect, nr as GradientTexture, va as HTMLAudio, ga as HTMLAudioContext, _a as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, Un as IndexBuffer, _t as Input, dt as InputEvent, za as JsonLoader, si as KawaseBlurEffect, ja as KawaseTransition, ft as KeyboardInputEvent, Na as LeftEraseTransition, Vn as Loader, na as Lottie2D, Ba as LottieLoader, Tt as MainLoop, li as MaskEffect, I as Material, lr as Meta, pt as MouseInputEvent, B as Node, wr as Node2D, Ct as Obb2D, J as OutlineEffect, Se as PI, Ce as PI_2, pi as PixelateEffect, rr as PixelsTexture, mt as PointerInputEvent, wt as Projection2D, Gn as QuadGeometry, L as QuadUvGeometry, xt as RAD_TO_DEG, vt as RefCounted, R as RenderTarget, Ot as Renderer, w as Resource, He as SUPPORTS_AUDIO_CONTEXT, Be as SUPPORTS_CLICK_EVENTS, Ve as SUPPORTS_CREATE_IMAGE_BITMAP, Pe as SUPPORTS_IMAGE_BITMAP, Re as SUPPORTS_MOUSE_EVENTS, We as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ie as SUPPORTS_POINTER_EVENTS, Fe as SUPPORTS_RESIZE_OBSERVER, ze as SUPPORTS_TOUCH_EVENTS, Ne as SUPPORTS_WEBGL2, Ue as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ge as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ke as SUPPORTS_WEB_AUDIO, Le as SUPPORTS_WHEEL_EVENTS, Sr as SceneTree, Va as TextLoader, z as Texture2D, Ha as TextureLoader, ta as TextureRect2D, x as Ticker, Fa as TiltShiftTransition, br as Timeline, V as TimelineNode, ra as TransformRect2D, Cr as Transition, La as TwistTransition, At as UniformGroup, Qn as UvGeometry, Zn as UvMaterial, F as VertexAttribute, P as VertexBuffer, ia as Video2D, Ua as VideoLoader, ar as VideoTexture, H as Viewport, or as ViewportTexture, Ta as WebAudio, Ca as WebAudioContext, Bn as WebGLRenderer, wa as WebSound, ht as WheelInputEvent, xr as Window, hi as ZoomBlurEffect, Bi as alignMap, $ as assets, Er as axisDir, Ji as boxSizingMap, E as clamp, oi as clampFrag, S as createHTMLCanvas, Nt as createIdFromString, be as createNode, ct as crossOrigin, pa as cubicBezier, b as customNode, ye as customNodes, Ya as defaultOptions, st as determineCrossOrigin, Hi as directionMap, Vi as displayMap, la as ease, ua as easeIn, fa as easeInOut, da as easeOut, Q as edgeMap, Ui as flexDirectionMap, Wi as flexWrapMap, ai as frag, rt as getCanvasFactory, Oe as getDefaultCssPropertyValue, ot as getGlContextProvider, eo as getRenderEngine, zi as gutterMap, ut as instanceId, $e as isCanvasElement, Xe as isElementNode, Qe as isImageElement, we as isPow2, Ze as isVideoElement, et as isWebgl2, Gi as justifyMap, D as lerp, ca as linear, dn as log2, on as mapGlBlendModes, un as nextPow2, xe as nextTick, Ki as overflowMap, Pr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Fr as parseCssTransformOrigin, qi as positionTypeMap, ro as render, io as renderPixels, hr as resetBatchPool, Dr as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, mn as stencilModeMap, ma as timingFunctions };