image-beautifier 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/image-beautifier.es.js +437 -433
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
var hr = Object.defineProperty;
|
|
2
|
-
var pr = (
|
|
3
|
-
var R = (
|
|
4
|
-
import kt, { useState as O, useMemo as le, useEffect as N, Children as
|
|
2
|
+
var pr = (i, t, n) => t in i ? hr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
|
|
3
|
+
var R = (i, t, n) => pr(i, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import kt, { useState as O, useMemo as le, useEffect as N, Children as ot, cloneElement as st, useRef as ne } from "react";
|
|
5
5
|
import { ColorPicker as ur, Button as k, Dropdown as At, Popover as xe, Divider as mr, InputNumber as nt, Tooltip as L, Modal as gr, Switch as at, Input as xr, Radio as P, Segmented as lt, ConfigProvider as Nt, Popconfirm as br, Drawer as wr, Slider as pe, Upload as yr, message as vr, theme as ct } from "antd";
|
|
6
6
|
import { observer as B } from "mobx-react-lite";
|
|
7
|
-
import { Camera as jr, Check as Mr, Square as Cr, Circle as kr, Slash as Ar, MoveDownLeft as Nr, Pencil as Tr, Smile as Sr, Undo as Rr, Redo as Dr, ChevronRight as Hr, ChevronDown as zr, ChevronUp as _r, RotateCcw as Er, ZoomIn as Or, ZoomOut as Br, Hand as Yr, Crop as Ir, FlipHorizontal2 as Pr, FlipVertical2 as Wr, Sunset as Zr, Box as
|
|
8
|
-
import { TinyColor as
|
|
9
|
-
import { clsx as
|
|
10
|
-
import { twMerge as
|
|
11
|
-
import { makeAutoObservable as Tt, toJS as St, runInAction as
|
|
12
|
-
import { maxBy as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { Frame as
|
|
16
|
-
import { addListener as
|
|
17
|
-
import { Arrow as
|
|
18
|
-
import { ScrollBar as
|
|
7
|
+
import { Camera as jr, Check as Mr, Square as Cr, Circle as kr, Slash as Ar, MoveDownLeft as Nr, Pencil as Tr, Smile as Sr, Undo as Rr, Redo as Dr, ChevronRight as Hr, ChevronDown as zr, ChevronUp as _r, RotateCcw as Er, ZoomIn as Or, ZoomOut as Br, Hand as Yr, Crop as Ir, FlipHorizontal2 as Pr, FlipVertical2 as Wr, Sunset as Zr, Box as Fr, LayoutGrid as Gr, ImagePlus as Lr, Type as Ur, CodeXml as Vr, ClipboardPaste as Jr, ImagePlay as qr, Maximize as Xr, ListCollapse as Qr, ArrowUpRight as $r, ArrowDownRight as Kr, ImageDown as ei, Copy as ti, Settings2 as ri, ChevronLeft as ii, Pipette as oi, Trash2 as si, Sun as ni, Moon as ai, icons as dt } from "lucide-react";
|
|
8
|
+
import { TinyColor as li } from "@ctrl/tinycolor";
|
|
9
|
+
import { clsx as ci } from "clsx";
|
|
10
|
+
import { twMerge as di } from "tailwind-merge";
|
|
11
|
+
import { makeAutoObservable as Tt, toJS as St, runInAction as fi, action as hi } from "mobx";
|
|
12
|
+
import { maxBy as pi } from "lodash";
|
|
13
|
+
import ui from "@emoji-mart/data";
|
|
14
|
+
import mi from "@emoji-mart/react";
|
|
15
|
+
import { Frame as gi, Rect as ae, Box as ft, Ellipse as ht, Line as pt, Text as xi, Cursor as bi, App as wi, ZoomEvent as yi, ResizeEvent as vi, PointerEvent as ji, DragEvent as De } from "leafer-ui";
|
|
16
|
+
import { addListener as Mi, removeListener as Ci } from "resize-detector";
|
|
17
|
+
import { Arrow as ki } from "@leafer-in/arrow";
|
|
18
|
+
import { ScrollBar as Ai } from "@leafer-in/scroll";
|
|
19
19
|
import { tinykeys as Rt } from "tinykeys";
|
|
20
20
|
import "@leafer-in/editor";
|
|
21
21
|
import "@leafer-in/view";
|
|
22
|
-
import { StyleProvider as
|
|
23
|
-
import
|
|
22
|
+
import { StyleProvider as Ni } from "@ant-design/cssinjs";
|
|
23
|
+
import Ti from "react-cropper";
|
|
24
24
|
var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function Si(i) {
|
|
26
|
+
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
27
27
|
}
|
|
28
|
-
var ze = { exports: {} },
|
|
28
|
+
var ze = { exports: {} }, ie = {};
|
|
29
29
|
/**
|
|
30
30
|
* @license React
|
|
31
31
|
* react-jsx-runtime.production.min.js
|
|
@@ -36,10 +36,10 @@ var ze = { exports: {} }, oe = {};
|
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
38
|
var ut;
|
|
39
|
-
function
|
|
40
|
-
if (ut) return
|
|
39
|
+
function Ri() {
|
|
40
|
+
if (ut) return ie;
|
|
41
41
|
ut = 1;
|
|
42
|
-
var
|
|
42
|
+
var i = kt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
43
43
|
function h(f, d, p) {
|
|
44
44
|
var m, b = {}, C = null, A = null;
|
|
45
45
|
p !== void 0 && (C = "" + p), d.key !== void 0 && (C = "" + d.key), d.ref !== void 0 && (A = d.ref);
|
|
@@ -47,9 +47,9 @@ function Do() {
|
|
|
47
47
|
if (f && f.defaultProps) for (m in d = f.defaultProps, d) b[m] === void 0 && (b[m] = d[m]);
|
|
48
48
|
return { $$typeof: t, type: f, key: C, ref: A, props: b, _owner: a.current };
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return ie.Fragment = n, ie.jsx = h, ie.jsxs = h, ie;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
52
|
+
var oe = {};
|
|
53
53
|
/**
|
|
54
54
|
* @license React
|
|
55
55
|
* react-jsx-runtime.development.js
|
|
@@ -60,16 +60,16 @@ var ie = {};
|
|
|
60
60
|
* LICENSE file in the root directory of this source tree.
|
|
61
61
|
*/
|
|
62
62
|
var mt;
|
|
63
|
-
function
|
|
63
|
+
function Di() {
|
|
64
64
|
return mt || (mt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
65
|
-
var
|
|
65
|
+
var i = kt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), f = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), x = Symbol.iterator, w = "@@iterator";
|
|
66
66
|
function S(r) {
|
|
67
67
|
if (r === null || typeof r != "object")
|
|
68
68
|
return null;
|
|
69
69
|
var c = x && r[x] || r[w];
|
|
70
70
|
return typeof c == "function" ? c : null;
|
|
71
71
|
}
|
|
72
|
-
var _ =
|
|
72
|
+
var _ = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
73
73
|
function E(r) {
|
|
74
74
|
{
|
|
75
75
|
for (var c = arguments.length, u = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
|
|
@@ -87,10 +87,10 @@ function Ho() {
|
|
|
87
87
|
T.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, T);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
var ve = !1, $ = !1, D = !1,
|
|
90
|
+
var ve = !1, $ = !1, D = !1, F = !1, U = !1, K;
|
|
91
91
|
K = Symbol.for("react.module.reference");
|
|
92
92
|
function Bt(r) {
|
|
93
|
-
return !!(typeof r == "string" || typeof r == "function" || r === s || r === l || U || r === a || r === p || r === m ||
|
|
93
|
+
return !!(typeof r == "string" || typeof r == "function" || r === s || r === l || U || r === a || r === p || r === m || F || r === A || ve || $ || D || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === b || r.$$typeof === h || r.$$typeof === f || r.$$typeof === d || // This needs to include all possible module reference object
|
|
94
94
|
// types supported by any Flight configuration anywhere since
|
|
95
95
|
// we don't know which Flight build this will end up being used
|
|
96
96
|
// with.
|
|
@@ -106,7 +106,7 @@ function Ho() {
|
|
|
106
106
|
function Ee(r) {
|
|
107
107
|
return r.displayName || "Context";
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function G(r) {
|
|
110
110
|
if (r == null)
|
|
111
111
|
return null;
|
|
112
112
|
if (typeof r.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
@@ -139,11 +139,11 @@ function Ho() {
|
|
|
139
139
|
return Yt(r, r.render, "ForwardRef");
|
|
140
140
|
case b:
|
|
141
141
|
var g = r.displayName || null;
|
|
142
|
-
return g !== null ? g :
|
|
142
|
+
return g !== null ? g : G(r.type) || "Memo";
|
|
143
143
|
case C: {
|
|
144
144
|
var j = r, T = j._payload, v = j._init;
|
|
145
145
|
try {
|
|
146
|
-
return
|
|
146
|
+
return G(v(T));
|
|
147
147
|
} catch {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
@@ -152,9 +152,9 @@ function Ho() {
|
|
|
152
152
|
return null;
|
|
153
153
|
}
|
|
154
154
|
var V = Object.assign, ee = 0, Oe, Be, Ye, Ie, Pe, We, Ze;
|
|
155
|
-
function
|
|
155
|
+
function Fe() {
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
Fe.__reactDisabledLog = !0;
|
|
158
158
|
function It() {
|
|
159
159
|
{
|
|
160
160
|
if (ee === 0) {
|
|
@@ -162,7 +162,7 @@ function Ho() {
|
|
|
162
162
|
var r = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: Fe,
|
|
166
166
|
writable: !0
|
|
167
167
|
};
|
|
168
168
|
Object.defineProperties(console, {
|
|
@@ -232,7 +232,7 @@ function Ho() {
|
|
|
232
232
|
var Wt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
233
233
|
de = new Wt();
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Ge(r, c) {
|
|
236
236
|
if (!r || Ce)
|
|
237
237
|
return "";
|
|
238
238
|
{
|
|
@@ -304,9 +304,9 @@ function Ho() {
|
|
|
304
304
|
return typeof r == "function" && de.set(r, J), J;
|
|
305
305
|
}
|
|
306
306
|
function Zt(r, c, u) {
|
|
307
|
-
return
|
|
307
|
+
return Ge(r, !1);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ft(r) {
|
|
310
310
|
var c = r.prototype;
|
|
311
311
|
return !!(c && c.isReactComponent);
|
|
312
312
|
}
|
|
@@ -314,7 +314,7 @@ function Ho() {
|
|
|
314
314
|
if (r == null)
|
|
315
315
|
return "";
|
|
316
316
|
if (typeof r == "function")
|
|
317
|
-
return
|
|
317
|
+
return Ge(r, Ft(r));
|
|
318
318
|
if (typeof r == "string")
|
|
319
319
|
return ce(r);
|
|
320
320
|
switch (r) {
|
|
@@ -347,7 +347,7 @@ function Ho() {
|
|
|
347
347
|
} else
|
|
348
348
|
Ue.setExtraStackFrame(null);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Gt(r, c, u, g, j) {
|
|
351
351
|
{
|
|
352
352
|
var T = Function.call.bind(te);
|
|
353
353
|
for (var v in r)
|
|
@@ -415,8 +415,8 @@ function Ho() {
|
|
|
415
415
|
}
|
|
416
416
|
function Qt(r, c) {
|
|
417
417
|
if (typeof r.ref == "string" && re.current && c && re.current.stateNode !== c) {
|
|
418
|
-
var u =
|
|
419
|
-
Ae[u] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
418
|
+
var u = G(re.current.type);
|
|
419
|
+
Ae[u] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(re.current.type), r.ref), Ae[u] = !0);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
function $t(r, c) {
|
|
@@ -504,7 +504,7 @@ function Ho() {
|
|
|
504
504
|
function $e() {
|
|
505
505
|
{
|
|
506
506
|
if (Ne.current) {
|
|
507
|
-
var r =
|
|
507
|
+
var r = G(Ne.current.type);
|
|
508
508
|
if (r)
|
|
509
509
|
return `
|
|
510
510
|
|
|
@@ -517,7 +517,7 @@ Check the render method of \`` + r + "`.";
|
|
|
517
517
|
return "";
|
|
518
518
|
}
|
|
519
519
|
var Ke = {};
|
|
520
|
-
function
|
|
520
|
+
function ir(r) {
|
|
521
521
|
{
|
|
522
522
|
var c = $e();
|
|
523
523
|
if (!c) {
|
|
@@ -534,12 +534,12 @@ Check the top-level render call using <` + u + ">.");
|
|
|
534
534
|
if (!r._store || r._store.validated || r.key != null)
|
|
535
535
|
return;
|
|
536
536
|
r._store.validated = !0;
|
|
537
|
-
var u =
|
|
537
|
+
var u = ir(c);
|
|
538
538
|
if (Ke[u])
|
|
539
539
|
return;
|
|
540
540
|
Ke[u] = !0;
|
|
541
541
|
var g = "";
|
|
542
|
-
r && r._owner && r._owner !== Ne.current && (g = " It was passed a child from " +
|
|
542
|
+
r && r._owner && r._owner !== Ne.current && (g = " It was passed a child from " + G(r._owner.type) + "."), q(r), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), q(null);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
function tt(r, c) {
|
|
@@ -561,7 +561,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function or(r) {
|
|
565
565
|
{
|
|
566
566
|
var c = r.type;
|
|
567
567
|
if (c == null || typeof c == "string")
|
|
@@ -576,11 +576,11 @@ Check the top-level render call using <` + u + ">.");
|
|
|
576
576
|
else
|
|
577
577
|
return;
|
|
578
578
|
if (u) {
|
|
579
|
-
var g =
|
|
580
|
-
|
|
579
|
+
var g = G(c);
|
|
580
|
+
Gt(u, r.props, "prop", g, r);
|
|
581
581
|
} else if (c.PropTypes !== void 0 && !Te) {
|
|
582
582
|
Te = !0;
|
|
583
|
-
var j =
|
|
583
|
+
var j = G(c);
|
|
584
584
|
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
|
|
585
585
|
}
|
|
586
586
|
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -599,7 +599,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
var rt = {};
|
|
602
|
-
function
|
|
602
|
+
function it(r, c, u, g, j, T) {
|
|
603
603
|
{
|
|
604
604
|
var v = Bt(r);
|
|
605
605
|
if (!v) {
|
|
@@ -608,7 +608,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
608
608
|
var Y = rr();
|
|
609
609
|
Y ? y += Y : y += $e();
|
|
610
610
|
var H;
|
|
611
|
-
r === null ? H = "null" : ke(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (
|
|
611
|
+
r === null ? H = "null" : ke(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (G(r.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, y);
|
|
612
612
|
}
|
|
613
613
|
var z = tr(r, c, u, j, T);
|
|
614
614
|
if (z == null)
|
|
@@ -627,7 +627,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
627
627
|
tt(W, r);
|
|
628
628
|
}
|
|
629
629
|
if (te.call(c, "key")) {
|
|
630
|
-
var J =
|
|
630
|
+
var J = G(r), I = Object.keys(c).filter(function(fr) {
|
|
631
631
|
return fr !== "key";
|
|
632
632
|
}), Re = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
633
633
|
if (!rt[J + Re]) {
|
|
@@ -640,20 +640,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
640
640
|
<%s key={someKey} {...props} />`, Re, J, dr, J), rt[J + Re] = !0;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
return r === s ? sr(z) :
|
|
643
|
+
return r === s ? sr(z) : or(z), z;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
function nr(r, c, u) {
|
|
647
|
-
return
|
|
647
|
+
return it(r, c, u, !0);
|
|
648
648
|
}
|
|
649
649
|
function ar(r, c, u) {
|
|
650
|
-
return
|
|
650
|
+
return it(r, c, u, !1);
|
|
651
651
|
}
|
|
652
652
|
var lr = ar, cr = nr;
|
|
653
|
-
|
|
654
|
-
}()),
|
|
653
|
+
oe.Fragment = s, oe.jsx = lr, oe.jsxs = cr;
|
|
654
|
+
}()), oe;
|
|
655
655
|
}
|
|
656
|
-
process.env.NODE_ENV === "production" ? ze.exports =
|
|
656
|
+
process.env.NODE_ENV === "production" ? ze.exports = Ri() : ze.exports = Di();
|
|
657
657
|
var e = ze.exports;
|
|
658
658
|
const M = {
|
|
659
659
|
Camera: jr,
|
|
@@ -677,8 +677,8 @@ const M = {
|
|
|
677
677
|
FlipHorizontal2: Pr,
|
|
678
678
|
FlipVertical2: Wr,
|
|
679
679
|
Sunset: Zr,
|
|
680
|
-
Box:
|
|
681
|
-
LayoutGrid:
|
|
680
|
+
Box: Fr,
|
|
681
|
+
LayoutGrid: Gr,
|
|
682
682
|
ImagePlus: Lr,
|
|
683
683
|
Type: Ur,
|
|
684
684
|
CodeXml: Vr,
|
|
@@ -688,20 +688,20 @@ const M = {
|
|
|
688
688
|
ListCollapse: Qr,
|
|
689
689
|
ArrowUpRight: $r,
|
|
690
690
|
ArrowDownRight: Kr,
|
|
691
|
-
ImageDown:
|
|
692
|
-
Copy:
|
|
693
|
-
Settings2:
|
|
694
|
-
ChevronLeft:
|
|
695
|
-
Pipette:
|
|
696
|
-
Trash2:
|
|
697
|
-
Sun:
|
|
698
|
-
Moon:
|
|
699
|
-
}, be = (
|
|
691
|
+
ImageDown: ei,
|
|
692
|
+
Copy: ti,
|
|
693
|
+
Settings2: ri,
|
|
694
|
+
ChevronLeft: ii,
|
|
695
|
+
Pipette: oi,
|
|
696
|
+
Trash2: si,
|
|
697
|
+
Sun: ni,
|
|
698
|
+
Moon: ai
|
|
699
|
+
}, be = (i) => {
|
|
700
700
|
const t = () => {
|
|
701
701
|
if (!window.EyeDropper) return;
|
|
702
702
|
new EyeDropper().open().then((s) => {
|
|
703
703
|
const a = s.sRGBHex;
|
|
704
|
-
|
|
704
|
+
i != null && i.onChange && i.onChange(new li(a));
|
|
705
705
|
}).catch((s) => {
|
|
706
706
|
console.log(s);
|
|
707
707
|
});
|
|
@@ -709,14 +709,14 @@ const M = {
|
|
|
709
709
|
return /* @__PURE__ */ e.jsx(
|
|
710
710
|
ur,
|
|
711
711
|
{
|
|
712
|
-
...
|
|
712
|
+
...i,
|
|
713
713
|
panelRender: (n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
714
714
|
window.EyeDropper && /* @__PURE__ */ e.jsx("div", { className: "mb-1", children: /* @__PURE__ */ e.jsx(k, { type: "text", shape: "circle", size: "small", icon: /* @__PURE__ */ e.jsx(M.Pipette, { size: 16 }), onClick: t }) }),
|
|
715
715
|
n
|
|
716
716
|
] })
|
|
717
717
|
}
|
|
718
718
|
);
|
|
719
|
-
},
|
|
719
|
+
}, Hi = [
|
|
720
720
|
{
|
|
721
721
|
label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[1px]" }) }),
|
|
722
722
|
key: 1
|
|
@@ -737,14 +737,14 @@ const M = {
|
|
|
737
737
|
label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[8px]" }) }),
|
|
738
738
|
key: 8
|
|
739
739
|
}
|
|
740
|
-
],
|
|
740
|
+
], zi = ({ defaultValue: i, onChange: t }) => {
|
|
741
741
|
const n = ({ key: s }) => {
|
|
742
742
|
t(s);
|
|
743
743
|
};
|
|
744
744
|
return /* @__PURE__ */ e.jsx(
|
|
745
745
|
At,
|
|
746
746
|
{
|
|
747
|
-
menu: { items:
|
|
747
|
+
menu: { items: Hi, onClick: n, selectedKeys: [i] },
|
|
748
748
|
trigger: ["click"],
|
|
749
749
|
placement: "bottom",
|
|
750
750
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -758,7 +758,7 @@ const M = {
|
|
|
758
758
|
{
|
|
759
759
|
className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45",
|
|
760
760
|
style: {
|
|
761
|
-
height:
|
|
761
|
+
height: i + "px"
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
764
|
) })
|
|
@@ -767,37 +767,37 @@ const M = {
|
|
|
767
767
|
}
|
|
768
768
|
);
|
|
769
769
|
};
|
|
770
|
-
let
|
|
770
|
+
let _i = (i, t = 21) => (n = t) => {
|
|
771
771
|
let s = "", a = n;
|
|
772
772
|
for (; a--; )
|
|
773
|
-
s +=
|
|
773
|
+
s += i[Math.random() * i.length | 0];
|
|
774
774
|
return s;
|
|
775
775
|
};
|
|
776
|
-
const
|
|
777
|
-
const
|
|
778
|
-
return /Mac|iPod|iPhone|iPad/.test(
|
|
779
|
-
}, gt =
|
|
776
|
+
const Ei = () => {
|
|
777
|
+
const i = typeof navigator == "object" ? navigator.platform : "";
|
|
778
|
+
return /Mac|iPod|iPhone|iPad/.test(i);
|
|
779
|
+
}, gt = Ei() ? "⌘" : "Ctrl", Dt = [
|
|
780
780
|
"image/jpeg",
|
|
781
781
|
"image/png",
|
|
782
782
|
"image/bmp",
|
|
783
783
|
"image/gif",
|
|
784
784
|
"image/webp"
|
|
785
785
|
];
|
|
786
|
-
function Z(...
|
|
787
|
-
return
|
|
786
|
+
function Z(...i) {
|
|
787
|
+
return di(ci(i));
|
|
788
788
|
}
|
|
789
|
-
const ge =
|
|
789
|
+
const ge = _i(
|
|
790
790
|
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
791
791
|
7
|
|
792
|
-
),
|
|
792
|
+
), Oi = (i, t) => {
|
|
793
793
|
let n = document.createElement("a");
|
|
794
|
-
n.href =
|
|
795
|
-
},
|
|
796
|
-
let a =
|
|
794
|
+
n.href = i, n.download = t, n.style = "position: absolute; z-index: -111; visibility: none;", document.body.appendChild(n), n.click(), document.body.removeChild(n), n = null;
|
|
795
|
+
}, Bi = (i, t, n = 950, s = 450) => {
|
|
796
|
+
let a = i, l = t;
|
|
797
797
|
return a > n && (l *= n / a, a = n), l > s && (a *= s / l, l = s), { width: Math.round(a), height: Math.round(l) };
|
|
798
|
-
},
|
|
798
|
+
}, Yi = (i) => {
|
|
799
799
|
const t = new Image();
|
|
800
|
-
return
|
|
800
|
+
return i.startsWith("data") || (t.crossOrigin = "Anonymous"), new Promise(function(n, s) {
|
|
801
801
|
t.onload = function() {
|
|
802
802
|
n(t);
|
|
803
803
|
};
|
|
@@ -806,51 +806,51 @@ const ge = Eo(
|
|
|
806
806
|
new Error("An error occurred attempting to load image")
|
|
807
807
|
);
|
|
808
808
|
};
|
|
809
|
-
t.onerror = a, t.onabort = a, t.src =
|
|
809
|
+
t.onerror = a, t.onabort = a, t.src = i;
|
|
810
810
|
});
|
|
811
|
-
}, we = (
|
|
812
|
-
const s = Math.min(
|
|
811
|
+
}, we = (i, t, n = 0.15) => {
|
|
812
|
+
const s = Math.min(i, t);
|
|
813
813
|
return Math.round(s * n);
|
|
814
|
-
},
|
|
814
|
+
}, Ii = (i, t, n) => i === "top-left" ? {
|
|
815
815
|
x: 0,
|
|
816
816
|
y: 0
|
|
817
|
-
} :
|
|
817
|
+
} : i === "top" ? {
|
|
818
818
|
x: t / 2,
|
|
819
819
|
y: 0
|
|
820
|
-
} :
|
|
820
|
+
} : i === "top-right" ? {
|
|
821
821
|
x: t,
|
|
822
822
|
y: 0
|
|
823
|
-
} :
|
|
823
|
+
} : i === "left" ? {
|
|
824
824
|
x: 0,
|
|
825
825
|
y: n / 2
|
|
826
|
-
} :
|
|
826
|
+
} : i === "right" ? {
|
|
827
827
|
x: t,
|
|
828
828
|
y: n / 2
|
|
829
|
-
} :
|
|
829
|
+
} : i === "bottom-left" ? {
|
|
830
830
|
x: 0,
|
|
831
831
|
y: n
|
|
832
|
-
} :
|
|
832
|
+
} : i === "bottom" ? {
|
|
833
833
|
x: t / 2,
|
|
834
834
|
y: n
|
|
835
|
-
} :
|
|
835
|
+
} : i === "bottom-right" ? {
|
|
836
836
|
x: t,
|
|
837
837
|
y: n
|
|
838
|
-
} : { x: t / 2, y: n / 2 },
|
|
839
|
-
const s = n * (Math.PI / 180), a = Math.abs(
|
|
838
|
+
} : { x: t / 2, y: n / 2 }, Pi = (i, t, n) => {
|
|
839
|
+
const s = n * (Math.PI / 180), a = Math.abs(i * Math.cos(s)) + Math.abs(t * Math.sin(s)), l = Math.abs(i * Math.sin(s)) + Math.abs(t * Math.cos(s));
|
|
840
840
|
return {
|
|
841
841
|
width: Math.round(a),
|
|
842
842
|
height: Math.round(l)
|
|
843
843
|
};
|
|
844
|
-
}, _e = (
|
|
844
|
+
}, _e = (i) => "data:image/svg+xml," + encodeURIComponent(i).replace(/'/g, "%27").replace(/"/g, "%22"), Wi = ({ text: i, color: t, angleDegrees: n }) => {
|
|
845
845
|
const s = document.createElement("div");
|
|
846
846
|
s.style = `text-align:center;white-space:nowrap;line-height:100px;transform: rotate(${n}deg);position: absolute;top:0;left:0;opacity: 0;`;
|
|
847
847
|
const a = document.createElement("span");
|
|
848
|
-
a.style.color = t, a.style.fontSize = "36px", a.innerText =
|
|
848
|
+
a.style.color = t, a.style.fontSize = "36px", a.innerText = i, s.append(a), document.body.append(s);
|
|
849
849
|
const { width: l, height: h } = s.getBoundingClientRect();
|
|
850
850
|
document.body.removeChild(s);
|
|
851
|
-
const f =
|
|
851
|
+
const f = Pi(l, h, n), d = `
|
|
852
852
|
<div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:${f.height}px;transform:rotate(${n}deg);">
|
|
853
|
-
<span style="color:${t};font-size:36px;">${
|
|
853
|
+
<span style="color:${t};font-size:36px;">${i}</span>
|
|
854
854
|
</div>
|
|
855
855
|
`, p = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${f.width} ${f.height}" width="${f.width}" height="${f.height}">
|
|
856
856
|
<foreignObject width="100%" height="100%">
|
|
@@ -858,17 +858,17 @@ const ge = Eo(
|
|
|
858
858
|
</foreignObject>
|
|
859
859
|
</svg>`;
|
|
860
860
|
return _e(p);
|
|
861
|
-
},
|
|
861
|
+
}, Zi = (i) => {
|
|
862
862
|
const t = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
|
|
863
863
|
<foreignObject width="100%" height="100%">
|
|
864
864
|
<div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:32px;">
|
|
865
|
-
<span style="color:#ffffff;font-size:18px;">${
|
|
865
|
+
<span style="color:#ffffff;font-size:18px;">${i}</span>
|
|
866
866
|
</div>
|
|
867
867
|
</foreignObject>
|
|
868
868
|
</svg>`;
|
|
869
869
|
return _e(t);
|
|
870
870
|
};
|
|
871
|
-
let xt,
|
|
871
|
+
let xt, Fi = class {
|
|
872
872
|
constructor() {
|
|
873
873
|
R(this, "img", {});
|
|
874
874
|
R(this, "invalid", !1);
|
|
@@ -880,6 +880,7 @@ let xt, Fo = class {
|
|
|
880
880
|
R(this, "shapes", /* @__PURE__ */ new Map());
|
|
881
881
|
R(this, "message", null);
|
|
882
882
|
R(this, "theme", "light");
|
|
883
|
+
R(this, "clearFun", null);
|
|
883
884
|
Tt(this);
|
|
884
885
|
}
|
|
885
886
|
get shapesList() {
|
|
@@ -894,19 +895,19 @@ let xt, Fo = class {
|
|
|
894
895
|
return t || (this.message.info("Please add a image"), this.setInvalid()), t;
|
|
895
896
|
}
|
|
896
897
|
get nextStep() {
|
|
897
|
-
const t = this.shapesList.filter((s) => s.type === "Step"), n =
|
|
898
|
+
const t = this.shapesList.filter((s) => s.type === "Step"), n = pi(t, (s) => Number(s.text));
|
|
898
899
|
return n != null && n.text ? Number(n.text) + 1 : 1;
|
|
899
900
|
}
|
|
900
901
|
get isDark() {
|
|
901
902
|
return this.theme === "dark";
|
|
902
903
|
}
|
|
903
904
|
setTheme(t) {
|
|
904
|
-
t !== this.theme &&
|
|
905
|
+
t !== this.theme && fi(() => {
|
|
905
906
|
t ? this.theme = t : this.theme = this.isDark ? "light" : "dark";
|
|
906
907
|
});
|
|
907
908
|
}
|
|
908
909
|
setInvalid() {
|
|
909
|
-
clearTimeout(xt), this.invalid = !0, xt = setTimeout(
|
|
910
|
+
clearTimeout(xt), this.invalid = !0, xt = setTimeout(hi(() => {
|
|
910
911
|
this.invalid = !1;
|
|
911
912
|
}), 200);
|
|
912
913
|
}
|
|
@@ -943,6 +944,9 @@ let xt, Fo = class {
|
|
|
943
944
|
setStrokeWidth(t) {
|
|
944
945
|
this.strokeWidth = t;
|
|
945
946
|
}
|
|
947
|
+
setClearFun(t) {
|
|
948
|
+
this.clearFun = t;
|
|
949
|
+
}
|
|
946
950
|
clearImg() {
|
|
947
951
|
this.img = {};
|
|
948
952
|
}
|
|
@@ -951,7 +955,7 @@ let xt, Fo = class {
|
|
|
951
955
|
(t = this.app) == null || t.destroy(!0), this.app = null, this.shapes.clear(), this.setUseTool(null);
|
|
952
956
|
}
|
|
953
957
|
};
|
|
954
|
-
const
|
|
958
|
+
const Gi = new Fi(), Q = {
|
|
955
959
|
default_1: {
|
|
956
960
|
class: "bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500",
|
|
957
961
|
fill: {
|
|
@@ -1338,7 +1342,7 @@ const Lo = new Fo(), Q = {
|
|
|
1338
1342
|
}
|
|
1339
1343
|
}
|
|
1340
1344
|
};
|
|
1341
|
-
class
|
|
1345
|
+
class Li {
|
|
1342
1346
|
constructor() {
|
|
1343
1347
|
R(this, "scale", 1);
|
|
1344
1348
|
R(this, "scaleX", !1);
|
|
@@ -1411,10 +1415,10 @@ class Uo {
|
|
|
1411
1415
|
this.waterIndex = t;
|
|
1412
1416
|
}
|
|
1413
1417
|
}
|
|
1414
|
-
const
|
|
1415
|
-
editor:
|
|
1416
|
-
option:
|
|
1417
|
-
},
|
|
1418
|
+
const Ui = new Li(), o = {
|
|
1419
|
+
editor: Gi,
|
|
1420
|
+
option: Ui
|
|
1421
|
+
}, Vi = ({ disabled: i = !1, toSelect: t, locale: n = "en", theme: s = "auto" }) => {
|
|
1418
1422
|
const [a, l] = O(!1), h = () => {
|
|
1419
1423
|
l(!1);
|
|
1420
1424
|
}, f = (p) => {
|
|
@@ -1425,7 +1429,7 @@ const Vo = new Uo(), i = {
|
|
|
1425
1429
|
return /* @__PURE__ */ e.jsx(
|
|
1426
1430
|
xe,
|
|
1427
1431
|
{
|
|
1428
|
-
content: /* @__PURE__ */ e.jsx(
|
|
1432
|
+
content: /* @__PURE__ */ e.jsx(mi, { data: ui, locale: n, onEmojiSelect: d, previewPosition: "none", theme: s }),
|
|
1429
1433
|
title: "",
|
|
1430
1434
|
trigger: "click",
|
|
1431
1435
|
open: a,
|
|
@@ -1435,13 +1439,13 @@ const Vo = new Uo(), i = {
|
|
|
1435
1439
|
{
|
|
1436
1440
|
type: "text",
|
|
1437
1441
|
shape: "circle",
|
|
1438
|
-
disabled:
|
|
1442
|
+
disabled: i,
|
|
1439
1443
|
icon: /* @__PURE__ */ e.jsx(M.Smile, { size: 16 })
|
|
1440
1444
|
}
|
|
1441
1445
|
)
|
|
1442
1446
|
}
|
|
1443
1447
|
);
|
|
1444
|
-
},
|
|
1448
|
+
}, Ji = () => /* @__PURE__ */ e.jsx("h1", { children: /* @__PURE__ */ e.jsxs("a", { href: "https://shoteasy.fun", target: "_blank", "aria-label": "ShotEasy", className: "flex gap-1 text-gray-700 dark:text-gray-300 items-center text-xs font-semibold", children: [
|
|
1445
1449
|
/* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 510 510", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1446
1450
|
/* @__PURE__ */ e.jsxs("g", { filter: "url(#filter0_i_40_60)", children: [
|
|
1447
1451
|
/* @__PURE__ */ e.jsx("path", { d: "M60.1774 83.172C64.1232 61.4358 84.9426 47.0139 106.679 50.9598L271.777 80.9308C293.513 84.8767 307.935 105.696 303.989 127.432L247.462 438.817C243.516 460.553 222.696 474.975 200.96 471.029L35.8623 441.058C14.1261 437.112 -0.295702 416.293 3.65017 394.557L60.1774 83.172Z", fill: "#812BED" }),
|
|
@@ -1461,44 +1465,44 @@ const Vo = new Uo(), i = {
|
|
|
1461
1465
|
] }) })
|
|
1462
1466
|
] }),
|
|
1463
1467
|
/* @__PURE__ */ e.jsx("span", { children: "ShotEasy" })
|
|
1464
|
-
] }) }),
|
|
1465
|
-
|
|
1468
|
+
] }) }), qi = ({ children: i }) => /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex justify-end items-end gap-2 dark:text-gray-300", children: [
|
|
1469
|
+
i,
|
|
1466
1470
|
/* @__PURE__ */ e.jsx("a", { href: "https://github.com/CH563/image-beautifier", target: "_blank", "aria-label": "GitHub", className: "block rounded-full p-2 hover:bg-slate-100 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "github", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("path", { d: "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" }) }) }),
|
|
1467
1471
|
/* @__PURE__ */ e.jsx("a", { href: "https://twitter.com/LiWen563", target: "_blank", "aria-label": "twitter:@LiWen563", className: "block rounded-full p-2 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { fill: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("g", { children: /* @__PURE__ */ e.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }) })
|
|
1468
|
-
] }),
|
|
1472
|
+
] }), Xi = ["Square", "SquareFill", "Circle", "Slash", "MoveDownLeft", "Pencil", "Step", "Smile"], Qi = B(({ headLeft: i, headRight: t }) => {
|
|
1469
1473
|
const [n, s] = O(!1), a = (d) => {
|
|
1470
|
-
if (!
|
|
1471
|
-
const { useTool: p } =
|
|
1472
|
-
|
|
1474
|
+
if (!o.editor.isEditing) return;
|
|
1475
|
+
const { useTool: p } = o.editor;
|
|
1476
|
+
o.editor.setUseTool(p === d ? null : d), s(!1);
|
|
1473
1477
|
}, l = (d) => {
|
|
1474
|
-
if (!
|
|
1475
|
-
const p =
|
|
1476
|
-
|
|
1478
|
+
if (!o.editor.isEditing) return;
|
|
1479
|
+
const p = o.option.frameConf.width / 2 - 24, m = o.option.frameConf.height / 2 - 24;
|
|
1480
|
+
o.editor.setUseTool(null), s(!1), o.editor.addShape({
|
|
1477
1481
|
id: ge(),
|
|
1478
1482
|
type: "emoji",
|
|
1479
1483
|
text: d,
|
|
1480
|
-
zIndex:
|
|
1484
|
+
zIndex: o.editor.shapes.size + 1,
|
|
1481
1485
|
x: p,
|
|
1482
1486
|
y: m,
|
|
1483
1487
|
editable: !0
|
|
1484
1488
|
});
|
|
1485
1489
|
}, h = () => {
|
|
1486
|
-
if (!
|
|
1490
|
+
if (!o.editor.isEditing) return;
|
|
1487
1491
|
const d = !n;
|
|
1488
|
-
|
|
1492
|
+
o.editor.setUseTool(null), s(d), o.editor.app.config.move.drag = d;
|
|
1489
1493
|
}, f = () => {
|
|
1490
|
-
|
|
1494
|
+
o.editor.setTheme(), localStorage.setItem("SHOTEASY_BEAUTIFIER_THEME", o.editor.theme);
|
|
1491
1495
|
};
|
|
1492
1496
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center shrink-0 gap-3 bg-white dark:bg-black py-2 px-5 border-b border-b-gray-50 dark:border-b-gray-700 shadow-sm relative z-[11] select-none", children: [
|
|
1493
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1", children:
|
|
1494
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children:
|
|
1495
|
-
if (d === "Smile") return /* @__PURE__ */ e.jsx(
|
|
1497
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1", children: i || /* @__PURE__ */ e.jsx(Ji, {}) }),
|
|
1498
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children: Xi.map((d) => {
|
|
1499
|
+
if (d === "Smile") return /* @__PURE__ */ e.jsx(Vi, { disabled: !1, theme: o.editor.isDark ? "dark" : "light", toSelect: l }, d);
|
|
1496
1500
|
let p;
|
|
1497
1501
|
if (d.includes("Fill")) {
|
|
1498
1502
|
const m = d.replace("Fill", ""), b = dt[m];
|
|
1499
1503
|
p = /* @__PURE__ */ e.jsx(b, { size: 16, fill: "currentColor" });
|
|
1500
1504
|
} else if (d === "Step")
|
|
1501
|
-
p = /* @__PURE__ */ e.jsx("div", { className: "border text-xs border-black dark:border-white w-4 h-4 rounded-full text-center leading-4", children:
|
|
1505
|
+
p = /* @__PURE__ */ e.jsx("div", { className: "border text-xs border-black dark:border-white w-4 h-4 rounded-full text-center leading-4", children: o.editor.nextStep }, d);
|
|
1502
1506
|
else {
|
|
1503
1507
|
const m = dt[d];
|
|
1504
1508
|
p = /* @__PURE__ */ e.jsx(m, { name: d, size: 16 });
|
|
@@ -1509,7 +1513,7 @@ const Vo = new Uo(), i = {
|
|
|
1509
1513
|
type: "text",
|
|
1510
1514
|
shape: "circle",
|
|
1511
1515
|
icon: p,
|
|
1512
|
-
className:
|
|
1516
|
+
className: o.editor.useTool === d && "text-[#1a79ff] [&_.border]:border-[#1a79ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1a79ff] [&_.border]:hover:text-[#1a79ff]",
|
|
1513
1517
|
onClick: () => a(d)
|
|
1514
1518
|
},
|
|
1515
1519
|
d
|
|
@@ -1537,11 +1541,11 @@ const Vo = new Uo(), i = {
|
|
|
1537
1541
|
]
|
|
1538
1542
|
}
|
|
1539
1543
|
],
|
|
1540
|
-
value:
|
|
1541
|
-
onChange: (d) =>
|
|
1544
|
+
value: o.editor.annotateColor,
|
|
1545
|
+
onChange: (d) => o.editor.setAnnotateColor(d.toHexString())
|
|
1542
1546
|
}
|
|
1543
1547
|
),
|
|
1544
|
-
/* @__PURE__ */ e.jsx(
|
|
1548
|
+
/* @__PURE__ */ e.jsx(zi, { defaultValue: o.editor.strokeWidth, onChange: (d) => o.editor.setStrokeWidth(d) }),
|
|
1545
1549
|
/* @__PURE__ */ e.jsx(
|
|
1546
1550
|
k,
|
|
1547
1551
|
{
|
|
@@ -1553,96 +1557,96 @@ const Vo = new Uo(), i = {
|
|
|
1553
1557
|
}
|
|
1554
1558
|
)
|
|
1555
1559
|
] }),
|
|
1556
|
-
t || /* @__PURE__ */ e.jsx(
|
|
1560
|
+
t || /* @__PURE__ */ e.jsx(qi, { children: /* @__PURE__ */ e.jsx(
|
|
1557
1561
|
k,
|
|
1558
1562
|
{
|
|
1559
1563
|
type: "text",
|
|
1560
1564
|
shape: "circle",
|
|
1561
|
-
icon:
|
|
1565
|
+
icon: o.editor.isDark ? /* @__PURE__ */ e.jsx(M.Sun, { size: 16 }) : /* @__PURE__ */ e.jsx(M.Moon, { size: 16 }),
|
|
1562
1566
|
onClick: f
|
|
1563
1567
|
}
|
|
1564
1568
|
) })
|
|
1565
1569
|
] });
|
|
1566
1570
|
});
|
|
1567
|
-
function
|
|
1568
|
-
var t = typeof
|
|
1569
|
-
return
|
|
1571
|
+
function $i(i) {
|
|
1572
|
+
var t = typeof i;
|
|
1573
|
+
return i != null && (t == "object" || t == "function");
|
|
1570
1574
|
}
|
|
1571
|
-
var Ht =
|
|
1572
|
-
return
|
|
1573
|
-
},
|
|
1574
|
-
function
|
|
1575
|
-
for (var t =
|
|
1575
|
+
var Ht = $i, Ki = typeof ue == "object" && ue && ue.Object === Object && ue, eo = Ki, to = eo, ro = typeof self == "object" && self && self.Object === Object && self, io = to || ro || Function("return this")(), zt = io, oo = zt, so = function() {
|
|
1576
|
+
return oo.Date.now();
|
|
1577
|
+
}, no = so, ao = /\s/;
|
|
1578
|
+
function lo(i) {
|
|
1579
|
+
for (var t = i.length; t-- && ao.test(i.charAt(t)); )
|
|
1576
1580
|
;
|
|
1577
1581
|
return t;
|
|
1578
1582
|
}
|
|
1579
|
-
var
|
|
1580
|
-
function
|
|
1581
|
-
return
|
|
1583
|
+
var co = lo, fo = co, ho = /^\s+/;
|
|
1584
|
+
function po(i) {
|
|
1585
|
+
return i && i.slice(0, fo(i) + 1).replace(ho, "");
|
|
1582
1586
|
}
|
|
1583
|
-
var
|
|
1584
|
-
function
|
|
1585
|
-
var t =
|
|
1587
|
+
var uo = po, mo = zt, go = mo.Symbol, _t = go, bt = _t, Et = Object.prototype, xo = Et.hasOwnProperty, bo = Et.toString, se = bt ? bt.toStringTag : void 0;
|
|
1588
|
+
function wo(i) {
|
|
1589
|
+
var t = xo.call(i, se), n = i[se];
|
|
1586
1590
|
try {
|
|
1587
|
-
|
|
1591
|
+
i[se] = void 0;
|
|
1588
1592
|
var s = !0;
|
|
1589
1593
|
} catch {
|
|
1590
1594
|
}
|
|
1591
|
-
var a =
|
|
1592
|
-
return s && (t ?
|
|
1595
|
+
var a = bo.call(i);
|
|
1596
|
+
return s && (t ? i[se] = n : delete i[se]), a;
|
|
1593
1597
|
}
|
|
1594
|
-
var
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1598
|
+
var yo = wo, vo = Object.prototype, jo = vo.toString;
|
|
1599
|
+
function Mo(i) {
|
|
1600
|
+
return jo.call(i);
|
|
1597
1601
|
}
|
|
1598
|
-
var
|
|
1599
|
-
function
|
|
1600
|
-
return
|
|
1602
|
+
var Co = Mo, wt = _t, ko = yo, Ao = Co, No = "[object Null]", To = "[object Undefined]", yt = wt ? wt.toStringTag : void 0;
|
|
1603
|
+
function So(i) {
|
|
1604
|
+
return i == null ? i === void 0 ? To : No : yt && yt in Object(i) ? ko(i) : Ao(i);
|
|
1601
1605
|
}
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1606
|
+
var Ro = So;
|
|
1607
|
+
function Do(i) {
|
|
1608
|
+
return i != null && typeof i == "object";
|
|
1605
1609
|
}
|
|
1606
|
-
var
|
|
1607
|
-
function
|
|
1608
|
-
return typeof
|
|
1610
|
+
var Ho = Do, zo = Ro, _o = Ho, Eo = "[object Symbol]";
|
|
1611
|
+
function Oo(i) {
|
|
1612
|
+
return typeof i == "symbol" || _o(i) && zo(i) == Eo;
|
|
1609
1613
|
}
|
|
1610
|
-
var
|
|
1611
|
-
function
|
|
1612
|
-
if (typeof
|
|
1613
|
-
return
|
|
1614
|
-
if (
|
|
1614
|
+
var Bo = Oo, Yo = uo, vt = Ht, Io = Bo, jt = NaN, Po = /^[-+]0x[0-9a-f]+$/i, Wo = /^0b[01]+$/i, Zo = /^0o[0-7]+$/i, Fo = parseInt;
|
|
1615
|
+
function Go(i) {
|
|
1616
|
+
if (typeof i == "number")
|
|
1617
|
+
return i;
|
|
1618
|
+
if (Io(i))
|
|
1615
1619
|
return jt;
|
|
1616
|
-
if (vt(
|
|
1617
|
-
var t = typeof
|
|
1618
|
-
|
|
1620
|
+
if (vt(i)) {
|
|
1621
|
+
var t = typeof i.valueOf == "function" ? i.valueOf() : i;
|
|
1622
|
+
i = vt(t) ? t + "" : t;
|
|
1619
1623
|
}
|
|
1620
|
-
if (typeof
|
|
1621
|
-
return
|
|
1622
|
-
|
|
1623
|
-
var n =
|
|
1624
|
-
return n ||
|
|
1624
|
+
if (typeof i != "string")
|
|
1625
|
+
return i === 0 ? i : +i;
|
|
1626
|
+
i = Yo(i);
|
|
1627
|
+
var n = Wo.test(i);
|
|
1628
|
+
return n || Zo.test(i) ? Fo(i.slice(2), n ? 2 : 8) : Po.test(i) ? jt : +i;
|
|
1625
1629
|
}
|
|
1626
|
-
var
|
|
1627
|
-
function
|
|
1630
|
+
var Lo = Go, Uo = Ht, He = no, Mt = Lo, Vo = "Expected a function", Jo = Math.max, qo = Math.min;
|
|
1631
|
+
function Xo(i, t, n) {
|
|
1628
1632
|
var s, a, l, h, f, d, p = 0, m = !1, b = !1, C = !0;
|
|
1629
|
-
if (typeof
|
|
1630
|
-
throw new TypeError(
|
|
1631
|
-
t = Mt(t) || 0,
|
|
1633
|
+
if (typeof i != "function")
|
|
1634
|
+
throw new TypeError(Vo);
|
|
1635
|
+
t = Mt(t) || 0, Uo(n) && (m = !!n.leading, b = "maxWait" in n, l = b ? Jo(Mt(n.maxWait) || 0, t) : l, C = "trailing" in n ? !!n.trailing : C);
|
|
1632
1636
|
function A(D) {
|
|
1633
|
-
var
|
|
1634
|
-
return s = a = void 0, p = D, h =
|
|
1637
|
+
var F = s, U = a;
|
|
1638
|
+
return s = a = void 0, p = D, h = i.apply(U, F), h;
|
|
1635
1639
|
}
|
|
1636
1640
|
function x(D) {
|
|
1637
1641
|
return p = D, f = setTimeout(_, t), m ? A(D) : h;
|
|
1638
1642
|
}
|
|
1639
1643
|
function w(D) {
|
|
1640
|
-
var
|
|
1641
|
-
return b ?
|
|
1644
|
+
var F = D - d, U = D - p, K = t - F;
|
|
1645
|
+
return b ? qo(K, l - U) : K;
|
|
1642
1646
|
}
|
|
1643
1647
|
function S(D) {
|
|
1644
|
-
var
|
|
1645
|
-
return d === void 0 ||
|
|
1648
|
+
var F = D - d, U = D - p;
|
|
1649
|
+
return d === void 0 || F >= t || F < 0 || b && U >= l;
|
|
1646
1650
|
}
|
|
1647
1651
|
function _() {
|
|
1648
1652
|
var D = He();
|
|
@@ -1660,8 +1664,8 @@ function Xi(o, t, n) {
|
|
|
1660
1664
|
return f === void 0 ? h : E(He());
|
|
1661
1665
|
}
|
|
1662
1666
|
function $() {
|
|
1663
|
-
var D = He(),
|
|
1664
|
-
if (s = arguments, a = this, d = D,
|
|
1667
|
+
var D = He(), F = S(D);
|
|
1668
|
+
if (s = arguments, a = this, d = D, F) {
|
|
1665
1669
|
if (f === void 0)
|
|
1666
1670
|
return x(d);
|
|
1667
1671
|
if (b)
|
|
@@ -1671,15 +1675,15 @@ function Xi(o, t, n) {
|
|
|
1671
1675
|
}
|
|
1672
1676
|
return $.cancel = ye, $.flush = ve, $;
|
|
1673
1677
|
}
|
|
1674
|
-
var
|
|
1675
|
-
const $
|
|
1676
|
-
(s) => st(s, { ...
|
|
1677
|
-
)) :
|
|
1678
|
-
(s) => st(s, { ...
|
|
1679
|
-
), rs = ({ width:
|
|
1678
|
+
var Qo = Xo;
|
|
1679
|
+
const $o = /* @__PURE__ */ Si(Qo), Ko = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDI0LTA0LTE1VDEyOjUwOjI3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHN0RXZ0OndoZW49IjIwMjQtMDQtMTVUMTI6NTA6MjcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7YEaJEAAAFqUlEQVRoge2Z709TVxjHT2kpFMpCLdSWdiWYFVK0IAV0yBqNYQ2CI062ie4PcJq9QZAfmRq0UwQmIRjjFBeXOJfAYHEYZ81ixQUmJhbkBb9aSotcpHDbYltbU0t69+LqXQPa9Nyit0v6zXlx2p7v8zyfe0977jmlYRgG/s+KorqAUBUBoFoRAKoVAaBaEQCqFQGgWhEAqsUIfqjZbG5parI7HLV1dRKJZPUAt9uNoqhucvKfgQGTyYRaLAtmMwBAIpGkpqbKsrJy5PLU1NS4uLg1Kx8AgAWtcy0tdADoANTX1vp8Pv+PrFZrT3f3gf37JRs24GPe2AQ83tcHDvx6/brFYgk+b2BBABytqsLr+PbwYY/Hg7/pdDp/6+r6rLQ0hsEIUPqKVlpc/HtPj9frDR0AYgpFRb36wtBoNBqNBgAYGhpSNTTcvn17eXmZGCaRSKRS6YdisSAlZR2HgyCI0WhEEGTk8WOHw4GPUavVmnv3KioqVKdPC4XC9zSF6mpq8OtXVVmJYVhXZ+dHaWnERWUxmV+Vl/9y7dro6OjS0tLy8jJhdLlc8/Pz9/v6TjY05GRn+9+Kop07dTpdKHeADMA3Bw+ebWzkJibiLxk02u6Skr6+PqfTGTiCz+czm82qU6dEKSkEw+asrIeDg+8VQMDjxcfG4v342NiWpqYXL15AZR0YGMiTy/0ZDAYDZOWvRAaAaHExMa3nzpFLPDo6qigsJEJ9vmePy+UiEYc8ADcx8ceLF0mkJDQ9Pb01Px+PxqTTz7e3kwhCHqCstPTp06cGg2HqtfR6/bNnz6DSa7VakUCAB9wklZpMJsj6YQBqqqv9AVLWr5dt3JiZkUE0aXr67pKSmZkZqArOnjlDxGxpboasHwbgu/r6YBapjsuXoSqw2Wxb8vJwr3zzZgRBoOwQD3OFCkVSUlJCQsIHb1duXt6OHTugFiIOh1N55Ai+Mk7p9dPT01B2iJVYqVT+pdHMPnlCrMT+wjCMwWBIMzNFIhFUBQCAjwsKxGLxzMyMy+XS6XQKhQLCDHW/3pGcTmfFvn34LDp86BCUNyz2A2w2WyaT4X2DXg/lDQsAAACfz8c7iygKZQwXgOTkZBaLBQBAFxehjOECwGazmUwmAOD58+dQxnABWFxcdLvdAIB1XC6UMVwAUBT1er0AAF5yMpQxLABevnw5OTGB95PeHQCGYT9duVJYUHD50iVsTf9ZW1hY0Ny9i/ezs7PhzMEvGWNjY2KhkA4Aj8vVarVQy01g/XHjBvEo1dPdDeWFuANxLFYihwMAsFqt59vb8SkbuhwOx4ULF/C+QCBIz8iA80Ph/vD6aIjFZN5Rq6G8b9PZxkb/PYbD4YCywwGYTCZZZiaeLE8un52dhbKv1uPhYWJDw2axujo7YSNAP8y1t7VFR0XhKUt27VpaWoKNQMhsNn+ybRtx+b/cu9ftdsMGgQaw2+3KoiIia7FSqdfrYYNgGIYgyJ6ysv/2dzzePY2GRBwyj9PDQ0NpYjGRe2t+/t/370NF6O/v35Kb63+60dbauuK8NUiR3A/c7O0V8fn+p7Ynjh+fn5/3P5BbLa/Xq9PpGk6cEItEhJdJpx8/doxcGRhpAAzDBh88WHFOmC2T1dfW3lGrjUaj1Wr1eDw+n8/tdttsNsPU1M3e3qrKSuIrizeRQNDS3BwYO7BoWAhr6uTExNHq6j9v3fJ/k8FgbJLJ+AKBSChMSEhAUdRms80hyMjIyAq7QqFoUKm2b99OugAAQt5S2u32n69e9f8xCaZlSCTfq1SwBxBv1Nrsiefm5q50dHxRXr4+KSlw6bk5OadOnhwfH1+TvFiIU2iFXC6X0Wh8ODioffTIYrFYLBar1RodHR0fH89ms3Pk8k+VyvT0dD6fv/pQg7TWEoAShcV+IBRFAKhWBIBqRQCoVgSAakUAqFYEgGr9C1O6hDD/uqSdAAAAAElFTkSuQmCC", es = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPqSURBVFiFxdZ/TFVlGMDx7/seLnjFewE3B1xwM62tlGJYSCIBBbv2g8JMakaptZpzi2T2Y/lPqzblnzYG/cVG2tJ+mavl1qZm05rSykEO0QDBgIvA5e4yvRe4F7ic0x90b5d7D4JwWM9f55w9z57P+7xn7zmkHRj4Ie3AQBH/U8SgUrPCohx/97z3aFqiqQ20YdCGhSpvTSqqB5ThSx3t7oOl9zsXAyAAPrkwUptqlRV6CT6fv6dye1HqePL63d6G+sNGAySAzapc023u9/dWbtuY7u5sMo00Hfs09a0L+YsC0ITm0W1elmdz97RKACVppVCWrzmRfnAgx3iApnl1m3ddkcFn5nvtAAlonDISMbU6ZAjg8/t7K5/bOK05QGx6VvDSUMTUBFTVG2q+bVNo7NMSLSnht4YhpgAxije08u6rUc1zcvN446kMMm0mwxESoKWt1bX3hUeT9Vaek5vHiVPn2FOYwqGyJErXmSMRJ1dW9WcvCPDB1szBMVvOTmlO0CITHil4DCmnXFLA+8WWSESipoqf5juJ0IpHztd9Zc4q2yGXWKchfjl7BlVV/yvQR8x7O5TwmwlHU/PSh3e1T7o6tmqBMQHQ1+vgRq+DzU8+gxACACGgYE0cQ6MqV52BYPkSoMxa/PZZz88f35gXAGCip7ElEtHSfIn+oWHsdjv/GhBA3l0LR0QBQogNL3dOujqeDSIuN/6G954yCteuMBShCwD97bjS2o5n9RYKVscZhpgRANHbEXBfp2vZQ7hi0g1D3BYQQoRtx7ijEUd6KU5frCGIWQEwfTsmPf1iou8yDlsJzhHIj0BsWhXHX4MBem5OzgkxJ0DkJCYG20XA/TfdywtxjsrpCAGxMYLT7WPh5TMioo7e28VIQ/3RZdnlO6Q5QRtt/p7BuhK+a+jkozNe1LDjq9Md0CtPQOPkkeoj68MfijsBBCM+b/d2X+PXX6i+W0KaE7DkV/BEeQVbMq1cdweovzjKeCDqVKdeOX5us7iWhWSzeKfm93kDAOJzX3vJ13Tsc9XvEQBKYhrxD76I+b7HMaWui8r/TPn21yLREfylu4mqFYv9tY3zBughgqEkphFrewDFmoqIXcqXhSl/lMS7NkSU96GOZ8z5JdQLvcMKQPN7Cbg6GO/9kzp7RtfzKYHokYAFIX0LAoD+tyMYh19/tWvX3ZZVMxYLEb9gwEyIWZtPhWYIIBJx6JXy7jk0B0Hbgl5CvXhvZ4W9aq38BkicPVt8aDgAQKvam43k9CyIfkwy445OwrmG2F9zEVUrBvpmbK5qT4t91UOLMoFgaFV7kpCmN0GUAMmAE8SPmESt2Fc9BPAP1KEkwmzcLhwAAAAASUVORK5CYII=", ts = (i, t) => t instanceof Array ? t.map((n) => ot.toArray(n).map(
|
|
1680
|
+
(s) => st(s, { ...i })
|
|
1681
|
+
)) : ot.toArray(t).map(
|
|
1682
|
+
(s) => st(s, { ...i })
|
|
1683
|
+
), rs = ({ width: i, height: t, background: n, parent: s, children: a, cursor: l }) => {
|
|
1680
1684
|
const h = le(() => {
|
|
1681
|
-
const f = new
|
|
1682
|
-
width:
|
|
1685
|
+
const f = new gi({
|
|
1686
|
+
width: i,
|
|
1683
1687
|
height: t,
|
|
1684
1688
|
overflow: "hide",
|
|
1685
1689
|
fill: n,
|
|
@@ -1688,21 +1692,21 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1688
1692
|
return f.name = "frame", f;
|
|
1689
1693
|
}, []);
|
|
1690
1694
|
return N(() => {
|
|
1691
|
-
h.width =
|
|
1692
|
-
}, [
|
|
1695
|
+
h.width = i, h.height = t, h.fill = n;
|
|
1696
|
+
}, [i, t, n]), N(() => {
|
|
1693
1697
|
h.cursor = l || "auto";
|
|
1694
1698
|
}, [l]), N(() => (s.add(h), () => {
|
|
1695
1699
|
h.remove();
|
|
1696
1700
|
}), [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: ts({ parent: h }, a) });
|
|
1697
|
-
},
|
|
1701
|
+
}, is = `
|
|
1698
1702
|
<svg width="43" height="32" viewBox="0 0 52 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 24.75C9.17564 24.75 11.75 22.1756 11.75 19C11.75 15.8244 9.17564 13.25 6 13.25C2.82436 13.25 0.25 15.8244 0.25 19C0.25 22.1756 2.82436 24.75 6 24.75Z" fill="#FF5F57" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M26 24.75C29.1756 24.75 31.75 22.1756 31.75 19C31.75 15.8244 29.1756 13.25 26 13.25C22.8244 13.25 20.25 15.8244 20.25 19C20.25 22.1756 22.8244 24.75 26 24.75Z" fill="#FEBC2E" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M46 24.75C49.1756 24.75 51.75 22.1756 51.75 19C51.75 15.8244 49.1756 13.25 46 13.25C42.8244 13.25 40.25 15.8244 40.25 19C40.25 22.1756 42.8244 24.75 46 24.75Z" fill="#28C840" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path></svg>
|
|
1699
|
-
`,
|
|
1703
|
+
`, os = _e(is), ss = B(({ parent: i }) => {
|
|
1700
1704
|
const t = ne(null), [n, s, a] = le(() => {
|
|
1701
1705
|
const l = new ae({
|
|
1702
1706
|
origin: "center",
|
|
1703
1707
|
fill: {
|
|
1704
1708
|
type: "image",
|
|
1705
|
-
url:
|
|
1709
|
+
url: o.editor.img.src
|
|
1706
1710
|
}
|
|
1707
1711
|
}), h = new ft({
|
|
1708
1712
|
overflow: "hide",
|
|
@@ -1715,14 +1719,14 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1715
1719
|
children: [h]
|
|
1716
1720
|
});
|
|
1717
1721
|
return [l, h, f];
|
|
1718
|
-
}, [
|
|
1722
|
+
}, [i]);
|
|
1719
1723
|
return N(() => {
|
|
1720
|
-
|
|
1721
|
-
}, [
|
|
1722
|
-
const { round: l } =
|
|
1724
|
+
o.option.padding === 0 ? s.fill = "#ffffff00" : s.fill = o.option.paddingBg;
|
|
1725
|
+
}, [o.option.paddingBg, o.option.padding]), N(() => {
|
|
1726
|
+
const { round: l } = o.option;
|
|
1723
1727
|
a.cornerRadius = l, t.current ? (t.current.cornerRadius = [l, l, 0, 0], s.cornerRadius = [0, 0, l, l], n.cornerRadius = [0, 0, l, l]) : (s.cornerRadius = l, n.cornerRadius = l);
|
|
1724
|
-
}, [
|
|
1725
|
-
const { shadow: l } =
|
|
1728
|
+
}, [o.option.round]), N(() => {
|
|
1729
|
+
const { shadow: l } = o.option;
|
|
1726
1730
|
l === 0 ? a.shadow = null : a.shadow = {
|
|
1727
1731
|
x: l * 4,
|
|
1728
1732
|
y: l * 4,
|
|
@@ -1730,16 +1734,16 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1730
1734
|
color: "#00000045",
|
|
1731
1735
|
box: !0
|
|
1732
1736
|
};
|
|
1733
|
-
}, [
|
|
1734
|
-
a.scale =
|
|
1735
|
-
}, [
|
|
1736
|
-
n.url =
|
|
1737
|
-
}, [
|
|
1738
|
-
n.scaleX =
|
|
1739
|
-
}, [
|
|
1740
|
-
n.scaleY =
|
|
1741
|
-
}, [
|
|
1742
|
-
const { align: l, round: h, frame: f, frameConf: d } =
|
|
1737
|
+
}, [o.option.shadow]), N(() => {
|
|
1738
|
+
a.scale = o.option.scale;
|
|
1739
|
+
}, [o.option.scale]), N(() => {
|
|
1740
|
+
n.url = o.editor.img.src;
|
|
1741
|
+
}, [o.editor.img.src]), N(() => {
|
|
1742
|
+
n.scaleX = o.option.scaleX ? -1 : 1;
|
|
1743
|
+
}, [o.option.scaleX]), N(() => {
|
|
1744
|
+
n.scaleY = o.option.scaleY ? -1 : 1;
|
|
1745
|
+
}, [o.option.scaleY]), N(() => {
|
|
1746
|
+
const { align: l, round: h, frame: f, frameConf: d } = o.option, p = we(d.width, d.height), { width: m, height: b } = Bi(o.editor.img.width, o.editor.img.height, d.width - p, d.height - p);
|
|
1743
1747
|
let C = b;
|
|
1744
1748
|
switch (f) {
|
|
1745
1749
|
case "light":
|
|
@@ -1759,44 +1763,44 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1759
1763
|
draggable: !0,
|
|
1760
1764
|
fill: [
|
|
1761
1765
|
{ type: "solid", color: f.includes("Dark") ? "#3a3a3b" : "#ffffff" },
|
|
1762
|
-
{ type: "image", url:
|
|
1766
|
+
{ type: "image", url: os, format: "svg", mode: "clip", offset: { x: 10, y: 0 } }
|
|
1763
1767
|
]
|
|
1764
1768
|
}), a.addAfter(t.current, s), s.cornerRadius = [0, 0, h, h], n.cornerRadius = [0, 0, h, h];
|
|
1765
1769
|
break;
|
|
1766
1770
|
default:
|
|
1767
1771
|
a.strokeWidth = null, a.stroke = null;
|
|
1768
1772
|
}
|
|
1769
|
-
const { x: A, y: x } =
|
|
1773
|
+
const { x: A, y: x } = Ii(l, d.width - m, d.height - C);
|
|
1770
1774
|
a.width = m, a.height = C, a.origin = l, a.x = A, a.y = x, s.width = m, s.height = b, s.x = 0, s.y = C - b;
|
|
1771
|
-
const w = m -
|
|
1772
|
-
return n.width = w + 2, n.height = S + 2, n.x =
|
|
1775
|
+
const w = m - o.option.padding, S = Math.round(w * b / m);
|
|
1776
|
+
return n.width = w + 2, n.height = S + 2, n.x = o.option.padding / 2 - 1, n.y = (b - S) / 2 - 1, () => {
|
|
1773
1777
|
var _;
|
|
1774
|
-
a.strokeWidth = null, a.stroke = null, (_ = t.current) == null || _.remove(), t.current = null, s.cornerRadius =
|
|
1778
|
+
a.strokeWidth = null, a.stroke = null, (_ = t.current) == null || _.remove(), t.current = null, s.cornerRadius = o.option.round, n.cornerRadius = o.option.round;
|
|
1775
1779
|
};
|
|
1776
|
-
}, [
|
|
1780
|
+
}, [o.option.frameConf.width, o.option.frameConf.height, o.option.padding, o.option.align, o.option.frame]), N(() => (i.add(a), () => {
|
|
1777
1781
|
a.remove();
|
|
1778
|
-
}), [
|
|
1779
|
-
}), ns = B(({ parent:
|
|
1782
|
+
}), [i]), null;
|
|
1783
|
+
}), ns = B(({ parent: i }) => {
|
|
1780
1784
|
const t = le(() => new ae({
|
|
1781
1785
|
x: 0,
|
|
1782
1786
|
y: 0
|
|
1783
|
-
}), [
|
|
1787
|
+
}), [i]);
|
|
1784
1788
|
return N(() => {
|
|
1785
|
-
t.width =
|
|
1786
|
-
}, [
|
|
1787
|
-
t.zIndex =
|
|
1788
|
-
}, [
|
|
1789
|
+
t.width = o.option.frameConf.width, t.height = o.option.frameConf.height;
|
|
1790
|
+
}, [o.option.frameConf.width, o.option.frameConf.height]), N(() => {
|
|
1791
|
+
t.zIndex = o.option.waterIndex;
|
|
1792
|
+
}, [o.option.waterIndex]), N(() => {
|
|
1789
1793
|
t.fill = {
|
|
1790
1794
|
type: "image",
|
|
1791
|
-
url:
|
|
1795
|
+
url: o.option.waterSvg,
|
|
1792
1796
|
mode: "repeat",
|
|
1793
1797
|
format: "svg",
|
|
1794
|
-
size: Math.round(
|
|
1798
|
+
size: Math.round(o.option.frameConf.width / 6)
|
|
1795
1799
|
};
|
|
1796
|
-
}, [
|
|
1800
|
+
}, [o.option.waterSvg, o.option.frameConf.width]), N(() => (i.add(t), () => {
|
|
1797
1801
|
t.remove();
|
|
1798
1802
|
}), []), null;
|
|
1799
|
-
}), as = ({ parent:
|
|
1803
|
+
}), as = ({ parent: i, type: t, id: n, width: s, height: a, x: l, y: h, fill: f, strokeWidth: d, zIndex: p, points: m, editable: b, text: C }) => {
|
|
1800
1804
|
const A = le(() => {
|
|
1801
1805
|
const x = { id: n, x: l, y: h, zIndex: p };
|
|
1802
1806
|
return t === "SquareFill" ? new ae({
|
|
@@ -1817,7 +1821,7 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1817
1821
|
zIndex: p,
|
|
1818
1822
|
stroke: f,
|
|
1819
1823
|
strokeWidth: d
|
|
1820
|
-
}) : t === "MoveDownLeft" ? new
|
|
1824
|
+
}) : t === "MoveDownLeft" ? new ki({
|
|
1821
1825
|
id: n,
|
|
1822
1826
|
points: m,
|
|
1823
1827
|
zIndex: p,
|
|
@@ -1854,12 +1858,12 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1854
1858
|
},
|
|
1855
1859
|
{
|
|
1856
1860
|
type: "image",
|
|
1857
|
-
url:
|
|
1861
|
+
url: Zi(C),
|
|
1858
1862
|
format: "svg",
|
|
1859
1863
|
align: "center"
|
|
1860
1864
|
}
|
|
1861
1865
|
]
|
|
1862
|
-
}) : t === "emoji" ? new
|
|
1866
|
+
}) : t === "emoji" ? new xi({
|
|
1863
1867
|
id: n,
|
|
1864
1868
|
zIndex: p,
|
|
1865
1869
|
text: C,
|
|
@@ -1873,29 +1877,29 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1873
1877
|
height: a,
|
|
1874
1878
|
...x
|
|
1875
1879
|
});
|
|
1876
|
-
}, [
|
|
1880
|
+
}, [i]);
|
|
1877
1881
|
return N(() => {
|
|
1878
1882
|
["Slash", "MoveDownLeft", "Pencil"].includes(t) ? A.points = m : t === "Step" || (A.x = l, A.y = h, A.width = s, A.height = a);
|
|
1879
1883
|
}, [l, h, s, a]), N(() => {
|
|
1880
1884
|
A.editable = !!b;
|
|
1881
|
-
}, [b]), N(() => (
|
|
1885
|
+
}, [b]), N(() => (i.add(A), () => {
|
|
1882
1886
|
A.remove();
|
|
1883
|
-
}), [
|
|
1887
|
+
}), [i]), null;
|
|
1884
1888
|
}, ls = B(() => (N(() => {
|
|
1885
|
-
const
|
|
1889
|
+
const i = (s) => {
|
|
1886
1890
|
var l;
|
|
1887
|
-
const { list: a } = (l =
|
|
1891
|
+
const { list: a } = (l = o.editor.app) == null ? void 0 : l.editor;
|
|
1888
1892
|
if (a != null && a.length) {
|
|
1889
1893
|
for (let h of a)
|
|
1890
|
-
h.remove(),
|
|
1891
|
-
|
|
1894
|
+
h.remove(), o.editor.removeShape(h);
|
|
1895
|
+
o.editor.app.editor.cancel();
|
|
1892
1896
|
}
|
|
1893
1897
|
}, t = (s) => {
|
|
1894
1898
|
var a, l;
|
|
1895
|
-
s === "fit" ? (a =
|
|
1899
|
+
s === "fit" ? (a = o.editor.app) == null || a.tree.zoom(s, 100) : (l = o.editor.app) == null || l.tree.zoom(s), o.editor.setScale(o.editor.app.tree.scale);
|
|
1896
1900
|
}, n = Rt(window, {
|
|
1897
|
-
Backspace:
|
|
1898
|
-
Delete:
|
|
1901
|
+
Backspace: i,
|
|
1902
|
+
Delete: i,
|
|
1899
1903
|
"$mod+Minus": (s) => {
|
|
1900
1904
|
s.preventDefault(), t("out");
|
|
1901
1905
|
},
|
|
@@ -1910,12 +1914,12 @@ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
1910
1914
|
n();
|
|
1911
1915
|
};
|
|
1912
1916
|
}, [window]), null));
|
|
1913
|
-
|
|
1914
|
-
const cs = B(({ target:
|
|
1917
|
+
bi.set("pencil", { url: es });
|
|
1918
|
+
const cs = B(({ target: i }) => {
|
|
1915
1919
|
var t, n;
|
|
1916
1920
|
return N(() => {
|
|
1917
|
-
const s = new
|
|
1918
|
-
view:
|
|
1921
|
+
const s = new wi({
|
|
1922
|
+
view: i,
|
|
1919
1923
|
editor: {
|
|
1920
1924
|
lockRatio: "corner",
|
|
1921
1925
|
stroke: "#3f99f7",
|
|
@@ -1927,7 +1931,7 @@ const cs = B(({ target: o }) => {
|
|
|
1927
1931
|
height: 20,
|
|
1928
1932
|
fill: {
|
|
1929
1933
|
type: "image",
|
|
1930
|
-
url:
|
|
1934
|
+
url: Ko
|
|
1931
1935
|
}
|
|
1932
1936
|
}
|
|
1933
1937
|
},
|
|
@@ -1939,71 +1943,71 @@ const cs = B(({ target: o }) => {
|
|
|
1939
1943
|
usePartRender: !0
|
|
1940
1944
|
}
|
|
1941
1945
|
});
|
|
1942
|
-
new
|
|
1943
|
-
|
|
1944
|
-
}), s.tree.on(
|
|
1945
|
-
|
|
1946
|
+
new Ai(s), o.editor.setApp(s), s.tree.on(yi.ZOOM, () => {
|
|
1947
|
+
o.editor.setScale(s.tree.scale);
|
|
1948
|
+
}), s.tree.on(vi.RESIZE, () => {
|
|
1949
|
+
o.editor.setScale(s.tree.scale);
|
|
1946
1950
|
});
|
|
1947
1951
|
let a = null;
|
|
1948
1952
|
const l = (f) => {
|
|
1949
|
-
if (!
|
|
1953
|
+
if (!o.editor.useTool) return;
|
|
1950
1954
|
const { target: d } = f;
|
|
1951
|
-
if (
|
|
1955
|
+
if (o.editor.getShape(d.id)) return;
|
|
1952
1956
|
a = ge();
|
|
1953
|
-
const m = f.getPageBounds ? f.getPageBounds() : f.getPage(), b =
|
|
1957
|
+
const m = f.getPageBounds ? f.getPageBounds() : f.getPage(), b = o.editor.useTool;
|
|
1954
1958
|
return {
|
|
1955
1959
|
id: a,
|
|
1956
1960
|
type: b,
|
|
1957
|
-
fill:
|
|
1958
|
-
strokeWidth:
|
|
1959
|
-
zIndex:
|
|
1961
|
+
fill: o.editor.annotateColor,
|
|
1962
|
+
strokeWidth: o.editor.strokeWidth,
|
|
1963
|
+
zIndex: o.editor.shapes.size + 1,
|
|
1960
1964
|
...m
|
|
1961
1965
|
};
|
|
1962
1966
|
};
|
|
1963
|
-
s.tree.on(
|
|
1964
|
-
if (
|
|
1967
|
+
s.tree.on(ji.DOWN, (f) => {
|
|
1968
|
+
if (o.editor.useTool !== "Step") return;
|
|
1965
1969
|
const p = l(f);
|
|
1966
|
-
p && (p.text =
|
|
1970
|
+
p && (p.text = o.editor.nextStep, p.editable = !0, o.editor.addShape(p), a = null, o.editor.setUseTool(null));
|
|
1967
1971
|
}), s.tree.on(De.START, (f) => {
|
|
1968
|
-
const d =
|
|
1972
|
+
const d = o.editor.useTool;
|
|
1969
1973
|
if (d === "Step") return;
|
|
1970
1974
|
const p = l(f);
|
|
1971
|
-
p && (["Slash", "MoveDownLeft", "Pencil"].includes(d) && (p.points = [p.x, p.y]),
|
|
1975
|
+
p && (["Slash", "MoveDownLeft", "Pencil"].includes(d) && (p.points = [p.x, p.y]), o.editor.addShape(p));
|
|
1972
1976
|
}), s.tree.on(De.DRAG, (f) => {
|
|
1973
|
-
if (!
|
|
1974
|
-
const d =
|
|
1977
|
+
if (!o.editor.useTool || !a) return;
|
|
1978
|
+
const d = o.editor.getShape(a);
|
|
1975
1979
|
if (!d) return;
|
|
1976
1980
|
const p = f.getPageBounds(), m = Object.assign({}, d, p), { points: b, type: C } = m;
|
|
1977
1981
|
if (b && b.length) {
|
|
1978
1982
|
const { x: A, y: x } = f.getInnerTotal(), w = A > 0 ? p.x + A : p.x, S = x > 0 ? p.y + x : p.y;
|
|
1979
1983
|
C === "Pencil" ? m.points = [...b, w, S] : m.points = [b[0], b[1], w, S];
|
|
1980
1984
|
}
|
|
1981
|
-
|
|
1985
|
+
o.editor.addShape(m);
|
|
1982
1986
|
}), s.tree.on(De.END, () => {
|
|
1983
|
-
if (!
|
|
1984
|
-
const f =
|
|
1985
|
-
f && ((f.width === 0 || f.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(f.type) ?
|
|
1987
|
+
if (!o.editor.useTool || !a) return;
|
|
1988
|
+
const f = o.editor.getShape(a);
|
|
1989
|
+
f && ((f.width === 0 || f.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(f.type) ? o.editor.removeShape(f) : o.editor.addShape(Object.assign({}, f, { editable: !0 }))), a = null, o.editor.useTool !== "Pencil" && o.editor.setUseTool(null);
|
|
1986
1990
|
});
|
|
1987
|
-
const h = $
|
|
1988
|
-
const { width: f, height: d } =
|
|
1989
|
-
s.tree.zoom("fit", 100),
|
|
1991
|
+
const h = $o(() => {
|
|
1992
|
+
const { width: f, height: d } = i.getBoundingClientRect();
|
|
1993
|
+
s.tree.zoom("fit", 100), o.option.frameConf.width < f && o.option.frameConf.height < d && s.tree.zoom(1);
|
|
1990
1994
|
}, 10);
|
|
1991
|
-
return
|
|
1992
|
-
|
|
1995
|
+
return Mi(i, h), () => {
|
|
1996
|
+
Ci(i, h), o.editor.destroy();
|
|
1993
1997
|
};
|
|
1994
|
-
}, [
|
|
1998
|
+
}, [i]), N(() => {
|
|
1995
1999
|
const s = setTimeout(() => {
|
|
1996
|
-
const { width: a, height: l } =
|
|
1997
|
-
|
|
2000
|
+
const { width: a, height: l } = i.getBoundingClientRect();
|
|
2001
|
+
o.editor.app.tree.zoom("fit", 100), o.option.frameConf.width < a && o.option.frameConf.height < l && o.editor.app.tree.zoom(1), o.editor.setScale(o.editor.app.tree.scale);
|
|
1998
2002
|
}, 20);
|
|
1999
2003
|
return () => {
|
|
2000
2004
|
clearTimeout(s);
|
|
2001
2005
|
};
|
|
2002
|
-
}, [
|
|
2003
|
-
/* @__PURE__ */ e.jsxs(rs, { parent:
|
|
2004
|
-
|
|
2005
|
-
((n =
|
|
2006
|
-
|
|
2006
|
+
}, [o.option.frameConf.width, o.option.frameConf.height]), (t = o.editor.app) != null && t.tree ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2007
|
+
/* @__PURE__ */ e.jsxs(rs, { parent: o.editor.app.tree, cursor: o.editor.cursor, ...o.option.frameConf, children: [
|
|
2008
|
+
o.editor.shapesList.map((s) => /* @__PURE__ */ e.jsx(as, { ...s }, s.id)),
|
|
2009
|
+
((n = o.editor.img) == null ? void 0 : n.src) && /* @__PURE__ */ e.jsx(ss, {}),
|
|
2010
|
+
o.option.waterImg && /* @__PURE__ */ e.jsx(ns, {})
|
|
2007
2011
|
] }),
|
|
2008
2012
|
/* @__PURE__ */ e.jsx(ls, {})
|
|
2009
2013
|
] }) : null;
|
|
@@ -2025,29 +2029,29 @@ const cs = B(({ target: o }) => {
|
|
|
2025
2029
|
label: "200%"
|
|
2026
2030
|
}
|
|
2027
2031
|
], fs = B(() => {
|
|
2028
|
-
const
|
|
2032
|
+
const i = (n) => {
|
|
2029
2033
|
var s;
|
|
2030
|
-
(s =
|
|
2034
|
+
(s = o.editor.app) == null || s.tree.zoom(n), o.editor.setScale(o.editor.app.tree.scale);
|
|
2031
2035
|
}, t = (n) => {
|
|
2032
2036
|
var a, l;
|
|
2033
2037
|
const s = Number(n.key);
|
|
2034
|
-
s === 4 ? (a =
|
|
2038
|
+
s === 4 ? (a = o.editor.app) == null || a.tree.zoom("fit", 100) : (l = o.editor.app) == null || l.tree.zoom(s), o.editor.setScale(o.editor.app.tree.scale);
|
|
2035
2039
|
};
|
|
2036
2040
|
return /* @__PURE__ */ e.jsxs("div", { className: "absolute z-10 bottom-4 gap-2 right-4 flex items-center ", children: [
|
|
2037
2041
|
/* @__PURE__ */ e.jsxs("div", { className: "flex bg-white dark:bg-black overflow-hidden rounded-full shadow-md", children: [
|
|
2038
|
-
/* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomIn, { size: 16 }), onClick: () =>
|
|
2042
|
+
/* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomIn, { size: 16 }), onClick: () => i("in") }),
|
|
2039
2043
|
/* @__PURE__ */ e.jsx(At, { menu: { items: ds, onClick: t }, placement: "top", children: /* @__PURE__ */ e.jsxs(k, { type: "text", children: [
|
|
2040
|
-
|
|
2044
|
+
o.editor.scale,
|
|
2041
2045
|
"%"
|
|
2042
2046
|
] }) }),
|
|
2043
|
-
/* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomOut, { size: 16 }), onClick: () =>
|
|
2047
|
+
/* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomOut, { size: 16 }), onClick: () => i("out") })
|
|
2044
2048
|
] }),
|
|
2045
2049
|
/* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-white dark:bg-black shadow-md overflow-hidden", children: /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.Maximize, { size: 16 }), onClick: () => t({ key: 4 }) }) })
|
|
2046
2050
|
] });
|
|
2047
2051
|
}), hs = B(() => {
|
|
2048
|
-
const [
|
|
2052
|
+
const [i, t] = O(null);
|
|
2049
2053
|
return /* @__PURE__ */ e.jsxs("div", { className: "md:w-0 md:flex-1 overflow-hidden select-none relative", children: [
|
|
2050
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children:
|
|
2054
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children: i && /* @__PURE__ */ e.jsx(cs, { target: i }) }),
|
|
2051
2055
|
/* @__PURE__ */ e.jsx(fs, {})
|
|
2052
2056
|
] });
|
|
2053
2057
|
}), ps = [
|
|
@@ -2212,14 +2216,14 @@ const cs = B(({ target: o }) => {
|
|
|
2212
2216
|
}
|
|
2213
2217
|
]
|
|
2214
2218
|
}
|
|
2215
|
-
], us = ({ frameWidth:
|
|
2219
|
+
], us = ({ frameWidth: i, frameHeight: t, type: n, onSet: s }) => {
|
|
2216
2220
|
const [a, l] = O(""), [h, f] = O(""), d = () => {
|
|
2217
2221
|
s({ type: "auto", title: "Auto" });
|
|
2218
2222
|
}, p = () => {
|
|
2219
2223
|
s({ type: "custom", title: "Custom", width: a, height: h });
|
|
2220
2224
|
};
|
|
2221
2225
|
return N(() => {
|
|
2222
|
-
n === "custom" ? (l(
|
|
2226
|
+
n === "custom" ? (l(i), f(t)) : (l(""), f(""));
|
|
2223
2227
|
}, [n]), /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center py-2 font-normal", children: [
|
|
2224
2228
|
/* @__PURE__ */ e.jsx(
|
|
2225
2229
|
nt,
|
|
@@ -2227,7 +2231,7 @@ const cs = B(({ target: o }) => {
|
|
|
2227
2231
|
min: 1,
|
|
2228
2232
|
value: a,
|
|
2229
2233
|
onChange: l,
|
|
2230
|
-
placeholder:
|
|
2234
|
+
placeholder: i,
|
|
2231
2235
|
prefix: /* @__PURE__ */ e.jsx("span", { className: "opacity-60 mx-1", children: "W" }),
|
|
2232
2236
|
className: "flex-1"
|
|
2233
2237
|
}
|
|
@@ -2267,28 +2271,28 @@ const cs = B(({ target: o }) => {
|
|
|
2267
2271
|
] });
|
|
2268
2272
|
}, ms = B(() => {
|
|
2269
2273
|
var A;
|
|
2270
|
-
const
|
|
2274
|
+
const i = ne(null), [t, n] = O(!1), [s, a] = O(500), l = () => {
|
|
2271
2275
|
n(!1);
|
|
2272
2276
|
}, h = (x) => {
|
|
2273
|
-
if (n(x), x &&
|
|
2274
|
-
const { height: w, y: S } =
|
|
2277
|
+
if (n(x), x && i.current) {
|
|
2278
|
+
const { height: w, y: S } = i.current.getBoundingClientRect(), _ = document.body.clientHeight - w - S - 80;
|
|
2275
2279
|
a(_);
|
|
2276
2280
|
}
|
|
2277
|
-
}, f = (x, w) => !(x !==
|
|
2278
|
-
if (l(), x.type === "auto" &&
|
|
2279
|
-
const w = we(
|
|
2280
|
-
|
|
2281
|
+
}, f = (x, w) => !(x !== o.option.size.type || w.height !== o.option.frameConf.height || w.width !== o.option.frameConf.width), d = (x) => {
|
|
2282
|
+
if (l(), x.type === "auto" && o.editor.img.width) {
|
|
2283
|
+
const w = we(o.editor.img.width, o.editor.img.height);
|
|
2284
|
+
o.option.setSize({ ...x, width: o.editor.img.width + w, height: o.editor.img.height + w });
|
|
2281
2285
|
return;
|
|
2282
2286
|
}
|
|
2283
|
-
|
|
2287
|
+
o.option.setSize(x);
|
|
2284
2288
|
}, p = (x, w, S) => {
|
|
2285
|
-
l(),
|
|
2289
|
+
l(), o.option.setSize({
|
|
2286
2290
|
type: x,
|
|
2287
2291
|
title: `${w}${S.title ? ` ${S.title} ` : " "}${S.w} : ${S.h}`,
|
|
2288
2292
|
width: S.width,
|
|
2289
2293
|
height: S.height
|
|
2290
2294
|
});
|
|
2291
|
-
}, m = ((A =
|
|
2295
|
+
}, m = ((A = o.editor.img) == null ? void 0 : A.src) || o.option.size.type !== "auto", b = /* @__PURE__ */ e.jsx(us, { type: o.option.size.type, frameWidth: o.option.frameConf.width, frameHeight: o.option.frameConf.height, onSet: d }), C = /* @__PURE__ */ e.jsx("div", { className: "border-t border-gray-200 dark:border-gray-800 py-2 divide-y dark:divide-gray-700", "data-mode": o.editor.isDark ? "dark" : "light", children: ps.map((x) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2292
2296
|
x.key !== "default" && /* @__PURE__ */ e.jsx("div", { className: "font-semibold pt-2", children: x.title }),
|
|
2293
2297
|
/* @__PURE__ */ e.jsx("section", { className: "flex flex-wrap items-end pb-2", children: x.lists.map((w, S) => /* @__PURE__ */ e.jsxs(
|
|
2294
2298
|
k,
|
|
@@ -2330,26 +2334,26 @@ const cs = B(({ target: o }) => {
|
|
|
2330
2334
|
arrow: !1,
|
|
2331
2335
|
placement: "bottomRight",
|
|
2332
2336
|
open: t,
|
|
2333
|
-
overlayClassName: Z("shoteasy-components [&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full",
|
|
2337
|
+
overlayClassName: Z("shoteasy-components [&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full", o.editor.isDark && "dark-mode"),
|
|
2334
2338
|
overlayStyle: {
|
|
2335
2339
|
width: "400px",
|
|
2336
2340
|
height: `${s}px`
|
|
2337
2341
|
},
|
|
2338
2342
|
onOpenChange: h,
|
|
2339
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: Z("px-3 py-1.5 border shrink-0 border-gray-200 dark:border-gray-700 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref:
|
|
2343
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: Z("px-3 py-1.5 border shrink-0 border-gray-200 dark:border-gray-700 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref: i, children: [
|
|
2340
2344
|
/* @__PURE__ */ e.jsx(
|
|
2341
2345
|
"div",
|
|
2342
2346
|
{
|
|
2343
2347
|
className: "border border-black/50 bg-black/10 dark:bg-white/20 dark:border-white/40 w-4 rounded-sm",
|
|
2344
|
-
style: { aspectRatio:
|
|
2348
|
+
style: { aspectRatio: o.option.frameConf.width / o.option.frameConf.height }
|
|
2345
2349
|
}
|
|
2346
2350
|
),
|
|
2347
2351
|
/* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
|
|
2348
|
-
/* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children:
|
|
2352
|
+
/* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children: o.option.size.title }),
|
|
2349
2353
|
m ? /* @__PURE__ */ e.jsxs("div", { className: "text-gray-500 leading-3", children: [
|
|
2350
|
-
|
|
2354
|
+
o.option.frameConf.width,
|
|
2351
2355
|
" x ",
|
|
2352
|
-
|
|
2356
|
+
o.option.frameConf.height,
|
|
2353
2357
|
" px"
|
|
2354
2358
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 leading-3", children: "Adaptive screenshot size" })
|
|
2355
2359
|
] }),
|
|
@@ -2359,21 +2363,21 @@ const cs = B(({ target: o }) => {
|
|
|
2359
2363
|
}
|
|
2360
2364
|
);
|
|
2361
2365
|
}), gs = B(() => {
|
|
2362
|
-
const
|
|
2366
|
+
const i = ne(null), [t, n] = O(!1), s = () => {
|
|
2363
2367
|
n(!0);
|
|
2364
2368
|
}, a = () => {
|
|
2365
2369
|
var h, f;
|
|
2366
|
-
if (typeof ((h =
|
|
2367
|
-
const d = (f =
|
|
2370
|
+
if (typeof ((h = i.current) == null ? void 0 : h.cropper) < "u") {
|
|
2371
|
+
const d = (f = i.current) == null ? void 0 : f.cropper.getCroppedCanvas();
|
|
2368
2372
|
if (d) {
|
|
2369
2373
|
const { width: p, height: m } = d, b = d.toDataURL();
|
|
2370
|
-
if (
|
|
2374
|
+
if (o.editor.setImg(Object.assign({}, o.editor.img, {
|
|
2371
2375
|
src: b,
|
|
2372
2376
|
width: p,
|
|
2373
2377
|
height: m
|
|
2374
|
-
})),
|
|
2378
|
+
})), o.option.size.type === "auto") {
|
|
2375
2379
|
const C = we(p, m);
|
|
2376
|
-
|
|
2380
|
+
o.option.setFrameSize(p + C, m + C);
|
|
2377
2381
|
}
|
|
2378
2382
|
}
|
|
2379
2383
|
}
|
|
@@ -2400,13 +2404,13 @@ const cs = B(({ target: o }) => {
|
|
|
2400
2404
|
onCancel: l,
|
|
2401
2405
|
destroyOnClose: !0,
|
|
2402
2406
|
children: /* @__PURE__ */ e.jsx(
|
|
2403
|
-
|
|
2407
|
+
Ti,
|
|
2404
2408
|
{
|
|
2405
|
-
ref:
|
|
2409
|
+
ref: i,
|
|
2406
2410
|
style: { height: 400, width: "100%" },
|
|
2407
2411
|
zoomTo: 0.5,
|
|
2408
|
-
initialAspectRatio:
|
|
2409
|
-
src:
|
|
2412
|
+
initialAspectRatio: o.editor.img.width / o.editor.img.height,
|
|
2413
|
+
src: o.editor.img.src,
|
|
2410
2414
|
dragMode: "move",
|
|
2411
2415
|
viewMode: 1,
|
|
2412
2416
|
minCropBoxHeight: 10,
|
|
@@ -2422,11 +2426,11 @@ const cs = B(({ target: o }) => {
|
|
|
2422
2426
|
)
|
|
2423
2427
|
] });
|
|
2424
2428
|
}), xs = ["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"], bs = B(() => {
|
|
2425
|
-
const [
|
|
2429
|
+
const [i, t] = O(!1), n = (l) => {
|
|
2426
2430
|
t(l);
|
|
2427
2431
|
}, s = (l) => {
|
|
2428
|
-
|
|
2429
|
-
}, a = /* @__PURE__ */ e.jsx("div", { className: Z("flex flex-wrap w-24 position-block",
|
|
2432
|
+
o.option.setAlign(l);
|
|
2433
|
+
}, a = /* @__PURE__ */ e.jsx("div", { className: Z("flex flex-wrap w-24 position-block", o.option.align), children: xs.map((l) => /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 border border-[var(--c-br)] rounded-sm hover:bg-[var(--c-wb)] cursor-pointer", onClick: () => s(l) }, l)) });
|
|
2430
2434
|
return /* @__PURE__ */ e.jsx(
|
|
2431
2435
|
xe,
|
|
2432
2436
|
{
|
|
@@ -2434,40 +2438,40 @@ const cs = B(({ target: o }) => {
|
|
|
2434
2438
|
trigger: "click",
|
|
2435
2439
|
arrow: !1,
|
|
2436
2440
|
placement: "bottomRight",
|
|
2437
|
-
overlayClassName: Z("shoteasy-components",
|
|
2438
|
-
open:
|
|
2441
|
+
overlayClassName: Z("shoteasy-components", o.editor.isDark && "dark-mode"),
|
|
2442
|
+
open: i,
|
|
2439
2443
|
onOpenChange: n,
|
|
2440
2444
|
children: /* @__PURE__ */ e.jsx(
|
|
2441
2445
|
k,
|
|
2442
2446
|
{
|
|
2443
2447
|
type: "text",
|
|
2444
2448
|
shape: "circle",
|
|
2445
|
-
className: Z(
|
|
2449
|
+
className: Z(i && "shadow-md"),
|
|
2446
2450
|
icon: /* @__PURE__ */ e.jsx(M.LayoutGrid, { size: 18 })
|
|
2447
2451
|
}
|
|
2448
2452
|
)
|
|
2449
2453
|
}
|
|
2450
2454
|
);
|
|
2451
2455
|
}), ws = B(() => {
|
|
2452
|
-
const [
|
|
2456
|
+
const [i, t] = O(!1), [n, s] = O("ShotEasy"), [a, l] = O("#00000030"), [h, f] = O(45), d = (p) => {
|
|
2453
2457
|
l(typeof p == "string" ? p : p.toRgbString());
|
|
2454
2458
|
};
|
|
2455
2459
|
return N(() => {
|
|
2456
|
-
if (
|
|
2457
|
-
const p =
|
|
2460
|
+
if (i && n.trim()) {
|
|
2461
|
+
const p = Wi({
|
|
2458
2462
|
text: n,
|
|
2459
2463
|
color: a,
|
|
2460
2464
|
angleDegrees: h
|
|
2461
2465
|
});
|
|
2462
|
-
|
|
2466
|
+
o.option.setWaterImg(p);
|
|
2463
2467
|
} else
|
|
2464
|
-
|
|
2465
|
-
}, [
|
|
2468
|
+
o.option.setWaterImg(null);
|
|
2469
|
+
}, [i, n, a, h]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2466
2470
|
/* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm flex gap-4 items-center justify-between", children: [
|
|
2467
2471
|
/* @__PURE__ */ e.jsx("label", { children: "Watermark" }),
|
|
2468
|
-
/* @__PURE__ */ e.jsx(at, { defaultChecked:
|
|
2472
|
+
/* @__PURE__ */ e.jsx(at, { defaultChecked: i, onChange: t, size: "small", className: "bg-slate-200" })
|
|
2469
2473
|
] }),
|
|
2470
|
-
|
|
2474
|
+
i && /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-xs grid gap-3 pl-2 pt-2", children: [
|
|
2471
2475
|
/* @__PURE__ */ e.jsx(xr, { defaultValue: n, placeholder: "Watermark content", onChange: (p) => s(p.target.value) }),
|
|
2472
2476
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2473
2477
|
/* @__PURE__ */ e.jsx("label", { children: "Color" }),
|
|
@@ -2482,15 +2486,15 @@ const cs = B(({ target: o }) => {
|
|
|
2482
2486
|
] }),
|
|
2483
2487
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2484
2488
|
/* @__PURE__ */ e.jsx("label", { children: "Only Background" }),
|
|
2485
|
-
/* @__PURE__ */ e.jsx(at, { size: "small", onChange: (p) =>
|
|
2489
|
+
/* @__PURE__ */ e.jsx(at, { size: "small", onChange: (p) => o.option.setWaterIndex(p ? -1 : 1), className: "bg-slate-200" })
|
|
2486
2490
|
] })
|
|
2487
2491
|
] })
|
|
2488
2492
|
] });
|
|
2489
2493
|
});
|
|
2490
|
-
function ys(
|
|
2491
|
-
const s = ne(
|
|
2494
|
+
function ys(i, t, n) {
|
|
2495
|
+
const s = ne(i), a = ne(t);
|
|
2492
2496
|
N(() => {
|
|
2493
|
-
s.current =
|
|
2497
|
+
s.current = i, a.current = t;
|
|
2494
2498
|
}, [...n]), N(() => {
|
|
2495
2499
|
const l = Rt(window, {
|
|
2496
2500
|
"$mod+KeyS": (h) => {
|
|
@@ -2507,60 +2511,60 @@ function ys(o, t, n) {
|
|
|
2507
2511
|
}
|
|
2508
2512
|
const vs = B(() => {
|
|
2509
2513
|
var A;
|
|
2510
|
-
const [
|
|
2514
|
+
const [i, t] = O(!1), [n, s] = O(!1), [a, l] = O("png"), [h, f] = O(1), d = (x) => {
|
|
2511
2515
|
s(x);
|
|
2512
2516
|
}, p = async () => {
|
|
2513
|
-
if (!
|
|
2517
|
+
if (!o.editor.isEditing || i) return;
|
|
2514
2518
|
const x = {
|
|
2515
2519
|
pixelRatio: h
|
|
2516
2520
|
};
|
|
2517
2521
|
["jpg", "webp"].includes(a) && (x.quality = 0.9, x.fill = "#ffffff");
|
|
2518
2522
|
const w = ge();
|
|
2519
|
-
t(!0),
|
|
2523
|
+
t(!0), o.editor.message.open({
|
|
2520
2524
|
key: w,
|
|
2521
2525
|
type: "loading",
|
|
2522
2526
|
content: "Downloading..."
|
|
2523
|
-
}), await
|
|
2527
|
+
}), await o.editor.app.tree.export(a, x).then((S) => {
|
|
2524
2528
|
let _ = "ShotEasy";
|
|
2525
|
-
h > 1 && (_ += `@${h}`),
|
|
2529
|
+
h > 1 && (_ += `@${h}`), Oi(S.data, `${_}.${a}`), o.editor.message.open({
|
|
2526
2530
|
key: w,
|
|
2527
2531
|
type: "success",
|
|
2528
2532
|
content: "Download Success!"
|
|
2529
2533
|
});
|
|
2530
2534
|
}).catch(() => {
|
|
2531
|
-
|
|
2535
|
+
o.editor.message.open({
|
|
2532
2536
|
key: w,
|
|
2533
2537
|
type: "error",
|
|
2534
2538
|
content: "Download failed!"
|
|
2535
2539
|
});
|
|
2536
2540
|
}), t(!1);
|
|
2537
2541
|
}, m = async () => {
|
|
2538
|
-
if (!
|
|
2542
|
+
if (!o.editor.isEditing || i) return;
|
|
2539
2543
|
const x = ge();
|
|
2540
|
-
t(!0),
|
|
2544
|
+
t(!0), o.editor.message.open({
|
|
2541
2545
|
key: x,
|
|
2542
2546
|
type: "loading",
|
|
2543
2547
|
content: "Copying..."
|
|
2544
|
-
}), await
|
|
2548
|
+
}), await o.editor.app.tree.export("png", { blob: !0, pixelRatio: h }).then(async (w) => {
|
|
2545
2549
|
const { data: S } = w;
|
|
2546
2550
|
await navigator.clipboard.write([
|
|
2547
2551
|
new ClipboardItem({
|
|
2548
2552
|
[S.type]: S
|
|
2549
2553
|
})
|
|
2550
|
-
]),
|
|
2554
|
+
]), o.editor.message.open({
|
|
2551
2555
|
key: x,
|
|
2552
2556
|
type: "success",
|
|
2553
2557
|
content: "Copy Success!"
|
|
2554
2558
|
});
|
|
2555
2559
|
}).catch(() => {
|
|
2556
|
-
|
|
2560
|
+
o.editor.message.open({
|
|
2557
2561
|
key: x,
|
|
2558
2562
|
type: "error",
|
|
2559
2563
|
content: "Copy failed!"
|
|
2560
2564
|
});
|
|
2561
2565
|
}), t(!1);
|
|
2562
2566
|
}, b = () => {
|
|
2563
|
-
|
|
2567
|
+
o.editor.destroy(), o.editor.clearImg(), o.editor.clearFun && o.editor.clearFun();
|
|
2564
2568
|
};
|
|
2565
2569
|
ys(() => p(), () => m(), [p, m]);
|
|
2566
2570
|
const C = /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "p-2 [&_.ant-segmented]:w-full [&_.ant-segmented-item]:w-[33%]", children: [
|
|
@@ -2582,12 +2586,12 @@ const vs = B(() => {
|
|
|
2582
2586
|
onChange: f
|
|
2583
2587
|
}
|
|
2584
2588
|
),
|
|
2585
|
-
|
|
2589
|
+
o.option.frameConf.width && /* @__PURE__ */ e.jsxs("div", { className: "text-xs p-3 mt-4 flex justify-between bg-black/5 rounded-md", children: [
|
|
2586
2590
|
/* @__PURE__ */ e.jsx("span", { className: "text-gray-400", children: "Download Size" }),
|
|
2587
2591
|
/* @__PURE__ */ e.jsxs("span", { className: "text-gray-700", children: [
|
|
2588
|
-
|
|
2592
|
+
o.option.frameConf.width * h,
|
|
2589
2593
|
" x ",
|
|
2590
|
-
|
|
2594
|
+
o.option.frameConf.height * h
|
|
2591
2595
|
] })
|
|
2592
2596
|
] })
|
|
2593
2597
|
] }) });
|
|
@@ -2598,7 +2602,7 @@ const vs = B(() => {
|
|
|
2598
2602
|
theme: {
|
|
2599
2603
|
components: {
|
|
2600
2604
|
Button: {
|
|
2601
|
-
colorPrimary:
|
|
2605
|
+
colorPrimary: o.editor.isDark ? "#2b4acb" : "#000",
|
|
2602
2606
|
algorithm: !0
|
|
2603
2607
|
// 启用算法
|
|
2604
2608
|
}
|
|
@@ -2614,7 +2618,7 @@ const vs = B(() => {
|
|
|
2614
2618
|
{
|
|
2615
2619
|
type: "primary",
|
|
2616
2620
|
size: "large",
|
|
2617
|
-
loading:
|
|
2621
|
+
loading: i,
|
|
2618
2622
|
icon: /* @__PURE__ */ e.jsx(M.ImageDown, { size: 18 }),
|
|
2619
2623
|
className: "rounded-se-none flex-1 rounded-ee-none me-[-1px] hover:z-[1] border-r-white/30",
|
|
2620
2624
|
onClick: p,
|
|
@@ -2638,7 +2642,7 @@ const vs = B(() => {
|
|
|
2638
2642
|
type: "primary",
|
|
2639
2643
|
size: "large",
|
|
2640
2644
|
icon: /* @__PURE__ */ e.jsx(M.Copy, { size: 18 }),
|
|
2641
|
-
loading:
|
|
2645
|
+
loading: i,
|
|
2642
2646
|
className: "rounded-ss-none rounded-es-none border-l-white/30",
|
|
2643
2647
|
onClick: m
|
|
2644
2648
|
}
|
|
@@ -2662,7 +2666,7 @@ const vs = B(() => {
|
|
|
2662
2666
|
children: /* @__PURE__ */ e.jsx(k, { size: "large", icon: /* @__PURE__ */ e.jsx(M.Settings2, { size: 18 }) })
|
|
2663
2667
|
}
|
|
2664
2668
|
),
|
|
2665
|
-
((A =
|
|
2669
|
+
((A = o.editor.img) == null ? void 0 : A.src) && /* @__PURE__ */ e.jsx(
|
|
2666
2670
|
br,
|
|
2667
2671
|
{
|
|
2668
2672
|
title: "Delete the screenshot",
|
|
@@ -2676,14 +2680,14 @@ const vs = B(() => {
|
|
|
2676
2680
|
)
|
|
2677
2681
|
] })
|
|
2678
2682
|
] });
|
|
2679
|
-
}), js = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", Ct = ["cosmic", "desktop"], me = ({ type:
|
|
2683
|
+
}), js = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", Ct = ["cosmic", "desktop"], me = ({ type: i, options: t, onChange: n, value: s }) => {
|
|
2680
2684
|
let a = [];
|
|
2681
2685
|
if (t && t.length)
|
|
2682
2686
|
a = t;
|
|
2683
2687
|
else {
|
|
2684
2688
|
const l = [];
|
|
2685
2689
|
Object.keys(Q).map((h) => {
|
|
2686
|
-
h.includes(
|
|
2690
|
+
h.includes(i) && l.push({
|
|
2687
2691
|
key: h,
|
|
2688
2692
|
value: Q[h]
|
|
2689
2693
|
});
|
|
@@ -2696,30 +2700,30 @@ const vs = B(() => {
|
|
|
2696
2700
|
value: s,
|
|
2697
2701
|
rootClassName: Z(
|
|
2698
2702
|
"grid [&_span]:ps-0",
|
|
2699
|
-
Ct.includes(
|
|
2703
|
+
Ct.includes(i) ? "grid-cols-5 gap-y-1.5" : "grid-cols-7 gap-y-3"
|
|
2700
2704
|
),
|
|
2701
2705
|
children: a.map((l, h) => /* @__PURE__ */ e.jsx(
|
|
2702
2706
|
P,
|
|
2703
2707
|
{
|
|
2704
2708
|
className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0",
|
|
2705
2709
|
value: l.key,
|
|
2706
|
-
children: Ct.includes(
|
|
2710
|
+
children: Ct.includes(i) ? /* @__PURE__ */ e.jsx("div", { className: Z("w-12 h-8 rounded-md overflow-hidden"), children: /* @__PURE__ */ e.jsx("img", { src: `${l.value.class}&w=48`, className: "w-full h-full object-cover object-center" }) }) : /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full overflow-hidden", l.value.class) })
|
|
2707
2711
|
},
|
|
2708
2712
|
h
|
|
2709
2713
|
))
|
|
2710
2714
|
}
|
|
2711
2715
|
);
|
|
2712
|
-
}, Ms = B(({ showMore:
|
|
2716
|
+
}, Ms = B(({ showMore: i, onChange: t }) => {
|
|
2713
2717
|
const n = () => {
|
|
2714
2718
|
t(!1);
|
|
2715
2719
|
}, s = (l) => {
|
|
2716
2720
|
const h = l.toHexString();
|
|
2717
|
-
|
|
2721
|
+
o.option.frameConf.background = {
|
|
2718
2722
|
type: "solid",
|
|
2719
2723
|
color: h
|
|
2720
2724
|
};
|
|
2721
2725
|
}, a = (l) => {
|
|
2722
|
-
|
|
2726
|
+
o.option.setBackground(l);
|
|
2723
2727
|
};
|
|
2724
2728
|
return /* @__PURE__ */ e.jsx(
|
|
2725
2729
|
wr,
|
|
@@ -2729,7 +2733,7 @@ const vs = B(() => {
|
|
|
2729
2733
|
closable: !1,
|
|
2730
2734
|
mask: !1,
|
|
2731
2735
|
onClose: n,
|
|
2732
|
-
open:
|
|
2736
|
+
open: i,
|
|
2733
2737
|
getContainer: !1,
|
|
2734
2738
|
width: "100%",
|
|
2735
2739
|
className: "[&_.ant-drawer-body]:p-0",
|
|
@@ -2750,20 +2754,20 @@ const vs = B(() => {
|
|
|
2750
2754
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Custom" }),
|
|
2751
2755
|
/* @__PURE__ */ e.jsx("div", { className: "py-1", children: /* @__PURE__ */ e.jsx(be, { onChange: s, children: /* @__PURE__ */ e.jsx(k, { type: "default", size: "small", shape: "circle", icon: /* @__PURE__ */ e.jsx("img", { src: js, width: 18 }) }) }) }),
|
|
2752
2756
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Solid Colors" }),
|
|
2753
|
-
/* @__PURE__ */ e.jsx(me, { type: "solid", onChange: a, value:
|
|
2757
|
+
/* @__PURE__ */ e.jsx(me, { type: "solid", onChange: a, value: o.option.background }),
|
|
2754
2758
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Gradients" }),
|
|
2755
|
-
/* @__PURE__ */ e.jsx(me, { type: "gradient", onChange: a, value:
|
|
2759
|
+
/* @__PURE__ */ e.jsx(me, { type: "gradient", onChange: a, value: o.option.background }),
|
|
2756
2760
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Cosmic Gradients" }),
|
|
2757
|
-
/* @__PURE__ */ e.jsx(me, { type: "cosmic", onChange: a, value:
|
|
2761
|
+
/* @__PURE__ */ e.jsx(me, { type: "cosmic", onChange: a, value: o.option.background }),
|
|
2758
2762
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Desktop" }),
|
|
2759
|
-
/* @__PURE__ */ e.jsx(me, { type: "desktop", onChange: a, value:
|
|
2763
|
+
/* @__PURE__ */ e.jsx(me, { type: "desktop", onChange: a, value: o.option.background })
|
|
2760
2764
|
] })
|
|
2761
2765
|
] })
|
|
2762
2766
|
}
|
|
2763
2767
|
);
|
|
2764
2768
|
}), Cs = B(() => {
|
|
2765
|
-
const [
|
|
2766
|
-
|
|
2769
|
+
const [i, t] = O(!1), n = (s) => {
|
|
2770
|
+
o.option.setFrame(s.target.value);
|
|
2767
2771
|
};
|
|
2768
2772
|
return /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
|
|
2769
2773
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
@@ -2788,7 +2792,7 @@ const vs = B(() => {
|
|
|
2788
2792
|
{
|
|
2789
2793
|
rootClassName: "grid grid-cols-5",
|
|
2790
2794
|
onChange: n,
|
|
2791
|
-
value:
|
|
2795
|
+
value: o.option.frame,
|
|
2792
2796
|
children: [
|
|
2793
2797
|
/* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "none", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
|
|
2794
2798
|
/* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "light", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 border-2 border-white/80 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
|
|
@@ -2812,9 +2816,9 @@ const vs = B(() => {
|
|
|
2812
2816
|
) })
|
|
2813
2817
|
] });
|
|
2814
2818
|
}), ks = B(() => {
|
|
2815
|
-
const [
|
|
2819
|
+
const [i, t] = O(!1), n = (s) => {
|
|
2816
2820
|
const a = s.target.value;
|
|
2817
|
-
|
|
2821
|
+
o.option.setBackground(a);
|
|
2818
2822
|
};
|
|
2819
2823
|
return /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-black flex flex-col md:w-[340px] border-l border-l-gray-50 dark:border-l-gray-700 dark:text-gray-400 shadow-lg relative z-10 select-none", children: [
|
|
2820
2824
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex-col gap-2 p-4 overflow-y-auto overflow-x-hidden", children: [
|
|
@@ -2828,7 +2832,7 @@ const vs = B(() => {
|
|
|
2828
2832
|
{
|
|
2829
2833
|
type: "text",
|
|
2830
2834
|
shape: "circle",
|
|
2831
|
-
onClick: () =>
|
|
2835
|
+
onClick: () => o.option.toggleFlip("x"),
|
|
2832
2836
|
icon: /* @__PURE__ */ e.jsx(M.FlipHorizontal2, { size: 18 })
|
|
2833
2837
|
}
|
|
2834
2838
|
),
|
|
@@ -2837,7 +2841,7 @@ const vs = B(() => {
|
|
|
2837
2841
|
{
|
|
2838
2842
|
type: "text",
|
|
2839
2843
|
shape: "circle",
|
|
2840
|
-
onClick: () =>
|
|
2844
|
+
onClick: () => o.option.toggleFlip("y"),
|
|
2841
2845
|
icon: /* @__PURE__ */ e.jsx(M.FlipVertical2, { size: 18 })
|
|
2842
2846
|
}
|
|
2843
2847
|
),
|
|
@@ -2852,23 +2856,23 @@ const vs = B(() => {
|
|
|
2852
2856
|
min: 0.1,
|
|
2853
2857
|
max: 2,
|
|
2854
2858
|
step: 0.1,
|
|
2855
|
-
onChange: (s) =>
|
|
2856
|
-
value: typeof
|
|
2859
|
+
onChange: (s) => o.option.setScale(s),
|
|
2860
|
+
value: typeof o.option.scale == "number" ? o.option.scale : 1
|
|
2857
2861
|
}
|
|
2858
2862
|
)
|
|
2859
2863
|
] }),
|
|
2860
2864
|
/* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
|
|
2861
2865
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
|
|
2862
2866
|
/* @__PURE__ */ e.jsx("label", { children: "Padding" }),
|
|
2863
|
-
/* @__PURE__ */ e.jsx(be, { value:
|
|
2867
|
+
/* @__PURE__ */ e.jsx(be, { value: o.option.paddingBg, onChange: (s) => o.option.setPaddingBg(s.toRgbString()), size: "small" })
|
|
2864
2868
|
] }),
|
|
2865
2869
|
/* @__PURE__ */ e.jsx(
|
|
2866
2870
|
pe,
|
|
2867
2871
|
{
|
|
2868
2872
|
min: 0,
|
|
2869
2873
|
max: 60,
|
|
2870
|
-
onChange: (s) =>
|
|
2871
|
-
value: typeof
|
|
2874
|
+
onChange: (s) => o.option.setPadding(s),
|
|
2875
|
+
value: typeof o.option.padding == "number" ? o.option.padding : 0
|
|
2872
2876
|
}
|
|
2873
2877
|
)
|
|
2874
2878
|
] }),
|
|
@@ -2879,8 +2883,8 @@ const vs = B(() => {
|
|
|
2879
2883
|
{
|
|
2880
2884
|
min: 0,
|
|
2881
2885
|
max: 20,
|
|
2882
|
-
onChange: (s) =>
|
|
2883
|
-
value: typeof
|
|
2886
|
+
onChange: (s) => o.option.setRound(s),
|
|
2887
|
+
value: typeof o.option.round == "number" ? o.option.round : 0
|
|
2884
2888
|
}
|
|
2885
2889
|
)
|
|
2886
2890
|
] }),
|
|
@@ -2891,8 +2895,8 @@ const vs = B(() => {
|
|
|
2891
2895
|
{
|
|
2892
2896
|
min: 0,
|
|
2893
2897
|
max: 6,
|
|
2894
|
-
onChange: (s) =>
|
|
2895
|
-
value: typeof
|
|
2898
|
+
onChange: (s) => o.option.setShadow(s),
|
|
2899
|
+
value: typeof o.option.shadow == "number" ? o.option.shadow : 0
|
|
2896
2900
|
}
|
|
2897
2901
|
)
|
|
2898
2902
|
] }),
|
|
@@ -2918,7 +2922,7 @@ const vs = B(() => {
|
|
|
2918
2922
|
P.Group,
|
|
2919
2923
|
{
|
|
2920
2924
|
onChange: n,
|
|
2921
|
-
value:
|
|
2925
|
+
value: o.option.background,
|
|
2922
2926
|
rootClassName: "grid grid-cols-7 [&_span]:ps-0",
|
|
2923
2927
|
children: [
|
|
2924
2928
|
/* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: "default_1", children: /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full", Q.default_1.class) }) }),
|
|
@@ -2932,9 +2936,9 @@ const vs = B(() => {
|
|
|
2932
2936
|
/* @__PURE__ */ e.jsx(ws, {})
|
|
2933
2937
|
] }),
|
|
2934
2938
|
/* @__PURE__ */ e.jsx(vs, {}),
|
|
2935
|
-
/* @__PURE__ */ e.jsx(Ms, { showMore:
|
|
2939
|
+
/* @__PURE__ */ e.jsx(Ms, { showMore: i, onChange: t })
|
|
2936
2940
|
] });
|
|
2937
|
-
}), As = (
|
|
2941
|
+
}), As = (i, t = []) => {
|
|
2938
2942
|
N(() => {
|
|
2939
2943
|
const n = async (s) => {
|
|
2940
2944
|
const a = s.clipboardData;
|
|
@@ -2944,45 +2948,45 @@ const vs = B(() => {
|
|
|
2944
2948
|
);
|
|
2945
2949
|
if (!l.length) return;
|
|
2946
2950
|
const h = l[0].getAsFile();
|
|
2947
|
-
|
|
2951
|
+
i && i(h);
|
|
2948
2952
|
};
|
|
2949
2953
|
return document.addEventListener("paste", n, !1), () => {
|
|
2950
2954
|
document.removeEventListener("paste", n);
|
|
2951
2955
|
};
|
|
2952
2956
|
}, [...t]);
|
|
2953
|
-
}, Ot = (
|
|
2954
|
-
const a = window.URL || window.webkitURL || window, l = s === "blob" ? a.createObjectURL(n) : n, h = await
|
|
2955
|
-
if (
|
|
2957
|
+
}, Ot = (i) => async (n, s = "blob") => {
|
|
2958
|
+
const a = window.URL || window.webkitURL || window, l = s === "blob" ? a.createObjectURL(n) : n, h = await Yi(l), f = Math.round(h.width), d = Math.round(h.height);
|
|
2959
|
+
if (i.editor.setImg({
|
|
2956
2960
|
src: l,
|
|
2957
2961
|
width: f,
|
|
2958
2962
|
height: d,
|
|
2959
2963
|
type: s === "blob" ? n.type : "image/png",
|
|
2960
2964
|
name: s === "blob" ? n.name : "ShotEasy.png"
|
|
2961
|
-
}),
|
|
2965
|
+
}), i.option.size.type === "auto") {
|
|
2962
2966
|
const p = we(f, d);
|
|
2963
|
-
|
|
2967
|
+
i.option.setFrameSize(f + p, d + p);
|
|
2964
2968
|
}
|
|
2965
2969
|
}, Ns = async () => {
|
|
2966
2970
|
try {
|
|
2967
|
-
const
|
|
2968
|
-
t.srcObject =
|
|
2971
|
+
const i = await navigator.mediaDevices.getDisplayMedia(), t = document.createElement("video");
|
|
2972
|
+
t.srcObject = i, t.play(), await new Promise((l) => t.onplaying = l);
|
|
2969
2973
|
const n = document.createElement("canvas");
|
|
2970
2974
|
n.width = t.videoWidth, n.height = t.videoHeight, n.getContext("2d").drawImage(t, 0, 0);
|
|
2971
2975
|
const a = n.toDataURL("image/png");
|
|
2972
2976
|
return t.srcObject.getTracks().forEach((l) => l.stop()), a;
|
|
2973
|
-
} catch (
|
|
2974
|
-
console.log("Error capturing screen:",
|
|
2977
|
+
} catch (i) {
|
|
2978
|
+
console.log("Error capturing screen:", i);
|
|
2975
2979
|
}
|
|
2976
2980
|
}, { Dragger: Ts } = yr, Ss = B(() => {
|
|
2977
|
-
const
|
|
2981
|
+
const i = Ot(o), t = async (a) => (await i(a), Promise.reject()), n = async () => {
|
|
2978
2982
|
const a = await Ns();
|
|
2979
|
-
a &&
|
|
2983
|
+
a && i(a, "dataURL");
|
|
2980
2984
|
}, s = () => {
|
|
2981
|
-
|
|
2985
|
+
o.editor.message.info("Developing, Coming soon!");
|
|
2982
2986
|
};
|
|
2983
2987
|
return As((a) => {
|
|
2984
|
-
|
|
2985
|
-
}), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: Z("max-w-[600px]",
|
|
2988
|
+
i(a);
|
|
2989
|
+
}), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: Z("max-w-[600px]", o.editor.invalid && "invalid"), children: [
|
|
2986
2990
|
/* @__PURE__ */ e.jsx(
|
|
2987
2991
|
Ts,
|
|
2988
2992
|
{
|
|
@@ -3008,26 +3012,26 @@ const vs = B(() => {
|
|
|
3008
3012
|
/* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Create gif animate", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.ImagePlay, { size: 20, onClick: s }) }) })
|
|
3009
3013
|
] })
|
|
3010
3014
|
] }) });
|
|
3011
|
-
}), $s = B(({ defaultImg:
|
|
3012
|
-
var
|
|
3013
|
-
const
|
|
3014
|
-
return
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3015
|
+
}), $s = B(({ defaultImg: i, headLeft: t, headRight: n, isDark: s, boxClassName: a = "", onClear: l }) => {
|
|
3016
|
+
var m;
|
|
3017
|
+
const h = Ot(o), f = (m = o.editor.img) != null && m.src ? /* @__PURE__ */ e.jsx(hs, {}) : /* @__PURE__ */ e.jsx(Ss, {}), [d, p] = vr.useMessage();
|
|
3018
|
+
return o.editor.setMessage(d), o.editor.setClearFun(l), le(() => {
|
|
3019
|
+
const b = s || localStorage.getItem("SHOTEASY_BEAUTIFIER_THEME") === "dark" ? "dark" : "light";
|
|
3020
|
+
o.editor.setTheme(b);
|
|
3017
3021
|
}, [s]), N(() => {
|
|
3018
|
-
|
|
3019
|
-
}, [
|
|
3022
|
+
i && h(i, "dataURL");
|
|
3023
|
+
}, [i]), /* @__PURE__ */ e.jsx(Ni, { children: /* @__PURE__ */ e.jsxs(
|
|
3020
3024
|
Nt,
|
|
3021
3025
|
{
|
|
3022
3026
|
theme: {
|
|
3023
|
-
algorithm:
|
|
3027
|
+
algorithm: o.editor.isDark ? ct.darkAlgorithm : ct.defaultAlgorithm
|
|
3024
3028
|
},
|
|
3025
3029
|
children: [
|
|
3026
|
-
|
|
3027
|
-
/* @__PURE__ */ e.jsxs("div", { id: "shoteasy-container", className: Z("polka flex flex-col overflow-hidden antialiased w-full h-[100vh] dark:bg-black", a), "data-mode":
|
|
3028
|
-
/* @__PURE__ */ e.jsx(
|
|
3030
|
+
p,
|
|
3031
|
+
/* @__PURE__ */ e.jsxs("div", { id: "shoteasy-container", className: Z("polka flex flex-col overflow-hidden antialiased w-full h-[100vh] dark:bg-black", a), "data-mode": o.editor.isDark ? "dark" : "light", children: [
|
|
3032
|
+
/* @__PURE__ */ e.jsx(Qi, { headLeft: t, headRight: n }),
|
|
3029
3033
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 h-0 md:flex-row md:items-stretch", children: [
|
|
3030
|
-
|
|
3034
|
+
f,
|
|
3031
3035
|
/* @__PURE__ */ e.jsx(ks, {})
|
|
3032
3036
|
] })
|
|
3033
3037
|
] })
|