pixedi 1.2.0 → 1.2.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.
package/dist/lib/index.js CHANGED
@@ -106,7 +106,7 @@ var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
106
106
  return Error("react-stack-top-frame");
107
107
  }
108
108
  function s(e) {
109
- if (re.call(e, "key")) {
109
+ if (O.call(e, "key")) {
110
110
  var t = Object.getOwnPropertyDescriptor(e, "key").get;
111
111
  if (t && t.isReactWarning) return !1;
112
112
  }
@@ -114,7 +114,7 @@ var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
114
114
  }
115
115
  function c(e, t) {
116
116
  function n() {
117
- ae || (ae = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
117
+ ie || (ie = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
118
118
  }
119
119
  n.isReactWarning = !0, Object.defineProperty(e, "key", {
120
120
  get: n,
@@ -123,7 +123,7 @@ var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
123
123
  }
124
124
  function u() {
125
125
  var e = t(this.type);
126
- return oe[e] || (oe[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
126
+ return ae[e] || (ae[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
127
127
  }
128
128
  function d(e, t, n, r, i, a) {
129
129
  var o = n.ref;
@@ -163,17 +163,17 @@ var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
163
163
  }
164
164
  function f(e, n, i, o, l, u) {
165
165
  var f = n.children;
166
- if (f !== void 0) if (o) if (ie(f)) {
166
+ if (f !== void 0) if (o) if (re(f)) {
167
167
  for (o = 0; o < f.length; o++) p(f[o]);
168
168
  Object.freeze && Object.freeze(f);
169
169
  } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
170
170
  else p(f);
171
- if (re.call(n, "key")) {
171
+ if (O.call(n, "key")) {
172
172
  f = t(e);
173
173
  var m = Object.keys(n).filter(function(e) {
174
174
  return e !== "key";
175
175
  });
176
- o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", k[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), k[f + o] = !0);
176
+ o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ce[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), ce[f + o] = !0);
177
177
  }
178
178
  if (f = null, i !== void 0 && (r(i), f = "" + i), s(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
179
179
  else i = n;
@@ -185,19 +185,19 @@ var c = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
185
185
  function m(e) {
186
186
  return typeof e == "object" && !!e && e.$$typeof === g;
187
187
  }
188
- var h = l("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), D = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, re = Object.prototype.hasOwnProperty, ie = Array.isArray, O = console.createTask ? console.createTask : function() {
188
+ var h = l("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), D = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, re = Array.isArray, k = console.createTask ? console.createTask : function() {
189
189
  return null;
190
190
  };
191
191
  h = { react_stack_bottom_frame: function(e) {
192
192
  return e();
193
193
  } };
194
- var ae, oe = {}, se = h.react_stack_bottom_frame.bind(h, o)(), ce = O(i(o)), k = {};
194
+ var ie, ae = {}, oe = h.react_stack_bottom_frame.bind(h, o)(), se = k(i(o)), ce = {};
195
195
  e.Fragment = v, e.jsx = function(e, t, n) {
196
196
  var r = 1e4 > D.recentlyCreatedOwnerStacks++;
197
- return f(e, t, n, !1, r ? Error("react-stack-top-frame") : se, r ? O(i(e)) : ce);
197
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : oe, r ? k(i(e)) : se);
198
198
  }, e.jsxs = function(e, t, n) {
199
199
  var r = 1e4 > D.recentlyCreatedOwnerStacks++;
200
- return f(e, t, n, !0, r ? Error("react-stack-top-frame") : se, r ? O(i(e)) : ce);
200
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : oe, r ? k(i(e)) : se);
201
201
  };
202
202
  })();
203
203
  })), h = (/* @__PURE__ */ c(((e, t) => {
@@ -391,19 +391,19 @@ var T = {
391
391
  ...T,
392
392
  ...e,
393
393
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "m12 19-7-7 7-7" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "M19 12H5" })]
394
- }), re = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
394
+ }), O = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
395
395
  ...T,
396
396
  ...e,
397
397
  children: /* @__PURE__ */ (0, h.jsx)("path", { d: "m6 9 6 6 6-6" })
398
- }), ie = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
398
+ }), re = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
399
399
  ...T,
400
400
  ...e,
401
401
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M3 7v6h6" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })]
402
- }), O = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
402
+ }), k = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
403
403
  ...T,
404
404
  ...e,
405
405
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M21 7v6h-6" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })]
406
- }), ae = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
406
+ }), ie = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
407
407
  ...T,
408
408
  ...e,
409
409
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }), /* @__PURE__ */ (0, h.jsx)("circle", {
@@ -411,11 +411,11 @@ var T = {
411
411
  cy: "12",
412
412
  r: "3"
413
413
  })]
414
- }), oe = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
414
+ }), ae = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
415
415
  ...T,
416
416
  ...e,
417
417
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M6 2v14a2 2 0 0 0 2 2h14" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "M18 22V8a2 2 0 0 0-2-2H2" })]
418
- }), se = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
418
+ }), oe = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
419
419
  ...T,
420
420
  ...e,
421
421
  children: [
@@ -434,7 +434,7 @@ var T = {
434
434
  }),
435
435
  /* @__PURE__ */ (0, h.jsx)("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
436
436
  ]
437
- }), ce = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
437
+ }), se = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
438
438
  ...T,
439
439
  ...e,
