modern-canvas 0.24.3 → 0.24.4

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
@@ -2986,33 +2986,50 @@ function Rn(e, t) {
2986
2986
  height: f - d
2987
2987
  };
2988
2988
  }
2989
- var zn = class extends M {
2989
+ function zn(e, t) {
2990
+ let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
2991
+ return {
2992
+ x: n,
2993
+ y: r,
2994
+ width: Math.max(0, i - n),
2995
+ height: Math.max(0, a - r)
2996
+ };
2997
+ }
2998
+ var Bn = class extends M {
2990
2999
  install(e) {
2991
3000
  super.install(e), e.scissor = this;
2992
3001
  }
2993
- current = { [-1]: { refCount: 0 } };
3002
+ current = { [-1]: { stack: [] } };
2994
3003
  _setup() {
2995
3004
  super._setup(), this._renderer.renderTarget.on("updateRenderTarget", this._updateRenderTarget);
2996
3005
  }
3006
+ _current() {
3007
+ let e = this._renderer.renderTarget.current?.instanceId ?? -1;
3008
+ return this.current[e] ?? (this.current[e] = { stack: [] });
3009
+ }
2997
3010
  _updateRenderTarget = (e) => {
2998
3011
  if (e) {
2999
- let t = this.current[e.instanceId];
3000
- t ||= this.current[e.instanceId] = { refCount: 0 }, t.rect && t.refCount > 0 ? this.bind(t.rect) : this.bind(null);
3012
+ let t = this.current[e.instanceId] ?? (this.current[e.instanceId] = { stack: [] });
3013
+ this.bind(t.stack[t.stack.length - 1] ?? null);
3001
3014
  }
3002
3015
  };
3003
3016
  push(e) {
3004
- let t = this._gl;
3005
- t.enable(t.SCISSOR_TEST);
3006
- let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1];
3007
- n.refCount++, n.rect = e, this.bind(e);
3017
+ let t = this._current(), n = t.stack[t.stack.length - 1], r = {
3018
+ x: e.x,
3019
+ y: e.y,
3020
+ width: e.width,
3021
+ height: e.height
3022
+ }, i = n ? zn(n, r) : r;
3023
+ t.stack.push(i), this.bind(i);
3008
3024
  }
3009
3025
  pop() {
3010
- let e = this.current[this._renderer.renderTarget.current?.instanceId ?? -1];
3011
- e.refCount > 0 && e.refCount--, e.refCount <= 0 && this.bind(null);
3026
+ let e = this._current();
3027
+ e.stack.pop(), this.bind(e.stack[e.stack.length - 1] ?? null);
3012
3028
  }
3013
3029
  bind(e) {
3014
3030
  let t = this._gl;
3015
3031
  if (e) {
3032
+ t.enable(t.SCISSOR_TEST);
3016
3033
  let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Rn(i, e), l = r.current.height / n - (o + c);
3017
3034
  t.scissor(a * n, l * n, s * n, c * n);
3018
3035
  } else t.disable(t.SCISSOR_TEST);
@@ -3020,7 +3037,7 @@ var zn = class extends M {
3020
3037
  destroy() {
3021
3038
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3022
3039
  }
3023
- }, Bn = class extends Ot {
3040
+ }, Vn = class extends Ot {
3024
3041
  contextLost = !1;
3025
3042
  _systems = [
3026
3043
  new jn(),
@@ -3032,7 +3049,7 @@ var zn = class extends M {
3032
3049
  new pn(),
3033
3050
  new In(),
3034
3051
  new hn(),
3035
- new zn(),
3052
+ new Bn(),
3036
3053
  new ln(),
3037
3054
  new gn()
3038
3055
  ];
@@ -3146,7 +3163,7 @@ var zn = class extends M {
3146
3163
  for (let e = 0; e < i; e += a) c.set(s.subarray(e, e + a), o - e);
3147
3164
  return c;
3148
3165
  }
3149
- }, Vn = class {}, Hn = class extends Vn {
3166
+ }, Hn = class {}, Un = class extends Hn {
3150
3167
  install(e) {
3151
3168
  let t = async (e) => {
3152
3169
  let { parseFont: t } = await import("modern-font");
@@ -3160,15 +3177,15 @@ var zn = class extends M {
3160
3177
  e.register(n, t);
3161
3178
  }), e.font = this, this;
3162
3179
  }
3163
- }, Un = class extends vt {
3180
+ }, Wn = class extends vt {
3164
3181
  constructor(e) {
3165
3182
  super(), this.setProperties(e);
3166
3183
  }
3167
3184
  };
3168
- A([_({ fallback: j.index }), k("design:type", j === void 0 ? Object : j)], Un.prototype, "usage", void 0), A([_({ default: () => new Uint32Array() }), k("design:type", Object)], Un.prototype, "data", void 0);
3185
+ A([_({ fallback: j.index }), k("design:type", j === void 0 ? Object : j)], Wn.prototype, "usage", void 0), A([_({ default: () => new Uint32Array() }), k("design:type", Object)], Wn.prototype, "data", void 0);
3169
3186
  //#endregion
3170
3187
  //#region src/scene/resources/geometries/Geometry.ts
3171
- var Wn = class extends vt {
3188
+ var Gn = class extends vt {
3172
3189
  constructor(e = {}) {
3173
3190
  super(), this.setProperties(e);
3174
3191
  }
@@ -3176,7 +3193,7 @@ var Wn = class extends vt {
3176
3193
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3177
3194
  }
3178
3195
  };
3179
- A([_({ fallback: "triangle-list" }), k("design:type", Object)], Wn.prototype, "topology", void 0), A([_({ default: () => ({}) }), k("design:type", typeof Record > "u" ? Object : Record)], Wn.prototype, "attributes", void 0), A([_({ default: () => new Un() }), k("design:type", Un === void 0 ? Object : Un)], Wn.prototype, "indexBuffer", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Wn.prototype, "instanceCount", void 0);
3196
+ A([_({ fallback: "triangle-list" }), k("design:type", Object)], Gn.prototype, "topology", void 0), A([_({ default: () => ({}) }), k("design:type", typeof Record > "u" ? Object : Record)], Gn.prototype, "attributes", void 0), A([_({ default: () => new Wn() }), k("design:type", Wn === void 0 ? Object : Wn)], Gn.prototype, "indexBuffer", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Gn.prototype, "instanceCount", void 0);
3180
3197
  //#endregion
3181
3198
  //#region src/scene/resources/geometries/VertexBuffer.ts
3182
3199
  var F = class extends vt {
@@ -3195,7 +3212,7 @@ var I = class extends vt {
3195
3212
  A([_({ default: () => new F() }), k("design:type", F === void 0 ? Object : F)], I.prototype, "buffer", void 0), A([_({ fallback: "float32" }), k("design:type", Object)], I.prototype, "format", void 0), A([_(), k("design:type", Boolean)], I.prototype, "instance", void 0), A([_(), k("design:type", Number)], I.prototype, "stride", void 0), A([_(), k("design:type", Number)], I.prototype, "offset", void 0), A([_(), k("design:type", Number)], I.prototype, "start", void 0), A([_(), k("design:type", Number)], I.prototype, "divisor", void 0);
3196
3213
  //#endregion
3197
3214
  //#region src/scene/resources/geometries/QuadGeometry.ts
3198
- var Gn = class extends Wn {
3215
+ var Kn = class extends Gn {
3199
3216
  constructor() {
3200
3217
  super({
3201
3218
  topology: "triangle-strip",
@@ -3212,7 +3229,7 @@ var Gn = class extends Wn {
3212
3229
  1
3213
3230
  ]) })
3214
3231
  }) },
3215
- indexBuffer: new Un({ data: new Uint32Array([
3232
+ indexBuffer: new Wn({ data: new Uint32Array([
3216
3233
  0,
3217
3234
  1,
3218
3235
  3,
@@ -3223,7 +3240,7 @@ var Gn = class extends Wn {
3223
3240
  };
3224
3241
  //#endregion
3225
3242
  //#region src/scene/resources/materials/Material.ts
3226
- function Kn() {
3243
+ function qn() {
3227
3244
  return {
3228
3245
  projectionMatrix: new Float32Array([
3229
3246
  1,
@@ -3274,13 +3291,13 @@ var L = class extends vt {
3274
3291
  }, e.shader.updateUniforms(this);
3275
3292
  }
3276
3293
  };
3277
- A([_({ default: Kn }), k("design:type", typeof Record > "u" ? Object : Record)], L.prototype, "uniforms", void 0);
3294
+ A([_({ default: qn }), k("design:type", typeof Record > "u" ? Object : Record)], L.prototype, "uniforms", void 0);
3278
3295
  //#endregion
3279
3296
  //#region src/scene/resources/materials/EffectMaterial.ts
3280
- var qn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Jn = /vec(\d)\((.*)\)/;
3281
- function Yn(e) {
3297
+ var Jn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Yn = /vec(\d)\((.*)\)/;
3298
+ function Xn(e) {
3282
3299
  e = e.trim();
3283
- let t = e.match(Jn);
3300
+ let t = e.match(Yn);
3284
3301
  if (t) {
3285
3302
  let e = Array.from({ length: Number(t[1]) }, () => 0);
3286
3303
  return t[2].split(",").forEach((t, n) => {
@@ -3289,7 +3306,7 @@ function Yn(e) {
3289
3306
  }
3290
3307
  return Number(e);
3291
3308
  }
3292
- var Xn = class e extends L {
3309
+ var Zn = class e extends L {
3293
3310
  static RE = {
3294
3311
  getColor: /\sgetColor\s*\(/,
3295
3312
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3325,12 +3342,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3325
3342
  progress: 0
3326
3343
  }
3327
3344
  }), this.has = n;
3328
- let r = t.matchAll(qn);
3345
+ let r = t.matchAll(Jn);
3329
3346
  for (let e of r) e[1] && e[2] && e[1].split(",").forEach((t) => {
3330
- this.uniforms[t.trim()] = Yn(e[2]);
3347
+ this.uniforms[t.trim()] = Xn(e[2]);
3331
3348
  });
3332
3349
  }
3333
- }, Zn = class extends L {
3350
+ }, Qn = class extends L {
3334
3351
  static _instance;
3335
3352
  static get instance() {
3336
3353
  return this._instance ??= new this();
@@ -3374,12 +3391,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3374
3391
  }
3375
3392
  });
3376
3393
  }
3377
- }, R = class extends Wn {
3394
+ }, R = class extends Gn {
3378
3395
  static _instance;
3379
3396
  static get instance() {
3380
3397
  return this._instance ??= new this();
3381
3398
  }
3382
- static draw(e, t = Zn.instance, n) {
3399
+ static draw(e, t = Qn.instance, n) {
3383
3400
  this.instance.draw(e, t, n);
3384
3401
  }
3385
3402
  constructor() {
@@ -3412,7 +3429,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3412
3429
  ]) })
3413
3430
  })
3414
3431
  },
3415
- indexBuffer: new Un({ data: new Uint32Array([
3432
+ indexBuffer: new Wn({ data: new Uint32Array([
3416
3433
  0,
3417
3434
  1,
3418
3435
  2,
@@ -3422,7 +3439,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3422
3439
  ]) })
3423
3440
  });
3424
3441
  }
3425
- }, Qn = class extends Wn {
3442
+ }, $n = class extends Gn {
3426
3443
  positionBuffer;
3427
3444
  uvBuffer;
3428
3445
  constructor(e) {
@@ -3439,7 +3456,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3439
3456
  buffer: n
3440
3457
  })
3441
3458
  },
3442
- indexBuffer: new Un({ data: new Uint32Array() })
3459
+ indexBuffer: new Wn({ data: new Uint32Array() })
3443
3460
  }), this.positionBuffer = t, this.uvBuffer = n;
3444
3461
  }
3445
3462
  }, z = class extends vt {
@@ -3573,7 +3590,7 @@ var B = class extends vt {
3573
3590
  A([_({ fallback: "unknown" }), k("design:type", String)], B.prototype, "uploadMethodId", void 0), A([_({ internal: !0 }), k("design:type", Object)], B.prototype, "source", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "height", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "pixelRatio", void 0), A([_({ fallback: "bgra8unorm" }), k("design:type", Object)], B.prototype, "format", void 0), A([_({ fallback: "premultiply-alpha-on-upload" }), k("design:type", Object)], B.prototype, "alphaMode", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "mipLevelCount", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "mipmap", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeU", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeV", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeW", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "magFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "minFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "mipmapFilter", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "isPowerOfTwo", void 0);
3574
3591
  //#endregion
3575
3592
  //#region src/scene/resources/textures/AnimatedTexture.ts
3576
- var $n = class extends vt {
3593
+ var er = class extends vt {
3577
3594
  frames;
3578
3595
  frameIndex = 0;
3579
3596
  get currentFrame() {
@@ -3598,7 +3615,7 @@ var $n = class extends vt {
3598
3615
  e.texture.destroy();
3599
3616
  });
3600
3617
  }
3601
- }, er = class extends B {
3618
+ }, tr = class extends B {
3602
3619
  constructor(e = {}) {
3603
3620
  super({
3604
3621
  pixelRatio: 2,
@@ -3618,7 +3635,7 @@ var $n = class extends vt {
3618
3635
  }
3619
3636
  super._updateProperty(e, t, n);
3620
3637
  }
3621
- }, tr = class e extends B {
3638
+ }, nr = class e extends B {
3622
3639
  static _cached = /* @__PURE__ */ new Map();
3623
3640
  static get(t) {
3624
3641
  let n = new E(t), r = n.toHex(), i = this._cached.get(r);
@@ -3639,7 +3656,7 @@ var $n = class extends vt {
3639
3656
  mipmap: !0
3640
3657
  });
3641
3658
  }
3642
- }, nr = class e extends B {
3659
+ }, rr = class e extends B {
3643
3660
  static test(e) {
3644
3661
  return u(e);
3645
3662
  }
@@ -3673,7 +3690,7 @@ var $n = class extends vt {
3673
3690
  constructor(t, n, r) {
3674
3691
  super(e.linearGradient(t, n, r));
3675
3692
  }
3676
- }, rr = class extends B {
3693
+ }, ir = class extends B {
3677
3694
  constructor(e = {}) {
3678
3695
  super({
3679
3696
  ...e,
@@ -3683,7 +3700,7 @@ var $n = class extends vt {
3683
3700
  };
3684
3701
  //#endregion
3685
3702
  //#region src/scene/resources/textures/VideoTexture.ts
3686
- function ir(e) {
3703
+ function ar(e) {
3687
3704
  return {
3688
3705
  autoLoad: !!(e?.autoLoad ?? !0),
3689
3706
  autoPlay: !!(e?.autoPlay ?? !1),
@@ -3694,7 +3711,7 @@ function ir(e) {
3694
3711
  playsinline: !!(e?.playsinline ?? !0)
3695
3712
  };
3696
3713
  }
3697
- var ar = class e extends B {
3714
+ var or = class e extends B {
3698
3715
  static mimeTypes = new Map(Object.entries({
3699
3716
  ogv: "video/ogg",
3700
3717
  mov: "video/quicktime",
@@ -3756,7 +3773,7 @@ var ar = class e extends B {
3756
3773
  _reject;
3757
3774
  _seekResolves = [];
3758
3775
  constructor(t, n) {
3759
- let r = ir(n);
3776
+ let r = ar(n);
3760
3777
  if (!Xe(t)) {
3761
3778
  typeof t == "string" && (t = [t]);
3762
3779
  let n = t[0].src || t[0];
@@ -3852,13 +3869,13 @@ var ar = class e extends B {
3852
3869
  A([_({
3853
3870
  internal: !0,
3854
3871
  fallback: !0
3855
- }), k("design:type", Boolean)], ar.prototype, "autoUpdate", void 0), A([_({
3872
+ }), k("design:type", Boolean)], or.prototype, "autoUpdate", void 0), A([_({
3856
3873
  internal: !0,
3857
3874
  fallback: 0
3858
- }), k("design:type", Number)], ar.prototype, "fps", void 0);
3875
+ }), k("design:type", Number)], or.prototype, "fps", void 0);
3859
3876
  //#endregion
3860
3877
  //#region src/scene/resources/textures/ViewportTexture.ts
3861
- var or = class extends B {}, sr = class extends v {
3878
+ var sr = class extends B {}, cr = class extends v {
3862
3879
  fillStyle;
3863
3880
  fillRule;
3864
3881
  strokeStyle;
@@ -3872,7 +3889,7 @@ var or = class extends B {}, sr = class extends v {
3872
3889
  _draws = [];
3873
3890
  _triCache = [];
3874
3891
  _parseDrawStyle(e) {
3875
- return e ? e instanceof B ? { texture: e } : { texture: tr.get(e) } : {};
3892
+ return e ? e instanceof B ? { texture: e } : { texture: nr.get(e) } : {};
3876
3893
  }
3877
3894
  stroke(e) {
3878
3895
  if (!this.curves.length) return;
@@ -3989,7 +4006,7 @@ var or = class extends B {}, sr = class extends v {
3989
4006
  destroy() {
3990
4007
  this.reset(), this._triCache.length = 0;
3991
4008
  }
3992
- }, cr = class {
4009
+ }, lr = class {
3993
4010
  front = [];
3994
4011
  default = [];
3995
4012
  back = [];
@@ -4032,7 +4049,7 @@ var or = class extends B {}, sr = class extends v {
4032
4049
  toJSON() {
4033
4050
  return [...this.default];
4034
4051
  }
4035
- }, lr = class extends T {
4052
+ }, ur = class extends T {
4036
4053
  parent;
4037
4054
  getPropertyDeclarations() {
4038
4055
  super.getPropertyDeclarations();
@@ -4051,22 +4068,22 @@ var or = class extends B {}, sr = class extends v {
4051
4068
  deleteProperty: (e, t) => Reflect.has(e, t) || String(t).startsWith("_") ? Reflect.deleteProperty(e, t) : (e.setProperty(String(t), void 0), !0)
4052
4069
  });
4053
4070
  }
4054
- }, ur, dr = {};
4055
- function fr(e) {
4056
- let t = dr[e] ?? 0;
4057
- return t++, dr[e] = t, t;
4071
+ }, dr, fr = {};
4072
+ function pr(e) {
4073
+ let t = fr[e] ?? 0;
4074
+ return t++, fr[e] = t, t;
4058
4075
  }
4059
- var V = ur = class extends T {
4076
+ var V = dr = class extends T {
4060
4077
  static parse(e, t = "Node") {
4061
4078
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4062
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? ur)({
4079
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? dr)({
4063
4080
  ...a,
4064
4081
  meta: r
4065
4082
  });
4066
4083
  return i?.forEach((e) => o.appendChild(this.parse(e))), o;
4067
4084
  }
4068
4085
  _mask;
4069
- _meta = new lr(this);
4086
+ _meta = new ur(this);
4070
4087
  get meta() {
4071
4088
  return this._meta;
4072
4089
  }
@@ -4089,7 +4106,7 @@ var V = ur = class extends T {
4089
4106
  }).append(t), this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess), this.updateProcessable(), this.updateRenderable();
4090
4107
  }
4091
4108
  _defaultName() {
4092
- return `@${this.is}@${fr(this.is)}`;
4109
+ return `@${this.is}@${pr(this.is)}`;
4093
4110
  }
4094
4111
  setProperties(e) {
4095
4112
  if (e) {
@@ -4156,7 +4173,7 @@ var V = ur = class extends T {
4156
4173
  }
4157
4174
  return this;
4158
4175
  }
4159
- _children = new cr();
4176
+ _children = new lr();
4160
4177
  get children() {
4161
4178
  return this._children.default;
4162
4179
  }
@@ -4316,7 +4333,7 @@ var V = ur = class extends T {
4316
4333
  append(...e) {
4317
4334
  let t;
4318
4335
  t = Array.isArray(e[0]) ? e[0] : e, t.forEach((e) => {
4319
- e instanceof ur ? this.appendChild(e) : this.appendChild(ur.parse(e));
4336
+ e instanceof dr ? this.appendChild(e) : this.appendChild(dr.parse(e));
4320
4337
  });
4321
4338
  }
4322
4339
  before(...e) {
@@ -4422,7 +4439,7 @@ var V = ur = class extends T {
4422
4439
  A([_({ default: () => c() }), k("design:type", String)], V.prototype, "id", void 0), A([_({ default: () => c() }), k("design:type", String)], V.prototype, "name", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], V.prototype, "processMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], V.prototype, "processSortMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], V.prototype, "renderMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], V.prototype, "inputMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], V.prototype, "internalMode", void 0), A([_({
4423
4440
  internal: !0,
4424
4441
  default: !0
4425
- }), k("design:type", Boolean)], V.prototype, "needsRender", void 0), V = ur = A([S("Node"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4442
+ }), k("design:type", Boolean)], V.prototype, "needsRender", void 0), V = dr = A([S("Node"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4426
4443
  //#endregion
4427
4444
  //#region src/scene/main/TimelineNode.ts
4428
4445
  var H = class extends V {
@@ -4510,15 +4527,15 @@ var H = class extends V {
4510
4527
  A([_({ fallback: !1 }), k("design:type", Boolean)], H.prototype, "loop", void 0), A([_({ fallback: 0 }), k("design:type", Number)], H.prototype, "delay", void 0), A([_({ fallback: 0 }), k("design:type", Number)], H.prototype, "duration", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], H.prototype, "paused", void 0), H = A([S("TimelineNode"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4511
4528
  //#endregion
4512
4529
  //#region src/scene/main/CanvasItem.ts
4513
- var pr = [], mr = 0;
4514
- function hr() {
4515
- mr = 0;
4530
+ var mr = [], hr = 0;
4531
+ function gr() {
4532
+ hr = 0;
4516
4533
  }
4517
- function gr(e, t, n, r) {
4518
- let i = pr[mr];
4519
- return i || (i = {}, pr[mr] = i), mr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4534
+ function _r(e, t, n, r) {
4535
+ let i = mr[hr];
4536
+ return i || (i = {}, mr[hr] = i), hr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4520
4537
  }
4521
- var _r = class extends H {
4538
+ var vr = class extends H {
4522
4539
  _blendMode;
4523
4540
  _parentGlobalVisible;
4524
4541
  _globalVisible;
@@ -4536,7 +4553,7 @@ var _r = class extends H {
4536
4553
  255,
4537
4554
  255
4538
4555
  ];
4539
- context = new sr();
4556
+ context = new cr();
4540
4557
  _resetContext = !0;
4541
4558
  needsDraw = !0;
4542
4559
  needsLayout = !1;
@@ -4667,7 +4684,7 @@ var _r = class extends H {
4667
4684
  return;
4668
4685
  }
4669
4686
  let t = this._tree?.pixelate, n = this._tree?.roundPixels, r = this._batchables;
4670
- for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof or && (a = this._handleViewportTexture(i)), e.batch2D.render(gr(i, n, t ? i.size : void 0, a));
4687
+ for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof sr && (a = this._handleViewportTexture(i)), e.batch2D.render(_r(i, n, t ? i.size : void 0, a));
4671
4688
  super._render(e);
4672
4689
  }
4673
4690
  _cullsRender() {
@@ -4677,13 +4694,13 @@ var _r = class extends H {
4677
4694
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4678
4695
  }
4679
4696
  };
4680
- A([_(), k("design:type", Object)], _r.prototype, "blendMode", void 0), A([_({
4697
+ A([_(), k("design:type", Object)], vr.prototype, "blendMode", void 0), A([_({
4681
4698
  internal: !0,
4682
4699
  fallback: !0
4683
- }), k("design:type", Boolean)], _r.prototype, "visible", void 0), A([_({
4700
+ }), k("design:type", Boolean)], vr.prototype, "visible", void 0), A([_({
4684
4701
  internal: !0,
4685
4702
  fallback: 1
4686
- }), k("design:type", Number)], _r.prototype, "opacity", void 0), _r = A([S("CanvasItem"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _r);
4703
+ }), k("design:type", Number)], vr.prototype, "opacity", void 0), vr = A([S("CanvasItem"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], vr);
4687
4704
  //#endregion
4688
4705
  //#region src/scene/main/Viewport.ts
4689
4706
  var U = class extends V {
@@ -4736,7 +4753,7 @@ var U = class extends V {
4736
4753
  return !1;
4737
4754
  }
4738
4755
  activateWithCopy(e, t) {
4739
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), R.draw(e, Zn.instance, { sampler: 0 }));
4756
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), R.draw(e, Qn.instance, { sampler: 0 }));
4740
4757
  }
4741
4758
  renderStart(e, t) {
4742
4759
  this.activate(e, t) && e.clear();
@@ -4787,7 +4804,7 @@ var W = class extends H {
4787
4804
  _updateProperty(e, t, n) {
4788
4805
  switch (super._updateProperty(e, t, n), e) {
4789
4806
  case "glsl": {
4790
- let e = new Xn(t);
4807
+ let e = new Zn(t);
4791
4808
  !this.effectMode && e.has.transition && (this.effectMode = "transition"), this.material = e;
4792
4809
  break;
4793
4810
  }
@@ -4995,7 +5012,7 @@ var W = class extends H {
4995
5012
  A([_({ internal: !0 }), k("design:type", Object)], W.prototype, "material", void 0), A([_(), k("design:type", Object)], W.prototype, "effectMode", void 0), A([_(), k("design:type", String)], W.prototype, "glsl", void 0), A([_(), k("design:type", String)], W.prototype, "glslSrc", void 0), W = A([S("Effect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
4996
5013
  //#endregion
4997
5014
  //#region src/scene/main/RenderStack.ts
4998
- var vr = class {
5015
+ var yr = class {
4999
5016
  currentCall;
5000
5017
  calls = [];
5001
5018
  createCall(e) {
@@ -5017,7 +5034,7 @@ var vr = class {
5017
5034
  });
5018
5035
  }), this.calls = [];
5019
5036
  }
5020
- }, yr, br = yr = class extends V {
5037
+ }, br, xr = br = class extends V {
5021
5038
  currentTime = 0;
5022
5039
  playing = !1;
5023
5040
  playbackRate = 1;
@@ -5038,7 +5055,7 @@ var vr = class {
5038
5055
  }
5039
5056
  static from(e, t = !1) {
5040
5057
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
5041
- return new yr({
5058
+ return new br({
5042
5059
  startTime: n,
5043
5060
  endTime: r,
5044
5061
  loop: t
@@ -5084,10 +5101,10 @@ var vr = class {
5084
5101
  super._process(e), this.paused || this.addTime(e);
5085
5102
  }
5086
5103
  };
5087
- A([_({ fallback: 0 }), k("design:type", Number)], br.prototype, "startTime", void 0), A([_({ fallback: 2 ** 53 - 1 }), k("design:type", Number)], br.prototype, "endTime", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], br.prototype, "loop", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], br.prototype, "paused", void 0), br = yr = A([S("Timeline"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], br);
5104
+ A([_({ fallback: 0 }), k("design:type", Number)], xr.prototype, "startTime", void 0), A([_({ fallback: 2 ** 53 - 1 }), k("design:type", Number)], xr.prototype, "endTime", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], xr.prototype, "loop", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], xr.prototype, "paused", void 0), xr = br = A([S("Timeline"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], xr);
5088
5105
  //#endregion
5089
5106
  //#region src/scene/main/Window.ts
5090
- var xr = class extends U {
5107
+ var Sr = class extends U {
5091
5108
  constructor() {
5092
5109
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
5093
5110
  }
@@ -5098,17 +5115,17 @@ var xr = class extends U {
5098
5115
  super.flush(e), this.finish(e);
5099
5116
  }
5100
5117
  };
5101
- xr = A([S("Window", {
5118
+ Sr = A([S("Window", {
5102
5119
  processMode: "always",
5103
5120
  renderMode: "always"
5104
- }), k("design:paramtypes", [])], xr);
5121
+ }), k("design:paramtypes", [])], Sr);
5105
5122
  //#endregion
5106
5123
  //#region src/scene/main/SceneTree.ts
5107
- var Sr = class extends Tt {
5124
+ var Cr = class extends Tt {
5108
5125
  input = new gt();
5109
- renderStack = new vr();
5110
- root = new xr().setTree(this);
5111
- timeline = new br().setTree(this);
5126
+ renderStack = new yr();
5127
+ root = new Sr().setTree(this);
5128
+ timeline = new xr().setTree(this);
5112
5129
  nodeMap = /* @__PURE__ */ new Map();
5113
5130
  _boundFonts;
5114
5131
  _textRemeasureScheduled = !1;
@@ -5166,7 +5183,7 @@ var Sr = class extends Tt {
5166
5183
  this.timeline.emit("process", e), this.emit("processing"), this.root.emit("process", e), this.emit("processed");
5167
5184
  }
5168
5185
  _render(e) {
5169
- this.emit("rendering"), hr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5186
+ this.emit("rendering"), gr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5170
5187
  }
5171
5188
  _renderScreen(e) {
5172
5189
  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);
@@ -5177,30 +5194,30 @@ var Sr = class extends Tt {
5177
5194
  super._destroy(), this._bindFonts(void 0), this.root.destroy(), this.input.destroy(), this.nodeMap.clear();
5178
5195
  }
5179
5196
  };
5180
- A([_({ alias: "root.msaa" }), k("design:type", Boolean)], Sr.prototype, "msaa", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Sr.prototype, "pixelate", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Sr.prototype, "roundPixels", void 0), A([_(), k("design:type", Object)], Sr.prototype, "backgroundColor", void 0), A([_({
5197
+ A([_({ alias: "root.msaa" }), k("design:type", Boolean)], Cr.prototype, "msaa", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Cr.prototype, "pixelate", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Cr.prototype, "roundPixels", void 0), A([_(), k("design:type", Object)], Cr.prototype, "backgroundColor", void 0), A([_({
5181
5198
  internal: !0,
5182
5199
  fallback: !1
5183
- }), k("design:type", Boolean)], Sr.prototype, "debug", void 0), A([_({
5200
+ }), k("design:type", Boolean)], Cr.prototype, "debug", void 0), A([_({
5184
5201
  internal: !0,
5185
5202
  fallback: !1
5186
- }), k("design:type", Boolean)], Sr.prototype, "processPaused", void 0), A([_({
5203
+ }), k("design:type", Boolean)], Cr.prototype, "processPaused", void 0), A([_({
5187
5204
  internal: !0,
5188
5205
  default: () => he
5189
- }), k("design:type", Object)], Sr.prototype, "fonts", void 0);
5206
+ }), k("design:type", Object)], Cr.prototype, "fonts", void 0);
5190
5207
  //#endregion
5191
5208
  //#region src/scene/main/Transition.ts
5192
- var Cr = class extends W {
5209
+ var wr = class extends W {
5193
5210
  constructor(e, t = []) {
5194
5211
  super(), this.setProperties(e).append(t);
5195
5212
  }
5196
5213
  };
5197
- Cr = A([S("Transition", {
5214
+ wr = A([S("Transition", {
5198
5215
  effectMode: "transition",
5199
5216
  duration: 2e3
5200
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Cr);
5217
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5201
5218
  //#endregion
5202
5219
  //#region src/scene/2d/Node2D.ts
5203
- var wr = class extends _r {
5220
+ var Tr = class extends vr {
5204
5221
  rotation = 0;
5205
5222
  position = new x(0, 0, () => this.updateGlobalTransform());
5206
5223
  scale = new x(1, 1, () => this.updateGlobalTransform());
@@ -5252,10 +5269,10 @@ var wr = class extends _r {
5252
5269
  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();
5253
5270
  }
5254
5271
  };
5255
- wr = A([S("Node2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5272
+ Tr = A([S("Node2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5256
5273
  //#endregion
5257
5274
  //#region src/scene/2d/Camera2D.ts
5258
- var Tr = class extends wr {
5275
+ var Er = class extends Tr {
5259
5276
  canvasTransform = new b();
5260
5277
  _screenOffset = {
5261
5278
  x: 0,
@@ -5402,16 +5419,16 @@ var Tr = class extends wr {
5402
5419
  A([_({
5403
5420
  internal: !0,
5404
5421
  fallback: !1
5405
- }), k("design:type", Boolean)], Tr.prototype, "spaceKey", void 0), A([_({
5422
+ }), k("design:type", Boolean)], Er.prototype, "spaceKey", void 0), A([_({
5406
5423
  internal: !0,
5407
5424
  fallback: !1
5408
- }), k("design:type", Boolean)], Tr.prototype, "grabbing", void 0), Tr = A([S("Camera2D", {
5425
+ }), k("design:type", Boolean)], Er.prototype, "grabbing", void 0), Er = A([S("Camera2D", {
5409
5426
  processMode: "disabled",
5410
5427
  renderMode: "disabled"
5411
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5428
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Er);
5412
5429
  //#endregion
5413
5430
  //#region src/scene/2d/element/connectionRouter.ts
5414
- function Er(e, t) {
5431
+ function Dr(e, t) {
5415
5432
  return Math.abs(e) >= Math.abs(t) ? {
5416
5433
  x: Math.sign(e) || 1,
5417
5434
  y: 0
@@ -5420,11 +5437,11 @@ function Er(e, t) {
5420
5437
  y: Math.sign(t) || 1
5421
5438
  };
5422
5439
  }
5423
- function Dr(e, t, n, r = {}) {
5440
+ function Or(e, t, n, r = {}) {
5424
5441
  let i = t.point, a = n.point, o = new v();
5425
5442
  switch (e) {
5426
5443
  case "curved": {
5427
- let e = t.dir ?? Er(a.x - i.x, a.y - i.y), s = n.dir ?? Er(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5444
+ let e = t.dir ?? Dr(a.x - i.x, a.y - i.y), s = n.dir ?? Dr(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5428
5445
  for (let e = 0; e <= 32; e++) {
5429
5446
  let t = e / 32, n = 1 - t, r = n * n * n, s = 3 * n * n * t, c = 3 * n * t * t, l = t * t * t, u = r * i.x + s * ee + c * ne + l * a.x, d = r * i.y + s * te + c * re + l * a.y;
5430
5447
  e === 0 ? o.moveTo(u, d) : o.lineTo(u, d);
@@ -5432,7 +5449,7 @@ function Dr(e, t, n, r = {}) {
5432
5449
  break;
5433
5450
  }
5434
5451
  case "orthogonal": {
5435
- let e = kr(t, n, r);
5452
+ let e = Ar(t, n, r);
5436
5453
  for (let t = 0; t < e.length; t++) t === 0 ? o.moveTo(e[t].x, e[t].y) : o.lineTo(e[t].x, e[t].y);
5437
5454
  break;
5438
5455
  }
@@ -5442,11 +5459,11 @@ function Dr(e, t, n, r = {}) {
5442
5459
  }
5443
5460
  return o;
5444
5461
  }
5445
- function Or(e) {
5446
- return Er(e.x, e.y);
5462
+ function kr(e) {
5463
+ return Dr(e.x, e.y);
5447
5464
  }
5448
- function kr(e, t, n) {
5449
- let r = e.point, i = t.point, a = n.stub ?? 16, o = Or(e.dir ?? Er(i.x - r.x, i.y - r.y)), s = Or(t.dir ?? Er(r.x - i.x, r.y - i.y)), c = {
5465
+ function Ar(e, t, n) {
5466
+ let r = e.point, i = t.point, a = n.stub ?? 16, o = kr(e.dir ?? Dr(i.x - r.x, i.y - r.y)), s = kr(t.dir ?? Dr(r.x - i.x, r.y - i.y)), c = {
5450
5467
  x: r.x + o.x * a,
5451
5468
  y: r.y + o.y * a
5452
5469
  }, l = {
@@ -5458,12 +5475,12 @@ function kr(e, t, n) {
5458
5475
  x: r.x,
5459
5476
  y: r.y
5460
5477
  }, c];
5461
- return d.push(...jr(c, o, l, s, a, u)), d.push(l, {
5478
+ return d.push(...Mr(c, o, l, s, a, u)), d.push(l, {
5462
5479
  x: i.x,
5463
5480
  y: i.y
5464
- }), Mr(d);
5481
+ }), Nr(d);
5465
5482
  }
5466
- function Ar(e, t, n, r, i) {
5483
+ function jr(e, t, n, r, i) {
5467
5484
  let a = Infinity, o = -Infinity, s = t === "y" ? "x" : "y";
5468
5485
  for (let e of r) {
5469
5486
  let r = e.min[s], i = r + e.size[s];
@@ -5474,7 +5491,7 @@ function Ar(e, t, n, r, i) {
5474
5491
  }
5475
5492
  return e > a && e < o ? a - i : e;
5476
5493
  }
5477
- function jr(e, t, n, r, i, a = []) {
5494
+ function Mr(e, t, n, r, i, a = []) {
5478
5495
  let o = t.y === 0;
5479
5496
  if (o === (r.y === 0)) {
5480
5497
  if (o) {
@@ -5489,7 +5506,7 @@ function jr(e, t, n, r, i, a = []) {
5489
5506
  }];
5490
5507
  }
5491
5508
  let o = Math.abs(e.y - n.y) < .001 ? e.y + i : (e.y + n.y) / 2;
5492
- return o = Ar(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5509
+ return o = jr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5493
5510
  x: e.x,
5494
5511
  y: o
5495
5512
  }, {
@@ -5508,7 +5525,7 @@ function jr(e, t, n, r, i, a = []) {
5508
5525
  }];
5509
5526
  }
5510
5527
  let s = Math.abs(e.x - n.x) < .001 ? e.x + i : (e.x + n.x) / 2;
5511
- return s = Ar(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5528
+ return s = jr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5512
5529
  x: s,
5513
5530
  y: e.y
5514
5531
  }, {
@@ -5535,7 +5552,7 @@ function jr(e, t, n, r, i, a = []) {
5535
5552
  y: l.y
5536
5553
  }];
5537
5554
  }
5538
- function Mr(e) {
5555
+ function Nr(e) {
5539
5556
  let t = [];
5540
5557
  for (let n = 0; n < e.length; n++) {
5541
5558
  let r = e[n], i = t[t.length - 1];
@@ -5545,7 +5562,7 @@ function Mr(e) {
5545
5562
  }
5546
5563
  //#endregion
5547
5564
  //#region src/css/parseCssFilter.ts
5548
- var Nr = {
5565
+ var Pr = {
5549
5566
  brightness: 1,
5550
5567
  contrast: 1,
5551
5568
  grayscale: 0,
@@ -5555,12 +5572,12 @@ var Nr = {
5555
5572
  saturate: 1,
5556
5573
  sepia: 0
5557
5574
  };
5558
- function Pr(e) {
5575
+ function Fr(e) {
5559
5576
  let t = new St();
5560
5577
  if (e === "none") return t;
5561
5578
  let n = ke(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5562
- Object.keys(Nr).forEach((e) => {
5563
- n[e] = n[e] ?? Nr[e];
5579
+ Object.keys(Pr).forEach((e) => {
5580
+ n[e] = n[e] ?? Pr[e];
5564
5581
  });
5565
5582
  for (let e in n) {
5566
5583
  let r = n[e];
@@ -5595,7 +5612,7 @@ function Pr(e) {
5595
5612
  }
5596
5613
  //#endregion
5597
5614
  //#region src/css/parseCssTransformOrigin.ts
5598
- function Fr(e) {
5615
+ function Ir(e) {
5599
5616
  let [t, n = t] = e.split(" ");
5600
5617
  return [t, n].map((e) => {
5601
5618
  switch (e = e.trim(), e) {
@@ -5610,9 +5627,9 @@ function Fr(e) {
5610
5627
  }
5611
5628
  //#endregion
5612
5629
  //#region src/scene/effects/ColorAdjustEffect.ts
5613
- var Ir, G = class extends W {
5630
+ var Lr, G = class extends W {
5614
5631
  static {
5615
- Ir = this;
5632
+ Lr = this;
5616
5633
  }
5617
5634
  static material = new L({ gl: {
5618
5635
  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}",
@@ -5623,7 +5640,7 @@ var Ir, G = class extends W {
5623
5640
  }
5624
5641
  apply(e, t) {
5625
5642
  t.redraw(e, () => {
5626
- R.draw(e, Ir.material, {
5643
+ R.draw(e, Lr.material, {
5627
5644
  sampler: 0,
5628
5645
  saturation: this.saturation,
5629
5646
  contrast: this.contrast,
@@ -5637,12 +5654,12 @@ var Ir, G = class extends W {
5637
5654
  });
5638
5655
  }
5639
5656
  };
5640
- A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "saturation", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "contrast", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "brightness", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "red", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "green", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "blue", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "alpha", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "gamma", void 0), G = Ir = A([S("ColorAdjustEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5657
+ A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "saturation", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "contrast", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "brightness", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "red", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "green", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "blue", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "alpha", void 0), A([_({ fallback: 1 }), k("design:type", Number)], G.prototype, "gamma", void 0), G = Lr = A([S("ColorAdjustEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5641
5658
  //#endregion
5642
5659
  //#region src/scene/effects/ColorFilterEffect.ts
5643
- var Lr, Rr = class extends W {
5660
+ var Rr, zr = class extends W {
5644
5661
  static {
5645
- Lr = this;
5662
+ Rr = this;
5646
5663
  }
5647
5664
  static material = new L({ gl: {
5648
5665
  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}",
@@ -5692,25 +5709,25 @@ var Lr, Rr = class extends W {
5692
5709
  break;
5693
5710
  }
5694
5711
  }), t.redraw(e, () => {
5695
- R.draw(e, Lr.material, {
5712
+ R.draw(e, Rr.material, {
5696
5713
  sampler: 0,
5697
5714
  m: r.toArray()
5698
5715
  });
5699
5716
  });
5700
5717
  }
5701
5718
  };
5702
- A([_(), k("design:type", String)], Rr.prototype, "filter", void 0), Rr = Lr = A([S("ColorFilterEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Rr);
5719
+ A([_(), k("design:type", String)], zr.prototype, "filter", void 0), zr = Rr = A([S("ColorFilterEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], zr);
5703
5720
  //#endregion
5704
5721
  //#region src/scene/effects/ColorOverlayEffect.ts
5705
- var zr, Br = 50, Vr = class extends W {
5722
+ var Br, Vr = 50, Hr = class extends W {
5706
5723
  static {
5707
- zr = this;
5724
+ Br = this;
5708
5725
  }
5709
5726
  static material = new L({ gl: {
5710
5727
  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}",
5711
5728
  fragment: `precision mediump float;
5712
5729
  uniform sampler2D sampler;
5713
- uniform vec4 colors[${Br}];
5730
+ uniform vec4 colors[${Vr}];
5714
5731
  varying vec2 vUv;
5715
5732
 
5716
5733
  float calcWidth() {
@@ -5719,7 +5736,7 @@ float calcWidth() {
5719
5736
 
5720
5737
  int calcCount() {
5721
5738
  int count = 0;
5722
- for (int i = 0; i < ${Br}; i++) {
5739
+ for (int i = 0; i < ${Vr}; i++) {
5723
5740
  if (colors[i] != vec4(0,0,0,0)){
5724
5741
  count++;
5725
5742
  }
@@ -5731,7 +5748,7 @@ vec4 calcColor(float x) {
5731
5748
  float perUnit = calcWidth() / float(calcCount());
5732
5749
  int index = int(x / perUnit);
5733
5750
 
5734
- for(int i=0; i<${Br}; i++){
5751
+ for(int i=0; i<${Vr}; i++){
5735
5752
  if(i==index){
5736
5753
  return colors[i];
5737
5754
  }
@@ -5757,25 +5774,25 @@ void main(void) {
5757
5774
  let t = this._color.toArray();
5758
5775
  return t[3] = this.alpha, t;
5759
5776
  });
5760
- for (; t.length < Br;) t.push([
5777
+ for (; t.length < Vr;) t.push([
5761
5778
  0,
5762
5779
  0,
5763
5780
  0,
5764
5781
  0
5765
5782
  ]);
5766
- R.draw(e, zr.material, {
5783
+ R.draw(e, Br.material, {
5767
5784
  sampler: 0,
5768
- colors: t.slice(0, Br).flatMap((e) => e)
5785
+ colors: t.slice(0, Vr).flatMap((e) => e)
5769
5786
  });
5770
5787
  });
5771
5788
  }
5772
5789
  };
5773
- A([_({ default: () => [] }), k("design:type", Array)], Vr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Vr.prototype, "alpha", void 0), Vr = zr = A([S("ColorOverlayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5790
+ A([_({ default: () => [] }), k("design:type", Array)], Hr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Hr.prototype, "alpha", void 0), Hr = Br = A([S("ColorOverlayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Hr);
5774
5791
  //#endregion
5775
5792
  //#region src/scene/effects/ColorRemoveEffect.ts
5776
- var Hr, Ur = class extends W {
5793
+ var Ur, Wr = class extends W {
5777
5794
  static {
5778
- Hr = this;
5795
+ Ur = this;
5779
5796
  }
5780
5797
  static material = new L({ gl: {
5781
5798
  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}",
@@ -5795,7 +5812,7 @@ var Hr, Ur = class extends W {
5795
5812
  r.slice(0, 50).forEach((e, t) => {
5796
5813
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5797
5814
  }), t.redraw(e, () => {
5798
- R.draw(e, Hr.material, {
5815
+ R.draw(e, Ur.material, {
5799
5816
  sampler: 0,
5800
5817
  epsilon: this.epsilon,
5801
5818
  originalColors: n
@@ -5803,19 +5820,19 @@ var Hr, Ur = class extends W {
5803
5820
  });
5804
5821
  }
5805
5822
  };
5806
- A([_({ default: () => [] }), k("design:type", Array)], Ur.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Ur.prototype, "epsilon", void 0), Ur = Hr = A([S("ColorRemoveEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ur);
5823
+ A([_({ default: () => [] }), k("design:type", Array)], Wr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Wr.prototype, "epsilon", void 0), Wr = Ur = A([S("ColorRemoveEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Wr);
5807
5824
  //#endregion
5808
5825
  //#region src/scene/effects/ColorReplaceEffect.ts
5809
- var Wr, Gr = 50, Kr = class extends W {
5826
+ var Gr, Kr = 50, qr = class extends W {
5810
5827
  static {
5811
- Wr = this;
5828
+ Gr = this;
5812
5829
  }
5813
5830
  static material = new L({ gl: {
5814
5831
  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}",
5815
5832
  fragment: `varying vec2 vUv;
5816
5833
  uniform sampler2D sampler;
5817
5834
  uniform float epsilon;
5818
- const int MAX_COLORS = ${Gr};
5835
+ const int MAX_COLORS = ${Kr};
5819
5836
  uniform vec3 originalColors[MAX_COLORS];
5820
5837
  uniform vec3 targetColors[MAX_COLORS];
5821
5838
 
@@ -5852,8 +5869,8 @@ void main(void) {
5852
5869
  this._color.value = e[0];
5853
5870
  let t = this._color.toArray().slice(0, 3);
5854
5871
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
5855
- }), r = this.epsilon, i = new Float32Array(Gr * 3), a = new Float32Array(Gr * 3);
5856
- for (; n.length < Gr;) n.push([[
5872
+ }), r = this.epsilon, i = new Float32Array(Kr * 3), a = new Float32Array(Kr * 3);
5873
+ for (; n.length < Kr;) n.push([[
5857
5874
  -1,
5858
5875
  0,
5859
5876
  0
@@ -5863,10 +5880,10 @@ void main(void) {
5863
5880
  0,
5864
5881
  1
5865
5882
  ]]);
5866
- n.slice(0, Gr).forEach(([e, t], n) => {
5883
+ n.slice(0, Kr).forEach(([e, t], n) => {
5867
5884
  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];
5868
5885
  }), t.redraw(e, () => {
5869
- R.draw(e, Wr.material, {
5886
+ R.draw(e, Gr.material, {
5870
5887
  sampler: 0,
5871
5888
  epsilon: r,
5872
5889
  originalColors: i,
@@ -5875,17 +5892,17 @@ void main(void) {
5875
5892
  });
5876
5893
  }
5877
5894
  };
5878
- A([_({ default: () => [] }), k("design:type", Array)], Kr.prototype, "colors", void 0), A([_({ fallback: .05 }), k("design:type", Number)], Kr.prototype, "epsilon", void 0), Kr = Wr = A([S("ColorReplaceEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5895
+ A([_({ default: () => [] }), k("design:type", Array)], qr.prototype, "colors", void 0), A([_({ fallback: .05 }), k("design:type", Number)], qr.prototype, "epsilon", void 0), qr = Gr = A([S("ColorReplaceEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], qr);
5879
5896
  //#endregion
5880
5897
  //#region src/scene/effects/DrawboardEffect.frag?raw
5881
- 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, K = class extends W {
5898
+ var Jr = "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", Yr, K = class extends W {
5882
5899
  static {
5883
- Jr = this;
5900
+ Yr = this;
5884
5901
  }
5885
5902
  _watermark;
5886
5903
  static material = new L({ gl: {
5887
5904
  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}",
5888
- fragment: qr
5905
+ fragment: Jr
5889
5906
  } });
5890
5907
  constructor(e, t = []) {
5891
5908
  super(), this.setProperties(e).append(t);
@@ -5934,7 +5951,7 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5934
5951
  zoomedOut: this.dotColor ?? a.zoomedOut,
5935
5952
  diff: this.dotZoomDiff ?? a.diff
5936
5953
  };
5937
- R.draw(e, Jr.material, {
5954
+ R.draw(e, Yr.material, {
5938
5955
  uTexture: 0,
5939
5956
  inputSize: [t.width, t.height],
5940
5957
  zoom: [n[0], n[4]],
@@ -5958,20 +5975,20 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5958
5975
  });
5959
5976
  }
5960
5977
  };
5961
- A([_({ fallback: !1 }), k("design:type", Boolean)], K.prototype, "checkerboard", void 0), A([_({ fallback: "grid" }), k("design:type", Object)], K.prototype, "checkerboardStyle", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], K.prototype, "pixelGrid", void 0), A([_(), k("design:type", Number)], K.prototype, "dotBaseColor", void 0), A([_(), k("design:type", Number)], K.prototype, "dotColor", void 0), A([_(), k("design:type", Number)], K.prototype, "dotZoomDiff", void 0), A([_(), k("design:type", String)], K.prototype, "watermark", void 0), A([_({ fallback: 100 }), k("design:type", Number)], K.prototype, "watermarkWidth", void 0), A([_({ fallback: .05 }), k("design:type", Number)], K.prototype, "watermarkAlpha", void 0), A([_({ fallback: .5236 }), k("design:type", Number)], K.prototype, "watermarkRotation", void 0), K = Jr = A([S("DrawboardEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5978
+ A([_({ fallback: !1 }), k("design:type", Boolean)], K.prototype, "checkerboard", void 0), A([_({ fallback: "grid" }), k("design:type", Object)], K.prototype, "checkerboardStyle", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], K.prototype, "pixelGrid", void 0), A([_(), k("design:type", Number)], K.prototype, "dotBaseColor", void 0), A([_(), k("design:type", Number)], K.prototype, "dotColor", void 0), A([_(), k("design:type", Number)], K.prototype, "dotZoomDiff", void 0), A([_(), k("design:type", String)], K.prototype, "watermark", void 0), A([_({ fallback: 100 }), k("design:type", Number)], K.prototype, "watermarkWidth", void 0), A([_({ fallback: .05 }), k("design:type", Number)], K.prototype, "watermarkAlpha", void 0), A([_({ fallback: .5236 }), k("design:type", Number)], K.prototype, "watermarkRotation", void 0), K = Yr = A([S("DrawboardEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5962
5979
  //#endregion
5963
5980
  //#region src/scene/effects/GaussianBlurEffect.ts
5964
- 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 W {
5981
+ var Xr, Zr = "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}", Qr = class extends W {
5965
5982
  static {
5966
- Yr = this;
5983
+ Xr = this;
5967
5984
  }
5968
5985
  static materialX = new L({ gl: {
5969
5986
  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}",
5970
- fragment: Xr
5987
+ fragment: Zr
5971
5988
  } });
5972
5989
  static materialY = new L({ gl: {
5973
5990
  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}",
5974
- fragment: Xr
5991
+ fragment: Zr
5975
5992
  } });
5976
5993
  constructor(e, t = []) {
5977
5994
  super(), this.setProperties(e).append(t);
@@ -5979,31 +5996,31 @@ var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
5979
5996
  apply(e, t) {
5980
5997
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
5981
5998
  for (let r = 0; r < i; r++) t.redraw(e, () => {
5982
- R.draw(e, Yr.materialX, {
5999
+ R.draw(e, Xr.materialX, {
5983
6000
  sampler: 0,
5984
6001
  uStrength: n * (this.strength / i)
5985
6002
  });
5986
6003
  });
5987
6004
  for (let n = 0; n < i; n++) t.redraw(e, () => {
5988
- R.draw(e, Yr.materialY, {
6005
+ R.draw(e, Xr.materialY, {
5989
6006
  sampler: 0,
5990
6007
  uStrength: r * (this.strength / i)
5991
6008
  });
5992
6009
  });
5993
6010
  }
5994
6011
  };
5995
- A([_({ fallback: 4 }), k("design:type", Number)], Zr.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], Zr.prototype, "quality", void 0), Zr = Yr = A([S("GaussianBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Zr);
6012
+ A([_({ fallback: 4 }), k("design:type", Number)], Qr.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], Qr.prototype, "quality", void 0), Qr = Xr = A([S("GaussianBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Qr);
5996
6013
  //#endregion
5997
6014
  //#region src/scene/effects/DropShadowEffect.ts
5998
- var Qr, $r = class extends W {
6015
+ var $r, ei = class extends W {
5999
6016
  static {
6000
- Qr = this;
6017
+ $r = this;
6001
6018
  }
6002
6019
  static material = new L({ gl: {
6003
6020
  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}",
6004
6021
  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}"
6005
6022
  } });
6006
- blurEffect = new Zr();
6023
+ blurEffect = new Qr();
6007
6024
  viewport3 = new U();
6008
6025
  _color = new E();
6009
6026
  constructor(e, t = []) {
@@ -6011,7 +6028,7 @@ var Qr, $r = class extends W {
6011
6028
  }
6012
6029
  apply(e, t) {
6013
6030
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
6014
- this._color.value = this.color, R.draw(e, Qr.material, {
6031
+ this._color.value = this.color, R.draw(e, $r.material, {
6015
6032
  sampler: 0,
6016
6033
  uAlpha: this._color.a,
6017
6034
  uColor: this._color.toArray().slice(0, 3),
@@ -6024,16 +6041,16 @@ var Qr, $r = class extends W {
6024
6041
  ]
6025
6042
  });
6026
6043
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
6027
- this.viewport3.texture.activate(e, 1), R.draw(e, Zn.instance, { sampler: 1 }), this.shadowOnly || R.draw(e, Zn.instance, { sampler: 0 }), e.texture.unbind(1);
6044
+ this.viewport3.texture.activate(e, 1), R.draw(e, Qn.instance, { sampler: 1 }), this.shadowOnly || R.draw(e, Qn.instance, { sampler: 0 }), e.texture.unbind(1);
6028
6045
  });
6029
6046
  }
6030
6047
  };
6031
- A([_({ fallback: "#000000FF" }), k("design:type", Object)], $r.prototype, "color", void 0), A([_({ fallback: 4 }), k("design:type", Number)], $r.prototype, "blur", void 0), A([_({ fallback: 4 }), k("design:type", Number)], $r.prototype, "offsetX", void 0), A([_({ fallback: 4 }), k("design:type", Number)], $r.prototype, "offsetY", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], $r.prototype, "shadowOnly", void 0), $r = Qr = A([S("DropShadowEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
6048
+ A([_({ fallback: "#000000FF" }), k("design:type", Object)], ei.prototype, "color", void 0), A([_({ fallback: 4 }), k("design:type", Number)], ei.prototype, "blur", void 0), A([_({ fallback: 4 }), k("design:type", Number)], ei.prototype, "offsetX", void 0), A([_({ fallback: 4 }), k("design:type", Number)], ei.prototype, "offsetY", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], ei.prototype, "shadowOnly", void 0), ei = $r = A([S("DropShadowEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ei);
6032
6049
  //#endregion
6033
6050
  //#region src/scene/effects/EmbossEffect.ts
6034
- var ei, ti = class extends W {
6051
+ var ti, ni = class extends W {
6035
6052
  static {
6036
- ei = this;
6053
+ ti = this;
6037
6054
  }
6038
6055
  static material = new L({ gl: {
6039
6056
  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}",
@@ -6044,7 +6061,7 @@ var ei, ti = class extends W {
6044
6061
  }
6045
6062
  apply(e, t) {
6046
6063
  t.redraw(e, () => {
6047
- R.draw(e, ei.material, {
6064
+ R.draw(e, ti.material, {
6048
6065
  sampler: 0,
6049
6066
  strength: this.strength,
6050
6067
  inputSize: [
@@ -6057,12 +6074,12 @@ var ei, ti = class extends W {
6057
6074
  });
6058
6075
  }
6059
6076
  };
6060
- A([_({ fallback: 5 }), k("design:type", Number)], ti.prototype, "strength", void 0), ti = ei = A([S("EmbossEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ti);
6077
+ A([_({ fallback: 5 }), k("design:type", Number)], ni.prototype, "strength", void 0), ni = ti = A([S("EmbossEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ni);
6061
6078
  //#endregion
6062
6079
  //#region src/scene/effects/GlitchEffect.ts
6063
- var ni, q = class extends W {
6080
+ var ri, q = class extends W {
6064
6081
  static {
6065
- ni = this;
6082
+ ri = this;
6066
6083
  }
6067
6084
  static material = new L({ gl: {
6068
6085
  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}",
@@ -6094,7 +6111,7 @@ var ni, q = class extends W {
6094
6111
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6095
6112
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
6096
6113
  t.redraw(e, () => {
6097
- this._texture.activate(e, 1), R.draw(e, ni.material, {
6114
+ this._texture.activate(e, 1), R.draw(e, ri.material, {
6098
6115
  sampler: 0,
6099
6116
  filterClamp: [
6100
6117
  0,
@@ -6123,12 +6140,12 @@ var ni, q = class extends W {
6123
6140
  });
6124
6141
  }
6125
6142
  };
6126
- A([_({ fallback: 10 }), k("design:type", Number)], q.prototype, "slices", void 0), A([_({ fallback: 512 }), k("design:type", Number)], q.prototype, "sampleSize", void 0), A([_({ fallback: 100 }), k("design:type", Number)], q.prototype, "offset", void 0), A([_({ fallback: 0 }), k("design:type", Number)], q.prototype, "direction", void 0), A([_({ fallback: 2 }), k("design:type", Number)], q.prototype, "fillMode", void 0), A([_({ fallback: 0 }), k("design:type", Number)], q.prototype, "seed", void 0), A([_({ default: () => [2, 2] }), k("design:type", Array)], q.prototype, "red", void 0), A([_({ default: () => [-10, 4] }), k("design:type", Array)], q.prototype, "green", void 0), A([_({ default: () => [10, -4] }), k("design:type", Array)], q.prototype, "blue", void 0), q = ni = A([S("GlitchEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6143
+ A([_({ fallback: 10 }), k("design:type", Number)], q.prototype, "slices", void 0), A([_({ fallback: 512 }), k("design:type", Number)], q.prototype, "sampleSize", void 0), A([_({ fallback: 100 }), k("design:type", Number)], q.prototype, "offset", void 0), A([_({ fallback: 0 }), k("design:type", Number)], q.prototype, "direction", void 0), A([_({ fallback: 2 }), k("design:type", Number)], q.prototype, "fillMode", void 0), A([_({ fallback: 0 }), k("design:type", Number)], q.prototype, "seed", void 0), A([_({ default: () => [2, 2] }), k("design:type", Array)], q.prototype, "red", void 0), A([_({ default: () => [-10, 4] }), k("design:type", Array)], q.prototype, "green", void 0), A([_({ default: () => [10, -4] }), k("design:type", Array)], q.prototype, "blue", void 0), q = ri = A([S("GlitchEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6127
6144
  //#endregion
6128
6145
  //#region src/scene/effects/GodrayEffect.ts
6129
- 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}", J = class extends W {
6146
+ var ii, ai = "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}", J = class extends W {
6130
6147
  static {
6131
- ri = this;
6148
+ ii = this;
6132
6149
  }
6133
6150
  static material = new L({ gl: {
6134
6151
  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}",
@@ -6143,7 +6160,7 @@ uniform float uTime;
6143
6160
  uniform vec3 uRay;
6144
6161
  uniform vec4 uInputSize;
6145
6162
 
6146
- ${ii}
6163
+ ${ai}
6147
6164
 
6148
6165
  void main(void) {
6149
6166
  bool uParallel = uParallel > 0.5;
@@ -6182,7 +6199,7 @@ void main(void) {
6182
6199
  apply(e, t) {
6183
6200
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6184
6201
  t.redraw(e, () => {
6185
- R.draw(e, ri.material, {
6202
+ R.draw(e, ii.material, {
6186
6203
  sampler: 0,
6187
6204
  uDimensions: [t.width, t.height],
6188
6205
  uParallel: +!!this.parallel,
@@ -6204,15 +6221,15 @@ void main(void) {
6204
6221
  });
6205
6222
  }
6206
6223
  };
6207
- A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "time", void 0), A([_({ fallback: 30 }), k("design:type", Number)], J.prototype, "angle", void 0), A([_({ fallback: .5 }), k("design:type", Number)], J.prototype, "gain", void 0), A([_({ fallback: 2.5 }), k("design:type", Number)], J.prototype, "lacunarity", void 0), A([_({ fallback: !0 }), k("design:type", Boolean)], J.prototype, "parallel", void 0), A([_({ default: () => [0, 0] }), k("design:type", Array)], J.prototype, "center", void 0), A([_({ fallback: 1 }), k("design:type", Number)], J.prototype, "alpha", void 0), J = ri = A([S("GodrayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6224
+ A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "time", void 0), A([_({ fallback: 30 }), k("design:type", Number)], J.prototype, "angle", void 0), A([_({ fallback: .5 }), k("design:type", Number)], J.prototype, "gain", void 0), A([_({ fallback: 2.5 }), k("design:type", Number)], J.prototype, "lacunarity", void 0), A([_({ fallback: !0 }), k("design:type", Boolean)], J.prototype, "parallel", void 0), A([_({ default: () => [0, 0] }), k("design:type", Array)], J.prototype, "center", void 0), A([_({ fallback: 1 }), k("design:type", Number)], J.prototype, "alpha", void 0), J = ii = A([S("GodrayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6208
6225
  //#endregion
6209
6226
  //#region src/scene/effects/KawaseBlurEffect.ts
6210
- 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 W {
6227
+ var oi = "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}", si = "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}", ci = class extends W {
6211
6228
  _kernels = [0];
6212
6229
  constructor(e, t = []) {
6213
6230
  super(), this.material = new L({ gl: {
6214
6231
  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}",
6215
- fragment: e?.clamp ? oi : ai
6232
+ fragment: e?.clamp ? si : oi
6216
6233
  } }), this.setProperties(e).append(t), this._generateKernels();
6217
6234
  }
6218
6235
  _updateProperty(e, t, n) {
@@ -6250,12 +6267,12 @@ var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6250
6267
  });
6251
6268
  }
6252
6269
  };
6253
- A([_({ fallback: 4 }), k("design:type", Number)], si.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], si.prototype, "quality", void 0), A([_({ default: () => [1, 1] }), k("design:type", Array)], si.prototype, "pixelSize", void 0), si = A([S("KawaseBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6270
+ A([_({ fallback: 4 }), k("design:type", Number)], ci.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], ci.prototype, "quality", void 0), A([_({ default: () => [1, 1] }), k("design:type", Array)], ci.prototype, "pixelSize", void 0), ci = A([S("KawaseBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6254
6271
  //#endregion
6255
6272
  //#region src/scene/effects/MaskEffect.ts
6256
- var ci, li = class extends W {
6273
+ var li, ui = class extends W {
6257
6274
  static {
6258
- ci = this;
6275
+ li = this;
6259
6276
  }
6260
6277
  static material = new L({ gl: {
6261
6278
  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}",
@@ -6277,7 +6294,7 @@ var ci, li = class extends W {
6277
6294
  }
6278
6295
  apply(e, t, n) {
6279
6296
  this.texture && t.redraw(e, () => {
6280
- this.texture.activate(e, 1), R.draw(e, ci.material, {
6297
+ this.texture.activate(e, 1), R.draw(e, li.material, {
6281
6298
  sampler: 0,
6282
6299
  mask: 1,
6283
6300
  rotation: n.target?.globalRotation ?? 0
@@ -6285,23 +6302,23 @@ var ci, li = class extends W {
6285
6302
  });
6286
6303
  }
6287
6304
  };
6288
- A([_({ fallback: "" }), k("design:type", String)], li.prototype, "image", void 0), li = ci = A([S("MaskEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6305
+ A([_({ fallback: "" }), k("design:type", String)], ui.prototype, "image", void 0), ui = li = A([S("MaskEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ui);
6289
6306
  //#endregion
6290
6307
  //#region src/scene/effects/OutlineEffect.ts
6291
- 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}", fi = class extends W {
6308
+ var di, fi = "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}", pi = class extends W {
6292
6309
  static {
6293
- ui = this;
6310
+ di = this;
6294
6311
  }
6295
6312
  static MIN_SAMPLES = 1;
6296
6313
  static MAX_SAMPLES = 100;
6297
6314
  static getAngleStep(e) {
6298
- return Number.parseFloat((Math.PI * 2 / Math.max(e * ui.MAX_SAMPLES, ui.MIN_SAMPLES)).toFixed(7));
6315
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * di.MAX_SAMPLES, di.MIN_SAMPLES)).toFixed(7));
6299
6316
  }
6300
6317
  _color = new E();
6301
6318
  constructor(e, t = []) {
6302
6319
  super(), this.setProperties(e).append(t), this.material = new L({ gl: {
6303
6320
  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}",
6304
- fragment: di.replace(/\{ANGLE_STEP\}/, ui.getAngleStep(this.quality).toFixed(7))
6321
+ fragment: fi.replace(/\{ANGLE_STEP\}/, di.getAngleStep(this.quality).toFixed(7))
6305
6322
  } });
6306
6323
  }
6307
6324
  apply(e, t) {
@@ -6311,7 +6328,7 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6311
6328
  uThickness: [this.width / t.width, this.width / t.height],
6312
6329
  uColor: this._color.toArray().slice(0, 3),
6313
6330
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6314
- uAngleStep: ui.getAngleStep(this.quality),
6331
+ uAngleStep: di.getAngleStep(this.quality),
6315
6332
  uKnockout: +!!this.knockout,
6316
6333
  uInputClamp: [
6317
6334
  0,
@@ -6323,12 +6340,12 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6323
6340
  });
6324
6341
  }
6325
6342
  };
6326
- A([_({ fallback: "#000000ff" }), k("design:type", Object)], fi.prototype, "color", void 0), A([_({ fallback: 1 }), k("design:type", Number)], fi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", String)], fi.prototype, "style", void 0), A([_(), k("design:type", Object)], fi.prototype, "image", void 0), A([_({ fallback: 1 }), k("design:type", Number)], fi.prototype, "opacity", void 0), A([_({ fallback: .1 }), k("design:type", Number)], fi.prototype, "quality", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], fi.prototype, "knockout", void 0), fi = ui = A([S("OutlineEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fi);
6343
+ A([_({ fallback: "#000000ff" }), k("design:type", Object)], pi.prototype, "color", void 0), A([_({ fallback: 1 }), k("design:type", Number)], pi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", String)], pi.prototype, "style", void 0), A([_(), k("design:type", Object)], pi.prototype, "image", void 0), A([_({ fallback: 1 }), k("design:type", Number)], pi.prototype, "opacity", void 0), A([_({ fallback: .1 }), k("design:type", Number)], pi.prototype, "quality", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], pi.prototype, "knockout", void 0), pi = di = A([S("OutlineEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6327
6344
  //#endregion
6328
6345
  //#region src/scene/effects/PixelateEffect.ts
6329
- var pi, mi = class extends W {
6346
+ var mi, hi = class extends W {
6330
6347
  static {
6331
- pi = this;
6348
+ mi = this;
6332
6349
  }
6333
6350
  static material = new L({ gl: {
6334
6351
  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}",
@@ -6344,16 +6361,16 @@ var pi, mi = class extends W {
6344
6361
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6345
6362
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6346
6363
  };
6347
- R.draw(e, pi.material, a);
6364
+ R.draw(e, mi.material, a);
6348
6365
  });
6349
6366
  }
6350
6367
  };
6351
- A([_({ fallback: 10 }), k("design:type", Number)], mi.prototype, "strength", void 0), mi = pi = A([S("PixelateEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], mi);
6368
+ A([_({ fallback: 10 }), k("design:type", Number)], hi.prototype, "strength", void 0), hi = mi = A([S("PixelateEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6352
6369
  //#endregion
6353
6370
  //#region src/scene/effects/ZoomBlurEffect.ts
6354
- var hi, gi = class extends W {
6371
+ var gi, _i = class extends W {
6355
6372
  static {
6356
- hi = this;
6373
+ gi = this;
6357
6374
  }
6358
6375
  static material = new L({ gl: {
6359
6376
  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}",
@@ -6364,7 +6381,7 @@ var hi, gi = class extends W {
6364
6381
  }
6365
6382
  apply(e, t) {
6366
6383
  t.redraw(e, () => {
6367
- R.draw(e, hi.material, {
6384
+ R.draw(e, gi.material, {
6368
6385
  sampler: 0,
6369
6386
  uCenter: [t.width / 2, t.height / 2],
6370
6387
  uInnerRadius: this.innerRadius,
@@ -6380,10 +6397,10 @@ var hi, gi = class extends W {
6380
6397
  });
6381
6398
  }
6382
6399
  };
6383
- A([_(), k("design:type", Array)], gi.prototype, "center", void 0), A([_({ fallback: 20 }), k("design:type", Number)], gi.prototype, "innerRadius", void 0), A([_({ fallback: -1 }), k("design:type", Number)], gi.prototype, "radius", void 0), A([_({ fallback: .1 }), k("design:type", Number)], gi.prototype, "strength", void 0), gi = hi = A([S("ZoomBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], gi);
6400
+ A([_(), k("design:type", Array)], _i.prototype, "center", void 0), A([_({ fallback: 20 }), k("design:type", Number)], _i.prototype, "innerRadius", void 0), A([_({ fallback: -1 }), k("design:type", Number)], _i.prototype, "radius", void 0), A([_({ fallback: .1 }), k("design:type", Number)], _i.prototype, "strength", void 0), _i = gi = A([S("ZoomBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _i);
6384
6401
  //#endregion
6385
6402
  //#region src/scene/2d/element/utils.ts
6386
- function _i(e, t) {
6403
+ function vi(e, t) {
6387
6404
  let { x: n, y: r, width: i, height: a } = t, o = !1, s = new b().translate(-n, -r).scale(1 / i, 1 / a);
6388
6405
  if (e.cropRect) {
6389
6406
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
@@ -6438,7 +6455,7 @@ var Y = class extends T {
6438
6455
  }
6439
6456
  }
6440
6457
  async loadTexture() {
6441
- if (this.linearGradient || this.radialGradient) this.texture = new nr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6458
+ if (this.linearGradient || this.radialGradient) this.texture = new rr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6442
6459
  else if (d(this.image)) this.animatedTexture = void 0, this.texture = void 0;
6443
6460
  else if (this._parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
6444
6461
  let e = this.image.split("?")[0].endsWith(".gif"), t = this.image, n = await $.loadBy(t, async () => {
@@ -6459,12 +6476,12 @@ var Y = class extends T {
6459
6476
  width: e,
6460
6477
  height: t
6461
6478
  } };
6462
- if (this.image === "viewport") n.fillStyle = new or();
6479
+ if (this.image === "viewport") n.fillStyle = new sr();
6463
6480
  else {
6464
6481
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6465
6482
  r = {
6466
6483
  ...r,
6467
- ..._i(this, this.tile && i ? {
6484
+ ...vi(this, this.tile && i ? {
6468
6485
  x: 0,
6469
6486
  y: 0,
6470
6487
  width: i.sourceWidth,
@@ -6503,7 +6520,7 @@ var Y = class extends T {
6503
6520
  A([_({ fallback: !0 }), k("design:type", Boolean)], Y.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Y.prototype, "color", void 0), A([_(), k("design:type", Object)], Y.prototype, "image", void 0), A([_(), k("design:type", Object)], Y.prototype, "linearGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "radialGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "cropRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "stretchRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "dpi", void 0), A([_(), k("design:type", Object)], Y.prototype, "rotateWithShape", void 0), A([_(), k("design:type", Object)], Y.prototype, "tile", void 0), A([_(), k("design:type", Object)], Y.prototype, "opacity", void 0);
6504
6521
  //#endregion
6505
6522
  //#region src/scene/2d/element/Element2DBackground.ts
6506
- var vi = class extends Y {
6523
+ var yi = class extends Y {
6507
6524
  setProperties(e) {
6508
6525
  return super._setProperties(d(e) ? void 0 : f(e));
6509
6526
  }
@@ -6515,14 +6532,14 @@ var vi = class extends Y {
6515
6532
  }
6516
6533
  }
6517
6534
  };
6518
- A([_(), k("design:type", Object)], vi.prototype, "fillWithShape", void 0);
6535
+ A([_(), k("design:type", Object)], yi.prototype, "fillWithShape", void 0);
6519
6536
  //#endregion
6520
6537
  //#region src/scene/2d/element/Element2DChart.ts
6521
- var yi;
6522
- function bi() {
6523
- return yi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), yi;
6538
+ var bi;
6539
+ function xi() {
6540
+ return bi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), bi;
6524
6541
  }
6525
- function xi(e) {
6542
+ function Si(e) {
6526
6543
  if (!e) return { show: !1 };
6527
6544
  switch (e) {
6528
6545
  case "bottom": return {
@@ -6588,7 +6605,7 @@ var X = class extends T {
6588
6605
  this._teardown(), this._parent.requestDraw();
6589
6606
  return;
6590
6607
  }
6591
- let n = await bi();
6608
+ let n = await xi();
6592
6609
  if (!n) {
6593
6610
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)"), this._renderPlaceholder(e, t);
6594
6611
  return;
@@ -6613,7 +6630,7 @@ var X = class extends T {
6613
6630
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6614
6631
  let e = this._container.querySelector("canvas");
6615
6632
  if (!e) return;
6616
- this._texture = new er({
6633
+ this._texture = new tr({
6617
6634
  source: e,
6618
6635
  pixelRatio: 1
6619
6636
  });
@@ -6626,7 +6643,7 @@ var X = class extends T {
6626
6643
  let n = document.createElement("canvas");
6627
6644
  n.width = Math.ceil(e), n.height = Math.ceil(t);
6628
6645
  let r = n.getContext("2d");
6629
- r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new er({
6646
+ r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new tr({
6630
6647
  source: n,
6631
6648
  pixelRatio: 1
6632
6649
  }), this._texture.requestUpdate("source"), this._parent.requestDraw());
@@ -6647,7 +6664,7 @@ var X = class extends T {
6647
6664
  text: this.title,
6648
6665
  left: "center"
6649
6666
  } : void 0,
6650
- legend: xi(this.legend),
6667
+ legend: Si(this.legend),
6651
6668
  tooltip: {}
6652
6669
  };
6653
6670
  if (n) {
@@ -6694,7 +6711,7 @@ var X = class extends T {
6694
6711
  A([_({ fallback: !0 }), k("design:type", Boolean)], X.prototype, "enabled", void 0), A([_({ fallback: "column" }), k("design:type", Object)], X.prototype, "type", void 0), A([_(), k("design:type", Object)], X.prototype, "grouping", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "categories", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "series", void 0), A([_(), k("design:type", Object)], X.prototype, "title", void 0), A([_(), k("design:type", Object)], X.prototype, "legend", void 0), A([_(), k("design:type", Object)], X.prototype, "categoryAxis", void 0), A([_(), k("design:type", Object)], X.prototype, "valueAxis", void 0);
6695
6712
  //#endregion
6696
6713
  //#region src/scene/2d/element/Element2DComments.ts
6697
- var Si = class extends T {
6714
+ var Ci = class extends T {
6698
6715
  parent;
6699
6716
  constructor(e) {
6700
6717
  super(), this.parent = e;
@@ -6728,7 +6745,7 @@ var Si = class extends T {
6728
6745
  isValid() {
6729
6746
  return Object.values(this._properties).some(Boolean);
6730
6747
  }
6731
- }, Ci = class extends T {
6748
+ }, wi = class extends T {
6732
6749
  _parent;
6733
6750
  _routeSig;
6734
6751
  _routePath;
@@ -6771,12 +6788,12 @@ var Si = class extends T {
6771
6788
  let n = t.shape.connectionPoints?.find((t) => t.idx === e.idx);
6772
6789
  if (n) {
6773
6790
  let e = t.globalTransform.apply(new x(n.x * t.size.x, n.y * t.size.y)), i;
6774
- return i = n.ang === void 0 ? Er(n.x - .5, n.y - .5) : {
6791
+ return i = n.ang === void 0 ? Dr(n.x - .5, n.y - .5) : {
6775
6792
  x: Math.cos(n.ang),
6776
6793
  y: Math.sin(n.ang)
6777
6794
  }, {
6778
6795
  point: e,
6779
- dir: wi(i, t.globalRotation),
6796
+ dir: Ti(i, t.globalRotation),
6780
6797
  bbox: r
6781
6798
  };
6782
6799
  }
@@ -6799,11 +6816,11 @@ var Si = class extends T {
6799
6816
  return;
6800
6817
  }
6801
6818
  let n = (e) => e ? `${e.point.x},${e.point.y},${e.dir?.x ?? ""},${e.dir?.y ?? ""}` : "-", r = `${this.mode}|${n(e)}|${n(t)}`;
6802
- return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Dr(this.mode, e ?? t, t ?? e)), this._routePath;
6819
+ return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Or(this.mode, e ?? t, t ?? e)), this._routePath;
6803
6820
  }
6804
6821
  };
6805
- A([_(), k("design:type", Object)], Ci.prototype, "start", void 0), A([_(), k("design:type", Object)], Ci.prototype, "end", void 0), A([_({ fallback: "straight" }), k("design:type", Object)], Ci.prototype, "mode", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Ci.prototype, "labelPosition", void 0);
6806
- function wi(e, t) {
6822
+ A([_(), k("design:type", Object)], wi.prototype, "start", void 0), A([_(), k("design:type", Object)], wi.prototype, "end", void 0), A([_({ fallback: "straight" }), k("design:type", Object)], wi.prototype, "mode", void 0), A([_({ fallback: .5 }), k("design:type", Number)], wi.prototype, "labelPosition", void 0);
6823
+ function Ti(e, t) {
6807
6824
  if (!t) return e;
6808
6825
  let n = Math.cos(t), r = Math.sin(t);
6809
6826
  return {
@@ -6813,29 +6830,29 @@ function wi(e, t) {
6813
6830
  }
6814
6831
  //#endregion
6815
6832
  //#region src/scene/2d/element/bakeImageEffects.ts
6816
- function Ti(e) {
6833
+ function Ei(e) {
6817
6834
  return e.getContext("2d");
6818
6835
  }
6819
- function Ei(e, t, n, r) {
6836
+ function Di(e, t, n, r) {
6820
6837
  let i = (t?.angle ?? 0) * Math.PI / 180, a = n / 2, o = r / 2, s = (Math.abs(Math.cos(i)) * n + Math.abs(Math.sin(i)) * r) / 2, c = Math.cos(i) * s, l = Math.sin(i) * s, u = e.createLinearGradient(a - c, o - l, a + c, o + l);
6821
6838
  for (let e of t?.stops ?? []) u.addColorStop(Math.min(1, Math.max(0, e.offset)), e.color);
6822
6839
  return u;
6823
6840
  }
6824
- function Di(e, t, n, r, i) {
6825
- let a = w(t, n), o = Ti(a);
6826
- return o.drawImage(e, 0, 0, t, n), o.globalCompositeOperation = "source-in", r.linearGradient ? (o.fillStyle = Ei(o, r.linearGradient, t, n), o.fillRect(0, 0, t, n)) : r.image && i[r.image] ? o.drawImage(i[r.image], 0, 0, t, n) : r.color && (o.fillStyle = r.color, o.fillRect(0, 0, t, n)), a;
6827
- }
6828
6841
  function Oi(e, t, n, r, i) {
6829
- let a = w(t, n), o = Ti(a), s = Math.max(8, Math.ceil(r) * 2);
6842
+ let a = w(t, n), o = Ei(a);
6843
+ return o.drawImage(e, 0, 0, t, n), o.globalCompositeOperation = "source-in", r.linearGradient ? (o.fillStyle = Di(o, r.linearGradient, t, n), o.fillRect(0, 0, t, n)) : r.image && i[r.image] ? o.drawImage(i[r.image], 0, 0, t, n) : r.color && (o.fillStyle = r.color, o.fillRect(0, 0, t, n)), a;
6844
+ }
6845
+ function ki(e, t, n, r, i) {
6846
+ let a = w(t, n), o = Ei(a), s = Math.max(8, Math.ceil(r) * 2);
6830
6847
  for (let i = 0; i < s; i++) {
6831
6848
  let a = i / s * Math.PI * 2;
6832
6849
  o.drawImage(e, Math.cos(a) * r, Math.sin(a) * r, t, n);
6833
6850
  }
6834
6851
  o.globalCompositeOperation = "source-in", o.fillStyle = i, o.fillRect(0, 0, t, n);
6835
- let c = w(t, n), l = Ti(c);
6852
+ let c = w(t, n), l = Ei(c);
6836
6853
  return l.drawImage(a, 0, 0), l.drawImage(e, 0, 0, t, n), c;
6837
6854
  }
6838
- function ki(e) {
6855
+ function Ai(e) {
6839
6856
  let t = 0, n = 0;
6840
6857
  if (!e) return {
6841
6858
  x: t,
@@ -6851,31 +6868,31 @@ function ki(e) {
6851
6868
  y: n
6852
6869
  };
6853
6870
  }
6854
- function Ai(e, t, n, r, i = {}) {
6871
+ function ji(e, t, n, r, i = {}) {
6855
6872
  let a = Math.max(1, Math.round(n)), o = Math.max(1, Math.round(r)), s = 0;
6856
6873
  for (let e of t) {
6857
6874
  e.outline?.width && e.outline.color && (s = Math.max(s, e.outline.width));
6858
- let t = ki(e.transform);
6875
+ let t = Ai(e.transform);
6859
6876
  s = Math.max(s, Math.abs(t.x), Math.abs(t.y));
6860
6877
  }
6861
6878
  s = Math.min(Math.ceil(s), Math.floor(Math.min(a, o) * .2));
6862
6879
  let c = e;
6863
6880
  if (s > 0) {
6864
6881
  let t = w(a, o);
6865
- Ti(t).drawImage(e, s, s, Math.max(1, a - s * 2), Math.max(1, o - s * 2)), c = t;
6882
+ Ei(t).drawImage(e, s, s, Math.max(1, a - s * 2), Math.max(1, o - s * 2)), c = t;
6866
6883
  }
6867
- let l = w(a, o), u = Ti(l);
6884
+ let l = w(a, o), u = Ei(l);
6868
6885
  for (let e of t) {
6869
6886
  let t = c;
6870
- e.fill && (e.fill.color || e.fill.linearGradient || e.fill.image) && (t = Di(t, a, o, e.fill, i)), e.outline?.width && e.outline.color && (t = Oi(t, a, o, e.outline.width, e.outline.color));
6871
- let { x: n, y: r } = ki(e.transform);
6887
+ e.fill && (e.fill.color || e.fill.linearGradient || e.fill.image) && (t = Oi(t, a, o, e.fill, i)), e.outline?.width && e.outline.color && (t = ki(t, a, o, e.outline.width, e.outline.color));
6888
+ let { x: n, y: r } = Ai(e.transform);
6872
6889
  u.save(), u.globalCompositeOperation = "destination-over", e.shadow && (u.shadowColor = e.shadow.color, u.shadowBlur = e.shadow.blur ?? 0, u.shadowOffsetX = e.shadow.offsetX ?? 0, u.shadowOffsetY = e.shadow.offsetY ?? 0), u.drawImage(t, n, r, a, o), u.restore();
6873
6890
  }
6874
6891
  return l;
6875
6892
  }
6876
6893
  //#endregion
6877
6894
  //#region src/scene/2d/element/Element2DForeground.ts
6878
- var ji = class extends Y {
6895
+ var Mi = class extends Y {
6879
6896
  _sourceCanvas;
6880
6897
  _sourceImage;
6881
6898
  setProperties(e) {
@@ -6901,7 +6918,7 @@ var ji = class extends Y {
6901
6918
  }
6902
6919
  let e = await this._resolveSourceCanvas();
6903
6920
  if (!e) return;
6904
- let t = e.width, n = e.height, r = await this._resolvePatterns(), i = Ai(e, this.effects, t, n, r);
6921
+ let t = e.width, n = e.height, r = await this._resolvePatterns(), i = ji(e, this.effects, t, n, r);
6905
6922
  this.texture = new B({
6906
6923
  source: i,
6907
6924
  width: t,
@@ -6936,14 +6953,14 @@ var ji = class extends Y {
6936
6953
  if (!(!r || !i)) return i.drawImage(e, 0, 0, t, n), r;
6937
6954
  }
6938
6955
  };
6939
- A([_(), k("design:type", Object)], ji.prototype, "fillWithShape", void 0), A([_(), k("design:type", Array)], ji.prototype, "effects", void 0);
6956
+ A([_(), k("design:type", Object)], Mi.prototype, "fillWithShape", void 0), A([_(), k("design:type", Array)], Mi.prototype, "effects", void 0);
6940
6957
  //#endregion
6941
6958
  //#region src/scene/2d/element/Element2DOutline.ts
6942
- var Mi = {
6959
+ var Ni = {
6943
6960
  sm: 4,
6944
6961
  md: 6,
6945
6962
  lg: 8
6946
- }, Ni = class extends Y {
6963
+ }, Pi = class extends Y {
6947
6964
  setProperties(e) {
6948
6965
  return super._setProperties(d(e) ? void 0 : te(e));
6949
6966
  }
@@ -6965,7 +6982,7 @@ var Mi = {
6965
6982
  }
6966
6983
  draw() {
6967
6984
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
6968
- this.image === "viewport" ? n.strokeStyle = new or() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ..._i(this, {
6985
+ this.image === "viewport" ? n.strokeStyle = new sr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...vi(this, {
6969
6986
  x: 0,
6970
6987
  y: 0,
6971
6988
  width: e,
@@ -6988,14 +7005,14 @@ var Mi = {
6988
7005
  _fillEnd(e, t, n, r, i) {
6989
7006
  let a = e.x - t.x, o = e.y - t.y, s = Math.hypot(a, o);
6990
7007
  if (s < .001) return;
6991
- let c = Mi[String(n.width ?? n.height ?? "md")] ?? 6, l = r * c, u = r * c * .5, d = a / s, f = o / s, p = e.x - d * l, m = e.y - f * l, h = -f * u, g = d * u, ee = this._parent.context;
7008
+ let c = Ni[String(n.width ?? n.height ?? "md")] ?? 6, l = r * c, u = r * c * .5, d = a / s, f = o / s, p = e.x - d * l, m = e.y - f * l, h = -f * u, g = d * u, ee = this._parent.context;
6992
7009
  ee.fillStyle = i, ee.moveTo(e.x, e.y).lineTo(p + h, m + g).lineTo(p - h, m - g).closePath().fill();
6993
7010
  }
6994
7011
  };
6995
- A([_(), k("design:type", Object)], Ni.prototype, "color", void 0), A([_(), k("design:type", Object)], Ni.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", Object)], Ni.prototype, "style", void 0), A([_({ fallback: "butt" }), k("design:type", Object)], Ni.prototype, "lineCap", void 0), A([_({ fallback: "miter" }), k("design:type", Object)], Ni.prototype, "lineJoin", void 0), A([_(), k("design:type", Object)], Ni.prototype, "headEnd", void 0), A([_(), k("design:type", Object)], Ni.prototype, "tailEnd", void 0);
7012
+ A([_(), k("design:type", Object)], Pi.prototype, "color", void 0), A([_(), k("design:type", Object)], Pi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", Object)], Pi.prototype, "style", void 0), A([_({ fallback: "butt" }), k("design:type", Object)], Pi.prototype, "lineCap", void 0), A([_({ fallback: "miter" }), k("design:type", Object)], Pi.prototype, "lineJoin", void 0), A([_(), k("design:type", Object)], Pi.prototype, "headEnd", void 0), A([_(), k("design:type", Object)], Pi.prototype, "tailEnd", void 0);
6996
7013
  //#endregion
6997
7014
  //#region src/scene/2d/element/Element2DShadow.ts
6998
- var Pi = class extends T {
7015
+ var Fi = class extends T {
6999
7016
  _parent;
7000
7017
  constructor(e) {
7001
7018
  super(), this._parent = e;
@@ -7016,13 +7033,13 @@ var Pi = class extends T {
7016
7033
  }
7017
7034
  updateEffect() {
7018
7035
  let e = "__$shadow", t = this._parent.getNode(e);
7019
- 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);
7036
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new ei({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7020
7037
  }
7021
7038
  };
7022
- A([_({ fallback: !0 }), k("design:type", Boolean)], Pi.prototype, "enabled", void 0), A([_({ fallback: "#000000FF" }), k("design:type", Object)], Pi.prototype, "color", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Pi.prototype, "blur", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Pi.prototype, "offsetY", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Pi.prototype, "offsetX", void 0);
7039
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Fi.prototype, "enabled", void 0), A([_({ fallback: "#000000FF" }), k("design:type", Object)], Fi.prototype, "color", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Fi.prototype, "blur", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Fi.prototype, "offsetY", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Fi.prototype, "offsetX", void 0);
7023
7040
  //#endregion
7024
7041
  //#region src/scene/2d/element/Element2DShape.ts
7025
- var Fi = class extends T {
7042
+ var Ii = class extends T {
7026
7043
  _parent;
7027
7044
  _path2DSet = new ue();
7028
7045
  _localPath;
@@ -7120,24 +7137,24 @@ var Fi = class extends T {
7120
7137
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
7121
7138
  }
7122
7139
  };
7123
- A([_({ fallback: !0 }), k("design:type", Boolean)], Fi.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Fi.prototype, "preset", void 0), A([_(), k("design:type", Object)], Fi.prototype, "svg", void 0), A([_(), k("design:type", Object)], Fi.prototype, "viewBox", void 0), A([_(), k("design:type", Object)], Fi.prototype, "paths", void 0), A([_(), k("design:type", Object)], Fi.prototype, "connectionPoints", void 0);
7140
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Ii.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Ii.prototype, "preset", void 0), A([_(), k("design:type", Object)], Ii.prototype, "svg", void 0), A([_(), k("design:type", Object)], Ii.prototype, "viewBox", void 0), A([_(), k("design:type", Object)], Ii.prototype, "paths", void 0), A([_(), k("design:type", Object)], Ii.prototype, "connectionPoints", void 0);
7124
7141
  //#endregion
7125
7142
  //#region src/scene/2d/element/Element2DStyle.ts
7126
- var Ii = class extends vt {
7143
+ var Li = class extends vt {
7127
7144
  constructor(e) {
7128
7145
  super(), this.setProperties(e);
7129
7146
  }
7130
- }, Li = {
7147
+ }, Ri = {
7131
7148
  ...o(),
7132
7149
  left: 0,
7133
7150
  top: 0,
7134
7151
  width: 0,
7135
7152
  height: 0
7136
7153
  };
7137
- for (let e in Li) i(Ii, e, { fallback: Li[e] });
7154
+ for (let e in Ri) i(Li, e, { fallback: Ri[e] });
7138
7155
  //#endregion
7139
7156
  //#region src/scene/2d/element/Element2DTable.ts
7140
- var Ri = 100, zi = 40, Bi = class extends T {
7157
+ var zi = 100, Bi = 40, Vi = class extends T {
7141
7158
  _parent;
7142
7159
  _cellNodes = /* @__PURE__ */ new Map();
7143
7160
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -7168,10 +7185,10 @@ var Ri = 100, zi = 40, Bi = class extends T {
7168
7185
  return !!(this.enabled && this.cells.length);
7169
7186
  }
7170
7187
  get gridWidth() {
7171
- return this.columns.reduce((e, t) => e + (t.width || Ri), 0);
7188
+ return this.columns.reduce((e, t) => e + (t.width || zi), 0);
7172
7189
  }
7173
7190
  get gridHeight() {
7174
- return this.rows.reduce((e, t) => e + (t.height || zi), 0);
7191
+ return this.rows.reduce((e, t) => e + (t.height || Bi), 0);
7175
7192
  }
7176
7193
  update() {
7177
7194
  if (this._dirty = !1, !this.isValid()) {
@@ -7181,9 +7198,9 @@ var Ri = 100, zi = 40, Bi = class extends T {
7181
7198
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
7182
7199
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
7183
7200
  let a = [0];
7184
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Ri));
7201
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || zi));
7185
7202
  let o = [0];
7186
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || zi));
7203
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Bi));
7187
7204
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
7188
7205
  let s = /* @__PURE__ */ new Set();
7189
7206
  for (let e of n) {
@@ -7220,7 +7237,7 @@ var Ri = 100, zi = 40, Bi = class extends T {
7220
7237
  this._clearCells();
7221
7238
  }
7222
7239
  };
7223
- A([_({ fallback: !0 }), k("design:type", Boolean)], Bi.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Bi.prototype, "columns", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Bi.prototype, "rows", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Bi.prototype, "cells", void 0);
7240
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Vi.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Vi.prototype, "columns", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Vi.prototype, "rows", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Vi.prototype, "cells", void 0);
7224
7241
  //#endregion
7225
7242
  //#region src/scene/2d/element/Element2DText.ts
7226
7243
  var Z = class extends T {
@@ -7234,7 +7251,7 @@ var Z = class extends T {
7234
7251
  }
7235
7252
  _textContent = "";
7236
7253
  _autoDrawMode;
7237
- _texture = new er({ mipmap: !0 });
7254
+ _texture = new tr({ mipmap: !0 });
7238
7255
  _textureMap = /* @__PURE__ */ new Map();
7239
7256
  constructor(e) {
7240
7257
  super(), this._parent = e, this.base = new _e(), this.base.setPropertyAccessor(this);
@@ -7306,7 +7323,7 @@ var Z = class extends T {
7306
7323
  }), this._parent.requestDraw());
7307
7324
  }
7308
7325
  async _loadTexture(e, t) {
7309
- return e.linearGradient || e.radialGradient ? new nr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7326
+ return e.linearGradient || e.radialGradient ? new rr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7310
7327
  }
7311
7328
  setContent(e) {
7312
7329
  this.content = oe(e);
@@ -7335,7 +7352,7 @@ var Z = class extends T {
7335
7352
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7336
7353
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7337
7354
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? r.color, e.fill({
7338
- ..._i(r, o?.box ?? {
7355
+ ...vi(r, o?.box ?? {
7339
7356
  x: 0,
7340
7357
  y: 0,
7341
7358
  width: this._parent.size.width,
@@ -7347,7 +7364,7 @@ var Z = class extends T {
7347
7364
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
7348
7365
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7349
7366
  r.enabled !== !1 && (o || r.color) && (r.width === void 0 || r.width) && (e.addPath(n), e.style = { ...n.style }, e.lineWidth = r.width || 1, e.strokeStyle = o?.texture ?? r.color, e.lineCap = r.lineCap, e.lineJoin = r.lineJoin, e.stroke({
7350
- ..._i(r, o?.box ?? {
7367
+ ...vi(r, o?.box ?? {
7351
7368
  x: 0,
7352
7369
  y: 0,
7353
7370
  width: this._parent.size.width,
@@ -7390,11 +7407,11 @@ var Q = {
7390
7407
  horizontal: 6,
7391
7408
  vertical: 7,
7392
7409
  all: 8
7393
- }, Vi = {
7410
+ }, Hi = {
7394
7411
  column: 0,
7395
7412
  row: 1,
7396
7413
  all: 2
7397
- }, Hi = {
7414
+ }, Ui = {
7398
7415
  auto: 0,
7399
7416
  "flex-start": 1,
7400
7417
  center: 2,
@@ -7404,42 +7421,42 @@ var Q = {
7404
7421
  "space-between": 6,
7405
7422
  "space-around": 7,
7406
7423
  "space-evenly": 8
7407
- }, Ui = {
7424
+ }, Wi = {
7408
7425
  flex: 0,
7409
7426
  none: 1,
7410
7427
  contents: 2
7411
- }, Wi = {
7428
+ }, Gi = {
7412
7429
  inherit: 0,
7413
7430
  ltr: 1,
7414
7431
  rtl: 2
7415
- }, Gi = {
7432
+ }, Ki = {
7416
7433
  column: 0,
7417
7434
  "column-reverse": 1,
7418
7435
  row: 2,
7419
7436
  "row-reverse": 3
7420
- }, Ki = {
7437
+ }, qi = {
7421
7438
  "no-wrap": 0,
7422
7439
  wrap: 1,
7423
7440
  "Wrap-reverse": 2
7424
- }, qi = {
7441
+ }, Ji = {
7425
7442
  "flex-start": 0,
7426
7443
  center: 1,
7427
7444
  "flex-end": 2,
7428
7445
  "space-between": 3,
7429
7446
  "space-around": 4,
7430
7447
  "space-evenly": 5
7431
- }, Ji = {
7448
+ }, Yi = {
7432
7449
  visible: 0,
7433
7450
  hidden: 1,
7434
7451
  scroll: 2
7435
- }, Yi = {
7452
+ }, Xi = {
7436
7453
  static: 0,
7437
7454
  relative: 1,
7438
7455
  absolute: 2
7439
- }, Xi = {
7456
+ }, Zi = {
7440
7457
  "border-box": 0,
7441
7458
  "content-box": 1
7442
- }, Zi = class e {
7459
+ }, Qi = class e {
7443
7460
  _parent;
7444
7461
  static _yoga;
7445
7462
  static async load() {
@@ -7451,27 +7468,27 @@ var Q = {
7451
7468
  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);
7452
7469
  }
7453
7470
  _addChild(e, t) {
7454
- if (e instanceof na && e.flexbox.node && this.node) {
7471
+ if (e instanceof ra && e.flexbox.node && this.node) {
7455
7472
  this.node.insertChild(e.flexbox.node, t);
7456
7473
  let n = e.style.getProperties();
7457
7474
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7458
7475
  }
7459
7476
  }
7460
7477
  _removeChild(e, t) {
7461
- e instanceof na && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7478
+ e instanceof ra && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7462
7479
  }
7463
7480
  updateStyleProperty(e, t) {
7464
7481
  let n = this.node;
7465
7482
  if (n) {
7466
7483
  switch (e) {
7467
7484
  case "alignContent":
7468
- n.setAlignContent(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7485
+ n.setAlignContent(t ? Ui[t] ?? Ui["flex-start"] : Ui["flex-start"]);
7469
7486
  break;
7470
7487
  case "alignItems":
7471
- n.setAlignItems(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7488
+ n.setAlignItems(t ? Ui[t] ?? Ui["flex-start"] : Ui["flex-start"]);
7472
7489
  break;
7473
7490
  case "alignSelf":
7474
- n.setAlignSelf(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7491
+ n.setAlignSelf(t ? Ui[t] ?? Ui["flex-start"] : Ui["flex-start"]);
7475
7492
  break;
7476
7493
  case "aspectRatio":
7477
7494
  n.setAspectRatio(t);
@@ -7492,10 +7509,10 @@ var Q = {
7492
7509
  n.setBorder(Q.all, this._parent.style.borderWidth);
7493
7510
  break;
7494
7511
  case "direction":
7495
- n.setDirection(t ? Wi[t] ?? Wi.inherit : Wi.inherit);
7512
+ n.setDirection(t ? Gi[t] ?? Gi.inherit : Gi.inherit);
7496
7513
  break;
7497
7514
  case "display":
7498
- n.setDisplay(t ? Ui[t] ?? Ui.flex : Ui.flex);
7515
+ n.setDisplay(t ? Wi[t] ?? Wi.flex : Wi.flex);
7499
7516
  break;
7500
7517
  case "flex":
7501
7518
  n.setFlex(t);
@@ -7504,7 +7521,7 @@ var Q = {
7504
7521
  n.setFlexBasis(t);
7505
7522
  break;
7506
7523
  case "flexDirection":
7507
- n.setFlexDirection(t ? Gi[t] ?? Gi.row : Gi.row);
7524
+ n.setFlexDirection(t ? Ki[t] ?? Ki.row : Ki.row);
7508
7525
  break;
7509
7526
  case "flexGrow":
7510
7527
  n.setFlexGrow(t);
@@ -7513,16 +7530,16 @@ var Q = {
7513
7530
  n.setFlexShrink(t);
7514
7531
  break;
7515
7532
  case "flexWrap":
7516
- n.setFlexWrap(t ? Ki[t] ?? Ki.wrap : Ki.wrap);
7533
+ n.setFlexWrap(t ? qi[t] ?? qi.wrap : qi.wrap);
7517
7534
  break;
7518
7535
  case "height":
7519
7536
  n.setHeight(t);
7520
7537
  break;
7521
7538
  case "justifyContent":
7522
- n.setJustifyContent(t ? qi[t] ?? qi["flex-start"] : qi["flex-start"]);
7539
+ n.setJustifyContent(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7523
7540
  break;
7524
7541
  case "gap":
7525
- t !== void 0 && n.setGap(Vi.all, t);
7542
+ t !== void 0 && n.setGap(Hi.all, t);
7526
7543
  break;
7527
7544
  case "marginTop":
7528
7545
  n.setMargin(Q.top, t);
@@ -7552,7 +7569,7 @@ var Q = {
7552
7569
  n.setMinWidth(t);
7553
7570
  break;
7554
7571
  case "overflow":
7555
- n.setOverflow(t ? Ji[t] ?? Ji.visible : Ji.visible);
7572
+ n.setOverflow(t ? Yi[t] ?? Yi.visible : Yi.visible);
7556
7573
  break;
7557
7574
  case "paddingTop":
7558
7575
  n.setPadding(Q.top, t);
@@ -7582,10 +7599,10 @@ var Q = {
7582
7599
  n.setPosition(Q.right, t);
7583
7600
  break;
7584
7601
  case "position":
7585
- n.setPositionType(t ? Yi[t] ?? Yi.relative : Yi.relative);
7602
+ n.setPositionType(t ? Xi[t] ?? Xi.relative : Xi.relative);
7586
7603
  break;
7587
7604
  case "boxSizing":
7588
- n.setBoxSizing(t ? Xi[t] ?? Xi["content-box"] : Xi["content-box"]);
7605
+ n.setBoxSizing(t ? Zi[t] ?? Zi["content-box"] : Zi["content-box"]);
7589
7606
  break;
7590
7607
  case "width":
7591
7608
  n.setWidth(t);
@@ -7596,7 +7613,7 @@ var Q = {
7596
7613
  }
7597
7614
  update() {
7598
7615
  let e = this._parent, t = this.node;
7599
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Wi.ltr), t.hasNewLayout())) {
7616
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Gi.ltr), t.hasNewLayout())) {
7600
7617
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
7601
7618
  (!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();
7602
7619
  }
@@ -7604,13 +7621,13 @@ var Q = {
7604
7621
  destroy() {
7605
7622
  this.node?.free(), this.node = void 0;
7606
7623
  }
7607
- }, Qi = new Set(Object.keys(a())), $i = new Set(Object.keys(s())), ea = new x(), ta = [
7624
+ }, $i = new Set(Object.keys(a())), ea = new Set(Object.keys(s())), ta = new x(), na = [
7608
7625
  [0, 0],
7609
7626
  [1, 0],
7610
7627
  [1, 1],
7611
7628
  [0, 1]
7612
- ], na = class extends wr {
7613
- flexbox = new Zi(this);
7629
+ ], ra = class extends Tr {
7630
+ flexbox = new Qi(this);
7614
7631
  aabb = new yt();
7615
7632
  globalAabb = new yt();
7616
7633
  _parentGlobalDisplay;
@@ -7623,7 +7640,7 @@ var Q = {
7623
7640
  });
7624
7641
  _allowPointerEvents = !0;
7625
7642
  _overflowHidden = !1;
7626
- _style = new Ii().on("updateProperty", (...e) => {
7643
+ _style = new Li().on("updateProperty", (...e) => {
7627
7644
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
7628
7645
  });
7629
7646
  get style() {
@@ -7637,14 +7654,14 @@ var Q = {
7637
7654
  this._endBatch();
7638
7655
  }
7639
7656
  }
7640
- _background = new vi(this);
7657
+ _background = new yi(this);
7641
7658
  get background() {
7642
7659
  return this._background;
7643
7660
  }
7644
7661
  set background(e) {
7645
7662
  this._background.resetProperties().setProperties(e);
7646
7663
  }
7647
- _shape = new Fi(this);
7664
+ _shape = new Ii(this);
7648
7665
  get shape() {
7649
7666
  return this._shape;
7650
7667
  }
@@ -7658,14 +7675,14 @@ var Q = {
7658
7675
  set fill(e) {
7659
7676
  this._fill.resetProperties().setProperties(e);
7660
7677
  }
7661
- _outline = new Ni(this);
7678
+ _outline = new Pi(this);
7662
7679
  get outline() {
7663
7680
  return this._outline;
7664
7681
  }
7665
7682
  set outline(e) {
7666
7683
  this._outline.resetProperties().setProperties(e);
7667
7684
  }
7668
- _foreground = new ji(this);
7685
+ _foreground = new Mi(this);
7669
7686
  get foreground() {
7670
7687
  return this._foreground;
7671
7688
  }
@@ -7679,21 +7696,21 @@ var Q = {
7679
7696
  set text(e) {
7680
7697
  this._text.resetProperties().setProperties(e);
7681
7698
  }
7682
- _shadow = new Pi(this);
7699
+ _shadow = new Fi(this);
7683
7700
  get shadow() {
7684
7701
  return this._shadow;
7685
7702
  }
7686
7703
  set shadow(e) {
7687
7704
  this._shadow.resetProperties().setProperties(e);
7688
7705
  }
7689
- _connection = new Ci(this);
7706
+ _connection = new wi(this);
7690
7707
  get connection() {
7691
7708
  return this._connection;
7692
7709
  }
7693
7710
  set connection(e) {
7694
7711
  this._connection.resetProperties().setProperties(e);
7695
7712
  }
7696
- _table = new Bi(this);
7713
+ _table = new Vi(this);
7697
7714
  get table() {
7698
7715
  return this._table;
7699
7716
  }
@@ -7707,7 +7724,7 @@ var Q = {
7707
7724
  set chart(e) {
7708
7725
  this._chart.resetProperties().setProperties(e);
7709
7726
  }
7710
- _comments = new Si(this);
7727
+ _comments = new Ci(this);
7711
7728
  get comments() {
7712
7729
  return this._comments;
7713
7730
  }
@@ -7813,7 +7830,7 @@ var Q = {
7813
7830
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
7814
7831
  break;
7815
7832
  case "transformOrigin": {
7816
- let e = Fr(t ?? "");
7833
+ let e = Ir(t ?? "");
7817
7834
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
7818
7835
  break;
7819
7836
  }
@@ -7857,7 +7874,7 @@ var Q = {
7857
7874
  this.requestDraw();
7858
7875
  break;
7859
7876
  }
7860
- if (($i.has(e) || Qi.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7877
+ if ((ea.has(e) || $i.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7861
7878
  else switch (e) {
7862
7879
  case "left":
7863
7880
  this.position.x = Number(t);
@@ -7901,10 +7918,10 @@ var Q = {
7901
7918
  }
7902
7919
  _intersectsViewport(e) {
7903
7920
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
7904
- for (let [e, c] of ta) t.applyAffineInverse({
7921
+ for (let [e, c] of na) t.applyAffineInverse({
7905
7922
  x: e * n,
7906
7923
  y: c * r
7907
- }, ea), i = Math.min(i, ea.x), a = Math.max(a, ea.x), o = Math.min(o, ea.y), s = Math.max(s, ea.y);
7924
+ }, ta), i = Math.min(i, ta.x), a = Math.max(a, ta.x), o = Math.min(o, ta.y), s = Math.max(s, ta.y);
7908
7925
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
7909
7926
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
7910
7927
  }
@@ -7919,13 +7936,13 @@ var Q = {
7919
7936
  }
7920
7937
  _applyColorFilter() {
7921
7938
  let e = [this._styleFilter, this._elementFilter].filter(Boolean).join(" ").trim();
7922
- e ? (this._colorFilterEffect || (this._colorFilterEffect = new Rr({
7939
+ e ? (this._colorFilterEffect || (this._colorFilterEffect = new zr({
7923
7940
  name: "styleFilter",
7924
7941
  internalMode: "front"
7925
7942
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e) : (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender());
7926
7943
  }
7927
7944
  _updateStyleMaskImage(e) {
7928
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new li({
7945
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new ui({
7929
7946
  name: "styleMaskImage",
7930
7947
  internalMode: "back"
7931
7948
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
@@ -8015,10 +8032,10 @@ var Q = {
8015
8032
  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.comments.destroy(), this._colorFilterEffect = void 0, this._maskEffect = void 0;
8016
8033
  }
8017
8034
  };
8018
- na = A([S("Element2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], na);
8035
+ ra = A([S("Element2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ra);
8019
8036
  //#endregion
8020
8037
  //#region src/scene/2d/TextureRect2D.ts
8021
- var ra = class extends na {
8038
+ var ia = class extends ra {
8022
8039
  texture;
8023
8040
  region;
8024
8041
  constructor(e, t = []) {
@@ -8041,8 +8058,8 @@ var ra = class extends na {
8041
8058
  } });
8042
8059
  }
8043
8060
  }
8044
- }, ia = class extends ra {
8045
- texture = new er();
8061
+ }, aa = class extends ia {
8062
+ texture = new tr();
8046
8063
  animation;
8047
8064
  _lastTime = NaN;
8048
8065
  constructor(e, t = []) {
@@ -8072,10 +8089,10 @@ var ra = class extends na {
8072
8089
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
8073
8090
  }
8074
8091
  };
8075
- A([_({ fallback: "" }), k("design:type", String)], ia.prototype, "src", void 0), ia = A([S("Lottie2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ia);
8092
+ A([_({ fallback: "" }), k("design:type", String)], aa.prototype, "src", void 0), aa = A([S("Lottie2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], aa);
8076
8093
  //#endregion
8077
8094
  //#region src/scene/2d/Mesh2D.ts
8078
- var aa = class extends na {
8095
+ var oa = class extends ra {
8079
8096
  texture;
8080
8097
  _vertices = new Float32Array();
8081
8098
  _uvs = new Float32Array();
@@ -8106,7 +8123,7 @@ var aa = class extends na {
8106
8123
  _drawContent() {
8107
8124
  this.texture?.isValid() && this._indices.length && this._vertices.length && (this.context.fillStyle = this.texture, this.context.drawMesh(this._vertices, this._uvs, this._indices));
8108
8125
  }
8109
- }, oa = class extends na {
8126
+ }, sa = class extends ra {
8110
8127
  constructor(e, t = []) {
8111
8128
  super(), this.setProperties(e).append(t);
8112
8129
  }
@@ -8129,10 +8146,10 @@ var aa = class extends na {
8129
8146
  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);
8130
8147
  }
8131
8148
  };
8132
- A([_({ fallback: 6 }), k("design:type", Number)], oa.prototype, "handleSize", void 0);
8149
+ A([_({ fallback: 6 }), k("design:type", Number)], sa.prototype, "handleSize", void 0);
8133
8150
  //#endregion
8134
8151
  //#region src/scene/2d/Video2D.ts
8135
- var sa = class extends ra {
8152
+ var ca = class extends ia {
8136
8153
  get videoDuration() {
8137
8154
  return (this.texture?.duration ?? 0) * 1e3;
8138
8155
  }
@@ -8181,15 +8198,15 @@ var sa = class extends ra {
8181
8198
  super._process(e), this._updateVideoCurrentTime();
8182
8199
  }
8183
8200
  };
8184
- A([_({ fallback: "" }), k("design:type", String)], sa.prototype, "src", void 0), sa = A([S("Video2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], sa);
8201
+ A([_({ fallback: "" }), k("design:type", String)], ca.prototype, "src", void 0), ca = A([S("Video2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ca);
8185
8202
  //#endregion
8186
8203
  //#region src/scene/animation/Animation.ts
8187
- function ca(e) {
8204
+ function la(e) {
8188
8205
  if (e == null) return 0;
8189
8206
  let t = String(e).trim(), n = Number.parseFloat(t);
8190
8207
  return Number.isNaN(n) ? 0 : n / 100;
8191
8208
  }
8192
- function la(e, t) {
8209
+ function ua(e, t) {
8193
8210
  let n = t * 180 / Math.PI;
8194
8211
  if (e == null || e === "auto") return n;
8195
8212
  let r = String(e).trim();
@@ -8198,11 +8215,11 @@ function la(e, t) {
8198
8215
  let i = Number.parseFloat(r);
8199
8216
  return Number.isNaN(i) ? n : i;
8200
8217
  }
8201
- function ua(e) {
8218
+ function da(e) {
8202
8219
  let t = e.trim(), n = /^path\((.*)\)$/s.exec(t);
8203
8220
  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();
8204
8221
  }
8205
- function da(e, t, n, r) {
8222
+ function fa(e, t, n, r) {
8206
8223
  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;
8207
8224
  function m(e) {
8208
8225
  let t = e, n, r;
@@ -8222,7 +8239,7 @@ function da(e, t, n, r) {
8222
8239
  }
8223
8240
  return (e) => p(m(e));
8224
8241
  }
8225
- var fa = {
8242
+ var pa = {
8226
8243
  linear: [
8227
8244
  0,
8228
8245
  0,
@@ -8289,7 +8306,7 @@ var fa = {
8289
8306
  .355,
8290
8307
  1
8291
8308
  ]
8292
- }, pa = Object.fromEntries(Object.entries(fa).map(([e, [t, n, r, i]]) => [e, da(t, n, r, i)])), ma = class extends H {
8309
+ }, ma = Object.fromEntries(Object.entries(pa).map(([e, [t, n, r, i]]) => [e, fa(t, n, r, i)])), ha = class extends H {
8293
8310
  _keyframes = [];
8294
8311
  _isFirstUpdatePosition = !1;
8295
8312
  _cachedProps = new t();
@@ -8325,7 +8342,7 @@ var fa = {
8325
8342
  e = [this.getParent()].filter(Boolean);
8326
8343
  break;
8327
8344
  }
8328
- return e.filter((e) => e instanceof na);
8345
+ return e.filter((e) => e instanceof ra);
8329
8346
  }
8330
8347
  _updateKeyframes() {
8331
8348
  this._pathMeasures.clear();
@@ -8376,14 +8393,14 @@ var fa = {
8376
8393
  });
8377
8394
  }
8378
8395
  _parseEasing(e) {
8379
- if (!e) return pa.linear;
8380
- if (e in pa) return pa[e];
8396
+ if (!e) return ma.linear;
8397
+ if (e in ma) return ma[e];
8381
8398
  let t = /cubic-bezier\((.+)\)/.exec(e);
8382
8399
  if (t) {
8383
8400
  let e = t[1].split(",").map((e) => Number(e));
8384
- if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return da(e[0], e[1], e[2], e[3]);
8401
+ if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return fa(e[0], e[1], e[2], e[3]);
8385
8402
  }
8386
- return pa.linear;
8403
+ return ma.linear;
8387
8404
  }
8388
8405
  _parseKeyframes(e, t) {
8389
8406
  let n, r = this._keyframes;
@@ -8418,7 +8435,7 @@ var fa = {
8418
8435
  });
8419
8436
  }
8420
8437
  _commitOffsetPath(e, t, n, r, i, a) {
8421
- let o = ua(t);
8438
+ let o = da(t);
8422
8439
  if (!o) return;
8423
8440
  let s = this._pathMeasures.get(o);
8424
8441
  if (!s) {
@@ -8429,7 +8446,7 @@ var fa = {
8429
8446
  startY: t.y
8430
8447
  }, this._pathMeasures.set(o, s);
8431
8448
  }
8432
- let c = D(O(ca(r.offsetDistance ?? i.offsetDistance), ca(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 = la(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8449
+ let c = D(O(la(r.offsetDistance ?? i.offsetDistance), la(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 = ua(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8433
8450
  e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
8434
8451
  }
8435
8452
  _getDiffValue(e, t, n, r, i) {
@@ -8476,14 +8493,14 @@ var fa = {
8476
8493
  });
8477
8494
  }
8478
8495
  };
8479
- A([_({ fallback: "parent" }), k("design:type", Object)], ma.prototype, "effectMode", void 0), A([_({ default: () => [] }), k("design:type", Array)], ma.prototype, "keyframes", void 0), A([_(), k("design:type", Object)], ma.prototype, "easing", void 0), ma = A([S("Animation", {
8496
+ A([_({ fallback: "parent" }), k("design:type", Object)], ha.prototype, "effectMode", void 0), A([_({ default: () => [] }), k("design:type", Array)], ha.prototype, "keyframes", void 0), A([_(), k("design:type", Object)], ha.prototype, "easing", void 0), ha = A([S("Animation", {
8480
8497
  renderMode: "disabled",
8481
8498
  processSortMode: "parent-before",
8482
8499
  duration: 2e3
8483
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ma);
8500
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ha);
8484
8501
  //#endregion
8485
8502
  //#region src/scene/audio/html/HTMLAudioContext.ts
8486
- var ha = class t extends e {
8503
+ var ga = class t extends e {
8487
8504
  static _instance;
8488
8505
  static get instance() {
8489
8506
  return this._instance ||= new t(), this._instance;
@@ -8513,7 +8530,7 @@ var ha = class t extends e {
8513
8530
  togglePause() {
8514
8531
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
8515
8532
  }
8516
- }, ga = class t extends e {
8533
+ }, _a = class t extends e {
8517
8534
  static PADDING = .1;
8518
8535
  _source = null;
8519
8536
  _audio = null;
@@ -8640,7 +8657,7 @@ var ha = class t extends e {
8640
8657
  let e = this._source;
8641
8658
  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);
8642
8659
  }
8643
- }, _a = class {
8660
+ }, va = class {
8644
8661
  parent;
8645
8662
  source = new globalThis.Audio();
8646
8663
  _src = "";
@@ -8657,7 +8674,7 @@ var ha = class t extends e {
8657
8674
  return !!this.source && this.source.readyState === 4;
8658
8675
  }
8659
8676
  get context() {
8660
- return ha.instance;
8677
+ return ga.instance;
8661
8678
  }
8662
8679
  constructor(e) {
8663
8680
  this.parent = e;
@@ -8668,9 +8685,9 @@ var ha = class t extends e {
8668
8685
  });
8669
8686
  }
8670
8687
  createSound() {
8671
- return new ga();
8688
+ return new _a();
8672
8689
  }
8673
- }, va = class extends e {
8690
+ }, ya = class extends e {
8674
8691
  _input;
8675
8692
  _output;
8676
8693
  _processers = [];
@@ -8692,7 +8709,7 @@ var ha = class t extends e {
8692
8709
  get destination() {
8693
8710
  return this._input;
8694
8711
  }
8695
- }, ya = class {
8712
+ }, ba = class {
8696
8713
  destination;
8697
8714
  source;
8698
8715
  constructor(e, t = null) {
@@ -8707,21 +8724,21 @@ var ha = class t extends e {
8707
8724
  };
8708
8725
  //#endregion
8709
8726
  //#region src/scene/audio/web/WebAudioContext.ts
8710
- function ba() {
8727
+ function xa() {
8711
8728
  if (Ve) return new AudioContext();
8712
8729
  if (He) {
8713
8730
  let e = globalThis.webkitAudioContext;
8714
8731
  return new e();
8715
8732
  } else throw Error("Failed to createAudioContext");
8716
8733
  }
8717
- function xa(e, t, n) {
8734
+ function Sa(e, t, n) {
8718
8735
  if (Ue) return new OfflineAudioContext(e, t, n);
8719
8736
  if (We) {
8720
8737
  let r = globalThis.webkitOfflineAudioContext;
8721
8738
  return new r(e, t, n);
8722
8739
  } else throw Error("Failed to createOfflineAudioContext");
8723
8740
  }
8724
- var Sa = class e extends va {
8741
+ var Ca = class e extends ya {
8725
8742
  static _instance;
8726
8743
  static get instance() {
8727
8744
  return this._instance ||= new e(), this._instance;
@@ -8762,7 +8779,7 @@ var Sa = class e extends va {
8762
8779
  _compressor;
8763
8780
  _analyser;
8764
8781
  constructor() {
8765
- let e = ba(), t = xa(1, 2, Ue ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8782
+ let e = xa(), t = Sa(1, 2, Ue ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8766
8783
  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));
8767
8784
  }
8768
8785
  _onFocus() {
@@ -8803,7 +8820,7 @@ var Sa = class e extends va {
8803
8820
  setParamValue(e, t) {
8804
8821
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
8805
8822
  }
8806
- }, Ca = class extends e {
8823
+ }, wa = class extends e {
8807
8824
  _audio = null;
8808
8825
  _sourceNode = null;
8809
8826
  _gain = null;
@@ -8936,7 +8953,7 @@ var Sa = class e extends va {
8936
8953
  destroy() {
8937
8954
  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;
8938
8955
  }
8939
- }, wa = class extends va {
8956
+ }, Ta = class extends ya {
8940
8957
  parent;
8941
8958
  _sourceBuffer;
8942
8959
  _sourceNode;
@@ -8944,7 +8961,7 @@ var Sa = class e extends va {
8944
8961
  gain;
8945
8962
  analyser;
8946
8963
  get context() {
8947
- return Sa.instance;
8964
+ return Ca.instance;
8948
8965
  }
8949
8966
  get isPlayable() {
8950
8967
  return !!this._sourceNode.buffer;
@@ -8959,8 +8976,8 @@ var Sa = class e extends va {
8959
8976
  this._sourceNode.buffer = e;
8960
8977
  }
8961
8978
  constructor(e) {
8962
- let t = Sa.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8963
- n.connect(i), i.connect(r), r.connect(Sa.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8979
+ let t = Ca.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8980
+ 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;
8964
8981
  }
8965
8982
  async load() {
8966
8983
  return this._sourceLoad ||= new Promise((e) => {
@@ -8973,7 +8990,7 @@ var Sa = class e extends va {
8973
8990
  });
8974
8991
  }
8975
8992
  _decode(e) {
8976
- return Promise.resolve(e instanceof AudioBuffer ? e : Sa.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8993
+ return Promise.resolve(e instanceof AudioBuffer ? e : Ca.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8977
8994
  }
8978
8995
  cloneSource() {
8979
8996
  let e = this.context, t = this._sourceNode, n = e.audioContext.createBufferSource(), r = e.audioContext.createGain();
@@ -8983,15 +9000,15 @@ var Sa = class e extends va {
8983
9000
  };
8984
9001
  }
8985
9002
  createSound() {
8986
- return new Ca();
9003
+ return new wa();
8987
9004
  }
8988
- }, Ta, Ea = class extends H {
9005
+ }, Ea, Da = class extends H {
8989
9006
  static {
8990
- Ta = this;
9007
+ Ea = this;
8991
9008
  }
8992
9009
  static _soundPool = [];
8993
9010
  _sounds = [];
8994
- _platformAudio = Ge ? new wa(this) : new _a(this);
9011
+ _platformAudio = Ge ? new Ta(this) : new va(this);
8995
9012
  get platformAudio() {
8996
9013
  return this._platformAudio;
8997
9014
  }
@@ -9084,7 +9101,7 @@ var Sa = class e extends va {
9084
9101
  this._sounds.length = 0;
9085
9102
  }
9086
9103
  _createSound() {
9087
- return Ta._soundPool.length > 0 ? Ta._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9104
+ return Ea._soundPool.length > 0 ? Ea._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9088
9105
  }
9089
9106
  refresh() {
9090
9107
  for (let e = this._sounds.length, t = 0; t < e; t++) this._sounds[t].refresh();
@@ -9100,7 +9117,7 @@ var Sa = class e extends va {
9100
9117
  this._recycleSound(e);
9101
9118
  };
9102
9119
  _recycleSound(e) {
9103
- e.destroy(), Ta._soundPool.includes(e) || Ta._soundPool.push(e);
9120
+ e.destroy(), Ea._soundPool.includes(e) || Ea._soundPool.push(e);
9104
9121
  }
9105
9122
  _prevTime = 0;
9106
9123
  _timer = 0;
@@ -9116,10 +9133,10 @@ var Sa = class e extends va {
9116
9133
  }, 100);
9117
9134
  }
9118
9135
  };
9119
- Ea = Ta = A([S("Audio"), k("design:paramtypes", [Object])], Ea);
9136
+ Da = Ea = A([S("Audio"), k("design:paramtypes", [Object])], Da);
9120
9137
  //#endregion
9121
9138
  //#region src/scene/audio/AudioSpectrum.ts
9122
- var Da = class extends wr {}, Oa = class extends na {
9139
+ var Oa = class extends Tr {}, ka = class extends ra {
9123
9140
  _audioBuffer;
9124
9141
  _src = (() => {
9125
9142
  let e = w();
@@ -9143,7 +9160,7 @@ var Da = class extends wr {}, Oa = class extends na {
9143
9160
  }
9144
9161
  }
9145
9162
  async _loadSrc(e) {
9146
- await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => Sa.decode(e)).then((e) => {
9163
+ await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => Ca.decode(e)).then((e) => {
9147
9164
  this._audioBuffer = e, this.syncTexture(!0);
9148
9165
  });
9149
9166
  }
@@ -9178,12 +9195,12 @@ var Da = class extends wr {}, Oa = class extends na {
9178
9195
  this.syncTexture(), super._process(e);
9179
9196
  }
9180
9197
  };
9181
- A([_(), k("design:type", Object)], Oa.prototype, "src", void 0), A([_({ fallback: 0 }), k("design:type", Number)], Oa.prototype, "gap", void 0), A([_({ fallback: "#000000" }), k("design:type", String)], Oa.prototype, "color", void 0), Oa = A([S("AudioWaveform"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Oa);
9198
+ A([_(), k("design:type", Object)], ka.prototype, "src", void 0), A([_({ fallback: 0 }), k("design:type", Number)], ka.prototype, "gap", void 0), A([_({ fallback: "#000000" }), k("design:type", String)], ka.prototype, "color", void 0), ka = A([S("AudioWaveform"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], ka);
9182
9199
  //#endregion
9183
9200
  //#region src/scene/transitions/KawaseTransition.ts
9184
- var ka, Aa = class extends Cr {
9201
+ var Aa, ja = class extends wr {
9185
9202
  static {
9186
- ka = this;
9203
+ Aa = this;
9187
9204
  }
9188
9205
  blur = 10;
9189
9206
  quality = 10;
@@ -9202,7 +9219,7 @@ var ka, Aa = class extends Cr {
9202
9219
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
9203
9220
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
9204
9221
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
9205
- R.draw(e, ka.material, {
9222
+ R.draw(e, Aa.material, {
9206
9223
  sampler: r,
9207
9224
  progress: i,
9208
9225
  ...t
@@ -9210,31 +9227,31 @@ var ka, Aa = class extends Cr {
9210
9227
  });
9211
9228
  }
9212
9229
  };
9213
- Aa = ka = A([S("KawaseTransition")], Aa);
9230
+ ja = Aa = A([S("KawaseTransition")], ja);
9214
9231
  //#endregion
9215
9232
  //#region src/scene/transitions/LeftEraseTransition.ts
9216
- var ja, Ma = class extends Cr {
9233
+ var Ma, Na = class extends wr {
9217
9234
  static {
9218
- ja = this;
9235
+ Ma = this;
9219
9236
  }
9220
9237
  static material = new L({ gl: {
9221
9238
  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}",
9222
9239
  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}"
9223
9240
  } });
9224
9241
  apply(e) {
9225
- R.draw(e, ja.material, {
9242
+ R.draw(e, Ma.material, {
9226
9243
  previous: 0,
9227
9244
  next: 1,
9228
9245
  progress: this.currentTimeProgress
9229
9246
  });
9230
9247
  }
9231
9248
  };
9232
- Ma = ja = A([S("LeftEraseTransition")], Ma);
9249
+ Na = Ma = A([S("LeftEraseTransition")], Na);
9233
9250
  //#endregion
9234
9251
  //#region src/scene/transitions/TiltShiftTransition.ts
9235
- var Na, Pa = class extends Cr {
9252
+ var Pa, Fa = class extends wr {
9236
9253
  static {
9237
- Na = this;
9254
+ Pa = this;
9238
9255
  }
9239
9256
  blur = 100;
9240
9257
  gradientBlur = 600;
@@ -9246,7 +9263,7 @@ var Na, Pa = class extends Cr {
9246
9263
  let n = this.currentTimeProgress, r, i;
9247
9264
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9248
9265
  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);
9249
- R.draw(e, Na.material, {
9266
+ R.draw(e, Pa.material, {
9250
9267
  sampler: r,
9251
9268
  progress: i,
9252
9269
  blur: this.blur,
@@ -9255,7 +9272,7 @@ var Na, Pa = class extends Cr {
9255
9272
  end: c,
9256
9273
  delta: [u / f, d / f],
9257
9274
  texSize: l
9258
- }), R.draw(e, Na.material, {
9275
+ }), R.draw(e, Pa.material, {
9259
9276
  sampler: r,
9260
9277
  progress: i,
9261
9278
  blur: this.blur,
@@ -9267,12 +9284,12 @@ var Na, Pa = class extends Cr {
9267
9284
  });
9268
9285
  }
9269
9286
  };
9270
- Pa = Na = A([S("TiltShiftTransition")], Pa);
9287
+ Fa = Pa = A([S("TiltShiftTransition")], Fa);
9271
9288
  //#endregion
9272
9289
  //#region src/scene/transitions/TwistTransition.ts
9273
- var Fa, Ia = class extends Cr {
9290
+ var Ia, La = class extends wr {
9274
9291
  static {
9275
- Fa = this;
9292
+ Ia = this;
9276
9293
  }
9277
9294
  radius;
9278
9295
  angle = 4;
@@ -9286,7 +9303,7 @@ var Fa, Ia = class extends Cr {
9286
9303
  let n = this.currentTimeProgress, r, i;
9287
9304
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9288
9305
  let a = t.width, o = t.height;
9289
- R.draw(e, Fa.material, {
9306
+ R.draw(e, Ia.material, {
9290
9307
  sampler: r,
9291
9308
  progress: i,
9292
9309
  filterArea: [
@@ -9302,16 +9319,16 @@ var Fa, Ia = class extends Cr {
9302
9319
  });
9303
9320
  }
9304
9321
  };
9305
- Ia = Fa = A([S("TwistTransition")], Ia);
9322
+ La = Ia = A([S("TwistTransition")], La);
9306
9323
  //#endregion
9307
9324
  //#region src/asset/loaders/GifLoader.ts
9308
- var La = class extends Vn {
9325
+ var Ra = class extends Hn {
9309
9326
  install(e) {
9310
9327
  let t = async (t) => {
9311
9328
  let { decodeFrames: n } = await import("modern-gif");
9312
- return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new $n(e.map((e) => ({
9329
+ return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new er(e.map((e) => ({
9313
9330
  duration: e.delay,
9314
- texture: new rr({
9331
+ texture: new ir({
9315
9332
  source: e.data,
9316
9333
  width: e.width,
9317
9334
  height: e.height
@@ -9322,14 +9339,14 @@ var La = class extends Vn {
9322
9339
  e.register(n, t);
9323
9340
  }), e.gif = this, this;
9324
9341
  }
9325
- }, Ra = class extends Vn {
9342
+ }, za = class extends Hn {
9326
9343
  install(e) {
9327
9344
  let t = async (e) => JSON.parse(await e.text());
9328
9345
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9329
9346
  e.register(n, t);
9330
9347
  }), e.json = this, this;
9331
9348
  }
9332
- }, za = class extends Vn {
9349
+ }, Ba = class extends Hn {
9333
9350
  install(e) {
9334
9351
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9335
9352
  container: null,
@@ -9340,12 +9357,12 @@ var La = class extends Vn {
9340
9357
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9341
9358
  }), e.lottie = this, this;
9342
9359
  }
9343
- }, Ba = class extends Vn {
9360
+ }, Va = class extends Hn {
9344
9361
  install(e) {
9345
9362
  let t = async (e) => e.text();
9346
9363
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9347
9364
  }
9348
- }, Va = class extends Vn {
9365
+ }, Ha = class extends Hn {
9349
9366
  install(e) {
9350
9367
  let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new B({
9351
9368
  source: e,
@@ -9369,11 +9386,11 @@ var La = class extends Vn {
9369
9386
  e.register(n, t);
9370
9387
  }), e.texture = this, this;
9371
9388
  }
9372
- }, Ha = class extends Vn {
9389
+ }, Ua = class extends Hn {
9373
9390
  install(e) {
9374
- return this.load = (t) => e.awaitBy(() => new ar(t).load()), e.video = this, this;
9391
+ return this.load = (t) => e.awaitBy(() => new or(t).load()), e.video = this, this;
9375
9392
  }
9376
- }, Ua = Object.entries({
9393
+ }, Wa = Object.entries({
9377
9394
  "font/woff": ["woff"],
9378
9395
  "font/ttf": ["ttf"],
9379
9396
  "font/otf": ["otf"],
@@ -9389,31 +9406,31 @@ var La = class extends Vn {
9389
9406
  "image/webp": ["webp"],
9390
9407
  "application/json": ["json"]
9391
9408
  });
9392
- function Wa(e) {
9393
- for (let [t, n] of Ua) if (n.includes(e)) return t;
9394
- }
9395
9409
  function Ga(e) {
9410
+ for (let [t, n] of Wa) if (n.includes(e)) return t;
9411
+ }
9412
+ function Ka(e) {
9396
9413
  let t;
9397
9414
  if (e.startsWith("data:")) t = e.match(/^data:(.+?);/)?.[1];
9398
9415
  else if (e.startsWith("http")) {
9399
9416
  let n = e.split(/[#?]/)[0].split(".").pop()?.trim();
9400
- n && (t = Wa(n));
9417
+ n && (t = Ga(n));
9401
9418
  }
9402
9419
  return t;
9403
9420
  }
9404
9421
  //#endregion
9405
9422
  //#region src/asset/Assets.ts
9406
- var Ka = "WeakRef" in globalThis, qa = class extends e {
9423
+ var qa = "WeakRef" in globalThis, Ja = class extends e {
9407
9424
  defaultHandler = (e) => e;
9408
9425
  _handlers = /* @__PURE__ */ new Map();
9409
9426
  _handleing = /* @__PURE__ */ new Map();
9410
9427
  _handled = /* @__PURE__ */ new Map();
9411
- _gc = Ka ? new FinalizationRegistry((e) => {
9428
+ _gc = qa ? new FinalizationRegistry((e) => {
9412
9429
  let t = this.get(e);
9413
9430
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
9414
9431
  }) : void 0;
9415
9432
  constructor() {
9416
- super(), Ka || C.on(this.gc.bind(this), { sort: 2 });
9433
+ super(), qa || C.on(this.gc.bind(this), { sort: 2 });
9417
9434
  }
9418
9435
  use(e) {
9419
9436
  return e.install(this), this;
@@ -9462,11 +9479,11 @@ var Ka = "WeakRef" in globalThis, qa = class extends e {
9462
9479
  }
9463
9480
  get(e) {
9464
9481
  let t = this._handled.get(e);
9465
- return Ka && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9482
+ return qa && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9466
9483
  }
9467
9484
  set(e, t) {
9468
9485
  let n = t;
9469
- Ka && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9486
+ qa && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9470
9487
  }
9471
9488
  async awaitBy(e) {
9472
9489
  let t = e(), n = c();
@@ -9481,7 +9498,7 @@ var Ka = "WeakRef" in globalThis, qa = class extends e {
9481
9498
  return this._handleing.set(e, r), r;
9482
9499
  }
9483
9500
  async load(e, t) {
9484
- let n = await this.loadBy(e), r = Ga(e);
9501
+ let n = await this.loadBy(e), r = Ka(e);
9485
9502
  return r === void 0 && (r = n.type?.split(";")[0] ?? void 0), ((r ? this._handlers.get(r) : void 0) ?? this.defaultHandler)(n, t);
9486
9503
  }
9487
9504
  async waitUntilLoad() {
@@ -9495,14 +9512,14 @@ var Ka = "WeakRef" in globalThis, qa = class extends e {
9495
9512
  n && "destroy" in n && n.destroy();
9496
9513
  }), this._handled.clear();
9497
9514
  }
9498
- }, $ = new qa().use(new Hn()).use(new La()).use(new Ra()).use(new za()).use(new Ba()).use(new Va()).use(new Ha()), Ja = {
9515
+ }, $ = new Ja().use(new Un()).use(new Ra()).use(new za()).use(new Ba()).use(new Va()).use(new Ha()).use(new Ua()), Ya = {
9499
9516
  alpha: !0,
9500
9517
  stencil: !0,
9501
9518
  antialias: !1,
9502
9519
  premultipliedAlpha: !0,
9503
9520
  preserveDrawingBuffer: !1,
9504
9521
  powerPreference: "default"
9505
- }, Ya = class extends Sr {
9522
+ }, Xa = class extends Cr {
9506
9523
  renderer;
9507
9524
  get view() {
9508
9525
  return this.renderer.view;
@@ -9534,13 +9551,13 @@ var Ka = "WeakRef" in globalThis, qa = class extends e {
9534
9551
  }) : void 0;
9535
9552
  constructor(e = {}) {
9536
9553
  let { view: t, width: n, height: r, pixelRatio: i = Je, autoResize: a, data: o } = e;
9537
- super(), this.renderer = new Bn(t, {
9538
- alpha: Ja.alpha ?? e.alpha,
9539
- stencil: Ja.stencil ?? e.stencil,
9540
- antialias: Ja.antialias ?? e.antialias,
9541
- premultipliedAlpha: Ja.premultipliedAlpha ?? e.premultipliedAlpha,
9542
- preserveDrawingBuffer: Ja.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9543
- powerPreference: Ja.powerPreference ?? e.powerPreference
9554
+ super(), this.renderer = new Vn(t, {
9555
+ alpha: Ya.alpha ?? e.alpha,
9556
+ stencil: Ya.stencil ?? e.stencil,
9557
+ antialias: Ya.antialias ?? e.antialias,
9558
+ premultipliedAlpha: Ya.premultipliedAlpha ?? e.premultipliedAlpha,
9559
+ preserveDrawingBuffer: Ya.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9560
+ powerPreference: Ya.powerPreference ?? e.powerPreference
9544
9561
  }), 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);
9545
9562
  }
9546
9563
  _updateProperty(e, t, n) {
@@ -9623,22 +9640,22 @@ var Ka = "WeakRef" in globalThis, qa = class extends e {
9623
9640
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
9624
9641
  }
9625
9642
  };
9626
- A([_({ fallback: !1 }), k("design:type", Boolean)], Ya.prototype, "autoResize", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Ya.prototype, "autoStart", void 0);
9643
+ A([_({ fallback: !1 }), k("design:type", Boolean)], Xa.prototype, "autoResize", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Xa.prototype, "autoStart", void 0);
9627
9644
  //#endregion
9628
9645
  //#region src/render.ts
9629
- var Xa, Za = [], Qa = !1;
9630
- function $a() {
9631
- return Xa ??= new Ya({
9646
+ var Za, Qa = [], $a = !1;
9647
+ function eo() {
9648
+ return Za ??= new Xa({
9632
9649
  pixelRatio: 1,
9633
9650
  width: 1,
9634
9651
  height: 1,
9635
9652
  preserveDrawingBuffer: !0
9636
9653
  });
9637
9654
  }
9638
- async function eo(e = 100) {
9639
- if (!Qa) {
9640
- for (Qa = !0; Za.length;) {
9641
- let t = Za.shift();
9655
+ async function to(e = 100) {
9656
+ if (!$a) {
9657
+ for ($a = !0; Qa.length;) {
9658
+ let t = Qa.shift();
9642
9659
  if (t) try {
9643
9660
  await t();
9644
9661
  } catch (e) {
@@ -9646,11 +9663,11 @@ async function eo(e = 100) {
9646
9663
  }
9647
9664
  else await new Promise((t) => setTimeout(t, e));
9648
9665
  }
9649
- Qa = !1;
9666
+ $a = !1;
9650
9667
  }
9651
9668
  }
9652
- async function to(e) {
9653
- 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 = $a();
9669
+ async function no(e) {
9670
+ 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();
9654
9671
  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) {
9655
9672
  let e = o.length, t = o[e - 1];
9656
9673
  for (let n = 0; n < e; n++) {
@@ -9668,15 +9685,15 @@ async function to(e) {
9668
9685
  toCanvas2D: () => f.toCanvas2D(new ImageData(p, u, d))
9669
9686
  };
9670
9687
  }
9671
- async function no(e) {
9688
+ async function ro(e) {
9672
9689
  return new Promise((t) => {
9673
- Za.push(async () => t(await to(e).then((e) => e.toCanvas2D()))), eo();
9690
+ Qa.push(async () => t(await no(e).then((e) => e.toCanvas2D()))), to();
9674
9691
  });
9675
9692
  }
9676
- async function ro(e) {
9693
+ async function io(e) {
9677
9694
  return new Promise((t) => {
9678
- Za.push(async () => t(await to(e).then((e) => e.pixels))), eo();
9695
+ Qa.push(async () => t(await no(e).then((e) => e.pixels))), to();
9679
9696
  });
9680
9697
  }
9681
9698
  //#endregion
9682
- export { yt as Aabb2D, $n as AnimatedTexture, ma as Animation, qa as Assets, Ea as Audio, va as AudioPipeline, ya as AudioProcessor, Da as AudioSpectrum, Oa as AudioWaveform, j as BufferUsage, Tr as Camera2D, sr as CanvasContext, _r as CanvasItem, er as CanvasTexture, E as Color, G as ColorAdjustEffect, Rr as ColorFilterEffect, St as ColorMatrix, Vr as ColorOverlayEffect, Ur as ColorRemoveEffect, Kr as ColorReplaceEffect, tr as ColorTexture, T as CoreObject, bt as DEG_TO_RAD, Je as DEVICE_PIXEL_RATIO, K as DrawboardEffect, $r as DropShadowEffect, W as Effect, Xn as EffectMaterial, na as Element2D, vi as Element2DBackground, X as Element2DChart, Si as Element2DComments, Ci as Element2DConnection, Y as Element2DFill, ji as Element2DForeground, Ni as Element2DOutline, Pi as Element2DShadow, Fi as Element2DShape, Ii as Element2DStyle, Bi as Element2DTable, Z as Element2DText, ti as EmbossEffect, Ya as Engine, Zi as Flexbox, Hn as FontLoader, Zr as GaussianBlurEffect, Wn as Geometry, La 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, M as GlSystem, gn as GlViewportSystem, q as GlitchEffect, J as GodrayEffect, nr as GradientTexture, _a as HTMLAudio, ha as HTMLAudioContext, ga as HTMLSound, Ke as IN_BROWSER, qe as IN_MAC_OS, Un as IndexBuffer, gt as Input, ut as InputEvent, Ra as JsonLoader, si as KawaseBlurEffect, Aa as KawaseTransition, dt as KeyboardInputEvent, Ma as LeftEraseTransition, Vn as Loader, ia as Lottie2D, za as LottieLoader, Tt as MainLoop, li as MaskEffect, L as Material, aa as Mesh2D, lr as Meta, ft as MouseInputEvent, V as Node, wr as Node2D, Ct as Obb2D, fi as OutlineEffect, xe as PI, Se as PI_2, mi as PixelateEffect, rr as PixelsTexture, pt as PointerInputEvent, wt as Projection2D, Gn as QuadGeometry, R as QuadUvGeometry, xt as RAD_TO_DEG, _t as RefCounted, z as RenderTarget, Ot as Renderer, vt 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, Ba as TextLoader, B as Texture2D, Va as TextureLoader, ra as TextureRect2D, C as Ticker, Pa as TiltShiftTransition, br as Timeline, H as TimelineNode, oa as TransformRect2D, Cr as Transition, Ia as TwistTransition, At as UniformGroup, Qn as UvGeometry, Zn as UvMaterial, I as VertexAttribute, F as VertexBuffer, sa as Video2D, Ha as VideoLoader, ar as VideoTexture, U as Viewport, or as ViewportTexture, wa as WebAudio, Sa as WebAudioContext, Bn as WebGLRenderer, Ca as WebSound, mt as WheelInputEvent, xr as Window, gi as ZoomBlurEffect, Hi as alignMap, $ as assets, Er as axisDir, Xi as boxSizingMap, D as clamp, oi as clampFrag, w as createHTMLCanvas, Nt as createIdFromString, ye as createNode, st as crossOrigin, fa as cssEasingPresets, da as cubicBezier, S as customNode, ve as customNodes, Ja as defaultOptions, ot as determineCrossOrigin, Wi as directionMap, Ui as displayMap, Q as edgeMap, Gi as flexDirectionMap, Ki as flexWrapMap, ai as frag, nt as getCanvasFactory, De as getDefaultCssPropertyValue, at as getGlContextProvider, $a as getRenderEngine, Vi as gutterMap, lt as instanceId, Qe as isCanvasElement, Ye as isElementNode, Ze as isImageElement, Ce as isPow2, Xe as isVideoElement, $e as isWebgl2, qi as justifyMap, O as lerp, dn as log2, on as mapGlBlendModes, un as nextPow2, be as nextTick, Ji as overflowMap, Pr as parseCssFilter, ke as parseCssFunctions, Oe as parseCssProperty, Fr as parseCssTransformOrigin, Yi as positionTypeMap, no as render, ro as renderPixels, hr as resetBatchPool, Dr as routeConnection, tt as setCanvasFactory, it as setGlContextProvider, mn as stencilModeMap };
9699
+ export { yt as Aabb2D, er as AnimatedTexture, ha as Animation, Ja as Assets, Da as Audio, ya as AudioPipeline, ba as AudioProcessor, Oa as AudioSpectrum, ka as AudioWaveform, j as BufferUsage, Er as Camera2D, cr as CanvasContext, vr as CanvasItem, tr as CanvasTexture, E as Color, G as ColorAdjustEffect, zr as ColorFilterEffect, St as ColorMatrix, Hr as ColorOverlayEffect, Wr as ColorRemoveEffect, qr as ColorReplaceEffect, nr as ColorTexture, T as CoreObject, bt as DEG_TO_RAD, Je as DEVICE_PIXEL_RATIO, K as DrawboardEffect, ei as DropShadowEffect, W as Effect, Zn as EffectMaterial, ra as Element2D, yi as Element2DBackground, X as Element2DChart, Ci as Element2DComments, wi as Element2DConnection, Y as Element2DFill, Mi as Element2DForeground, Pi as Element2DOutline, Fi as Element2DShadow, Ii as Element2DShape, Li as Element2DStyle, Vi as Element2DTable, Z as Element2DText, ni as EmbossEffect, Xa as Engine, Qi as Flexbox, Un as FontLoader, Qr as GaussianBlurEffect, Gn 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, M as GlSystem, gn as GlViewportSystem, q as GlitchEffect, J as GodrayEffect, rr as GradientTexture, va as HTMLAudio, ga as HTMLAudioContext, _a as HTMLSound, Ke as IN_BROWSER, qe as IN_MAC_OS, Wn as IndexBuffer, gt as Input, ut as InputEvent, za as JsonLoader, ci as KawaseBlurEffect, ja as KawaseTransition, dt as KeyboardInputEvent, Na as LeftEraseTransition, Hn as Loader, aa as Lottie2D, Ba as LottieLoader, Tt as MainLoop, ui as MaskEffect, L as Material, oa as Mesh2D, ur as Meta, ft as MouseInputEvent, V as Node, Tr as Node2D, Ct as Obb2D, pi as OutlineEffect, xe as PI, Se as PI_2, hi as PixelateEffect, ir as PixelsTexture, pt as PointerInputEvent, wt as Projection2D, Kn as QuadGeometry, R as QuadUvGeometry, xt as RAD_TO_DEG, _t as RefCounted, z as RenderTarget, Ot as Renderer, vt 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, Cr as SceneTree, Va as TextLoader, B as Texture2D, Ha as TextureLoader, ia as TextureRect2D, C as Ticker, Fa as TiltShiftTransition, xr as Timeline, H as TimelineNode, sa as TransformRect2D, wr as Transition, La as TwistTransition, At as UniformGroup, $n as UvGeometry, Qn as UvMaterial, I as VertexAttribute, F as VertexBuffer, ca as Video2D, Ua as VideoLoader, or as VideoTexture, U as Viewport, sr as ViewportTexture, Ta as WebAudio, Ca as WebAudioContext, Vn as WebGLRenderer, wa as WebSound, mt as WheelInputEvent, Sr as Window, _i as ZoomBlurEffect, Ui as alignMap, $ as assets, Dr as axisDir, Zi as boxSizingMap, D as clamp, si as clampFrag, w as createHTMLCanvas, Nt as createIdFromString, ye as createNode, st as crossOrigin, pa as cssEasingPresets, fa as cubicBezier, S as customNode, ve as customNodes, Ya as defaultOptions, ot as determineCrossOrigin, Gi as directionMap, Wi as displayMap, Q as edgeMap, Ki as flexDirectionMap, qi as flexWrapMap, oi as frag, nt as getCanvasFactory, De as getDefaultCssPropertyValue, at as getGlContextProvider, eo as getRenderEngine, Hi as gutterMap, lt as instanceId, Qe as isCanvasElement, Ye as isElementNode, Ze as isImageElement, Ce as isPow2, Xe as isVideoElement, $e as isWebgl2, Ji as justifyMap, O as lerp, dn as log2, on as mapGlBlendModes, un as nextPow2, be as nextTick, Yi as overflowMap, Fr as parseCssFilter, ke as parseCssFunctions, Oe as parseCssProperty, Ir as parseCssTransformOrigin, Xi as positionTypeMap, ro as render, io as renderPixels, gr as resetBatchPool, Or as routeConnection, tt as setCanvasFactory, it as setGlContextProvider, mn as stencilModeMap };