exodeui 6.3.24 → 6.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +13 -13
  2. package/dist/index.mjs +584 -582
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  var ys = Object.defineProperty;
2
2
  var bs = (p, t, i) => t in p ? ys(p, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : p[t] = i;
3
3
  var j = (p, t, i) => bs(p, typeof t != "symbol" ? t + "" : t, i);
4
- import { jsx as Me, jsxs as vs } from "react/jsx-runtime";
5
- import { forwardRef as Cs, useRef as Se, useState as ds, useImperativeHandle as Ss, useEffect as we, useCallback as ye } from "react";
6
- import { prepareWithSegments as Ge, layoutWithLines as Ms } from "@chenglou/pretext";
4
+ import { jsx as we, jsxs as vs } from "react/jsx-runtime";
5
+ import { forwardRef as Cs, useRef as Se, useState as ds, useImperativeHandle as Ss, useEffect as Me, useCallback as ye } from "react";
6
+ import { prepareWithSegments as Ge, layoutWithLines as ws } from "@chenglou/pretext";
7
7
  import se from "@dimforge/rapier2d-compat";
8
- import * as ws from "lz-string";
9
- var z = /* @__PURE__ */ ((p) => (p.Proximity = "Proximity", p.Magnetic = "Magnetic", p.Repel = "Repel", p.Orbit = "Orbit", p.Vortex = "Vortex", p.Fluid = "Fluid", p.Elastic = "Elastic", p.Holographic = "Holographic", p.Sticky = "Sticky", p.Dilation = "Dilation", p.Parallax = "Parallax", p.Noise = "Noise", p.Float = "Float", p.Pulse = "Pulse", p.Draggable = "Draggable", p.Scroll = "Scroll", p.LookAt = "LookAt", p.Glint = "Glint", p.Scan = "Scan", p.Ratchet = "Ratchet", p.Jitter = "Jitter", p.Follower = "Follower", p.Wrap = "Wrap", p.Typewriter = "Typewriter", p.Scramble = "Scramble", p.Wave = "Wave", p.Bounce = "Bounce", p.TextTrail = "TextTrail", p.Reveal3D = "Reveal3D", p.RevealSlide = "RevealSlide", p.RevealBlur = "RevealBlur", p.TextLiquid = "TextLiquid", p.TextVortex = "TextVortex", p.TextExplosion = "TextExplosion", p.TextRain = "TextRain", p.TextGravity = "TextGravity", p.TextMatrix = "TextMatrix", p.TextNeon = "TextNeon", p.TextDissolve = "TextDissolve", p.TextOrganic = "TextOrganic", p.TextBreathe = "TextBreathe", p.TextSpin = "TextSpin", p.TextMagnet = "TextMagnet", p.TextPerspective = "TextPerspective", p.TextMirror = "TextMirror", p.TextFloral = "TextFloral", p.TextSmoke = "TextSmoke", p.TextVariable = "TextVariable", p.TextZing = "TextZing", p.TextElastic = "TextElastic", p.TextGlitch3D = "TextGlitch3D", p.GlitchText = "GlitchText", p.TextCounter = "TextCounter", p.Squash = "Squash", p.Spotlight = "Spotlight", p.Lens = "Lens", p.Gravity = "Gravity", p.Velocity = "Velocity", p.Shear = "Shear", p.LayoutAnimation = "LayoutAnimation", p.SpringChain = "SpringChain", p.ParticleEmitter = "ParticleEmitter", p.StateReactive = "StateReactive", p.Fold = "Fold", p.Crumple = "Crumple", p.GraphPathDraw = "GraphPathDraw", p.GraphWipeReveal = "GraphWipeReveal", p.GraphPointPop = "GraphPointPop", p.GraphGradientFlow = "GraphGradientFlow", p))(z || {}), ie = /* @__PURE__ */ ((p) => (p.Scale = "Scale", p.Opacity = "Opacity", p.RotateZ = "RotateZ", p.RotateX = "RotateX", p.RotateY = "RotateY", p.PositionX = "PositionX", p.PositionY = "PositionY", p.SkewX = "SkewX", p.Blur = "Blur", p.Exposure = "Exposure", p.HueShift = "HueShift", p.Negative = "Negative", p.CornerRadius = "CornerRadius", p.StrokeWidth = "StrokeWidth", p.BoxShadow = "BoxShadow", p.FontSize = "FontSize", p.LetterSpacing = "LetterSpacing", p))(ie || {}), Is = /* @__PURE__ */ ((p) => (p.Equal = "Equal", p.NotEqual = "NotEqual", p.GreaterThan = "GreaterThan", p.LessThan = "LessThan", p.GreaterEqual = "GreaterEqual", p.LessEqual = "LessEqual", p.IsTrue = "IsTrue", p.IsFalse = "IsFalse", p))(Is || {}), wt = /* @__PURE__ */ ((p) => (p.AND = "AND", p.OR = "OR", p.NOT = "NOT", p.XOR = "XOR", p.OBJECT = "OBJECT", p.PROPERTY = "PROPERTY", p.GET_PROPERTY = "GET_PROPERTY", p.SET_PROPERTY = "SET_PROPERTY", p.ADD = "ADD", p.SUB = "SUB", p.MUL = "MUL", p.DIV = "DIV", p.MOD = "MOD", p.POW = "POW", p.ABS = "ABS", p.ROUND = "ROUND", p.FLOOR = "FLOOR", p.CEIL = "CEIL", p.SIN = "SIN", p.COS = "COS", p.TAN = "TAN", p.CLAMP = "CLAMP", p.REMAP = "REMAP", p.EQ = "EQ", p.NEQ = "NEQ", p.GT = "GT", p.LT = "LT", p.GTE = "GTE", p.LTE = "LTE", p.IF_ELSE = "IF_ELSE", p.VALUE = "VALUE", p.INPUT = "INPUT", p.LOG = "LOG", p.SCROLL_X = "SCROLL_X", p.SCROLL_Y = "SCROLL_Y", p.MOUSE_X = "MOUSE_X", p.MOUSE_Y = "MOUSE_Y", p.IS_MOUSE_DOWN = "IS_MOUSE_DOWN", p.EFFECTOR = "EFFECTOR", p.MONITOR = "MONITOR", p.DELAY = "DELAY", p.SPRING_PULL = "SPRING_PULL", p.SPRING_SETTLE = "SPRING_SETTLE", p.EMIT = "EMIT", p))(wt || {});
8
+ import * as Ms from "lz-string";
9
+ var z = /* @__PURE__ */ ((p) => (p.Proximity = "Proximity", p.Magnetic = "Magnetic", p.Repel = "Repel", p.Orbit = "Orbit", p.Vortex = "Vortex", p.Fluid = "Fluid", p.Elastic = "Elastic", p.Holographic = "Holographic", p.Sticky = "Sticky", p.Dilation = "Dilation", p.Parallax = "Parallax", p.Noise = "Noise", p.Float = "Float", p.Pulse = "Pulse", p.Draggable = "Draggable", p.Scroll = "Scroll", p.LookAt = "LookAt", p.Glint = "Glint", p.Scan = "Scan", p.Ratchet = "Ratchet", p.Jitter = "Jitter", p.Follower = "Follower", p.Wrap = "Wrap", p.Typewriter = "Typewriter", p.Scramble = "Scramble", p.Wave = "Wave", p.Bounce = "Bounce", p.TextTrail = "TextTrail", p.Reveal3D = "Reveal3D", p.RevealSlide = "RevealSlide", p.RevealBlur = "RevealBlur", p.TextLiquid = "TextLiquid", p.TextVortex = "TextVortex", p.TextExplosion = "TextExplosion", p.TextRain = "TextRain", p.TextGravity = "TextGravity", p.TextMatrix = "TextMatrix", p.TextNeon = "TextNeon", p.TextDissolve = "TextDissolve", p.TextOrganic = "TextOrganic", p.TextBreathe = "TextBreathe", p.TextSpin = "TextSpin", p.TextMagnet = "TextMagnet", p.TextPerspective = "TextPerspective", p.TextMirror = "TextMirror", p.TextFloral = "TextFloral", p.TextSmoke = "TextSmoke", p.TextVariable = "TextVariable", p.TextZing = "TextZing", p.TextElastic = "TextElastic", p.TextGlitch3D = "TextGlitch3D", p.GlitchText = "GlitchText", p.TextCounter = "TextCounter", p.Squash = "Squash", p.Spotlight = "Spotlight", p.Lens = "Lens", p.Gravity = "Gravity", p.Velocity = "Velocity", p.Shear = "Shear", p.LayoutAnimation = "LayoutAnimation", p.SpringChain = "SpringChain", p.ParticleEmitter = "ParticleEmitter", p.StateReactive = "StateReactive", p.Fold = "Fold", p.Crumple = "Crumple", p.GraphPathDraw = "GraphPathDraw", p.GraphWipeReveal = "GraphWipeReveal", p.GraphPointPop = "GraphPointPop", p.GraphGradientFlow = "GraphGradientFlow", p))(z || {}), ie = /* @__PURE__ */ ((p) => (p.Scale = "Scale", p.Opacity = "Opacity", p.RotateZ = "RotateZ", p.RotateX = "RotateX", p.RotateY = "RotateY", p.PositionX = "PositionX", p.PositionY = "PositionY", p.SkewX = "SkewX", p.Blur = "Blur", p.Exposure = "Exposure", p.HueShift = "HueShift", p.Negative = "Negative", p.CornerRadius = "CornerRadius", p.StrokeWidth = "StrokeWidth", p.BoxShadow = "BoxShadow", p.FontSize = "FontSize", p.LetterSpacing = "LetterSpacing", p))(ie || {}), Is = /* @__PURE__ */ ((p) => (p.Equal = "Equal", p.NotEqual = "NotEqual", p.GreaterThan = "GreaterThan", p.LessThan = "LessThan", p.GreaterEqual = "GreaterEqual", p.LessEqual = "LessEqual", p.IsTrue = "IsTrue", p.IsFalse = "IsFalse", p))(Is || {}), Mt = /* @__PURE__ */ ((p) => (p.AND = "AND", p.OR = "OR", p.NOT = "NOT", p.XOR = "XOR", p.OBJECT = "OBJECT", p.PROPERTY = "PROPERTY", p.GET_PROPERTY = "GET_PROPERTY", p.SET_PROPERTY = "SET_PROPERTY", p.ADD = "ADD", p.SUB = "SUB", p.MUL = "MUL", p.DIV = "DIV", p.MOD = "MOD", p.POW = "POW", p.ABS = "ABS", p.ROUND = "ROUND", p.FLOOR = "FLOOR", p.CEIL = "CEIL", p.SIN = "SIN", p.COS = "COS", p.TAN = "TAN", p.CLAMP = "CLAMP", p.REMAP = "REMAP", p.EQ = "EQ", p.NEQ = "NEQ", p.GT = "GT", p.LT = "LT", p.GTE = "GTE", p.LTE = "LTE", p.IF_ELSE = "IF_ELSE", p.VALUE = "VALUE", p.INPUT = "INPUT", p.LOG = "LOG", p.SCROLL_X = "SCROLL_X", p.SCROLL_Y = "SCROLL_Y", p.MOUSE_X = "MOUSE_X", p.MOUSE_Y = "MOUSE_Y", p.IS_MOUSE_DOWN = "IS_MOUSE_DOWN", p.EFFECTOR = "EFFECTOR", p.MONITOR = "MONITOR", p.DELAY = "DELAY", p.SPRING_PULL = "SPRING_PULL", p.SPRING_SETTLE = "SPRING_SETTLE", p.EMIT = "EMIT", p))(Mt || {});
10
10
  function ks(p) {
11
11
  if (p.length < 5) return p;
12
12
  const t = new Set("aeiouyAEIOUY".split(""));
@@ -22,10 +22,10 @@ function ks(p) {
22
22
  function Ts(p) {
23
23
  return p.replace(/\b([a-zA-Z]{4,})\b/g, (t, i) => ks(i));
24
24
  }
25
- function Ps(p, t, i) {
25
+ function _s(p, t, i) {
26
26
  return p;
27
27
  }
28
- function _s(p, t, i) {
28
+ function Ps(p, t, i) {
29
29
  return p;
30
30
  }
31
31
  const Ee = /* @__PURE__ */ new Map();
@@ -47,35 +47,35 @@ function us(p) {
47
47
  enableSegments: d = !1
48
48
  } = p;
49
49
  let l = String(t || "");
50
- c === "uppercase" ? l = l.toUpperCase() : c === "lowercase" ? l = l.toLowerCase() : c === "capitalize" && (l = l.replace(/\b\w/g, (P) => P.toUpperCase())), p.hyphenation === !0 && (l = Ts(l));
50
+ c === "uppercase" ? l = l.toUpperCase() : c === "lowercase" ? l = l.toLowerCase() : c === "capitalize" && (l = l.replace(/\b\w/g, (_) => _.toUpperCase())), p.hyphenation === !0 && (l = Ts(l));
51
51
  const u = `${s} ${e} ${o}px "${i}", sans-serif`, y = `${l}|${u}|${r}|${f}|${h}|${d}|${JSON.stringify(g)}|hyp:${!!p.hyphenation}|comp:${p.composer}|bal:${!!p.balanceRaggedLines}`;
52
52
  let m = Ee.get(y);
53
- const b = typeof CanvasRenderingContext2D < "u" ? CanvasRenderingContext2D.prototype.measureText : null, v = function(P) {
53
+ const b = typeof CanvasRenderingContext2D < "u" ? CanvasRenderingContext2D.prototype.measureText : null, v = function(_) {
54
54
  if (!b) return { width: 0, fontBoundingBoxAscent: 0, fontBoundingBoxDescent: 0 };
55
- const E = b.call(this, P);
56
- return r !== 0 && P && P.length > 0 ? {
55
+ const E = b.call(this, _);
56
+ return r !== 0 && _ && _.length > 0 ? {
57
57
  ...E,
58
- width: E.width + (P.length - 1) * r
58
+ width: E.width + (_.length - 1) * r
59
59
  } : E;
60
60
  };
61
61
  if (!m) {
62
62
  try {
63
63
  if (r !== 0 && typeof CanvasRenderingContext2D < "u" && (CanvasRenderingContext2D.prototype.measureText = v), d && g && g.length > 0) {
64
- const P = g.map((E) => {
64
+ const _ = g.map((E) => {
65
65
  let F = E.text || "";
66
66
  const T = E.textCase || c || "none";
67
- return T === "uppercase" ? F.toUpperCase() : T === "lowercase" ? F.toLowerCase() : T === "capitalize" ? F.replace(/\b\w/g, (_) => _.toUpperCase()) : F;
67
+ return T === "uppercase" ? F.toUpperCase() : T === "lowercase" ? F.toLowerCase() : T === "capitalize" ? F.replace(/\b\w/g, (P) => P.toUpperCase()) : F;
68
68
  }).join("");
69
- if (m = Ge(P, u), m) {
69
+ if (m = Ge(_, u), m) {
70
70
  let E = 0, F = o;
71
71
  for (const T of g) {
72
- let _ = T.text || "";
73
- if (!_) continue;
72
+ let P = T.text || "";
73
+ if (!P) continue;
74
74
  const L = T.textCase || c || "none";
75
- L === "uppercase" ? _ = _.toUpperCase() : L === "lowercase" ? _ = _.toLowerCase() : L === "capitalize" && (_ = _.replace(/\b\w/g, (A) => A.toUpperCase()));
75
+ L === "uppercase" ? P = P.toUpperCase() : L === "lowercase" ? P = P.toLowerCase() : L === "capitalize" && (P = P.replace(/\b\w/g, (A) => A.toUpperCase()));
76
76
  const R = T.fontSize || o;
77
77
  R > F && (F = R);
78
- const W = `${T.fontStyle || s} ${T.fontWeight || e} ${R}px "${T.fontFamily || i}", sans-serif`, B = Ge(_, W);
78
+ const W = `${T.fontStyle || s} ${T.fontWeight || e} ${R}px "${T.fontFamily || i}", sans-serif`, B = Ge(P, W);
79
79
  if (B && B.widths)
80
80
  for (let A = 0; A < B.widths.length; A++) {
81
81
  const $ = E + A;
@@ -83,73 +83,73 @@ function us(p) {
83
83
  m.widths[$] = B.widths[A];
84
84
  const G = B.kinds[A];
85
85
  if (G === 2) {
86
- const N = _[A];
86
+ const N = P[A];
87
87
  N === `
88
88
  ` || N === "\r" ? m.kinds[$] = 2 : m.kinds[$] = 0;
89
89
  } else
90
90
  m.kinds[$] = G;
91
91
  }
92
92
  }
93
- E += _.length;
93
+ E += P.length;
94
94
  }
95
- m.fullText = P, m.maxFontSize = F;
95
+ m.fullText = _, m.maxFontSize = F;
96
96
  }
97
97
  } else
98
98
  m = Ge(l, u);
99
99
  m && Ee.set(y, m);
100
- } catch (P) {
101
- return console.error("[ExodeUI] Pretext prepare failed:", P), { width: a, height: 0, lineCount: 0, lines: [] };
100
+ } catch (_) {
101
+ return console.error("[ExodeUI] Pretext prepare failed:", _), { width: a, height: 0, lineCount: 0, lines: [] };
102
102
  } finally {
103
103
  r !== 0 && typeof CanvasRenderingContext2D < "u" && b && (CanvasRenderingContext2D.prototype.measureText = b);
104
104
  }
105
105
  if (Ee.size > 500) {
106
- const P = Ee.keys().next().value;
107
- P && Ee.delete(P);
106
+ const _ = Ee.keys().next().value;
107
+ _ && Ee.delete(_);
108
108
  }
109
109
  }
110
110
  if (h > 0 && m && m.widths && !m.indentApplied) {
111
- const P = [...m.widths], E = m.fullText || l;
111
+ const _ = [...m.widths], E = m.fullText || l;
112
112
  let F = !0;
113
113
  for (let T = 0; T < E.length; T++)
114
- F && P[T] !== void 0 && (P[T] += h, F = !1), (E[T] === `
114
+ F && _[T] !== void 0 && (_[T] += h, F = !1), (E[T] === `
115
115
  ` || E[T] === "\r") && (F = !0, E[T] === "\r" && E[T + 1] === `
116
116
  ` && T++);
117
- m = { ...m, widths: P, indentApplied: !0 };
117
+ m = { ...m, widths: _, indentApplied: !0 };
118
118
  }
119
119
  if (!m) return { width: a, height: 0, lineCount: 0, lines: [] };
120
120
  let C = n;
121
121
  typeof C == "string" && (C = parseFloat(C)), C > 5 && o > 0 && (C = C / o), r !== 0 && (CanvasRenderingContext2D.prototype.measureText = v);
122
122
  let S;
123
123
  try {
124
- const P = m.maxFontSize || o;
124
+ const _ = m.maxFontSize || o;
125
125
  if (a >= 1e5) {
126
126
  const E = l.split(/\r\n|\r|\n/);
127
127
  S = {
128
128
  lines: E.map((F) => ({ text: F, width: 0 })),
129
129
  // Width will be measured below
130
- height: E.length * (C * P),
130
+ height: E.length * (C * _),
131
131
  lineCount: E.length
132
132
  };
133
133
  } else
134
- S = Ms(m, a, C * P);
134
+ S = ws(m, a, C * _);
135
135
  } finally {
136
136
  r !== 0 && b && (CanvasRenderingContext2D.prototype.measureText = b);
137
137
  }
138
- let w = (S == null ? void 0 : S.height) !== void 0 && S.height > 0 ? S.height : (((I = S == null ? void 0 : S.lines) == null ? void 0 : I.length) || 0) * C * o;
138
+ let M = (S == null ? void 0 : S.height) !== void 0 && S.height > 0 ? S.height : (((I = S == null ? void 0 : S.lines) == null ? void 0 : I.length) || 0) * C * o;
139
139
  if (f > 0 && S && S.lines && S.lines.length > 1) {
140
- let P = 0;
140
+ let _ = 0;
141
141
  const E = m.fullText || t;
142
142
  for (let F = 0; F < S.lines.length - 1; F++)
143
- P += S.lines[F].text.length, (E[P] === `
144
- ` || E[P] === "\r") && (w += f, P++, E[P - 1] === "\r" && E[P] === `
145
- ` && P++);
143
+ _ += S.lines[F].text.length, (E[_] === `
144
+ ` || E[_] === "\r") && (M += f, _++, E[_ - 1] === "\r" && E[_] === `
145
+ ` && _++);
146
146
  }
147
- let M = (S == null ? void 0 : S.lines) || [];
148
- return p.composer === "every-line" && M.length > 1 && (M = Ps(M)), p.balanceRaggedLines === !0 && M.length > 1 && (M = _s(M)), {
147
+ let w = (S == null ? void 0 : S.lines) || [];
148
+ return p.composer === "every-line" && w.length > 1 && (w = _s(w)), p.balanceRaggedLines === !0 && w.length > 1 && (w = Ps(w)), {
149
149
  width: a,
150
- height: w,
151
- lineCount: M.length,
152
- lines: M
150
+ height: M,
151
+ lineCount: w.length,
152
+ lines: w
153
153
  };
154
154
  }
155
155
  function es(p, t, i) {
@@ -182,7 +182,7 @@ function ss(p, t, i) {
182
182
  }
183
183
  }
184
184
  function Es(p, t, i) {
185
- var _, L;
185
+ var P, L;
186
186
  const o = p.autoLayout, { direction: e, spacing: s, padding: n, align: a, wrap: r } = o, f = e === "vertical", h = t.map((R) => {
187
187
  const W = i(R.id), B = R.geometry;
188
188
  let A = (W == null ? void 0 : W.width) ?? B.width ?? 100, $ = (W == null ? void 0 : W.height) ?? B.height ?? 100;
@@ -210,21 +210,21 @@ function Es(p, t, i) {
210
210
  return A *= R.transform.scale_x || 1, $ *= R.transform.scale_y || 1, { id: R.id, w: A, h: $, original: R };
211
211
  });
212
212
  let c = p.width, g = p.height;
213
- const d = ((_ = p.layoutProps) == null ? void 0 : _.width) === "hug", l = ((L = p.layoutProps) == null ? void 0 : L.height) === "hug", u = [];
213
+ const d = ((P = p.layoutProps) == null ? void 0 : P.width) === "hug", l = ((L = p.layoutProps) == null ? void 0 : L.height) === "hug", u = [];
214
214
  let y = [], m = 0, b = 0;
215
215
  const v = c - n.left - n.right, C = g - n.top - n.bottom;
216
216
  h.forEach((R) => {
217
217
  r && y.length > 0 && (f ? b + s + R.h > C : m + s + R.w > v) ? (u.push({ children: y, width: m, height: b }), y = [R], m = R.w, b = R.h) : (y.push(R), f ? (m = Math.max(m, R.w), b += (y.length > 1 ? s : 0) + R.h) : (m += (y.length > 1 ? s : 0) + R.w, b = Math.max(b, R.h)));
218
218
  }), y.length > 0 && u.push({ children: y, width: m, height: b }), d && !f && (c = Math.max(...u.map((R) => R.width), 0) + n.left + n.right), l && f && (g = Math.max(...u.map((R) => R.height), 0) + n.top + n.bottom);
219
219
  const S = [];
220
- let w = n.left, M = n.top;
221
- const I = a.toLowerCase(), P = I === "center" || I.endsWith("-center"), E = I.endsWith("-right"), F = I === "center" || I.startsWith("center-"), T = I.startsWith("bottom-");
220
+ let M = n.left, w = n.top;
221
+ const I = a.toLowerCase(), _ = I === "center" || I.endsWith("-center"), E = I.endsWith("-right"), F = I === "center" || I.startsWith("center-"), T = I.startsWith("bottom-");
222
222
  return u.forEach((R) => {
223
- let W = w, B = M;
224
- f ? F ? B = n.top + (g - n.top - n.bottom - R.height) / 2 : T && (B = g - n.bottom - R.height) : P ? W = n.left + (c - n.left - n.right - R.width) / 2 : E && (W = c - n.right - R.width), R.children.forEach((A) => {
223
+ let W = M, B = w;
224
+ f ? F ? B = n.top + (g - n.top - n.bottom - R.height) / 2 : T && (B = g - n.bottom - R.height) : _ ? W = n.left + (c - n.left - n.right - R.width) / 2 : E && (W = c - n.right - R.width), R.children.forEach((A) => {
225
225
  var k, Y;
226
226
  let $ = W, G = B;
227
- f ? P ? $ += (R.width - A.w) / 2 : E && ($ += R.width - A.w) : F ? G += (R.height - A.h) / 2 : T && (G += R.height - A.h);
227
+ f ? _ ? $ += (R.width - A.w) / 2 : E && ($ += R.width - A.w) : F ? G += (R.height - A.h) / 2 : T && (G += R.height - A.h);
228
228
  const N = ((k = A.original.layoutProps) == null ? void 0 : k.width) === "fill", x = ((Y = A.original.layoutProps) == null ? void 0 : Y.height) === "fill";
229
229
  S.push({
230
230
  id: A.id,
@@ -233,7 +233,7 @@ function Es(p, t, i) {
233
233
  width: N && f ? R.width : void 0,
234
234
  height: x ? f ? void 0 : R.height : void 0
235
235
  }), f ? B += A.h + s : W += A.w + s;
236
- }), f ? w += R.width + s : M += R.height + s;
236
+ }), f ? M += R.width + s : w += R.height + s;
237
237
  }), { frameWidth: d ? c : void 0, frameHeight: l ? g : void 0, childUpdates: S };
238
238
  }
239
239
  function xs(p, t, i) {
@@ -241,16 +241,16 @@ function xs(p, t, i) {
241
241
  if (!o) return { childUpdates: [] };
242
242
  const { gridColumns: e, gridRows: s, columnGap: n = 0, rowGap: a = 0, padding: r, align: f } = o;
243
243
  let h = p.width, c = p.height;
244
- const g = h - r.left - r.right, d = c - r.top - r.bottom, l = es(e || "1fr", g, n), u = es(s || "auto", d, a), y = l.length > 0 ? l.reduce((E, F) => E + F, 0) + (l.length - 1) * n : 0, m = u.length > 0 ? u.reduce((E, F) => E + F, 0) + (u.length - 1) * a : 0, b = f.toLowerCase(), v = b === "center" || b.endsWith("-center"), C = b.endsWith("-right"), S = b === "center" || b.startsWith("center-"), w = b.startsWith("bottom-");
245
- let M = 0, I = 0;
246
- v ? M = (g - y) / 2 : C && (M = g - y), S ? I = (d - m) / 2 : w && (I = d - m);
247
- const P = [];
244
+ const g = h - r.left - r.right, d = c - r.top - r.bottom, l = es(e || "1fr", g, n), u = es(s || "auto", d, a), y = l.length > 0 ? l.reduce((E, F) => E + F, 0) + (l.length - 1) * n : 0, m = u.length > 0 ? u.reduce((E, F) => E + F, 0) + (u.length - 1) * a : 0, b = f.toLowerCase(), v = b === "center" || b.endsWith("-center"), C = b.endsWith("-right"), S = b === "center" || b.startsWith("center-"), M = b.startsWith("bottom-");
245
+ let w = 0, I = 0;
246
+ v ? w = (g - y) / 2 : C && (w = g - y), S ? I = (d - m) / 2 : M && (I = d - m);
247
+ const _ = [];
248
248
  return t.forEach((E, F) => {
249
249
  var Y, X;
250
- const T = F % l.length || 0, _ = Math.floor(F / l.length) || 0;
251
- _ >= u.length && u.push(100);
252
- const L = l[T], R = u[_];
253
- let W = r.left + M + l.slice(0, T).reduce((J, tt) => J + tt + n, 0), B = r.top + I + u.slice(0, _).reduce((J, tt) => J + tt + a, 0);
250
+ const T = F % l.length || 0, P = Math.floor(F / l.length) || 0;
251
+ P >= u.length && u.push(100);
252
+ const L = l[T], R = u[P];
253
+ let W = r.left + w + l.slice(0, T).reduce((J, tt) => J + tt + n, 0), B = r.top + I + u.slice(0, P).reduce((J, tt) => J + tt + a, 0);
254
254
  const A = i(E.id), $ = E.geometry;
255
255
  let G = (A == null ? void 0 : A.width) ?? $.width ?? 100, N = (A == null ? void 0 : A.height) ?? $.height ?? 100;
256
256
  if ($.type === "Ellipse" || $.type === "Polygon" || $.type === "Star") {
@@ -259,14 +259,14 @@ function xs(p, t, i) {
259
259
  }
260
260
  G *= E.transform.scale_x || 1, N *= E.transform.scale_y || 1;
261
261
  let x = W, k = B;
262
- v ? x += (L - G) / 2 : C && (x += L - G), S ? k += (R - N) / 2 : w && (k += R - N), P.push({
262
+ v ? x += (L - G) / 2 : C && (x += L - G), S ? k += (R - N) / 2 : M && (k += R - N), _.push({
263
263
  id: E.id,
264
264
  x: x + G / 2 - h / 2,
265
265
  y: k + N / 2 - c / 2,
266
266
  width: ((Y = E.layoutProps) == null ? void 0 : Y.width) === "fill" ? L : void 0,
267
267
  height: ((X = E.layoutProps) == null ? void 0 : X.height) === "fill" ? R : void 0
268
268
  });
269
- }), { childUpdates: P };
269
+ }), { childUpdates: _ };
270
270
  }
271
271
  class As {
272
272
  constructor() {
@@ -576,25 +576,25 @@ const ps = (p) => p, Rs = (p) => p > 0 ? 1 : 0, Ls = (p) => p < 1 ? 0 : 1, is =
576
576
  let c = 0, g = 0;
577
577
  const d = o.rotation * Math.PI / 180, l = Math.cos(d), u = Math.sin(d), y = r * s * l - f * n * u + o.x, m = r * s * u + f * n * l + o.y;
578
578
  h.forEach((I) => {
579
- const P = e(I.boneId);
580
- if (!P) return;
579
+ const _ = e(I.boneId);
580
+ if (!_) return;
581
581
  const E = {
582
- x: P.x,
583
- y: P.y,
584
- rotation: P.rotation,
585
- scaleX: P.scale_x ?? 1,
586
- scaleY: P.scale_y ?? 1
587
- }, F = i[I.boneId] || [1, 0, 0, 1, 0, 0], T = y * F[0] + m * F[2] + F[4], _ = y * F[1] + m * F[3] + F[5], L = E.rotation * Math.PI / 180, R = Math.cos(L), W = Math.sin(L), B = T * E.scaleX * R - _ * E.scaleY * W + E.x, A = T * E.scaleX * W + _ * E.scaleY * R + E.y;
582
+ x: _.x,
583
+ y: _.y,
584
+ rotation: _.rotation,
585
+ scaleX: _.scale_x ?? 1,
586
+ scaleY: _.scale_y ?? 1
587
+ }, F = i[I.boneId] || [1, 0, 0, 1, 0, 0], T = y * F[0] + m * F[2] + F[4], P = y * F[1] + m * F[3] + F[5], L = E.rotation * Math.PI / 180, R = Math.cos(L), W = Math.sin(L), B = T * E.scaleX * R - P * E.scaleY * W + E.x, A = T * E.scaleX * W + P * E.scaleY * R + E.y;
588
588
  c += B * I.amount, g += A * I.amount;
589
589
  });
590
- const b = [...h].sort((I, P) => P.amount - I.amount);
590
+ const b = [...h].sort((I, _) => _.amount - I.amount);
591
591
  if (b.length >= 2 && b[0].amount > 0 && b[1].amount > 0) {
592
- const I = e(b[0].boneId), P = e(b[1].boneId);
593
- if (I && P && I.length !== void 0 && P.length !== void 0) {
594
- const E = I.length * (I.scale_y ?? 1), F = I.rotation * Math.PI / 180, T = I.x - E * Math.sin(F), _ = I.y + E * Math.cos(F), L = P.length * (P.scale_y ?? 1), R = P.rotation * Math.PI / 180, W = P.x - L * Math.sin(R), B = P.y + L * Math.cos(R);
592
+ const I = e(b[0].boneId), _ = e(b[1].boneId);
593
+ if (I && _ && I.length !== void 0 && _.length !== void 0) {
594
+ const E = I.length * (I.scale_y ?? 1), F = I.rotation * Math.PI / 180, T = I.x - E * Math.sin(F), P = I.y + E * Math.cos(F), L = _.length * (_.scale_y ?? 1), R = _.rotation * Math.PI / 180, W = _.x - L * Math.sin(R), B = _.y + L * Math.cos(R);
595
595
  let A = null, $ = null, G = !1;
596
596
  const N = 1;
597
- if (Math.hypot(I.x - P.x, I.y - P.y) < N || Math.hypot(I.x - W, I.y - B) < N ? (A = I.x, $ = I.y) : (Math.hypot(T - P.x, _ - P.y) < N || Math.hypot(T - W, _ - B) < N) && (A = T, $ = _, G = !0), A !== null && $ !== null) {
597
+ if (Math.hypot(I.x - _.x, I.y - _.y) < N || Math.hypot(I.x - W, I.y - B) < N ? (A = I.x, $ = I.y) : (Math.hypot(T - _.x, P - _.y) < N || Math.hypot(T - W, P - B) < N) && (A = T, $ = P, G = !0), A !== null && $ !== null) {
598
598
  const x = i[b[0].boneId] || [1, 0, 0, 1, 0, 0], k = x[0] * x[3] - x[1] * x[2];
599
599
  let Y = 0, X = 0;
600
600
  if (k !== 0) {
@@ -607,17 +607,17 @@ const ps = (p) => p, Rs = (p) => p > 0 ? 1 : 0, Ls = (p) => p < 1 ? 0 : 1, is =
607
607
  }
608
608
  const Z = Math.hypot(y - Y, m - X), pt = Math.hypot(c - A, g - $);
609
609
  if (pt > 0 && Z > 0) {
610
- const at = Math.max(pt, 0.01), Et = Math.min(Z / at, 3), xt = A + (c - A) * Et, bt = $ + (g - $) * Et, Bt = b[0].amount, $t = b[1].amount, Pt = Math.min(Bt, $t) * 2, Vt = 1 - Math.pow(1 - Pt, 4);
610
+ const at = Math.max(pt, 0.01), Et = Math.min(Z / at, 3), xt = A + (c - A) * Et, bt = $ + (g - $) * Et, Bt = b[0].amount, $t = b[1].amount, _t = Math.min(Bt, $t) * 2, Vt = 1 - Math.pow(1 - _t, 4);
611
611
  c = c * (1 - Vt) + xt * Vt, g = g * (1 - Vt) + bt * Vt;
612
612
  }
613
613
  }
614
614
  }
615
615
  }
616
616
  }
617
- const v = o.rotation * Math.PI / 180, C = Math.cos(v), S = Math.sin(v), w = c - o.x, M = g - o.y;
617
+ const v = o.rotation * Math.PI / 180, C = Math.cos(v), S = Math.sin(v), M = c - o.x, w = g - o.y;
618
618
  return {
619
- x: (w * C + M * S) / s,
620
- y: (-w * S + M * C) / n
619
+ x: (M * C + w * S) / s,
620
+ y: (-M * S + w * C) / n
621
621
  };
622
622
  };
623
623
  return p.map((r, f) => {
@@ -661,12 +661,12 @@ function hi(p, t, i, o, e, s, n = 0, a = 0) {
661
661
  }
662
662
  } else if (f === "Triangle") {
663
663
  const l = { x: 0, y: -i / 2 }, u = { x: t / 2, y: i / 2 }, y = { x: -t / 2, y: i / 2 }, m = 20;
664
- let b = u.x - l.x, v = u.y - l.y, C = Math.hypot(b, v), S = -v / C, w = b / C;
665
- for (let M = 0; M < m; M++) r.push({ x: l.x + b * (M / m), y: l.y + v * (M / m), nx: S, ny: w });
666
- b = y.x - u.x, v = y.y - u.y, C = Math.hypot(b, v), S = -v / C, w = b / C;
667
- for (let M = 0; M < m; M++) r.push({ x: u.x + b * (M / m), y: u.y + v * (M / m), nx: S, ny: w });
668
- b = l.x - y.x, v = l.y - y.y, C = Math.hypot(b, v), S = -v / C, w = b / C;
669
- for (let M = 0; M < m; M++) r.push({ x: y.x + b * (M / m), y: y.y + v * (M / m), nx: S, ny: w });
664
+ let b = u.x - l.x, v = u.y - l.y, C = Math.hypot(b, v), S = -v / C, M = b / C;
665
+ for (let w = 0; w < m; w++) r.push({ x: l.x + b * (w / m), y: l.y + v * (w / m), nx: S, ny: M });
666
+ b = y.x - u.x, v = y.y - u.y, C = Math.hypot(b, v), S = -v / C, M = b / C;
667
+ for (let w = 0; w < m; w++) r.push({ x: u.x + b * (w / m), y: u.y + v * (w / m), nx: S, ny: M });
668
+ b = l.x - y.x, v = l.y - y.y, C = Math.hypot(b, v), S = -v / C, M = b / C;
669
+ for (let w = 0; w < m; w++) r.push({ x: y.x + b * (w / m), y: y.y + v * (w / m), nx: S, ny: M });
670
670
  } else
671
671
  for (let u = 0; u < 80; u++) {
672
672
  const y = u / 80 * Math.PI * 2, m = Math.cos(y), b = Math.sin(y);
@@ -984,30 +984,30 @@ class fi {
984
984
  break;
985
985
  case "C":
986
986
  for (; m < l.length; ) {
987
- const C = v(), S = v(), w = v();
987
+ const C = v(), S = v(), M = v();
988
988
  if (e.length > 0) {
989
- const M = e[e.length - 1];
990
- M.out_x = C.x, M.out_y = C.y;
989
+ const w = e[e.length - 1];
990
+ w.out_x = C.x, w.out_y = C.y;
991
991
  }
992
- n = w.x, a = w.y, e.push({ x: n, y: a, in_x: S.x, in_y: S.y, out_x: n, out_y: a }), r = S.x, f = S.y;
992
+ n = M.x, a = M.y, e.push({ x: n, y: a, in_x: S.x, in_y: S.y, out_x: n, out_y: a }), r = S.x, f = S.y;
993
993
  }
994
994
  break;
995
995
  case "S":
996
996
  for (; m < l.length; ) {
997
- const C = { x: 2 * n - r, y: 2 * a - f }, S = v(), w = v();
997
+ const C = { x: 2 * n - r, y: 2 * a - f }, S = v(), M = v();
998
998
  if (e.length > 0) {
999
- const M = e[e.length - 1];
1000
- M.out_x = C.x, M.out_y = C.y;
999
+ const w = e[e.length - 1];
1000
+ w.out_x = C.x, w.out_y = C.y;
1001
1001
  }
1002
- n = w.x, a = w.y, e.push({ x: n, y: a, in_x: S.x, in_y: S.y, out_x: n, out_y: a }), r = S.x, f = S.y;
1002
+ n = M.x, a = M.y, e.push({ x: n, y: a, in_x: S.x, in_y: S.y, out_x: n, out_y: a }), r = S.x, f = S.y;
1003
1003
  }
1004
1004
  break;
1005
1005
  case "Q":
1006
1006
  for (; m < l.length; ) {
1007
1007
  const C = v(), S = v();
1008
1008
  if (e.length > 0) {
1009
- const w = e[e.length - 1];
1010
- w.out_x = w.x + 2 / 3 * (C.x - w.x), w.out_y = w.y + 2 / 3 * (C.y - w.y);
1009
+ const M = e[e.length - 1];
1010
+ M.out_x = M.x + 2 / 3 * (C.x - M.x), M.out_y = M.y + 2 / 3 * (C.y - M.y);
1011
1011
  }
1012
1012
  n = S.x, a = S.y, e.push({ x: n, y: a, in_x: n + 2 / 3 * (C.x - n), in_y: a + 2 / 3 * (C.y - a), out_x: n, out_y: a }), r = C.x, f = C.y;
1013
1013
  }
@@ -1016,8 +1016,8 @@ class fi {
1016
1016
  for (; m < l.length; ) {
1017
1017
  const C = { x: 2 * n - r, y: 2 * a - f }, S = v();
1018
1018
  if (e.length > 0) {
1019
- const w = e[e.length - 1];
1020
- w.out_x = w.x + 2 / 3 * (C.x - w.x), w.out_y = w.y + 2 / 3 * (C.y - w.y);
1019
+ const M = e[e.length - 1];
1020
+ M.out_x = M.x + 2 / 3 * (C.x - M.x), M.out_y = M.y + 2 / 3 * (C.y - M.y);
1021
1021
  }
1022
1022
  n = S.x, a = S.y, e.push({ x: n, y: a, in_x: n + 2 / 3 * (C.x - n), in_y: a + 2 / 3 * (C.y - a), out_x: n, out_y: a }), r = C.x, f = C.y;
1023
1023
  }
@@ -1026,7 +1026,7 @@ class fi {
1026
1026
  if (s = !0, e.length > 0) {
1027
1027
  const C = e[e.length - 1];
1028
1028
  C.closePath = !0;
1029
- const S = [...e].reverse().find((w) => w.moveTo) || e[0];
1029
+ const S = [...e].reverse().find((M) => M.moveTo) || e[0];
1030
1030
  S && Math.hypot(S.x - C.x, S.y - C.y) < 0.1 && (S.in_x = C.in_x, S.in_y = C.in_y, e.pop(), e.length > 0 && (e[e.length - 1].closePath = !0));
1031
1031
  }
1032
1032
  n = h, a = c;
@@ -1153,7 +1153,7 @@ class fi {
1153
1153
  if (t && typeof t == "object" && !Array.isArray(t)) {
1154
1154
  if (t._compressed && t._data)
1155
1155
  try {
1156
- const o = ws.decompressFromBase64(t._data);
1156
+ const o = Ms.decompressFromBase64(t._data);
1157
1157
  if (o)
1158
1158
  return o;
1159
1159
  } catch (o) {
@@ -1572,24 +1572,24 @@ class fi {
1572
1572
  };
1573
1573
  let l = 0;
1574
1574
  switch (e.op) {
1575
- case wt.AND:
1575
+ case Mt.AND:
1576
1576
  l = d("a", !1) && d("b", !1);
1577
1577
  break;
1578
- case wt.OR:
1578
+ case Mt.OR:
1579
1579
  l = d("a", !1) || d("b", !1);
1580
1580
  break;
1581
- case wt.NOT:
1581
+ case Mt.NOT:
1582
1582
  l = !d("in", !1);
1583
1583
  break;
1584
- case wt.XOR:
1584
+ case Mt.XOR:
1585
1585
  l = !!d("a", !1) != !!d("b", !1);
1586
1586
  break;
1587
1587
  // Object & Property
1588
- case wt.OBJECT:
1588
+ case Mt.OBJECT:
1589
1589
  l = e.name;
1590
1590
  break;
1591
- case wt.PROPERTY:
1592
- case wt.GET_PROPERTY: {
1591
+ case Mt.PROPERTY:
1592
+ case Mt.GET_PROPERTY: {
1593
1593
  const u = d("id", "");
1594
1594
  if (!u) {
1595
1595
  l = 0;
@@ -1608,7 +1608,7 @@ class fi {
1608
1608
  y in m ? l = m[y] : l = this.resolvePath(m, y);
1609
1609
  break;
1610
1610
  }
1611
- case wt.SET_PROPERTY: {
1611
+ case Mt.SET_PROPERTY: {
1612
1612
  const u = d("id", ""), y = d("value", void 0);
1613
1613
  if (!u || y === void 0) {
1614
1614
  l = 0;
@@ -1624,122 +1624,122 @@ class fi {
1624
1624
  l = 0;
1625
1625
  break;
1626
1626
  }
1627
- if (["x", "y", "rotation", "scale_x", "scale_y", "opacity", "width", "height", "cornerRadius", "visible", "zIndex"].includes(m))
1627
+ if (["x", "y", "rotation", "scale_x", "scale_y", "skew_x", "skew_y", "opacity", "width", "height", "cornerRadius", "visible", "zIndex"].includes(m))
1628
1628
  b[m] = y, l = y;
1629
1629
  else {
1630
1630
  const C = m.split(".");
1631
1631
  let S = b;
1632
- for (let M = 0; M < C.length - 1; M++) {
1633
- const I = C[M];
1632
+ for (let w = 0; w < C.length - 1; w++) {
1633
+ const I = C[w];
1634
1634
  S[I] === void 0 && (S[I] = {}), S = S[I];
1635
1635
  }
1636
- const w = C[C.length - 1];
1637
- S[w] = y, l = y;
1636
+ const M = C[C.length - 1];
1637
+ S[M] = y, l = y;
1638
1638
  }
1639
1639
  break;
1640
1640
  }
1641
1641
  // Math
1642
- case wt.ADD:
1642
+ case Mt.ADD:
1643
1643
  l = d("a", 0) + d("b", 0);
1644
1644
  break;
1645
- case wt.SUB:
1645
+ case Mt.SUB:
1646
1646
  l = d("a", 0) - d("b", 0);
1647
1647
  break;
1648
- case wt.MUL:
1648
+ case Mt.MUL:
1649
1649
  l = d("a", 0) * d("b", 0);
1650
1650
  break;
1651
- case wt.DIV: {
1651
+ case Mt.DIV: {
1652
1652
  const u = d("b", 1);
1653
1653
  l = u === 0 ? 0 : d("a", 0) / u;
1654
1654
  break;
1655
1655
  }
1656
- case wt.MOD:
1656
+ case Mt.MOD:
1657
1657
  l = d("a", 0) % d("b", 1);
1658
1658
  break;
1659
- case wt.POW:
1659
+ case Mt.POW:
1660
1660
  l = Math.pow(d("a", 0), d("b", 1));
1661
1661
  break;
1662
- case wt.ABS:
1662
+ case Mt.ABS:
1663
1663
  l = Math.abs(d("in", 0));
1664
1664
  break;
1665
- case wt.ROUND:
1665
+ case Mt.ROUND:
1666
1666
  l = Math.round(d("in", 0));
1667
1667
  break;
1668
- case wt.FLOOR:
1668
+ case Mt.FLOOR:
1669
1669
  l = Math.floor(d("in", 0));
1670
1670
  break;
1671
- case wt.CEIL:
1671
+ case Mt.CEIL:
1672
1672
  l = Math.ceil(d("in", 0));
1673
1673
  break;
1674
- case wt.SIN:
1674
+ case Mt.SIN:
1675
1675
  l = Math.sin(d("in", 0));
1676
1676
  break;
1677
- case wt.COS:
1677
+ case Mt.COS:
1678
1678
  l = Math.cos(d("in", 0));
1679
1679
  break;
1680
- case wt.TAN:
1680
+ case Mt.TAN:
1681
1681
  l = Math.tan(d("in", 0));
1682
1682
  break;
1683
- case wt.CLAMP: {
1683
+ case Mt.CLAMP: {
1684
1684
  const u = d("in", 0), y = d("min", 0), m = d("max", 1);
1685
1685
  l = Math.max(y, Math.min(m, u));
1686
1686
  break;
1687
1687
  }
1688
- case wt.REMAP: {
1688
+ case Mt.REMAP: {
1689
1689
  const u = d("in", 0), y = d("inMin", 0), m = d("inMax", 100), b = d("outMin", 0), v = d("outMax", 1);
1690
1690
  l = m === y ? b : b + (u - y) * (v - b) / (m - y);
1691
1691
  break;
1692
1692
  }
1693
1693
  // Comparison
1694
- case wt.EQ:
1694
+ case Mt.EQ:
1695
1695
  l = d("a", 0) == d("b", 0);
1696
1696
  break;
1697
- case wt.NEQ:
1697
+ case Mt.NEQ:
1698
1698
  l = d("a", 0) != d("b", 0);
1699
1699
  break;
1700
- case wt.GT:
1700
+ case Mt.GT:
1701
1701
  l = d("a", 0) > d("b", 0);
1702
1702
  break;
1703
- case wt.LT:
1703
+ case Mt.LT:
1704
1704
  l = d("a", 0) < d("b", 0);
1705
1705
  break;
1706
- case wt.GTE:
1706
+ case Mt.GTE:
1707
1707
  l = d("a", 0) >= d("b", 0);
1708
1708
  break;
1709
- case wt.LTE:
1709
+ case Mt.LTE:
1710
1710
  l = d("a", 0) <= d("b", 0);
1711
1711
  break;
1712
1712
  // Control Flow & Utils
1713
- case wt.IF_ELSE:
1713
+ case Mt.IF_ELSE:
1714
1714
  l = d("cond", !1) ? d("then", 0) : d("else", 0);
1715
1715
  break;
1716
- case wt.VALUE:
1716
+ case Mt.VALUE:
1717
1717
  l = e.value !== void 0 ? e.value : 0;
1718
1718
  break;
1719
- case wt.INPUT:
1719
+ case Mt.INPUT:
1720
1720
  l = this.inputs.get(e.name) ?? 0;
1721
1721
  break;
1722
- case wt.LOG: {
1722
+ case Mt.LOG: {
1723
1723
  const u = d("in", "");
1724
1724
  this.debugLog(`[User Logic] ${u}`), l = u;
1725
1725
  break;
1726
1726
  }
1727
- case wt.SCROLL_X:
1727
+ case Mt.SCROLL_X:
1728
1728
  l = this.inputs.get("scrollX") ?? 0;
1729
1729
  break;
1730
- case wt.SCROLL_Y:
1730
+ case Mt.SCROLL_Y:
1731
1731
  l = this.inputs.get("scrollY") ?? 0;
1732
1732
  break;
1733
- case wt.MOUSE_X:
1733
+ case Mt.MOUSE_X:
1734
1734
  l = this.inputs.get("mouseX") ?? 0;
1735
1735
  break;
1736
- case wt.MOUSE_Y:
1736
+ case Mt.MOUSE_Y:
1737
1737
  l = this.inputs.get("mouseY") ?? 0;
1738
1738
  break;
1739
- case wt.IS_MOUSE_DOWN:
1739
+ case Mt.IS_MOUSE_DOWN:
1740
1740
  l = this.inputs.get("isMouseDown") ?? !1;
1741
1741
  break;
1742
- case wt.EFFECTOR: {
1742
+ case Mt.EFFECTOR: {
1743
1743
  const u = d("id", ""), y = d("intensity", 1), m = d("trigger", !0);
1744
1744
  if (!u || !m) {
1745
1745
  l = 0;
@@ -1759,40 +1759,40 @@ class fi {
1759
1759
  v.style || (v.style = {}), v.style.artEffect = { enabled: !0, type: b, intensity: y }, l = 1;
1760
1760
  else {
1761
1761
  v.behaviors || (v.behaviors = []);
1762
- let S = v.behaviors.find((w) => w.type === b);
1762
+ let S = v.behaviors.find((M) => M.type === b);
1763
1763
  S ? (S.enabled = !0, S.settings || (S.settings = {}), S.settings.intensity = y) : (S = { id: `eff_${Date.now()}_${b}`, type: b, enabled: !0, sensors: [], settings: { intensity: y } }, v.behaviors.push(S)), l = 1;
1764
1764
  }
1765
1765
  break;
1766
1766
  }
1767
- case wt.MONITOR: {
1767
+ case Mt.MONITOR: {
1768
1768
  l = d("in", 0);
1769
1769
  break;
1770
1770
  }
1771
- case wt.SPRING_PULL: {
1771
+ case Mt.SPRING_PULL: {
1772
1772
  const u = d("objectId", ""), y = d("forceX", 0), m = d("forceY", 0);
1773
1773
  u && ((f = this.artboard) == null || f.objects.forEach((b) => {
1774
1774
  b.behaviors && b.behaviors.forEach((v) => {
1775
1775
  var C;
1776
- if (v.type === z.SpringChain && ((C = v.settings) != null && C.connections) && (v.settings.connections.some((w) => w.targetId === u) || b.id === u)) {
1776
+ if (v.type === z.SpringChain && ((C = v.settings) != null && C.connections) && (v.settings.connections.some((M) => M.targetId === u) || b.id === u)) {
1777
1777
  this._springChainState.has(b.id) || this._springChainState.set(b.id, /* @__PURE__ */ new Map());
1778
- const w = this._springChainState.get(b.id);
1779
- if (!w.has(u)) {
1778
+ const M = this._springChainState.get(b.id);
1779
+ if (!M.has(u)) {
1780
1780
  const I = this.objectStates.get(u);
1781
- w.set(u, {
1781
+ M.set(u, {
1782
1782
  x: (I == null ? void 0 : I.x) ?? 0,
1783
1783
  y: (I == null ? void 0 : I.y) ?? 0,
1784
1784
  vx: 0,
1785
1785
  vy: 0
1786
1786
  });
1787
1787
  }
1788
- const M = w.get(u);
1789
- M && (M.vx += y, M.vy += m);
1788
+ const w = M.get(u);
1789
+ w && (w.vx += y, w.vy += m);
1790
1790
  }
1791
1791
  });
1792
1792
  })), l = 1;
1793
1793
  break;
1794
1794
  }
1795
- case wt.SPRING_SETTLE: {
1795
+ case Mt.SPRING_SETTLE: {
1796
1796
  const u = d("objectId", "");
1797
1797
  let y = !0;
1798
1798
  if (u) {
@@ -1805,7 +1805,7 @@ class fi {
1805
1805
  l = y;
1806
1806
  break;
1807
1807
  }
1808
- case wt.EMIT: {
1808
+ case Mt.EMIT: {
1809
1809
  const u = d("objectId", ""), y = d("count", 20);
1810
1810
  u && ((h = this.artboard) == null || h.objects.forEach((m) => {
1811
1811
  m.behaviors && m.behaviors.forEach((b) => {
@@ -1818,7 +1818,7 @@ class fi {
1818
1818
  l = 0;
1819
1819
  break;
1820
1820
  }
1821
- if (this.logicNodeValues.set(t, l), e.op === wt.DELAY) {
1821
+ if (this.logicNodeValues.set(t, l), e.op === Mt.DELAY) {
1822
1822
  const u = d("delay", 0), y = d("in", 0);
1823
1823
  let m = this.logicNodeState.get(t);
1824
1824
  for (m || (m = { queue: [] }, this.logicNodeState.set(t, m)), m.queue.push({ time: this.currentTime + u, value: y }); m.queue.length > 0 && m.queue[0].time <= this.currentTime; )
@@ -1850,7 +1850,7 @@ class fi {
1850
1850
  }
1851
1851
  runLogicNodes() {
1852
1852
  !this.activeStateMachine || !this.activeStateMachine.logicNodes || this.activeStateMachine.logicNodes.forEach((t) => {
1853
- (t.op === wt.SET_PROPERTY || t.op === wt.EFFECTOR) && this.evaluateLogicTree(t.id);
1853
+ (t.op === Mt.SET_PROPERTY || t.op === Mt.EFFECTOR) && this.evaluateLogicTree(t.id);
1854
1854
  });
1855
1855
  }
1856
1856
  resolvePath(t, i) {
@@ -1957,7 +1957,7 @@ class fi {
1957
1957
  let h = s.name;
1958
1958
  if (h === "cornerRadius" && (h = "corner_radius"), h === "width" || h === "height" || h === "corner_radius")
1959
1959
  h === "width" && typeof n == "number" && e.scale_x && Math.abs(e.scale_x) > 1e-3 ? n = n / Math.abs(e.scale_x) : h === "height" && typeof n == "number" && e.scale_y && Math.abs(e.scale_y) > 1e-3 && (n = n / Math.abs(e.scale_y)), e[h] = n, e.geometry && (e.geometry[h] = n);
1960
- else if (h === "x" || h === "y" || h === "rotation" || h === "scale_x" || h === "scale_y")
1960
+ else if (h === "x" || h === "y" || h === "rotation" || h === "scale_x" || h === "scale_y" || h === "skew_x" || h === "skew_y")
1961
1961
  e[h] = n;
1962
1962
  else if (h.startsWith("style.")) {
1963
1963
  const c = h.split(".");
@@ -2022,22 +2022,22 @@ class fi {
2022
2022
  if (r.type === "Translation") {
2023
2023
  const v = this.getGlobalTransform(r.targetId);
2024
2024
  if (v) {
2025
- const C = r.offsetX || 0, S = r.offsetY || 0, w = v.x + C, M = v.y + S, I = r.useSpring;
2025
+ const C = r.offsetX || 0, S = r.offsetY || 0, M = v.x + C, w = v.y + S, I = r.useSpring;
2026
2026
  if (I) {
2027
- const E = this.objectVelocities.get(i.id) || { vx: 0, vy: 0 }, { x: F, y: T, vx: _, vy: L } = this.computeSpring(e.x, e.y, E.vx, E.vy, w, M, r, t);
2028
- r.copyX && (e.x = e.x + (F - e.x) * f), r.copyY && (e.y = e.y + (T - e.y) * f), this.objectVelocities.set(i.id, { vx: _, vy: L });
2027
+ const E = this.objectVelocities.get(i.id) || { vx: 0, vy: 0 }, { x: F, y: T, vx: P, vy: L } = this.computeSpring(e.x, e.y, E.vx, E.vy, M, w, r, t);
2028
+ r.copyX && (e.x = e.x + (F - e.x) * f), r.copyY && (e.y = e.y + (T - e.y) * f), this.objectVelocities.set(i.id, { vx: P, vy: L });
2029
2029
  } else
2030
- r.copyX && (e.x = e.x + (w - e.x) * f), r.copyY && (e.y = e.y + (M - e.y) * f);
2031
- let P = !1;
2030
+ r.copyX && (e.x = e.x + (M - e.x) * f), r.copyY && (e.y = e.y + (w - e.y) * f);
2031
+ let _ = !1;
2032
2032
  if ((c = r.limitX) != null && c.enabled) {
2033
2033
  const E = e.x;
2034
- e.x = Math.max(r.limitX.min, Math.min(r.limitX.max, e.x)), e.x !== E && (P = !0);
2034
+ e.x = Math.max(r.limitX.min, Math.min(r.limitX.max, e.x)), e.x !== E && (_ = !0);
2035
2035
  }
2036
2036
  if ((g = r.limitY) != null && g.enabled) {
2037
2037
  const E = e.y;
2038
- e.y = Math.max(r.limitY.min, Math.min(r.limitY.max, e.y)), e.y !== E && (P = !0);
2038
+ e.y = Math.max(r.limitY.min, Math.min(r.limitY.max, e.y)), e.y !== E && (_ = !0);
2039
2039
  }
2040
- P && I && this.objectVelocities.set(i.id, { vx: 0, vy: 0 });
2040
+ _ && I && this.objectVelocities.set(i.id, { vx: 0, vy: 0 });
2041
2041
  }
2042
2042
  } else if (r.type === "Rotation") {
2043
2043
  const v = this.getGlobalTransform(r.targetId);
@@ -2058,42 +2058,42 @@ class fi {
2058
2058
  } else if (r.type === "FollowPointer") {
2059
2059
  const v = ((d = this._lastPointerPos) == null ? void 0 : d.x) ?? e.x, C = ((l = this._lastPointerPos) == null ? void 0 : l.y) ?? e.y, S = r.useSpring;
2060
2060
  if (S) {
2061
- const M = this.objectVelocities.get(i.id) || { vx: 0, vy: 0 }, { x: I, y: P, vx: E, vy: F } = this.computeSpring(e.x, e.y, M.vx, M.vy, v, C, r, t);
2062
- e.x = I, e.y = P, this.objectVelocities.set(i.id, { vx: E, vy: F });
2061
+ const w = this.objectVelocities.get(i.id) || { vx: 0, vy: 0 }, { x: I, y: _, vx: E, vy: F } = this.computeSpring(e.x, e.y, w.vx, w.vy, v, C, r, t);
2062
+ e.x = I, e.y = _, this.objectVelocities.set(i.id, { vx: E, vy: F });
2063
2063
  } else
2064
2064
  e.x = e.x + (v - e.x) * f, e.y = e.y + (C - e.y) * f;
2065
- let w = !1;
2065
+ let M = !1;
2066
2066
  if ((u = r.limitX) != null && u.enabled) {
2067
- const M = e.x;
2068
- e.x = Math.max(r.limitX.min, Math.min(r.limitX.max, e.x)), e.x !== M && (w = !0);
2067
+ const w = e.x;
2068
+ e.x = Math.max(r.limitX.min, Math.min(r.limitX.max, e.x)), e.x !== w && (M = !0);
2069
2069
  }
2070
2070
  if ((y = r.limitY) != null && y.enabled) {
2071
- const M = e.y;
2072
- e.y = Math.max(r.limitY.min, Math.min(r.limitY.max, e.y)), e.y !== M && (w = !0);
2071
+ const w = e.y;
2072
+ e.y = Math.max(r.limitY.min, Math.min(r.limitY.max, e.y)), e.y !== w && (M = !0);
2073
2073
  }
2074
- w && S && this.objectVelocities.set(i.id, { vx: 0, vy: 0 });
2074
+ M && S && this.objectVelocities.set(i.id, { vx: 0, vy: 0 });
2075
2075
  } else if (r.type === "Distance") {
2076
2076
  const v = this.getGlobalTransform(r.targetId);
2077
2077
  if (v) {
2078
- const C = e.x - v.x, S = e.y - v.y, w = Math.sqrt(C * C + S * S), M = r.distance || 0;
2079
- let I = w;
2078
+ const C = e.x - v.x, S = e.y - v.y, M = Math.sqrt(C * C + S * S), w = r.distance || 0;
2079
+ let I = M;
2080
2080
  switch (r.mode) {
2081
2081
  case "exact":
2082
- I = M;
2082
+ I = w;
2083
2083
  break;
2084
2084
  case "minimum":
2085
- I = Math.max(M, w);
2085
+ I = Math.max(w, M);
2086
2086
  break;
2087
2087
  case "maximum":
2088
- I = Math.min(M, w);
2088
+ I = Math.min(w, M);
2089
2089
  break;
2090
2090
  case "clamped":
2091
- I = Math.max(0, Math.min(M, w));
2091
+ I = Math.max(0, Math.min(w, M));
2092
2092
  break;
2093
2093
  }
2094
- if (w > 0) {
2095
- const P = e.x === v.x && e.y === v.y ? 1 : I / w;
2096
- e.x = e.x + (v.x + C * P - e.x) * f, e.y = e.y + (v.y + S * P - e.y) * f;
2094
+ if (M > 0) {
2095
+ const _ = e.x === v.x && e.y === v.y ? 1 : I / M;
2096
+ e.x = e.x + (v.x + C * _ - e.x) * f, e.y = e.y + (v.y + S * _ - e.y) * f;
2097
2097
  }
2098
2098
  }
2099
2099
  } else if (r.type === "FollowPath") {
@@ -2109,13 +2109,13 @@ class fi {
2109
2109
  k && (S = k.geometry);
2110
2110
  }
2111
2111
  if (!S) return;
2112
- const w = (r.distance || 0) / 100, M = C.width || S.width || 0, I = C.height || S.height || 0, P = this.getPointOnPath(S, M, I, w), E = C.rotation * Math.PI / 180, F = Math.cos(E), T = Math.sin(E), _ = P.x * C.scale_x * F - P.y * C.scale_y * T, L = P.x * C.scale_x * T + P.y * C.scale_y * F;
2112
+ const M = (r.distance || 0) / 100, w = C.width || S.width || 0, I = C.height || S.height || 0, _ = this.getPointOnPath(S, w, I, M), E = C.rotation * Math.PI / 180, F = Math.cos(E), T = Math.sin(E), P = _.x * C.scale_x * F - _.y * C.scale_y * T, L = _.x * C.scale_x * T + _.y * C.scale_y * F;
2113
2113
  let R = C.rotation + (r.offsetRotation || 0);
2114
2114
  if (r.orient) {
2115
- const k = Math.cos(P.angle), Y = Math.sin(P.angle), X = k * C.scale_x * F - Y * C.scale_y * T, J = k * C.scale_x * T + Y * C.scale_y * F;
2115
+ const k = Math.cos(_.angle), Y = Math.sin(_.angle), X = k * C.scale_x * F - Y * C.scale_y * T, J = k * C.scale_x * T + Y * C.scale_y * F;
2116
2116
  R = Math.atan2(J, X) * 180 / Math.PI + (r.offsetRotation || 0);
2117
2117
  }
2118
- const W = R * Math.PI / 180, B = Math.cos(W), A = Math.sin(W), $ = (r.offsetX || 0) * B - (r.offsetY || 0) * A, G = (r.offsetX || 0) * A + (r.offsetY || 0) * B, N = C.x + _ + $, x = C.y + L + G;
2118
+ const W = R * Math.PI / 180, B = Math.cos(W), A = Math.sin(W), $ = (r.offsetX || 0) * B - (r.offsetY || 0) * A, G = (r.offsetX || 0) * A + (r.offsetY || 0) * B, N = C.x + P + $, x = C.y + L + G;
2119
2119
  if (e.x = e.x + (N - e.x) * f, e.y = e.y + (x - e.y) * f, r.orient) {
2120
2120
  let k = (R - e.rotation) % 360;
2121
2121
  k > 180 && (k -= 360), k < -180 && (k += 360), e.rotation = e.rotation + k * f;
@@ -2188,10 +2188,10 @@ class fi {
2188
2188
  const d = a[g], l = this.getGlobalTransform(d.id), u = c.x - l.x, y = c.y - l.y, m = i.x - l.x, b = i.y - l.y, v = Math.sqrt(u * u + y * y), C = Math.sqrt(m * m + b * b);
2189
2189
  if (v > 1e-3 && C > 1e-3) {
2190
2190
  const S = Math.atan2(y, u);
2191
- let M = (Math.atan2(b, m) - S) * 180 / Math.PI;
2192
- M *= e;
2191
+ let w = (Math.atan2(b, m) - S) * 180 / Math.PI;
2192
+ w *= e;
2193
2193
  const I = this.objectStates.get(d.id);
2194
- I && (I.rotation += M);
2194
+ I && (I.rotation += w);
2195
2195
  }
2196
2196
  }
2197
2197
  }
@@ -2232,11 +2232,11 @@ class fi {
2232
2232
  const y = /* @__PURE__ */ new Set([u]);
2233
2233
  l === "move" && y.add("onPointerEnter").add("hover").add("onPointerLeave").add("blur"), u === "onClick" && y.add("click"), u === "onPointerDown" && y.add("pointerDown"), u === "onPointerUp" && y.add("pointerUp");
2234
2234
  const m = ["button", "toggle", "toggle_button", "dropdown", "listview", "inputbox", "slider", "checkbox", "radiogroup"];
2235
- return !!(d.type === "Component" && m.includes(d.variant) || m.includes((C = d.type) == null ? void 0 : C.toLowerCase()) || (d.interactions || []).some((S) => S.event && y.has(S.event) ? !0 : S.triggers && Array.isArray(S.triggers) ? S.triggers.some((w) => {
2236
- if (!w) return !1;
2237
- const M = w.toLowerCase();
2235
+ return !!(d.type === "Component" && m.includes(d.variant) || m.includes((C = d.type) == null ? void 0 : C.toLowerCase()) || (d.interactions || []).some((S) => S.event && y.has(S.event) ? !0 : S.triggers && Array.isArray(S.triggers) ? S.triggers.some((M) => {
2236
+ if (!M) return !1;
2237
+ const w = M.toLowerCase();
2238
2238
  return Array.from(y).some(
2239
- (I) => I.toLowerCase() === M || I.toLowerCase() === "on" + M
2239
+ (I) => I.toLowerCase() === w || I.toLowerCase() === "on" + w
2240
2240
  );
2241
2241
  }) : !1) || (d.triggers || []).some((S) => y.has(S.eventType)));
2242
2242
  };
@@ -2269,9 +2269,9 @@ class fi {
2269
2269
  })) : t === "blur" && this.activeHoverIds.clear(), this.activeDropdownId && t === "down") {
2270
2270
  const d = this.artboard.objects.find((l) => l.id === this.activeDropdownId);
2271
2271
  if (d && (d.type === "Dropdown" || d.variant === "dropdown")) {
2272
- const l = this.objectStates.get(d.id), u = (l == null ? void 0 : l.options) || d.options || {}, y = d.geometry || {}, m = y.width ?? d.width ?? 200, b = y.height ?? d.height ?? 40, v = u.optionsList || [], C = u.itemHeight || 32, S = u.listPadding ?? 4, w = v.length * C + S * 2, M = this.getWorldTransform(d.id), I = m * Math.abs(M.scaleX), P = b * Math.abs(M.scaleY), E = M.y + P / 2 + 4, F = Math.abs(i - M.x) <= I / 2, T = o >= E && o <= E + w * Math.abs(M.scaleY);
2272
+ const l = this.objectStates.get(d.id), u = (l == null ? void 0 : l.options) || d.options || {}, y = d.geometry || {}, m = y.width ?? d.width ?? 200, b = y.height ?? d.height ?? 40, v = u.optionsList || [], C = u.itemHeight || 32, S = u.listPadding ?? 4, M = v.length * C + S * 2, w = this.getWorldTransform(d.id), I = m * Math.abs(w.scaleX), _ = b * Math.abs(w.scaleY), E = w.y + _ / 2 + 4, F = Math.abs(i - w.x) <= I / 2, T = o >= E && o <= E + M * Math.abs(w.scaleY);
2273
2273
  if (F && T) {
2274
- const _ = Math.abs(M.scaleY), L = o - (E + S * _), R = Math.floor(L / (C * _));
2274
+ const P = Math.abs(w.scaleY), L = o - (E + S * P), R = Math.floor(L / (C * P));
2275
2275
  if (R >= 0 && R < v.length) {
2276
2276
  const W = v[R];
2277
2277
  u.selectedOption = W, u.isOpen = !1, this.activeDropdownId = null, d.inputId && this.setInternalInput(d.inputId, W), this.onComponentChange && this.onComponentChange({
@@ -2379,18 +2379,18 @@ class fi {
2379
2379
  }
2380
2380
  }
2381
2381
  if (d.type === "LineGraph" && (t === "down" || t === "click")) {
2382
- const y = d.geometry, m = (y == null ? void 0 : y.datasets) || [], b = this.objectStates.get(d.id), v = (b == null ? void 0 : b.width) || (y == null ? void 0 : y.width) || 200, C = (b == null ? void 0 : b.height) || (y == null ? void 0 : y.height) || 150, S = this.getWorldTransform(d.id), w = 30, M = 20, I = v - w, P = C - M;
2382
+ const y = d.geometry, m = (y == null ? void 0 : y.datasets) || [], b = this.objectStates.get(d.id), v = (b == null ? void 0 : b.width) || (y == null ? void 0 : y.width) || 200, C = (b == null ? void 0 : b.height) || (y == null ? void 0 : y.height) || 150, S = this.getWorldTransform(d.id), M = 30, w = 20, I = v - M, _ = C - w;
2383
2383
  let E = 1;
2384
- m.forEach((_) => {
2385
- const L = Math.max(..._.data || [0]);
2384
+ m.forEach((P) => {
2385
+ const L = Math.max(...P.data || [0]);
2386
2386
  L > E && (E = L);
2387
2387
  });
2388
2388
  let F = 1 / 0, T = null;
2389
- m.forEach((_, L) => {
2390
- const R = _.data || [], W = I / Math.max(R.length - 1, 1);
2389
+ m.forEach((P, L) => {
2390
+ const R = P.data || [], W = I / Math.max(R.length - 1, 1);
2391
2391
  R.forEach((B, A) => {
2392
- const $ = S.x - v / 2 + w + A * W, G = S.y + C / 2 - M - B / E * P, N = Math.sqrt((i - $) ** 2 + (o - G) ** 2);
2393
- N < F && (F = N, T = { dIdx: L, pIdx: A, val: B, label: _.label || `Dataset ${L + 1}` });
2392
+ const $ = S.x - v / 2 + M + A * W, G = S.y + C / 2 - w - B / E * _, N = Math.sqrt((i - $) ** 2 + (o - G) ** 2);
2393
+ N < F && (F = N, T = { dIdx: L, pIdx: A, val: B, label: P.label || `Dataset ${L + 1}` });
2394
2394
  });
2395
2395
  }), T && F < 20 && this.onGraphPointClick && this.onGraphPointClick({ objectId: d.id, componentName: d.name, datasetIndex: T.dIdx, pointIndex: T.pIdx, value: T.val, label: T.label }), this.onComponentChange && this.onComponentChange({ objectId: d.id, componentName: d.name, variant: "linegraph", property: "click", value: (T == null ? void 0 : T.val) ?? null });
2396
2396
  }
@@ -2606,17 +2606,17 @@ class fi {
2606
2606
  return Math.abs(d) <= m / 2 && Math.abs(l) <= b / 2;
2607
2607
  }
2608
2608
  updateSliderValueFromPointer(t, i, o) {
2609
- var M;
2609
+ var w;
2610
2610
  const e = this.objectStates.get(t.id);
2611
2611
  if (!e) return;
2612
- const s = t.options || {}, n = ((M = t.geometry) == null ? void 0 : M.width) ?? t.width ?? 200, a = this.getWorldTransform(t.id), r = i - a.x, f = o - a.y, h = -a.rotation * (Math.PI / 180), c = Math.cos(h), g = Math.sin(h), d = r * c - f * g, l = s.thumbWidth ?? 16, u = n - l;
2612
+ const s = t.options || {}, n = ((w = t.geometry) == null ? void 0 : w.width) ?? t.width ?? 200, a = this.getWorldTransform(t.id), r = i - a.x, f = o - a.y, h = -a.rotation * (Math.PI / 180), c = Math.cos(h), g = Math.sin(h), d = r * c - f * g, l = s.thumbWidth ?? 16, u = n - l;
2613
2613
  let m = (d + u / 2) / u;
2614
2614
  m = Math.max(0, Math.min(1, m));
2615
2615
  const b = s.min ?? 0, v = s.max ?? 100, C = s.step || 1;
2616
2616
  let S = b + m * (v - b);
2617
2617
  C > 0 && (S = Math.round(S / C) * C), S = Math.max(b, Math.min(v, S));
2618
- const w = e.options || {};
2619
- w.value !== S && (e.options = { ...w, value: S }, t.inputId && this.setInternalInput(t.inputId, S), this.onComponentChange && this.onComponentChange({
2618
+ const M = e.options || {};
2619
+ M.value !== S && (e.options = { ...M, value: S }, t.inputId && this.setInternalInput(t.inputId, S), this.onComponentChange && this.onComponentChange({
2620
2620
  objectId: t.id,
2621
2621
  componentName: t.name,
2622
2622
  variant: "slider",
@@ -2869,7 +2869,7 @@ class fi {
2869
2869
  }
2870
2870
  */
2871
2871
  renderObject(t, i, o) {
2872
- var m, b, v, C, S, w, M, I, P, E, F, T, _, L, R, W, B;
2872
+ var m, b, v, C, S, M, w, I, _, E, F, T, P, L, R, W, B;
2873
2873
  const e = this.objectStates.get(i.id);
2874
2874
  if (!e) {
2875
2875
  this.warn("No state for object:", i.id);
@@ -2935,7 +2935,7 @@ class fi {
2935
2935
  }
2936
2936
  const Y = i.type === "Group" || i.type === "Frame" || i.type === "Component", X = a > 0 && r > 0;
2937
2937
  if (!Y && X) {
2938
- const it = (((C = n.shadow) == null ? void 0 : C.isEnabled) !== !1 ? (((S = n.shadow) == null ? void 0 : S.blur) || 0) + 10 : 0) + (((w = n.blur) == null ? void 0 : w.isEnabled) !== !1 && ((M = n.blur) == null ? void 0 : M.radius) || 0) + 20;
2938
+ const it = (((C = n.shadow) == null ? void 0 : C.isEnabled) !== !1 ? (((S = n.shadow) == null ? void 0 : S.blur) || 0) + 10 : 0) + (((M = n.blur) == null ? void 0 : M.isEnabled) !== !1 && ((w = n.blur) == null ? void 0 : w.radius) || 0) + 20;
2939
2939
  if (!this.isObjectInView(t, $, G, a, r, it))
2940
2940
  continue;
2941
2941
  }
@@ -2944,7 +2944,7 @@ class fi {
2944
2944
  tt && tt.amount > 0 && J.push(`blur(${tt.amount}px)`);
2945
2945
  const lt = g.find((it) => it.isEnabled && it.type === "BackgroundBlur"), Z = g.find((it) => it.isEnabled && it.type === "LayerBlur");
2946
2946
  Z && J.push(`blur(${Z.radius ?? 10}px)`), lt && (n.fill = null, n.stroke && (n.stroke.isEnabled = !1));
2947
- const pt = ((P = s == null ? void 0 : s.type) == null ? void 0 : P.toLowerCase().includes("image")) || ((E = i.type) == null ? void 0 : E.toLowerCase().includes("image")), at = n.adjustments && Object.keys(n.adjustments).length > 0 ? n.adjustments : null, Et = s != null && s.adjustments && Object.keys(s.adjustments).length > 0 ? s.adjustments : null, xt = pt ? Et || at : at || Et, bt = pt && !xt ? {
2947
+ const pt = ((_ = s == null ? void 0 : s.type) == null ? void 0 : _.toLowerCase().includes("image")) || ((E = i.type) == null ? void 0 : E.toLowerCase().includes("image")), at = n.adjustments && Object.keys(n.adjustments).length > 0 ? n.adjustments : null, Et = s != null && s.adjustments && Object.keys(s.adjustments).length > 0 ? s.adjustments : null, xt = pt ? Et || at : at || Et, bt = pt && !xt ? {
2948
2948
  exposure: 0,
2949
2949
  contrast: 0,
2950
2950
  saturation: 100,
@@ -2983,22 +2983,22 @@ class fi {
2983
2983
  0 0 0 1 0"/>`, At = "invert";
2984
2984
  }
2985
2985
  if (D !== 0 || nt !== 0 || et !== 0 || Rt !== 0) {
2986
- const Tt = 1 + et + Rt, O = Tt * (1 + D - nt / 2), Ft = Tt * (1 + nt), oe = Tt * (1 - D - nt / 2), Mt = bt.shadows * 0.1 / 255, Ut = [
2986
+ const Tt = 1 + et + Rt, O = Tt * (1 + D - nt / 2), Ft = Tt * (1 + nt), oe = Tt * (1 - D - nt / 2), wt = bt.shadows * 0.1 / 255, Ut = [
2987
2987
  O,
2988
2988
  0,
2989
2989
  0,
2990
2990
  0,
2991
- Mt,
2991
+ wt,
2992
2992
  0,
2993
2993
  Ft,
2994
2994
  0,
2995
2995
  0,
2996
- Mt,
2996
+ wt,
2997
2997
  0,
2998
2998
  0,
2999
2999
  oe,
3000
3000
  0,
3001
- Mt,
3001
+ wt,
3002
3002
  0,
3003
3003
  0,
3004
3004
  0,
@@ -3015,9 +3015,9 @@ class fi {
3015
3015
  J.length > 0 ? t.filter = J.join(" ") : t.filter = "none", t.imageSmoothingEnabled = !0, t.imageSmoothingQuality = "high";
3016
3016
  const Bt = t.globalAlpha, $t = this.normalizeOpacity(e.opacity !== void 0 ? e.opacity : 100);
3017
3017
  t.globalAlpha = Bt * $t;
3018
- const Pt = e.compositeOperation || e.blendMode;
3019
- if (Pt && Pt !== "Normal") {
3020
- const it = Pt.toLowerCase();
3018
+ const _t = e.compositeOperation || e.blendMode;
3019
+ if (_t && _t !== "Normal") {
3020
+ const it = _t.toLowerCase();
3021
3021
  [
3022
3022
  "multiply",
3023
3023
  "screen",
@@ -3090,7 +3090,7 @@ class fi {
3090
3090
  const Rt = t.getTransform(), Yt = Math.sqrt(Rt.a * Rt.a + Rt.b * Rt.b) || 1;
3091
3091
  t.shadowColor = et, t.shadowBlur = nt * Yt, t.shadowOffsetX = (Nt.offsetX || 0) * Yt, t.shadowOffsetY = (Nt.offsetY || 0) * Yt;
3092
3092
  }
3093
- const ee = i.liquidFill || ((_ = i.style) == null ? void 0 : _.liquidFill);
3093
+ const ee = i.liquidFill || ((P = i.style) == null ? void 0 : P.liquidFill);
3094
3094
  if (ee && ee.enabled) {
3095
3095
  t.save();
3096
3096
  const it = ee.fillLevel ?? 0.5;
@@ -3153,8 +3153,8 @@ class fi {
3153
3153
  let O = it;
3154
3154
  O.match(/xmlns=["']http:\/\/www\.w3\.org\/2000\/svg["']/i) || (O = O.replace(/<svg([^>]*)>/i, (ht, ft) => `<svg xmlns="http://www.w3.org/2000/svg"${ft}>`));
3155
3155
  let Ft = s.width || a || 100, oe = s.height || r || 100;
3156
- const Mt = O.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
3157
- if (Mt && (Ft = parseFloat(Mt[1]), oe = parseFloat(Mt[2])), O = O.replace(/<svg([^>]*)>/i, (ht, ft) => {
3156
+ const wt = O.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
3157
+ if (wt && (Ft = parseFloat(wt[1]), oe = parseFloat(wt[2])), O = O.replace(/<svg([^>]*)>/i, (ht, ft) => {
3158
3158
  let mt = ft.replace(/\b(?:width|height)=["'][^"']*["']/gi, " ");
3159
3159
  return mt.match(/\bviewBox=/i) || (mt += ` viewBox="0 0 ${Ft} ${oe}"`), mt.match(/\bpreserveAspectRatio=/i) || (mt += ' preserveAspectRatio="none"'), mt += ' width="100%" height="100%"', `<svg${mt}>`;
3160
3160
  }), s.colors && s.colors.length > 0 && dt.length > 0 && s.colors.forEach((ht, ft) => {
@@ -3245,12 +3245,12 @@ class fi {
3245
3245
  if (!/\bstroke\s*=\s*["']/i.test(it) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(it)) {
3246
3246
  let Jt = "", ae = "";
3247
3247
  if (Te) {
3248
- const de = s.width || a || 100, ce = s.height || r || 100, he = (de + ce) * 2, ve = Math.max(0, Math.min(1, vt)), Pe = Math.max(0, Math.min(1, yt)), Ae = (fe % 1 + 1) % 1, Re = (be % 1 + 1) % 1;
3249
- if (ve >= Pe)
3248
+ const de = s.width || a || 100, ce = s.height || r || 100, he = (de + ce) * 2, ve = Math.max(0, Math.min(1, vt)), _e = Math.max(0, Math.min(1, yt)), Ae = (fe % 1 + 1) % 1, Re = (be % 1 + 1) % 1;
3249
+ if (ve >= _e)
3250
3250
  Jt = ` stroke-dasharray="0 ${he}"`, ae = ' stroke-dashoffset="0"';
3251
3251
  else {
3252
- const _e = he * (Pe - ve), Le = he - _e, Oe = -(he * (ve + Ae + Re));
3253
- Jt = ` stroke-dasharray="${_e} ${Le}"`, ae = ` stroke-dashoffset="${Oe}"`;
3252
+ const Pe = he * (_e - ve), Le = he - Pe, Oe = -(he * (ve + Ae + Re));
3253
+ Jt = ` stroke-dasharray="${Pe} ${Le}"`, ae = ` stroke-dashoffset="${Oe}"`;
3254
3254
  }
3255
3255
  } else (R = D.dashArray) != null && R.length && (Jt = ` stroke-dasharray="${D.dashArray.join(" ")}"`, D.dashOffset && (ae = ` stroke-dashoffset="${D.dashOffset}"`));
3256
3256
  const me = ` stroke-linecap="${D.lineCap || "round"}"`, Ie = ` stroke-linejoin="${D.lineJoin || "round"}"`, ke = `stroke="${mt}" stroke-width="${ut}" stroke-opacity="${ht}"${me}${Ie}${Jt}${ae}`;
@@ -3275,8 +3275,8 @@ class fi {
3275
3275
  const O = Math.max(1, a), Ft = Math.max(1, r);
3276
3276
  if (et && (U == null ? void 0 : U.type) === "Solid") {
3277
3277
  this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = O, this.maskBuffer.height = Ft, this.maskCtx.setTransform(1, 0, 0, 1, 0, 0), this.maskCtx.globalCompositeOperation = "source-over", this.maskCtx.globalAlpha = 1, this.maskCtx.filter = "none", this.maskCtx.clearRect(0, 0, O, Ft), this.maskCtx.drawImage(Tt, 0, 0, O, Ft), this.maskCtx.globalCompositeOperation = "source-in";
3278
- const oe = U.color || "#000000", Mt = this.normalizeOpacity(U.opacity ?? 100);
3279
- this.maskCtx.fillStyle = oe, this.maskCtx.globalAlpha = Mt, this.maskCtx.fillRect(0, 0, O, Ft), t.drawImage(this.maskBuffer, -O / 2, -Ft / 2, O, Ft);
3278
+ const oe = U.color || "#000000", wt = this.normalizeOpacity(U.opacity ?? 100);
3279
+ this.maskCtx.fillStyle = oe, this.maskCtx.globalAlpha = wt, this.maskCtx.fillRect(0, 0, O, Ft), t.drawImage(this.maskBuffer, -O / 2, -Ft / 2, O, Ft);
3280
3280
  } else h !== 0 ? (t.save(), this.drawRoundRect(t, -O / 2, -Ft / 2, O, Ft, h), t.clip(), t.drawImage(Tt, -O / 2, -Ft / 2, O, Ft), t.restore()) : t.drawImage(Tt, -O / 2, -Ft / 2, O, Ft);
3281
3281
  }
3282
3282
  }
@@ -3339,7 +3339,7 @@ class fi {
3339
3339
  feather: i.maskFeather || 0,
3340
3340
  isVisible: !0
3341
3341
  }] : [])).filter((D) => D.isVisible !== !1 && o.has(D.maskId)).forEach((D) => {
3342
- var Tt, O, Ft, oe, Mt, Ut;
3342
+ var Tt, O, Ft, oe, wt, Ut;
3343
3343
  const nt = o.get(D.maskId), et = this.objectStates.get(nt.id), Rt = D.feather || 0, Yt = D.inverted === !0, At = D.opacity !== void 0 ? typeof D.opacity == "number" ? D.opacity : D.opacity / 100 : 1;
3344
3344
  if ((D.type || "alpha") === "luma") {
3345
3345
  (!this.lumaBuffer || this.lumaBuffer.width !== this.maskBuffer.width || this.lumaBuffer.height !== this.maskBuffer.height) && (this.lumaBuffer = document.createElement("canvas"), this.lumaBuffer.width = this.maskBuffer.width, this.lumaBuffer.height = this.maskBuffer.height, this.lumaCtx = this.lumaBuffer.getContext("2d", { willReadFrequently: !0 }), this.lumaCtx && (this.lumaCtx.imageSmoothingEnabled = !0, this.lumaCtx.imageSmoothingQuality = "high")), this.lumaCtx.setTransform(1, 0, 0, 1, 0, 0), this.lumaCtx.globalCompositeOperation = "source-over", this.lumaCtx.globalAlpha = 1, this.lumaCtx.filter = "none", this.lumaCtx.clearRect(0, 0, this.lumaBuffer.width, this.lumaBuffer.height), this.lumaCtx.save(), this.rootTransform && this.lumaCtx.setTransform(this.rootTransform), this.applyAbsoluteTransform(this.lumaCtx, nt.id, o), Rt > 0 && (this.lumaCtx.filter = `blur(${Rt}px)`), this.lumaCtx.globalAlpha = At;
@@ -3383,7 +3383,7 @@ class fi {
3383
3383
  if (((oe = nt.geometry) == null ? void 0 : oe.type) === "Text") {
3384
3384
  const ht = et != null && et.geometry ? this.deepMerge(nt.geometry, et.geometry) : nt.geometry, ft = et != null && et.style ? this.deepMerge(nt.style, et.style) : nt.style;
3385
3385
  this._renderText(this.maskCtx, nt, { ...ht, width: It, height: Xt, corner_radius: qt }, ft, et, It, Xt, !0);
3386
- } else if (((Mt = nt.geometry) == null ? void 0 : Mt.type) === "Image") {
3386
+ } else if (((wt = nt.geometry) == null ? void 0 : wt.type) === "Image") {
3387
3387
  const ht = nt.geometry.src;
3388
3388
  if (ht) {
3389
3389
  let ft = this.imageCache.get(ht);
@@ -3415,7 +3415,7 @@ class fi {
3415
3415
  }
3416
3416
  }
3417
3417
  _renderText(t, i, o, e, s, n, a, r = !1, f = !1) {
3418
- var pt, at, Et, xt, bt, Bt, $t, Pt, Vt;
3418
+ var pt, at, Et, xt, bt, Bt, $t, _t, Vt;
3419
3419
  let h = o.text || "";
3420
3420
  if (o.textInputId && !r) {
3421
3421
  const Q = this.inputs.get(o.textInputId);
@@ -3445,10 +3445,10 @@ class fi {
3445
3445
  });
3446
3446
  const S = `${o.smallCaps === !0 ? "small-caps " : ""}${l} ${u} ${y}px "${m}", sans-serif`;
3447
3447
  t.font = S;
3448
- const w = o.textVerticalAlign || "top";
3448
+ const M = o.textVerticalAlign || "top";
3449
3449
  t.textBaseline = "top";
3450
- const M = o.textAlign || "left";
3451
- t.textAlign = M;
3450
+ const w = o.textAlign || "left";
3451
+ t.textAlign = w;
3452
3452
  let I = 0;
3453
3453
  if (typeof o.letterSpacing == "number")
3454
3454
  I = o.letterSpacing;
@@ -3457,12 +3457,12 @@ class fi {
3457
3457
  I = Q.unit === "PERCENT" ? Q.value / 100 * y : Q.value;
3458
3458
  }
3459
3459
  t.letterSpacing !== void 0 && (t.letterSpacing = `${I}px`);
3460
- const P = o.kerning || "auto", E = o.kerningValue || 0;
3461
- P === "manual" && E !== 0 && (t.letterSpacing = `${I + E}px`);
3460
+ const _ = o.kerning || "auto", E = o.kerningValue || 0;
3461
+ _ === "manual" && E !== 0 && (t.letterSpacing = `${I + E}px`);
3462
3462
  const F = o.paragraphSpacing || 0;
3463
3463
  let T = o.lineHeight ?? 1.2;
3464
3464
  typeof T == "string" && (T = parseFloat(T)), T > 5 && y > 0 && (T = T / y);
3465
- const _ = (T || 1.2) * y, L = o.isPointText === !0 || !o.width || o.width <= 0, R = ((bt = o.padding) == null ? void 0 : bt.left) || ((Bt = o.padding) == null ? void 0 : Bt.right) || 0, W = L ? 1e5 : o.width && o.width > 0 ? Math.ceil(o.width) - R * 2 : 1e5;
3465
+ const P = (T || 1.2) * y, L = o.isPointText === !0 || !o.width || o.width <= 0, R = ((bt = o.padding) == null ? void 0 : bt.left) || ((Bt = o.padding) == null ? void 0 : Bt.right) || 0, W = L ? 1e5 : o.width && o.width > 0 ? Math.ceil(o.width) - R * 2 : 1e5;
3466
3466
  o.autoHeight;
3467
3467
  const B = us({
3468
3468
  text: c,
@@ -3481,7 +3481,7 @@ class fi {
3481
3481
  hyphenation: o.hyphenation,
3482
3482
  composer: o.composer,
3483
3483
  balanceRaggedLines: o.balanceRaggedLines
3484
- }), A = B.lines || [], $ = B.maxFontSize || y, G = this.fontLeadingFactors[m] ?? 0.5, N = (_ - y) * G;
3484
+ }), A = B.lines || [], $ = B.maxFontSize || y, G = this.fontLeadingFactors[m] ?? 0.5, N = (P - y) * G;
3485
3485
  let x = B.height, k = n, Y = a;
3486
3486
  if (k === 0 || Y === 0 || k >= 1e5) {
3487
3487
  let Q = 0, ct = 0;
@@ -3495,7 +3495,7 @@ class fi {
3495
3495
  }
3496
3496
  L && s && s.geometry && (s.width = k, s.geometry.width = k, s.height = Y, s.geometry.height = Y);
3497
3497
  let X = -x / 2;
3498
- a > 0 && a > x && (w === "top" ? X = -a / 2 : w === "middle" || w === "center" ? X = -x / 2 : w === "bottom" && (X = a / 2 - x)), X += N;
3498
+ a > 0 && a > x && (M === "top" ? X = -a / 2 : M === "middle" || M === "center" ? X = -x / 2 : M === "bottom" && (X = a / 2 - x)), X += N;
3499
3499
  let J = null, tt = 0;
3500
3500
  if (o.pathId && this.artboard) {
3501
3501
  const Q = this.artboard.objects.find((ct) => ct.id === o.pathId);
@@ -3543,23 +3543,23 @@ class fi {
3543
3543
  else {
3544
3544
  const U = lt(Q, St);
3545
3545
  let D = ct + Zt;
3546
- M === "center" ? D -= U / 2 : M === "right" && (D -= U);
3546
+ w === "center" ? D -= U / 2 : w === "right" && (D -= U);
3547
3547
  const nt = St + Q.length >= c.length || c[St + Q.length] === `
3548
3548
  ` || c[St + Q.length] === "\r";
3549
3549
  let et = 0, Rt = 0;
3550
3550
  const Yt = o.justifyMinWordSpacing, At = o.justifyMaxWordSpacing;
3551
- if (M === "justify" && !nt && U > 0 && !o.pathId) {
3551
+ if (w === "justify" && !nt && U > 0 && !o.pathId) {
3552
3552
  const Ft = L ? U : W - R * 2 + 0, oe = Math.max(0, Ft - U);
3553
- for (let Mt = 0; Mt < Q.length; Mt++)
3554
- Q[Mt] === " " && Rt++;
3553
+ for (let wt = 0; wt < Q.length; wt++)
3554
+ Q[wt] === " " && Rt++;
3555
3555
  if (Rt > 0) {
3556
- const Mt = t.measureText(" ").width;
3557
- let Ut = Yt || Mt * 0.5, It = At || Mt * 2.5;
3556
+ const wt = t.measureText(" ").width;
3557
+ let Ut = Yt || wt * 0.5, It = At || wt * 2.5;
3558
3558
  et = Math.max(0, Math.min(oe / Rt, It - Ut));
3559
3559
  }
3560
3560
  }
3561
3561
  let Ht = o.pathOffset || 0;
3562
- o.pathId && tt > 0 && J && (M === "center" ? Ht += tt / 2 - U / 2 : M === "right" && (Ht += tt - U));
3562
+ o.pathId && tt > 0 && J && (w === "center" ? Ht += tt / 2 - U / 2 : w === "right" && (Ht += tt - U));
3563
3563
  let Tt = D;
3564
3564
  const O = r && !f ? [] : ((it = i.behaviors) == null ? void 0 : it.filter(
3565
3565
  (Ft) => [
@@ -3596,45 +3596,45 @@ class fi {
3596
3596
  )) || [];
3597
3597
  for (let Ft = 0; Ft < Q.length; Ft++) {
3598
3598
  let oe = Q[Ft];
3599
- const Mt = St + Ft;
3599
+ const wt = St + Ft;
3600
3600
  let Ut = 0, It = 0, Xt = 1, qt = 1, ht = 0, ft = 1, mt = oe;
3601
3601
  O.forEach((rt) => {
3602
3602
  const st = rt.settings || {}, ut = st.strength || 1, Wt = Date.now();
3603
3603
  if (rt.type === z.Typewriter)
3604
- this.currentTime * (st.speed || 1) - Mt * (st.stagger || 0.05) < 0 && (ft = 0);
3604
+ this.currentTime * (st.speed || 1) - wt * (st.stagger || 0.05) < 0 && (ft = 0);
3605
3605
  else if (rt.type === z.Scramble)
3606
- Math.max(0, Math.min(1, this.currentTime / (st.duration || 1.5)) - Mt * 0.02) < 1 && Math.random() < 0.3 && (mt = "$%#@!*&"[Math.floor(Math.random() * 7)]);
3606
+ Math.max(0, Math.min(1, this.currentTime / (st.duration || 1.5)) - wt * 0.02) < 1 && Math.random() < 0.3 && (mt = "$%#@!*&"[Math.floor(Math.random() * 7)]);
3607
3607
  else if (rt.type === z.Wave)
3608
- It += Math.sin(this.currentTime * 5 * (st.speed || 1) + Mt * (st.frequency || 1)) * (st.amplitude || 20) * ut;
3608
+ It += Math.sin(this.currentTime * 5 * (st.speed || 1) + wt * (st.frequency || 1)) * (st.amplitude || 20) * ut;
3609
3609
  else if (rt.type === z.Bounce) {
3610
- const K = Math.max(0, this.currentTime % 2 - Mt * (st.stagger || 0.1));
3610
+ const K = Math.max(0, this.currentTime % 2 - wt * (st.stagger || 0.1));
3611
3611
  K < 1 && (It -= Math.abs(Math.sin(K * Math.PI)) * (st.height || 50) * ut);
3612
3612
  } else if (rt.type === z.TextTrail) {
3613
- const K = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - Mt * (st.delay || 5))];
3613
+ const K = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - wt * (st.delay || 5))];
3614
3614
  K && (Ut += (K.x - (s.x + Tt)) * ut * 0.2, It += (K.y - (s.y + Ot + It)) * ut * 0.2);
3615
3615
  } else if (rt.type === z.Reveal3D) {
3616
- const K = Math.max(0, Math.min(1, this.currentTime * (st.speed || 1) - Mt * (st.stagger || 0.1)));
3616
+ const K = Math.max(0, Math.min(1, this.currentTime * (st.speed || 1) - wt * (st.stagger || 0.1)));
3617
3617
  Xt *= K, qt *= K, ft = K;
3618
3618
  } else if (rt.type === z.RevealSlide) {
3619
- const K = Math.max(0, Math.min(1, this.currentTime * 1.5 - Mt * 0.05)), vt = (1 - K) * (st.distance || 40) * ut, yt = st.direction || "up";
3619
+ const K = Math.max(0, Math.min(1, this.currentTime * 1.5 - wt * 0.05)), vt = (1 - K) * (st.distance || 40) * ut, yt = st.direction || "up";
3620
3620
  yt === "up" ? It -= vt : yt === "down" ? It += vt : yt === "left" ? Ut -= vt : yt === "right" && (Ut += vt), ft = K;
3621
3621
  } else if (rt.type === z.RevealBlur) {
3622
- const K = Math.max(0, Math.min(1, this.currentTime * 1.2 - Mt * 0.1));
3622
+ const K = Math.max(0, Math.min(1, this.currentTime * 1.2 - wt * 0.1));
3623
3623
  ft = K, Ut += (1 - K) * 5;
3624
3624
  } else if (rt.type === z.TextLiquid) {
3625
- const K = Math.max(0, Math.sin(Wt * 1e-3 * (st.speed || 1) + Mt * 0.5));
3625
+ const K = Math.max(0, Math.sin(Wt * 1e-3 * (st.speed || 1) + wt * 0.5));
3626
3626
  It += K * (st.amplitude || 10) * ut, qt *= 1 + K * 0.2;
3627
3627
  } else if (rt.type === z.TextVortex) {
3628
- const K = Wt * 2e-3 * (st.speed || 1) + Mt * 0.2, vt = (1 - (Math.sin(Wt * 1e-3) * 0.5 + 0.5)) * (st.radius || 50);
3628
+ const K = Wt * 2e-3 * (st.speed || 1) + wt * 0.2, vt = (1 - (Math.sin(Wt * 1e-3) * 0.5 + 0.5)) * (st.radius || 50);
3629
3629
  Ut += Math.cos(K) * vt * ut, It += Math.sin(K) * vt * ut;
3630
3630
  } else if (rt.type === z.TextExplosion) {
3631
3631
  const K = st.force || 1, vt = this.currentTime % 2;
3632
3632
  if (vt < 1) {
3633
- const yt = (Mt / Q.length - 0.5) * Math.PI * 2, fe = vt * 100 * K;
3633
+ const yt = (wt / Q.length - 0.5) * Math.PI * 2, fe = vt * 100 * K;
3634
3634
  Ut += Math.cos(yt) * fe * ut, It += Math.sin(yt) * fe * ut, ft = 1 - vt;
3635
3635
  }
3636
3636
  } else if (rt.type === z.TextRain) {
3637
- const K = st.speed || 1, vt = st.height || 100, yt = (Wt * 1e-3 * K + Mt * 0.1) % 1;
3637
+ const K = st.speed || 1, vt = st.height || 100, yt = (Wt * 1e-3 * K + wt * 0.1) % 1;
3638
3638
  It -= (1 - yt) * vt * ut, ft = yt > 0.1 ? 1 : yt * 10;
3639
3639
  } else if (rt.type === z.TextGravity) {
3640
3640
  const K = st.gravity || 9.8, vt = this.currentTime % 3 / 3, yt = 0.5 * K * Math.pow(vt * 10, 2);
@@ -3645,21 +3645,21 @@ class fi {
3645
3645
  const yt = "0123456789ABCDEF!@#$%^&*";
3646
3646
  mt = yt[Math.floor(Math.random() * yt.length)];
3647
3647
  }
3648
- ft = 0.3 + (Math.sin(Wt * 0.01 * K + Mt) + 1) / 2 * 0.7;
3648
+ ft = 0.3 + (Math.sin(Wt * 0.01 * K + wt) + 1) / 2 * 0.7;
3649
3649
  } else if (rt.type === z.TextNeon) {
3650
3650
  const K = Math.random() > 0.95 ? 0.5 : 1;
3651
3651
  ft = (0.7 + (Math.sin(Wt * 5e-3) + 1) / 2 * 0.3) * K;
3652
3652
  } else if (rt.type === z.TextDissolve)
3653
- Math.sin(Mt * 1.5 + Wt * 2e-3 * (st.speed || 1)) > 0.5 && (ft = 0);
3653
+ Math.sin(wt * 1.5 + Wt * 2e-3 * (st.speed || 1)) > 0.5 && (ft = 0);
3654
3654
  else if (rt.type === z.TextOrganic) {
3655
3655
  const K = st.speed || 1, vt = st.amplitude || 10;
3656
- Ut += Math.sin(Wt * 2e-3 * K + Mt) * vt * ut, It += Math.cos(Wt * 15e-4 * K + Mt * 0.7) * vt * ut;
3656
+ Ut += Math.sin(Wt * 2e-3 * K + wt) * vt * ut, It += Math.cos(Wt * 15e-4 * K + wt * 0.7) * vt * ut;
3657
3657
  } else if (rt.type === z.TextBreathe) {
3658
- const vt = 1 + (Math.sin(Wt * 3e-3 + Mt * 0.2) + 1) / 2 * 0.2 * ut;
3658
+ const vt = 1 + (Math.sin(Wt * 3e-3 + wt * 0.2) + 1) / 2 * 0.2 * ut;
3659
3659
  Xt *= vt, qt *= vt;
3660
3660
  } else if (rt.type === z.TextSpin) {
3661
3661
  const K = st.speed || 1;
3662
- ht += Wt * 0.01 * K + Mt;
3662
+ ht += Wt * 0.01 * K + wt;
3663
3663
  } else if (rt.type === z.TextMagnet) {
3664
3664
  const K = this.pointerHistory[this.pointerHistory.length - 1];
3665
3665
  if (K) {
@@ -3667,21 +3667,21 @@ class fi {
3667
3667
  ht = Math.atan2(yt, vt);
3668
3668
  }
3669
3669
  } else if (rt.type === z.TextPerspective) {
3670
- const K = Q.length / 2, vt = (Mt - K) / K, yt = 1 - Math.abs(vt) * 0.3 * ut;
3670
+ const K = Q.length / 2, vt = (wt - K) / K, yt = 1 - Math.abs(vt) * 0.3 * ut;
3671
3671
  Xt *= yt, qt *= yt, Ut += vt * 20 * ut;
3672
3672
  } else if (rt.type === z.TextMirror)
3673
3673
  ft *= 0.8;
3674
3674
  else if (rt.type === z.TextFloral) {
3675
- const K = st.speed || 1, vt = st.stagger || 0.1, yt = (Wt * 1e-3 * K + Mt * vt) % 2;
3675
+ const K = st.speed || 1, vt = st.stagger || 0.1, yt = (Wt * 1e-3 * K + wt * vt) % 2;
3676
3676
  yt < 1 && (Xt *= yt, qt *= yt, ht += yt * Math.PI);
3677
3677
  } else if (rt.type === z.TextSmoke) {
3678
- const K = st.speed || 1, vt = st.height || 50, yt = (Wt * 5e-4 * K + Mt * 0.2) % 1;
3679
- It -= yt * vt * ut, Ut += Math.sin(Wt * 2e-3 + Mt) * 5 * ut, ft = 1 - yt;
3678
+ const K = st.speed || 1, vt = st.height || 50, yt = (Wt * 5e-4 * K + wt * 0.2) % 1;
3679
+ It -= yt * vt * ut, Ut += Math.sin(Wt * 2e-3 + wt) * 5 * ut, ft = 1 - yt;
3680
3680
  } else if (rt.type === z.TextVariable) {
3681
- const K = st.speed || 1, vt = st.intensity || 1.5, yt = (Math.sin(Wt * 4e-3 * K + Mt * 0.3) + 1) / 2;
3681
+ const K = st.speed || 1, vt = st.intensity || 1.5, yt = (Math.sin(Wt * 4e-3 * K + wt * 0.3) + 1) / 2;
3682
3682
  Xt *= 1 + yt * (vt - 1) * ut;
3683
3683
  } else if (rt.type === z.TextZing) {
3684
- const K = st.speed || 2, vt = st.distance || 100, yt = (Wt * 2e-3 * K + Mt * 0.05) % 1;
3684
+ const K = st.speed || 2, vt = st.distance || 100, yt = (Wt * 2e-3 * K + wt * 0.05) % 1;
3685
3685
  Ut += (1 - yt) * vt * ut, ft = yt;
3686
3686
  } else if (rt.type === z.TextElastic) {
3687
3687
  const K = st.stiffness || 0.2, vt = st.damping || 0.1, yt = Math.sin(Wt * 0.01) * Math.exp(-Wt * 1e-3 * vt);
@@ -3698,7 +3698,7 @@ class fi {
3698
3698
  if (o.enableSegments === !0 && ((dt = o.segments) == null ? void 0 : dt.length) > 0) {
3699
3699
  let rt = 0, st = null;
3700
3700
  for (const ut of o.segments) {
3701
- if (Mt < rt + (ut.text || "").length) {
3701
+ if (wt < rt + (ut.text || "").length) {
3702
3702
  st = ut;
3703
3703
  break;
3704
3704
  }
@@ -3735,7 +3735,7 @@ class fi {
3735
3735
  const rt = f ? "#000000" : this.createCanvasFill(t, e.fill, k, Y);
3736
3736
  t.fillStyle = rt || e.fill.color || "#ffffff", t.fillText(mt, -Kt / 2, 0);
3737
3737
  } else Ct ? t.strokeText(mt, -Kt / 2, 0) : t.fillText(mt, -Kt / 2, 0);
3738
- gt !== "none" && !r && this.drawTextDecoration(t, gt, 0, 0, Kt, Dt), t.restore(), t.globalAlpha = te, M === "justify" && et > 0 && mt === " " && !nt ? Tt += Kt + I + et : Tt += Kt + I;
3738
+ gt !== "none" && !r && this.drawTextDecoration(t, gt, 0, 0, Kt, Dt), t.restore(), t.globalAlpha = te, w === "justify" && et > 0 && mt === " " && !nt ? Tt += Kt + I + et : Tt += Kt + I;
3739
3739
  }
3740
3740
  }
3741
3741
  };
@@ -3745,16 +3745,16 @@ class fi {
3745
3745
  const Ct = Ot.text || "", St = c.indexOf(Ct, Q);
3746
3746
  St !== -1 && (Q = St);
3747
3747
  let Gt = -k / 2;
3748
- M === "center" ? Gt = 0 : M === "right" && (Gt = k / 2), Z(Ct, Gt, ct, !1, Q), Q += Ct.length, ct += _;
3748
+ w === "center" ? Gt = 0 : w === "right" && (Gt = k / 2), Z(Ct, Gt, ct, !1, Q), Q += Ct.length, ct += P;
3749
3749
  });
3750
3750
  } else if (f) {
3751
3751
  let Q = 0, ct = X;
3752
3752
  (A || []).forEach((Ot) => {
3753
3753
  const Ct = Ot.text || "";
3754
3754
  let St = -k / 2;
3755
- M === "center" ? St = 0 : M === "right" && (St = k / 2), Z(Ct, St, ct, !1, Q), Q += Ct.length, Q < c.length && (c[Q] === `
3755
+ w === "center" ? St = 0 : w === "right" && (St = k / 2), Z(Ct, St, ct, !1, Q), Q += Ct.length, Q < c.length && (c[Q] === `
3756
3756
  ` || c[Q] === "\r") && (Q++, c[Q - 1] === "\r" && c[Q] === `
3757
- ` && Q++), ct += _;
3757
+ ` && Q++), ct += P;
3758
3758
  });
3759
3759
  } else {
3760
3760
  if (e.fill) {
@@ -3769,13 +3769,13 @@ class fi {
3769
3769
  (A || []).forEach((Zt) => {
3770
3770
  const jt = Zt.text || "";
3771
3771
  let Qt = -k / 2;
3772
- M === "center" ? Qt = 0 : M === "right" && (Qt = k / 2), Z(jt, Qt, Gt, !1, St), St += jt.length, Gt += _, St < Ct.length && (Ct[St] === `
3772
+ w === "center" ? Qt = 0 : w === "right" && (Qt = k / 2), Z(jt, Qt, Gt, !1, St), St += jt.length, Gt += P, St < Ct.length && (Ct[St] === `
3773
3773
  ` || Ct[St] === "\r") && (F > 0 && (Gt += F), St++, Ct[St - 1] === "\r" && Ct[St] === `
3774
3774
  ` && St++);
3775
3775
  }), t.globalAlpha = ct;
3776
3776
  }
3777
3777
  const Q = o.paragraphRule;
3778
- if (Q && (((Pt = Q.top) == null ? void 0 : Pt.width) > 0 || ((Vt = Q.bottom) == null ? void 0 : Vt.width) > 0)) {
3778
+ if (Q && (((_t = Q.top) == null ? void 0 : _t.width) > 0 || ((Vt = Q.bottom) == null ? void 0 : Vt.width) > 0)) {
3779
3779
  let ct = 0;
3780
3780
  (A || []).forEach((Ot, Ct) => {
3781
3781
  var Zt, jt;
@@ -3783,16 +3783,16 @@ class fi {
3783
3783
  ` || c[ct] === "\r");
3784
3784
  if (Gt && Ct > 0 && ct++, Gt) {
3785
3785
  if (((Zt = Q.top) == null ? void 0 : Zt.width) > 0) {
3786
- const Qt = X + Ct * _ - Q.top.offset;
3786
+ const Qt = X + Ct * P - Q.top.offset;
3787
3787
  t.strokeStyle = Q.top.color || "#000000", t.lineWidth = Q.top.width, t.beginPath();
3788
- const Nt = -n / 2 + _ * 0.2;
3789
- t.moveTo(Nt, Qt), t.lineTo(n / 2 - _ * 0.2, Qt), t.stroke();
3788
+ const Nt = -n / 2 + P * 0.2;
3789
+ t.moveTo(Nt, Qt), t.lineTo(n / 2 - P * 0.2, Qt), t.stroke();
3790
3790
  }
3791
3791
  if (((jt = Q.bottom) == null ? void 0 : jt.width) > 0) {
3792
- const Qt = X + (Ct + 1) * _ - Q.bottom.offset;
3792
+ const Qt = X + (Ct + 1) * P - Q.bottom.offset;
3793
3793
  t.strokeStyle = Q.bottom.color || "#000000", t.lineWidth = Q.bottom.width, t.beginPath();
3794
- const Nt = -n / 2 + _ * 0.2;
3795
- t.moveTo(Nt, Qt), t.lineTo(n / 2 - _ * 0.2, Qt), t.stroke();
3794
+ const Nt = -n / 2 + P * 0.2;
3795
+ t.moveTo(Nt, Qt), t.lineTo(n / 2 - P * 0.2, Qt), t.stroke();
3796
3796
  }
3797
3797
  }
3798
3798
  ct += (Ot.text || "").length;
@@ -3804,7 +3804,7 @@ class fi {
3804
3804
  let Ct = 0, St = X;
3805
3805
  (A || []).forEach((Gt) => {
3806
3806
  let Zt = -k / 2;
3807
- M === "center" ? Zt = 0 : M === "right" && (Zt = k / 2), Z(Gt.text, Zt, St, !0, Ct), Ct += (Gt.text || "").length, St += _, Ct < c.length && (c[Ct] === `
3807
+ w === "center" ? Zt = 0 : w === "right" && (Zt = k / 2), Z(Gt.text, Zt, St, !0, Ct), Ct += (Gt.text || "").length, St += P, Ct < c.length && (c[Ct] === `
3808
3808
  ` || c[Ct] === "\r") && (F > 0 && (St += F), Ct++, c[Ct - 1] === "\r" && c[Ct] === `
3809
3809
  ` && Ct++);
3810
3810
  }), t.globalAlpha = ct;
@@ -3827,13 +3827,13 @@ class fi {
3827
3827
  if (m > 0) {
3828
3828
  const b = Math.max(0, Math.min(1, g)), v = Math.max(0, Math.min(1, d));
3829
3829
  if (b < v) {
3830
- const C = m * (v - b), S = m - C, w = -(m * (b + l % 1));
3831
- t.setLineDash([C, S]), t.lineDashOffset = w + u * m;
3830
+ const C = m * (v - b), S = m - C, M = -(m * (b + l % 1));
3831
+ t.setLineDash([C, S]), t.lineDashOffset = M + u * m;
3832
3832
  } else if (b === v)
3833
3833
  t.setLineDash([0, m]);
3834
3834
  else {
3835
- const C = m * (1 - b + v), S = m - C, w = -(m * b);
3836
- t.setLineDash([C, S]), t.lineDashOffset = w + u * m;
3835
+ const C = m * (1 - b + v), S = m - C, M = -(m * b);
3836
+ t.setLineDash([C, S]), t.lineDashOffset = M + u * m;
3837
3837
  }
3838
3838
  }
3839
3839
  } else y.length > 0 && (t.setLineDash(y), t.lineDashOffset = u);
@@ -3886,14 +3886,14 @@ class fi {
3886
3886
  f.x,
3887
3887
  f.y
3888
3888
  ) : s += Math.sqrt((f.x - h) ** 2 + (f.y - c) ** 2), n = f.x, a = f.y, f.closePath || r === e.length - 1 && (t.is_closed || t.isClosed)) {
3889
- const l = n, u = a, y = [...e.slice(0, r + 1)].reverse().find((M) => M.moveTo) || e[0], m = y.x, b = y.y, v = e[r].out_x, C = e[r].out_y, S = y.in_x, w = y.in_y;
3889
+ const l = n, u = a, y = [...e.slice(0, r + 1)].reverse().find((w) => w.moveTo) || e[0], m = y.x, b = y.y, v = e[r].out_x, C = e[r].out_y, S = y.in_x, M = y.in_y;
3890
3890
  v !== void 0 || S !== void 0 ? s += this.getBezierLength(
3891
3891
  l,
3892
3892
  u,
3893
3893
  v ?? l,
3894
3894
  C ?? u,
3895
3895
  S ?? m,
3896
- w ?? b,
3896
+ M ?? b,
3897
3897
  m,
3898
3898
  b
3899
3899
  ) : s += Math.sqrt((m - l) ** 2 + (b - u) ** 2);
@@ -3908,8 +3908,8 @@ class fi {
3908
3908
  getBezierLength(t, i, o, e, s, n, a, r, f = 10) {
3909
3909
  let h = 0, c = t, g = i;
3910
3910
  for (let d = 1; d <= f; d++) {
3911
- const l = d / f, u = 1 - l, y = l * l, m = u * u, b = m * u, v = y * l, C = b * t + 3 * m * l * o + 3 * u * y * s + v * a, S = b * i + 3 * m * l * e + 3 * u * y * n + v * r, w = C - c, M = S - g;
3912
- h += Math.sqrt(w * w + M * M), c = C, g = S;
3911
+ const l = d / f, u = 1 - l, y = l * l, m = u * u, b = m * u, v = y * l, C = b * t + 3 * m * l * o + 3 * u * y * s + v * a, S = b * i + 3 * m * l * e + 3 * u * y * n + v * r, M = C - c, w = S - g;
3912
+ h += Math.sqrt(M * M + w * w), c = C, g = S;
3913
3913
  }
3914
3914
  return h;
3915
3915
  }
@@ -3917,12 +3917,12 @@ class fi {
3917
3917
  if (t <= 0) return 0;
3918
3918
  let c = 0, g = i, d = o;
3919
3919
  for (let l = 1; l <= h; l++) {
3920
- const u = l / h, y = 1 - u, m = u * u, b = y * y, v = b * y, C = m * u, S = v * i + 3 * b * u * e + 3 * y * m * n + C * r, w = v * o + 3 * b * u * s + 3 * y * m * a + C * f, M = S - g, I = w - d, P = Math.sqrt(M * M + I * I);
3921
- if (c + P >= t) {
3922
- const E = t - c, F = P === 0 ? 0 : E / P;
3920
+ const u = l / h, y = 1 - u, m = u * u, b = y * y, v = b * y, C = m * u, S = v * i + 3 * b * u * e + 3 * y * m * n + C * r, M = v * o + 3 * b * u * s + 3 * y * m * a + C * f, w = S - g, I = M - d, _ = Math.sqrt(w * w + I * I);
3921
+ if (c + _ >= t) {
3922
+ const E = t - c, F = _ === 0 ? 0 : E / _;
3923
3923
  return (l - 1 + F) / h;
3924
3924
  }
3925
- c += P, g = S, d = w;
3925
+ c += _, g = S, d = M;
3926
3926
  }
3927
3927
  return 1;
3928
3928
  }
@@ -3949,15 +3949,15 @@ class fi {
3949
3949
  for (const b of u) {
3950
3950
  const v = b.p0, C = b.p1;
3951
3951
  let S = 0;
3952
- const w = v.out_x !== void 0 || C.in_x !== void 0;
3953
- if (w ? S = this.getBezierLength(v.x, v.y, v.out_x ?? v.x, v.out_y ?? v.y, C.in_x ?? C.x, C.in_y ?? C.y, C.x, C.y) : S = Math.sqrt((C.x - v.x) ** 2 + (C.y - v.y) ** 2), l + S >= d || b === u[u.length - 1]) {
3954
- let M = 0;
3955
- if (w)
3956
- return M = this.getBezierTAtLength(d - l, v.x, v.y, v.out_x ?? v.x, v.out_y ?? v.y, C.in_x ?? C.x, C.in_y ?? C.y, C.x, C.y, 20), this.getBezierPointAndAngle(M, v, C, h, c);
3952
+ const M = v.out_x !== void 0 || C.in_x !== void 0;
3953
+ if (M ? S = this.getBezierLength(v.x, v.y, v.out_x ?? v.x, v.out_y ?? v.y, C.in_x ?? C.x, C.in_y ?? C.y, C.x, C.y) : S = Math.sqrt((C.x - v.x) ** 2 + (C.y - v.y) ** 2), l + S >= d || b === u[u.length - 1]) {
3954
+ let w = 0;
3955
+ if (M)
3956
+ return w = this.getBezierTAtLength(d - l, v.x, v.y, v.out_x ?? v.x, v.out_y ?? v.y, C.in_x ?? C.x, C.in_y ?? C.y, C.x, C.y, 20), this.getBezierPointAndAngle(w, v, C, h, c);
3957
3957
  {
3958
- M = S === 0 ? 0 : (d - l) / S;
3959
- const I = v.x + (C.x - v.x) * M - h, P = v.y + (C.y - v.y) * M - c, E = Math.atan2(C.y - v.y, C.x - v.x);
3960
- return { x: I, y: P, angle: E };
3958
+ w = S === 0 ? 0 : (d - l) / S;
3959
+ const I = v.x + (C.x - v.x) * w - h, _ = v.y + (C.y - v.y) * w - c, E = Math.atan2(C.y - v.y, C.x - v.x);
3960
+ return { x: I, y: _, angle: E };
3961
3961
  }
3962
3962
  }
3963
3963
  l += S;
@@ -3973,8 +3973,8 @@ class fi {
3973
3973
  return { x: 0, y: 0, angle: 0 };
3974
3974
  }
3975
3975
  getBezierPointAndAngle(t, i, o, e, s) {
3976
- const n = i.x, a = i.y, r = i.out_x ?? i.x, f = i.out_y ?? i.y, h = o.in_x ?? o.x, c = o.in_y ?? o.y, g = o.x, d = o.y, l = 1 - t, u = t * t, y = l * l, m = y * l, b = u * t, v = m * n + 3 * y * t * r + 3 * l * u * h + b * g - e, C = m * a + 3 * y * t * f + 3 * l * u * c + b * d - s, S = 3 * y * (r - n) + 6 * l * t * (h - r) + 3 * u * (g - h), w = 3 * y * (f - a) + 6 * l * t * (c - f) + 3 * u * (d - c), M = Math.atan2(w, S);
3977
- return { x: v, y: C, angle: M };
3976
+ const n = i.x, a = i.y, r = i.out_x ?? i.x, f = i.out_y ?? i.y, h = o.in_x ?? o.x, c = o.in_y ?? o.y, g = o.x, d = o.y, l = 1 - t, u = t * t, y = l * l, m = y * l, b = u * t, v = m * n + 3 * y * t * r + 3 * l * u * h + b * g - e, C = m * a + 3 * y * t * f + 3 * l * u * c + b * d - s, S = 3 * y * (r - n) + 6 * l * t * (h - r) + 3 * u * (g - h), M = 3 * y * (f - a) + 6 * l * t * (c - f) + 3 * u * (d - c), w = Math.atan2(M, S);
3977
+ return { x: v, y: C, angle: w };
3978
3978
  }
3979
3979
  applyAbsoluteTransform(t, i, o) {
3980
3980
  if (!o.get(i)) return;
@@ -4017,19 +4017,19 @@ class fi {
4017
4017
  const b = Math.floor(e / g), v = document.createElement("canvas");
4018
4018
  v.width = b, v.height = Math.floor(s / g);
4019
4019
  const C = v.getContext("2d"), S = C.createImageData(v.width, v.height);
4020
- for (let w = 0; w < S.data.length; w += 4) {
4021
- const M = Math.random() > 0.95 ? 150 : 255;
4022
- S.data[w] = M, S.data[w + 1] = M, S.data[w + 2] = M, S.data[w + 3] = 255 * h;
4020
+ for (let M = 0; M < S.data.length; M += 4) {
4021
+ const w = Math.random() > 0.95 ? 150 : 255;
4022
+ S.data[M] = w, S.data[M + 1] = w, S.data[M + 2] = w, S.data[M + 3] = 255 * h;
4023
4023
  }
4024
4024
  C.putImageData(S, 0, 0), t.globalCompositeOperation = "multiply", t.imageSmoothingEnabled = !1, t.drawImage(v, -e / 2, -s / 2, e, s);
4025
4025
  } else if (f === "acid_gradient" || f === "acid_rave") {
4026
4026
  const b = this.currentTime * c, v = r.color1, C = r.color2, S = t.createLinearGradient(-e / 2, -s / 2, e / 2, s / 2);
4027
4027
  if (v && C) {
4028
- const w = b * 60 % 360;
4029
- S.addColorStop(0, this._shiftHue(v, w, h * 0.7)), S.addColorStop(1, this._shiftHue(C, (w + 180) % 360, h * 0.7));
4028
+ const M = b * 60 % 360;
4029
+ S.addColorStop(0, this._shiftHue(v, M, h * 0.7)), S.addColorStop(1, this._shiftHue(C, (M + 180) % 360, h * 0.7));
4030
4030
  } else {
4031
- const w = b * 100 % 360, M = (w + 180) % 360;
4032
- S.addColorStop(0, `hsla(${w}, 80%, 50%, ${h * 0.5})`), S.addColorStop(1, `hsla(${M}, 80%, 50%, ${h * 0.5})`);
4031
+ const M = b * 100 % 360, w = (M + 180) % 360;
4032
+ S.addColorStop(0, `hsla(${M}, 80%, 50%, ${h * 0.5})`), S.addColorStop(1, `hsla(${w}, 80%, 50%, ${h * 0.5})`);
4033
4033
  }
4034
4034
  t.fillStyle = S, t.globalCompositeOperation = "screen", t.fillRect(-e / 2, -s / 2, e, s);
4035
4035
  } else if (f === "halftone") {
@@ -4063,23 +4063,23 @@ class fi {
4063
4063
  } else if (f === "pixelate") {
4064
4064
  const b = Math.max(2, Math.round(g * (1 - h * 0.5))), v = document.createElement("canvas"), C = Math.max(1, Math.ceil(e / b)), S = Math.max(1, Math.ceil(s / b));
4065
4065
  v.width = C, v.height = S;
4066
- const w = v.getContext("2d");
4067
- if (w) {
4068
- w.imageSmoothingEnabled = !1;
4069
- const M = t.getTransform(), I = M.e - e / 2, P = M.f - s / 2;
4070
- w.drawImage(t.canvas, I, P, e, s, 0, 0, C, S), t.imageSmoothingEnabled = !1, t.drawImage(v, 0, 0, C, S, -e / 2, -s / 2, e, s), t.imageSmoothingEnabled = !0;
4066
+ const M = v.getContext("2d");
4067
+ if (M) {
4068
+ M.imageSmoothingEnabled = !1;
4069
+ const w = t.getTransform(), I = w.e - e / 2, _ = w.f - s / 2;
4070
+ M.drawImage(t.canvas, I, _, e, s, 0, 0, C, S), t.imageSmoothingEnabled = !1, t.drawImage(v, 0, 0, C, S, -e / 2, -s / 2, e, s), t.imageSmoothingEnabled = !0;
4071
4071
  }
4072
4072
  } else if (f === "glitch") {
4073
4073
  const b = this.currentTime * c, v = r.chaosAmount ?? 0.2, C = Math.max(3, Math.floor(8 * h)), S = h * e * 0.15;
4074
4074
  t.globalCompositeOperation = "screen", t.globalAlpha = h * 0.4;
4075
- const w = S * 0.3;
4076
- t.fillStyle = "rgba(255, 0, 0, 0.4)", t.fillRect(-e / 2 + w, -s / 2, e, s), t.fillStyle = "rgba(0, 255, 255, 0.4)", t.fillRect(-e / 2 - w, -s / 2, e, s), t.globalCompositeOperation = "source-over", t.globalAlpha = 1;
4077
- const M = s / C;
4075
+ const M = S * 0.3;
4076
+ t.fillStyle = "rgba(255, 0, 0, 0.4)", t.fillRect(-e / 2 + M, -s / 2, e, s), t.fillStyle = "rgba(0, 255, 255, 0.4)", t.fillRect(-e / 2 - M, -s / 2, e, s), t.globalCompositeOperation = "source-over", t.globalAlpha = 1;
4077
+ const w = s / C;
4078
4078
  for (let I = 0; I < C; I++) {
4079
- const P = Math.sin(I * 127.1 + b * 311.7 * c) * 43758.5, E = P - Math.floor(P);
4079
+ const _ = Math.sin(I * 127.1 + b * 311.7 * c) * 43758.5, E = _ - Math.floor(_);
4080
4080
  if (E > 1 - v) {
4081
- const F = (E - (1 - v)) / v * S * (Math.random() > 0.5 ? 1 : -1), T = -s / 2 + I * M, _ = t.getTransform(), L = _.e - e / 2 + F, R = _.f + T;
4082
- t.save(), t.beginPath(), t.rect(-e / 2, T, e, M), t.clip(), t.globalAlpha = 0.8, t.drawImage(t.canvas, L, R, e, M, -e / 2 + F, T, e, M), t.restore();
4081
+ const F = (E - (1 - v)) / v * S * (Math.random() > 0.5 ? 1 : -1), T = -s / 2 + I * w, P = t.getTransform(), L = P.e - e / 2 + F, R = P.f + T;
4082
+ t.save(), t.beginPath(), t.rect(-e / 2, T, e, w), t.clip(), t.globalAlpha = 0.8, t.drawImage(t.canvas, L, R, e, w, -e / 2 + F, T, e, w), t.restore();
4083
4083
  }
4084
4084
  }
4085
4085
  }
@@ -4131,23 +4131,23 @@ class fi {
4131
4131
  { x: o / 2, y: e / 2 }
4132
4132
  ];
4133
4133
  let l = 1 / 0, u = 1 / 0, y = -1 / 0, m = -1 / 0;
4134
- for (const M of d) {
4135
- const I = c.a * M.x + c.c * M.y + c.e, P = c.b * M.x + c.d * M.y + c.f;
4136
- I < l && (l = I), P < u && (u = P), I > y && (y = I), P > m && (m = P);
4134
+ for (const w of d) {
4135
+ const I = c.a * w.x + c.c * w.y + c.e, _ = c.b * w.x + c.d * w.y + c.f;
4136
+ I < l && (l = I), _ < u && (u = _), I > y && (y = I), _ > m && (m = _);
4137
4137
  }
4138
4138
  const b = Math.sqrt(c.a * c.a + c.b * c.b), v = a * b, C = v * 2;
4139
4139
  l = Math.max(0, Math.floor(l - C)), u = Math.max(0, Math.floor(u - C)), y = Math.min(t.canvas.width, Math.ceil(y + C)), m = Math.min(t.canvas.height, Math.ceil(m + C));
4140
- const S = y - l, w = m - u;
4141
- if (S > 0 && w > 0) {
4142
- const M = document.createElement("canvas");
4143
- M.width = S, M.height = w;
4144
- const I = M.getContext("2d");
4140
+ const S = y - l, M = m - u;
4141
+ if (S > 0 && M > 0) {
4142
+ const w = document.createElement("canvas");
4143
+ w.width = S, w.height = M;
4144
+ const I = w.getContext("2d");
4145
4145
  if (I) {
4146
- I.drawImage(t.canvas, l, u, S, w, 0, 0, S, w);
4147
- const P = document.createElement("canvas");
4148
- P.width = S, P.height = w;
4149
- const E = P.getContext("2d");
4150
- E.filter = `blur(${v}px)`, E.drawImage(M, 0, 0), t.save(), t.resetTransform(), t.globalCompositeOperation = "source-over", t.globalAlpha = 1, t.drawImage(P, l, u), t.restore();
4146
+ I.drawImage(t.canvas, l, u, S, M, 0, 0, S, M);
4147
+ const _ = document.createElement("canvas");
4148
+ _.width = S, _.height = M;
4149
+ const E = _.getContext("2d");
4150
+ E.filter = `blur(${v}px)`, E.drawImage(w, 0, 0), t.save(), t.resetTransform(), t.globalCompositeOperation = "source-over", t.globalAlpha = 1, t.drawImage(_, l, u), t.restore();
4151
4151
  }
4152
4152
  }
4153
4153
  } catch {
@@ -4260,9 +4260,9 @@ class fi {
4260
4260
  renderInputBox(t, i) {
4261
4261
  var tt, lt;
4262
4262
  const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.options) || i.options || {}, s = ((tt = i.geometry) == null ? void 0 : tt.width) || 250, n = ((lt = i.geometry) == null ? void 0 : lt.height) || 45, a = this.focusedId === i.id, r = this.lastHoveredObjectId === i.id, f = e.previewState || "default", h = f !== "default" ? f : a ? "focused" : r ? "hovered" : "default", c = e.label || { visible: !0, text: "Label" }, g = e.helperText || { visible: !1, text: "Helper text" }, d = e.leftIcon || { visible: !1 }, l = e.rightIcon || { visible: !1 }, u = e.multiline === !0, y = e.corner_radius ?? 8, m = e.corners || { tl: y, tr: y, bl: y, br: y }, b = [m.tl, m.tr, m.br, m.bl];
4263
- let v = e.backgroundColor || "rgba(31, 41, 55, 1)", C = e.borderColor || "rgba(55, 65, 81, 1)", S = e.borderWidth ?? 1.5, w = e.color || "#ffffff", M = e.placeholderColor || "rgba(156, 163, 175, 1)", I = e.fontSize || 14;
4264
- const P = `${h}Style`, E = e[P];
4265
- E ? (E.backgroundColor !== void 0 && (v = E.backgroundColor), E.borderColor !== void 0 && (C = E.borderColor), E.borderWidth !== void 0 && (S = E.borderWidth), E.color !== void 0 && (w = E.color), E.placeholderColor !== void 0 && (M = E.placeholderColor), E.fontSize !== void 0 && (I = E.fontSize)) : h === "focused" ? (C = e.focusBorderColor || "rgba(59, 130, 246, 1)", S = Math.max(S, 2)) : h === "hovered" || h === "hover" ? (C = e.hoverBorderColor || C, v = e.hoverBackgroundColor || v) : h === "disabled" ? (v = e.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", C = e.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : h === "error" && (C = "rgba(239, 68, 68, 1)", S = Math.max(S, 2)), t.beginPath(), this.drawRoundRect(t, -s / 2, -n / 2, s, n, b);
4263
+ let v = e.backgroundColor || "rgba(31, 41, 55, 1)", C = e.borderColor || "rgba(55, 65, 81, 1)", S = e.borderWidth ?? 1.5, M = e.color || "#ffffff", w = e.placeholderColor || "rgba(156, 163, 175, 1)", I = e.fontSize || 14;
4264
+ const _ = `${h}Style`, E = e[_];
4265
+ E ? (E.backgroundColor !== void 0 && (v = E.backgroundColor), E.borderColor !== void 0 && (C = E.borderColor), E.borderWidth !== void 0 && (S = E.borderWidth), E.color !== void 0 && (M = E.color), E.placeholderColor !== void 0 && (w = E.placeholderColor), E.fontSize !== void 0 && (I = E.fontSize)) : h === "focused" ? (C = e.focusBorderColor || "rgba(59, 130, 246, 1)", S = Math.max(S, 2)) : h === "hovered" || h === "hover" ? (C = e.hoverBorderColor || C, v = e.hoverBackgroundColor || v) : h === "disabled" ? (v = e.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", C = e.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : h === "error" && (C = "rgba(239, 68, 68, 1)", S = Math.max(S, 2)), t.beginPath(), this.drawRoundRect(t, -s / 2, -n / 2, s, n, b);
4266
4266
  const F = this.createCanvasFill(t, v, s, n);
4267
4267
  if (F && (t.fillStyle = F, t.fill()), S > 0) {
4268
4268
  const Z = this.createCanvasFill(t, C, s, n);
@@ -4276,13 +4276,13 @@ class fi {
4276
4276
  if (!Z.visible || !Z.svgPath) return;
4277
4277
  const at = Z.size || 14, Et = Z.offset ?? 16, xt = Z.color || "#ffffff", bt = pt ? -(s / 2) + Et : s / 2 - Et, Bt = Z.svgPath;
4278
4278
  if (t.save(), t.translate(bt, 0), !Bt.startsWith("<svg")) {
4279
- const $t = new Path2D(Bt), Pt = at / 24;
4280
- t.scale(Pt, Pt), t.translate(-12, -12), t.fillStyle = xt, t.fill($t);
4279
+ const $t = new Path2D(Bt), _t = at / 24;
4280
+ t.scale(_t, _t), t.translate(-12, -12), t.fillStyle = xt, t.fill($t);
4281
4281
  }
4282
4282
  t.restore();
4283
4283
  };
4284
4284
  T(d, !0), T(l, !1);
4285
- const _ = e.text || "", L = e.placeholder || "Enter text...", R = !_, W = _ || L, B = R ? M : w, A = I, $ = e.fontFamily || "Inter", G = e.fontWeight || 400;
4285
+ const P = e.text || "", L = e.placeholder || "Enter text...", R = !P, W = P || L, B = R ? w : M, A = I, $ = e.fontFamily || "Inter", G = e.fontWeight || 400;
4286
4286
  t.font = `${G} ${A}px "${$}", sans-serif`, t.fillStyle = B, t.textAlign = "left", t.textBaseline = u ? "top" : "middle";
4287
4287
  const N = e.inputPadding ?? 16, x = d.visible ? (d.offset ?? 16) + (d.size || 14) / 2 + 8 : N, k = l.visible ? (l.offset ?? 16) + (l.size || 14) / 2 + 8 : N, Y = -(s / 2) + x, X = s - x - k, J = e.inputType === "password" ? "•".repeat(W.length) : W;
4288
4288
  if (t.save(), t.beginPath(), t.rect(Y - 2, -n / 2 + 4, X + 4, n - 8), t.clip(), u) {
@@ -4294,9 +4294,9 @@ class fi {
4294
4294
  Z.forEach((xt, bt) => {
4295
4295
  const Bt = xt.split(" ");
4296
4296
  let $t = "";
4297
- for (let Pt = 0; Pt < Bt.length; Pt++) {
4298
- const Vt = $t + Bt[Pt] + " ";
4299
- t.measureText(Vt).width > X && Pt > 0 ? (t.fillText($t, Y, pt), $t = Bt[Pt] + " ", pt += at) : $t = Vt;
4297
+ for (let _t = 0; _t < Bt.length; _t++) {
4298
+ const Vt = $t + Bt[_t] + " ";
4299
+ t.measureText(Vt).width > X && _t > 0 ? (t.fillText($t, Y, pt), $t = Bt[_t] + " ", pt += at) : $t = Vt;
4300
4300
  }
4301
4301
  t.fillText($t, Y, pt), Et = t.measureText($t).width, bt < Z.length - 1 && (pt += at, Et = 0);
4302
4302
  }), a && !R && Math.floor(performance.now() / 500) % 2 === 0 && t.fillRect(Y + Et, pt, 1.5, A);
@@ -4322,7 +4322,7 @@ class fi {
4322
4322
  }
4323
4323
  }
4324
4324
  renderSlider(t, i) {
4325
- const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.geometry) || i.geometry, s = (o == null ? void 0 : o.options) || i.options || {}, n = e.width || 200, a = s.value ?? 50, r = s.min ?? 0, h = (s.max ?? 100) - r, c = h === 0 ? 0 : (a - r) / h, g = s.trackHeight || 4, d = s.trackRoundedness ?? 2, l = s.trackShape ?? "Rectangle", u = s.trackPath || "", y = s.accentColor || "#3b82f6", m = s.inactiveColor || "#374151", b = s.thumbShape || "Ellipse", v = s.thumbWidth ?? 16, C = s.thumbHeight ?? 16, S = s.thumbRoundedness ?? 0, w = s.thumbColor || "#ffffff", M = s.thumbPath || "", I = s.thumbIcon || "", P = s.showValueTooltip ?? !1, E = s.tooltipBgColor || "#333333", F = s.tooltipColor || "#ffffff", T = s.tooltipOffsetX ?? 0, _ = s.tooltipOffsetY ?? -25, L = (X, J, tt, lt, Z, pt, at) => {
4325
+ const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.geometry) || i.geometry, s = (o == null ? void 0 : o.options) || i.options || {}, n = e.width || 200, a = s.value ?? 50, r = s.min ?? 0, h = (s.max ?? 100) - r, c = h === 0 ? 0 : (a - r) / h, g = s.trackHeight || 4, d = s.trackRoundedness ?? 2, l = s.trackShape ?? "Rectangle", u = s.trackPath || "", y = s.accentColor || "#3b82f6", m = s.inactiveColor || "#374151", b = s.thumbShape || "Ellipse", v = s.thumbWidth ?? 16, C = s.thumbHeight ?? 16, S = s.thumbRoundedness ?? 0, M = s.thumbColor || "#ffffff", w = s.thumbPath || "", I = s.thumbIcon || "", _ = s.showValueTooltip ?? !1, E = s.tooltipBgColor || "#333333", F = s.tooltipColor || "#ffffff", T = s.tooltipOffsetX ?? 0, P = s.tooltipOffsetY ?? -25, L = (X, J, tt, lt, Z, pt, at) => {
4326
4326
  if ((X === "Custom" || X === "Icon") && at)
4327
4327
  try {
4328
4328
  const Et = new Path2D(at);
@@ -4346,15 +4346,15 @@ class fi {
4346
4346
  else if (X === "Polygon") {
4347
4347
  const Et = i.geometry.sides || 3, xt = i.geometry.radius || Math.min(lt, Z) / 2;
4348
4348
  for (let bt = 0; bt < Et; bt++) {
4349
- const Bt = bt * 2 * Math.PI / Et - Math.PI / 2, $t = J + xt * Math.cos(Bt), Pt = tt + xt * Math.sin(Bt);
4350
- bt === 0 ? t.moveTo($t, Pt) : t.lineTo($t, Pt);
4349
+ const Bt = bt * 2 * Math.PI / Et - Math.PI / 2, $t = J + xt * Math.cos(Bt), _t = tt + xt * Math.sin(Bt);
4350
+ bt === 0 ? t.moveTo($t, _t) : t.lineTo($t, _t);
4351
4351
  }
4352
4352
  t.closePath();
4353
4353
  } else if (X === "Star") {
4354
4354
  const xt = Math.min(lt, Z) / 2, bt = xt / 2;
4355
4355
  for (let Bt = 0; Bt < 10; Bt++) {
4356
- const $t = Bt % 2 === 0 ? xt : bt, Pt = Bt * Math.PI / 5 - Math.PI / 2;
4357
- t.lineTo(J + $t * Math.cos(Pt), tt + $t * Math.sin(Pt));
4356
+ const $t = Bt % 2 === 0 ? xt : bt, _t = Bt * Math.PI / 5 - Math.PI / 2;
4357
+ t.lineTo(J + $t * Math.cos(_t), tt + $t * Math.sin(_t));
4358
4358
  }
4359
4359
  t.closePath();
4360
4360
  } else X === "Line" && (t.moveTo(J - lt / 2, tt), t.lineTo(J + lt / 2, tt));
@@ -4369,9 +4369,9 @@ class fi {
4369
4369
  t.save(), t.translate(B, 0);
4370
4370
  const $ = t.getTransform(), G = Math.sqrt($.a * $.a + $.b * $.b) || 1;
4371
4371
  t.shadowColor = "rgba(0,0,0,0.2)", t.shadowBlur = 4 * G, t.shadowOffsetY = 1 * G;
4372
- const N = this.createCanvasFill(t, w, v, C);
4373
- if (N && (t.fillStyle = N), L(b, 0, 0, v, C, S, b === "Icon" ? I : M), t.restore(), P) {
4374
- t.save(), t.translate(B + T, _);
4372
+ const N = this.createCanvasFill(t, M, v, C);
4373
+ if (N && (t.fillStyle = N), L(b, 0, 0, v, C, S, b === "Icon" ? I : w), t.restore(), _) {
4374
+ t.save(), t.translate(B + T, P);
4375
4375
  const X = Math.round(a).toString();
4376
4376
  t.font = "10px Inter, sans-serif";
4377
4377
  const J = t.measureText(X), tt = 6, lt = 4, Z = J.width + tt * 2, pt = 14 + lt;
@@ -4392,7 +4392,7 @@ class fi {
4392
4392
  }
4393
4393
  }
4394
4394
  renderDropdown(t, i) {
4395
- var _;
4395
+ var P;
4396
4396
  const o = this.objectStates.get(i.id);
4397
4397
  if (!o) return;
4398
4398
  const e = o.options || i.options || {}, s = i.geometry.width || 160, n = i.geometry.height || 40, a = -s / 2, r = -n / 2, f = e.corner_radius ?? 6, h = e.disabled || e.previewState === "disabled", c = this.lastHoveredObjectId === i.id || e.previewState === "hover", g = (e.isOpen || e.previewState === "active") && !h;
@@ -4420,19 +4420,19 @@ class fi {
4420
4420
  }
4421
4421
  t.restore();
4422
4422
  }
4423
- const w = e.selectedOption || e.placeholder || "Select...", M = e.fontSize || 14, I = e.fontWeight || 400, P = e.fontFamily || "Inter, sans-serif";
4424
- t.font = `${I} ${M}px ${P}`;
4423
+ const M = e.selectedOption || e.placeholder || "Select...", w = e.fontSize || 14, I = e.fontWeight || 400, _ = e.fontFamily || "Inter, sans-serif";
4424
+ t.font = `${I} ${w}px ${_}`;
4425
4425
  const E = h ? e.disabledColor || "#9ca3af" : !e.selectedOption && e.placeholder ? "#9ca3af" : u;
4426
4426
  t.fillStyle = this.createCanvasFill(t, typeof E == "string" ? { type: "Solid", color: E } : E, s, n) || "#333333", t.textAlign = "left", t.textBaseline = "middle";
4427
4427
  const F = v === "none" ? 0 : C + 8, T = s - b * 2 - F;
4428
- if (t.save(), t.beginPath(), t.rect(a + b, r, T, n), t.clip(), t.fillText(w, a + b, 0), t.restore(), g && !h) {
4428
+ if (t.save(), t.beginPath(), t.rect(a + b, r, T, n), t.clip(), t.fillText(M, a + b, 0), t.restore(), g && !h) {
4429
4429
  const L = r + n + 4, R = e.optionsList || [], W = e.itemHeight || 32, B = e.listPadding ?? 4, A = R.length * W + B * 2, $ = e.listCornerRadius ?? f;
4430
4430
  t.save();
4431
4431
  const G = e.listShadow || {}, N = t.getTransform(), x = Math.sqrt(N.a * N.a + N.b * N.b) || 1;
4432
- t.shadowColor = typeof G.color == "string" ? G.color : ((_ = G.color) == null ? void 0 : _.color) || "rgba(0,0,0,0.15)", t.shadowBlur = (G.blur ?? 12) * x, t.shadowOffsetY = (G.offsetY ?? 6) * x, t.shadowOffsetX = (G.offsetX ?? 0) * x, t.beginPath(), this.drawRoundRect(t, a, L, s, A, $), t.fillStyle = this.createCanvasFill(t, typeof e.listBackgroundColor == "string" ? { type: "Solid", color: e.listBackgroundColor } : e.listBackgroundColor || { type: "Solid", color: "#ffffff" }, s, A) || "#ffffff", t.fill();
4432
+ t.shadowColor = typeof G.color == "string" ? G.color : ((P = G.color) == null ? void 0 : P.color) || "rgba(0,0,0,0.15)", t.shadowBlur = (G.blur ?? 12) * x, t.shadowOffsetY = (G.offsetY ?? 6) * x, t.shadowOffsetX = (G.offsetX ?? 0) * x, t.beginPath(), this.drawRoundRect(t, a, L, s, A, $), t.fillStyle = this.createCanvasFill(t, typeof e.listBackgroundColor == "string" ? { type: "Solid", color: e.listBackgroundColor } : e.listBackgroundColor || { type: "Solid", color: "#ffffff" }, s, A) || "#ffffff", t.fill();
4433
4433
  const k = e.listBorderWidth ?? 1;
4434
4434
  k > 0 && (t.shadowColor = "transparent", t.strokeStyle = this.createCanvasFill(t, typeof e.listBorderColor == "string" ? { type: "Solid", color: e.listBorderColor } : e.listBorderColor || { type: "Solid", color: l }, s, A) || "#e5e7eb", t.lineWidth = k, t.stroke()), t.restore();
4435
- const Y = e.itemFontSize || M, X = e.itemFontFamily || P;
4435
+ const Y = e.itemFontSize || w, X = e.itemFontFamily || _;
4436
4436
  t.font = `${I} ${Y}px ${X}`, R.forEach((J, tt) => {
4437
4437
  const lt = L + B + tt * W;
4438
4438
  if (J === e.selectedOption)
@@ -4451,16 +4451,16 @@ class fi {
4451
4451
  const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.options) || i.options || {}, s = i.geometry || {}, n = s.width || 120, a = s.height || 40, r = this.lastHoveredObjectId === i.id, f = this.activeObjectId === i.id, h = e.label || {}, c = e.hoverStyle || {}, g = e.activeStyle || {}, d = e.icon || { enabled: !1 };
4452
4452
  let l = e.backgroundColor || "#3b82f6", u = h.color || "#ffffff", y = h.text || "Button", m = s.cornerRadius ?? 8, b = e.borderColor || "transparent", v = e.borderWidth || 0, C = 1;
4453
4453
  f && g ? (l = g.backgroundColor || l, u = g.color || u, y = g.text || y, C = g.scale ?? 0.95, m = g.cornerRadius ?? m) : r && c && (l = c.backgroundColor || l, u = c.color || u, y = c.text || y, C = c.scale ?? 1, m = c.cornerRadius ?? m, b = c.borderColor || b);
4454
- const S = -n / 2, w = -a / 2;
4455
- t.save(), t.scale(C, C), t.beginPath(), this.drawRoundRect(t, S, w, n, a, m);
4456
- const M = this.createCanvasFill(t, l, n, a);
4457
- M && (t.fillStyle = M, t.fill()), (v > 0 || r && c.borderColor) && (t.strokeStyle = b, t.lineWidth = v || (r ? 1 : 0), t.stroke());
4458
- const I = h.fontSize || 14, P = h.fontFamily || "Inter", E = h.fontWeight || 600;
4459
- t.font = `${E} ${I}px "${P}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`, t.fillStyle = u, t.textAlign = "center", t.textBaseline = "middle";
4454
+ const S = -n / 2, M = -a / 2;
4455
+ t.save(), t.scale(C, C), t.beginPath(), this.drawRoundRect(t, S, M, n, a, m);
4456
+ const w = this.createCanvasFill(t, l, n, a);
4457
+ w && (t.fillStyle = w, t.fill()), (v > 0 || r && c.borderColor) && (t.strokeStyle = b, t.lineWidth = v || (r ? 1 : 0), t.stroke());
4458
+ const I = h.fontSize || 14, _ = h.fontFamily || "Inter", E = h.fontWeight || 600;
4459
+ t.font = `${E} ${I}px "${_}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`, t.fillStyle = u, t.textAlign = "center", t.textBaseline = "middle";
4460
4460
  let F = 0;
4461
4461
  if (d.enabled && d.svgPath) {
4462
- const T = I * 1.1, _ = d.gap || 8, L = t.measureText(y), W = -(L.width + T + _) / 2, B = d.position === "left" ? W + T / 2 : W + L.width + _ + T / 2;
4463
- F = d.position === "left" ? W + T + _ + L.width / 2 : W + L.width / 2, t.save(), t.translate(B, 0);
4462
+ const T = I * 1.1, P = d.gap || 8, L = t.measureText(y), W = -(L.width + T + P) / 2, B = d.position === "left" ? W + T / 2 : W + L.width + P + T / 2;
4463
+ F = d.position === "left" ? W + T + P + L.width / 2 : W + L.width / 2, t.save(), t.translate(B, 0);
4464
4464
  const A = new Path2D(d.svgPath), $ = T / 24;
4465
4465
  t.scale($, $), t.translate(-12, -12), t.fillStyle = u, t.fill(A), t.restore();
4466
4466
  }
@@ -4483,27 +4483,27 @@ class fi {
4483
4483
  const at = this.createCanvasFill(t, m, s, n);
4484
4484
  at && (t.strokeStyle = at, t.stroke());
4485
4485
  }
4486
- const S = 2, w = n - S * 2, M = w / 2, I = a + S, P = a + s - S - w, E = f ? P : I, F = r + S;
4487
- t.beginPath(), t.arc(E + M, F + M, M, 0, Math.PI * 2);
4488
- const T = this.createCanvasFill(t, v, w, w);
4486
+ const S = 2, M = n - S * 2, w = M / 2, I = a + S, _ = a + s - S - M, E = f ? _ : I, F = r + S;
4487
+ t.beginPath(), t.arc(E + w, F + w, w, 0, Math.PI * 2);
4488
+ const T = this.createCanvasFill(t, v, M, M);
4489
4489
  T && (t.fillStyle = T, t.fill()), e.disabled && (t.globalAlpha *= 2);
4490
- let _ = !1, L = !1;
4490
+ let P = !1, L = !1;
4491
4491
  const R = (f ? (N = c.leftLabel) == null ? void 0 : N.text : null) || ((x = e.leftLabel) == null ? void 0 : x.text) || "", W = (f ? (k = c.leftLabel) == null ? void 0 : k.color : null) || ((Y = e.leftLabel) == null ? void 0 : Y.color) || "#f3f4f6";
4492
4492
  if ((X = e.leftLabel) != null && X.enabled && R) {
4493
4493
  const at = e.leftLabel;
4494
- t.font = `${at.fontWeight || 400} ${at.fontSize || 12}px "${at.fontFamily || "Inter"}", sans-serif`, t.fillStyle = W, t.textBaseline = "middle", t.textAlign = "right", t.fillText(R, a - (at.gap || 8), 0), _ = !0;
4494
+ t.font = `${at.fontWeight || 400} ${at.fontSize || 12}px "${at.fontFamily || "Inter"}", sans-serif`, t.fillStyle = W, t.textBaseline = "middle", t.textAlign = "right", t.fillText(R, a - (at.gap || 8), 0), P = !0;
4495
4495
  }
4496
4496
  const B = (f ? (J = c.rightLabel) == null ? void 0 : J.text : null) || ((tt = e.rightLabel) == null ? void 0 : tt.text) || "", A = (f ? (lt = c.rightLabel) == null ? void 0 : lt.color : null) || ((Z = e.rightLabel) == null ? void 0 : Z.color) || "#f3f4f6";
4497
4497
  if ((pt = e.rightLabel) != null && pt.enabled && B) {
4498
4498
  const at = e.rightLabel;
4499
4499
  t.font = `${at.fontWeight || 400} ${at.fontSize || 12}px "${at.fontFamily || "Inter"}", sans-serif`, t.fillStyle = A, t.textBaseline = "middle", t.textAlign = "left", t.fillText(B, a + s + (at.gap || 8), 0), L = !0;
4500
4500
  }
4501
- if (!_ && !L && e.label && e.label.text) {
4501
+ if (!P && !L && e.label && e.label.text) {
4502
4502
  const at = e.label, Et = at.fontSize || 14, xt = at.fontWeight || 400, bt = at.fontFamily || "Inter";
4503
4503
  t.font = `${xt} ${Et}px "${bt}", sans-serif`, t.fillStyle = at.color || "#f3f4f6", t.textBaseline = "middle";
4504
4504
  const Bt = at.gap || 10;
4505
- let $t = 0, Pt = 0;
4506
- at.position === "left" ? (t.textAlign = "right", $t = a - Bt, Pt = 0) : at.position === "right" ? (t.textAlign = "left", $t = a + s + Bt, Pt = 0) : at.position === "top" ? (t.textAlign = "center", $t = 0, Pt = r - Bt, t.textBaseline = "bottom") : at.position === "bottom" ? (t.textAlign = "center", $t = 0, Pt = r + n + Bt, t.textBaseline = "top") : (t.textAlign = "left", $t = a + s + Bt, Pt = 0), t.fillText(at.text, $t, Pt);
4505
+ let $t = 0, _t = 0;
4506
+ at.position === "left" ? (t.textAlign = "right", $t = a - Bt, _t = 0) : at.position === "right" ? (t.textAlign = "left", $t = a + s + Bt, _t = 0) : at.position === "top" ? (t.textAlign = "center", $t = 0, _t = r - Bt, t.textBaseline = "bottom") : at.position === "bottom" ? (t.textAlign = "center", $t = 0, _t = r + n + Bt, t.textBaseline = "top") : (t.textAlign = "left", $t = a + s + Bt, _t = 0), t.fillText(at.text, $t, _t);
4507
4507
  }
4508
4508
  }
4509
4509
  renderCheckbox(t, i) {
@@ -4513,56 +4513,56 @@ class fi {
4513
4513
  const v = this.createCanvasFill(t, y, s, n);
4514
4514
  if (v && (t.fillStyle = v, t.fill()), b > 0) {
4515
4515
  t.lineWidth = b;
4516
- const w = this.createCanvasFill(t, m, s, n);
4517
- w && (t.strokeStyle = w, t.stroke());
4516
+ const M = this.createCanvasFill(t, m, s, n);
4517
+ M && (t.strokeStyle = M, t.stroke());
4518
4518
  } else if (h) {
4519
4519
  t.lineWidth = 1;
4520
- const w = this.createCanvasFill(t, c, s, n);
4521
- w && (t.strokeStyle = w, t.stroke());
4520
+ const M = this.createCanvasFill(t, c, s, n);
4521
+ M && (t.strokeStyle = M, t.stroke());
4522
4522
  }
4523
4523
  if (h) {
4524
4524
  t.save(), t.beginPath();
4525
- const w = this.createCanvasFill(t, d, s, n);
4526
- t.strokeStyle = w || d, t.lineWidth = Math.max(2, s * 0.12), t.lineCap = "round", t.lineJoin = "round";
4527
- const M = a + s * 0.25, I = r + n * 0.5, P = a + s * 0.45, E = r + n * 0.7, F = a + s * 0.75, T = r + n * 0.25;
4528
- t.moveTo(M, I), t.lineTo(P, E), t.lineTo(F, T), t.stroke(), t.restore();
4525
+ const M = this.createCanvasFill(t, d, s, n);
4526
+ t.strokeStyle = M || d, t.lineWidth = Math.max(2, s * 0.12), t.lineCap = "round", t.lineJoin = "round";
4527
+ const w = a + s * 0.25, I = r + n * 0.5, _ = a + s * 0.45, E = r + n * 0.7, F = a + s * 0.75, T = r + n * 0.25;
4528
+ t.moveTo(w, I), t.lineTo(_, E), t.lineTo(F, T), t.stroke(), t.restore();
4529
4529
  }
4530
4530
  if (e.disabled && (t.globalAlpha *= 2), e.label && e.label.text) {
4531
- const w = e.label;
4532
- t.save(), t.font = `${w.fontWeight || 400} ${w.fontSize || 14}px "${w.fontFamily || "Inter"}", sans-serif`, t.fillStyle = w.color || "#f3f4f6", t.textBaseline = "middle";
4533
- const M = w.gap || 8;
4534
- let I = 0, P = 0;
4535
- w.position === "left" ? (t.textAlign = "right", I = a - M, P = 0) : w.position === "right" ? (t.textAlign = "left", I = a + s + M, P = 0) : w.position === "top" ? (t.textAlign = "center", I = 0, P = r - M, t.textBaseline = "bottom") : w.position === "bottom" && (t.textAlign = "center", I = 0, P = r + n + M, t.textBaseline = "top"), t.fillText(w.text, I, P), t.restore();
4531
+ const M = e.label;
4532
+ t.save(), t.font = `${M.fontWeight || 400} ${M.fontSize || 14}px "${M.fontFamily || "Inter"}", sans-serif`, t.fillStyle = M.color || "#f3f4f6", t.textBaseline = "middle";
4533
+ const w = M.gap || 8;
4534
+ let I = 0, _ = 0;
4535
+ M.position === "left" ? (t.textAlign = "right", I = a - w, _ = 0) : M.position === "right" ? (t.textAlign = "left", I = a + s + w, _ = 0) : M.position === "top" ? (t.textAlign = "center", I = 0, _ = r - w, t.textBaseline = "bottom") : M.position === "bottom" && (t.textAlign = "center", I = 0, _ = r + n + w, t.textBaseline = "top"), t.fillText(M.text, I, _), t.restore();
4536
4536
  }
4537
4537
  }
4538
4538
  renderRadioGroup(t, i) {
4539
- var S, w;
4540
- const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.options) || i.options || {}, s = ((S = i.geometry) == null ? void 0 : S.width) || 180, n = ((w = i.geometry) == null ? void 0 : w.height) || 100, a = -s / 2, r = -n / 2, f = e.selectedValue, h = e.optionsList || ["Option 1", "Option 2", "Option 3"], c = e.orientation || "vertical", g = e.itemGap !== void 0 ? e.itemGap : 16, d = e.activeColor || "#3b82f6", l = e.inactiveColor || "#4b5563", u = e.textColor || "#ffffff", y = e.fontSize || 14, m = e.fontFamily || "Inter", b = e.fontWeight || 400;
4539
+ var S, M;
4540
+ const o = this.objectStates.get(i.id), e = (o == null ? void 0 : o.options) || i.options || {}, s = ((S = i.geometry) == null ? void 0 : S.width) || 180, n = ((M = i.geometry) == null ? void 0 : M.height) || 100, a = -s / 2, r = -n / 2, f = e.selectedValue, h = e.optionsList || ["Option 1", "Option 2", "Option 3"], c = e.orientation || "vertical", g = e.itemGap !== void 0 ? e.itemGap : 16, d = e.activeColor || "#3b82f6", l = e.inactiveColor || "#4b5563", u = e.textColor || "#ffffff", y = e.fontSize || 14, m = e.fontFamily || "Inter", b = e.fontWeight || 400;
4541
4541
  e.disabled && (t.globalAlpha *= 0.5);
4542
4542
  const v = 8, C = v * 2;
4543
4543
  if (t.save(), t.font = `${b} ${y}px "${m}", sans-serif`, t.textBaseline = "middle", t.textAlign = "left", c === "vertical") {
4544
- const M = Math.max(C, y) + g;
4545
- h.forEach((I, P) => {
4546
- const E = r + P * M + v;
4544
+ const w = Math.max(C, y) + g;
4545
+ h.forEach((I, _) => {
4546
+ const E = r + _ * w + v;
4547
4547
  t.beginPath(), t.arc(a + v, E, v, 0, Math.PI * 2);
4548
- const F = f === I, T = this.createCanvasFill(t, d, C, C), _ = this.createCanvasFill(t, l, C, C);
4549
- F ? (t.strokeStyle = T || d, t.lineWidth = 2, t.stroke(), t.beginPath(), t.arc(a + v, E, v / 2, 0, Math.PI * 2), t.fillStyle = T || d, t.fill()) : (t.strokeStyle = _ || l, t.lineWidth = 1.5, t.stroke()), t.fillStyle = u, t.fillText(I, a + C + 8, E);
4548
+ const F = f === I, T = this.createCanvasFill(t, d, C, C), P = this.createCanvasFill(t, l, C, C);
4549
+ F ? (t.strokeStyle = T || d, t.lineWidth = 2, t.stroke(), t.beginPath(), t.arc(a + v, E, v / 2, 0, Math.PI * 2), t.fillStyle = T || d, t.fill()) : (t.strokeStyle = P || l, t.lineWidth = 1.5, t.stroke()), t.fillStyle = u, t.fillText(I, a + C + 8, E);
4550
4550
  });
4551
4551
  } else {
4552
- let M = a;
4552
+ let w = a;
4553
4553
  h.forEach((I) => {
4554
- const P = f === I, E = t.measureText(I).width;
4555
- t.beginPath(), t.arc(M + v, 0, v, 0, Math.PI * 2);
4554
+ const _ = f === I, E = t.measureText(I).width;
4555
+ t.beginPath(), t.arc(w + v, 0, v, 0, Math.PI * 2);
4556
4556
  const F = this.createCanvasFill(t, d, C, C), T = this.createCanvasFill(t, l, C, C);
4557
- P ? (t.strokeStyle = F || d, t.lineWidth = 2, t.stroke(), t.beginPath(), t.arc(M + v, 0, v / 2, 0, Math.PI * 2), t.fillStyle = F || d, t.fill()) : (t.strokeStyle = T || l, t.lineWidth = 1.5, t.stroke()), t.fillStyle = u, t.fillText(I, M + C + 6, 0), M += C + 6 + E + g;
4557
+ _ ? (t.strokeStyle = F || d, t.lineWidth = 2, t.stroke(), t.beginPath(), t.arc(w + v, 0, v / 2, 0, Math.PI * 2), t.fillStyle = F || d, t.fill()) : (t.strokeStyle = T || l, t.lineWidth = 1.5, t.stroke()), t.fillStyle = u, t.fillText(I, w + C + 6, 0), w += C + 6 + E + g;
4558
4558
  });
4559
4559
  }
4560
4560
  if (t.restore(), e.disabled && (t.globalAlpha *= 2), e.label && e.label.text) {
4561
- const M = e.label;
4562
- t.save(), t.font = `${M.fontWeight || 400} ${M.fontSize || 14}px "${M.fontFamily || "Inter"}", sans-serif`, t.fillStyle = M.color || "#9ca3af", t.textBaseline = "middle";
4563
- const I = M.gap || 8;
4564
- let P = 0, E = 0;
4565
- M.position === "left" ? (t.textAlign = "right", P = a - I, E = 0) : M.position === "right" ? (t.textAlign = "left", P = a + s + I, E = 0) : M.position === "top" ? (t.textAlign = "center", P = 0, E = r - I, t.textBaseline = "bottom") : M.position === "bottom" && (t.textAlign = "center", P = 0, E = r + n + I, t.textBaseline = "top"), t.fillText(M.text, P, E), t.restore();
4561
+ const w = e.label;
4562
+ t.save(), t.font = `${w.fontWeight || 400} ${w.fontSize || 14}px "${w.fontFamily || "Inter"}", sans-serif`, t.fillStyle = w.color || "#9ca3af", t.textBaseline = "middle";
4563
+ const I = w.gap || 8;
4564
+ let _ = 0, E = 0;
4565
+ w.position === "left" ? (t.textAlign = "right", _ = a - I, E = 0) : w.position === "right" ? (t.textAlign = "left", _ = a + s + I, E = 0) : w.position === "top" ? (t.textAlign = "center", _ = 0, E = r - I, t.textBaseline = "bottom") : w.position === "bottom" && (t.textAlign = "center", _ = 0, E = r + n + I, t.textBaseline = "top"), t.fillText(w.text, _, E), t.restore();
4566
4566
  }
4567
4567
  }
4568
4568
  renderBarChart(t, i) {
@@ -4613,21 +4613,21 @@ class fi {
4613
4613
  _getPreset: function() {
4614
4614
  return hs[this.stylePreset] || hs.default;
4615
4615
  },
4616
- _resolveColor: function(T, _) {
4616
+ _resolveColor: function(T, P) {
4617
4617
  const L = this._getPreset();
4618
- return ["#6366f1", "#f59e0b", "#10b981", "#3b82f6", "#a855f7"].includes(T) ? L.colors[_ % L.colors.length] : typeof T == "string" ? T : L.colors[_ % L.colors.length];
4618
+ return ["#6366f1", "#f59e0b", "#10b981", "#3b82f6", "#a855f7"].includes(T) ? L.colors[P % L.colors.length] : typeof T == "string" ? T : L.colors[P % L.colors.length];
4619
4619
  },
4620
- _makeGradient: function(T, _, L, R, W, B) {
4621
- if (!this._getPreset().barGradient && !this.barGradient) return _;
4620
+ _makeGradient: function(T, P, L, R, W, B) {
4621
+ if (!this._getPreset().barGradient && !this.barGradient) return P;
4622
4622
  const $ = T.createLinearGradient(L, R, W, B);
4623
- return $.addColorStop(0, _), $.addColorStop(1, _ + "44"), $;
4623
+ return $.addColorStop(0, P), $.addColorStop(1, P + "44"), $;
4624
4624
  },
4625
- _drawRoundedBar: function(T, _, L, R, W, B, A) {
4625
+ _drawRoundedBar: function(T, P, L, R, W, B, A) {
4626
4626
  if (B = Math.min(B, Math.min(Math.abs(R), Math.abs(W)) / 2), B <= 0 || R === 0 || W === 0) {
4627
- T.rect(_, L, R, W);
4627
+ T.rect(P, L, R, W);
4628
4628
  return;
4629
4629
  }
4630
- T.beginPath(), A ? (T.moveTo(_, L + W), T.lineTo(_, L + B), T.quadraticCurveTo(_, L, _ + B, L), T.lineTo(_ + R - B, L), T.quadraticCurveTo(_ + R, L, _ + R, L + B), T.lineTo(_ + R, L + W), T.lineTo(_, L + W)) : (T.moveTo(_, L), T.lineTo(_ + R - B, L), T.quadraticCurveTo(_ + R, L, _ + R, L + B), T.lineTo(_ + R, L + W - B), T.quadraticCurveTo(_ + R, L + W, _ + R - B, L + W), T.lineTo(_, L + W), T.lineTo(_, L)), T.closePath();
4630
+ T.beginPath(), A ? (T.moveTo(P, L + W), T.lineTo(P, L + B), T.quadraticCurveTo(P, L, P + B, L), T.lineTo(P + R - B, L), T.quadraticCurveTo(P + R, L, P + R, L + B), T.lineTo(P + R, L + W), T.lineTo(P, L + W)) : (T.moveTo(P, L), T.lineTo(P + R - B, L), T.quadraticCurveTo(P + R, L, P + R, L + B), T.lineTo(P + R, L + W - B), T.quadraticCurveTo(P + R, L + W, P + R - B, L + W), T.lineTo(P, L + W), T.lineTo(P, L)), T.closePath();
4631
4631
  }
4632
4632
  }, n = s.width, a = s.height, r = -n / 2, f = -a / 2;
4633
4633
  if (!s.datasets || s.datasets.length === 0 || s.categories.length === 0) {
@@ -4639,79 +4639,79 @@ class fi {
4639
4639
  const d = s.categories.length, l = s.datasets.length;
4640
4640
  if (s.chartType === "stacked")
4641
4641
  for (let T = 0; T < d; T++) {
4642
- let _ = 0, L = 0;
4642
+ let P = 0, L = 0;
4643
4643
  s.datasets.forEach((R) => {
4644
4644
  const W = R.data[T] ?? 0;
4645
- W >= 0 ? _ += W : L += W;
4646
- }), _ > c && (c = _), L < g && (g = L);
4645
+ W >= 0 ? P += W : L += W;
4646
+ }), P > c && (c = P), L < g && (g = L);
4647
4647
  }
4648
4648
  else
4649
4649
  s.datasets.forEach((T) => {
4650
- T.data && T.data.forEach((_) => {
4651
- _ > c && (c = _), _ < g && (g = _);
4650
+ T.data && T.data.forEach((P) => {
4651
+ P > c && (c = P), P < g && (g = P);
4652
4652
  });
4653
4653
  });
4654
4654
  isFinite(c) || (c = 10), isFinite(g) || (g = 0), c = Math.max(c, 0), g = Math.min(g, 0);
4655
4655
  const u = c - g || 10;
4656
4656
  t.save(), s.enableShadows && (t.shadowColor = s.shadowColor, t.shadowBlur = s.shadowBlur, t.shadowOffsetY = s.shadowOffsetY), t.font = s.axisLabelFontSize + "px Inter, sans-serif";
4657
- const y = s.showYLabels ? t.measureText(c.toFixed(0)).width + 14 : 10, m = s.showXLabels ? s.axisLabelFontSize + 12 : 8, v = (s.showLegend && l > 0 ? s.legendFontSize + 10 : 0) + 8, C = 10, S = r + y, w = f + v, M = n - y - C, I = a - v - m;
4658
- if (s.enableShadows && (t.shadowColor = "transparent"), t.beginPath(), t.roundRect(r, f, n, a, 10), t.fillStyle = h.cardBackground, t.fill(), t.strokeStyle = h.cardBorderColor, t.lineWidth = 1, t.stroke(), s.chartBackground && s.chartBackground !== "transparent" && (t.beginPath(), t.rect(S, w, M, I), t.fillStyle = s.chartBackground, t.fill()), s.showLegend && l > 0) {
4657
+ const y = s.showYLabels ? t.measureText(c.toFixed(0)).width + 14 : 10, m = s.showXLabels ? s.axisLabelFontSize + 12 : 8, v = (s.showLegend && l > 0 ? s.legendFontSize + 10 : 0) + 8, C = 10, S = r + y, M = f + v, w = n - y - C, I = a - v - m;
4658
+ if (s.enableShadows && (t.shadowColor = "transparent"), t.beginPath(), t.roundRect(r, f, n, a, 10), t.fillStyle = h.cardBackground, t.fill(), t.strokeStyle = h.cardBorderColor, t.lineWidth = 1, t.stroke(), s.chartBackground && s.chartBackground !== "transparent" && (t.beginPath(), t.rect(S, M, w, I), t.fillStyle = s.chartBackground, t.fill()), s.showLegend && l > 0) {
4659
4659
  t.font = s.legendFontSize + "px Inter, sans-serif", t.textBaseline = "middle";
4660
4660
  const T = f + 12;
4661
- let _ = S;
4661
+ let P = S;
4662
4662
  s.datasets.forEach((L, R) => {
4663
4663
  const W = s._resolveColor(L.color, R), B = L.label || "Series " + (R + 1), A = 7;
4664
- t.beginPath(), t.roundRect(_, T - A / 2, A, A, 2), t.fillStyle = W, t.fill(), t.fillStyle = h.legendColor, t.textAlign = "left", t.fillText(B, _ + A + 4, T), _ += t.measureText(B).width + A + 16;
4664
+ t.beginPath(), t.roundRect(P, T - A / 2, A, A, 2), t.fillStyle = W, t.fill(), t.fillStyle = h.legendColor, t.textAlign = "left", t.fillText(B, P + A + 4, T), P += t.measureText(B).width + A + 16;
4665
4665
  });
4666
4666
  }
4667
- const P = 4;
4667
+ const _ = 4;
4668
4668
  if (s.showGridLines) {
4669
4669
  t.setLineDash(s.gridLineDash || []), t.lineWidth = s.gridLineWidth || 1, t.strokeStyle = h.gridColor;
4670
- for (let T = 0; T <= P; T++)
4670
+ for (let T = 0; T <= _; T++)
4671
4671
  if (s.orientation === "horizontal") {
4672
- const _ = S + T / P * M;
4673
- t.beginPath(), t.moveTo(_, w), t.lineTo(_, w + I), t.stroke();
4672
+ const P = S + T / _ * w;
4673
+ t.beginPath(), t.moveTo(P, M), t.lineTo(P, M + I), t.stroke();
4674
4674
  } else {
4675
- const _ = w + T / P * I;
4676
- t.beginPath(), t.moveTo(S, _), t.lineTo(S + M, _), t.stroke();
4675
+ const P = M + T / _ * I;
4676
+ t.beginPath(), t.moveTo(S, P), t.lineTo(S + w, P), t.stroke();
4677
4677
  }
4678
4678
  t.setLineDash([]);
4679
4679
  }
4680
4680
  if (s.showYLabels) {
4681
4681
  t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "right", t.textBaseline = "middle", t.fillStyle = h.axisLabelColor;
4682
- for (let T = 0; T <= P; T++)
4682
+ for (let T = 0; T <= _; T++)
4683
4683
  if (s.orientation === "horizontal") {
4684
- const _ = g + T / P * u, L = S + T / P * M;
4685
- t.textAlign = "center", t.fillText(_.toFixed(0), L, w + I + s.axisLabelFontSize);
4684
+ const P = g + T / _ * u, L = S + T / _ * w;
4685
+ t.textAlign = "center", t.fillText(P.toFixed(0), L, M + I + s.axisLabelFontSize);
4686
4686
  } else {
4687
- const _ = c - T / P * u, L = w + T / P * I;
4688
- t.textAlign = "right", t.fillText(_.toFixed(0), S - 6, L);
4687
+ const P = c - T / _ * u, L = M + T / _ * I;
4688
+ t.textAlign = "right", t.fillText(P.toFixed(0), S - 6, L);
4689
4689
  }
4690
4690
  }
4691
- if (t.setLineDash([]), s.showXAxis && (t.lineWidth = s.xAxisLineWidth || 1, t.strokeStyle = s.xAxisColor, t.beginPath(), t.moveTo(S, w + I), t.lineTo(S + M, w + I), t.stroke()), s.showYAxis && (t.lineWidth = s.yAxisLineWidth || 1, t.strokeStyle = s.yAxisColor, t.beginPath(), t.moveTo(S, w), t.lineTo(S, w + I), t.stroke()), s.enableShadows && (t.shadowColor = s.shadowColor), s.chartType === "stacked")
4691
+ if (t.setLineDash([]), s.showXAxis && (t.lineWidth = s.xAxisLineWidth || 1, t.strokeStyle = s.xAxisColor, t.beginPath(), t.moveTo(S, M + I), t.lineTo(S + w, M + I), t.stroke()), s.showYAxis && (t.lineWidth = s.yAxisLineWidth || 1, t.strokeStyle = s.yAxisColor, t.beginPath(), t.moveTo(S, M), t.lineTo(S, M + I), t.stroke()), s.enableShadows && (t.shadowColor = s.shadowColor), s.chartType === "stacked")
4692
4692
  if (s.orientation === "horizontal") {
4693
4693
  const T = I / d;
4694
- for (let _ = 0; _ < d; _++) {
4695
- const L = w + _ * T + T / 2;
4696
- s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "right", t.textBaseline = "middle", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[_] || "", S - 5, L), s.enableShadows && (t.shadowColor = s.shadowColor));
4694
+ for (let P = 0; P < d; P++) {
4695
+ const L = M + P * T + T / 2;
4696
+ s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "right", t.textBaseline = "middle", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[P] || "", S - 5, L), s.enableShadows && (t.shadowColor = s.shadowColor));
4697
4697
  let R = S;
4698
4698
  s.datasets.forEach((W, B) => {
4699
- const A = W.data[_] ?? 0;
4699
+ const A = W.data[P] ?? 0;
4700
4700
  if (A === 0) return;
4701
- const $ = A / u * M, G = Math.min(s.barWidth * l + s.barGap, T - 8), N = L - G / 2, x = R;
4701
+ const $ = A / u * w, G = Math.min(s.barWidth * l + s.barGap, T - 8), N = L - G / 2, x = R;
4702
4702
  R += $;
4703
4703
  const k = s._resolveColor(W.color, B);
4704
4704
  t.beginPath(), t.fillStyle = s._makeGradient(t, k, x, N, x + $, N), s._drawRoundedBar(t, x, N, $, G, B === l - 1 ? s.barCornerRadius : 0, !1), s.barStyle === "outline" || s.barStyle === "dashed" ? (t.fillStyle = "transparent", t.strokeStyle = s.barBorderColor === "auto" ? k : s.barBorderColor, t.lineWidth = s.barBorderWidth, s.barStyle === "dashed" && t.setLineDash([4, 4]), t.stroke(), t.setLineDash([])) : t.fill();
4705
4705
  });
4706
4706
  }
4707
4707
  } else {
4708
- const T = M / d;
4709
- for (let _ = 0; _ < d; _++) {
4710
- const L = S + _ * T + T / 2;
4711
- s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "center", t.textBaseline = "top", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[_] || "", L, w + I + 5), s.enableShadows && (t.shadowColor = s.shadowColor));
4712
- let R = w + I;
4708
+ const T = w / d;
4709
+ for (let P = 0; P < d; P++) {
4710
+ const L = S + P * T + T / 2;
4711
+ s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "center", t.textBaseline = "top", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[P] || "", L, M + I + 5), s.enableShadows && (t.shadowColor = s.shadowColor));
4712
+ let R = M + I;
4713
4713
  s.datasets.forEach((W, B) => {
4714
- const A = W.data[_] ?? 0;
4714
+ const A = W.data[P] ?? 0;
4715
4715
  if (A === 0) return;
4716
4716
  const $ = A / u * I, G = Math.min(s.barWidth * l + s.barGap, T - 8), N = L - G / 2, x = R - $;
4717
4717
  R -= $;
@@ -4721,24 +4721,24 @@ class fi {
4721
4721
  }
4722
4722
  }
4723
4723
  else if (s.orientation === "horizontal") {
4724
- const T = I / d, _ = l * s.barWidth + Math.max(0, (l - 1) * s.barGap), L = S + (0 - g) / u * M;
4724
+ const T = I / d, P = l * s.barWidth + Math.max(0, (l - 1) * s.barGap), L = S + (0 - g) / u * w;
4725
4725
  for (let R = 0; R < d; R++) {
4726
- const W = w + R * T + T / 2;
4726
+ const W = M + R * T + T / 2;
4727
4727
  s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "right", t.textBaseline = "middle", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[R] || "", S - 5, W), s.enableShadows && (t.shadowColor = s.shadowColor));
4728
- const B = W - _ / 2;
4728
+ const B = W - P / 2;
4729
4729
  s.datasets.forEach((A, $) => {
4730
- const G = A.data[R] ?? 0, N = Math.abs(G / u * M);
4730
+ const G = A.data[R] ?? 0, N = Math.abs(G / u * w);
4731
4731
  if (N < 1) return;
4732
4732
  const x = B + $ * (s.barWidth + s.barGap), k = G >= 0 ? L : L - N, Y = s._resolveColor(A.color, $);
4733
4733
  t.beginPath(), t.fillStyle = s._makeGradient(t, Y, k, x, k + N, x), s._drawRoundedBar(t, k, x, N, s.barWidth, s.barCornerRadius, !1), s.barStyle === "outline" || s.barStyle === "dashed" ? (t.fillStyle = "transparent", t.strokeStyle = s.barBorderColor === "auto" ? Y : s.barBorderColor, t.lineWidth = s.barBorderWidth, s.barStyle === "dashed" && t.setLineDash([4, 4]), t.stroke(), t.setLineDash([])) : t.fill(), s.showValueOnTop && G !== 0 && (t.font = (s.valueFontWeight || "bold") + " " + (s.valueFontSize || 10) + "px Inter, sans-serif", t.textAlign = G >= 0 ? "left" : "right", t.textBaseline = "middle", t.fillStyle = s.valueColor === "auto" ? Y : s.valueColor || "#fff", t.shadowColor = "transparent", t.fillText(G.toString(), G >= 0 ? k + N + 4 : k - 4, x + s.barWidth / 2), s.enableShadows && (t.shadowColor = s.shadowColor));
4734
4734
  });
4735
4735
  }
4736
4736
  } else {
4737
- const T = M / d, _ = l * s.barWidth + Math.max(0, (l - 1) * s.barGap), L = w + I - (0 - g) / u * I;
4737
+ const T = w / d, P = l * s.barWidth + Math.max(0, (l - 1) * s.barGap), L = M + I - (0 - g) / u * I;
4738
4738
  for (let R = 0; R < d; R++) {
4739
4739
  const W = S + R * T + T / 2;
4740
- s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "center", t.textBaseline = "top", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[R] || "", W, w + I + 5), s.enableShadows && (t.shadowColor = s.shadowColor));
4741
- const B = W - _ / 2;
4740
+ s.showXLabels && (t.font = s.axisLabelFontSize + "px Inter, sans-serif", t.textAlign = "center", t.textBaseline = "top", t.fillStyle = h.axisLabelColor, t.shadowColor = "transparent", t.fillText(s.categories[R] || "", W, M + I + 5), s.enableShadows && (t.shadowColor = s.shadowColor));
4741
+ const B = W - P / 2;
4742
4742
  s.datasets.forEach((A, $) => {
4743
4743
  const G = A.data[R] ?? 0, N = Math.abs(G / u * I);
4744
4744
  if (N < 1) return;
@@ -4773,8 +4773,8 @@ class fi {
4773
4773
  return fs[this.stylePreset] || fs.default;
4774
4774
  },
4775
4775
  _resolveSliceColor: function(b, v) {
4776
- const C = b.color, S = v, w = this._getPreset();
4777
- return ["#6366f1", "#22d3ee", "#f59e0b", "#ec4899", "#34d399", "#a855f7", "#f87171"].includes(C) ? w.colors[S % w.colors.length] : typeof C == "string" ? C : w.colors[S % w.colors.length];
4776
+ const C = b.color, S = v, M = this._getPreset();
4777
+ return ["#6366f1", "#22d3ee", "#f59e0b", "#ec4899", "#34d399", "#a855f7", "#f87171"].includes(C) ? M.colors[S % M.colors.length] : typeof C == "string" ? C : M.colors[S % M.colors.length];
4778
4778
  }
4779
4779
  }, n = s.width, a = s.height;
4780
4780
  if (!s.slices || s.slices.length === 0) {
@@ -4791,47 +4791,47 @@ class fi {
4791
4791
  const h = s.showLegend ? Math.ceil(s.slices.length / 2) : 0, c = h > 0 ? h * (s.legendFontSize + 8) + 10 : 0, g = a - c - 16, d = Math.min(n - 24, g) / 2, l = 0, u = -c / 2;
4792
4792
  if (s.chartType === "rose") {
4793
4793
  const b = Math.max(...s.slices.map((S) => S.value || 0)), v = Math.PI * 2 / s.slices.length, C = d > 0 ? s.sliceGap / d : 0;
4794
- s.slices.forEach((S, w) => {
4795
- const M = S.value || 0;
4796
- if (M === 0) return;
4797
- const I = M / b * d, P = -Math.PI / 2 + w * v + C / 2, E = P + v - C, F = s._resolveSliceColor(S, w);
4798
- if (t.beginPath(), t.moveTo(l, u), t.arc(l, u, I, P, E), t.closePath(), t.fillStyle = F + "cc", t.fill(), t.strokeStyle = F, t.lineWidth = 1.5, t.stroke(), s.showLabels) {
4799
- const T = P + (E - P) / 2, _ = l + I * 0.65 * Math.cos(T), L = u + I * 0.65 * Math.sin(T), R = Math.round(M / r * 100);
4800
- t.save(), t.font = `bold ${s.labelFontSize}px Inter, sans-serif`, t.fillStyle = f.labelColor, t.textAlign = "center", t.textBaseline = "middle", t.fillText(`${R}%`, _, L), t.restore();
4794
+ s.slices.forEach((S, M) => {
4795
+ const w = S.value || 0;
4796
+ if (w === 0) return;
4797
+ const I = w / b * d, _ = -Math.PI / 2 + M * v + C / 2, E = _ + v - C, F = s._resolveSliceColor(S, M);
4798
+ if (t.beginPath(), t.moveTo(l, u), t.arc(l, u, I, _, E), t.closePath(), t.fillStyle = F + "cc", t.fill(), t.strokeStyle = F, t.lineWidth = 1.5, t.stroke(), s.showLabels) {
4799
+ const T = _ + (E - _) / 2, P = l + I * 0.65 * Math.cos(T), L = u + I * 0.65 * Math.sin(T), R = Math.round(w / r * 100);
4800
+ t.save(), t.font = `bold ${s.labelFontSize}px Inter, sans-serif`, t.fillStyle = f.labelColor, t.textAlign = "center", t.textBaseline = "middle", t.fillText(`${R}%`, P, L), t.restore();
4801
4801
  }
4802
4802
  });
4803
4803
  } else {
4804
4804
  const b = s.chartType === "pie" ? 0 : s.innerRadius, v = d * Math.max(0, b), C = d > 0 ? s.sliceGap / d : 0;
4805
4805
  let S = -Math.PI / 2;
4806
- if (s.slices.forEach((w, M) => {
4807
- const I = w.value || 0;
4806
+ if (s.slices.forEach((M, w) => {
4807
+ const I = M.value || 0;
4808
4808
  if (I === 0) {
4809
4809
  S += I / r * Math.PI * 2;
4810
4810
  return;
4811
4811
  }
4812
- const P = I / r * Math.PI * 2, E = S + C / 2, F = S + P - C / 2;
4812
+ const _ = I / r * Math.PI * 2, E = S + C / 2, F = S + _ - C / 2;
4813
4813
  if (F <= E) {
4814
- S += P;
4814
+ S += _;
4815
4815
  return;
4816
4816
  }
4817
- const T = s._resolveSliceColor(w, M);
4817
+ const T = s._resolveSliceColor(M, w);
4818
4818
  if (t.beginPath(), t.fillStyle = T, v <= 0 ? (t.moveTo(l, u), t.arc(l, u, d, E, F), t.lineTo(l, u)) : (t.moveTo(l + d * Math.cos(E), u + d * Math.sin(E)), t.arc(l, u, d, E, F), t.arc(l, u, v, F, E, !0), t.closePath()), t.fill(), s.showLabels) {
4819
- const _ = E + (F - E) / 2, L = v + (d - v) / 2, R = l + L * Math.cos(_), W = u + L * Math.sin(_), B = Math.round(I / r * 100);
4819
+ const P = E + (F - E) / 2, L = v + (d - v) / 2, R = l + L * Math.cos(P), W = u + L * Math.sin(P), B = Math.round(I / r * 100);
4820
4820
  t.save(), t.font = `bold ${s.labelFontSize}px Inter, sans-serif`, t.fillStyle = f.labelColor, t.textAlign = "center", t.textBaseline = "middle", t.fillText(`${B}%`, R, W), t.restore();
4821
4821
  }
4822
- S += P;
4822
+ S += _;
4823
4823
  }), s.chartType === "donut" && s.showCenterText && v > 14) {
4824
- const w = Math.round(r), M = Math.min(Math.floor(v * 0.52), 20), I = Math.min(Math.floor(v * 0.26), 10);
4825
- t.textAlign = "center", t.textBaseline = "middle", t.font = `bold ${M}px Inter, sans-serif`, t.fillStyle = f.centerTextColor, t.fillText(w.toString(), l, u - I * 0.5), s.centerLabel && (t.font = `${I}px Inter, sans-serif`, t.fillStyle = f.centerLabelColor, t.fillText(s.centerLabel, l, u + M * 0.6));
4824
+ const M = Math.round(r), w = Math.min(Math.floor(v * 0.52), 20), I = Math.min(Math.floor(v * 0.26), 10);
4825
+ t.textAlign = "center", t.textBaseline = "middle", t.font = `bold ${w}px Inter, sans-serif`, t.fillStyle = f.centerTextColor, t.fillText(M.toString(), l, u - I * 0.5), s.centerLabel && (t.font = `${I}px Inter, sans-serif`, t.fillStyle = f.centerLabelColor, t.fillText(s.centerLabel, l, u + w * 0.6));
4826
4826
  }
4827
4827
  }
4828
4828
  if (s.showLegend && s.slices.length > 0) {
4829
4829
  t.font = `${s.legendFontSize}px Inter, sans-serif`;
4830
- const b = 2, v = n / b, C = s.legendFontSize + 8, S = a / 2 - c + 10, w = -n / 2 + 10;
4831
- s.slices.forEach((M, I) => {
4832
- const P = I % b, E = Math.floor(I / b), F = w + P * v, T = S + E * C, _ = s._resolveSliceColor(M, I), L = 7;
4833
- t.beginPath(), t.roundRect(F, T - L / 2, L, L, 2), t.fillStyle = _, t.fill(), t.textAlign = "left", t.textBaseline = "middle", t.fillStyle = f.legendColor;
4834
- const R = Math.round((M.value || 0) / r * 100), W = `${M.label || "Item"} ${R}%`, B = v - L - 20;
4830
+ const b = 2, v = n / b, C = s.legendFontSize + 8, S = a / 2 - c + 10, M = -n / 2 + 10;
4831
+ s.slices.forEach((w, I) => {
4832
+ const _ = I % b, E = Math.floor(I / b), F = M + _ * v, T = S + E * C, P = s._resolveSliceColor(w, I), L = 7;
4833
+ t.beginPath(), t.roundRect(F, T - L / 2, L, L, 2), t.fillStyle = P, t.fill(), t.textAlign = "left", t.textBaseline = "middle", t.fillStyle = f.legendColor;
4834
+ const R = Math.round((w.value || 0) / r * 100), W = `${w.label || "Item"} ${R}%`, B = v - L - 20;
4835
4835
  let A = W;
4836
4836
  for (; t.measureText(A).width > B && A.length > 4; )
4837
4837
  A = A.slice(0, -4) + "…";
@@ -4841,22 +4841,22 @@ class fi {
4841
4841
  t.restore();
4842
4842
  }
4843
4843
  getRadioGroupItemIndexAtPointer(t, i, o) {
4844
- var I, P;
4844
+ var I, _;
4845
4845
  const e = t.options || {}, s = this.objectStates.get(t.id) || {}, n = e.optionsList || [];
4846
4846
  if (n.length === 0) return null;
4847
- const a = s.width !== void 0 ? s.width : ((I = t.geometry) == null ? void 0 : I.width) || 180, r = s.height !== void 0 ? s.height : ((P = t.geometry) == null ? void 0 : P.height) || 100, f = e.orientation || "vertical", h = e.itemGap !== void 0 ? e.itemGap : 16, c = e.fontSize || 14, g = this.getWorldTransform(t.id), d = i - g.x, l = o - g.y, u = -g.rotation * (Math.PI / 180), y = Math.cos(u), m = Math.sin(u), b = d * y - l * m, v = d * m + l * y, S = 8 * 2, w = -a / 2, M = -r / 2;
4847
+ const a = s.width !== void 0 ? s.width : ((I = t.geometry) == null ? void 0 : I.width) || 180, r = s.height !== void 0 ? s.height : ((_ = t.geometry) == null ? void 0 : _.height) || 100, f = e.orientation || "vertical", h = e.itemGap !== void 0 ? e.itemGap : 16, c = e.fontSize || 14, g = this.getWorldTransform(t.id), d = i - g.x, l = o - g.y, u = -g.rotation * (Math.PI / 180), y = Math.cos(u), m = Math.sin(u), b = d * y - l * m, v = d * m + l * y, S = 8 * 2, M = -a / 2, w = -r / 2;
4848
4848
  if (f === "vertical") {
4849
4849
  const E = Math.max(S, c) + h;
4850
4850
  for (let F = 0; F < n.length; F++) {
4851
- const T = M + F * E;
4852
- if (b >= w && b <= w + a && v >= T && v <= T + E)
4851
+ const T = w + F * E;
4852
+ if (b >= M && b <= M + a && v >= T && v <= T + E)
4853
4853
  return F;
4854
4854
  }
4855
4855
  } else {
4856
- let E = w;
4856
+ let E = M;
4857
4857
  for (let F = 0; F < n.length; F++) {
4858
- const _ = n[F].length * 8, L = S + 6 + _ + h;
4859
- if (b >= E && b <= E + L && v >= M && v <= M + r)
4858
+ const P = n[F].length * 8, L = S + 6 + P + h;
4859
+ if (b >= E && b <= E + L && v >= w && v <= w + r)
4860
4860
  return F;
4861
4861
  E += L;
4862
4862
  }
@@ -4923,10 +4923,10 @@ class fi {
4923
4923
  if (u.showArea) {
4924
4924
  if (t.beginPath(), t.moveTo(g(0), e / 2), t.lineTo(g(0), c(y[0])), u.smoothing && y.length > 2)
4925
4925
  for (let b = 0; b < y.length - 1; b++) {
4926
- const v = y[b === 0 ? b : b - 1], C = y[b], S = y[b + 1], w = y[b + 1 === y.length - 1 ? b + 1 : b + 2];
4927
- for (let M = 1; M <= l; M++) {
4928
- const I = M / l, P = this._catmullRom(v, C, S, w, I);
4929
- t.lineTo(g(b + I), c(P));
4926
+ const v = y[b === 0 ? b : b - 1], C = y[b], S = y[b + 1], M = y[b + 1 === y.length - 1 ? b + 1 : b + 2];
4927
+ for (let w = 1; w <= l; w++) {
4928
+ const I = w / l, _ = this._catmullRom(v, C, S, M, I);
4929
+ t.lineTo(g(b + I), c(_));
4930
4930
  }
4931
4931
  }
4932
4932
  else
@@ -4939,9 +4939,9 @@ class fi {
4939
4939
  if (t.beginPath(), t.strokeStyle = u.lineColor || "#3b82f6", t.lineWidth = u.lineWidth || 2, t.lineJoin = "round", t.lineCap = "round", t.moveTo(g(0), c(y[0])), u.smoothing && y.length > 2)
4940
4940
  for (let m = 0; m < y.length - 1; m++) {
4941
4941
  const b = y[m === 0 ? m : m - 1], v = y[m], C = y[m + 1], S = y[m + 1 === y.length - 1 ? m + 1 : m + 2];
4942
- for (let w = 1; w <= l; w++) {
4943
- const M = w / l, I = this._catmullRom(b, v, C, S, M);
4944
- t.lineTo(g(m + M), c(I));
4942
+ for (let M = 1; M <= l; M++) {
4943
+ const w = M / l, I = this._catmullRom(b, v, C, S, w);
4944
+ t.lineTo(g(m + w), c(I));
4945
4945
  }
4946
4946
  }
4947
4947
  else
@@ -4957,8 +4957,8 @@ class fi {
4957
4957
  let y = -e / 2 + 15;
4958
4958
  const m = i.legendFontSize || 10, b = m + 5;
4959
4959
  t.font = `${m}px Inter, sans-serif`, t.textAlign = "right", t.textBaseline = "alphabetic", s.forEach((v) => {
4960
- const S = v.label || "Series", w = t.measureText(S).width;
4961
- t.beginPath(), t.rect(u - w - 8 - 5, y - (8 / 2 + 2), 8, 8), t.fillStyle = v.lineColor || "#3b82f6", t.fill(), t.fillStyle = i.legendColor || "#333333", t.fillText(S, u, y), y += b;
4960
+ const S = v.label || "Series", M = t.measureText(S).width;
4961
+ t.beginPath(), t.rect(u - M - 8 - 5, y - (8 / 2 + 2), 8, 8), t.fillStyle = v.lineColor || "#3b82f6", t.fill(), t.fillStyle = i.legendColor || "#333333", t.fillText(S, u, y), y += b;
4962
4962
  });
4963
4963
  }
4964
4964
  }
@@ -5068,10 +5068,10 @@ class fi {
5068
5068
  }
5069
5069
  renderListView(t, i) {
5070
5070
  var R, W, B, A;
5071
- const o = this.objectStates.get(i.id) || {}, e = o.options || i.options || {}, s = o.width !== void 0 ? o.width : ((R = i.geometry) == null ? void 0 : R.width) || 200, n = o.height !== void 0 ? o.height : ((W = i.geometry) == null ? void 0 : W.height) || 300, a = -s / 2, r = -n / 2, f = o.corner_radius !== void 0 ? o.corner_radius : e.corner_radius ?? 0, h = e.orientation || "vertical", c = e.items || [], g = e.itemGap ?? 10, d = e.itemHeight ?? 50, l = e.itemWidth ?? 200, u = e.scrollOffset ?? 0, y = e.padding ?? 0, m = e.glassEffect !== !1, b = e.accentColor || "#3b82f6", v = e.itemTextColor || "#333333", C = e.itemBackgroundColor || "#ffffff", S = e.hoveredIndex ?? null, w = e.activeItemIndex ?? null, M = e.glowIntensity ?? 0, I = e.glowColor || "#3b82f6", P = typeof I == "string" ? I : I.color || ((A = (B = I.stops) == null ? void 0 : B[0]) == null ? void 0 : A.color) || "#3b82f6", E = e.opacity !== void 0 ? e.opacity : i.opacity !== void 0 ? i.opacity : 1;
5072
- if (t.save(), t.globalAlpha *= E, M > 0) {
5071
+ const o = this.objectStates.get(i.id) || {}, e = o.options || i.options || {}, s = o.width !== void 0 ? o.width : ((R = i.geometry) == null ? void 0 : R.width) || 200, n = o.height !== void 0 ? o.height : ((W = i.geometry) == null ? void 0 : W.height) || 300, a = -s / 2, r = -n / 2, f = o.corner_radius !== void 0 ? o.corner_radius : e.corner_radius ?? 0, h = e.orientation || "vertical", c = e.items || [], g = e.itemGap ?? 10, d = e.itemHeight ?? 50, l = e.itemWidth ?? 200, u = e.scrollOffset ?? 0, y = e.padding ?? 0, m = e.glassEffect !== !1, b = e.accentColor || "#3b82f6", v = e.itemTextColor || "#333333", C = e.itemBackgroundColor || "#ffffff", S = e.hoveredIndex ?? null, M = e.activeItemIndex ?? null, w = e.glowIntensity ?? 0, I = e.glowColor || "#3b82f6", _ = typeof I == "string" ? I : I.color || ((A = (B = I.stops) == null ? void 0 : B[0]) == null ? void 0 : A.color) || "#3b82f6", E = e.opacity !== void 0 ? e.opacity : i.opacity !== void 0 ? i.opacity : 1;
5072
+ if (t.save(), t.globalAlpha *= E, w > 0) {
5073
5073
  const $ = t.getTransform(), G = Math.sqrt($.a * $.a + $.b * $.b) || 1;
5074
- t.shadowColor = P, t.shadowBlur = M * 2 * G, t.shadowOffsetX = 0, t.shadowOffsetY = 0;
5074
+ t.shadowColor = _, t.shadowBlur = w * 2 * G, t.shadowOffsetX = 0, t.shadowOffsetY = 0;
5075
5075
  }
5076
5076
  if (m) {
5077
5077
  const $ = e.listBackgroundColor || "rgba(31, 41, 55, 0.4)", G = this.createCanvasFill(t, $, s, n);
@@ -5104,37 +5104,37 @@ class fi {
5104
5104
  else
5105
5105
  t.clip();
5106
5106
  const T = typeof y == "number" ? y : h === "vertical" ? y[0] : y[3];
5107
- let _ = (h === "vertical" ? r : a) + u + T;
5107
+ let P = (h === "vertical" ? r : a) + u + T;
5108
5108
  if (t.textBaseline = "middle", c.forEach(($, G) => {
5109
5109
  const N = e.listLayout || "linear", x = N === "circular" ? l : h === "vertical" ? s : l, k = N === "circular" || h === "vertical" ? d : n;
5110
5110
  let Y = 0, X = 0, J = 0;
5111
5111
  if (N === "circular") {
5112
- const Pt = c.length || 1, Vt = Math.PI * 2 / Pt, Q = e.circularStartAngle || 0, ct = e.circularRadius || 100, Ot = u * 0.01 + Q * Math.PI / 180, Ct = G * Vt + Ot, St = a + s / 2, Gt = r + n / 2;
5112
+ const _t = c.length || 1, Vt = Math.PI * 2 / _t, Q = e.circularStartAngle || 0, ct = e.circularRadius || 100, Ot = u * 0.01 + Q * Math.PI / 180, Ct = G * Vt + Ot, St = a + s / 2, Gt = r + n / 2;
5113
5113
  Y = St + Math.cos(Ct) * ct - x / 2, X = Gt + Math.sin(Ct) * ct - k / 2, J = Ct + (e.itemRotation || 0) * Math.PI / 180;
5114
5114
  } else
5115
- Y = h === "vertical" ? a : _, X = h === "vertical" ? _ : r, J = (e.itemRotation || 0) * Math.PI / 180;
5116
- const tt = S === G, lt = w === G, Z = lt && e.activeItemShape ? e.activeItemShape : e.itemShape || "rectangle", pt = lt && e.activeItemShape ? e.activeItemPath : e.itemPath || "", at = e.itemCornerRadius || 0;
5115
+ Y = h === "vertical" ? a : P, X = h === "vertical" ? P : r, J = (e.itemRotation || 0) * Math.PI / 180;
5116
+ const tt = S === G, lt = M === G, Z = lt && e.activeItemShape ? e.activeItemShape : e.itemShape || "rectangle", pt = lt && e.activeItemShape ? e.activeItemPath : e.itemPath || "", at = e.itemCornerRadius || 0;
5117
5117
  if (t.save(), J !== 0 && (t.translate(Y + x / 2, X + k / 2), t.rotate(J), t.translate(-(Y + x / 2), -(X + k / 2))), lt) {
5118
- const Pt = this.createCanvasFill(t, b, x, k);
5119
- t.fillStyle = Pt || b;
5118
+ const _t = this.createCanvasFill(t, b, x, k);
5119
+ t.fillStyle = _t || b;
5120
5120
  const Vt = t.globalAlpha;
5121
5121
  t.globalAlpha = Vt * 0.8, t.beginPath(), this.drawCustomShape(t, Z, pt, Y, X, x, k, at) || (t.rect(Y, X, x, k), t.fill()), t.globalAlpha = Vt;
5122
5122
  } else if (tt)
5123
5123
  t.fillStyle = m ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", t.beginPath(), this.drawCustomShape(t, Z, pt, Y, X, x, k, at) || (t.rect(Y, X, x, k), t.fill());
5124
5124
  else if (C !== "transparent") {
5125
- const Pt = this.createCanvasFill(t, C, x, k);
5126
- t.fillStyle = Pt || C, t.beginPath(), this.drawCustomShape(t, Z, pt, Y, X, x, k, at) || (t.rect(Y, X, x, k), t.fill());
5125
+ const _t = this.createCanvasFill(t, C, x, k);
5126
+ t.fillStyle = _t || C, t.beginPath(), this.drawCustomShape(t, Z, pt, Y, X, x, k, at) || (t.rect(Y, X, x, k), t.fill());
5127
5127
  }
5128
5128
  if (lt || tt) {
5129
- const Pt = this.createCanvasFill(t, b, h === "vertical" ? 3 : x, h === "vertical" ? k : 3);
5130
- t.fillStyle = Pt || b, h === "vertical" ? t.fillRect(Y, X, 3, k) : t.fillRect(Y, X + k - 3, x, 3);
5129
+ const _t = this.createCanvasFill(t, b, h === "vertical" ? 3 : x, h === "vertical" ? k : 3);
5130
+ t.fillStyle = _t || b, h === "vertical" ? t.fillRect(Y, X, 3, k) : t.fillRect(Y, X + k - 3, x, 3);
5131
5131
  }
5132
5132
  const Et = lt ? "#ffffff" : m ? "rgba(255, 255, 255, 0.9)" : v;
5133
5133
  t.fillStyle = Et, t.font = lt || tt ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
5134
5134
  const xt = typeof $ == "string" ? $ : ($ == null ? void 0 : $.label) || `Item ${G + 1}`, bt = Y + (h === "vertical" ? 16 : x / 2), Bt = X + k / 2;
5135
5135
  h === "horizontal" || N === "circular" ? t.textAlign = "center" : t.textAlign = "left";
5136
5136
  const $t = N === "circular" ? Y + x / 2 : bt;
5137
- t.fillText(xt, $t, Bt), t.restore(), _ += (h === "vertical" ? d : l) + g;
5137
+ t.fillText(xt, $t, Bt), t.restore(), P += (h === "vertical" ? d : l) + g;
5138
5138
  }), t.restore(), e.showScrollbar !== !1) {
5139
5139
  const $ = (c.length || 0) * (h === "vertical" ? d : l) + ((c.length || 0) - 1) * g, G = h === "vertical" ? n : s, N = e.listLayout || "linear", x = e.containerShape === "circle" || N === "circular";
5140
5140
  if ($ > G || N === "circular" && c.length > 0) {
@@ -5192,22 +5192,22 @@ class fi {
5192
5192
  var B, A;
5193
5193
  const e = t.options || {}, s = this.objectStates.get(t.id) || {}, n = e.items || [];
5194
5194
  if (n.length === 0) return null;
5195
- const a = s.width !== void 0 ? s.width : ((B = t.geometry) == null ? void 0 : B.width) || 200, r = s.height !== void 0 ? s.height : ((A = t.geometry) == null ? void 0 : A.height) || 300, f = e.orientation || "vertical", h = e.itemGap ?? 10, c = e.itemHeight ?? 50, g = e.itemWidth ?? 200, d = e.scrollOffset ?? 0, l = e.padding ?? 0, u = this.getWorldTransform(t.id), y = i - u.x, m = o - u.y, b = -u.rotation * (Math.PI / 180), v = Math.cos(b), C = Math.sin(b), S = y * v - m * C, w = y * C + m * v, M = -a / 2, I = -r / 2, P = typeof l == "number" ? l : f === "vertical" ? l[0] : l[3];
5196
- let E = (f === "vertical" ? I : M) + d + P;
5197
- const F = e.listLayout || "linear", T = n.length || 1, _ = Math.PI * 2 / T, L = e.circularStartAngle || 0, R = e.circularRadius || 100, W = d * 0.01 + L * Math.PI / 180;
5195
+ const a = s.width !== void 0 ? s.width : ((B = t.geometry) == null ? void 0 : B.width) || 200, r = s.height !== void 0 ? s.height : ((A = t.geometry) == null ? void 0 : A.height) || 300, f = e.orientation || "vertical", h = e.itemGap ?? 10, c = e.itemHeight ?? 50, g = e.itemWidth ?? 200, d = e.scrollOffset ?? 0, l = e.padding ?? 0, u = this.getWorldTransform(t.id), y = i - u.x, m = o - u.y, b = -u.rotation * (Math.PI / 180), v = Math.cos(b), C = Math.sin(b), S = y * v - m * C, M = y * C + m * v, w = -a / 2, I = -r / 2, _ = typeof l == "number" ? l : f === "vertical" ? l[0] : l[3];
5196
+ let E = (f === "vertical" ? I : w) + d + _;
5197
+ const F = e.listLayout || "linear", T = n.length || 1, P = Math.PI * 2 / T, L = e.circularStartAngle || 0, R = e.circularRadius || 100, W = d * 0.01 + L * Math.PI / 180;
5198
5198
  for (let $ = 0; $ < n.length; $++) {
5199
5199
  const G = F === "circular" ? g : f === "vertical" ? a : g, N = F === "circular" || f === "vertical" ? c : r;
5200
5200
  let x = 0, k = 0, Y = 0;
5201
5201
  if (F === "circular") {
5202
- const X = $ * _ + W, J = M + a / 2, tt = I + r / 2;
5202
+ const X = $ * P + W, J = w + a / 2, tt = I + r / 2;
5203
5203
  x = J + Math.cos(X) * R - G / 2, k = tt + Math.sin(X) * R - N / 2, Y = X + (e.itemRotation || 0) * Math.PI / 180;
5204
5204
  } else
5205
- x = f === "vertical" ? M : E, k = f === "vertical" ? E : I, Y = (e.itemRotation || 0) * Math.PI / 180;
5205
+ x = f === "vertical" ? w : E, k = f === "vertical" ? E : I, Y = (e.itemRotation || 0) * Math.PI / 180;
5206
5206
  if (Y !== 0) {
5207
- const X = x + G / 2, J = k + N / 2, tt = S - X, lt = w - J, Z = -Y, pt = tt * Math.cos(Z) - lt * Math.sin(Z) + X, at = tt * Math.sin(Z) + lt * Math.cos(Z) + J;
5207
+ const X = x + G / 2, J = k + N / 2, tt = S - X, lt = M - J, Z = -Y, pt = tt * Math.cos(Z) - lt * Math.sin(Z) + X, at = tt * Math.sin(Z) + lt * Math.cos(Z) + J;
5208
5208
  if (pt >= x && pt <= x + G && at >= k && at <= k + N)
5209
5209
  return $;
5210
- } else if (S >= x && S <= x + G && w >= k && w <= k + N)
5210
+ } else if (S >= x && S <= x + G && M >= k && M <= k + N)
5211
5211
  return $;
5212
5212
  E += (f === "vertical" ? c : g) + h;
5213
5213
  }
@@ -5227,7 +5227,7 @@ class fi {
5227
5227
  if (!e.behaviors || e.behaviors.length === 0) return;
5228
5228
  const s = this.objectStates.get(e.id);
5229
5229
  s && e.behaviors.forEach((n) => {
5230
- var g, d, l, u, y, m, b, v, C, S, w, M, I, P, E, F, T, _, L, R, W, B, A, $, G, N, x, k, Y, X, J, tt, lt, Z, pt, at, Et, xt, bt, Bt, $t, Pt, Vt, Q, ct, Ot, Ct, St, Gt, Zt, jt, Qt, Nt, ee, it, dt, U, D, nt, et, Rt, Yt, At, Ht, Tt, O, Ft, oe, Mt, Ut, It, Xt, qt, ht, ft, mt, kt, gt, Dt, te, Kt, rt, st, ut, Wt, K, vt, yt, fe, be, Te, Jt, ae, me, Ie, ke, de, ce, he, ve, Pe, Ae, Re, _e, Le, Oe, De, ze, Ve, Ne, He, Ue, qe, Je, Qe, Ke, Ze, je;
5230
+ var g, d, l, u, y, m, b, v, C, S, M, w, I, _, E, F, T, P, L, R, W, B, A, $, G, N, x, k, Y, X, J, tt, lt, Z, pt, at, Et, xt, bt, Bt, $t, _t, Vt, Q, ct, Ot, Ct, St, Gt, Zt, jt, Qt, Nt, ee, it, dt, U, D, nt, et, Rt, Yt, At, Ht, Tt, O, Ft, oe, wt, Ut, It, Xt, qt, ht, ft, mt, kt, gt, Dt, te, Kt, rt, st, ut, Wt, K, vt, yt, fe, be, Te, Jt, ae, me, Ie, ke, de, ce, he, ve, _e, Ae, Re, Pe, Le, Oe, De, ze, Ve, Ne, He, Ue, qe, Je, Qe, Ke, Ze, je;
5231
5231
  if (!n.enabled) return;
5232
5232
  const a = n.startTime || 0, r = n.endTime || 1 / 0;
5233
5233
  if (this.currentTime < a || this.currentTime > r) return;
@@ -5241,8 +5241,8 @@ class fi {
5241
5241
  } else if (n.type === z.Magnetic) {
5242
5242
  const V = ((l = n.settings) == null ? void 0 : l.radius) || 400, q = ((u = n.settings) == null ? void 0 : u.strength) || 0.5;
5243
5243
  if (c < V && c > 5) {
5244
- const H = 1 - c / V, ot = f * H * q, _t = h * H * q;
5245
- s.x -= ot * t * 10, s.y -= _t * t * 10;
5244
+ const H = 1 - c / V, ot = f * H * q, Pt = h * H * q;
5245
+ s.x -= ot * t * 10, s.y -= Pt * t * 10;
5246
5246
  }
5247
5247
  } else if (n.type === z.Repel) {
5248
5248
  const V = ((y = n.settings) == null ? void 0 : y.radius) || 300, q = ((m = n.settings) == null ? void 0 : m.strength) || 1;
@@ -5254,19 +5254,19 @@ class fi {
5254
5254
  const V = ((b = n.settings) == null ? void 0 : b.speed) || 1, q = ((v = n.settings) == null ? void 0 : v.radius) || 30, H = this.currentTime * V * Math.PI * 2;
5255
5255
  s.x += Math.cos(H) * q * t * 5, s.y += Math.sin(H) * q * t * 5, s.rotation += 2 * t * 5;
5256
5256
  } else if (n.type === z.Vortex) {
5257
- const V = ((C = n.settings) == null ? void 0 : C.radius) || 400, q = ((S = n.settings) == null ? void 0 : S.speed) || 2, H = ((w = n.settings) == null ? void 0 : w.strength) || 1;
5257
+ const V = ((C = n.settings) == null ? void 0 : C.radius) || 400, q = ((S = n.settings) == null ? void 0 : S.speed) || 2, H = ((M = n.settings) == null ? void 0 : M.strength) || 1;
5258
5258
  if (c < V) {
5259
- const ot = Math.pow(1 - c / V, 1.5), _t = this.currentTime * q * Math.PI * 2, Lt = Math.cos(_t) * 30 - f * 0.4, zt = Math.sin(_t) * 30 - h * 0.4;
5259
+ const ot = Math.pow(1 - c / V, 1.5), Pt = this.currentTime * q * Math.PI * 2, Lt = Math.cos(Pt) * 30 - f * 0.4, zt = Math.sin(Pt) * 30 - h * 0.4;
5260
5260
  s.x += Lt * ot * H * t * 5, s.y += zt * ot * H * t * 5, s.rotation += 5 * ot * H * t * 5, s.scale_x *= 1 - ot * 0.1 * H * t, s.scale_y *= 1 - ot * 0.1 * H * t;
5261
5261
  }
5262
5262
  } else if (n.type === z.Fluid) {
5263
- const V = ((M = n.settings) == null ? void 0 : M.radius) || 300, q = ((I = n.settings) == null ? void 0 : I.strength) || 1;
5263
+ const V = ((w = n.settings) == null ? void 0 : w.radius) || 300, q = ((I = n.settings) == null ? void 0 : I.strength) || 1;
5264
5264
  if (c < V) {
5265
- const H = Math.pow(1 - c / V, 1.2), ot = f / (c || 1) * H * 1.2 * q, _t = h / (c || 1) * H * 1.2 * q;
5266
- s.x += ot * 10 * t * 5, s.y += _t * 10 * t * 5, s.scale_x *= 1 + H * 0.3 * q * t, s.scale_y *= 1 + H * 0.3 * q * t;
5265
+ const H = Math.pow(1 - c / V, 1.2), ot = f / (c || 1) * H * 1.2 * q, Pt = h / (c || 1) * H * 1.2 * q;
5266
+ s.x += ot * 10 * t * 5, s.y += Pt * 10 * t * 5, s.scale_x *= 1 + H * 0.3 * q * t, s.scale_y *= 1 + H * 0.3 * q * t;
5267
5267
  }
5268
5268
  } else if (n.type === z.Elastic) {
5269
- const V = ((P = n.settings) == null ? void 0 : P.radius) || 300, q = ((E = n.settings) == null ? void 0 : E.strength) || 1;
5269
+ const V = ((_ = n.settings) == null ? void 0 : _.radius) || 300, q = ((E = n.settings) == null ? void 0 : E.strength) || 1;
5270
5270
  if (c < V) {
5271
5271
  const H = 1 - c / V;
5272
5272
  s.scale_x *= 1 + H * 0.4 * q * t, s.scale_y *= 1 + H * 0.4 * q * t;
@@ -5278,7 +5278,7 @@ class fi {
5278
5278
  s.style.exposure = (s.style.exposure || 1) + ot * 0.5 * t;
5279
5279
  }
5280
5280
  } else if (n.type === z.Sticky) {
5281
- const V = ((T = n.settings) == null ? void 0 : T.radius) || 80, q = ((_ = n.settings) == null ? void 0 : _.strength) || 1;
5281
+ const V = ((T = n.settings) == null ? void 0 : T.radius) || 80, q = ((P = n.settings) == null ? void 0 : P.strength) || 1;
5282
5282
  if (c < V) {
5283
5283
  const H = Math.pow(1 - c / V, 2);
5284
5284
  s.x -= f * H * q * t * 10, s.y -= h * H * q * t * 10, s.scale_x *= 1 - H * 0.1 * q * t, s.scale_y *= 1 - H * 0.1 * q * t;
@@ -5290,17 +5290,17 @@ class fi {
5290
5290
  s.scale_x *= 1 + H * 0.5 * q * t, s.scale_y *= 1 + H * 0.5 * q * t;
5291
5291
  }
5292
5292
  } else if (n.type === z.Parallax) {
5293
- const V = ((W = n.settings) == null ? void 0 : W.factor) || 15, q = ((B = n.settings) == null ? void 0 : B.strength) || 1, H = this.canvasWidth / 2, ot = this.canvasHeight / 2, _t = this._lastPointerPos || { x: H, y: ot }, Lt = (_t.x - H) / H, zt = (_t.y - ot) / ot, ne = (((A = e.transform) == null ? void 0 : A.x) ?? 0) + Lt * V * q, ue = ((($ = e.transform) == null ? void 0 : $.y) ?? 0) + zt * V * q, Ce = (((G = e.transform) == null ? void 0 : G.rotate_x) ?? 0) - zt * V * 1.5 * q, re = (((N = e.transform) == null ? void 0 : N.rotate_y) ?? 0) + Lt * V * 1.5 * q, ge = Math.min(1, 10 * t);
5293
+ const V = ((W = n.settings) == null ? void 0 : W.factor) || 15, q = ((B = n.settings) == null ? void 0 : B.strength) || 1, H = this.canvasWidth / 2, ot = this.canvasHeight / 2, Pt = this._lastPointerPos || { x: H, y: ot }, Lt = (Pt.x - H) / H, zt = (Pt.y - ot) / ot, ne = (((A = e.transform) == null ? void 0 : A.x) ?? 0) + Lt * V * q, ue = ((($ = e.transform) == null ? void 0 : $.y) ?? 0) + zt * V * q, Ce = (((G = e.transform) == null ? void 0 : G.rotate_x) ?? 0) - zt * V * 1.5 * q, re = (((N = e.transform) == null ? void 0 : N.rotate_y) ?? 0) + Lt * V * 1.5 * q, ge = Math.min(1, 10 * t);
5294
5294
  s.x = this.lerp(s.x ?? ((x = e.transform) == null ? void 0 : x.x) ?? 0, ne, ge), s.y = this.lerp(s.y ?? ((k = e.transform) == null ? void 0 : k.y) ?? 0, ue, ge), s.rotate_x = this.lerp(s.rotate_x ?? ((Y = e.transform) == null ? void 0 : Y.rotate_x) ?? 0, Ce, ge), s.rotate_y = this.lerp(s.rotate_y ?? ((X = e.transform) == null ? void 0 : X.rotate_y) ?? 0, re, ge);
5295
5295
  } else if (n.type === z.Fold) {
5296
5296
  if (c < 300) {
5297
- const V = 1 - c / 300, q = (f > 0 ? -1 : 1) * V * 10, H = 1 - V * 0.1, ot = h / 300 * V * 20, _t = -(f / 300) * V * 20, Lt = Math.min(1, 10 * t);
5298
- s.skew_x = this.lerp(s.skew_x ?? ((J = e.transform) == null ? void 0 : J.skew_x) ?? 0, q, Lt), s.scale_y = this.lerp(s.scale_y ?? ((tt = e.transform) == null ? void 0 : tt.scale_y) ?? 1, (((lt = e.transform) == null ? void 0 : lt.scale_y) ?? 1) * H, Lt), s.rotate_x = this.lerp(s.rotate_x ?? ((Z = e.transform) == null ? void 0 : Z.rotate_x) ?? 0, ot, Lt), s.rotate_y = this.lerp(s.rotate_y ?? ((pt = e.transform) == null ? void 0 : pt.rotate_y) ?? 0, _t, Lt), s.style = s.style || { ...e.style }, s.style.artEffect = { enabled: !0, type: "fold_overlay", intensity: ((at = n.settings) == null ? void 0 : at.opacity) ?? 0.5 };
5297
+ const V = 1 - c / 300, q = (f > 0 ? -1 : 1) * V * 10, H = 1 - V * 0.1, ot = h / 300 * V * 20, Pt = -(f / 300) * V * 20, Lt = Math.min(1, 10 * t);
5298
+ s.skew_x = this.lerp(s.skew_x ?? ((J = e.transform) == null ? void 0 : J.skew_x) ?? 0, q, Lt), s.scale_y = this.lerp(s.scale_y ?? ((tt = e.transform) == null ? void 0 : tt.scale_y) ?? 1, (((lt = e.transform) == null ? void 0 : lt.scale_y) ?? 1) * H, Lt), s.rotate_x = this.lerp(s.rotate_x ?? ((Z = e.transform) == null ? void 0 : Z.rotate_x) ?? 0, ot, Lt), s.rotate_y = this.lerp(s.rotate_y ?? ((pt = e.transform) == null ? void 0 : pt.rotate_y) ?? 0, Pt, Lt), s.style = s.style || { ...e.style }, s.style.artEffect = { enabled: !0, type: "fold_overlay", intensity: ((at = n.settings) == null ? void 0 : at.opacity) ?? 0.5 };
5299
5299
  }
5300
5300
  } else if (n.type === z.Crumple) {
5301
5301
  if (c < 300) {
5302
5302
  const V = 1 - c / 300, q = V * (Math.random() - 0.5) * 5, H = V * (Math.random() - 0.5) * 0.05, ot = Math.min(1, 15 * t);
5303
- s.skew_x = this.lerp(s.skew_x ?? ((Et = e.transform) == null ? void 0 : Et.skew_x) ?? 0, q, ot), s.scale_x = this.lerp(s.scale_x ?? ((xt = e.transform) == null ? void 0 : xt.scale_x) ?? 1, (((bt = e.transform) == null ? void 0 : bt.scale_x) ?? 1) * (1 + H), ot), s.scale_y = this.lerp(s.scale_y ?? ((Bt = e.transform) == null ? void 0 : Bt.scale_y) ?? 1, ((($t = e.transform) == null ? void 0 : $t.scale_y) ?? 1) * (1 + H), ot), s.style = s.style || { ...e.style }, s.style.artEffect = { enabled: !0, type: "crumple_overlay", intensity: ((Pt = n.settings) == null ? void 0 : Pt.intensity) ?? 1, scale: ((Vt = n.settings) == null ? void 0 : Vt.scale) ?? 2 };
5303
+ s.skew_x = this.lerp(s.skew_x ?? ((Et = e.transform) == null ? void 0 : Et.skew_x) ?? 0, q, ot), s.scale_x = this.lerp(s.scale_x ?? ((xt = e.transform) == null ? void 0 : xt.scale_x) ?? 1, (((bt = e.transform) == null ? void 0 : bt.scale_x) ?? 1) * (1 + H), ot), s.scale_y = this.lerp(s.scale_y ?? ((Bt = e.transform) == null ? void 0 : Bt.scale_y) ?? 1, ((($t = e.transform) == null ? void 0 : $t.scale_y) ?? 1) * (1 + H), ot), s.style = s.style || { ...e.style }, s.style.artEffect = { enabled: !0, type: "crumple_overlay", intensity: ((_t = n.settings) == null ? void 0 : _t.intensity) ?? 1, scale: ((Vt = n.settings) == null ? void 0 : Vt.scale) ?? 2 };
5304
5304
  }
5305
5305
  } else if (n.type === z.Squash) {
5306
5306
  const V = ((Q = n.settings) == null ? void 0 : Q.strength) || 0.8;
@@ -5308,7 +5308,7 @@ class fi {
5308
5308
  } else if (n.type === z.TextCounter) {
5309
5309
  const V = ((Gt = n.settings) == null ? void 0 : Gt.duration) || 2, q = ((Zt = n.settings) == null ? void 0 : Zt.from) || 0, H = ((jt = n.settings) == null ? void 0 : jt.to) || 100;
5310
5310
  n._runtimeStart === void 0 && (n._runtimeStart = this.currentTime);
5311
- const ot = this.currentTime - n._runtimeStart, _t = Math.min(1, ot / V), Lt = Math.floor(q + (H - q) * _t);
5311
+ const ot = this.currentTime - n._runtimeStart, Pt = Math.min(1, ot / V), Lt = Math.floor(q + (H - q) * Pt);
5312
5312
  if (((Qt = e.geometry) == null ? void 0 : Qt.type) === "Text") {
5313
5313
  const zt = ((Nt = n.settings) == null ? void 0 : Nt.prefix) || "", ne = ((ee = n.settings) == null ? void 0 : ee.suffix) || "";
5314
5314
  s.geometry || (s.geometry = { ...e.geometry }), s.geometry.text = `${zt}${Lt}${ne}`;
@@ -5324,7 +5324,7 @@ class fi {
5324
5324
  const V = (((At = n.settings) == null ? void 0 : At.frequency) || ((Ht = n.settings) == null ? void 0 : Ht.speed) || 1) * 2e-3, q = (((Tt = n.settings) == null ? void 0 : Tt.amplitude) || ((O = n.settings) == null ? void 0 : O.range) || 50) * (((Ft = n.settings) == null ? void 0 : Ft.strength) || 1), H = Date.now();
5325
5325
  s.x += Math.sin(H * V) * q * t, s.y += Math.cos(H * V * 0.8) * q * t, s.rotation += Math.sin(H * V * 0.5) * 5 * t;
5326
5326
  } else if (n.type === z.Pulse) {
5327
- const V = (((oe = n.settings) == null ? void 0 : oe.speed) || 1) * 5e-3, q = (((Mt = n.settings) == null ? void 0 : Mt.scale) || 1.2) - 1, H = Math.sin(Date.now() * V), ot = ((Ut = n.settings) == null ? void 0 : Ut.strength) || 1;
5327
+ const V = (((oe = n.settings) == null ? void 0 : oe.speed) || 1) * 5e-3, q = (((wt = n.settings) == null ? void 0 : wt.scale) || 1.2) - 1, H = Math.sin(Date.now() * V), ot = ((Ut = n.settings) == null ? void 0 : Ut.strength) || 1;
5328
5328
  s.scale_x *= 1 + H * q * ot * t, s.scale_y *= 1 + H * q * ot * t, s.style && (s.style.exposure = (s.style.exposure || 1) + Math.max(0, H) * 0.1 * ot * t);
5329
5329
  } else if (n.type === z.Draggable) {
5330
5330
  const V = ((It = n.settings) == null ? void 0 : It.radius) || 150, q = this.draggingBehaviors.has(e.id);
@@ -5336,8 +5336,8 @@ class fi {
5336
5336
  const V = ((qt = n.settings) == null ? void 0 : qt.axis) || "vertical", q = ((ht = n.settings) == null ? void 0 : ht.factor) || 0.5, H = ((ft = n.settings) == null ? void 0 : ft.strength) || 1, ot = ((mt = n.settings) == null ? void 0 : mt.scaleFactor) || 0;
5337
5337
  (V === "vertical" || V === "both") && (s.y += this.scrollOffset.y * q * H * t), (V === "horizontal" || V === "both") && (s.x += this.scrollOffset.x * q * H * t), ot !== 0 && (s.scale_x *= 1 + this.scrollOffset.y * ot * t, s.scale_y *= 1 + this.scrollOffset.y * ot * t);
5338
5338
  } else if (n.type === z.LookAt) {
5339
- const V = ((kt = n.settings) == null ? void 0 : kt.factor) || 1, q = ((gt = n.settings) == null ? void 0 : gt.strength) || 1, H = Math.atan2(-h, -f) * (180 / Math.PI), ot = s.rotation, _t = (H - ot + 180) % 360 - 180;
5340
- s.rotation += _t * V * q * t * 10;
5339
+ const V = ((kt = n.settings) == null ? void 0 : kt.factor) || 1, q = ((gt = n.settings) == null ? void 0 : gt.strength) || 1, H = Math.atan2(-h, -f) * (180 / Math.PI), ot = s.rotation, Pt = (H - ot + 180) % 360 - 180;
5340
+ s.rotation += Pt * V * q * t * 10;
5341
5341
  } else if (n.type === z.Scan) {
5342
5342
  const V = (((Dt = n.settings) == null ? void 0 : Dt.speed) || 1) * 4e-3, q = ((te = n.settings) == null ? void 0 : te.strength) || 1, H = (Math.sin(Date.now() * V) + 1) / 2;
5343
5343
  s.style && (s.style.exposure = (s.style.exposure || 1) + H * q * t * 5), s.x += (H - 0.5) * 20 * q * t;
@@ -5358,8 +5358,8 @@ class fi {
5358
5358
  if (V) {
5359
5359
  const q = this.objectStates.get(V);
5360
5360
  if (q) {
5361
- const H = ((vt = n.settings) == null ? void 0 : vt.stiffness) || 0.1, ot = q.x - s.x, _t = q.y - s.y;
5362
- s.x += ot * H * t * 60, s.y += _t * H * t * 60;
5361
+ const H = ((vt = n.settings) == null ? void 0 : vt.stiffness) || 0.1, ot = q.x - s.x, Pt = q.y - s.y;
5362
+ s.x += ot * H * t * 60, s.y += Pt * H * t * 60;
5363
5363
  }
5364
5364
  }
5365
5365
  } else if (n.type === z.Wrap)
@@ -5385,32 +5385,32 @@ class fi {
5385
5385
  } else
5386
5386
  s.scale_x = this.lerp(s.scale_x ?? 1, ((he = e.transform) == null ? void 0 : he.scale_x) ?? 1, 0.1), s.scale_y = this.lerp(s.scale_y ?? 1, ((ve = e.transform) == null ? void 0 : ve.scale_y) ?? 1, 0.1);
5387
5387
  } else if (n.type === z.LayoutAnimation) {
5388
- const V = ((Pe = n.settings) == null ? void 0 : Pe.watchProperties) || ["x", "y", "scale_x", "scale_y", "opacity", "rotation"], q = ((Ae = n.settings) == null ? void 0 : Ae.duration) || 0.3;
5388
+ const V = ((_e = n.settings) == null ? void 0 : _e.watchProperties) || ["x", "y", "scale_x", "scale_y", "skew_x", "skew_y", "opacity", "rotation"], q = ((Ae = n.settings) == null ? void 0 : Ae.duration) || 0.3;
5389
5389
  this._layoutAnimCache.has(e.id) || this._layoutAnimCache.set(e.id, /* @__PURE__ */ new Map());
5390
5390
  const H = this._layoutAnimCache.get(e.id);
5391
5391
  for (const ot of V) {
5392
- const _t = this.getObjectProperty(s, e, ot);
5393
- if (_t === void 0) continue;
5392
+ const Pt = this.getObjectProperty(s, e, ot);
5393
+ if (Pt === void 0) continue;
5394
5394
  const Lt = H.get(ot);
5395
5395
  if (!Lt)
5396
5396
  H.set(ot, {
5397
- from: _t,
5398
- to: _t,
5397
+ from: Pt,
5398
+ to: Pt,
5399
5399
  startTime: this.currentTime,
5400
5400
  duration: 0
5401
5401
  });
5402
- else if (Lt.to !== _t) {
5402
+ else if (Lt.to !== Pt) {
5403
5403
  const ne = this.getObjectProperty(s, e, ot);
5404
5404
  H.set(ot, {
5405
5405
  from: ne ?? Lt.from,
5406
- to: _t,
5406
+ to: Pt,
5407
5407
  startTime: this.currentTime,
5408
5408
  duration: ((Re = n.settings) == null ? void 0 : Re.duration) ?? q
5409
5409
  });
5410
5410
  }
5411
5411
  const zt = H.get(ot);
5412
5412
  if (zt.duration > 0 && zt.from !== zt.to) {
5413
- const ne = this.currentTime - zt.startTime, ue = Math.min(1, ne / zt.duration), Ce = this.applyEasing(ue, ((_e = n.settings) == null ? void 0 : _e.easing) || "easeOutCubic"), re = zt.from + (zt.to - zt.from) * Ce;
5413
+ const ne = this.currentTime - zt.startTime, ue = Math.min(1, ne / zt.duration), Ce = this.applyEasing(ue, ((Pe = n.settings) == null ? void 0 : Pe.easing) || "easeOutCubic"), re = zt.from + (zt.to - zt.from) * Ce;
5414
5414
  this.setObjectProperty(s, e, ot, re);
5415
5415
  }
5416
5416
  }
@@ -5421,6 +5421,8 @@ class fi {
5421
5421
  "y",
5422
5422
  "scale_x",
5423
5423
  "scale_y",
5424
+ "skew_x",
5425
+ "skew_y",
5424
5426
  "opacity",
5425
5427
  "rotation",
5426
5428
  "style.fill.color",
@@ -5432,21 +5434,21 @@ class fi {
5432
5434
  "style.shadow.offsetY"
5433
5435
  ];
5434
5436
  for (const ot of H) {
5435
- const _t = this.getObjectProperty(s, e, ot);
5436
- if (_t === void 0 || typeof _t != "number") continue;
5437
+ const Pt = this.getObjectProperty(s, e, ot);
5438
+ if (Pt === void 0 || typeof Pt != "number") continue;
5437
5439
  const Lt = V.get(ot);
5438
5440
  if (!Lt)
5439
5441
  V.set(ot, {
5440
- from: _t,
5441
- to: _t,
5442
+ from: Pt,
5443
+ to: Pt,
5442
5444
  startTime: this.currentTime,
5443
5445
  duration: 0
5444
5446
  });
5445
- else if (Lt.to !== _t) {
5447
+ else if (Lt.to !== Pt) {
5446
5448
  const ne = this.getObjectProperty(s, e, ot);
5447
5449
  V.set(ot, {
5448
5450
  from: ne ?? Lt.from,
5449
- to: _t,
5451
+ to: Pt,
5450
5452
  startTime: this.currentTime,
5451
5453
  duration: q
5452
5454
  });
@@ -5461,10 +5463,10 @@ class fi {
5461
5463
  const V = ((De = n.settings) == null ? void 0 : De.connections) || [], q = ((ze = n.settings) == null ? void 0 : ze.globalDamping) || 0.3;
5462
5464
  this._springChainState.has(e.id) || this._springChainState.set(e.id, /* @__PURE__ */ new Map());
5463
5465
  const H = this._springChainState.get(e.id);
5464
- for (const _t of V) {
5465
- if (!H.has(_t.targetId)) {
5466
- const Lt = this.objectStates.get(_t.targetId);
5467
- H.set(_t.targetId, {
5466
+ for (const Pt of V) {
5467
+ if (!H.has(Pt.targetId)) {
5468
+ const Lt = this.objectStates.get(Pt.targetId);
5469
+ H.set(Pt.targetId, {
5468
5470
  x: (Lt == null ? void 0 : Lt.x) ?? 0,
5469
5471
  y: (Lt == null ? void 0 : Lt.y) ?? 0,
5470
5472
  vx: 0,
@@ -5476,18 +5478,18 @@ class fi {
5476
5478
  const ot = H.get(e.id);
5477
5479
  if (ot) {
5478
5480
  ot.x = s.x, ot.y = s.y;
5479
- for (const _t of V) {
5480
- const Lt = H.get(_t.targetId);
5481
+ for (const Pt of V) {
5482
+ const Lt = H.get(Pt.targetId);
5481
5483
  if (!Lt) continue;
5482
- const zt = Lt.x - ot.x, ne = Lt.y - ot.y, ue = Math.sqrt(zt * zt + ne * ne) || 1e-3, re = (ue - (_t.restLength || 50)) * (_t.stiffness || 0.8), ge = zt / ue * re, Fe = ne / ue * re;
5484
+ const zt = Lt.x - ot.x, ne = Lt.y - ot.y, ue = Math.sqrt(zt * zt + ne * ne) || 1e-3, re = (ue - (Pt.restLength || 50)) * (Pt.stiffness || 0.8), ge = zt / ue * re, Fe = ne / ue * re;
5483
5485
  ot.vx += ge * t * 10, ot.vy += Fe * t * 10, Lt.vx -= ge * t * 10, Lt.vy -= Fe * t * 10, ot.vx *= 1 - q * t * 10, ot.vy *= 1 - q * t * 10, Lt.vx *= 1 - q * t * 10, Lt.vy *= 1 - q * t * 10;
5484
- const pe = this.objectStates.get(_t.targetId);
5486
+ const pe = this.objectStates.get(Pt.targetId);
5485
5487
  pe && (pe.x += Lt.vx * t, pe.y += Lt.vy * t);
5486
5488
  }
5487
5489
  s.x += ot.vx * t, s.y += ot.vy * t;
5488
5490
  }
5489
5491
  } else if (n.type === z.ParticleEmitter) {
5490
- const V = ((Ve = n.settings) == null ? void 0 : Ve.rate) || 10, q = ((Ne = n.settings) == null ? void 0 : Ne.speed) || 100, H = ((He = n.settings) == null ? void 0 : He.size) || 5, ot = ((Ue = n.settings) == null ? void 0 : Ue.lifetime) || 2, _t = ((qe = n.settings) == null ? void 0 : qe.gravity) || 0, Lt = ((Je = n.settings) == null ? void 0 : Je.color) || "#ffffff", zt = ((Qe = n.settings) == null ? void 0 : Qe.maxParticles) || 200, ne = (Ke = n.settings) != null && Ke.rateInputId ? this.inputs.get(n.settings.rateInputId) ?? V : V, ue = (Ze = n.settings) != null && Ze.gravityInputId ? this.inputs.get(n.settings.gravityInputId) ?? _t : _t, Ce = (je = n.settings) != null && je.speedInputId ? this.inputs.get(n.settings.speedInputId) ?? q : q;
5492
+ const V = ((Ve = n.settings) == null ? void 0 : Ve.rate) || 10, q = ((Ne = n.settings) == null ? void 0 : Ne.speed) || 100, H = ((He = n.settings) == null ? void 0 : He.size) || 5, ot = ((Ue = n.settings) == null ? void 0 : Ue.lifetime) || 2, Pt = ((qe = n.settings) == null ? void 0 : qe.gravity) || 0, Lt = ((Je = n.settings) == null ? void 0 : Je.color) || "#ffffff", zt = ((Qe = n.settings) == null ? void 0 : Qe.maxParticles) || 200, ne = (Ke = n.settings) != null && Ke.rateInputId ? this.inputs.get(n.settings.rateInputId) ?? V : V, ue = (Ze = n.settings) != null && Ze.gravityInputId ? this.inputs.get(n.settings.gravityInputId) ?? Pt : Pt, Ce = (je = n.settings) != null && je.speedInputId ? this.inputs.get(n.settings.speedInputId) ?? q : q;
5491
5493
  this._emitterPools.has(e.id) || this._emitterPools.set(e.id, []);
5492
5494
  const re = this._emitterPools.get(e.id);
5493
5495
  let ge = 0;
@@ -5516,7 +5518,7 @@ class fi {
5516
5518
  });
5517
5519
  }
5518
5520
  applyBehaviorSensor(t, i, o, e, s, n, a = 0, r = 0, f = 1) {
5519
- var l, u, y, m, b, v, C, S, w, M, I, P, E, F, T, _, L, R, W, B, A, $, G, N;
5521
+ var l, u, y, m, b, v, C, S, M, w, I, _, E, F, T, P, L, R, W, B, A, $, G, N;
5520
5522
  const h = (s == null ? void 0 : s.intensity) || (s == null ? void 0 : s.strength) || 1, c = Math.min(1, 15 * e), g = f > 0 ? a / f : 0, d = f > 0 ? r / f : 0;
5521
5523
  switch (i) {
5522
5524
  case ie.Scale: {
@@ -5555,13 +5557,13 @@ class fi {
5555
5557
  break;
5556
5558
  }
5557
5559
  case ie.SkewX: {
5558
- const x = ((w = n == null ? void 0 : n.transform) == null ? void 0 : w.skew_x) ?? 0, k = x + g * o * h * 45;
5560
+ const x = ((M = n == null ? void 0 : n.transform) == null ? void 0 : M.skew_x) ?? 0, k = x + g * o * h * 45;
5559
5561
  t.skew_x = (t.skew_x ?? x) * (1 - c) + k * c, t.skew_x > 85 && (t.skew_x = 85), t.skew_x < -85 && (t.skew_x = -85);
5560
5562
  break;
5561
5563
  }
5562
5564
  case ie.Blur: {
5563
- t.style || (t.style = { ...n == null ? void 0 : n.style }), t.style.blur || (t.style.blur = { ...(M = n == null ? void 0 : n.style) == null ? void 0 : M.blur });
5564
- const x = ((P = (I = n == null ? void 0 : n.style) == null ? void 0 : I.blur) == null ? void 0 : P.amount) || 0, k = x + o * ((s == null ? void 0 : s.blur) || 20) * h;
5565
+ t.style || (t.style = { ...n == null ? void 0 : n.style }), t.style.blur || (t.style.blur = { ...(w = n == null ? void 0 : n.style) == null ? void 0 : w.blur });
5566
+ const x = ((_ = (I = n == null ? void 0 : n.style) == null ? void 0 : I.blur) == null ? void 0 : _.amount) || 0, k = x + o * ((s == null ? void 0 : s.blur) || 20) * h;
5565
5567
  t.style.blur.amount = (t.style.blur.amount ?? x) * (1 - c) + k * c;
5566
5568
  break;
5567
5569
  }
@@ -5572,7 +5574,7 @@ class fi {
5572
5574
  break;
5573
5575
  }
5574
5576
  case ie.HueShift: {
5575
- t.style || (t.style = { ...n == null ? void 0 : n.style }), t.style.adjustments || (t.style.adjustments = { ...(_ = n == null ? void 0 : n.style) == null ? void 0 : _.adjustments });
5577
+ t.style || (t.style = { ...n == null ? void 0 : n.style }), t.style.adjustments || (t.style.adjustments = { ...(P = n == null ? void 0 : n.style) == null ? void 0 : P.adjustments });
5576
5578
  const x = ((R = (L = n == null ? void 0 : n.style) == null ? void 0 : L.adjustments) == null ? void 0 : R.hue) || 0, k = x + o * ((s == null ? void 0 : s.hue) || 180) * h;
5577
5579
  t.style.adjustments.hue = (t.style.adjustments.hue ?? x) * (1 - c) + k * c;
5578
5580
  break;
@@ -5700,24 +5702,24 @@ const vi = Cs(({
5700
5702
  revision: v = 0,
5701
5703
  scrollY: C,
5702
5704
  scrollX: S,
5703
- mouseX: w,
5704
- mouseY: M,
5705
+ mouseX: M,
5706
+ mouseY: w,
5705
5707
  isMouseDown: I,
5706
- inputs: P,
5708
+ inputs: _,
5707
5709
  interactive: E = !0,
5708
5710
  onNavigation: F
5709
5711
  }, T) => {
5710
- const _ = Se(null), L = Se(null);
5712
+ const P = Se(null), L = Se(null);
5711
5713
  L.current || (L.current = new fi());
5712
5714
  const R = Se(void 0), W = Se(0), B = Se(null), A = Se(v), $ = Se(null), [, G] = ds(p || null), N = Se(!0);
5713
- Ss(T, () => _.current), we(() => (N.current = !0, () => {
5715
+ Ss(T, () => P.current), Me(() => (N.current = !0, () => {
5714
5716
  N.current = !1, R.current && cancelAnimationFrame(R.current);
5715
- }), []), we(() => {
5717
+ }), []), Me(() => {
5716
5718
  L.current.setLayout(e, s);
5717
- }, [e, s]), we(() => {
5719
+ }, [e, s]), Me(() => {
5718
5720
  const k = L.current;
5719
5721
  a && k.setTriggerCallback(a), r && k.setInputUpdateCallback((Y, X) => r({ [Y]: X })), f && k.setComponentChangeCallback((Y) => f(Y)), h && k.setToggleCallback(h), c && k.setInputChangeCallback(c), g && k.setInputFocusCallback(g), d && k.setInputBlurCallback(d), l && k.setOnLogCallback((Y) => l(Y, "info")), u && k.setLogicUpdateCallback(u), y && k.setButtonClickCallback(y), m && k.setGraphPointClickCallback((Y) => m(Y.objectId, Y)), F && k.setNavigationCallback(F);
5720
- }, [a, r, f, h, c, g, d, l, u, y, m, F]), we(() => {
5722
+ }, [a, r, f, h, c, g, d, l, u, y, m, F]), Me(() => {
5721
5723
  (async () => {
5722
5724
  let Y = p;
5723
5725
  if (t && !p)
@@ -5731,10 +5733,10 @@ const vi = Cs(({
5731
5733
  (B.current !== J || A.current !== v || $.current !== Y) && (X.load(Y), B.current = J, A.current = v, $.current = Y, G(Y), W.current = 0, X.advance(0)), n && n(X);
5732
5734
  }
5733
5735
  })();
5734
- }, [p, t, v]), we(() => {
5736
+ }, [p, t, v]), Me(() => {
5735
5737
  const k = (Y) => {
5736
5738
  if (!L.current || !N.current) return;
5737
- const X = L.current, J = _.current;
5739
+ const X = L.current, J = P.current;
5738
5740
  if (!J) return;
5739
5741
  const tt = J.getContext("2d");
5740
5742
  if (!tt) return;
@@ -5754,23 +5756,23 @@ const vi = Cs(({
5754
5756
  return R.current = requestAnimationFrame(k), () => {
5755
5757
  R.current && cancelAnimationFrame(R.current);
5756
5758
  };
5757
- }, [o, b]), we(() => {
5759
+ }, [o, b]), Me(() => {
5758
5760
  const k = L.current;
5759
- C !== void 0 && k.updateInput("scrollY", C), S !== void 0 && k.updateInput("scrollX", S), w !== void 0 && k.updateInput("mouseX", w), M !== void 0 && k.updateInput("mouseY", M), I !== void 0 && k.updateInput("isMouseDown", I), P && Object.entries(P).forEach(([Y, X]) => k.updateInput(Y, X));
5760
- }, [C, S, w, M, I, P]);
5761
+ C !== void 0 && k.updateInput("scrollY", C), S !== void 0 && k.updateInput("scrollX", S), M !== void 0 && k.updateInput("mouseX", M), w !== void 0 && k.updateInput("mouseY", w), I !== void 0 && k.updateInput("isMouseDown", I), _ && Object.entries(_).forEach(([Y, X]) => k.updateInput(Y, X));
5762
+ }, [C, S, M, w, I, _]);
5761
5763
  const x = (k, Y) => {
5762
- if (!E || !_.current) return;
5764
+ if (!E || !P.current) return;
5763
5765
  k.stopPropagation(), "nativeEvent" in k && k.nativeEvent && typeof k.nativeEvent.stopImmediatePropagation == "function" ? k.nativeEvent.stopImmediatePropagation() : typeof k.stopImmediatePropagation == "function" && k.stopImmediatePropagation();
5764
- const X = _.current, J = X.getBoundingClientRect(), tt = k.clientX - J.left, lt = k.clientY - J.top, Z = window.devicePixelRatio || 1;
5766
+ const X = P.current, J = X.getBoundingClientRect(), tt = k.clientX - J.left, lt = k.clientY - J.top, Z = window.devicePixelRatio || 1;
5765
5767
  (Y === "click" || Y === "down" || Y === "up") && l && l(`[Canvas] Pointer ${Y} at rect(${Math.round(tt)},${Math.round(lt)}) mapped to buffer(${Math.round(tt * Z)},${Math.round(lt * Z)})`, "info"), L.current.handlePointerInput(Y, tt * Z, lt * Z, X.width, X.height);
5766
5768
  };
5767
- return /* @__PURE__ */ Me(
5769
+ return /* @__PURE__ */ we(
5768
5770
  "canvas",
5769
5771
  {
5770
- ref: _,
5772
+ ref: P,
5771
5773
  onPointerDown: (k) => {
5772
5774
  var Y;
5773
- x(k, "down"), (Y = _.current) == null || Y.focus();
5775
+ x(k, "down"), (Y = P.current) == null || Y.focus();
5774
5776
  },
5775
5777
  onPointerMove: (k) => x(k, "move"),
5776
5778
  onPointerUp: (k) => x(k, "up"),
@@ -5831,7 +5833,7 @@ function Ci() {
5831
5833
  }
5832
5834
  const Si = ({ artboard: p, config: t }) => {
5833
5835
  const i = { ...p.seo, ...t }, o = i.enableSmartExtraction !== !1;
5834
- we(() => {
5836
+ Me(() => {
5835
5837
  const a = i.title || p.name;
5836
5838
  a && (document.title = a);
5837
5839
  let r = i.description;
@@ -5856,16 +5858,16 @@ const Si = ({ artboard: p, config: t }) => {
5856
5858
  h || (h = document.createElement("meta"), h.setAttribute(a, r), document.head.appendChild(h)), h.setAttribute("content", f);
5857
5859
  }, s = () => {
5858
5860
  const a = [];
5859
- return a.push(/* @__PURE__ */ Me("h1", { children: i.title || p.name }, "artboard-title")), p.objects.forEach((f, h) => {
5861
+ return a.push(/* @__PURE__ */ we("h1", { children: i.title || p.name }, "artboard-title")), p.objects.forEach((f, h) => {
5860
5862
  var c, g;
5861
5863
  if (!(f.visible === !1 || f.isVisible === !1))
5862
5864
  if (((c = f.geometry) == null ? void 0 : c.type) === "Text") {
5863
5865
  const d = f.geometry.text;
5864
- d && (f.geometry.fontSize > 24 ? a.push(/* @__PURE__ */ Me("h2", { children: d }, f.id || h)) : a.push(/* @__PURE__ */ Me("p", { children: d }, f.id || h)));
5866
+ d && (f.geometry.fontSize > 24 ? a.push(/* @__PURE__ */ we("h2", { children: d }, f.id || h)) : a.push(/* @__PURE__ */ we("p", { children: d }, f.id || h)));
5865
5867
  } else if (((g = f.geometry) == null ? void 0 : g.type) === "Image") {
5866
5868
  const d = f.geometry.src, l = f.altText || f.name || "Illustration";
5867
- a.push(/* @__PURE__ */ Me("img", { src: d, alt: l }, f.id || h));
5868
- } else f.type === "Button" && a.push(/* @__PURE__ */ Me("button", { children: f.name || "Button" }, f.id || h));
5869
+ a.push(/* @__PURE__ */ we("img", { src: d, alt: l }, f.id || h));
5870
+ } else f.type === "Button" && a.push(/* @__PURE__ */ we("button", { children: f.name || "Button" }, f.id || h));
5869
5871
  }), a;
5870
5872
  }, n = i.jsonLd || {
5871
5873
  "@context": "https://schema.org",
@@ -5894,13 +5896,13 @@ const Si = ({ artboard: p, config: t }) => {
5894
5896
  },
5895
5897
  children: [
5896
5898
  s(),
5897
- /* @__PURE__ */ Me("script", { type: "application/ld+json", children: JSON.stringify(n) })
5899
+ /* @__PURE__ */ we("script", { type: "application/ld+json", children: JSON.stringify(n) })
5898
5900
  ]
5899
5901
  }
5900
5902
  );
5901
- }, di = "6.3.24", ui = {
5903
+ }, di = "6.3.25", ui = {
5902
5904
  version: di
5903
- }, Mi = ui.version;
5905
+ }, wi = ui.version;
5904
5906
  export {
5905
5907
  ie as BehaviorSensor,
5906
5908
  z as BehaviorType,
@@ -5908,8 +5910,8 @@ export {
5908
5910
  Si as ExodeSEO,
5909
5911
  vi as ExodeUICanvas,
5910
5912
  fi as ExodeUIEngine,
5911
- wt as LogicOp,
5913
+ Mt as LogicOp,
5912
5914
  As as RapierPhysics,
5913
- Mi as VERSION,
5915
+ wi as VERSION,
5914
5916
  Ci as useExodeUI
5915
5917
  };