440
440
  children: /* @__PURE__ */ (0, h.jsx)("rect", {
@@ -444,7 +444,7 @@ var T = {
444
444
  y: "3",
445
445
  rx: "2"
446
446
  })
447
- }), k = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
447
+ }), ce = (e) => /* @__PURE__ */ (0, h.jsxs)("svg", {
448
448
  ...T,
449
449
  ...e,
450
450
  children: [
@@ -490,7 +490,7 @@ var T = {
490
490
  ...T,
491
491
  ...e,
492
492
  children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "M3 3v5h5" })]
493
- }), A = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
493
+ }), pe = (e) => /* @__PURE__ */ (0, h.jsx)("svg", {
494
494
  ...T,
495
495
  ...e,
496
496
  children: /* @__PURE__ */ (0, h.jsx)("path", {
@@ -505,22 +505,22 @@ var T = {
505
505
  repeatCount: "indefinite"
506
506
  })
507
507
  })
508
- }), j = () => {
508
+ }), A = () => {
509
509
  let e = n(f);
510
510
  if (!e) throw Error("usePixediContext must be used within an PixediProvider");
511
511
  return e;
512
- }, M = {
512
+ }, j = {
513
513
  button: "_button_snd36_1",
514
514
  default: "_default_snd36_32",
515
515
  outline: "_outline_snd36_39",
516
516
  ghost: "_ghost_snd36_47",
517
517
  rect: "_rect_snd36_54"
518
- }, N = ({ className: e = "", variant: t = "default", children: n, ref: r, ...i }) => /* @__PURE__ */ (0, h.jsx)("button", {
518
+ }, M = ({ className: e = "", variant: t = "default", children: n, ref: r, ...i }) => /* @__PURE__ */ (0, h.jsx)("button", {
519
519
  ref: r,
520
- className: `${M.button} ${M[t]} ${e}`.trim(),
520
+ className: `${j.button} ${j[t]} ${e}`.trim(),
521
521
  ...i,
522
522
  children: n
523
- }), P = {
523
+ }), N = {
524
524
  root: "_root_kw2xl_8",
525
525
  textRed: "_textRed_kw2xl_73",
526
526
  bgRed: "_bgRed_kw2xl_76",
@@ -533,14 +533,14 @@ var T = {
533
533
  wrapper: "_wrapper_kw2xl_105",
534
534
  main: "_main_kw2xl_111",
535
535
  grid: "_grid_kw2xl_119"
536
- }, pe = { button: "_button_gf7m5_1" }, me = ({ className: e = "", active: t = !1, icon: n, label: r, ref: i, ...a }) => /* @__PURE__ */ (0, h.jsxs)("button", {
536
+ }, me = { button: "_button_gf7m5_1" }, P = ({ className: e = "", active: t = !1, icon: n, label: r, ref: i, ...a }) => /* @__PURE__ */ (0, h.jsxs)("button", {
537
537
  ref: i,
538
538
  type: "button",
539
539
  "aria-pressed": t,
540
- className: `${pe.button} ${e}`.trim(),
540
+ className: `${me.button} ${e}`.trim(),
541
541
  ...a,
542
542
  children: [n, /* @__PURE__ */ (0, h.jsx)("span", {
543
- className: P.semibold,
543
+ className: N.semibold,
544
544
  children: r
545
545
  })]
546
546
  }), he = { separator: "_separator_rqskq_1" }, F = t(({ className: e = "", orientation: t = "horizontal", ...n }, r) => /* @__PURE__ */ (0, h.jsx)("hr", {
@@ -579,7 +579,7 @@ var I = {
579
579
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
580
580
  }, []), i(() => {
581
581
  if (!d || !m.current || !g.current) return;
582
- let e = p.current?.closest(`.${P.main}`)?.getBoundingClientRect(), t = m.current.getBoundingClientRect(), n = g.current.getBoundingClientRect(), r = (e?.bottom ?? window.innerHeight) - 16, i = t.bottom + n.height + 4, a = "calc(100% + 4px)";
582
+ let e = p.current?.closest(`.${N.main}`)?.getBoundingClientRect(), t = m.current.getBoundingClientRect(), n = g.current.getBoundingClientRect(), r = (e?.bottom ?? window.innerHeight) - 16, i = t.bottom + n.height + 4, a = "calc(100% + 4px)";
583
583
  i > r && (a = `calc(100% + 4px - ${i - r}px)`), g.current.style.top = a;
584
584
  }, [d, e]);
585
585
  let v = (e) => {
@@ -594,12 +594,12 @@ var I = {
594
594
  type: "button",
595
595
  className: I.trigger,
596
596
  onClick: () => f(!d),
597
- children: [/* @__PURE__ */ (0, h.jsx)("span", { children: _ ? _.fullName : c }), /* @__PURE__ */ (0, h.jsx)(re, { className: I.triggerArrow })]
597
+ children: [/* @__PURE__ */ (0, h.jsx)("span", { children: _ ? _.fullName : c }), /* @__PURE__ */ (0, h.jsx)(O, { className: I.triggerArrow })]
598
598
  }), /* @__PURE__ */ (0, h.jsx)("div", {
599
599
  ref: g,
600
600
  className: I.content,
601
601
  children: e.map((e, n) => e.options ? /* @__PURE__ */ (0, h.jsxs)("div", { children: [/* @__PURE__ */ (0, h.jsx)("div", {
602
- className: `${I.groupLabel} ${P.semibold}`,
602
+ className: `${I.groupLabel} ${N.semibold}`,
603
603
  children: e.label
604
604
  }), e.options.map((e) => /* @__PURE__ */ (0, h.jsxs)("div", {
605
605
  className: I.item,
@@ -664,13 +664,13 @@ var I = {
664
664
  close: "_close_qpue1_13"
665
665
  }, L = ({ onSave: e, onClose: t, saving: n = !1, disabled: r = !1 }) => /* @__PURE__ */ (0, h.jsxs)("div", {
666
666
  className: xe.group,
667
- children: [/* @__PURE__ */ (0, h.jsx)(N, {
667
+ children: [/* @__PURE__ */ (0, h.jsx)(M, {
668
668
  variant: "outline",
669
669
  className: xe.save,
670
670
  disabled: r || n,
671
671
  onClick: e,
672
- children: n ? /* @__PURE__ */ (0, h.jsx)(A, {}) : /* @__PURE__ */ (0, h.jsx)(E, {})
673
- }), /* @__PURE__ */ (0, h.jsx)(N, {
672
+ children: n ? /* @__PURE__ */ (0, h.jsx)(pe, {}) : /* @__PURE__ */ (0, h.jsx)(E, {})
673
+ }), /* @__PURE__ */ (0, h.jsx)(M, {
674
674
  variant: "outline",
675
675
  className: xe.close,
676
676
  disabled: n,
@@ -905,12 +905,20 @@ var I = {
905
905
  w: f,
906
906
  h: p
907
907
  };
908
- }, Ae = (e, t, n, r, i, a, o, s, c, l, u) => e === "tl" ? Ee(t, n, r, i, a, o, s, c, l, u) : e === "tr" ? De(t, n, r, i, a, o, s, c, l, u) : e === "bl" ? Oe(t, n, r, i, a, o, s, c, l, u) : e === "br" ? ke(t, n, r, i, a, o, s, c, l, u) : {
908
+ }, Ae = (e, t, n, r, i, a, o, s, c) => {
909
+ let l = e === "tl" || e === "bl", u = e === "tl" || e === "tr", d = c.x + c.w, f = c.y + c.h, p = i - n, m = a - r, h = t >= 1 ? c.w + (l ? -p : p) : (c.h + (u ? -m : m)) * t, g = l ? d : o - c.x, _ = u ? f : s - c.y, v = Math.min(g, _ * t), y = Math.max(z, z * t), b = Math.min(Math.max(h, y), v), x = b / t;
910
+ return {
911
+ x: l ? d - b : c.x,
912
+ y: u ? f - x : c.y,
913
+ w: b,
914
+ h: x
915
+ };
916
+ }, je = (e, t, n, r, i, a, o, s, c, l, u) => t ? e === "tl" ? Ee(t, n, r, i, a, o, s, c, l, u) : e === "tr" ? De(t, n, r, i, a, o, s, c, l, u) : e === "bl" ? Oe(t, n, r, i, a, o, s, c, l, u) : e === "br" ? ke(t, n, r, i, a, o, s, c, l, u) : {
909
917
  x: 0,
910
918
  y: 0,
911
919
  w: 0,
912
920
  h: 0
913
- }, je = (e, t, n) => {
921
+ } : Ae(e, n, r, i, a, o, s, c, l), Me = (e, t, n) => {
914
922
  let r = .12, i = t / n, a = 0, o = 0;
915
923
  e === 1 && (a = (i > 1 ? n : t) * (1 - r * 2), o = a), e > 1 && (i > e ? (o = n * (1 - r * 2), a = o * e) : (a = t * (1 - r * 2), o = a / e)), e < 1 && (i > e ? (o = n * (1 - r * 2), a = o * e) : (a = t * (1 - r * 2), o = a / e));
916
924
  let s = a / t * 100, c = o / n * 100;
@@ -920,7 +928,7 @@ var I = {
920
928
  w: s,
921
929
  h: c
922
930
  };
923
- }, Me = (e, t, n, r) => {
931
+ }, Ne = (e, t, n, r) => {
924
932
  let i = e.w / 100 * n, a = e.h / 100 * r;
925
933
  t >= 1 ? a = i / t : i = a * t;
926
934
  let o = i / n * 100, s = a / r * 100, c = Math.max(o / (100 - e.x), s / (100 - e.y), 1);
@@ -929,13 +937,13 @@ var I = {
929
937
  w: o,
930
938
  h: s
931
939
  };
932
- }, B = (e) => Math.abs(Math.round(e / 90)) % 2 == 1, Ne = (e, t, n, r) => B(n) === B(r) ? {
940
+ }, B = (e) => Math.abs(Math.round(e / 90)) % 2 == 1, Pe = (e, t, n, r) => B(n) === B(r) ? {
933
941
  width: e,
934
942
  height: t
935
943
  } : {
936
944
  width: t,
937
945
  height: e
938
- }, Pe = async (e) => {
946
+ }, Fe = async (e) => {
939
947
  let { width: t, height: n } = e, r = Math.min(1, Ce / Math.max(t, n)), i = Math.round(t * r), a = Math.round(n * r), o = new OffscreenCanvas(i, a), s = o.getContext("2d");
940
948
  if (!s) throw Error("Failed to get 2D context for preview canvas");
941
949
  return s.drawImage(e, 0, 0, i, a), o.convertToBlob({
@@ -943,7 +951,7 @@ var I = {
943
951
  quality: we
944
952
  });
945
953
  };
946
- function Fe(e) {
954
+ function Ie(e) {
947
955
  let t = new OffscreenCanvas(e.width, e.height), n = t.getContext("2d");
948
956
  if (!n) throw Error("Failed to create 2D context for canvas.");
949
957
  n.drawImage(e, 0, 0);
@@ -957,14 +965,14 @@ function Fe(e) {
957
965
  }
958
966
  //#endregion
959
967
  //#region src/shared/components/Pixedi/utils/imageProcessor.ts
960
- var Ie = (e) => new Promise((t, n) => {
968
+ var Le = (e) => new Promise((t, n) => {
961
969
  let r = new FileReader();
962
970
  r.onloadend = () => {
963
971
  let e = r.result;
964
972
  typeof e == "string" ? t(e) : n(/* @__PURE__ */ Error("Failed to read blob as base64"));
965
973
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("FileReader error")), r.readAsDataURL(e);
966
974
  });
967
- async function Le(e) {
975
+ async function Re(e) {
968
976
  let t = await createImageBitmap(e), n = e.type || "image/png", r = n === "image/gif" ? "image/png" : n, i = document.createElement("canvas"), a = i.getContext("2d", { alpha: !0 });
969
977
  i.width = t.width, i.height = t.height, a?.drawImage(t, 0, 0), t.close();
970
978
  let o = () => {
@@ -999,7 +1007,7 @@ async function Le(e) {
999
1007
  }, a, t) : i.toBlob((t) => {
1000
1008
  t ? e(t) : o(/* @__PURE__ */ Error("Failed to encode image as image/png"));
1001
1009
  }, "image/png");
1002
- }), s = await createImageBitmap(o), c = await Pe(s), { width: l, height: u } = s, d = Fe(s);
1010
+ }), s = await createImageBitmap(o), c = await Fe(s), { width: l, height: u } = s, d = Ie(s);
1003
1011
  return s.close(), {
1004
1012
  newBlob: o,
1005
1013
  previewBlob: c,
@@ -1013,17 +1021,17 @@ async function Le(e) {
1013
1021
  }
1014
1022
  //#endregion
1015
1023
  //#region src/shared/components/Pixedi/utils/preview.ts
1016
- var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0][0] + e[0][1] * t[1][0], e[0][0] * t[0][1] + e[0][1] * t[1][1]], [e[1][0] * t[0][0] + e[1][1] * t[1][0], e[1][0] * t[0][1] + e[1][1] * t[1][1]]], ze = (e) => (Math.round(e / 90) % 4 + 4) % 4 * 90, Be = (e) => {
1017
- switch (ze(e)) {
1024
+ var V = (e, t, n) => Math.max(t, Math.min(n, e)), ze = (e, t) => [[e[0][0] * t[0][0] + e[0][1] * t[1][0], e[0][0] * t[0][1] + e[0][1] * t[1][1]], [e[1][0] * t[0][0] + e[1][1] * t[1][0], e[1][0] * t[0][1] + e[1][1] * t[1][1]]], Be = (e) => (Math.round(e / 90) % 4 + 4) % 4 * 90, Ve = (e) => {
1025
+ switch (Be(e)) {
1018
1026
  case 90: return [[0, -1], [1, 0]];
1019
1027
  case 180: return [[-1, 0], [0, -1]];
1020
1028
  case 270: return [[0, 1], [-1, 0]];
1021
1029
  default: return [[1, 0], [0, 1]];
1022
1030
  }
1023
- }, Ve = (e, t) => [[e ? -1 : 1, 0], [0, t ? -1 : 1]], He = (e, t, n) => Re(Ve(t, n), Be(-e)), Ue = (e) => [+(e[0][0] < 0 || e[0][1] < 0), +(e[1][0] < 0 || e[1][1] < 0)], H = (e, t, n) => {
1024
- let r = Ue(e);
1031
+ }, He = (e, t) => [[e ? -1 : 1, 0], [0, t ? -1 : 1]], Ue = (e, t, n) => ze(He(t, n), Ve(-e)), We = (e) => [+(e[0][0] < 0 || e[0][1] < 0), +(e[1][0] < 0 || e[1][1] < 0)], H = (e, t, n) => {
1032
+ let r = We(e);
1025
1033
  return [e[0][0] * t + e[0][1] * n + r[0], e[1][0] * t + e[1][1] * n + r[1]];
1026
- }, We = (e) => {
1034
+ }, Ge = (e) => {
1027
1035
  let t = 1, n = 1, r = {
1028
1036
  x: 0,
1029
1037
  y: 0,
@@ -1039,7 +1047,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1039
1047
  h: 1
1040
1048
  }, i = 0, a = !1, o = !1;
1041
1049
  else if (c.action.name === "crop") {
1042
- let e = (c.action.args.x ?? 0) / 100, t = (c.action.args.y ?? 0) / 100, n = (c.action.args.w ?? 100) / 100, s = (c.action.args.h ?? 100) / 100, l = He(i, a, o), u = [
1050
+ let e = (c.action.args.x ?? 0) / 100, t = (c.action.args.y ?? 0) / 100, n = (c.action.args.w ?? 100) / 100, s = (c.action.args.h ?? 100) / 100, l = Ue(i, a, o), u = [
1043
1051
  H(l, e, t),
1044
1052
  H(l, e + n, t),
1045
1053
  H(l, e, t + s),
@@ -1071,13 +1079,13 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1071
1079
  flipH: a,
1072
1080
  flipV: o
1073
1081
  };
1074
- }, Ge = (e) => {
1075
- let { box: t, flipH: n, flipV: r, rotation: i, newWidth: a, newHeight: o, initWidth: s, initHeight: c, viewWidth: l, viewHeight: u } = We(e), d = V(t.x, 0, 1), f = V(t.y, 0, 1), p = {
1082
+ }, Ke = (e) => {
1083
+ let { box: t, flipH: n, flipV: r, rotation: i, newWidth: a, newHeight: o, initWidth: s, initHeight: c, viewWidth: l, viewHeight: u } = Ge(e), d = V(t.x, 0, 1), f = V(t.y, 0, 1), p = {
1076
1084
  x: d,
1077
1085
  y: f,
1078
1086
  w: V(t.w, 0, 1 - d),
1079
1087
  h: V(t.h, 0, 1 - f)
1080
- }, m = ze(i);
1088
+ }, m = Be(i);
1081
1089
  return {
1082
1090
  ...p.x === 0 && p.y === 0 && p.w === 1 && p.h === 1 ? {} : { crop: {
1083
1091
  x: Math.round(s * t.x),
@@ -1095,18 +1103,18 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1095
1103
  height: o
1096
1104
  } } : {}
1097
1105
  };
1098
- }, Ke = (e) => {
1099
- let [t, n] = s(!1), { setImage: r, settings: i, history: a, originalBlob: o, setCurrentAction: c, resetHistory: l } = j();
1106
+ }, qe = (e) => {
1107
+ let [t, n] = s(!1), { setImage: r, settings: i, history: a, originalBlob: o, setCurrentAction: c, resetHistory: l } = A();
1100
1108
  return {
1101
1109
  save: async () => {
1102
1110
  if (!o) return;
1103
1111
  n(!0);
1104
- let t = Ge(a.items.slice(0, a.pointer + 1));
1112
+ let t = Ke(a.items.slice(0, a.pointer + 1));
1105
1113
  try {
1106
- let n = await Le(o);
1114
+ let n = await Re(o);
1107
1115
  t.crop && n.crop(t.crop.x, t.crop.y, t.crop.w, t.crop.h), t.flip && n.flip(t.flip.horizontal, t.flip.vertical), t.rotate && n.rotate(t.rotate.degrees), t.resize && n.resize(t.resize.width, t.resize.height);
1108
1116
  let { newBlob: a, previewBlob: s, mimeType: c, width: l, height: u, isAlpha: d } = await n.get(i), f = "";
1109
- i.exportAs === "base64" && (f = await Ie(a)), await e(f || a), r({
1117
+ i.exportAs === "base64" && (f = await Le(a)), await e(f || a), r({
1110
1118
  newBlob: a,
1111
1119
  previewBlob: s,
1112
1120
  mimeType: c,
@@ -1130,13 +1138,13 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1130
1138
  tools: "_tools_msw8l_11",
1131
1139
  history: "_history_msw8l_15",
1132
1140
  historyText: "_historyText_msw8l_20"
1133
- }, qe = ({ onBack: e, onSave: t }) => {
1134
- let { save: n, reset: r, isSaving: i } = Ke(t), { history: a, undo: o, redo: s } = j(), c = a.items.length > 1 && !i, l = a.pointer === 0, u = a.pointer === a.items.length - 1, d = a.items.length < 2 || i, f = d || a.pointer === 0;
1141
+ }, Je = ({ onBack: e, onSave: t }) => {
1142
+ let { save: n, reset: r, isSaving: i } = qe(t), { history: a, undo: o, redo: s } = A(), c = a.items.length > 1 && !i, l = a.pointer === 0, u = a.pointer === a.items.length - 1, d = a.items.length < 2 || i, f = d || a.pointer === 0;
1135
1143
  return /* @__PURE__ */ (0, h.jsxs)("div", {
1136
1144
  className: U.header,
1137
- children: [/* @__PURE__ */ (0, h.jsx)(N, {
1145
+ children: [/* @__PURE__ */ (0, h.jsx)(M, {
1138
1146
  variant: "ghost",
1139
- className: M.rect,
1147
+ className: j.rect,
1140
1148
  onClick: e,
1141
1149
  children: /* @__PURE__ */ (0, h.jsx)(D, {})
1142
1150
  }), /* @__PURE__ */ (0, h.jsxs)("div", {
@@ -1145,12 +1153,12 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1145
1153
  c && /* @__PURE__ */ (0, h.jsxs)("div", {
1146
1154
  className: U.history,
1147
1155
  children: [
1148
- /* @__PURE__ */ (0, h.jsx)(N, {
1156
+ /* @__PURE__ */ (0, h.jsx)(M, {
1149
1157
  variant: "outline",
1150
1158
  disabled: l,
1151
- className: M.rect,
1159
+ className: j.rect,
1152
1160
  onClick: o,
1153
- children: /* @__PURE__ */ (0, h.jsx)(ie, {})
1161
+ children: /* @__PURE__ */ (0, h.jsx)(re, {})
1154
1162
  }),
1155
1163
  /* @__PURE__ */ (0, h.jsxs)("div", {
1156
1164
  className: U.historyText,
@@ -1160,33 +1168,33 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1160
1168
  a.items.length
1161
1169
  ]
1162
1170
  }),
1163
- /* @__PURE__ */ (0, h.jsx)(N, {
1171
+ /* @__PURE__ */ (0, h.jsx)(M, {
1164
1172
  variant: "outline",
1165
1173
  disabled: u,
1166
- className: M.rect,
1174
+ className: j.rect,
1167
1175
  onClick: s,
1168
- children: /* @__PURE__ */ (0, h.jsx)(O, {})
1176
+ children: /* @__PURE__ */ (0, h.jsx)(k, {})
1169
1177
  })
1170
1178
  ]
1171
1179
  }),
1172
- /* @__PURE__ */ (0, h.jsx)(N, {
1180
+ /* @__PURE__ */ (0, h.jsx)(M, {
1173
1181
  variant: "outline",
1174
1182
  disabled: d,
1175
1183
  onClick: r,
1176
1184
  children: "Reset"
1177
1185
  }),
1178
- /* @__PURE__ */ (0, h.jsxs)(N, {
1186
+ /* @__PURE__ */ (0, h.jsxs)(M, {
1179
1187
  disabled: f,
1180
1188
  onClick: n,
1181
- children: [i ? /* @__PURE__ */ (0, h.jsx)(A, {}) : /* @__PURE__ */ (0, h.jsx)(E, {}), "Save"]
1189
+ children: [i ? /* @__PURE__ */ (0, h.jsx)(pe, {}) : /* @__PURE__ */ (0, h.jsx)(E, {}), "Save"]
1182
1190
  })
1183
1191
  ]
1184
1192
  })]
1185
1193
  });
1186
- }, Je = (e, t) => {
1194
+ }, Ye = (e, t) => {
1187
1195
  let n = new CustomEvent("crop-update", { detail: t });
1188
1196
  e.dispatchEvent(n);
1189
- }, Ye = (e, t) => {
1197
+ }, Xe = (e, t) => {
1190
1198
  let n = new CustomEvent("clip-path-update", { detail: t });
1191
1199
  e.dispatchEvent(n);
1192
1200
  }, W = (e, t) => {
@@ -1202,8 +1210,8 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1202
1210
  updatedScale: e,
1203
1211
  updatedWidth: Math.round(e / 100 * t),
1204
1212
  updatedHeight: Math.round(e / 100 * n)
1205
- }), Xe = () => {
1206
- let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: i, eventBus: a } = j(), { width: c, height: l } = e(), [u, d] = s(c), [f, p] = s(l), [m, g] = s(100), _ = o(0), v = S(), y = (e) => {
1213
+ }), Ze = () => {
1214
+ let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: i, eventBus: a } = A(), { width: c, height: l } = e(), [u, d] = s(c), [f, p] = s(l), [m, g] = s(100), _ = o(0), v = S(), y = (e) => {
1207
1215
  let { updatedScale: t, updatedWidth: n, updatedHeight: r } = J(e, c, l);
1208
1216
  d(n), p(r), g(t), W(a, t);
1209
1217
  }, b = (e) => {
@@ -1288,58 +1296,81 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1288
1296
  rotate: "_rotate_dvanl_12",
1289
1297
  flip: "_flip_dvanl_24",
1290
1298
  image: "_image_dvanl_32"
1291
- }, Ze = ({ isClipped: e, style: t = {} }) => {
1292
- let { history: n, previewUrl: i, currentAction: a, getLastRotation: s, eventBus: c } = j(), l = o(null), u = [];
1293
- if (a) {
1299
+ }, Qe = ({ isClipped: e, style: t = {} }) => {
1300
+ let { history: n, previewUrl: a, currentAction: s, getLastRotation: c, eventBus: l } = A(), u = o(null), d = o(s?.name), f = o(a);
1301
+ i(() => {
1302
+ let e = d.current, t = s?.name, n = f.current !== a;
1303
+ if (d.current = t, f.current = a, !(e && t && e !== t) && !n) return;
1304
+ let r = u.current;
1305
+ if (!r) return;
1306
+ let i = [r, ...r.querySelectorAll("*")];
1307
+ i.forEach((e) => {
1308
+ e.style.transition = "none";
1309
+ }), r.getBoundingClientRect();
1310
+ let o = () => {
1311
+ i.forEach((e) => {
1312
+ e.style.removeProperty("transition");
1313
+ });
1314
+ }, c = requestAnimationFrame(o);
1315
+ return () => {
1316
+ cancelAnimationFrame(c), o();
1317
+ };
1318
+ }, [s?.name, a]);
1319
+ let p = [];
1320
+ if (s) {
1294
1321
  let { width: e, height: t } = n.items.at(n.pointer);
1295
- u.push({
1296
- ...a.name === w.ROTATE ? Ne(e, t, s(), a.args.degrees) : {
1322
+ p.push({
1323
+ ...s.name === w.ROTATE ? Pe(e, t, c(), s.args.degrees) : {
1297
1324
  width: e,
1298
1325
  height: t
1299
1326
  },
1300
- action: a
1327
+ action: s
1301
1328
  });
1302
1329
  }
1303
- let { box: d, boxWidth: f, boxHeight: p, viewWidth: m, viewHeight: g, rotation: _, flipH: v, flipV: y } = We([...n.items.slice(0, n.pointer + 1), ...u]);
1330
+ let { box: m, boxWidth: g, boxHeight: _, viewWidth: v, viewHeight: y, rotation: b, flipH: x, flipV: S } = Ge([...n.items.slice(0, n.pointer + 1), ...p]);
1304
1331
  return r(() => {
1305
- e && l.current && (l.current.style.transition = "none");
1332
+ e && u.current && (u.current.style.transition = "none"), s?.name !== w.RESIZE && u.current && (u.current.style.transform = "scale(1)");
1306
1333
  let t = (e) => {
1307
1334
  let t = e.detail;
1308
- l.current && (l.current.style.transform = `scale(${t / 100})`);
1335
+ u.current && (u.current.style.transform = `scale(${t / 100})`);
1309
1336
  }, n = (t) => {
1310
1337
  if (!e) return;
1311
1338
  let { x: n, y: r, w: i, h: a } = t.detail;
1312
- l.current && (l.current.style.clipPath = `xywh(${n}% ${r}% ${i}% ${a}%)`);
1339
+ u.current && (u.current.style.clipPath = `xywh(${n}% ${r}% ${i}% ${a}%)`);
1313
1340
  };
1314
- return c.addEventListener("resize-update", t), c.addEventListener("clip-path-update", n), () => {
1315
- c.removeEventListener("resize-update", t), c.removeEventListener("clip-path-update", n);
1341
+ return l.addEventListener("resize-update", t), l.addEventListener("clip-path-update", n), () => {
1342
+ l.removeEventListener("resize-update", t), l.removeEventListener("clip-path-update", n);
1316
1343
  };
1317
- }, [e, c]), /* @__PURE__ */ (0, h.jsx)("div", {
1318
- ref: l,
1344
+ }, [
1345
+ e,
1346
+ s?.name,
1347
+ l
1348
+ ]), /* @__PURE__ */ (0, h.jsx)("div", {
1349
+ ref: u,
1319
1350
  className: Y.preview,
1320
1351
  style: {
1321
- aspectRatio: `${m} / ${g}`,
1352
+ aspectRatio: `${v} / ${y}`,
1322
1353
  ...t
1323
1354
  },
1324
1355
  children: /* @__PURE__ */ (0, h.jsx)("div", {
1325
1356
  className: Y.rotate,
1326
1357
  style: {
1327
- width: `${f / m * 100}%`,
1328
- height: `${p / g * 100}%`,
1329
- transform: `translate(-50%, -50%) rotate(${_}deg)`
1358
+ width: `${g / v * 100}%`,
1359
+ height: `${_ / y * 100}%`,
1360
+ transform: `translate(-50%, -50%) rotate(${b}deg)`
1330
1361
  },
1331
1362
  children: /* @__PURE__ */ (0, h.jsx)("div", {
1332
1363
  className: Y.flip,
1333
- style: { transform: `scale(${v ? -1 : 1}, ${y ? -1 : 1})` },
1364
+ style: { transform: `scale(${x ? -1 : 1}, ${S ? -1 : 1})` },
1334
1365
  children: /* @__PURE__ */ (0, h.jsx)("img", {
1335
1366
  className: Y.image,
1336
- src: i,
1367
+ src: a,
1337
1368
  alt: "Preview Image",
1338
1369
  style: {
1339
- width: `${1 / d.w * 100}%`,
1340
- height: `${1 / d.h * 100}%`,
1341
- left: `${-(d.x / d.w) * 100}%`,
1342
- top: `${-(d.y / d.h) * 100}%`
1370
+ width: `${1 / m.w * 100}%`,
1371
+ height: `${1 / m.h * 100}%`,
1372
+ left: `${-(m.x / m.w) * 100}%`,
1373
+ top: `${-(m.y / m.h) * 100}%`
1343
1374
  }
1344
1375
  })
1345
1376
  })
@@ -1363,9 +1394,9 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1363
1394
  pointerBottomLeft: "_pointerBottomLeft_13nh3_104",
1364
1395
  mobileBorder: "_mobileBorder_13nh3_111",
1365
1396
  mobilePointer: "_mobilePointer_13nh3_117"
1366
- }, Qe = () => {
1367
- let { getLastHistoryItem: e } = j(), t = S(), n = o(null), { handleCropStart: r, initialCrop: i } = st({ boxRef: n }), { width: a, height: s } = e(), { x: c, y: l, w: u, h: d } = i;
1368
- return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)(Ze, {
1397
+ }, $e = () => {
1398
+ let { getLastHistoryItem: e } = A(), t = S(), n = o(null), { handleCropStart: r, initialCrop: i } = ct({ boxRef: n }), { width: a, height: s } = e(), { x: c, y: l, w: u, h: d } = i;
1399
+ return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)(Qe, {
1369
1400
  isClipped: !0,
1370
1401
  style: { clipPath: `xywh(${c}% ${l}% ${u}% ${d}%)` }
1371
1402
  }), /* @__PURE__ */ (0, h.jsx)("div", {
@@ -1380,11 +1411,11 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1380
1411
  top: `${l}%`,
1381
1412
  left: `${c}%`
1382
1413
  },
1383
- children: [/* @__PURE__ */ (0, h.jsx)(et, {}), t ? /* @__PURE__ */ (0, h.jsx)(ct, { onMouseDown: r }) : /* @__PURE__ */ (0, h.jsx)(tt, { onMouseDown: r })]
1414
+ children: [/* @__PURE__ */ (0, h.jsx)(tt, {}), t ? /* @__PURE__ */ (0, h.jsx)(lt, { onMouseDown: r }) : /* @__PURE__ */ (0, h.jsx)(nt, { onMouseDown: r })]
1384
1415
  })
1385
1416
  })] });
1386
- }, $e = () => {
1387
- let { setCurrentAction: e, currentAction: t, getLastHistoryItem: n, addToHistory: i, setSidebar: a, eventBus: s } = j(), { width: c, height: l } = n(), u = o(null), d = o(null), f = o(null), p = o(null), m = o({
1417
+ }, et = () => {
1418
+ let { setCurrentAction: e, currentAction: t, getLastHistoryItem: n, addToHistory: i, setSidebar: a, eventBus: s } = A(), { width: c, height: l } = n(), u = o(null), d = o(null), f = o(null), p = o(null), m = o({
1388
1419
  x: 0,
1389
1420
  y: 0,
1390
1421
  w: 0,
@@ -1392,7 +1423,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1392
1423
  });
1393
1424
  return r(() => {
1394
1425
  if (t?.name !== "crop") return;
1395
- let e = je(t.args.ratio, c, l), { x: n, y: r, w: i, h: a } = e, o = Math.round(n / 100 * c), h = Math.round(r / 100 * l), g = Math.round(i / 100 * c), _ = Math.round(a / 100 * l);
1426
+ let e = Me(t.args.ratio, c, l), { x: n, y: r, w: i, h: a } = e, o = Math.round(n / 100 * c), h = Math.round(r / 100 * l), g = Math.round(i / 100 * c), _ = Math.round(a / 100 * l);
1396
1427
  m.current = e, u.current && (u.current.textContent = o.toString()), d.current && (d.current.textContent = h.toString()), f.current && (f.current.textContent = g.toString()), p.current && (p.current.textContent = _.toString());
1397
1428
  let v = (e) => {
1398
1429
  let { x: t, y: n, w: r, h: i } = e.detail;
@@ -1417,7 +1448,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1417
1448
  className: X.toolsInfoLabel,
1418
1449
  children: "left"
1419
1450
  }), /* @__PURE__ */ (0, h.jsx)("div", {
1420
- className: `${X.toolsInfoValue} ${P.semibold}`,
1451
+ className: `${X.toolsInfoValue} ${N.semibold}`,
1421
1452
  ref: u
1422
1453
  })]
1423
1454
  }),
@@ -1427,7 +1458,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1427
1458
  className: X.toolsInfoLabel,
1428
1459
  children: "top"
1429
1460
  }), /* @__PURE__ */ (0, h.jsx)("div", {
1430
- className: `${X.toolsInfoValue} ${P.semibold}`,
1461
+ className: `${X.toolsInfoValue} ${N.semibold}`,
1431
1462
  ref: d
1432
1463
  })]
1433
1464
  }),
@@ -1437,7 +1468,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1437
1468
  className: X.toolsInfoLabel,
1438
1469
  children: "width"
1439
1470
  }), /* @__PURE__ */ (0, h.jsx)("div", {
1440
- className: `${X.toolsInfoValue} ${P.semibold}`,
1471
+ className: `${X.toolsInfoValue} ${N.semibold}`,
1441
1472
  ref: f
1442
1473
  })]
1443
1474
  }),
@@ -1447,7 +1478,7 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1447
1478
  className: X.toolsInfoLabel,
1448
1479
  children: "height"
1449
1480
  }), /* @__PURE__ */ (0, h.jsx)("div", {
1450
- className: `${X.toolsInfoValue} ${P.semibold}`,
1481
+ className: `${X.toolsInfoValue} ${N.semibold}`,
1451
1482
  ref: p
1452
1483
  })]
1453
1484
  }),
@@ -1473,10 +1504,10 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1473
1504
  })
1474
1505
  ]
1475
1506
  });
1476
- }, et = () => /* @__PURE__ */ (0, h.jsxs)("div", {
1507
+ }, tt = () => /* @__PURE__ */ (0, h.jsxs)("div", {
1477
1508
  className: X.linesBox,
1478
1509
  children: [/* @__PURE__ */ (0, h.jsx)("span", { className: `${X.line} ${X.lineV}` }), /* @__PURE__ */ (0, h.jsx)("span", { className: `${X.line} ${X.lineH}` })]
1479
- }), tt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [
1510
+ }), nt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [
1480
1511
  /* @__PURE__ */ (0, h.jsx)("div", {
1481
1512
  className: `${X.pointer} ${X.pointerTopLeft}`,
1482
1513
  onMouseDown: (t) => e(t, "tl", "nwse")
@@ -1496,20 +1527,20 @@ var V = (e, t, n) => Math.max(t, Math.min(n, e)), Re = (e, t) => [[e[0][0] * t[0
1496
1527
  ] });
1497
1528
  //#endregion
1498
1529
  //#region src/shared/components/Pixedi/crop/useCropInteraction.ts
1499
- function nt(e, t, n) {
1530
+ function rt(e, t, n) {
1500
1531
  return Math.min(Math.max(e, t), n);
1501
1532
  }
1502
- function rt(e, { x: t, y: n, w: r, h: i }) {
1533
+ function it(e, { x: t, y: n, w: r, h: i }) {
1503
1534
  e.style.left = `${t}%`, e.style.top = `${n}%`, e.style.width = `${r}%`, e.style.height = `${i}%`;
1504
1535
  }
1505
- function it(e) {
1536
+ function at(e) {
1506
1537
  let { width: t, height: n } = e.getBoundingClientRect();
1507
1538
  return {
1508
1539
  frameW: t,
1509
1540
  frameH: n
1510
1541
  };
1511
1542
  }
1512
- function at({ x: e, y: t, w: n, h: r }, i, a) {
1543
+ function ot({ x: e, y: t, w: n, h: r }, i, a) {
1513
1544
  return {
1514
1545
  x: e / 100 * i,
1515
1546
  y: t / 100 * a,
@@ -1517,7 +1548,7 @@ function at({ x: e, y: t, w: n, h: r }, i, a) {
1517
1548
  h: r / 100 * a
1518
1549
  };
1519
1550
  }
1520
- function ot({ x: e, y: t, w: n, h: r }, i, a) {
1551
+ function st({ x: e, y: t, w: n, h: r }, i, a) {
1521
1552
  return {
1522
1553
  x: e / i * 100,
1523
1554
  y: t / a * 100,
@@ -1525,22 +1556,22 @@ function ot({ x: e, y: t, w: n, h: r }, i, a) {
1525
1556
  h: r / a * 100
1526
1557
  };
1527
1558
  }
1528
- var st = ({ boxRef: e }) => {
1529
- let { currentAction: t, getLastHistoryItem: n, eventBus: i } = j(), s = S(), { width: c, height: l } = n(), u = t?.name === w.CROP, d = u ? t.args.ratio : 1, f = !u || t.args.isFree, p = a(() => je(d, c, l), [
1559
+ var ct = ({ boxRef: e }) => {
1560
+ let { currentAction: t, getLastHistoryItem: n, eventBus: i } = A(), s = S(), { width: c, height: l } = n(), u = t?.name === w.CROP, d = u ? t.args.ratio : 1, f = !u || t.args.isFree, p = a(() => Me(d, c, l), [
1530
1561
  d,
1531
1562
  c,
1532
1563
  l
1533
1564
  ]), m = o(null), h = o(""), g = o(p), _ = o(p);
1534
1565
  return r(() => {
1535
- g.current = p, Ye(i, p);
1566
+ g.current = p, Xe(i, p);
1536
1567
  }, [p, i]), r(() => {
1537
1568
  let t = (e, t) => {
1538
- g.current = t, rt(e, t), Je(i, {
1569
+ g.current = t, it(e, t), Ye(i, {
1539
1570
  x: Math.round(t.x / 100 * c),
1540
1571
  y: Math.round(t.y / 100 * l),
1541
1572
  w: Math.round(t.w / 100 * c),
1542
1573
  h: Math.round(t.h / 100 * l)
1543
- }), Ye(i, t);
1574
+ }), Xe(i, t);
1544
1575
  }, n = (e) => {
1545
1576
  e.preventDefault(), _.current = g.current;
1546
1577
  let t = "clientX" in e ? e.clientX : e.touches[0].clientX, n = "clientY" in e ? e.clientY : e.touches[0].clientY;
@@ -1553,7 +1584,7 @@ var st = ({ boxRef: e }) => {
1553
1584
  t.preventDefault();
1554
1585
  let n = e.current, r = n.parentElement;
1555
1586
  if (!r) return;
1556
- let { frameW: i, frameH: s } = it(r);
1587
+ let { frameW: i, frameH: s } = at(r);
1557
1588
  if (h.current) {
1558
1589
  a(t, n, i, s);
1559
1590
  return;
@@ -1561,14 +1592,14 @@ var st = ({ boxRef: e }) => {
1561
1592
  o(t, n, i, s);
1562
1593
  }, a = (e, n, r, i) => {
1563
1594
  if (!m.current) return;
1564
- let a = "clientX" in e ? e.clientX : e.touches[0].clientX, o = "clientY" in e ? e.clientY : e.touches[0].clientY, s = ot(Ae(h.current, f, d, m.current.x, m.current.y, a, o, r, i, at(_.current, r, i), at(g.current, r, i)), r, i);
1565
- t(n, f ? s : Me(s, d, c, l));
1595
+ let a = "clientX" in e ? e.clientX : e.touches[0].clientX, o = "clientY" in e ? e.clientY : e.touches[0].clientY, s = st(je(h.current, f, d, m.current.x, m.current.y, a, o, r, i, ot(_.current, r, i), ot(g.current, r, i)), r, i);
1596
+ t(n, f ? s : Ne(s, d, c, l));
1566
1597
  }, o = (e, n, r, i) => {
1567
1598
  if (!m.current) return;
1568
1599
  let { x: a, y: o, w: s, h: c } = _.current, l = "clientX" in e ? e.clientX : e.touches[0].clientX, u = "clientY" in e ? e.clientY : e.touches[0].clientY, d = (l - m.current.x) / r * 100, f = (u - m.current.y) / i * 100;
1569
1600
  t(n, {
1570
- x: nt(a + d, 0, Math.max(0, 100 - s)),
1571
- y: nt(o + f, 0, Math.max(0, 100 - c)),
1601
+ x: rt(a + d, 0, Math.max(0, 100 - s)),
1602
+ y: rt(o + f, 0, Math.max(0, 100 - c)),
1572
1603
  w: s,
1573
1604
  h: c
1574
1605
  });
@@ -1603,7 +1634,7 @@ var st = ({ boxRef: e }) => {
1603
1634
  },
1604
1635
  initialCrop: p
1605
1636
  };
1606
- }, ct = ({ onMouseDown: e }) => /* @__PURE__ */ (0, h.jsx)("div", {
1637
+ }, lt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, h.jsx)("div", {
1607
1638
  className: X.mobileBorder,
1608
1639
  children: /* @__PURE__ */ (0, h.jsx)("div", {
1609
1640
  className: X.mobilePointer,
@@ -1613,13 +1644,13 @@ var st = ({ boxRef: e }) => {
1613
1644
  flip: "_flip_17ic5_1",
1614
1645
  btnH: "_btnH_17ic5_14",
1615
1646
  btnV: "_btnV_17ic5_20"
1616
- }, lt = () => {
1617
- let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r } = j(), [i, a] = s(!1), [o, c] = s(!1), { width: l, height: u } = e();
1647
+ }, ut = () => {
1648
+ let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r } = A(), [i, a] = s(!1), [o, c] = s(!1), { width: l, height: u } = e();
1618
1649
  return /* @__PURE__ */ (0, h.jsxs)("div", {
1619
1650
  className: Z.flip,
1620
1651
  children: [/* @__PURE__ */ (0, h.jsxs)("div", {
1621
1652
  className: Z.scGroup,
1622
- children: [/* @__PURE__ */ (0, h.jsx)(N, {
1653
+ children: [/* @__PURE__ */ (0, h.jsx)(M, {
1623
1654
  variant: "outline",
1624
1655
  className: `${Z.btnH}`,
1625
1656
  onClick: () => {
@@ -1632,7 +1663,7 @@ var st = ({ boxRef: e }) => {
1632
1663
  });
1633
1664
  },
1634
1665
  children: /* @__PURE__ */ (0, h.jsx)(le, { style: { color: i ? "var(--accent-blue)" : "var(--foreground)" } })
1635
- }), /* @__PURE__ */ (0, h.jsx)(N, {
1666
+ }), /* @__PURE__ */ (0, h.jsx)(M, {
1636
1667
  variant: "outline",
1637
1668
  className: `${Z.btnV} `,
1638
1669
  onClick: () => {
@@ -1670,8 +1701,8 @@ var st = ({ boxRef: e }) => {
1670
1701
  rotate: "_rotate_gkt07_1",
1671
1702
  btnH: "_btnH_gkt07_14",
1672
1703
  btnV: "_btnV_gkt07_20"
1673
- }, ut = () => {
1674
- let { getLastRotation: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i } = j(), { width: a, height: s } = t(), c = e(), l = o(c), u = o(c), d = (e) => {
1704
+ }, dt = () => {
1705
+ let { getLastRotation: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i } = A(), { width: a, height: s } = t(), c = e(), l = o(c), u = o(c), d = (e) => {
1675
1706
  u.current += e, i({
1676
1707
  name: "rotate",
1677
1708
  args: { degrees: u.current }
@@ -1681,12 +1712,12 @@ var st = ({ boxRef: e }) => {
1681
1712
  className: Q.rotate,
1682
1713
  children: [/* @__PURE__ */ (0, h.jsxs)("div", {
1683
1714
  className: Q.scGroup,
1684
- children: [/* @__PURE__ */ (0, h.jsx)(N, {
1715
+ children: [/* @__PURE__ */ (0, h.jsx)(M, {
1685
1716
  variant: "outline",
1686
1717
  className: `${Q.btnH}`,
1687
1718
  onClick: () => d(90),
1688
1719
  children: /* @__PURE__ */ (0, h.jsx)(de, {})
1689
- }), /* @__PURE__ */ (0, h.jsx)(N, {
1720
+ }), /* @__PURE__ */ (0, h.jsx)(M, {
1690
1721
  variant: "outline",
1691
1722
  className: `${Q.btnV} `,
1692
1723
  onClick: () => d(-90),
@@ -1695,7 +1726,7 @@ var st = ({ boxRef: e }) => {
1695
1726
  }), /* @__PURE__ */ (0, h.jsx)(L, {
1696
1727
  onSave: async () => {
1697
1728
  n({
1698
- ...Ne(a, s, l.current, u.current),
1729
+ ...Pe(a, s, l.current, u.current),
1699
1730
  action: {
1700
1731
  name: "rotate",
1701
1732
  args: { degrees: u.current }
@@ -1707,17 +1738,17 @@ var st = ({ boxRef: e }) => {
1707
1738
  }
1708
1739
  })]
1709
1740
  });
1710
- }, dt = { frame: "_frame_xffug_1" }, ft = () => {
1711
- let { currentAction: e } = j(), t = e?.name === w.CROP, n = e?.name === w.RESIZE, r = e?.name === w.FLIP, i = e?.name === w.ROTATE, a = t;
1741
+ }, ft = { frame: "_frame_xffug_1" }, pt = () => {
1742
+ let { currentAction: e } = A(), t = e?.name === w.CROP, n = e?.name === w.RESIZE, r = e?.name === w.FLIP, i = e?.name === w.ROTATE, a = t;
1712
1743
  return /* @__PURE__ */ (0, h.jsxs)("div", {
1713
- className: `${dt.frame} ${a ? P.mask : ""}`,
1744
+ className: `${ft.frame} ${a ? N.mask : ""}`,
1714
1745
  children: [
1715
- /* @__PURE__ */ (0, h.jsx)(Ze, { style: t ? { opacity: .4 } : {} }),
1716
- t && /* @__PURE__ */ (0, h.jsx)(Qe, {}, e?.args?.id),
1717
- n && /* @__PURE__ */ (0, h.jsx)(Xe, {}),
1718
- t && /* @__PURE__ */ (0, h.jsx)($e, {}),
1719
- r && /* @__PURE__ */ (0, h.jsx)(lt, {}),
1720
- i && /* @__PURE__ */ (0, h.jsx)(ut, {})
1746
+ /* @__PURE__ */ (0, h.jsx)(Qe, { style: t ? { opacity: .4 } : {} }),
1747
+ t && /* @__PURE__ */ (0, h.jsx)($e, {}, e?.args?.id),
1748
+ n && /* @__PURE__ */ (0, h.jsx)(Ze, {}),
1749
+ t && /* @__PURE__ */ (0, h.jsx)(et, {}),
1750
+ r && /* @__PURE__ */ (0, h.jsx)(ut, {}),
1751
+ i && /* @__PURE__ */ (0, h.jsx)(dt, {})
1721
1752
  ]
1722
1753
  });
1723
1754
  }, $ = {
@@ -1734,12 +1765,12 @@ var st = ({ boxRef: e }) => {
1734
1765
  ratio: "_ratio_8qtha_75",
1735
1766
  sidebarPreset: "_sidebarPreset_8qtha_80",
1736
1767
  flipRotate: "_flipRotate_8qtha_85"
1737
- }, pt = () => {
1738
- let { getLastHistoryItem: e, setCurrentAction: t, setSidebar: n } = j(), { width: r, height: i } = e() ?? {
1768
+ }, mt = () => {
1769
+ let { getLastHistoryItem: e, setCurrentAction: t, setSidebar: n } = A(), { width: r, height: i } = e() ?? {
1739
1770
  width: 0,
1740
1771
  height: 0
1741
1772
  };
1742
- return /* @__PURE__ */ (0, h.jsxs)(N, {
1773
+ return /* @__PURE__ */ (0, h.jsxs)(M, {
1743
1774
  variant: "outline",
1744
1775
  className: $.resize,
1745
1776
  onClick: () => {
@@ -1753,7 +1784,7 @@ var st = ({ boxRef: e }) => {
1753
1784
  },
1754
1785
  children: [/* @__PURE__ */ (0, h.jsxs)("div", {
1755
1786
  className: $.resizeIcon,
1756
- children: [/* @__PURE__ */ (0, h.jsx)(k, {}), "Resize"]
1787
+ children: [/* @__PURE__ */ (0, h.jsx)(ce, {}), "Resize"]
1757
1788
  }), /* @__PURE__ */ (0, h.jsxs)("div", {
1758
1789
  className: $.resizeSize,
1759
1790
  children: [
@@ -1763,8 +1794,8 @@ var st = ({ boxRef: e }) => {
1763
1794
  ]
1764
1795
  })]
1765
1796
  });
1766
- }, mt = () => {
1767
- let { currentAction: e, setCurrentAction: t, getLastHistoryItem: n, setSidebar: r } = j(), { name: i, args: a } = e || {}, o = i === "crop" ? a?.id : "", { width: s, height: c } = n(), l = s / c, u = (e) => {
1797
+ }, ht = () => {
1798
+ let { currentAction: e, setCurrentAction: t, getLastHistoryItem: n, setSidebar: r } = A(), { name: i, args: a } = e || {}, o = i === "crop" ? a?.id : "", { width: s, height: c } = n(), l = s / c, u = (e) => {
1768
1799
  e !== o && (t({
1769
1800
  name: "crop",
1770
1801
  args: {
@@ -1779,29 +1810,29 @@ var st = ({ boxRef: e }) => {
1779
1810
  children: [/* @__PURE__ */ (0, h.jsx)("h4", { children: "Crop" }), /* @__PURE__ */ (0, h.jsxs)("div", {
1780
1811
  className: $.ratio,
1781
1812
  children: [
1782
- /* @__PURE__ */ (0, h.jsx)(me, {
1813
+ /* @__PURE__ */ (0, h.jsx)(P, {
1783
1814
  label: "Freeform",
1784
- icon: /* @__PURE__ */ (0, h.jsx)(oe, {}),
1815
+ icon: /* @__PURE__ */ (0, h.jsx)(ae, {}),
1785
1816
  active: o === "freeform",
1786
1817
  onClick: () => u("freeform")
1787
1818
  }),
1788
- /* @__PURE__ */ (0, h.jsx)(me, {
1819
+ /* @__PURE__ */ (0, h.jsx)(P, {
1789
1820
  label: "Original",
1790
- icon: /* @__PURE__ */ (0, h.jsx)(se, {}),
1821
+ icon: /* @__PURE__ */ (0, h.jsx)(oe, {}),
1791
1822
  active: o === "original",
1792
1823
  onClick: () => u("original")
1793
1824
  }),
1794
- /* @__PURE__ */ (0, h.jsx)(me, {
1825
+ /* @__PURE__ */ (0, h.jsx)(P, {
1795
1826
  label: "1:1",
1796
- icon: /* @__PURE__ */ (0, h.jsx)(ce, {}),
1827
+ icon: /* @__PURE__ */ (0, h.jsx)(se, {}),
1797
1828
  active: o === "1:1",
1798
1829
  onClick: () => u("1:1")
1799
1830
  })
1800
1831
  ]
1801
1832
  })]
1802
1833
  });
1803
- }, ht = Te.map((e) => e.options).flat(), gt = () => {
1804
- let { setCurrentAction: e, currentAction: t, setSidebar: n } = j(), r = t?.name === "crop" && ht.some((e) => e.value === t.args.id) ? t.args.id : "";
1834
+ }, gt = Te.map((e) => e.options).flat(), _t = () => {
1835
+ let { setCurrentAction: e, currentAction: t, setSidebar: n } = A(), r = t?.name === "crop" && gt.some((e) => e.value === t.args.id) ? t.args.id : "";
1805
1836
  return /* @__PURE__ */ (0, h.jsxs)("div", {
1806
1837
  className: $.sidebarPreset,
1807
1838
  children: [/* @__PURE__ */ (0, h.jsx)("h4", { children: "Presets" }), /* @__PURE__ */ (0, h.jsx)("div", { children: /* @__PURE__ */ (0, h.jsx)(ge, {
@@ -1828,9 +1859,9 @@ var st = ({ boxRef: e }) => {
1828
1859
  items: Te
1829
1860
  }) })]
1830
1861
  });
1831
- }, _t = () => {
1832
- let { setCurrentAction: e, setSidebar: t } = j();
1833
- return /* @__PURE__ */ (0, h.jsx)(N, {
1862
+ }, vt = () => {
1863
+ let { setCurrentAction: e, setSidebar: t } = A();
1864
+ return /* @__PURE__ */ (0, h.jsx)(M, {
1834
1865
  variant: "outline",
1835
1866
  className: $.resize,
1836
1867
  onClick: () => {
@@ -1847,9 +1878,9 @@ var st = ({ boxRef: e }) => {
1847
1878
  children: [/* @__PURE__ */ (0, h.jsx)(le, {}), "Flip"]
1848
1879
  })
1849
1880
  });
1850
- }, vt = () => {
1851
- let { getLastRotation: e, setCurrentAction: t, setSidebar: n } = j();
1852
- return /* @__PURE__ */ (0, h.jsx)(N, {
1881
+ }, yt = () => {
1882
+ let { getLastRotation: e, setCurrentAction: t, setSidebar: n } = A();
1883
+ return /* @__PURE__ */ (0, h.jsx)(M, {
1853
1884
  variant: "outline",
1854
1885
  className: $.resize,
1855
1886
  onClick: () => {
@@ -1863,13 +1894,13 @@ var st = ({ boxRef: e }) => {
1863
1894
  children: [/* @__PURE__ */ (0, h.jsx)(de, {}), "Rotate"]
1864
1895
  })
1865
1896
  });
1866
- }, yt = () => {
1867
- let { sidebar: e, setSidebar: t } = j(), n = ee("md");
1868
- return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)(N, {
1897
+ }, bt = () => {
1898
+ let { sidebar: e, setSidebar: t } = A(), n = ee("md");
1899
+ return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)(M, {
1869
1900
  variant: "outline",
1870
1901
  className: $.settings,
1871
1902
  onClick: () => t(!0),
1872
- children: /* @__PURE__ */ (0, h.jsx)(ae, {})
1903
+ children: /* @__PURE__ */ (0, h.jsx)(ie, {})
1873
1904
  }), /* @__PURE__ */ (0, h.jsx)("div", {
1874
1905
  className: $.sidebar,
1875
1906
  style: { transform: n && e ? "translateX(-320px)" : "translateX(0%)" },
@@ -1878,44 +1909,44 @@ var st = ({ boxRef: e }) => {
1878
1909
  children: /* @__PURE__ */ (0, h.jsxs)("div", {
1879
1910
  className: $.content,
1880
1911
  children: [
1881
- n && /* @__PURE__ */ (0, h.jsx)(N, {
1912
+ n && /* @__PURE__ */ (0, h.jsx)(M, {
1882
1913
  variant: "ghost",
1883
- className: `${$.closeBtn} ${M.rect}`,
1914
+ className: `${$.closeBtn} ${j.rect}`,
1884
1915
  onClick: () => t(!1),
1885
1916
  children: /* @__PURE__ */ (0, h.jsx)(te, {})
1886
1917
  }),
1887
- /* @__PURE__ */ (0, h.jsx)(pt, {}),
1888
- /* @__PURE__ */ (0, h.jsx)(F, { className: $.separator }),
1889
1918
  /* @__PURE__ */ (0, h.jsx)(mt, {}),
1890
1919
  /* @__PURE__ */ (0, h.jsx)(F, { className: $.separator }),
1891
- /* @__PURE__ */ (0, h.jsx)(gt, {}),
1920
+ /* @__PURE__ */ (0, h.jsx)(ht, {}),
1921
+ /* @__PURE__ */ (0, h.jsx)(F, { className: $.separator }),
1922
+ /* @__PURE__ */ (0, h.jsx)(_t, {}),
1892
1923
  /* @__PURE__ */ (0, h.jsx)(F, { className: $.separator }),
1893
1924
  /* @__PURE__ */ (0, h.jsxs)("div", {
1894
1925
  className: $.flipRotate,
1895
- children: [/* @__PURE__ */ (0, h.jsx)(_t, {}), /* @__PURE__ */ (0, h.jsx)(vt, {})]
1926
+ children: [/* @__PURE__ */ (0, h.jsx)(vt, {}), /* @__PURE__ */ (0, h.jsx)(yt, {})]
1896
1927
  })
1897
1928
  ]
1898
1929
  })
1899
1930
  })
1900
1931
  })] });
1901
- }, bt = ({ image: e, onSave: t, onBack: n, theme: r = "light", settings: i = u }) => {
1932
+ }, xt = ({ image: e, onSave: t, onBack: n, theme: r = "light", settings: i = u }) => {
1902
1933
  let { loading: a, error: o, mimeType: s, width: c, height: l, originalBlob: d, previewUrl: f, isAlpha: p } = b(e);
1903
1934
  return a || o || !d || !s ? /* @__PURE__ */ (0, h.jsx)("div", {
1904
- className: `${P.root} ${P.wrapper}`,
1935
+ className: `${N.root} ${N.wrapper}`,
1905
1936
  "data-theme": r,
1906
1937
  children: /* @__PURE__ */ (0, h.jsxs)("div", {
1907
- className: P.system,
1938
+ className: N.system,
1908
1939
  children: [
1909
- a && /* @__PURE__ */ (0, h.jsx)(A, { style: {
1940
+ a && /* @__PURE__ */ (0, h.jsx)(pe, { style: {
1910
1941
  width: 48,
1911
1942
  height: 48
1912
1943
  } }),
1913
1944
  o && /* @__PURE__ */ (0, h.jsx)("div", {
1914
- className: P.textRed,
1945
+ className: N.textRed,
1915
1946
  children: o
1916
1947
  }),
1917
1948
  !a && !o && (!d || !s) && /* @__PURE__ */ (0, h.jsx)("div", {
1918
- className: P.textRed,
1949
+ className: N.textRed,
1919
1950
  children: "Failed to load image."
1920
1951
  })
1921
1952
  ]
@@ -1932,20 +1963,20 @@ var st = ({ boxRef: e }) => {
1932
1963
  ...i
1933
1964
  },
1934
1965
  children: /* @__PURE__ */ (0, h.jsx)("div", {
1935
- className: `${P.root} ${P.wrapper}`,
1966
+ className: `${N.root} ${N.wrapper}`,
1936
1967
  "data-theme": r,
1937
1968
  children: /* @__PURE__ */ (0, h.jsxs)("div", {
1938
- className: P.main,
1939
- children: [/* @__PURE__ */ (0, h.jsx)(qe, {
1969
+ className: N.main,
1970
+ children: [/* @__PURE__ */ (0, h.jsx)(Je, {
1940
1971
  onSave: t,
1941
1972
  onBack: n
1942
1973
  }), /* @__PURE__ */ (0, h.jsxs)("div", {
1943
- className: P.grid,
1944
- children: [/* @__PURE__ */ (0, h.jsx)(ft, {}), /* @__PURE__ */ (0, h.jsx)(yt, {})]
1974
+ className: N.grid,
1975
+ children: [/* @__PURE__ */ (0, h.jsx)(pt, {}), /* @__PURE__ */ (0, h.jsx)(bt, {})]
1945
1976
  })]
1946
1977
  })
1947
1978
  })
1948
1979
  });
1949
1980
  };
1950
1981
  //#endregion
1951
- export { bt as Pixedi };
1982
+ export { xt as Pixedi };