draftify-react 0.3.0 → 0.3.1

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.
@@ -530,13 +530,13 @@ const qr = {
530
530
  test: /* @__PURE__ */ Yi("hsl", "hue"),
531
531
  parse: /* @__PURE__ */ Jo("hue", "saturation", "lightness"),
532
532
  transform: ({ hue: t, saturation: e, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + Kt.transform(cn(e)) + ", " + Kt.transform(cn(n)) + ", " + cn(gn.transform(r)) + ")"
533
- }, mt = {
533
+ }, ht = {
534
534
  test: (t) => we.test(t) || qr.test(t) || De.test(t),
535
535
  parse: (t) => we.test(t) ? we.parse(t) : De.test(t) ? De.parse(t) : qr.parse(t),
536
536
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? we.transform(t) : De.transform(t),
537
537
  getAnimatableNone: (t) => {
538
- const e = mt.parse(t);
539
- return e.alpha = 0, mt.transform(e);
538
+ const e = ht.parse(t);
539
+ return e.alpha = 0, ht.transform(e);
540
540
  }
541
541
  }, Qf = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
542
542
  function Zf(t) {
@@ -550,7 +550,7 @@ function yn(t) {
550
550
  var: []
551
551
  }, i = [];
552
552
  let a = 0;
553
- const o = e.replace(ed, (c) => (mt.test(c) ? (r.color.push(a), i.push(el), n.push(mt.parse(c))) : c.startsWith(td) ? (r.var.push(a), i.push(Jf), n.push(c)) : (r.number.push(a), i.push(tl), n.push(parseFloat(c))), ++a, _a)).split(_a);
553
+ const o = e.replace(ed, (c) => (ht.test(c) ? (r.color.push(a), i.push(el), n.push(ht.parse(c))) : c.startsWith(td) ? (r.var.push(a), i.push(Jf), n.push(c)) : (r.number.push(a), i.push(tl), n.push(parseFloat(c))), ++a, _a)).split(_a);
554
554
  return { values: n, split: o, indexes: r, types: i };
555
555
  }
556
556
  function nl(t) {
@@ -563,12 +563,12 @@ function rl(t) {
563
563
  for (let s = 0; s < r; s++)
564
564
  if (a += e[s], i[s] !== void 0) {
565
565
  const o = n[s];
566
- o === tl ? a += cn(i[s]) : o === el ? a += mt.transform(i[s]) : a += i[s];
566
+ o === tl ? a += cn(i[s]) : o === el ? a += ht.transform(i[s]) : a += i[s];
567
567
  }
568
568
  return a;
569
569
  };
570
570
  }
571
- const nd = (t) => typeof t == "number" ? 0 : mt.test(t) ? mt.getAnimatableNone(t) : t;
571
+ const nd = (t) => typeof t == "number" ? 0 : ht.test(t) ? ht.getAnimatableNone(t) : t;
572
572
  function rd(t) {
573
573
  const e = nl(t);
574
574
  return rl(t)(e.map(nd));
@@ -601,7 +601,7 @@ function id({ hue: t, saturation: e, lightness: n, alpha: r }) {
601
601
  function Gn(t, e) {
602
602
  return (n) => n > 0 ? e : t;
603
603
  }
604
- const ut = (t, e, n) => t + (e - t) * n, Ir = (t, e, n) => {
604
+ const ft = (t, e, n) => t + (e - t) * n, Ir = (t, e, n) => {
605
605
  const r = t * t, i = n * (e * e - r) + r;
606
606
  return i < 0 ? 0 : Math.sqrt(i);
607
607
  }, ad = [qr, we, De], sd = (t) => ad.find((e) => e.test(t));
@@ -617,16 +617,16 @@ const Na = (t, e) => {
617
617
  if (!n || !r)
618
618
  return Gn(t, e);
619
619
  const i = { ...n };
620
- return (a) => (i.red = Ir(n.red, r.red, a), i.green = Ir(n.green, r.green, a), i.blue = Ir(n.blue, r.blue, a), i.alpha = ut(n.alpha, r.alpha, a), we.transform(i));
620
+ return (a) => (i.red = Ir(n.red, r.red, a), i.green = Ir(n.green, r.green, a), i.blue = Ir(n.blue, r.blue, a), i.alpha = ft(n.alpha, r.alpha, a), we.transform(i));
621
621
  }, Qr = /* @__PURE__ */ new Set(["none", "hidden"]);
622
622
  function od(t, e) {
623
623
  return Qr.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
624
624
  }
625
625
  function ld(t, e) {
626
- return (n) => ut(t, e, n);
626
+ return (n) => ft(t, e, n);
627
627
  }
628
628
  function Gi(t) {
629
- return typeof t == "number" ? ld : typeof t == "string" ? Wi(t) ? Gn : mt.test(t) ? Na : fd : Array.isArray(t) ? il : typeof t == "object" ? mt.test(t) ? Na : cd : Gn;
629
+ return typeof t == "number" ? ld : typeof t == "string" ? Wi(t) ? Gn : ht.test(t) ? Na : fd : Array.isArray(t) ? il : typeof t == "object" ? ht.test(t) ? Na : cd : Gn;
630
630
  }
631
631
  function il(t, e) {
632
632
  const n = [...t], r = n.length, i = t.map((a, s) => Gi(a)(a, e[s]));
@@ -659,7 +659,7 @@ const fd = (t, e) => {
659
659
  return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Qr.has(t) && !i.values.length || Qr.has(e) && !r.values.length ? od(t, e) : An(il(ud(r, i), i.values), n) : (Xe(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Gn(t, e));
660
660
  };
661
661
  function al(t, e, n) {
662
- return typeof t == "number" && typeof e == "number" && typeof n == "number" ? ut(t, e, n) : Gi(t)(t, e);
662
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? ft(t, e, n) : Gi(t)(t, e);
663
663
  }
664
664
  const dd = (t) => {
665
665
  const e = ({ timestamp: n }) => t(n);
@@ -700,7 +700,7 @@ function ol(t, e, n) {
700
700
  const r = Math.max(e - md, 0);
701
701
  return No(n - t(r), e - r);
702
702
  }
703
- const ct = {
703
+ const ut = {
704
704
  // Default spring physics
705
705
  stiffness: 100,
706
706
  damping: 10,
@@ -729,11 +729,11 @@ const ct = {
729
729
  minDamping: 0.05,
730
730
  maxDamping: 1
731
731
  }, Mr = 1e-3;
732
- function pd({ duration: t = ct.duration, bounce: e = ct.bounce, velocity: n = ct.velocity, mass: r = ct.mass }) {
732
+ function pd({ duration: t = ut.duration, bounce: e = ut.bounce, velocity: n = ut.velocity, mass: r = ut.mass }) {
733
733
  let i, a;
734
- Xe(t <= /* @__PURE__ */ zt(ct.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
734
+ Xe(t <= /* @__PURE__ */ zt(ut.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
735
735
  let s = 1 - e;
736
- s = Jt(ct.minDamping, ct.maxDamping, s), t = Jt(ct.minDuration, ct.maxDuration, /* @__PURE__ */ Lt(t)), s < 1 ? (i = (d) => {
736
+ s = Jt(ut.minDamping, ut.maxDamping, s), t = Jt(ut.minDuration, ut.maxDuration, /* @__PURE__ */ Lt(t)), s < 1 ? (i = (d) => {
737
737
  const l = d * s, u = l * t, f = l - n, h = Zr(d, s), m = Math.exp(-u);
738
738
  return Mr - f / h * m;
739
739
  }, a = (d) => {
@@ -749,8 +749,8 @@ function pd({ duration: t = ct.duration, bounce: e = ct.bounce, velocity: n = ct
749
749
  const o = 5 / t, c = yd(i, a, o);
750
750
  if (t = /* @__PURE__ */ zt(t), isNaN(c))
751
751
  return {
752
- stiffness: ct.stiffness,
753
- damping: ct.damping,
752
+ stiffness: ut.stiffness,
753
+ damping: ut.damping,
754
754
  duration: t
755
755
  };
756
756
  {
@@ -778,10 +778,10 @@ function Ua(t, e) {
778
778
  }
779
779
  function xd(t) {
780
780
  let e = {
781
- velocity: ct.velocity,
782
- stiffness: ct.stiffness,
783
- damping: ct.damping,
784
- mass: ct.mass,
781
+ velocity: ut.velocity,
782
+ stiffness: ut.stiffness,
783
+ damping: ut.damping,
784
+ mass: ut.mass,
785
785
  isResolvedFromDuration: !1,
786
786
  ...t
787
787
  };
@@ -790,7 +790,7 @@ function xd(t) {
790
790
  const n = t.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, a = 2 * Jt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
791
791
  e = {
792
792
  ...e,
793
- mass: ct.mass,
793
+ mass: ut.mass,
794
794
  stiffness: i,
795
795
  damping: a
796
796
  };
@@ -799,12 +799,12 @@ function xd(t) {
799
799
  e = {
800
800
  ...e,
801
801
  ...n,
802
- mass: ct.mass
802
+ mass: ut.mass
803
803
  }, e.isResolvedFromDuration = !0;
804
804
  }
805
805
  return e;
806
806
  }
807
- function Xn(t = ct.visualDuration, e = ct.bounce) {
807
+ function Xn(t = ut.visualDuration, e = ut.bounce) {
808
808
  const n = typeof t != "object" ? {
809
809
  visualDuration: t,
810
810
  keyframes: [0, 1],
@@ -815,7 +815,7 @@ function Xn(t = ct.visualDuration, e = ct.bounce) {
815
815
  ...n,
816
816
  velocity: -/* @__PURE__ */ Lt(n.velocity || 0)
817
817
  }), m = f || 0, b = d / (2 * Math.sqrt(c * l)), w = s - a, v = /* @__PURE__ */ Lt(Math.sqrt(c / l)), k = Math.abs(w) < 5;
818
- r || (r = k ? ct.restSpeed.granular : ct.restSpeed.default), i || (i = k ? ct.restDelta.granular : ct.restDelta.default);
818
+ r || (r = k ? ut.restSpeed.granular : ut.restSpeed.default), i || (i = k ? ut.restDelta.granular : ut.restDelta.default);
819
819
  let S;
820
820
  if (b < 1) {
821
821
  const P = Zr(v, b);
@@ -927,7 +927,7 @@ function Sd(t, e) {
927
927
  const n = t[t.length - 1];
928
928
  for (let r = 1; r <= e; r++) {
929
929
  const i = /* @__PURE__ */ pn(0, e, r);
930
- t.push(ut(n, 1, i));
930
+ t.push(ft(n, 1, i));
931
931
  }
932
932
  }
933
933
  function Td(t) {
@@ -1723,17 +1723,17 @@ const uh = /\b([a-z-]*)\(.*?\)/gu, li = {
1723
1723
  }, dh = {
1724
1724
  ...ta,
1725
1725
  // Color props
1726
- color: mt,
1727
- backgroundColor: mt,
1728
- outlineColor: mt,
1729
- fill: mt,
1730
- stroke: mt,
1726
+ color: ht,
1727
+ backgroundColor: ht,
1728
+ outlineColor: ht,
1729
+ fill: ht,
1730
+ stroke: ht,
1731
1731
  // Border props
1732
- borderColor: mt,
1733
- borderTopColor: mt,
1734
- borderRightColor: mt,
1735
- borderBottomColor: mt,
1736
- borderLeftColor: mt,
1732
+ borderColor: ht,
1733
+ borderTopColor: ht,
1734
+ borderRightColor: ht,
1735
+ borderBottomColor: ht,
1736
+ borderLeftColor: ht,
1737
1737
  filter: li,
1738
1738
  WebkitFilter: li
1739
1739
  }, bl = (t) => dh[t];
@@ -2125,7 +2125,7 @@ function Cl(t) {
2125
2125
  function Ph(t) {
2126
2126
  return Cl(t) && t.tagName === "svg";
2127
2127
  }
2128
- const St = (t) => !!(t && t.getVelocity), Ch = [...vl, mt, ue], Eh = (t) => Ch.find(yl(t)), ra = Ke({
2128
+ const St = (t) => !!(t && t.getVelocity), Ch = [...vl, ht, ue], Eh = (t) => Ch.find(yl(t)), ra = Ke({
2129
2129
  transformPagePoint: (t) => t,
2130
2130
  isStatic: !1,
2131
2131
  reducedMotion: "never"
@@ -2421,7 +2421,7 @@ const an = {
2421
2421
  return r;
2422
2422
  const a = ue.createTransformer(t), s = typeof i[0] != "number" ? 1 : 0, o = n.x.scale * e.x, c = n.y.scale * e.y;
2423
2423
  i[0 + s] /= o, i[1 + s] /= c;
2424
- const d = ut(o, c, 0.5);
2424
+ const d = ft(o, c, 0.5);
2425
2425
  return typeof i[2 + s] == "number" && (i[2 + s] /= d), typeof i[3 + s] == "number" && (i[3 + s] /= d), a(i);
2426
2426
  }
2427
2427
  }, ci = {
@@ -2891,7 +2891,7 @@ function Oe(t, e) {
2891
2891
  t.min = t.min + e, t.max = t.max + e;
2892
2892
  }
2893
2893
  function us(t, e, n, r, i = 0.5) {
2894
- const a = ut(t.min, t.max, i);
2894
+ const a = ft(t.min, t.max, i);
2895
2895
  fi(t, e, n, a, r);
2896
2896
  }
2897
2897
  function _e(t, e) {
@@ -2912,7 +2912,7 @@ const fs = () => ({
2912
2912
  }), Ve = () => ({
2913
2913
  x: fs(),
2914
2914
  y: fs()
2915
- }), ds = () => ({ min: 0, max: 0 }), pt = () => ({
2915
+ }), ds = () => ({ min: 0, max: 0 }), mt = () => ({
2916
2916
  x: ds(),
2917
2917
  y: ds()
2918
2918
  }), di = { current: null }, Hl = { current: !1 };
@@ -3036,7 +3036,7 @@ class xm {
3036
3036
  * removed with a re-render to work.
3037
3037
  */
3038
3038
  measureViewportBox() {
3039
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : pt();
3039
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : mt();
3040
3040
  }
3041
3041
  getStaticValue(e) {
3042
3042
  return this.latestValues[e];
@@ -3243,7 +3243,7 @@ function Sm(t, e, n, r) {
3243
3243
  }
3244
3244
  class Tm extends Yl {
3245
3245
  constructor() {
3246
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = pt;
3246
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = mt;
3247
3247
  }
3248
3248
  getBaseTargetFromProps(e, n) {
3249
3249
  return e[n];
@@ -3681,7 +3681,7 @@ function np(t, e, n) {
3681
3681
  return Math.abs(t - e) <= n;
3682
3682
  }
3683
3683
  function ps(t, e, n, r = 0.5) {
3684
- t.origin = r, t.originPoint = ut(e.min, e.max, t.origin), t.scale = Pt(n) / Pt(e), t.translate = ut(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Zm && t.scale <= Jm || isNaN(t.scale)) && (t.scale = 1), (t.translate >= tp && t.translate <= ep || isNaN(t.translate)) && (t.translate = 0);
3684
+ t.origin = r, t.originPoint = ft(e.min, e.max, t.origin), t.scale = Pt(n) / Pt(e), t.translate = ft(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Zm && t.scale <= Jm || isNaN(t.scale)) && (t.scale = 1), (t.translate >= tp && t.translate <= ep || isNaN(t.translate)) && (t.translate = 0);
3685
3685
  }
3686
3686
  function fn(t, e, n, r) {
3687
3687
  ps(t.x, e.x, n.x, r ? r.originX : void 0), ps(t.y, e.y, n.y, r ? r.originY : void 0);
@@ -3781,7 +3781,7 @@ function sp(t, e) {
3781
3781
  return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s;
3782
3782
  }
3783
3783
  function op(t, { min: e, max: n }, r) {
3784
- return e !== void 0 && t < e ? t = r ? ut(e, t, r.min) : Math.max(t, e) : n !== void 0 && t > n && (t = r ? ut(n, t, r.max) : Math.min(t, n)), t;
3784
+ return e !== void 0 && t < e ? t = r ? ft(e, t, r.min) : Math.max(t, e) : n !== void 0 && t > n && (t = r ? ft(n, t, r.max) : Math.min(t, n)), t;
3785
3785
  }
3786
3786
  function xs(t, e, n) {
3787
3787
  return {
@@ -3833,7 +3833,7 @@ function Ss(t, e) {
3833
3833
  const hp = /* @__PURE__ */ new WeakMap();
3834
3834
  class mp {
3835
3835
  constructor(e) {
3836
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = pt(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3836
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = mt(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3837
3837
  }
3838
3838
  start(e, { snapToCursor: n = !1, distanceThreshold: r } = {}) {
3839
3839
  const { presenceContext: i } = this.visualElement;
@@ -3991,7 +3991,7 @@ class mp {
3991
3991
  const { projection: i } = this.visualElement, a = this.getAxisMotionValue(n);
3992
3992
  if (i && i.layout) {
3993
3993
  const { min: s, max: o } = i.layout.layoutBox[n];
3994
- a.set(e[n] - ut(s, o, 0.5));
3994
+ a.set(e[n] - ft(s, o, 0.5));
3995
3995
  }
3996
3996
  });
3997
3997
  }
@@ -4020,7 +4020,7 @@ class mp {
4020
4020
  if (!On(s, e, null))
4021
4021
  return;
4022
4022
  const o = this.getAxisMotionValue(s), { min: c, max: d } = this.constraints[s];
4023
- o.set(ut(c, d, i[s]));
4023
+ o.set(ft(c, d, i[s]));
4024
4024
  });
4025
4025
  }
4026
4026
  addListeners() {
@@ -4196,15 +4196,15 @@ function Ap(t, e) {
4196
4196
  }
4197
4197
  const sc = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Sp = sc.length, Ps = (t) => typeof t == "string" ? parseFloat(t) : t, Cs = (t) => typeof t == "number" || X.test(t);
4198
4198
  function Tp(t, e, n, r, i, a) {
4199
- i ? (t.opacity = ut(0, n.opacity ?? 1, Pp(r)), t.opacityExit = ut(e.opacity ?? 1, 0, Cp(r))) : a && (t.opacity = ut(e.opacity ?? 1, n.opacity ?? 1, r));
4199
+ i ? (t.opacity = ft(0, n.opacity ?? 1, Pp(r)), t.opacityExit = ft(e.opacity ?? 1, 0, Cp(r))) : a && (t.opacity = ft(e.opacity ?? 1, n.opacity ?? 1, r));
4200
4200
  for (let s = 0; s < Sp; s++) {
4201
4201
  const o = `border${sc[s]}Radius`;
4202
4202
  let c = Es(e, o), d = Es(n, o);
4203
4203
  if (c === void 0 && d === void 0)
4204
4204
  continue;
4205
- c || (c = 0), d || (d = 0), c === 0 || d === 0 || Cs(c) === Cs(d) ? (t[o] = Math.max(ut(Ps(c), Ps(d), r), 0), (Kt.test(d) || Kt.test(c)) && (t[o] += "%")) : t[o] = d;
4205
+ c || (c = 0), d || (d = 0), c === 0 || d === 0 || Cs(c) === Cs(d) ? (t[o] = Math.max(ft(Ps(c), Ps(d), r), 0), (Kt.test(d) || Kt.test(c)) && (t[o] += "%")) : t[o] = d;
4206
4206
  }
4207
- (e.rotate || n.rotate) && (t.rotate = ut(e.rotate || 0, n.rotate || 0, r));
4207
+ (e.rotate || n.rotate) && (t.rotate = ft(e.rotate || 0, n.rotate || 0, r));
4208
4208
  }
4209
4209
  function Es(t, e) {
4210
4210
  return t[e] !== void 0 ? t[e] : t.borderRadius;
@@ -4226,9 +4226,9 @@ function Ms(t, e, n, r, i) {
4226
4226
  return t -= e, t = Qn(t, 1 / n, r), i !== void 0 && (t = Qn(t, 1 / i, r)), t;
4227
4227
  }
4228
4228
  function Ep(t, e = 0, n = 1, r = 0.5, i, a = t, s = t) {
4229
- if (Kt.test(e) && (e = parseFloat(e), e = ut(s.min, s.max, e / 100) - s.min), typeof e != "number")
4229
+ if (Kt.test(e) && (e = parseFloat(e), e = ft(s.min, s.max, e / 100) - s.min), typeof e != "number")
4230
4230
  return;
4231
- let o = ut(a.min, a.max, r);
4231
+ let o = ft(a.min, a.max, r);
4232
4232
  t === a && (o -= e), t.min = Ms(t.min, e, n, o, i), t.max = Ms(t.max, e, n, o, i);
4233
4233
  }
4234
4234
  function Rs(t, e, [n, r, i], a, s) {
@@ -4489,7 +4489,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4489
4489
  for (let c = 0; c < this.path.length; c++)
4490
4490
  this.path[c].updateScroll();
4491
4491
  const s = this.layout;
4492
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = pt(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4492
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = mt(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4493
4493
  const { visualElement: o } = this.options;
4494
4494
  o && o.notify("LayoutMeasure", this.layout.layoutBox, s ? s.layoutBox : void 0);
4495
4495
  }
@@ -4526,7 +4526,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4526
4526
  measurePageBox() {
4527
4527
  const { visualElement: s } = this.options;
4528
4528
  if (!s)
4529
- return pt();
4529
+ return mt();
4530
4530
  const o = s.measureViewportBox();
4531
4531
  if (!(this.scroll?.wasRoot || this.path.some(Xp))) {
4532
4532
  const { scroll: d } = this.root;
@@ -4535,7 +4535,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4535
4535
  return o;
4536
4536
  }
4537
4537
  removeElementScroll(s) {
4538
- const o = pt();
4538
+ const o = mt();
4539
4539
  if (Vt(o, s), this.scroll?.wasRoot)
4540
4540
  return o;
4541
4541
  for (let c = 0; c < this.path.length; c++) {
@@ -4545,7 +4545,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4545
4545
  return o;
4546
4546
  }
4547
4547
  applyTransform(s, o = !1) {
4548
- const c = pt();
4548
+ const c = mt();
4549
4549
  Vt(c, s);
4550
4550
  for (let d = 0; d < this.path.length; d++) {
4551
4551
  const l = this.path[d];
@@ -4557,14 +4557,14 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4557
4557
  return xe(this.latestValues) && _e(c, this.latestValues), c;
4558
4558
  }
4559
4559
  removeTransform(s) {
4560
- const o = pt();
4560
+ const o = mt();
4561
4561
  Vt(o, s);
4562
4562
  for (let c = 0; c < this.path.length; c++) {
4563
4563
  const d = this.path[c];
4564
4564
  if (!d.instance || !xe(d.latestValues))
4565
4565
  continue;
4566
4566
  ui(d.latestValues) && d.updateSnapshot();
4567
- const l = pt(), u = d.measurePageBox();
4567
+ const l = mt(), u = d.measurePageBox();
4568
4568
  Vt(l, u), Fs(o, d.latestValues, d.snapshot ? d.snapshot.layoutBox : void 0, l);
4569
4569
  }
4570
4570
  return xe(this.latestValues) && Fs(o, this.latestValues), o;
@@ -4596,7 +4596,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4596
4596
  return;
4597
4597
  this.resolvedRelativeTargetAt = vt.timestamp;
4598
4598
  const f = this.getClosestProjectingParent();
4599
- f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = pt(), this.targetWithTransforms = pt()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), rp(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Vt(this.target, this.layout.layoutBox), $l(this.target, this.targetDelta)) : Vt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
4599
+ f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = mt(), this.targetWithTransforms = mt()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), rp(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Vt(this.target, this.layout.layoutBox), $l(this.target, this.targetDelta)) : Vt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
4600
4600
  }
4601
4601
  getClosestProjectingParent() {
4602
4602
  if (!(!this.parent || ui(this.parent.latestValues) || zl(this.parent.latestValues)))
@@ -4606,7 +4606,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4606
4606
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
4607
4607
  }
4608
4608
  createRelativeTarget(s, o, c) {
4609
- this.relativeParent = s, this.linkedParentVersion = s.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = pt(), this.relativeTargetOrigin = pt(), Zn(this.relativeTargetOrigin, o, c), Vt(this.relativeTarget, this.relativeTargetOrigin);
4609
+ this.relativeParent = s, this.linkedParentVersion = s.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = mt(), this.relativeTargetOrigin = mt(), Zn(this.relativeTargetOrigin, o, c), Vt(this.relativeTarget, this.relativeTargetOrigin);
4610
4610
  }
4611
4611
  removeRelativeTarget() {
4612
4612
  this.relativeParent = this.relativeTarget = void 0;
@@ -4621,7 +4621,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4621
4621
  return;
4622
4622
  Vt(this.layoutCorrected, this.layout.layoutBox);
4623
4623
  const u = this.treeScale.x, f = this.treeScale.y;
4624
- pm(this.layoutCorrected, this.treeScale, this.path, o), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = pt());
4624
+ pm(this.layoutCorrected, this.treeScale, this.path, o), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = mt());
4625
4625
  const { target: h } = s;
4626
4626
  if (!h) {
4627
4627
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -4648,12 +4648,12 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4648
4648
  setAnimationOrigin(s, o = !1) {
4649
4649
  const c = this.snapshot, d = c ? c.latestValues : {}, l = { ...this.latestValues }, u = Ve();
4650
4650
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !o;
4651
- const f = pt(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m, w = this.getStack(), v = !w || w.members.length <= 1, k = !!(b && !v && this.options.crossfade === !0 && !this.path.some(Yp));
4651
+ const f = mt(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m, w = this.getStack(), v = !w || w.members.length <= 1, k = !!(b && !v && this.options.crossfade === !0 && !this.path.some(Yp));
4652
4652
  this.animationProgress = 0;
4653
4653
  let S;
4654
4654
  this.mixTargetDelta = (E) => {
4655
4655
  const P = E / 1e3;
4656
- Bs(u.x, s.x, P), Bs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = pt()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P, k, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
4656
+ Bs(u.x, s.x, P), Bs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = mt()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P, k, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
4657
4657
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4658
4658
  }
4659
4659
  startAnimation(s) {
@@ -4686,7 +4686,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4686
4686
  let { targetWithTransforms: o, target: c, layout: d, latestValues: l } = s;
4687
4687
  if (!(!o || !c || !d)) {
4688
4688
  if (this !== s && this.layout && d && dc(this.options.animationType, this.layout.layoutBox, d.layoutBox)) {
4689
- c = this.target || pt();
4689
+ c = this.target || mt();
4690
4690
  const u = Pt(this.layout.layoutBox.x);
4691
4691
  c.x.min = s.target.x.min, c.x.max = c.x.min + u;
4692
4692
  const f = Pt(this.layout.layoutBox.y);
@@ -4816,9 +4816,9 @@ function Op(t) {
4816
4816
  if (l && !l.resumeFrom) {
4817
4817
  const { snapshot: u, layout: f } = l;
4818
4818
  if (u && f) {
4819
- const h = pt();
4819
+ const h = mt();
4820
4820
  Zn(h, e.layoutBox, u.layoutBox);
4821
- const m = pt();
4821
+ const m = mt();
4822
4822
  Zn(m, n, f.layoutBox), cc(h, m) || (d = !0), l.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = h, t.relativeParent = l);
4823
4823
  }
4824
4824
  }
@@ -4872,10 +4872,10 @@ function Wp(t) {
4872
4872
  t.removeLeadSnapshot();
4873
4873
  }
4874
4874
  function Bs(t, e, n) {
4875
- t.translate = ut(e.translate, 0, n), t.scale = ut(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
4875
+ t.translate = ft(e.translate, 0, n), t.scale = ft(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
4876
4876
  }
4877
4877
  function zs(t, e, n, r) {
4878
- t.min = ut(e.min, n.min, r), t.max = ut(e.max, n.max, r);
4878
+ t.min = ft(e.min, n.min, r), t.max = ft(e.max, n.max, r);
4879
4879
  }
4880
4880
  function Hp(t, e, n, r) {
4881
4881
  zs(t.x, e.x, n.x, r), zs(t.y, e.y, n.y, r);
@@ -9870,54 +9870,54 @@ const Nt = (function() {
9870
9870
  const F = M[0], C = M[1], O = M[2], x = M[3], g = M[4], _ = M[5];
9871
9871
  let j = 6, U = 8, D = 255;
9872
9872
  for (var N = 0; N < p.length; N++) {
9873
- const yt = new Uint8Array(p[N]);
9874
- for (var $ = yt.length, B = 0; B < $; B += 4) D &= yt[B + 3];
9873
+ const gt = new Uint8Array(p[N]);
9874
+ for (var $ = gt.length, B = 0; B < $; B += 4) D &= gt[B + 3];
9875
9875
  }
9876
- const V = D != 255, K = (function(it, et, ft, rt, dt, It) {
9877
- const ht = [];
9876
+ const V = D != 255, K = (function(it, rt, ct, yt, et, It) {
9877
+ const dt = [];
9878
9878
  for (var at = 0; at < it.length; at++) {
9879
9879
  const Tt = new Uint8Array(it[at]), _t = new Uint32Array(Tt.buffer);
9880
9880
  var Mt;
9881
- let Ft = 0, qt = 0, Wt = et, ge = ft, Sr = rt ? 1 : 0;
9881
+ let Ft = 0, qt = 0, Wt = rt, ge = ct, Sr = yt ? 1 : 0;
9882
9882
  if (at != 0) {
9883
- const ju = It || rt || at == 1 || ht[at - 2].dispose != 0 ? 1 : 2;
9883
+ const ju = It || yt || at == 1 || dt[at - 2].dispose != 0 ? 1 : 2;
9884
9884
  let Tr = 0, Ea = 1e9;
9885
9885
  for (let tn = 0; tn < ju; tn++) {
9886
9886
  var ae = new Uint8Array(it[at - 1 - tn]);
9887
9887
  const Lu = new Uint32Array(it[at - 1 - tn]);
9888
- let se = et, oe = ft, Me = -1, en = -1;
9889
- for (let ye = 0; ye < ft; ye++) for (let ve = 0; ve < et; ve++)
9890
- _t[xt = ye * et + ve] != Lu[xt] && (ve < se && (se = ve), ve > Me && (Me = ve), ye < oe && (oe = ye), ye > en && (en = ye));
9891
- Me == -1 && (se = oe = Me = en = 0), dt && ((1 & se) == 1 && se--, (1 & oe) == 1 && oe--);
9888
+ let se = rt, oe = ct, Me = -1, en = -1;
9889
+ for (let ye = 0; ye < ct; ye++) for (let ve = 0; ve < rt; ve++)
9890
+ _t[xt = ye * rt + ve] != Lu[xt] && (ve < se && (se = ve), ve > Me && (Me = ve), ye < oe && (oe = ye), ye > en && (en = ye));
9891
+ Me == -1 && (se = oe = Me = en = 0), et && ((1 & se) == 1 && se--, (1 & oe) == 1 && oe--);
9892
9892
  const ka = (Me - se + 1) * (en - oe + 1);
9893
9893
  ka < Ea && (Ea = ka, Tr = tn, Ft = se, qt = oe, Wt = Me - se + 1, ge = en - oe + 1);
9894
9894
  }
9895
- ae = new Uint8Array(it[at - 1 - Tr]), Tr == 1 && (ht[at - 1].dispose = 2), Mt = new Uint8Array(Wt * ge * 4), t(ae, et, ft, Mt, Wt, ge, -Ft, -qt, 0), Sr = t(Tt, et, ft, Mt, Wt, ge, -Ft, -qt, 3) ? 1 : 0, Sr == 1 ? f(Tt, et, ft, Mt, { x: Ft, y: qt, width: Wt, height: ge }) : t(Tt, et, ft, Mt, Wt, ge, -Ft, -qt, 0);
9895
+ ae = new Uint8Array(it[at - 1 - Tr]), Tr == 1 && (dt[at - 1].dispose = 2), Mt = new Uint8Array(Wt * ge * 4), t(ae, rt, ct, Mt, Wt, ge, -Ft, -qt, 0), Sr = t(Tt, rt, ct, Mt, Wt, ge, -Ft, -qt, 3) ? 1 : 0, Sr == 1 ? f(Tt, rt, ct, Mt, { x: Ft, y: qt, width: Wt, height: ge }) : t(Tt, rt, ct, Mt, Wt, ge, -Ft, -qt, 0);
9896
9896
  } else Mt = Tt.slice(0);
9897
- ht.push({ rect: { x: Ft, y: qt, width: Wt, height: ge }, img: Mt, blend: Sr, dispose: 0 });
9897
+ dt.push({ rect: { x: Ft, y: qt, width: Wt, height: ge }, img: Mt, blend: Sr, dispose: 0 });
9898
9898
  }
9899
- if (rt) for (at = 0; at < ht.length; at++) {
9900
- if ((pe = ht[at]).blend == 1) continue;
9901
- const Tt = pe.rect, _t = ht[at - 1].rect, Ft = Math.min(Tt.x, _t.x), qt = Math.min(Tt.y, _t.y), Wt = { x: Ft, y: qt, width: Math.max(Tt.x + Tt.width, _t.x + _t.width) - Ft, height: Math.max(Tt.y + Tt.height, _t.y + _t.height) - qt };
9902
- ht[at - 1].dispose = 1, at - 1 != 0 && u(it, et, ft, ht, at - 1, Wt, dt), u(it, et, ft, ht, at, Wt, dt);
9899
+ if (yt) for (at = 0; at < dt.length; at++) {
9900
+ if ((pe = dt[at]).blend == 1) continue;
9901
+ const Tt = pe.rect, _t = dt[at - 1].rect, Ft = Math.min(Tt.x, _t.x), qt = Math.min(Tt.y, _t.y), Wt = { x: Ft, y: qt, width: Math.max(Tt.x + Tt.width, _t.x + _t.width) - Ft, height: Math.max(Tt.y + Tt.height, _t.y + _t.height) - qt };
9902
+ dt[at - 1].dispose = 1, at - 1 != 0 && u(it, rt, ct, dt, at - 1, Wt, et), u(it, rt, ct, dt, at, Wt, et);
9903
9903
  }
9904
9904
  let In = 0;
9905
- if (it.length != 1) for (var xt = 0; xt < ht.length; xt++) {
9905
+ if (it.length != 1) for (var xt = 0; xt < dt.length; xt++) {
9906
9906
  var pe;
9907
- In += (pe = ht[xt]).rect.width * pe.rect.height;
9907
+ In += (pe = dt[xt]).rect.width * pe.rect.height;
9908
9908
  }
9909
- return ht;
9909
+ return dt;
9910
9910
  })(p, y, T, F, C, O), q = {}, J = [], tt = [];
9911
9911
  if (I != 0) {
9912
- const yt = [];
9913
- for (B = 0; B < K.length; B++) yt.push(K[B].img.buffer);
9914
- const it = (function(dt) {
9912
+ const gt = [];
9913
+ for (B = 0; B < K.length; B++) gt.push(K[B].img.buffer);
9914
+ const it = (function(et) {
9915
9915
  let It = 0;
9916
- for (var ht = 0; ht < dt.length; ht++) It += dt[ht].byteLength;
9916
+ for (var dt = 0; dt < et.length; dt++) It += et[dt].byteLength;
9917
9917
  const at = new Uint8Array(It);
9918
9918
  let Mt = 0;
9919
- for (ht = 0; ht < dt.length; ht++) {
9920
- const ae = new Uint8Array(dt[ht]), In = ae.length;
9919
+ for (dt = 0; dt < et.length; dt++) {
9920
+ const ae = new Uint8Array(et[dt]), In = ae.length;
9921
9921
  for (let xt = 0; xt < In; xt += 4) {
9922
9922
  let pe = ae[xt], Tt = ae[xt + 1], _t = ae[xt + 2];
9923
9923
  const Ft = ae[xt + 3];
@@ -9926,61 +9926,61 @@ const Nt = (function() {
9926
9926
  Mt += In;
9927
9927
  }
9928
9928
  return at.buffer;
9929
- })(yt), et = b(it, I);
9930
- for (B = 0; B < et.plte.length; B++) J.push(et.plte[B].est.rgba);
9931
- let ft = 0;
9929
+ })(gt), rt = b(it, I);
9930
+ for (B = 0; B < rt.plte.length; B++) J.push(rt.plte[B].est.rgba);
9931
+ let ct = 0;
9932
9932
  for (B = 0; B < K.length; B++) {
9933
- const rt = (Y = K[B]).img.length;
9934
- var W = new Uint8Array(et.inds.buffer, ft >> 2, rt >> 2);
9933
+ const yt = (Y = K[B]).img.length;
9934
+ var W = new Uint8Array(rt.inds.buffer, ct >> 2, yt >> 2);
9935
9935
  tt.push(W);
9936
- const dt = new Uint8Array(et.abuf, ft, rt);
9937
- _ && o(Y.img, Y.rect.width, Y.rect.height, J, dt, W), Y.img.set(dt), ft += rt;
9936
+ const et = new Uint8Array(rt.abuf, ct, yt);
9937
+ _ && o(Y.img, Y.rect.width, Y.rect.height, J, et, W), Y.img.set(et), ct += yt;
9938
9938
  }
9939
9939
  } else for (N = 0; N < K.length; N++) {
9940
9940
  var Y = K[N];
9941
- const yt = new Uint32Array(Y.img.buffer);
9941
+ const gt = new Uint32Array(Y.img.buffer);
9942
9942
  var H = Y.rect.width;
9943
- for ($ = yt.length, W = new Uint8Array($), tt.push(W), B = 0; B < $; B++) {
9944
- const it = yt[B];
9945
- if (B != 0 && it == yt[B - 1]) W[B] = W[B - 1];
9946
- else if (B > H && it == yt[B - H]) W[B] = W[B - H];
9943
+ for ($ = gt.length, W = new Uint8Array($), tt.push(W), B = 0; B < $; B++) {
9944
+ const it = gt[B];
9945
+ if (B != 0 && it == gt[B - 1]) W[B] = W[B - 1];
9946
+ else if (B > H && it == gt[B - H]) W[B] = W[B - H];
9947
9947
  else {
9948
- let et = q[it];
9949
- if (et == null && (q[it] = et = J.length, J.push(it), J.length >= 300)) break;
9950
- W[B] = et;
9948
+ let rt = q[it];
9949
+ if (rt == null && (q[it] = rt = J.length, J.push(it), J.length >= 300)) break;
9950
+ W[B] = rt;
9951
9951
  }
9952
9952
  }
9953
9953
  }
9954
9954
  const Z = J.length;
9955
9955
  for (Z <= 256 && g == 0 && (U = Z <= 2 ? 1 : Z <= 4 ? 2 : Z <= 16 ? 4 : 8, U = Math.max(U, x)), N = 0; N < K.length; N++) {
9956
9956
  (Y = K[N]).rect.x, Y.rect.y, H = Y.rect.width;
9957
- const yt = Y.rect.height;
9957
+ const gt = Y.rect.height;
9958
9958
  let it = Y.img;
9959
9959
  new Uint32Array(it.buffer);
9960
- let et = 4 * H, ft = 4;
9960
+ let rt = 4 * H, ct = 4;
9961
9961
  if (Z <= 256 && g == 0) {
9962
- et = Math.ceil(U * H / 8);
9963
- var gt = new Uint8Array(et * yt);
9964
- const rt = tt[N];
9965
- for (let dt = 0; dt < yt; dt++) {
9966
- B = dt * et;
9967
- const It = dt * H;
9968
- if (U == 8) for (var ot = 0; ot < H; ot++) gt[B + ot] = rt[It + ot];
9969
- else if (U == 4) for (ot = 0; ot < H; ot++) gt[B + (ot >> 1)] |= rt[It + ot] << 4 - 4 * (1 & ot);
9970
- else if (U == 2) for (ot = 0; ot < H; ot++) gt[B + (ot >> 2)] |= rt[It + ot] << 6 - 2 * (3 & ot);
9971
- else if (U == 1) for (ot = 0; ot < H; ot++) gt[B + (ot >> 3)] |= rt[It + ot] << 7 - 1 * (7 & ot);
9962
+ rt = Math.ceil(U * H / 8);
9963
+ var pt = new Uint8Array(rt * gt);
9964
+ const yt = tt[N];
9965
+ for (let et = 0; et < gt; et++) {
9966
+ B = et * rt;
9967
+ const It = et * H;
9968
+ if (U == 8) for (var ot = 0; ot < H; ot++) pt[B + ot] = yt[It + ot];
9969
+ else if (U == 4) for (ot = 0; ot < H; ot++) pt[B + (ot >> 1)] |= yt[It + ot] << 4 - 4 * (1 & ot);
9970
+ else if (U == 2) for (ot = 0; ot < H; ot++) pt[B + (ot >> 2)] |= yt[It + ot] << 6 - 2 * (3 & ot);
9971
+ else if (U == 1) for (ot = 0; ot < H; ot++) pt[B + (ot >> 3)] |= yt[It + ot] << 7 - 1 * (7 & ot);
9972
9972
  }
9973
- it = gt, j = 3, ft = 1;
9973
+ it = pt, j = 3, ct = 1;
9974
9974
  } else if (V == 0 && K.length == 1) {
9975
- gt = new Uint8Array(H * yt * 3);
9976
- const rt = H * yt;
9977
- for (B = 0; B < rt; B++) {
9978
- const dt = 3 * B, It = 4 * B;
9979
- gt[dt] = it[It], gt[dt + 1] = it[It + 1], gt[dt + 2] = it[It + 2];
9975
+ pt = new Uint8Array(H * gt * 3);
9976
+ const yt = H * gt;
9977
+ for (B = 0; B < yt; B++) {
9978
+ const et = 3 * B, It = 4 * B;
9979
+ pt[et] = it[It], pt[et + 1] = it[It + 1], pt[et + 2] = it[It + 2];
9980
9980
  }
9981
- it = gt, j = 2, ft = 3, et = 3 * H;
9981
+ it = pt, j = 2, ct = 3, rt = 3 * H;
9982
9982
  }
9983
- Y.img = it, Y.bpl = et, Y.bpp = ft;
9983
+ Y.img = it, Y.bpl = rt, Y.bpp = ct;
9984
9984
  }
9985
9985
  return { ctype: j, depth: U, plte: J, frames: K };
9986
9986
  }
@@ -11517,8 +11517,8 @@ function kv({
11517
11517
  const H = await Promise.all(
11518
11518
  Y.map(async (Z) => {
11519
11519
  if (Z.type === "image" && Z.file) {
11520
- const gt = await $u(Z);
11521
- return { ...Z, content: gt, file: void 0 };
11520
+ const pt = await $u(Z);
11521
+ return { ...Z, content: pt, file: void 0 };
11522
11522
  }
11523
11523
  return Z;
11524
11524
  })
@@ -11622,7 +11622,7 @@ function kv({
11622
11622
  o((H) => Xu(H, W, Y));
11623
11623
  }, C = ({ imageBlockId: W, src: Y, alt: H, caption: Z }) => {
11624
11624
  o(
11625
- (gt) => Ku(gt, W, Y, H, Z)
11625
+ (pt) => Ku(pt, W, Y, H, Z)
11626
11626
  );
11627
11627
  }, O = ({ videoBlockId: W, src: Y, provider: H }) => {
11628
11628
  o((Z) => Gu(Z, W, Y, H));
@@ -11637,8 +11637,8 @@ function kv({
11637
11637
  (Y.type === "image" || Y.type === "video") && Y.data.src !== "" || o((H) => H.filter((Z) => Z.id !== W));
11638
11638
  }, U = (W, Y) => {
11639
11639
  o((H) => {
11640
- const Z = [...H], [gt] = Z.splice(W, 1);
11641
- return Z.splice(Y, 0, gt), Z;
11640
+ const Z = [...H], [pt] = Z.splice(W, 1);
11641
+ return Z.splice(Y, 0, pt), Z;
11642
11642
  });
11643
11643
  };
11644
11644
  return {
@@ -11848,56 +11848,58 @@ function Qv({
11848
11848
  // draftify container background set
11849
11849
  DraftifyBackground: m,
11850
11850
  // font styling
11851
- fontFamily: b = null
11851
+ fontFamily: b = null,
11852
+ // enable toolbar
11853
+ ToolBarEnable: w
11852
11854
  }) {
11853
11855
  const {
11854
11856
  // current view
11855
- view: w,
11856
- setView: v,
11857
+ view: v,
11858
+ setView: k,
11857
11859
  // background grid
11858
- gridDots: k,
11859
- setGridDots: S,
11860
+ gridDots: S,
11861
+ setGridDots: E,
11860
11862
  // document metadata
11861
- docTitle: E,
11862
- setDocTitle: P,
11863
- description: A,
11864
- setDescription: L,
11865
- author: p,
11866
- setAuthor: y,
11863
+ docTitle: P,
11864
+ setDocTitle: A,
11865
+ description: L,
11866
+ setDescription: p,
11867
+ author: y,
11868
+ setAuthor: T,
11867
11869
  // copy blocks
11868
- handleCopy: T,
11870
+ handleCopy: I,
11869
11871
  // prompt handlers
11870
- handlePromptAction: I,
11871
- promptAction: M,
11872
- setPromptAction: F,
11873
- promptVisibility: C,
11874
- setPromptVisiblility: O,
11872
+ handlePromptAction: M,
11873
+ promptAction: F,
11874
+ setPromptAction: C,
11875
+ promptVisibility: O,
11876
+ setPromptVisiblility: x,
11875
11877
  // block creator
11876
- handleClick: x,
11878
+ handleClick: g,
11877
11879
  // block modifiers
11878
- modifyHeading: g,
11879
- modifySubheading: _,
11880
- modifyParagraph: j,
11881
- modifyQuote: U,
11882
- modifyList: D,
11883
- modifyTable: N,
11884
- modifyImage: $,
11885
- modifyVideo: B,
11886
- modifyLink: V,
11887
- modifyCode: K,
11888
- modifyCustom: q,
11880
+ modifyHeading: _,
11881
+ modifySubheading: j,
11882
+ modifyParagraph: U,
11883
+ modifyQuote: D,
11884
+ modifyList: N,
11885
+ modifyTable: $,
11886
+ modifyImage: B,
11887
+ modifyVideo: V,
11888
+ modifyLink: K,
11889
+ modifyCode: q,
11890
+ modifyCustom: J,
11889
11891
  // drag and drop handlers
11890
- onDropHandler: J,
11891
- onDragStart: tt,
11892
- onDragEnd: W,
11893
- onDragEnter: Y,
11894
- onDragLeave: H,
11895
- containerVariants: Z,
11896
- itemVariants: gt,
11897
- transitions: ot,
11898
- whileHover: yt,
11892
+ onDropHandler: tt,
11893
+ onDragStart: W,
11894
+ onDragEnd: Y,
11895
+ onDragEnter: H,
11896
+ onDragLeave: Z,
11897
+ containerVariants: pt,
11898
+ itemVariants: ot,
11899
+ transitions: gt,
11900
+ whileHover: it,
11899
11901
  // block delete
11900
- handleDelete: it
11902
+ handleDelete: rt
11901
11903
  } = kv({
11902
11904
  draftifyDoc: t,
11903
11905
  setDoc: e,
@@ -11906,8 +11908,8 @@ function Qv({
11906
11908
  defaultCustomData3: u,
11907
11909
  localStorageEnable: f
11908
11910
  });
11909
- return Iv(S), /* @__PURE__ */ R.jsxs("div", { className: "draftify-root", children: [
11910
- h && /* @__PURE__ */ R.jsx(Cv, { gridDots: k }),
11911
+ return Iv(E), /* @__PURE__ */ R.jsxs("div", { className: "draftify-root", children: [
11912
+ h && /* @__PURE__ */ R.jsx(Cv, { gridDots: S }),
11911
11913
  /* @__PURE__ */ R.jsxs(
11912
11914
  "div",
11913
11915
  {
@@ -11917,55 +11919,55 @@ function Qv({
11917
11919
  },
11918
11920
  className: "draftify-container",
11919
11921
  children: [
11920
- C && /* @__PURE__ */ R.jsx(
11922
+ O && /* @__PURE__ */ R.jsx(
11921
11923
  Ev,
11922
11924
  {
11923
- docTitle: E,
11924
- setDocTitle: P,
11925
- description: A,
11926
- setDescription: L,
11927
- author: p,
11928
- setAuthor: y,
11929
- promptAction: M,
11930
- handlePromptAction: I,
11931
- setPromptVisiblility: O
11925
+ docTitle: P,
11926
+ setDocTitle: A,
11927
+ description: L,
11928
+ setDescription: p,
11929
+ author: y,
11930
+ setAuthor: T,
11931
+ promptAction: F,
11932
+ handlePromptAction: M,
11933
+ setPromptVisiblility: x
11932
11934
  }
11933
11935
  ),
11934
- /* @__PURE__ */ R.jsx(
11936
+ w && /* @__PURE__ */ R.jsx(
11935
11937
  Tv,
11936
11938
  {
11937
- view: w,
11938
- setView: v,
11939
+ view: v,
11940
+ setView: k,
11939
11941
  blocksData: t.blocks,
11940
- setPromptAction: F,
11941
- setPromptVisiblility: O,
11942
- handleCopy: T
11942
+ setPromptAction: C,
11943
+ setPromptVisiblility: x,
11944
+ handleCopy: I
11943
11945
  }
11944
11946
  ),
11945
- w === "editor" && // Input View
11947
+ v === "editor" && // Input View
11946
11948
  /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
11947
- /* @__PURE__ */ R.jsx(Av, { handleClick: x, options: n }),
11948
- /* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (et) => et.preventDefault(), children: /* @__PURE__ */ R.jsx(
11949
+ /* @__PURE__ */ R.jsx(Av, { handleClick: g, options: n }),
11950
+ /* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (ct) => ct.preventDefault(), children: /* @__PURE__ */ R.jsx(
11949
11951
  Ks.div,
11950
11952
  {
11951
11953
  style: { display: "grid", gap: "10px" },
11952
- variants: Z,
11954
+ variants: pt,
11953
11955
  animate: "show",
11954
11956
  exit: "hidden",
11955
- children: /* @__PURE__ */ R.jsx(jh, { children: t.blocks.map((et, ft) => /* @__PURE__ */ R.jsxs(
11957
+ children: /* @__PURE__ */ R.jsx(jh, { children: t.blocks.map((ct, yt) => /* @__PURE__ */ R.jsxs(
11956
11958
  Ks.div,
11957
11959
  {
11958
11960
  layout: !0,
11959
- variants: gt,
11960
- transition: ot,
11961
- whileHover: yt,
11961
+ variants: ot,
11962
+ transition: gt,
11963
+ whileHover: it,
11962
11964
  draggable: !0,
11963
- onDragStart: (rt) => tt(rt, ft),
11964
- onDragEnd: (rt) => W(rt),
11965
- onDragOver: (rt) => rt.preventDefault(),
11966
- onDragEnter: (rt) => Y(rt),
11967
- onDragLeave: (rt) => H(rt),
11968
- onDrop: (rt) => J(rt, ft),
11965
+ onDragStart: (et) => W(et, yt),
11966
+ onDragEnd: (et) => Y(et),
11967
+ onDragOver: (et) => et.preventDefault(),
11968
+ onDragEnter: (et) => H(et),
11969
+ onDragLeave: (et) => Z(et),
11970
+ onDrop: (et) => tt(et, yt),
11969
11971
  className: "block-container",
11970
11972
  children: [
11971
11973
  /* @__PURE__ */ R.jsx(Pv, {}),
@@ -11973,18 +11975,18 @@ function Qv({
11973
11975
  wv,
11974
11976
  {
11975
11977
  fontFamily: b,
11976
- block: et,
11977
- modifyHeading: g,
11978
- modifySubheading: _,
11979
- modifyParagraph: j,
11980
- modifyQuote: U,
11981
- modifyList: D,
11982
- modifyTable: N,
11983
- modifyImage: $,
11984
- modifyVideo: B,
11985
- modifyLink: V,
11986
- modifyCode: K,
11987
- modifyCustom: q,
11978
+ block: ct,
11979
+ modifyHeading: _,
11980
+ modifySubheading: j,
11981
+ modifyParagraph: U,
11982
+ modifyQuote: D,
11983
+ modifyList: N,
11984
+ modifyTable: $,
11985
+ modifyImage: B,
11986
+ modifyVideo: V,
11987
+ modifyLink: K,
11988
+ modifyCode: q,
11989
+ modifyCustom: J,
11988
11990
  CustomEditor1: r,
11989
11991
  CustomEditor2: i,
11990
11992
  CustomEditor3: a
@@ -11995,17 +11997,17 @@ function Qv({
11995
11997
  {
11996
11998
  icon: ["fas", "trash"],
11997
11999
  className: "delete-icon",
11998
- onClick: () => it(et.id)
12000
+ onClick: () => rt(ct.id)
11999
12001
  }
12000
12002
  )
12001
12003
  ]
12002
12004
  },
12003
- et.id
12005
+ ct.id
12004
12006
  )) })
12005
12007
  }
12006
12008
  ) })
12007
12009
  ] }),
12008
- w === "preview" && /* @__PURE__ */ R.jsx("div", { className: "output-area", children: /* @__PURE__ */ R.jsx(
12010
+ v === "preview" && /* @__PURE__ */ R.jsx("div", { className: "output-area", children: /* @__PURE__ */ R.jsx(
12009
12011
  Sv,
12010
12012
  {
12011
12013
  fontFamily: b,
@@ -12015,7 +12017,13 @@ function Qv({
12015
12017
  CustomOutput3: c
12016
12018
  }
12017
12019
  ) }),
12018
- /* @__PURE__ */ R.jsx("em", { style: { fontSize: "11px", fontWeight: "semibold", color: "blue" }, children: "The document title, description and author can be added when exporting or downloading." })
12020
+ w && /* @__PURE__ */ R.jsx(
12021
+ "em",
12022
+ {
12023
+ style: { fontSize: "11px", fontWeight: "semibold", color: "blue" },
12024
+ children: "The document title, description and author can be added when exporting or downloading."
12025
+ }
12026
+ )
12019
12027
  ]
12020
12028
  }
12021
12029
  )