@codingfactory/mediables-vue 2.3.4 → 2.3.5

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.
@@ -1,10 +1,10 @@
1
- var ge = Object.defineProperty;
2
- var be = (s, e, t) => e in s ? ge(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var V = (s, e, t) => be(s, typeof e != "symbol" ? e + "" : e, t);
1
+ var me = Object.defineProperty;
2
+ var ge = (s, e, t) => e in s ? me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var V = (s, e, t) => ge(s, typeof e != "symbol" ? e + "" : e, t);
4
4
  import * as g from "pixi-filters";
5
5
  import * as w from "pixi.js";
6
- import { GlProgram as ye } from "pixi.js";
7
- class O {
6
+ import { GlProgram as be } from "pixi.js";
7
+ class B {
8
8
  constructor() {
9
9
  this._events = /* @__PURE__ */ new Map();
10
10
  }
@@ -34,7 +34,7 @@ class O {
34
34
  e ? this._events.delete(e) : this._events.clear();
35
35
  }
36
36
  }
37
- class _e extends O {
37
+ class ye extends B {
38
38
  constructor() {
39
39
  super(), this._state = {
40
40
  // Image state
@@ -160,10 +160,10 @@ class _e extends O {
160
160
  this.set("isDarkMode", this._state.theme === "dark");
161
161
  }
162
162
  }
163
- function xe() {
164
- return new _e();
163
+ function _e() {
164
+ return new ye();
165
165
  }
166
- class Ce extends O {
166
+ class xe extends B {
167
167
  constructor() {
168
168
  super(), this.app = null, this.sprite = null, this.originalTexture = null, this.baseTexture = null, this.fitScale = 1, this.zoom = 1, this._container = null, this._mountPromise = null;
169
169
  }
@@ -284,41 +284,40 @@ class Ce extends O {
284
284
  * @returns {string|null} Data URL
285
285
  */
286
286
  exportImage(e = "png", t = 0.92, i = 0, r = !0) {
287
- var _;
288
- if (!((_ = this.app) != null && _.renderer) || !this.originalTexture || !this.sprite)
287
+ var y;
288
+ if (!((y = this.app) != null && y.renderer) || !this.originalTexture || !this.sprite)
289
289
  return null;
290
290
  const a = window.PIXI, o = Math.round(this.originalTexture.width), n = Math.round(this.originalTexture.height);
291
291
  if (o <= 0 || n <= 0)
292
292
  return null;
293
293
  let l = o, c = n;
294
294
  if (i > 0) {
295
- const A = Math.max(o, n);
296
- let S = i / A;
297
- r && (S = Math.min(1, S)), l = Math.round(o * S), c = Math.round(n * S);
295
+ const _ = Math.max(o, n);
296
+ let v = i / _;
297
+ r && (v = Math.min(1, v)), l = Math.round(o * v), c = Math.round(n * v);
298
298
  }
299
- const d = this.sprite, h = d.parent, p = h ? h.getChildIndex(d) : 0, m = d.x, C = d.y, b = d.scale.x, y = d.scale.y;
300
- let v = null;
299
+ const d = this.sprite, h = d.x, p = d.y, m = d.scale.x, C = d.scale.y;
300
+ let b = null;
301
301
  try {
302
- const A = new a.Container();
303
- if (A.addChild(d), d.x = 0, d.y = 0, d.scale.set(l / o, c / n), v = a.RenderTexture.create({ width: l, height: c }), this.app.renderer.render({ container: A, target: v }), !this.app.renderer.extract)
302
+ if (d.x = 0, d.y = 0, d.scale.set(l / o, c / n), b = a.RenderTexture.create({ width: l, height: c }), this.app.renderer.render({ container: this.app.stage, target: b }), !this.app.renderer.extract)
304
303
  return null;
305
- const S = this.app.renderer.extract.canvas(v);
306
- if (!S)
304
+ const _ = this.app.renderer.extract.canvas(b);
305
+ if (!_)
307
306
  return null;
308
- let Y = null;
309
- if (typeof S.toDataURL == "function")
310
- Y = S.toDataURL(`image/${e}`, t);
311
- else if (typeof S.getContext == "function") {
312
- const k = document.createElement("canvas");
313
- k.width = S.width, k.height = S.height;
314
- const Q = k.getContext("2d");
315
- Q && (Q.drawImage(S, 0, 0), Y = k.toDataURL(`image/${e}`, t));
307
+ let v = null;
308
+ if (typeof _.toDataURL == "function")
309
+ v = _.toDataURL(`image/${e}`, t);
310
+ else if (typeof _.getContext == "function") {
311
+ const M = document.createElement("canvas");
312
+ M.width = _.width, M.height = _.height;
313
+ const O = M.getContext("2d");
314
+ O && (O.drawImage(_, 0, 0), v = M.toDataURL(`image/${e}`, t));
316
315
  }
317
- return Y || null;
316
+ return v || null;
318
317
  } catch {
319
318
  return null;
320
319
  } finally {
321
- h && h.addChildAt(d, Math.min(p, h.children.length)), d.x = m, d.y = C, d.scale.set(b, y), v && v.destroy(!0);
320
+ d.x = h, d.y = p, d.scale.set(m, C), b && b.destroy(!0);
322
321
  }
323
322
  }
324
323
  /**
@@ -373,7 +372,7 @@ class Ce extends O {
373
372
  this.sprite = null, this.originalTexture = null, this.baseTexture = null, this._container = null, this.removeAllListeners();
374
373
  }
375
374
  }
376
- const we = {
375
+ const Ce = {
377
376
  adjust: ["adjust", "advanced"],
378
377
  // adjustment, adjustmentAdvanced, alpha, colorMatrix
379
378
  blur: ["blur"],
@@ -389,7 +388,7 @@ const we = {
389
388
  stylize: ["stylize"]
390
389
  // ascii, crt, crossHatch, dot, emboss
391
390
  };
392
- class Se extends O {
391
+ class we extends B {
393
392
  constructor(e, t) {
394
393
  super(), this.state = e, this.renderer = t, this.instances = {}, this._filterRegistry = null;
395
394
  }
@@ -424,7 +423,7 @@ class Se extends O {
424
423
  */
425
424
  getFiltersByCategory(e) {
426
425
  if (!this._filterRegistry) return [];
427
- const t = we[e] || [e], i = [], r = /* @__PURE__ */ new Set();
426
+ const t = Ce[e] || [e], i = [], r = /* @__PURE__ */ new Set();
428
427
  for (const a of t) {
429
428
  const o = this._filterRegistry.getFiltersByCategory(a) || [];
430
429
  for (const n of o)
@@ -569,7 +568,7 @@ class Se extends O {
569
568
  return this.instances[e] || null;
570
569
  }
571
570
  }
572
- const T = class T extends O {
571
+ const T = class T extends B {
573
572
  constructor(e, t) {
574
573
  super(), this.state = e, this.renderer = t, this._overlayCanvas = null, this._isDragging = !1, this._dragStart = null, this._dragMode = null, this._startRect = null, this._hoverMode = null, this._lastAutoZoomCheck = 0, this.HANDLE_SIZE = 14, this.EDGE_HIT_PAD = 10, this._onPointerDown = this._handlePointerDown.bind(this), this._onPointerMove = this._handlePointerMove.bind(this), this._onPointerUp = this._handlePointerUp.bind(this);
575
574
  }
@@ -697,8 +696,8 @@ const T = class T extends O {
697
696
  if (!l) return;
698
697
  const c = this.state.get("crop.shape");
699
698
  if (n.save(), c === "circle") {
700
- const y = l.x + l.width / 2, v = l.y + l.height / 2, _ = Math.min(l.width, l.height) / 2;
701
- n.beginPath(), n.arc(y, v, _, 0, Math.PI * 2), n.clip();
699
+ const y = l.x + l.width / 2, z = l.y + l.height / 2, _ = Math.min(l.width, l.height) / 2;
700
+ n.beginPath(), n.arc(y, z, _, 0, Math.PI * 2), n.clip();
702
701
  } else
703
702
  n.beginPath(), n.rect(l.x, l.y, l.width, l.height), n.clip();
704
703
  n.clearRect(l.x, l.y, l.width, l.height), n.restore(), n.strokeStyle = "#ffffff", n.lineWidth = 2, n.setLineDash([5, 5]), c === "circle" ? (n.beginPath(), n.arc(
@@ -723,8 +722,8 @@ const T = class T extends O {
723
722
  { x: l.x + l.width, y: l.y + l.height / 2, m: "e" }
724
723
  ], b = [...m, ...C];
725
724
  for (const y of b) {
726
- const v = this._hoverMode === y.m, _ = v ? p + 4 : p;
727
- n.beginPath(), n.rect(y.x - _ / 2, y.y - _ / 2, _, _), n.fillStyle = v ? "#4da3ff" : "#ffffff", n.strokeStyle = "rgba(0,0,0,0.6)", n.lineWidth = 1, n.fill(), n.stroke();
725
+ const z = this._hoverMode === y.m, _ = z ? p + 4 : p;
726
+ n.beginPath(), n.rect(y.x - _ / 2, y.y - _ / 2, _, _), n.fillStyle = z ? "#4da3ff" : "#ffffff", n.strokeStyle = "rgba(0,0,0,0.6)", n.lineWidth = 1, n.fill(), n.stroke();
728
727
  }
729
728
  }
730
729
  /**
@@ -839,10 +838,10 @@ const T = class T extends O {
839
838
  if (h <= 0 || p <= 0) return null;
840
839
  const b = new a.Container(), y = new a.Sprite(i);
841
840
  if (this.state.get("crop.shape") === "circle") {
842
- const A = Math.round(Math.max(h, p)), S = m + h / 2, Y = C + p / 2;
843
- m = Math.round(S - A / 2), C = Math.round(Y - A / 2), h = p = A;
844
- const k = new a.Graphics();
845
- typeof k.circle == "function" && typeof k.fill == "function" ? k.circle(h / 2, p / 2, h / 2).fill(16777215) : (k.beginFill(16777215, 1), k.drawCircle(h / 2, p / 2, h / 2), k.endFill()), y.mask = k, b.addChild(k);
841
+ const M = Math.round(Math.max(h, p)), O = m + h / 2, fe = C + p / 2;
842
+ m = Math.round(O - M / 2), C = Math.round(fe - M / 2), h = p = M;
843
+ const F = new a.Graphics();
844
+ typeof F.circle == "function" && typeof F.fill == "function" ? F.circle(h / 2, p / 2, h / 2).fill(16777215) : (F.beginFill(16777215, 1), F.drawCircle(h / 2, p / 2, h / 2), F.endFill()), y.mask = F, b.addChild(F);
846
845
  }
847
846
  y.x = -m, y.y = -C, b.addChild(y);
848
847
  const _ = a.RenderTexture.create({ width: h, height: p });
@@ -851,8 +850,8 @@ const T = class T extends O {
851
850
  target: _,
852
851
  clear: !0
853
852
  }), b.destroy({ children: !0 }), this.renderer.originalTexture = _, e.stage.removeChild(t), t.destroy();
854
- const K = new a.Sprite(_);
855
- return e.stage.addChild(K), this.renderer.sprite = K, this.renderer.fitScale = this.renderer.getFitScaleFor(_), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render(), this.disable(), this.emit("applied", { width: h, height: p }), { texture: _, preservedZoom: o };
853
+ const v = new a.Sprite(_);
854
+ return e.stage.addChild(v), this.renderer.sprite = v, this.renderer.fitScale = this.renderer.getFitScaleFor(_), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render(), this.disable(), this.emit("applied", { width: h, height: p }), { texture: _, preservedZoom: o };
856
855
  }
857
856
  /**
858
857
  * Cancel crop
@@ -884,7 +883,7 @@ V(T, "AUTO_ZOOM_PADDING", 1.1), /**
884
883
  */
885
884
  V(T, "AUTO_ZOOM_THROTTLE_MS", 100);
886
885
  let $ = T;
887
- class ve {
886
+ class Se {
888
887
  /**
889
888
  * Create a new RemoveBgManager
890
889
  * @param {Object} options
@@ -1010,7 +1009,7 @@ function u(s, e = {}, ...t) {
1010
1009
  typeof r == "string" ? i.appendChild(document.createTextNode(r)) : r instanceof HTMLElement && i.appendChild(r);
1011
1010
  return i;
1012
1011
  }
1013
- function ne({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a = 0.5, onChange: o }) {
1012
+ function ae({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a = 0.5, onChange: o }) {
1014
1013
  const n = s.includes("-") ? s.split("-").slice(1).join("-") : s, l = u("div", {
1015
1014
  className: "slider-control slider-wrapper",
1016
1015
  "data-control": n,
@@ -1042,7 +1041,7 @@ function ne({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a
1042
1041
  function j(s) {
1043
1042
  return Number.isInteger(s) ? String(s) : s.toFixed(2);
1044
1043
  }
1045
- function le({ id: s, label: e, checked: t = !1, onChange: i }) {
1044
+ function oe({ id: s, label: e, checked: t = !1, onChange: i }) {
1046
1045
  const r = u("div", { className: "toggle-control" }), a = u("label", { className: "toggle-label", for: s }, e), o = u("input", {
1047
1046
  type: "checkbox",
1048
1047
  id: s,
@@ -1059,7 +1058,7 @@ function le({ id: s, label: e, checked: t = !1, onChange: i }) {
1059
1058
  o.checked = c;
1060
1059
  }, r;
1061
1060
  }
1062
- function ce({ id: s, label: e, value: t = "#000000", onChange: i }) {
1061
+ function ne({ id: s, label: e, value: t = "#000000", onChange: i }) {
1063
1062
  const r = u("div", { className: "color-control" }), a = u("label", { className: "color-label", for: s }, e), o = u("input", {
1064
1063
  type: "color",
1065
1064
  id: s,
@@ -1071,7 +1070,7 @@ function ce({ id: s, label: e, value: t = "#000000", onChange: i }) {
1071
1070
  o.value = n;
1072
1071
  }, r;
1073
1072
  }
1074
- function he({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1073
+ function le({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1075
1074
  const a = u("div", { className: "select-control" }), o = u("label", { className: "select-label", for: s }, e), n = u("select", {
1076
1075
  id: s,
1077
1076
  className: "select-input",
@@ -1085,7 +1084,7 @@ function he({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1085
1084
  n.value = l;
1086
1085
  }, a;
1087
1086
  }
1088
- function z({ label: s, className: e = "", onClick: t, icon: i = null, disabled: r = !1 }) {
1087
+ function A({ label: s, className: e = "", onClick: t, icon: i = null, disabled: r = !1 }) {
1089
1088
  const a = u("button", {
1090
1089
  type: "button",
1091
1090
  className: `btn ${e}`.trim(),
@@ -1131,8 +1130,8 @@ function W({ label: s, icon: e, active: t = !1, onClick: i }) {
1131
1130
  r.classList.toggle("active", a);
1132
1131
  }, r;
1133
1132
  }
1134
- const de = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', ue = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', ke = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', Pe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Me = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', Fe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', Ae = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', Ne = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', Te = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', pe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', Ie = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', G = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', fe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', Ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', Xe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', Z = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', Ye = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Be = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', Oe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', J = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', Le = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>';
1135
- class De {
1133
+ const ce = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', he = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', ve = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', ke = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Pe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', Me = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', Fe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', Ae = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', Ne = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', de = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', Te = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', G = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', ue = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', Ie = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', Ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', Z = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', Xe = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Ye = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', Be = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', K = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', Q = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', Oe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>';
1134
+ class Le {
1136
1135
  constructor(e, t) {
1137
1136
  this.state = e, this.editor = t, this.element = null, this._unsubscribers = [];
1138
1137
  }
@@ -1143,7 +1142,7 @@ class De {
1143
1142
  render() {
1144
1143
  this.element = u("div", { className: "editor-toolbar" });
1145
1144
  const e = u("div", { className: "toolbar-section toolbar-left" }), t = x({
1146
- icon: Xe,
1145
+ icon: Ee,
1147
1146
  title: "Open Image",
1148
1147
  className: "toolbar-btn",
1149
1148
  testId: "btn-open-image",
@@ -1152,7 +1151,7 @@ class De {
1152
1151
  });
1153
1152
  e.appendChild(t);
1154
1153
  const i = u("div", { className: "toolbar-section toolbar-center" }), r = x({
1155
- icon: Pe,
1154
+ icon: ke,
1156
1155
  title: "Zoom Out",
1157
1156
  className: "toolbar-btn",
1158
1157
  testId: "btn-zoom-out",
@@ -1169,7 +1168,7 @@ class De {
1169
1168
  role: "status"
1170
1169
  }, "100%");
1171
1170
  const a = x({
1172
- icon: ke,
1171
+ icon: ve,
1173
1172
  title: "Zoom In",
1174
1173
  className: "toolbar-btn",
1175
1174
  testId: "btn-zoom-in",
@@ -1179,7 +1178,7 @@ class De {
1179
1178
  this.editor.setZoom(h + 0.25);
1180
1179
  }
1181
1180
  }), o = x({
1182
- icon: Me,
1181
+ icon: Pe,
1183
1182
  title: "Fit to Screen",
1184
1183
  className: "toolbar-btn",
1185
1184
  testId: "btn-fit-screen",
@@ -1189,14 +1188,14 @@ class De {
1189
1188
  i.appendChild(r), i.appendChild(this._zoomLabel), i.appendChild(a), i.appendChild(o);
1190
1189
  const n = u("div", { className: "toolbar-section toolbar-right" });
1191
1190
  this._themeBtn = x({
1192
- icon: this.state.get("isDarkMode") ? J : ee,
1191
+ icon: this.state.get("isDarkMode") ? K : Q,
1193
1192
  title: "Toggle Theme",
1194
1193
  className: "toolbar-btn toolbar-btn-theme",
1195
1194
  testId: "btn-toggle-theme",
1196
1195
  ariaLabel: "Toggle theme",
1197
1196
  onClick: () => this.editor.toggleTheme()
1198
1197
  }), this._cropBtn = x({
1199
- icon: pe,
1198
+ icon: de,
1200
1199
  title: "Crop",
1201
1200
  className: "toolbar-btn toolbar-btn-crop",
1202
1201
  testId: "btn-crop",
@@ -1206,14 +1205,14 @@ class De {
1206
1205
  }
1207
1206
  });
1208
1207
  const l = x({
1209
- icon: fe,
1208
+ icon: ue,
1210
1209
  title: "Reset All",
1211
1210
  className: "toolbar-btn",
1212
1211
  testId: "btn-reset-all",
1213
1212
  ariaLabel: "Reset all changes",
1214
1213
  onClick: () => this.editor.resetAll()
1215
1214
  }), c = x({
1216
- icon: Ie,
1215
+ icon: Te,
1217
1216
  title: "Save Image",
1218
1217
  className: "toolbar-btn toolbar-btn-primary",
1219
1218
  testId: "btn-save-edit",
@@ -1238,7 +1237,7 @@ class De {
1238
1237
  });
1239
1238
  this._unsubscribers.push(e);
1240
1239
  const t = this.state.on("change:isDarkMode", ({ value: r }) => {
1241
- this._themeBtn.innerHTML = r ? J : ee;
1240
+ this._themeBtn.innerHTML = r ? K : Q;
1242
1241
  });
1243
1242
  this._unsubscribers.push(t);
1244
1243
  const i = this.state.on("change:mode", ({ value: r }) => {
@@ -1262,23 +1261,23 @@ class De {
1262
1261
  }
1263
1262
  }
1264
1263
  const L = [
1265
- { id: "adjust", name: "Adjust", icon: Fe },
1264
+ { id: "adjust", name: "Adjust", icon: Me },
1266
1265
  // adjustment, adjustmentAdvanced, alpha
1267
- { id: "blur", name: "Blur", icon: Ae },
1266
+ { id: "blur", name: "Blur", icon: Fe },
1268
1267
  // blur, kawaseBlur, motionBlur, radialBlur, etc.
1269
- { id: "color", name: "Color", icon: ze },
1268
+ { id: "color", name: "Color", icon: Ae },
1270
1269
  // colorOverlay, grayscale, hslAdjustment, etc.
1271
- { id: "effects", name: "Effects", icon: Ne },
1270
+ { id: "effects", name: "Effects", icon: ze },
1272
1271
  // noise, vignette, pixelate, dropShadow, etc.
1273
- { id: "distortion", name: "Distortion", icon: Re },
1272
+ { id: "distortion", name: "Distortion", icon: Ne },
1274
1273
  // twist, bulgePinch, displacement, etc.
1275
- { id: "light", name: "Light", icon: Te },
1274
+ { id: "light", name: "Light", icon: Re },
1276
1275
  // bloom, glow, godray, advancedBloom
1277
- { id: "stylize", name: "Stylize", icon: Le },
1276
+ { id: "stylize", name: "Stylize", icon: Oe },
1278
1277
  // ascii, crt, crossHatch, dot, emboss
1279
- { id: "crop", name: "Crop", icon: pe }
1278
+ { id: "crop", name: "Crop", icon: de }
1280
1279
  ];
1281
- class Ue {
1280
+ class De {
1282
1281
  constructor(e, t) {
1283
1282
  this.state = e, this.editor = t, this.element = null, this._chips = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [];
1284
1283
  }
@@ -1292,7 +1291,7 @@ class Ue {
1292
1291
  className: "category-carousel-container",
1293
1292
  "data-testid": "category-carousel"
1294
1293
  }), this._leftBtn = x({
1295
- icon: de,
1294
+ icon: ce,
1296
1295
  title: "Previous categories",
1297
1296
  className: "carousel-nav carousel-nav-left",
1298
1297
  onClick: () => this._scrollLeft()
@@ -1305,7 +1304,7 @@ class Ue {
1305
1304
  });
1306
1305
  r.dataset.categoryId = i.id, r.dataset.category = i.id, r.dataset.testid = `category-${i.id}`, this._chips.set(i.id, r), this._carousel.appendChild(r);
1307
1306
  }), this._rightBtn = x({
1308
- icon: ue,
1307
+ icon: he,
1309
1308
  title: "Next categories",
1310
1309
  className: "carousel-nav carousel-nav-right",
1311
1310
  onClick: () => this._scrollRight()
@@ -1413,7 +1412,7 @@ class Ue {
1413
1412
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
1414
1413
  }
1415
1414
  }
1416
- class Ve {
1415
+ class Ue {
1417
1416
  constructor(e, t) {
1418
1417
  this.state = e, this.filterManager = t, this.element = null, this._filterCards = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
1419
1418
  }
@@ -1424,12 +1423,12 @@ class Ve {
1424
1423
  */
1425
1424
  render({ onToggle: e, onSelect: t }) {
1426
1425
  return this._onToggle = e, this._onSelect = t, this.element = u("div", { className: "filter-carousel-container" }), this._leftBtn = x({
1427
- icon: de,
1426
+ icon: ce,
1428
1427
  title: "Previous filters",
1429
1428
  className: "carousel-nav carousel-nav-left",
1430
1429
  onClick: () => this._scrollLeft()
1431
1430
  }), this._carousel = u("div", { className: "filter-carousel" }), this._rightBtn = x({
1432
- icon: ue,
1431
+ icon: he,
1433
1432
  title: "Next filters",
1434
1433
  className: "carousel-nav carousel-nav-right",
1435
1434
  onClick: () => this._scrollRight()
@@ -1570,7 +1569,7 @@ class Ve {
1570
1569
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._filterCards.clear(), (e = this.element) == null || e.remove(), this.element = null;
1571
1570
  }
1572
1571
  }
1573
- class je {
1572
+ class Ve {
1574
1573
  constructor(e, t) {
1575
1574
  this.state = e, this.filterManager = t, this.element = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onAction = null, this._unsubscribers = [];
1576
1575
  }
@@ -1615,7 +1614,7 @@ class je {
1615
1614
  return;
1616
1615
  }
1617
1616
  const i = u("div", { className: "adjustments-header" });
1618
- i.appendChild(u("span", { className: "adjustments-title" }, t.name)), i.appendChild(z({
1617
+ i.appendChild(u("span", { className: "adjustments-title" }, t.name)), i.appendChild(A({
1619
1618
  label: "Reset",
1620
1619
  className: "btn-text",
1621
1620
  onClick: () => this._handleReset(e)
@@ -1638,7 +1637,7 @@ class je {
1638
1637
  const r = t.label || t.id;
1639
1638
  switch (this._normalizeControlType(t.type)) {
1640
1639
  case "slider":
1641
- return ne({
1640
+ return ae({
1642
1641
  id: `${e}-${t.id}`,
1643
1642
  label: r,
1644
1643
  min: t.min ?? 0,
@@ -1648,14 +1647,14 @@ class je {
1648
1647
  onChange: (l) => this._handleChange(e, t.id, l)
1649
1648
  });
1650
1649
  case "toggle":
1651
- return le({
1650
+ return oe({
1652
1651
  id: `${e}-${t.id}`,
1653
1652
  label: r,
1654
1653
  checked: !!i,
1655
1654
  onChange: (l) => this._handleChange(e, t.id, l)
1656
1655
  });
1657
1656
  case "color":
1658
- return ce({
1657
+ return ne({
1659
1658
  id: `${e}-${t.id}`,
1660
1659
  label: r,
1661
1660
  value: typeof i == "string" && i.startsWith("#") ? i : t.default || "#000000",
@@ -1663,7 +1662,7 @@ class je {
1663
1662
  });
1664
1663
  case "select":
1665
1664
  const o = this._normalizeOptions(t.options);
1666
- return he({
1665
+ return le({
1667
1666
  id: `${e}-${t.id}`,
1668
1667
  label: r,
1669
1668
  options: o,
@@ -1672,7 +1671,7 @@ class je {
1672
1671
  });
1673
1672
  case "button":
1674
1673
  const n = u("div", { className: "button-control" });
1675
- return n.appendChild(z({
1674
+ return n.appendChild(A({
1676
1675
  label: r,
1677
1676
  className: "btn-secondary",
1678
1677
  onClick: () => this._handleAction(e, t.action || t.id)
@@ -1773,7 +1772,7 @@ class je {
1773
1772
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._controls.clear(), (e = this.element) == null || e.remove(), this.element = null;
1774
1773
  }
1775
1774
  }
1776
- class qe {
1775
+ class je {
1777
1776
  constructor(e, t) {
1778
1777
  this.state = e, this.filterManager = t, this._drawer = null, this._body = null, this._titleEl = null, this._isOpen = !1, this._currentFilterId = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onRemove = null, this._onAction = null, this._container = null;
1779
1778
  }
@@ -1786,14 +1785,14 @@ class qe {
1786
1785
  this._onChange = t, this._onReset = i, this._onRemove = r, this._onAction = a, this._container = e, this._drawer = u("div", { className: "mobile-filter-drawer" });
1787
1786
  const o = u("div", { className: "drawer-header" });
1788
1787
  this._titleEl = u("span", { className: "drawer-title" }, "Filter");
1789
- const n = u("div", { className: "drawer-header-actions" }), l = z({
1788
+ const n = u("div", { className: "drawer-header-actions" }), l = A({
1790
1789
  label: "Reset",
1791
1790
  className: "btn-text",
1792
1791
  onClick: () => {
1793
1792
  var h;
1794
1793
  this._currentFilterId && ((h = this._onReset) == null || h.call(this, this._currentFilterId), this._renderControls());
1795
1794
  }
1796
- }), c = z({
1795
+ }), c = A({
1797
1796
  label: "Remove",
1798
1797
  className: "btn-text btn-danger",
1799
1798
  onClick: () => {
@@ -1875,7 +1874,7 @@ class qe {
1875
1874
  const r = t.label || t.id;
1876
1875
  switch (this._normalizeControlType(t.type)) {
1877
1876
  case "slider":
1878
- return ne({
1877
+ return ae({
1879
1878
  id: `drawer-${e}-${t.id}`,
1880
1879
  label: r,
1881
1880
  min: t.min ?? 0,
@@ -1888,7 +1887,7 @@ class qe {
1888
1887
  }
1889
1888
  });
1890
1889
  case "toggle":
1891
- return le({
1890
+ return oe({
1892
1891
  id: `drawer-${e}-${t.id}`,
1893
1892
  label: r,
1894
1893
  checked: !!i,
@@ -1898,7 +1897,7 @@ class qe {
1898
1897
  }
1899
1898
  });
1900
1899
  case "color":
1901
- return ce({
1900
+ return ne({
1902
1901
  id: `drawer-${e}-${t.id}`,
1903
1902
  label: r,
1904
1903
  value: typeof i == "string" && i.startsWith("#") ? i : t.default || "#000000",
@@ -1909,7 +1908,7 @@ class qe {
1909
1908
  });
1910
1909
  case "select": {
1911
1910
  const o = this._normalizeOptions(t.options);
1912
- return he({
1911
+ return le({
1913
1912
  id: `drawer-${e}-${t.id}`,
1914
1913
  label: r,
1915
1914
  options: o,
@@ -1922,7 +1921,7 @@ class qe {
1922
1921
  }
1923
1922
  case "button": {
1924
1923
  const o = u("div", { className: "button-control" });
1925
- return o.appendChild(z({
1924
+ return o.appendChild(A({
1926
1925
  label: r,
1927
1926
  className: "btn-secondary",
1928
1927
  onClick: () => {
@@ -1969,7 +1968,7 @@ class qe {
1969
1968
  this._controls.clear(), (e = this._drawer) == null || e.remove(), this._drawer = null, this._isOpen = !1, this._currentFilterId = null, this._container = null;
1970
1969
  }
1971
1970
  }
1972
- class He {
1971
+ class qe {
1973
1972
  constructor(e, t) {
1974
1973
  this.state = e, this.filterManager = t, this.element = null, this._scrollContainer = null, this._chips = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
1975
1974
  }
@@ -2042,11 +2041,11 @@ class He {
2042
2041
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
2043
2042
  }
2044
2043
  }
2045
- const $e = [
2046
- { id: "free", name: "Free", icon: Oe },
2047
- { id: "square", name: "Square", icon: Ye },
2048
- { id: "circle", name: "Circle", icon: Be }
2049
- ], We = [
2044
+ const He = [
2045
+ { id: "free", name: "Free", icon: Be },
2046
+ { id: "square", name: "Square", icon: Xe },
2047
+ { id: "circle", name: "Circle", icon: Ye }
2048
+ ], $e = [
2050
2049
  { id: "free", name: "Free" },
2051
2050
  { id: "1:1", name: "1:1" },
2052
2051
  { id: "4:3", name: "4:3" },
@@ -2054,7 +2053,7 @@ const $e = [
2054
2053
  { id: "3:2", name: "3:2" },
2055
2054
  { id: "2:3", name: "2:3" }
2056
2055
  ];
2057
- class Ze {
2056
+ class We {
2058
2057
  constructor(e, t) {
2059
2058
  this.state = e, this.cropManager = t, this.element = null, this._shapeChips = /* @__PURE__ */ new Map(), this._aspectChips = /* @__PURE__ */ new Map(), this._unsubscribers = [];
2060
2059
  }
@@ -2070,7 +2069,7 @@ class Ze {
2070
2069
  const e = u("div", { className: "crop-section" });
2071
2070
  e.appendChild(u("label", { className: "section-label" }, "Shape"));
2072
2071
  const t = u("div", { className: "chip-row" }), i = this.state.get("crop.shape");
2073
- $e.forEach((c) => {
2072
+ He.forEach((c) => {
2074
2073
  const d = W({
2075
2074
  label: c.name,
2076
2075
  icon: c.icon,
@@ -2080,7 +2079,7 @@ class Ze {
2080
2079
  d.dataset.shape = c.id, d.dataset.testid = `crop-shape-${c.id}`, this._shapeChips.set(c.id, d), t.appendChild(d);
2081
2080
  }), e.appendChild(t), this.element.appendChild(e), this.state.get("lockCropShape") && (e.style.display = "none"), this._shapeSection = e, this._aspectSection = u("div", { className: "crop-section" }), this._aspectSection.appendChild(u("label", { className: "section-label" }, "Aspect Ratio"));
2082
2081
  const r = u("div", { className: "chip-row aspect-row" }), a = this.state.get("crop.aspect");
2083
- We.forEach((c) => {
2082
+ $e.forEach((c) => {
2084
2083
  const d = W({
2085
2084
  label: c.name,
2086
2085
  active: a === c.id,
@@ -2088,14 +2087,14 @@ class Ze {
2088
2087
  });
2089
2088
  d.dataset.ratio = c.id, d.dataset.testid = `crop-ratio-${c.id}`, this._aspectChips.set(c.id, d), r.appendChild(d);
2090
2089
  }), this._aspectSection.appendChild(r), this.element.appendChild(this._aspectSection), this._updateAspectVisibility();
2091
- const o = u("div", { className: "crop-actions" }), n = z({
2090
+ const o = u("div", { className: "crop-actions" }), n = A({
2092
2091
  label: "Cancel",
2093
2092
  className: "btn-secondary crop-cancel-btn",
2094
2093
  icon: G,
2095
2094
  onClick: () => this.cropManager.cancel()
2096
2095
  });
2097
2096
  n.dataset.testid = "cancel-crop";
2098
- const l = z({
2097
+ const l = A({
2099
2098
  label: "Apply Crop",
2100
2099
  className: "btn-primary crop-apply-btn",
2101
2100
  icon: Z,
@@ -2161,7 +2160,7 @@ class Ze {
2161
2160
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._shapeChips.clear(), this._aspectChips.clear(), (e = this.element) == null || e.remove(), this.element = null;
2162
2161
  }
2163
2162
  }
2164
- class Ge {
2163
+ class Ze {
2165
2164
  constructor(e, t) {
2166
2165
  this.state = e, this.filterManager = t, this.element = null, this._filterItems = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onRemove = null, this._onReset = null, this._onClearAll = null, this._onUpdateValue = null, this._onSelect = null;
2167
2166
  }
@@ -2177,7 +2176,7 @@ class Ge {
2177
2176
  });
2178
2177
  const o = u("div", { className: "panel-header" });
2179
2178
  o.appendChild(u("h3", { className: "panel-title" }, "Active Filters"));
2180
- const n = z({
2179
+ const n = A({
2181
2180
  label: "Clear All",
2182
2181
  className: "btn-text btn-danger",
2183
2182
  onClick: () => this._handleClearAll()
@@ -2244,12 +2243,12 @@ class Ge {
2244
2243
  m.target.closest(".filter-item-actions") || this._handleSelect(e);
2245
2244
  }
2246
2245
  }), o = u("div", { className: "filter-item-header" }), n = u("span", { className: "filter-item-name" }, t.name), l = u("div", { className: "filter-item-actions" }), c = x({
2247
- icon: fe,
2246
+ icon: ue,
2248
2247
  title: "Reset filter",
2249
2248
  className: "btn-icon-sm",
2250
2249
  onClick: () => this._handleReset(e)
2251
2250
  }), d = x({
2252
- icon: Ee,
2251
+ icon: Ie,
2253
2252
  title: "Remove filter",
2254
2253
  className: "btn-icon-sm btn-danger",
2255
2254
  onClick: () => this._handleRemove(e)
@@ -2362,7 +2361,7 @@ class Ge {
2362
2361
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._filterItems.clear(), (e = this.element) == null || e.remove(), this.element = null;
2363
2362
  }
2364
2363
  }
2365
- const B = {
2364
+ const Y = {
2366
2365
  name: "free",
2367
2366
  initialMode: "filters",
2368
2367
  cropShape: "free",
@@ -2376,10 +2375,10 @@ const B = {
2376
2375
  maxExportHeight: void 0
2377
2376
  }, q = {
2378
2377
  free: {
2379
- ...B
2378
+ ...Y
2380
2379
  },
2381
2380
  avatar: {
2382
- ...B,
2381
+ ...Y,
2383
2382
  name: "avatar",
2384
2383
  initialMode: "crop",
2385
2384
  cropShape: "circle",
@@ -2389,7 +2388,7 @@ const B = {
2389
2388
  lockAspectRatio: !0
2390
2389
  },
2391
2390
  banner: {
2392
- ...B,
2391
+ ...Y,
2393
2392
  name: "banner",
2394
2393
  initialMode: "crop",
2395
2394
  cropShape: "square",
@@ -2399,7 +2398,7 @@ const B = {
2399
2398
  lockAspectRatio: !0
2400
2399
  },
2401
2400
  product: {
2402
- ...B,
2401
+ ...Y,
2403
2402
  name: "product",
2404
2403
  initialMode: "filters",
2405
2404
  cropShape: "square",
@@ -2409,15 +2408,15 @@ const B = {
2409
2408
  lockAspectRatio: !1
2410
2409
  }
2411
2410
  };
2412
- function Ke(s) {
2411
+ function Ge(s) {
2413
2412
  if (!s)
2414
2413
  return { ...q.free };
2415
2414
  if (typeof s == "object" && s !== null)
2416
- return { ...B, ...s };
2415
+ return { ...Y, ...s };
2417
2416
  const e = q[s];
2418
2417
  return e ? { ...e } : { ...q.free };
2419
2418
  }
2420
- class Kt extends O {
2419
+ class Gt extends B {
2421
2420
  /**
2422
2421
  * Create a new VanillaImageEditor
2423
2422
  * @param {HTMLElement} container - Container element to mount the editor
@@ -2428,7 +2427,7 @@ class Kt extends O {
2428
2427
  if (super(), !e)
2429
2428
  throw new Error("VanillaImageEditor: container element is required");
2430
2429
  this._container = e;
2431
- const i = t.preset ? Ke(t.preset) : null, r = i ? {
2430
+ const i = t.preset ? Ge(t.preset) : null, r = i ? {
2432
2431
  initialMode: i.initialMode === "crop" ? "crop" : "adjust",
2433
2432
  cropShape: i.cropShape,
2434
2433
  initialAspectRatio: i.aspectRatio
@@ -2446,7 +2445,7 @@ class Kt extends O {
2446
2445
  },
2447
2446
  ...r,
2448
2447
  ...t
2449
- }, this._preset = i, this._state = xe(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new Ce(), this._filterManager = new Se(this._state, this._renderer), this._cropManager = new $(this._state, this._renderer), this._removeBgManager = null, ((a = this._options.backgroundRemoval) == null ? void 0 : a.enabled) !== !1 && (this._removeBgManager = new ve({
2448
+ }, this._preset = i, this._state = _e(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new xe(), this._filterManager = new we(this._state, this._renderer), this._cropManager = new $(this._state, this._renderer), this._removeBgManager = null, ((a = this._options.backgroundRemoval) == null ? void 0 : a.enabled) !== !1 && (this._removeBgManager = new Se({
2450
2449
  endpoint: (o = this._options.backgroundRemoval) == null ? void 0 : o.endpoint,
2451
2450
  fallbackEndpoint: (n = this._options.backgroundRemoval) == null ? void 0 : n.fallbackEndpoint
2452
2451
  })), this._loadingOverlay = null, this._isMobile = typeof window < "u" ? window.innerWidth <= 768 : !1, this._toolbar = null, this._categoryCarousel = null, this._filterCarousel = null, this._filterAdjustments = null, this._mobileFilterDrawer = null, this._mobileActiveFilters = null, this._cropControls = null, this._activeFiltersPanel = null, this._editorEl = null, this._canvasContainer = null, this._cropOverlay = null, this._controlsSection = null, this._filterControlsEl = null, this._fileInput = null, this._resizeObserver = null, this._init();
@@ -2482,31 +2481,31 @@ class Kt extends O {
2482
2481
  * Initialize UI components
2483
2482
  */
2484
2483
  _initUI() {
2485
- this._toolbar = new De(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new Ue(this._state, this), this._filterControlsEl.appendChild(this._categoryCarousel.render((r) => {
2484
+ this._toolbar = new Le(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new De(this._state, this), this._filterControlsEl.appendChild(this._categoryCarousel.render((r) => {
2486
2485
  }));
2487
2486
  const e = u("div", { className: "filter-layout" }), t = u("div", { className: "filter-left-column" });
2488
- this._filterCarousel = new Ve(this._state, this._filterManager), t.appendChild(this._filterCarousel.render({
2487
+ this._filterCarousel = new Ue(this._state, this._filterManager), t.appendChild(this._filterCarousel.render({
2489
2488
  onToggle: (r, a) => this._handleFilterToggle(r, a),
2490
2489
  onSelect: (r) => {
2491
2490
  this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
2492
2491
  }
2493
- })), this._filterAdjustments = new je(this._state, this._filterManager), t.appendChild(this._filterAdjustments.render({
2492
+ })), this._filterAdjustments = new Ve(this._state, this._filterManager), t.appendChild(this._filterAdjustments.render({
2494
2493
  onChange: (r, a, o) => this._handleFilterChange(r, a, o),
2495
2494
  onReset: (r) => this._handleFilterReset(r),
2496
2495
  onAction: (r, a) => this._handleFilterAction(r, a)
2497
2496
  })), e.appendChild(t);
2498
2497
  const i = u("div", { className: "filter-right-column" });
2499
- this._activeFiltersPanel = new Ge(this._state, this._filterManager), i.appendChild(this._activeFiltersPanel.render({
2498
+ this._activeFiltersPanel = new Ze(this._state, this._filterManager), i.appendChild(this._activeFiltersPanel.render({
2500
2499
  onRemove: (r) => this._handleFilterToggle(r, !1),
2501
2500
  onReset: (r) => this._handleFilterReset(r),
2502
2501
  onClearAll: () => this.resetAll(),
2503
2502
  onSelect: (r) => this._handleFilterSelect(r)
2504
- })), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new He(this._state, this._filterManager), this._filterControlsEl.appendChild(this._mobileActiveFilters.render({
2503
+ })), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new qe(this._state, this._filterManager), this._filterControlsEl.appendChild(this._mobileActiveFilters.render({
2505
2504
  onToggle: (r, a) => this._handleFilterToggle(r, a),
2506
2505
  onSelect: (r) => {
2507
2506
  this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
2508
2507
  }
2509
- })), this._cropControls = new Ze(this._state, this._cropManager), this._cropControlsEl = this._cropControls.render(), this._cropControlsEl.style.display = "none", this._controlsSection.appendChild(this._filterControlsEl), this._controlsSection.appendChild(this._cropControlsEl), this._mobileFilterDrawer = new qe(this._state, this._filterManager), this._mobileFilterDrawer.build(this._controlsSection, {
2508
+ })), this._cropControls = new We(this._state, this._cropManager), this._cropControlsEl = this._cropControls.render(), this._cropControlsEl.style.display = "none", this._controlsSection.appendChild(this._filterControlsEl), this._controlsSection.appendChild(this._cropControlsEl), this._mobileFilterDrawer = new je(this._state, this._filterManager), this._mobileFilterDrawer.build(this._controlsSection, {
2510
2509
  onChange: (r, a, o) => this._handleFilterChange(r, a, o),
2511
2510
  onReset: (r) => this._handleFilterReset(r),
2512
2511
  onRemove: (r) => {
@@ -2802,26 +2801,26 @@ class Kt extends O {
2802
2801
  (e = this._resizeObserver) == null || e.disconnect(), this._renderer.destroy(), this._cropManager.disable(), this._handleWindowResize && window.removeEventListener("resize", this._handleWindowResize), (t = this._toolbar) == null || t.destroy(), (i = this._categoryCarousel) == null || i.destroy(), (r = this._filterCarousel) == null || r.destroy(), (a = this._filterAdjustments) == null || a.destroy(), (o = this._mobileFilterDrawer) == null || o.destroy(), (n = this._mobileActiveFilters) == null || n.destroy(), (l = this._cropControls) == null || l.destroy(), (c = this._activeFiltersPanel) == null || c.destroy(), (d = this._editorEl) == null || d.remove(), this._container = null, this._state = null, this.emit("destroyed"), this.removeAllListeners();
2803
2802
  }
2804
2803
  }
2805
- const P = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
2806
- function Qe(s, e) {
2804
+ const S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
2805
+ function Ke(s, e) {
2807
2806
  return !Array.isArray(s.mediaTargets) || s.mediaTargets.length === 0 ? !0 : s.mediaTargets.includes(e);
2808
2807
  }
2809
2808
  function f(s) {
2810
2809
  var e;
2811
- return P.has(s.id), P.set(s.id, s), I.has(s.category) || I.set(s.category, []), (e = I.get(s.category)) == null || e.push(s.id), s;
2810
+ return S.has(s.id), S.set(s.id, s), I.has(s.category) || I.set(s.category, []), (e = I.get(s.category)) == null || e.push(s.id), s;
2812
2811
  }
2813
- function Je(s) {
2814
- return P.get(s);
2812
+ function Qe(s) {
2813
+ return S.get(s);
2815
2814
  }
2816
2815
  function U() {
2817
- return Array.from(P.values());
2816
+ return Array.from(S.values());
2818
2817
  }
2819
- function et() {
2818
+ function Je() {
2820
2819
  U().map((t) => t.id), Object.entries(g).filter(
2821
2820
  (t) => /Filter$/.test(t[0]) && typeof t[1] == "function"
2822
2821
  ).forEach(([t, i]) => {
2823
2822
  const r = t.replace(/Filter$/, "").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2824
- P.has(r) || f({
2823
+ S.has(r) || f({
2825
2824
  id: r,
2826
2825
  name: t.replace(/Filter$/, ""),
2827
2826
  category: "unlisted",
@@ -2840,20 +2839,20 @@ function et() {
2840
2839
  });
2841
2840
  });
2842
2841
  }
2843
- function tt(s) {
2844
- return (I.get(s) || []).map((t) => P.get(t)).filter(Boolean);
2842
+ function et(s) {
2843
+ return (I.get(s) || []).map((t) => S.get(t)).filter(Boolean);
2845
2844
  }
2846
- function it() {
2845
+ function tt() {
2847
2846
  return Array.from(I.keys());
2848
2847
  }
2849
- function Qt(s) {
2850
- return P.has(s);
2848
+ function Kt(s) {
2849
+ return S.has(s);
2851
2850
  }
2852
- function rt(s) {
2853
- const e = P.get(s);
2851
+ function it(s) {
2852
+ const e = S.get(s);
2854
2853
  if (!e)
2855
2854
  return !1;
2856
- P.delete(s);
2855
+ S.delete(s);
2857
2856
  const t = I.get(e.category);
2858
2857
  if (t) {
2859
2858
  const i = t.indexOf(s);
@@ -2861,12 +2860,12 @@ function rt(s) {
2861
2860
  }
2862
2861
  return !0;
2863
2862
  }
2864
- function Jt(s, e) {
2865
- const t = P.get(s);
2866
- return t ? Qe(t, e) : !1;
2863
+ function Qt(s, e) {
2864
+ const t = S.get(s);
2865
+ return t ? Ke(t, e) : !1;
2867
2866
  }
2868
- function st() {
2869
- return Array.from(P.values()).map((s) => ({
2867
+ function rt() {
2868
+ return Array.from(S.values()).map((s) => ({
2870
2869
  id: s.id,
2871
2870
  name: s.name,
2872
2871
  category: s.category,
@@ -2874,17 +2873,17 @@ function st() {
2874
2873
  }));
2875
2874
  }
2876
2875
  if (typeof window < "u") {
2877
- window.__DEBUG_FILTERS_LIST = Array.from(P.keys()), window.getAllFilters = U, window.getFilter = Je, window.getFiltersByCategory = tt, window.getRegisteredFilters = st;
2876
+ window.__DEBUG_FILTERS_LIST = Array.from(S.keys()), window.getAllFilters = U, window.getFilter = Qe, window.getFiltersByCategory = et, window.getRegisteredFilters = rt;
2878
2877
  const s = f;
2879
2878
  window.registerFilter = (e) => {
2880
2879
  const t = s(e);
2881
- return window.__DEBUG_FILTERS_LIST = Array.from(P.keys()), t;
2880
+ return window.__DEBUG_FILTERS_LIST = Array.from(S.keys()), t;
2882
2881
  };
2883
2882
  }
2884
2883
  typeof window < "u" && (window.initializeFilterRegistry = window.initializeFilterRegistry || function() {
2885
2884
  return [];
2886
2885
  });
2887
- const { AdjustmentFilter: at } = g, { ColorMatrixFilter: ot } = w, M = {
2886
+ const { AdjustmentFilter: st } = g, { ColorMatrixFilter: at } = w, k = {
2888
2887
  gamma: 1,
2889
2888
  saturation: 1,
2890
2889
  contrast: 1,
@@ -2893,7 +2892,7 @@ const { AdjustmentFilter: at } = g, { ColorMatrixFilter: ot } = w, M = {
2893
2892
  green: 1,
2894
2893
  blue: 1,
2895
2894
  alpha: 1
2896
- }, nt = /* @__PURE__ */ new Set([
2895
+ }, ot = /* @__PURE__ */ new Set([
2897
2896
  "gamma",
2898
2897
  "saturation",
2899
2898
  "contrast",
@@ -2903,7 +2902,7 @@ const { AdjustmentFilter: at } = g, { ColorMatrixFilter: ot } = w, M = {
2903
2902
  "blue",
2904
2903
  "alpha"
2905
2904
  ]);
2906
- function F(s, e) {
2905
+ function P(s, e) {
2907
2906
  if (typeof s == "number" && Number.isFinite(s))
2908
2907
  return s;
2909
2908
  if (typeof s == "string") {
@@ -2913,22 +2912,22 @@ function F(s, e) {
2913
2912
  }
2914
2913
  return e;
2915
2914
  }
2916
- function te(s) {
2917
- return nt.has(s);
2915
+ function J(s) {
2916
+ return ot.has(s);
2918
2917
  }
2919
- function lt(s) {
2918
+ function nt(s) {
2920
2919
  return {
2921
- gamma: F(s.gamma, M.gamma),
2922
- saturation: F(s.saturation, M.saturation),
2923
- contrast: F(s.contrast, M.contrast),
2924
- brightness: F(s.brightness, M.brightness),
2925
- red: F(s.red, M.red),
2926
- green: F(s.green, M.green),
2927
- blue: F(s.blue, M.blue),
2928
- alpha: F(s.alpha, M.alpha)
2920
+ gamma: P(s.gamma, k.gamma),
2921
+ saturation: P(s.saturation, k.saturation),
2922
+ contrast: P(s.contrast, k.contrast),
2923
+ brightness: P(s.brightness, k.brightness),
2924
+ red: P(s.red, k.red),
2925
+ green: P(s.green, k.green),
2926
+ blue: P(s.blue, k.blue),
2927
+ alpha: P(s.alpha, k.alpha)
2929
2928
  };
2930
2929
  }
2931
- function ie(s, e) {
2930
+ function ee(s, e) {
2932
2931
  s.reset(), s.brightness(e.brightness, !0), s.contrast(e.contrast, !0), s.saturate(e.saturation, !0);
2933
2932
  }
2934
2933
  f({
@@ -2939,14 +2938,14 @@ f({
2939
2938
  // Create an instance of the AdjustmentFilter with the provided parameters
2940
2939
  createFilter: (s) => {
2941
2940
  try {
2942
- const e = lt(s ?? {}), t = { ...e };
2941
+ const e = nt(s ?? {}), t = { ...e };
2943
2942
  try {
2944
- const i = new at(t), r = i;
2943
+ const i = new st(t), r = i;
2945
2944
  return r._customParams = { ...e }, r.updateUIParam = function(o, n) {
2946
2945
  try {
2947
- if (!te(o))
2946
+ if (!J(o))
2948
2947
  return;
2949
- const l = this._customParams ?? { ...M }, c = F(n, l[o]);
2948
+ const l = this._customParams ?? { ...k }, c = P(n, l[o]);
2950
2949
  l[o] = c, this._customParams = l;
2951
2950
  const d = this;
2952
2951
  o in d && (d[o] = c);
@@ -2954,13 +2953,13 @@ f({
2954
2953
  }
2955
2954
  }, i;
2956
2955
  } catch {
2957
- const r = new ot(), a = r;
2958
- return a._customParams = { ...e }, ie(r, e), a.updateUIParam = function(n, l) {
2956
+ const r = new at(), a = r;
2957
+ return a._customParams = { ...e }, ee(r, e), a.updateUIParam = function(n, l) {
2959
2958
  try {
2960
- if (!te(n))
2959
+ if (!J(n))
2961
2960
  return;
2962
- const c = this._customParams ?? { ...M }, d = F(l, c[n]);
2963
- c[n] = d, this._customParams = c, ie(this, c);
2961
+ const c = this._customParams ?? { ...k }, d = P(l, c[n]);
2962
+ c[n] = d, this._customParams = c, ee(this, c);
2964
2963
  } catch {
2965
2964
  }
2966
2965
  }, r;
@@ -3064,14 +3063,14 @@ f({
3064
3063
  }
3065
3064
  ]
3066
3065
  });
3067
- const { ColorMatrixFilter: ct } = w, R = {
3066
+ const { ColorMatrixFilter: lt } = w, R = {
3068
3067
  brightness: 1,
3069
3068
  contrast: 1,
3070
3069
  saturation: 1,
3071
3070
  hue: 0,
3072
3071
  sepia: 0,
3073
3072
  negative: !1
3074
- }, ht = /* @__PURE__ */ new Set([
3073
+ }, ct = /* @__PURE__ */ new Set([
3075
3074
  "brightness",
3076
3075
  "contrast",
3077
3076
  "saturation",
@@ -3079,8 +3078,8 @@ const { ColorMatrixFilter: ct } = w, R = {
3079
3078
  "sepia",
3080
3079
  "negative"
3081
3080
  ]);
3082
- function dt(s) {
3083
- return ht.has(s);
3081
+ function ht(s) {
3082
+ return ct.has(s);
3084
3083
  }
3085
3084
  function X(s, e) {
3086
3085
  if (typeof s == "number" && Number.isFinite(s))
@@ -3092,7 +3091,7 @@ function X(s, e) {
3092
3091
  }
3093
3092
  return e;
3094
3093
  }
3095
- function me(s, e) {
3094
+ function pe(s, e) {
3096
3095
  if (typeof s == "boolean")
3097
3096
  return s;
3098
3097
  if (typeof s == "string") {
@@ -3103,17 +3102,17 @@ function me(s, e) {
3103
3102
  }
3104
3103
  return e;
3105
3104
  }
3106
- function ut(s) {
3105
+ function dt(s) {
3107
3106
  return {
3108
3107
  brightness: X(s.brightness, R.brightness),
3109
3108
  contrast: X(s.contrast, R.contrast),
3110
3109
  saturation: X(s.saturation, R.saturation),
3111
3110
  hue: X(s.hue, R.hue),
3112
3111
  sepia: X(s.sepia, R.sepia),
3113
- negative: me(s.negative, R.negative)
3112
+ negative: pe(s.negative, R.negative)
3114
3113
  };
3115
3114
  }
3116
- function re(s, e) {
3115
+ function te(s, e) {
3117
3116
  s.reset(), e.brightness !== 1 && s.brightness(e.brightness, !0), e.contrast !== 1 && s.contrast(e.contrast, !0), e.saturation !== 1 && s.saturate(e.saturation, !0), e.hue !== 0 && s.hue(e.hue, !0), e.sepia > 0 && s.sepia(!0), e.negative && s.negative(!0);
3118
3117
  }
3119
3118
  f({
@@ -3124,19 +3123,19 @@ f({
3124
3123
  // Create an instance of the ColorMatrixFilter with the provided parameters
3125
3124
  createFilter: (s) => {
3126
3125
  try {
3127
- const e = ut(s ?? {}), t = new ct(), i = t;
3128
- return i._customParams = { ...e }, re(t, e), i.updateUIParam = function(a, o) {
3126
+ const e = dt(s ?? {}), t = new lt(), i = t;
3127
+ return i._customParams = { ...e }, te(t, e), i.updateUIParam = function(a, o) {
3129
3128
  try {
3130
- if (!dt(a))
3129
+ if (!ht(a))
3131
3130
  return;
3132
3131
  const n = this._customParams ?? { ...R };
3133
3132
  if (a === "negative")
3134
- n.negative = me(o, n.negative);
3133
+ n.negative = pe(o, n.negative);
3135
3134
  else {
3136
3135
  const l = a;
3137
3136
  n[l] = X(o, n[l]);
3138
3137
  }
3139
- this._customParams = n, re(this, n);
3138
+ this._customParams = n, te(this, n);
3140
3139
  } catch {
3141
3140
  }
3142
3141
  }, t;
@@ -3408,7 +3407,7 @@ f({
3408
3407
  }
3409
3408
  ]
3410
3409
  });
3411
- const { ColorOverlayFilter: pt } = g;
3410
+ const { ColorOverlayFilter: ut } = g;
3412
3411
  f({
3413
3412
  id: "colorOverlay",
3414
3413
  name: "Color Overlay",
@@ -3423,7 +3422,7 @@ f({
3423
3422
  try {
3424
3423
  let e = 16711680;
3425
3424
  s.color && (typeof s.color == "string" ? e = parseInt(s.color.replace("#", "0x"), 16) : typeof s.color == "number" && (e = s.color));
3426
- const t = new pt({
3425
+ const t = new ut({
3427
3426
  color: e,
3428
3427
  alpha: s.alpha || 0.5
3429
3428
  });
@@ -3655,7 +3654,7 @@ f({
3655
3654
  }
3656
3655
  ]
3657
3656
  });
3658
- const { ColorMatrixFilter: ft } = w;
3657
+ const { ColorMatrixFilter: pt } = w;
3659
3658
  f({
3660
3659
  id: "grayscale",
3661
3660
  name: "Grayscale",
@@ -3668,14 +3667,14 @@ f({
3668
3667
  */
3669
3668
  createFilter: (s) => {
3670
3669
  try {
3671
- const e = new ft();
3670
+ const e = new pt();
3672
3671
  e._customParams = { ...s };
3673
3672
  const t = s.intensity !== void 0 ? s.intensity : 1;
3674
- return se(e, t), e.updateUIParam = function(i, r) {
3673
+ return ie(e, t), e.updateUIParam = function(i, r) {
3675
3674
  const a = this._customParams || {};
3676
3675
  switch (this._customParams = a, a[i] = r, i) {
3677
3676
  case "intensity":
3678
- se(this, r);
3677
+ ie(this, r);
3679
3678
  break;
3680
3679
  default:
3681
3680
  i in this && (this[i] = r);
@@ -3705,10 +3704,10 @@ f({
3705
3704
  }
3706
3705
  ]
3707
3706
  });
3708
- function se(s, e) {
3707
+ function ie(s, e) {
3709
3708
  s.reset(), s.greyscale(e);
3710
3709
  }
3711
- const { HslAdjustmentFilter: mt } = g;
3710
+ const { HslAdjustmentFilter: ft } = g;
3712
3711
  f({
3713
3712
  id: "hsl-adjustment",
3714
3713
  name: "HSL Adjustment",
@@ -3720,7 +3719,7 @@ f({
3720
3719
  */
3721
3720
  createFilter: (s) => {
3722
3721
  try {
3723
- const e = new mt({
3722
+ const e = new ft({
3724
3723
  hue: s.hue !== void 0 ? s.hue : 0,
3725
3724
  saturation: s.saturation !== void 0 ? s.saturation : 0,
3726
3725
  lightness: s.lightness !== void 0 ? s.lightness : 0,
@@ -3818,7 +3817,7 @@ f({
3818
3817
  }
3819
3818
  ]
3820
3819
  });
3821
- const { KawaseBlurFilter: gt } = g;
3820
+ const { KawaseBlurFilter: mt } = g;
3822
3821
  f({
3823
3822
  id: "kawase-blur",
3824
3823
  name: "Kawase Blur",
@@ -3831,7 +3830,7 @@ f({
3831
3830
  */
3832
3831
  createFilter: (s) => {
3833
3832
  try {
3834
- const e = new gt({
3833
+ const e = new mt({
3835
3834
  strength: s.strength || 4,
3836
3835
  quality: s.quality || 3,
3837
3836
  clamp: s.clamp || !1,
@@ -3936,7 +3935,7 @@ f({
3936
3935
  }
3937
3936
  ]
3938
3937
  });
3939
- const { MotionBlurFilter: bt } = g;
3938
+ const { MotionBlurFilter: gt } = g;
3940
3939
  f({
3941
3940
  id: "motion-blur",
3942
3941
  name: "Motion Blur",
@@ -3949,7 +3948,7 @@ f({
3949
3948
  */
3950
3949
  createFilter: (s) => {
3951
3950
  try {
3952
- const e = new bt({
3951
+ const e = new gt({
3953
3952
  velocity: {
3954
3953
  x: s.velocityX !== void 0 ? s.velocityX : 0,
3955
3954
  y: s.velocityY !== void 0 ? s.velocityY : 0
@@ -4044,7 +4043,7 @@ f({
4044
4043
  }
4045
4044
  ]
4046
4045
  });
4047
- const { RadialBlurFilter: yt } = g;
4046
+ const { RadialBlurFilter: bt } = g;
4048
4047
  f({
4049
4048
  id: "radial-blur",
4050
4049
  name: "Radial Blur",
@@ -4053,7 +4052,7 @@ f({
4053
4052
  // Create an instance of the RadialBlurFilter with the provided parameters
4054
4053
  createFilter: (s) => {
4055
4054
  try {
4056
- const e = new yt({
4055
+ const e = new bt({
4057
4056
  angle: s.angle ?? 20,
4058
4057
  center: { x: s.centerX ?? 0, y: s.centerY ?? 0 },
4059
4058
  kernelSize: s.kernelSize ?? 15,
@@ -4168,7 +4167,7 @@ f({
4168
4167
  }
4169
4168
  ]
4170
4169
  });
4171
- const { TiltShiftFilter: _t } = g;
4170
+ const { TiltShiftFilter: yt } = g;
4172
4171
  f({
4173
4172
  id: "tilt-shift",
4174
4173
  name: "Tilt Shift",
@@ -4177,7 +4176,7 @@ f({
4177
4176
  // Create an instance of the TiltShiftFilter with the provided parameters
4178
4177
  createFilter: (s) => {
4179
4178
  try {
4180
- const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new _t({
4179
+ const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new yt({
4181
4180
  blur: Number(e),
4182
4181
  gradientBlur: Number(t),
4183
4182
  start: { x: Number(i), y: Number(r) },
@@ -4296,7 +4295,7 @@ f({
4296
4295
  }
4297
4296
  ]
4298
4297
  });
4299
- const { ZoomBlurFilter: xt } = g;
4298
+ const { ZoomBlurFilter: _t } = g;
4300
4299
  f({
4301
4300
  id: "zoom-blur",
4302
4301
  name: "Zoom Blur",
@@ -4309,7 +4308,7 @@ f({
4309
4308
  */
4310
4309
  createFilter: (s) => {
4311
4310
  try {
4312
- const e = new xt({
4311
+ const e = new _t({
4313
4312
  strength: s.strength || 0.1,
4314
4313
  center: {
4315
4314
  x: s.centerX !== void 0 ? s.centerX : 0.5,
@@ -4423,7 +4422,7 @@ f({
4423
4422
  }
4424
4423
  ]
4425
4424
  });
4426
- const { ColorGradientFilter: ae } = g;
4425
+ const { ColorGradientFilter: re } = g;
4427
4426
  f({
4428
4427
  id: "color-gradient",
4429
4428
  name: "Color Gradient",
@@ -4447,7 +4446,7 @@ f({
4447
4446
  { offset: 0, color: 16711680, alpha: 1 },
4448
4447
  { offset: 1, color: 255, alpha: 1 }
4449
4448
  ]), e.sort((i, r) => i.offset - r.offset);
4450
- const t = new ae({
4449
+ const t = new re({
4451
4450
  type: s.gradientType,
4452
4451
  // 0: linear, 1: radial, 2: conic
4453
4452
  stops: e,
@@ -4537,7 +4536,7 @@ f({
4537
4536
  case "cssGradient":
4538
4537
  if (r && typeof r == "string" && r.trim() !== "")
4539
4538
  try {
4540
- const h = new ae({ css: r });
4539
+ const h = new re({ css: r });
4541
4540
  this.type = h.type, this.angle = h.angle, this.stops = [...h.stops], a.colorStops = this.stops.map((p) => ({
4542
4541
  offset: p.offset,
4543
4542
  color: typeof p.color == "number" ? "#" + p.color.toString(16).padStart(6, "0") : p.color,
@@ -4562,7 +4561,7 @@ f({
4562
4561
  if (h) {
4563
4562
  const [p, m, C] = h, b = parseInt(m), y = [...this.stops];
4564
4563
  if (b >= 0 && b < y.length)
4565
- return C === "color" && typeof r == "string" ? y[b].color = parseInt(r.replace("#", "0x")) : (C === "offset" || C === "alpha") && (y[b][C] = r), this.stops = y, this.stops.sort((v, _) => v.offset - _.offset), a.colorStops = this.getColorStopsForUI(), !0;
4564
+ return C === "color" && typeof r == "string" ? y[b].color = parseInt(r.replace("#", "0x")) : (C === "offset" || C === "alpha") && (y[b][C] = r), this.stops = y, this.stops.sort((z, _) => z.offset - _.offset), a.colorStops = this.getColorStopsForUI(), !0;
4566
4565
  }
4567
4566
  } else i in this && (this[i] = r);
4568
4567
  break;
@@ -4750,7 +4749,7 @@ f({
4750
4749
  }
4751
4750
  ]
4752
4751
  });
4753
- const Ct = g.ColorReplaceFilter;
4752
+ const xt = g.ColorReplaceFilter;
4754
4753
  f({
4755
4754
  id: "color-replace",
4756
4755
  name: "Color Replace",
@@ -4767,7 +4766,7 @@ f({
4767
4766
  s.originalColor && (typeof s.originalColor == "string" ? e = parseInt(s.originalColor.replace("#", "0x"), 16) : typeof s.originalColor == "number" && (e = s.originalColor));
4768
4767
  let t = 255;
4769
4768
  s.targetColor && (typeof s.targetColor == "string" ? t = parseInt(s.targetColor.replace("#", "0x"), 16) : typeof s.targetColor == "number" && (t = s.targetColor));
4770
- const i = new Ct({
4769
+ const i = new xt({
4771
4770
  originalColor: e,
4772
4771
  targetColor: t,
4773
4772
  tolerance: s.tolerance || 0.4
@@ -4831,7 +4830,7 @@ f({
4831
4830
  }
4832
4831
  ]
4833
4832
  });
4834
- const wt = g.MultiColorReplaceFilter;
4833
+ const Ct = g.MultiColorReplaceFilter;
4835
4834
  f({
4836
4835
  id: "multi-color-replace",
4837
4836
  name: "Multi-Color Replace",
@@ -4857,7 +4856,7 @@ f({
4857
4856
  const i = typeof s.originalColor3 == "string" ? parseInt(s.originalColor3.replace("#", "0x"), 16) : s.originalColor3, r = typeof s.targetColor3 == "string" ? parseInt(s.targetColor3.replace("#", "0x"), 16) : s.targetColor3;
4858
4857
  e.push([i, r]);
4859
4858
  }
4860
- const t = new wt(
4859
+ const t = new Ct(
4861
4860
  e,
4862
4861
  s.tolerance || 0.05,
4863
4862
  3
@@ -4968,7 +4967,7 @@ f({
4968
4967
  }
4969
4968
  ]
4970
4969
  });
4971
- const { RGBSplitFilter: St } = g;
4970
+ const { RGBSplitFilter: wt } = g;
4972
4971
  f({
4973
4972
  id: "rgb-split",
4974
4973
  name: "RGB Split",
@@ -4989,7 +4988,7 @@ f({
4989
4988
  }, i = {
4990
4989
  x: s.blueX !== void 0 ? s.blueX : 0,
4991
4990
  y: s.blueY !== void 0 ? s.blueY : 0
4992
- }, r = new St({
4991
+ }, r = new wt({
4993
4992
  red: e,
4994
4993
  green: t,
4995
4994
  blue: i
@@ -5102,7 +5101,7 @@ f({
5102
5101
  }
5103
5102
  ]
5104
5103
  });
5105
- const { AdvancedBloomFilter: vt } = g;
5104
+ const { AdvancedBloomFilter: St } = g;
5106
5105
  f({
5107
5106
  id: "advanced-bloom",
5108
5107
  name: "Advanced Bloom",
@@ -5111,7 +5110,7 @@ f({
5111
5110
  // Create an instance of the AdvancedBloomFilter with the provided parameters
5112
5111
  createFilter: (s) => {
5113
5112
  try {
5114
- const e = new vt({
5113
+ const e = new St({
5115
5114
  threshold: s.threshold || 0.5,
5116
5115
  bloomScale: s.bloomScale || 1,
5117
5116
  brightness: s.brightness || 1,
@@ -5258,7 +5257,7 @@ f({
5258
5257
  }
5259
5258
  ]
5260
5259
  });
5261
- const kt = g.AsciiFilter;
5260
+ const vt = g.AsciiFilter;
5262
5261
  f({
5263
5262
  id: "ascii",
5264
5263
  name: "ASCII",
@@ -5270,7 +5269,7 @@ f({
5270
5269
  const e = typeof s.size == "number" ? s.size : 8;
5271
5270
  let t = s.color;
5272
5271
  typeof t == "string" && t.startsWith("#") && (t = parseInt(t.replace("#", "0x"), 16));
5273
- const i = s.replaceColor === !0, r = new kt({
5272
+ const i = s.replaceColor === !0, r = new vt({
5274
5273
  size: e,
5275
5274
  color: t,
5276
5275
  replaceColor: i
@@ -5337,7 +5336,7 @@ f({
5337
5336
  }
5338
5337
  ]
5339
5338
  });
5340
- const Pt = g.BackdropBlurFilter;
5339
+ const kt = g.BackdropBlurFilter;
5341
5340
  f({
5342
5341
  id: "backdrop-blur",
5343
5342
  name: "Backdrop Blur",
@@ -5346,7 +5345,7 @@ f({
5346
5345
  // Create an instance of the BackdropBlurFilter with the provided parameters
5347
5346
  createFilter: (s) => {
5348
5347
  try {
5349
- const e = new Pt({
5348
+ const e = new kt({
5350
5349
  // Higher strength values (20-50) make the effect more noticeable
5351
5350
  strength: s.strength || 20,
5352
5351
  quality: s.quality || 4,
@@ -5444,7 +5443,7 @@ f({
5444
5443
  }
5445
5444
  ]
5446
5445
  });
5447
- const { BevelFilter: Mt } = g;
5446
+ const { BevelFilter: Pt } = g;
5448
5447
  f({
5449
5448
  id: "bevel",
5450
5449
  name: "Bevel",
@@ -5456,7 +5455,7 @@ f({
5456
5455
  */
5457
5456
  createFilter: (s) => {
5458
5457
  try {
5459
- const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new Mt({
5458
+ const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new Pt({
5460
5459
  rotation: s.rotation !== void 0 ? s.rotation : 45,
5461
5460
  thickness: s.thickness !== void 0 ? s.thickness : 2,
5462
5461
  lightColor: parseInt(e, 16),
@@ -5572,7 +5571,7 @@ f({
5572
5571
  }
5573
5572
  ]
5574
5573
  });
5575
- const { BloomFilter: Ft } = g;
5574
+ const { BloomFilter: Mt } = g;
5576
5575
  f({
5577
5576
  id: "bloom",
5578
5577
  name: "Bloom/Glow",
@@ -5581,7 +5580,7 @@ f({
5581
5580
  // Create an instance of the BloomFilter with the provided parameters
5582
5581
  createFilter: (s) => {
5583
5582
  try {
5584
- const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new Ft({
5583
+ const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new Mt({
5585
5584
  strength: {
5586
5585
  x: Number(e),
5587
5586
  y: Number(t)
@@ -5684,7 +5683,7 @@ f({
5684
5683
  }
5685
5684
  ]
5686
5685
  });
5687
- const { BulgePinchFilter: At } = g;
5686
+ const { BulgePinchFilter: Ft } = g;
5688
5687
  f({
5689
5688
  id: "bulge-pinch",
5690
5689
  // ID must match what the application expects
@@ -5694,7 +5693,7 @@ f({
5694
5693
  // Create an instance of the BulgePinchFilter with the provided parameters
5695
5694
  createFilter: (s) => {
5696
5695
  try {
5697
- const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new At({
5696
+ const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new Ft({
5698
5697
  center: {
5699
5698
  x: e,
5700
5699
  y: t
@@ -5776,7 +5775,7 @@ f({
5776
5775
  }
5777
5776
  ]
5778
5777
  });
5779
- const { ConvolutionFilter: zt } = g, E = {
5778
+ const { ConvolutionFilter: At } = g, E = {
5780
5779
  normal: [0, 0, 0, 0, 1, 0, 0, 0, 0],
5781
5780
  gaussianBlur: [0.045, 0.122, 0.045, 0.122, 0.332, 0.122, 0.045, 0.122, 0.045],
5782
5781
  boxBlur: [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9],
@@ -5811,7 +5810,7 @@ f({
5811
5810
  const i = s.preset;
5812
5811
  e = E[i] || E.normal;
5813
5812
  }
5814
- const t = new zt(e, s.width || 200, s.height || 200);
5813
+ const t = new At(e, s.width || 200, s.height || 200);
5815
5814
  return t._customParams = { ...s }, t.updateUIParam = function(i, r) {
5816
5815
  const a = this._customParams || {};
5817
5816
  switch (this._customParams = a, a[i] = r, i) {
@@ -6022,7 +6021,7 @@ f({
6022
6021
  }
6023
6022
  ]
6024
6023
  });
6025
- const { CrossHatchFilter: Nt } = g;
6024
+ const { CrossHatchFilter: zt } = g;
6026
6025
  f({
6027
6026
  id: "cross-hatch",
6028
6027
  name: "Cross Hatch",
@@ -6032,7 +6031,7 @@ f({
6032
6031
  // Note: CrossHatchFilter has NO parameters according to PixiJS examples
6033
6032
  createFilter: (s) => {
6034
6033
  try {
6035
- const e = new Nt();
6034
+ const e = new zt();
6036
6035
  return e.updateUIParam = function(t, i) {
6037
6036
  return !0;
6038
6037
  }, e;
@@ -6229,7 +6228,7 @@ f({
6229
6228
  }
6230
6229
  ]
6231
6230
  });
6232
- const Rt = w.DisplacementFilter, Tt = w.Sprite, H = w.Texture;
6231
+ const Nt = w.DisplacementFilter, Rt = w.Sprite, H = w.Texture;
6233
6232
  f({
6234
6233
  id: "displacement",
6235
6234
  // ID must match what the application expects
@@ -6255,7 +6254,7 @@ f({
6255
6254
  }
6256
6255
  t = H.from(o);
6257
6256
  }
6258
- const i = new Tt(t), r = new Rt(i, s.scale || 50);
6257
+ const i = new Rt(t), r = new Nt(i, s.scale || 50);
6259
6258
  return r.scale.x = s.scaleX || 50, r.scale.y = s.scaleY || 50, r._customParams = { ...s }, r._displacementSprite = i, r.updateUIParam = function(a, o) {
6260
6259
  const n = this._customParams || {};
6261
6260
  switch (this._customParams = n, n[a] = o, a) {
@@ -6402,7 +6401,7 @@ f({
6402
6401
  }
6403
6402
  ]
6404
6403
  });
6405
- const { EmbossFilter: It } = g;
6404
+ const { EmbossFilter: Tt } = g;
6406
6405
  f({
6407
6406
  id: "emboss",
6408
6407
  name: "Emboss",
@@ -6411,7 +6410,7 @@ f({
6411
6410
  // Create an instance of the Emboss filter with the provided parameters
6412
6411
  createFilter: (s) => {
6413
6412
  try {
6414
- const e = typeof s.strength == "number" ? s.strength : 5, t = new It(e);
6413
+ const e = typeof s.strength == "number" ? s.strength : 5, t = new Tt(e);
6415
6414
  return t._customParams = {
6416
6415
  strength: e
6417
6416
  }, t.updateUIParam = function(i, r) {
@@ -6451,7 +6450,7 @@ f({
6451
6450
  }
6452
6451
  ]
6453
6452
  });
6454
- const { GlitchFilter: Et } = g, N = {
6453
+ const { GlitchFilter: It } = g, N = {
6455
6454
  TRANSPARENT: 0,
6456
6455
  ORIGINAL: 1,
6457
6456
  LOOP: 2,
@@ -6465,7 +6464,7 @@ f({
6465
6464
  description: "Apply digital distortion and glitch effects",
6466
6465
  createFilter: (s) => {
6467
6466
  try {
6468
- const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new Et({
6467
+ const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new It({
6469
6468
  slices: s.slices,
6470
6469
  offset: s.offset,
6471
6470
  direction: s.direction,
@@ -6706,7 +6705,7 @@ f({
6706
6705
  }
6707
6706
  ]
6708
6707
  });
6709
- const { GlowFilter: Xt } = g;
6708
+ const { GlowFilter: Et } = g;
6710
6709
  f({
6711
6710
  id: "glow",
6712
6711
  name: "Glow",
@@ -6715,7 +6714,7 @@ f({
6715
6714
  // Create an instance of the GlowFilter with the provided parameters
6716
6715
  createFilter: (s) => {
6717
6716
  try {
6718
- const e = parseInt(s.color.replace("#", "0x"), 16), t = new Xt({
6717
+ const e = parseInt(s.color.replace("#", "0x"), 16), t = new Et({
6719
6718
  distance: s.distance || 10,
6720
6719
  outerStrength: s.outerStrength || 4,
6721
6720
  innerStrength: s.innerStrength || 0,
@@ -6841,7 +6840,7 @@ f({
6841
6840
  }
6842
6841
  ]
6843
6842
  });
6844
- const { GodrayFilter: Yt } = g;
6843
+ const { GodrayFilter: Xt } = g;
6845
6844
  f({
6846
6845
  id: "godray",
6847
6846
  name: "Godray",
@@ -6850,7 +6849,7 @@ f({
6850
6849
  // Create an instance of the GodrayFilter with the provided parameters
6851
6850
  createFilter: (s) => {
6852
6851
  try {
6853
- const e = new Yt({
6852
+ const e = new Xt({
6854
6853
  angle: s.angle || 30,
6855
6854
  parallel: s.parallel ?? !0,
6856
6855
  center: {
@@ -7003,7 +7002,7 @@ f({
7003
7002
  }
7004
7003
  ]
7005
7004
  });
7006
- const Bt = g.SimpleLightmapFilter, oe = w.Texture;
7005
+ const Yt = g.SimpleLightmapFilter, se = w.Texture;
7007
7006
  f({
7008
7007
  id: "lightmap",
7009
7008
  name: "Lightmap",
@@ -7028,14 +7027,14 @@ f({
7028
7027
  const c = a.createRadialGradient(128, 128, 10, 128, 128, 160);
7029
7028
  c.addColorStop(0, "white"), c.addColorStop(0.3, "rgba(220, 220, 220, 1)"), c.addColorStop(0.6, "rgba(150, 150, 150, 1)"), c.addColorStop(1, "black"), a.fillStyle = c, a.fillRect(0, 0, 256, 256);
7030
7029
  }
7031
- const o = oe.from(r);
7030
+ const o = se.from(r);
7032
7031
  let n;
7033
7032
  try {
7034
7033
  typeof t == "string" && t.startsWith("#") ? n = parseInt(t.replace("#", "0x"), 16) : n = 0;
7035
7034
  } catch {
7036
7035
  n = 0;
7037
7036
  }
7038
- const l = new Bt(o, n, i);
7037
+ const l = new Yt(o, n, i);
7039
7038
  return l._customParams = {
7040
7039
  textureType: e,
7041
7040
  color: t,
@@ -7061,7 +7060,7 @@ f({
7061
7060
  const b = m.createRadialGradient(128, 128, 10, 128, 128, 160);
7062
7061
  b.addColorStop(0, "white"), b.addColorStop(0.3, "rgba(220, 220, 220, 1)"), b.addColorStop(0.6, "rgba(150, 150, 150, 1)"), b.addColorStop(1, "black"), m.fillStyle = b, m.fillRect(0, 0, 256, 256);
7063
7062
  }
7064
- const C = oe.from(p);
7063
+ const C = se.from(p);
7065
7064
  if (this.lightMap = C, this.enabled !== void 0) {
7066
7065
  const b = this.enabled;
7067
7066
  this.enabled = !1, setTimeout(() => {
@@ -7134,7 +7133,7 @@ f({
7134
7133
  }
7135
7134
  ]
7136
7135
  });
7137
- const { NoiseFilter: Ot } = w;
7136
+ const { NoiseFilter: Bt } = w;
7138
7137
  f({
7139
7138
  id: "noise",
7140
7139
  name: "Noise",
@@ -7142,7 +7141,7 @@ f({
7142
7141
  description: "Add random noise to the image",
7143
7142
  createFilter: (s) => {
7144
7143
  try {
7145
- const e = new Ot({
7144
+ const e = new Bt({
7146
7145
  noise: s.noise || 0.5,
7147
7146
  seed: s.seed || Math.random()
7148
7147
  });
@@ -7219,7 +7218,7 @@ f({
7219
7218
  }
7220
7219
  ]
7221
7220
  });
7222
- const { OldFilmFilter: Lt } = g;
7221
+ const { OldFilmFilter: Ot } = g;
7223
7222
  f({
7224
7223
  id: "old-film",
7225
7224
  name: "Old Film",
@@ -7227,7 +7226,7 @@ f({
7227
7226
  description: "Apply a vintage film effect with scratches and grain",
7228
7227
  createFilter: (s) => {
7229
7228
  try {
7230
- const e = new Lt({
7229
+ const e = new Ot({
7231
7230
  sepia: s.sepia,
7232
7231
  noise: s.noise,
7233
7232
  noiseSize: s.noiseSize,
@@ -7408,7 +7407,7 @@ f({
7408
7407
  }
7409
7408
  ]
7410
7409
  });
7411
- const { OutlineFilter: Dt } = g;
7410
+ const { OutlineFilter: Lt } = g;
7412
7411
  f({
7413
7412
  id: "outline",
7414
7413
  name: "Outline",
@@ -7418,7 +7417,7 @@ f({
7418
7417
  try {
7419
7418
  let e = s.color;
7420
7419
  typeof e == "string" && (e = parseInt(e.replace("#", "0x"), 16));
7421
- const t = new Dt({
7420
+ const t = new Lt({
7422
7421
  thickness: s.thickness || 4,
7423
7422
  color: e,
7424
7423
  alpha: s.alpha || 1,
@@ -7508,7 +7507,7 @@ f({
7508
7507
  }
7509
7508
  ]
7510
7509
  });
7511
- const { PixelateFilter: Ut } = g;
7510
+ const { PixelateFilter: Dt } = g;
7512
7511
  f({
7513
7512
  id: "pixelate",
7514
7513
  name: "Pixelate",
@@ -7516,7 +7515,7 @@ f({
7516
7515
  description: "Create a pixelated or mosaic effect",
7517
7516
  createFilter: (s) => {
7518
7517
  try {
7519
- const e = new Ut(
7518
+ const e = new Dt(
7520
7519
  s.useUniform ? Math.max(4, s.size || 10) : [Math.max(4, s.sizeX || 10), Math.max(4, s.sizeY || 10)]
7521
7520
  );
7522
7521
  return e._customParams = { ...s }, e.updateUIParam = function(t, i) {
@@ -7599,7 +7598,7 @@ f({
7599
7598
  }
7600
7599
  ]
7601
7600
  });
7602
- const { ReflectionFilter: Vt } = g;
7601
+ const { ReflectionFilter: Ut } = g;
7603
7602
  f({
7604
7603
  id: "reflection",
7605
7604
  // ID must match what the application expects
@@ -7616,7 +7615,7 @@ f({
7616
7615
  waveLength: new Float32Array([s.wavelengthStart ?? 30, s.wavelengthEnd ?? 100]),
7617
7616
  alpha: new Float32Array([s.alphaStart ?? 1, s.alphaEnd ?? 1]),
7618
7617
  time: s.time ?? 0
7619
- }, t = new Vt(e);
7618
+ }, t = new Ut(e);
7620
7619
  return t._customParams = { ...s }, t.animating = s.animating ?? !1, t.updateUIParam = function(i, r) {
7621
7620
  const a = this._customParams || {};
7622
7621
  switch (this._customParams = a, a[i] = r, i) {
@@ -7767,7 +7766,7 @@ f({
7767
7766
  }
7768
7767
  ]
7769
7768
  });
7770
- const { ShockwaveFilter: jt } = g;
7769
+ const { ShockwaveFilter: Vt } = g;
7771
7770
  f({
7772
7771
  id: "shockwave",
7773
7772
  // ID must match what the application expects
@@ -7777,7 +7776,7 @@ f({
7777
7776
  // Create an instance of the ShockwaveFilter with the provided parameters
7778
7777
  createFilter: (s) => {
7779
7778
  try {
7780
- const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new jt({
7779
+ const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new Vt({
7781
7780
  center: i,
7782
7781
  amplitude: r,
7783
7782
  wavelength: a,
@@ -7919,7 +7918,7 @@ f({
7919
7918
  }
7920
7919
  ]
7921
7920
  });
7922
- const { SimplexNoiseFilter: qt } = g;
7921
+ const { SimplexNoiseFilter: jt } = g;
7923
7922
  f({
7924
7923
  id: "simplex-noise",
7925
7924
  name: "Simplex Noise",
@@ -7927,7 +7926,7 @@ f({
7927
7926
  description: "Apply procedural noise to create texture effects",
7928
7927
  createFilter: (s) => {
7929
7928
  try {
7930
- const e = s.animating ? 0 : s.offsetZ || 0, t = new qt({
7929
+ const e = s.animating ? 0 : s.offsetZ || 0, t = new jt({
7931
7930
  strength: s.strength,
7932
7931
  noiseScale: s.noiseScale,
7933
7932
  offsetX: s.offsetX,
@@ -8074,9 +8073,9 @@ f({
8074
8073
  }
8075
8074
  ]
8076
8075
  });
8077
- class Ht extends w.Filter {
8076
+ class qt extends w.Filter {
8078
8077
  constructor(e) {
8079
- const t = ye.from({
8078
+ const t = be.from({
8080
8079
  vertex: `
8081
8080
  attribute vec2 aPosition;
8082
8081
  varying vec2 vTextureCoord;
@@ -8185,7 +8184,7 @@ f({
8185
8184
  description: "Creates a twisting distortion effect around a central point",
8186
8185
  createFilter: (s) => {
8187
8186
  try {
8188
- const e = new Ht({
8187
+ const e = new qt({
8189
8188
  centerX: s.centerX ?? 0.5,
8190
8189
  centerY: s.centerY ?? 0.5,
8191
8190
  radius: s.radius ?? 0.25,
@@ -8255,7 +8254,7 @@ f({
8255
8254
  }
8256
8255
  ]
8257
8256
  });
8258
- const { AdjustmentFilter: $t } = g;
8257
+ const { AdjustmentFilter: Ht } = g;
8259
8258
  function D(s) {
8260
8259
  const e = typeof s == "string" ? parseInt(s.replace("#", "0x"), 16) : s;
8261
8260
  return [
@@ -8264,7 +8263,7 @@ function D(s) {
8264
8263
  (e & 255) / 255
8265
8264
  ];
8266
8265
  }
8267
- class Wt extends $t {
8266
+ class $t extends Ht {
8268
8267
  constructor(e = {}) {
8269
8268
  super({
8270
8269
  brightness: 1,
@@ -8307,7 +8306,7 @@ f({
8307
8306
  description: "Add a classic darkened border effect to the image",
8308
8307
  createFilter: (s) => {
8309
8308
  try {
8310
- const e = new Wt({
8309
+ const e = new $t({
8311
8310
  radius: s.radius || 0.8,
8312
8311
  strength: s.strength || 1,
8313
8312
  color: s.color || "#000000"
@@ -8371,22 +8370,22 @@ f({
8371
8370
  }
8372
8371
  ]
8373
8372
  });
8374
- function ei(s) {
8373
+ function Jt(s) {
8375
8374
  try {
8376
8375
  let e = [], t = [];
8377
8376
  try {
8378
- e = U(), e.length === 0 && et();
8377
+ e = U(), e.length === 0 && Je();
8379
8378
  } catch {
8380
8379
  }
8381
8380
  const i = s == null ? void 0 : s.disabled;
8382
8381
  if (Array.isArray(i) && i.length > 0) {
8383
8382
  let r = 0;
8384
8383
  for (const a of i)
8385
- rt(a) && r++;
8384
+ it(a) && r++;
8386
8385
  r > 0;
8387
8386
  }
8388
8387
  try {
8389
- e = U(), t = it();
8388
+ e = U(), t = tt();
8390
8389
  } catch {
8391
8390
  e || (e = []), t || (t = []);
8392
8391
  }
@@ -8396,16 +8395,16 @@ function ei(s) {
8396
8395
  }
8397
8396
  }
8398
8397
  export {
8399
- Kt as V,
8400
- Je as a,
8401
- tt as b,
8402
- it as c,
8403
- et as d,
8404
- Jt as e,
8405
- st as f,
8398
+ Gt as V,
8399
+ Qe as a,
8400
+ et as b,
8401
+ tt as c,
8402
+ Je as d,
8403
+ Qt as e,
8404
+ rt as f,
8406
8405
  U as g,
8407
- Qt as h,
8408
- ei as i,
8406
+ Kt as h,
8407
+ Jt as i,
8409
8408
  f as r
8410
8409
  };
8411
- //# sourceMappingURL=editor-DrTmgu3R.js.map
8410
+ //# sourceMappingURL=editor-BgjKZltI.js.map