@snowcone-app/canvas 0.46.6 → 0.46.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContextualToolbars-Dmo86Wd2.js → ContextualToolbars-BG90V6-s.js} +3 -3
- package/dist/ContextualToolbars-BG90V6-s.js.map +1 -0
- package/dist/{EditorCanvasImpl-BHa8q4iO.js → EditorCanvasImpl-C7y7UNl1.js} +5 -5
- package/dist/{EditorCanvasImpl-BHa8q4iO.js.map → EditorCanvasImpl-C7y7UNl1.js.map} +1 -1
- package/dist/{ImagePanel-4fHABjNT.js → ImagePanel-BaEJnUvS.js} +3 -3
- package/dist/ImagePanel-BaEJnUvS.js.map +1 -0
- package/dist/{SnowconeCanvas-GPag5BXG.js → SnowconeCanvas-C6FmL0pj.js} +6 -6
- package/dist/{SnowconeCanvas-GPag5BXG.js.map → SnowconeCanvas-C6FmL0pj.js.map} +1 -1
- package/dist/advanced.mjs +64 -64
- package/dist/advanced.mjs.map +1 -1
- package/dist/compose-Ce53EW1v.js +100 -0
- package/dist/compose-Ce53EW1v.js.map +1 -0
- package/dist/{custom-icons-Dt0Y4VSn.js → custom-icons-BA-MX7Y2.js} +2 -2
- package/dist/{custom-icons-Dt0Y4VSn.js.map → custom-icons-BA-MX7Y2.js.map} +1 -1
- package/dist/{embed-DhjsJ3ni.js → embed-CYlEe_Xv.js} +155 -156
- package/dist/embed-CYlEe_Xv.js.map +1 -0
- package/dist/embed.mjs +44 -44
- package/dist/icons/Icon.d.ts +2 -0
- package/dist/index.mjs +56 -56
- package/dist/{template-fields-CKEuUmTM.js → template-fields-3CH15MFC.js} +2 -2
- package/dist/{template-fields-CKEuUmTM.js.map → template-fields-3CH15MFC.js.map} +1 -1
- package/dist/{useCommands-BI7O5Lf0.js → useCommands-C6nE770t.js} +739 -753
- package/dist/useCommands-C6nE770t.js.map +1 -0
- package/dist/{validation-au_-Sj-A.js → validation-C3FHoCbQ.js} +132 -136
- package/dist/validation-C3FHoCbQ.js.map +1 -0
- package/dist/vendor/ui/primitives/Button.d.ts +1 -1
- package/example/package.json +1 -1
- package/package.json +2 -2
- package/dist/ContextualToolbars-Dmo86Wd2.js.map +0 -1
- package/dist/ImagePanel-4fHABjNT.js.map +0 -1
- package/dist/compose-DtQL_oit.js +0 -85
- package/dist/compose-DtQL_oit.js.map +0 -1
- package/dist/embed-DhjsJ3ni.js.map +0 -1
- package/dist/useCommands-BI7O5Lf0.js.map +0 -1
- package/dist/validation-au_-Sj-A.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as f, jsxs as j, Fragment as an } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
|
-
import ne, { useRef as V, useState as B, useCallback as N, useMemo as X, useEffect as q, forwardRef as
|
|
4
|
-
import { b as Yt, w as
|
|
5
|
-
import { G as Ie, c as Qe, q as rt, Z as
|
|
6
|
-
import { R as
|
|
7
|
-
import { createPortal as
|
|
3
|
+
import ne, { useRef as V, useState as B, useCallback as N, useMemo as X, useEffect as q, forwardRef as Pn, createElement as Sn, useLayoutEffect as $n, memo as Qo, useReducer as Zo, useContext as Be, createContext as Je, cloneElement as ei, useId as Pr, useSyncExternalStore as $r } from "react";
|
|
4
|
+
import { b as Yt, w as ti, o as ni, x as Hr, m as ri, q as oi } from "./design-builder-HKRo18WT.js";
|
|
5
|
+
import { G as Ie, c as Qe, q as rt, Z as ii, aV as ln, I as si, P as ai, S as li, T as ci, aW as di, K as ui, aX as fi, aY as hi, U as sr } from "./FontAnalyzer-CLMJi2Sw.js";
|
|
6
|
+
import { R as gi, I as cn, a as dn } from "./ExportManager-DEJgxB0S.js";
|
|
7
|
+
import { createPortal as Hn, unstable_batchedUpdates as Ft } from "react-dom";
|
|
8
8
|
import { clsx as Br } from "clsx";
|
|
9
9
|
import { extendTailwindMerge as Vr } from "tailwind-merge";
|
|
10
|
-
import { Slot as
|
|
10
|
+
import { Slot as pi } from "@radix-ui/react-slot";
|
|
11
11
|
import { cva as Ur } from "class-variance-authority";
|
|
12
12
|
import * as ot from "@radix-ui/react-tooltip";
|
|
13
|
-
const
|
|
13
|
+
const mi = {
|
|
14
14
|
"eos-icons:loading": {
|
|
15
15
|
body: '<path fill="currentColor" d="M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z" opacity=".5"/><path fill="currentColor" d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"><animateTransform attributeName="transform" dur="1s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate"/></path>',
|
|
16
16
|
width: 24,
|
|
@@ -396,11 +396,6 @@ const yi = {
|
|
|
396
396
|
width: 24,
|
|
397
397
|
height: 24
|
|
398
398
|
},
|
|
399
|
-
"lucide:pen-tool": {
|
|
400
|
-
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z"/><path d="m18 13l-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18M2.3 2.3l7.286 7.286"/><circle cx="11" cy="11" r="2"/></g>',
|
|
401
|
-
width: 24,
|
|
402
|
-
height: 24
|
|
403
|
-
},
|
|
404
399
|
"lucide:redo-2": {
|
|
405
400
|
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m15 14l5-5l-5-5"/><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"/></g>',
|
|
406
401
|
width: 24,
|
|
@@ -536,23 +531,10 @@ const yi = {
|
|
|
536
531
|
width: 15,
|
|
537
532
|
height: 15
|
|
538
533
|
}
|
|
539
|
-
},
|
|
540
|
-
async function bi() {
|
|
541
|
-
if (!Gr) return;
|
|
542
|
-
const { addIcon: e } = await Promise.resolve().then(() => vs);
|
|
543
|
-
for (const [t, n] of Object.entries(yi))
|
|
544
|
-
e(t, n);
|
|
545
|
-
}
|
|
546
|
-
let un = !1;
|
|
547
|
-
function pc() {
|
|
548
|
-
un || !Gr || (un = !0, bi().catch(() => {
|
|
549
|
-
un = !1;
|
|
550
|
-
}));
|
|
551
|
-
}
|
|
552
|
-
const re = Qe("Layers"), wi = 150;
|
|
534
|
+
}, re = Qe("Layers"), vi = 150;
|
|
553
535
|
async function ar(e, t = 64, n = "transparent") {
|
|
554
536
|
try {
|
|
555
|
-
const r =
|
|
537
|
+
const r = gi();
|
|
556
538
|
return r && r(e, {
|
|
557
539
|
width: t,
|
|
558
540
|
height: t,
|
|
@@ -563,7 +545,7 @@ async function ar(e, t = 64, n = "transparent") {
|
|
|
563
545
|
return re.error("Failed to generate preview:", r), null;
|
|
564
546
|
}
|
|
565
547
|
}
|
|
566
|
-
function
|
|
548
|
+
function Gr(e, t, n, r, o, i = 0, s = null) {
|
|
567
549
|
return (i > 0 ? e : e.filter((l) => {
|
|
568
550
|
const c = l.parentId ?? null;
|
|
569
551
|
return l instanceof Ie, c === null;
|
|
@@ -583,7 +565,7 @@ function _r(e, t, n, r, o, i = 0, s = null) {
|
|
|
583
565
|
await o(l.id);
|
|
584
566
|
}
|
|
585
567
|
};
|
|
586
|
-
return c && l instanceof Ie && (d.children =
|
|
568
|
+
return c && l instanceof Ie && (d.children = Gr(
|
|
587
569
|
l.children,
|
|
588
570
|
t,
|
|
589
571
|
n,
|
|
@@ -594,13 +576,13 @@ function _r(e, t, n, r, o, i = 0, s = null) {
|
|
|
594
576
|
)), d;
|
|
595
577
|
});
|
|
596
578
|
}
|
|
597
|
-
function
|
|
579
|
+
function _r(e) {
|
|
598
580
|
const t = [];
|
|
599
581
|
for (const n of e)
|
|
600
|
-
t.push(n), n.children && t.push(...
|
|
582
|
+
t.push(n), n.children && t.push(..._r(n.children));
|
|
601
583
|
return t;
|
|
602
584
|
}
|
|
603
|
-
function
|
|
585
|
+
function yi(e = {}) {
|
|
604
586
|
var Oe;
|
|
605
587
|
const {
|
|
606
588
|
artboardId: t,
|
|
@@ -631,13 +613,13 @@ function xi(e = {}) {
|
|
|
631
613
|
x = x.filter((R) => C.includes(R.id));
|
|
632
614
|
}
|
|
633
615
|
return n || (x = x.filter((C) => C.visible !== !1)), x;
|
|
634
|
-
}, [s, L, n, c]), D = X(() =>
|
|
616
|
+
}, [s, L, n, c]), D = X(() => Gr(
|
|
635
617
|
v,
|
|
636
618
|
a,
|
|
637
619
|
l,
|
|
638
620
|
g.current,
|
|
639
621
|
E
|
|
640
|
-
), [v, a, l, E, m]), w = X(() =>
|
|
622
|
+
), [v, a, l, E, m]), w = X(() => _r(D), [D]), A = X(() => w.filter((x) => x.isSelected), [w]), T = N((x, C = !1) => {
|
|
641
623
|
C ? l.includes(x) ? h(l.filter((R) => R !== x)) : h([...l, x]) : u(x);
|
|
642
624
|
}, [l, h, u]), O = N((x) => {
|
|
643
625
|
h(x);
|
|
@@ -801,7 +783,7 @@ function xi(e = {}) {
|
|
|
801
783
|
if (!i) return;
|
|
802
784
|
const x = setTimeout(() => {
|
|
803
785
|
De();
|
|
804
|
-
},
|
|
786
|
+
}, vi);
|
|
805
787
|
return () => clearTimeout(x);
|
|
806
788
|
}, [i, De]);
|
|
807
789
|
const ee = N(() => {
|
|
@@ -920,7 +902,44 @@ function xi(e = {}) {
|
|
|
920
902
|
layerCount: w.length
|
|
921
903
|
};
|
|
922
904
|
}
|
|
923
|
-
|
|
905
|
+
class bi {
|
|
906
|
+
constructor() {
|
|
907
|
+
this.isProtectedFlag = !1, this.timeout = null, this.timeoutDuration = 5e3;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Protect the next click from triggering deselection
|
|
911
|
+
* Automatically expires after one check or timeout
|
|
912
|
+
*/
|
|
913
|
+
protectNextClick() {
|
|
914
|
+
this.isProtectedFlag = !0, this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
|
|
915
|
+
this.isProtectedFlag = !1, this.timeout = null;
|
|
916
|
+
}, this.timeoutDuration);
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Check if the current click should be protected
|
|
920
|
+
* This consumes the protection (one-time use)
|
|
921
|
+
* @returns {boolean} true if click should be protected, false otherwise
|
|
922
|
+
*/
|
|
923
|
+
shouldProtectClick() {
|
|
924
|
+
const t = this.isProtectedFlag;
|
|
925
|
+
return this.isProtectedFlag && (this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null)), t;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Manually clear protection (useful for cleanup)
|
|
929
|
+
*/
|
|
930
|
+
clearProtection() {
|
|
931
|
+
this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null);
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Check if protection is currently active (without consuming it)
|
|
935
|
+
* @returns {boolean} true if protection is active
|
|
936
|
+
*/
|
|
937
|
+
isProtected() {
|
|
938
|
+
return this.isProtectedFlag;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
const wi = new bi();
|
|
942
|
+
function xi(e, t) {
|
|
924
943
|
const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
925
944
|
function i(s) {
|
|
926
945
|
if (n[s]) return o[s] = [];
|
|
@@ -933,7 +952,7 @@ function ki(e, t) {
|
|
|
933
952
|
}
|
|
934
953
|
return Object.keys(n).concat(Object.keys(r)).forEach(i), o;
|
|
935
954
|
}
|
|
936
|
-
const
|
|
955
|
+
const Wr = Object.freeze({
|
|
937
956
|
left: 0,
|
|
938
957
|
top: 0,
|
|
939
958
|
width: 16,
|
|
@@ -942,26 +961,26 @@ const qr = Object.freeze({
|
|
|
942
961
|
rotate: 0,
|
|
943
962
|
vFlip: !1,
|
|
944
963
|
hFlip: !1
|
|
945
|
-
}),
|
|
946
|
-
...
|
|
964
|
+
}), Bn = Object.freeze({
|
|
965
|
+
...Wr,
|
|
947
966
|
...Bt
|
|
948
|
-
}),
|
|
949
|
-
...
|
|
967
|
+
}), En = Object.freeze({
|
|
968
|
+
...Bn,
|
|
950
969
|
body: "",
|
|
951
970
|
hidden: !1
|
|
952
971
|
});
|
|
953
|
-
function
|
|
972
|
+
function ki(e, t) {
|
|
954
973
|
const n = {};
|
|
955
974
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
956
975
|
const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
957
976
|
return r && (n.rotate = r), n;
|
|
958
977
|
}
|
|
959
978
|
function lr(e, t) {
|
|
960
|
-
const n =
|
|
961
|
-
for (const r in
|
|
979
|
+
const n = ki(e, t);
|
|
980
|
+
for (const r in En) r in Bt ? r in e && !(r in n) && (n[r] = Bt[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
962
981
|
return n;
|
|
963
982
|
}
|
|
964
|
-
function
|
|
983
|
+
function Ci(e, t, n) {
|
|
965
984
|
const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
966
985
|
let i = {};
|
|
967
986
|
function s(a) {
|
|
@@ -969,47 +988,47 @@ function Si(e, t, n) {
|
|
|
969
988
|
}
|
|
970
989
|
return s(t), n.forEach(s), lr(e, i);
|
|
971
990
|
}
|
|
972
|
-
function
|
|
991
|
+
function qr(e, t) {
|
|
973
992
|
const n = [];
|
|
974
993
|
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
975
994
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
976
995
|
t(o, null), n.push(o);
|
|
977
996
|
});
|
|
978
|
-
const r =
|
|
997
|
+
const r = xi(e);
|
|
979
998
|
for (const o in r) {
|
|
980
999
|
const i = r[o];
|
|
981
|
-
i && (t(o,
|
|
1000
|
+
i && (t(o, Ci(e, o, i)), n.push(o));
|
|
982
1001
|
}
|
|
983
1002
|
return n;
|
|
984
1003
|
}
|
|
985
|
-
const
|
|
1004
|
+
const Si = {
|
|
986
1005
|
provider: "",
|
|
987
1006
|
aliases: {},
|
|
988
1007
|
not_found: {},
|
|
989
|
-
...
|
|
1008
|
+
...Wr
|
|
990
1009
|
};
|
|
991
|
-
function
|
|
1010
|
+
function un(e, t) {
|
|
992
1011
|
for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
993
1012
|
return !0;
|
|
994
1013
|
}
|
|
995
|
-
function
|
|
1014
|
+
function Yr(e) {
|
|
996
1015
|
if (typeof e != "object" || e === null) return null;
|
|
997
1016
|
const t = e;
|
|
998
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
1017
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !un(e, Si)) return null;
|
|
999
1018
|
const n = t.icons;
|
|
1000
1019
|
for (const o in n) {
|
|
1001
1020
|
const i = n[o];
|
|
1002
|
-
if (!o || typeof i.body != "string" || !
|
|
1021
|
+
if (!o || typeof i.body != "string" || !un(i, En)) return null;
|
|
1003
1022
|
}
|
|
1004
1023
|
const r = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
1005
1024
|
for (const o in r) {
|
|
1006
1025
|
const i = r[o], s = i.parent;
|
|
1007
|
-
if (!o || typeof s != "string" || !n[s] && !r[s] || !
|
|
1026
|
+
if (!o || typeof s != "string" || !n[s] && !r[s] || !un(i, En)) return null;
|
|
1008
1027
|
}
|
|
1009
1028
|
return t;
|
|
1010
1029
|
}
|
|
1011
1030
|
const cr = /* @__PURE__ */ Object.create(null);
|
|
1012
|
-
function
|
|
1031
|
+
function Ei(e, t) {
|
|
1013
1032
|
return {
|
|
1014
1033
|
provider: e,
|
|
1015
1034
|
prefix: t,
|
|
@@ -1019,14 +1038,14 @@ function Ai(e, t) {
|
|
|
1019
1038
|
}
|
|
1020
1039
|
function it(e, t) {
|
|
1021
1040
|
const n = cr[e] || (cr[e] = /* @__PURE__ */ Object.create(null));
|
|
1022
|
-
return n[t] || (n[t] =
|
|
1041
|
+
return n[t] || (n[t] = Ei(e, t));
|
|
1023
1042
|
}
|
|
1024
|
-
function
|
|
1025
|
-
return
|
|
1043
|
+
function Kr(e, t) {
|
|
1044
|
+
return Yr(t) ? qr(t, (n, r) => {
|
|
1026
1045
|
r ? e.icons[n] = r : e.missing.add(n);
|
|
1027
1046
|
}) : [];
|
|
1028
1047
|
}
|
|
1029
|
-
function
|
|
1048
|
+
function Ai(e, t, n) {
|
|
1030
1049
|
try {
|
|
1031
1050
|
if (typeof n.body == "string")
|
|
1032
1051
|
return e.icons[t] = { ...n }, !0;
|
|
@@ -1034,7 +1053,7 @@ function Mi(e, t, n) {
|
|
|
1034
1053
|
}
|
|
1035
1054
|
return !1;
|
|
1036
1055
|
}
|
|
1037
|
-
const
|
|
1056
|
+
const Xr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Kt = (e, t, n, r = "") => {
|
|
1038
1057
|
const o = e.split(":");
|
|
1039
1058
|
if (e.slice(0, 1) === "@") {
|
|
1040
1059
|
if (o.length < 2 || o.length > 3) return null;
|
|
@@ -1069,7 +1088,7 @@ const Jr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Kt = (e, t, n, r = "") => {
|
|
|
1069
1088
|
return null;
|
|
1070
1089
|
}, Pt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
1071
1090
|
let xt = !1;
|
|
1072
|
-
function
|
|
1091
|
+
function Jr(e) {
|
|
1073
1092
|
return typeof e == "boolean" && (xt = e), xt;
|
|
1074
1093
|
}
|
|
1075
1094
|
function dr(e) {
|
|
@@ -1079,18 +1098,18 @@ function dr(e) {
|
|
|
1079
1098
|
return n.icons[r] || (n.missing.has(r) ? null : void 0);
|
|
1080
1099
|
}
|
|
1081
1100
|
}
|
|
1082
|
-
function
|
|
1101
|
+
function Vn(e, t) {
|
|
1083
1102
|
const n = Kt(e, !0, xt);
|
|
1084
1103
|
if (!n) return !1;
|
|
1085
1104
|
const r = it(n.provider, n.prefix);
|
|
1086
|
-
return t ?
|
|
1105
|
+
return t ? Ai(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
1087
1106
|
}
|
|
1088
|
-
function
|
|
1107
|
+
function Qr(e, t) {
|
|
1089
1108
|
if (typeof e != "object") return !1;
|
|
1090
1109
|
if (typeof t != "string" && (t = e.provider || ""), xt && !t && !e.prefix) {
|
|
1091
1110
|
let o = !1;
|
|
1092
|
-
return
|
|
1093
|
-
|
|
1111
|
+
return Yr(e) && (e.prefix = "", qr(e, (i, s) => {
|
|
1112
|
+
Vn(i, s) && (o = !0);
|
|
1094
1113
|
})), o;
|
|
1095
1114
|
}
|
|
1096
1115
|
const n = e.prefix;
|
|
@@ -1099,23 +1118,23 @@ function eo(e, t) {
|
|
|
1099
1118
|
name: "a"
|
|
1100
1119
|
})) return !1;
|
|
1101
1120
|
const r = it(t, n);
|
|
1102
|
-
return !!
|
|
1121
|
+
return !!Kr(r, e);
|
|
1103
1122
|
}
|
|
1104
|
-
const
|
|
1123
|
+
const Zr = Object.freeze({
|
|
1105
1124
|
width: null,
|
|
1106
1125
|
height: null
|
|
1107
|
-
}),
|
|
1108
|
-
...
|
|
1126
|
+
}), eo = Object.freeze({
|
|
1127
|
+
...Zr,
|
|
1109
1128
|
...Bt
|
|
1110
|
-
}),
|
|
1111
|
-
function
|
|
1129
|
+
}), Mi = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Di = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
1130
|
+
function An(e, t, n) {
|
|
1112
1131
|
if (t === 1) return e;
|
|
1113
1132
|
if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
1114
1133
|
if (typeof e != "string") return e;
|
|
1115
|
-
const r = e.split(
|
|
1134
|
+
const r = e.split(Mi);
|
|
1116
1135
|
if (r === null || !r.length) return e;
|
|
1117
1136
|
const o = [];
|
|
1118
|
-
let i = r.shift(), s =
|
|
1137
|
+
let i = r.shift(), s = Di.test(i);
|
|
1119
1138
|
for (; ; ) {
|
|
1120
1139
|
if (s) {
|
|
1121
1140
|
const a = parseFloat(i);
|
|
@@ -1125,7 +1144,7 @@ function Mn(e, t, n) {
|
|
|
1125
1144
|
s = !s;
|
|
1126
1145
|
}
|
|
1127
1146
|
}
|
|
1128
|
-
function
|
|
1147
|
+
function Li(e, t = "defs") {
|
|
1129
1148
|
let n = "";
|
|
1130
1149
|
const r = e.indexOf("<" + t);
|
|
1131
1150
|
for (; r >= 0; ) {
|
|
@@ -1140,20 +1159,20 @@ function Ti(e, t = "defs") {
|
|
|
1140
1159
|
content: e
|
|
1141
1160
|
};
|
|
1142
1161
|
}
|
|
1143
|
-
function
|
|
1162
|
+
function Ti(e, t) {
|
|
1144
1163
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1145
1164
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const r =
|
|
1148
|
-
return
|
|
1165
|
+
function Ii(e, t, n) {
|
|
1166
|
+
const r = Li(e);
|
|
1167
|
+
return Ti(r.defs, t + r.content + n);
|
|
1149
1168
|
}
|
|
1150
|
-
const
|
|
1151
|
-
function
|
|
1169
|
+
const Ri = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
1170
|
+
function to(e, t) {
|
|
1152
1171
|
const n = {
|
|
1153
|
-
...
|
|
1172
|
+
...Bn,
|
|
1154
1173
|
...e
|
|
1155
1174
|
}, r = {
|
|
1156
|
-
...
|
|
1175
|
+
...eo,
|
|
1157
1176
|
...t
|
|
1158
1177
|
}, o = {
|
|
1159
1178
|
left: n.left,
|
|
@@ -1178,13 +1197,13 @@ function ro(e, t) {
|
|
|
1178
1197
|
L = o.width / 2 + o.left, g.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
|
|
1179
1198
|
break;
|
|
1180
1199
|
}
|
|
1181
|
-
M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), g.length && (i =
|
|
1200
|
+
M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), g.length && (i = Ii(i, '<g transform="' + g.join(" ") + '">', "</g>"));
|
|
1182
1201
|
});
|
|
1183
1202
|
const s = r.width, a = r.height, l = o.width, c = o.height;
|
|
1184
1203
|
let u, d;
|
|
1185
|
-
s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u =
|
|
1204
|
+
s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u = An(d, l / c)) : (u = s === "auto" ? l : s, d = a === null ? An(u, c / l) : a === "auto" ? c : a);
|
|
1186
1205
|
const h = {}, p = (y, g) => {
|
|
1187
|
-
|
|
1206
|
+
Ri(g) || (h[y] = g.toString());
|
|
1188
1207
|
};
|
|
1189
1208
|
p("width", u), p("height", d);
|
|
1190
1209
|
const k = [
|
|
@@ -1199,25 +1218,25 @@ function ro(e, t) {
|
|
|
1199
1218
|
body: i
|
|
1200
1219
|
};
|
|
1201
1220
|
}
|
|
1202
|
-
const
|
|
1203
|
-
let
|
|
1204
|
-
function
|
|
1221
|
+
const Ni = /\sid="(\S+)"/g, zi = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
1222
|
+
let Oi = 0;
|
|
1223
|
+
function no(e, t = zi) {
|
|
1205
1224
|
const n = [];
|
|
1206
1225
|
let r;
|
|
1207
|
-
for (; r =
|
|
1226
|
+
for (; r = Ni.exec(e); ) n.push(r[1]);
|
|
1208
1227
|
if (!n.length) return e;
|
|
1209
1228
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
1210
1229
|
return n.forEach((i) => {
|
|
1211
|
-
const s = typeof t == "function" ? t(i) : t + (
|
|
1230
|
+
const s = typeof t == "function" ? t(i) : t + (Oi++).toString(), a = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1212
1231
|
e = e.replace(new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
|
|
1213
1232
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
1214
1233
|
}
|
|
1215
|
-
const
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1234
|
+
const Mn = /* @__PURE__ */ Object.create(null);
|
|
1235
|
+
function Fi(e, t) {
|
|
1236
|
+
Mn[e] = t;
|
|
1218
1237
|
}
|
|
1219
|
-
function
|
|
1220
|
-
return
|
|
1238
|
+
function Dn(e) {
|
|
1239
|
+
return Mn[e] || Mn[""];
|
|
1221
1240
|
}
|
|
1222
1241
|
function Un(e) {
|
|
1223
1242
|
let t;
|
|
@@ -1237,22 +1256,22 @@ function Un(e) {
|
|
|
1237
1256
|
const Gn = /* @__PURE__ */ Object.create(null), ht = ["https://api.simplesvg.com", "https://api.unisvg.com"], $t = [];
|
|
1238
1257
|
for (; ht.length > 0; ) ht.length === 1 || Math.random() > 0.5 ? $t.push(ht.shift()) : $t.push(ht.pop());
|
|
1239
1258
|
Gn[""] = Un({ resources: ["https://api.iconify.design"].concat($t) });
|
|
1240
|
-
function
|
|
1259
|
+
function ro(e, t) {
|
|
1241
1260
|
const n = Un(t);
|
|
1242
1261
|
return n === null ? !1 : (Gn[e] = n, !0);
|
|
1243
1262
|
}
|
|
1244
1263
|
function _n(e) {
|
|
1245
1264
|
return Gn[e];
|
|
1246
1265
|
}
|
|
1247
|
-
const
|
|
1266
|
+
const ji = () => {
|
|
1248
1267
|
let e;
|
|
1249
1268
|
try {
|
|
1250
1269
|
if (e = fetch, typeof e == "function") return e;
|
|
1251
1270
|
} catch {
|
|
1252
1271
|
}
|
|
1253
1272
|
};
|
|
1254
|
-
let ur =
|
|
1255
|
-
function
|
|
1273
|
+
let ur = ji();
|
|
1274
|
+
function Pi(e, t) {
|
|
1256
1275
|
const n = _n(e);
|
|
1257
1276
|
if (!n) return 0;
|
|
1258
1277
|
let r;
|
|
@@ -1267,11 +1286,11 @@ function $i(e, t) {
|
|
|
1267
1286
|
}
|
|
1268
1287
|
return r;
|
|
1269
1288
|
}
|
|
1270
|
-
function
|
|
1289
|
+
function $i(e) {
|
|
1271
1290
|
return e === 404;
|
|
1272
1291
|
}
|
|
1273
|
-
const
|
|
1274
|
-
const r = [], o =
|
|
1292
|
+
const Hi = (e, t, n) => {
|
|
1293
|
+
const r = [], o = Pi(e, t), i = "icons";
|
|
1275
1294
|
let s = {
|
|
1276
1295
|
type: i,
|
|
1277
1296
|
provider: e,
|
|
@@ -1287,19 +1306,19 @@ const Bi = (e, t, n) => {
|
|
|
1287
1306
|
}, a = l.length), s.icons.push(l);
|
|
1288
1307
|
}), r.push(s), r;
|
|
1289
1308
|
};
|
|
1290
|
-
function
|
|
1309
|
+
function Bi(e) {
|
|
1291
1310
|
if (typeof e == "string") {
|
|
1292
1311
|
const t = _n(e);
|
|
1293
1312
|
if (t) return t.path;
|
|
1294
1313
|
}
|
|
1295
1314
|
return "/";
|
|
1296
1315
|
}
|
|
1297
|
-
const
|
|
1316
|
+
const Vi = (e, t, n) => {
|
|
1298
1317
|
if (!ur) {
|
|
1299
1318
|
n("abort", 424);
|
|
1300
1319
|
return;
|
|
1301
1320
|
}
|
|
1302
|
-
let r =
|
|
1321
|
+
let r = Bi(t.provider);
|
|
1303
1322
|
switch (t.type) {
|
|
1304
1323
|
case "icons": {
|
|
1305
1324
|
const i = t.prefix, a = t.icons.join(","), l = new URLSearchParams({ icons: a });
|
|
@@ -1320,7 +1339,7 @@ const Ui = (e, t, n) => {
|
|
|
1320
1339
|
const s = i.status;
|
|
1321
1340
|
if (s !== 200) {
|
|
1322
1341
|
setTimeout(() => {
|
|
1323
|
-
n(
|
|
1342
|
+
n($i(s) ? "abort" : "next", s);
|
|
1324
1343
|
});
|
|
1325
1344
|
return;
|
|
1326
1345
|
}
|
|
@@ -1338,17 +1357,17 @@ const Ui = (e, t, n) => {
|
|
|
1338
1357
|
}).catch(() => {
|
|
1339
1358
|
n("next", o);
|
|
1340
1359
|
});
|
|
1341
|
-
},
|
|
1342
|
-
prepare:
|
|
1343
|
-
send:
|
|
1360
|
+
}, Ui = {
|
|
1361
|
+
prepare: Hi,
|
|
1362
|
+
send: Vi
|
|
1344
1363
|
};
|
|
1345
|
-
function
|
|
1364
|
+
function oo(e, t) {
|
|
1346
1365
|
e.forEach((n) => {
|
|
1347
1366
|
const r = n.loaderCallbacks;
|
|
1348
1367
|
r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
|
|
1349
1368
|
});
|
|
1350
1369
|
}
|
|
1351
|
-
function
|
|
1370
|
+
function Gi(e) {
|
|
1352
1371
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
1353
1372
|
e.pendingCallbacksFlag = !1;
|
|
1354
1373
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -1373,13 +1392,13 @@ function _i(e) {
|
|
|
1373
1392
|
else
|
|
1374
1393
|
return n = !0, !0;
|
|
1375
1394
|
return !1;
|
|
1376
|
-
}), s.pending.length !== a && (n ||
|
|
1395
|
+
}), s.pending.length !== a && (n || oo([e], i.id), i.callback(s.loaded.slice(0), s.missing.slice(0), s.pending.slice(0), i.abort));
|
|
1377
1396
|
});
|
|
1378
1397
|
}));
|
|
1379
1398
|
}
|
|
1380
|
-
let
|
|
1381
|
-
function
|
|
1382
|
-
const r =
|
|
1399
|
+
let _i = 0;
|
|
1400
|
+
function Wi(e, t, n) {
|
|
1401
|
+
const r = _i++, o = oo.bind(null, n, r);
|
|
1383
1402
|
if (!t.pending.length) return o;
|
|
1384
1403
|
const i = {
|
|
1385
1404
|
id: r,
|
|
@@ -1391,7 +1410,7 @@ function qi(e, t, n) {
|
|
|
1391
1410
|
(s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
|
|
1392
1411
|
}), o;
|
|
1393
1412
|
}
|
|
1394
|
-
function
|
|
1413
|
+
function qi(e) {
|
|
1395
1414
|
const t = {
|
|
1396
1415
|
loaded: [],
|
|
1397
1416
|
missing: [],
|
|
@@ -1417,14 +1436,14 @@ function Yi(e) {
|
|
|
1417
1436
|
u.push(d);
|
|
1418
1437
|
}), t;
|
|
1419
1438
|
}
|
|
1420
|
-
function
|
|
1439
|
+
function Yi(e, t = !0, n = !1) {
|
|
1421
1440
|
const r = [];
|
|
1422
1441
|
return e.forEach((o) => {
|
|
1423
1442
|
const i = typeof o == "string" ? Kt(o, t, n) : o;
|
|
1424
1443
|
i && r.push(i);
|
|
1425
1444
|
}), r;
|
|
1426
1445
|
}
|
|
1427
|
-
const
|
|
1446
|
+
const Ki = {
|
|
1428
1447
|
resources: [],
|
|
1429
1448
|
index: 0,
|
|
1430
1449
|
timeout: 2e3,
|
|
@@ -1432,7 +1451,7 @@ const Xi = {
|
|
|
1432
1451
|
random: !1,
|
|
1433
1452
|
dataAfterTimeout: !1
|
|
1434
1453
|
};
|
|
1435
|
-
function
|
|
1454
|
+
function Xi(e, t, n, r) {
|
|
1436
1455
|
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
1437
1456
|
let s;
|
|
1438
1457
|
if (e.random) {
|
|
@@ -1530,9 +1549,9 @@ function Ji(e, t, n, r) {
|
|
|
1530
1549
|
}
|
|
1531
1550
|
return setTimeout(I), m;
|
|
1532
1551
|
}
|
|
1533
|
-
function
|
|
1552
|
+
function io(e) {
|
|
1534
1553
|
const t = {
|
|
1535
|
-
...
|
|
1554
|
+
...Ki,
|
|
1536
1555
|
...e
|
|
1537
1556
|
};
|
|
1538
1557
|
let n = [];
|
|
@@ -1540,7 +1559,7 @@ function ao(e) {
|
|
|
1540
1559
|
n = n.filter((a) => a().status === "pending");
|
|
1541
1560
|
}
|
|
1542
1561
|
function o(a, l, c) {
|
|
1543
|
-
const u =
|
|
1562
|
+
const u = Xi(t, a, l, (d, h) => {
|
|
1544
1563
|
r(), c && c(d, h);
|
|
1545
1564
|
});
|
|
1546
1565
|
return n.push(u), u;
|
|
@@ -1560,33 +1579,33 @@ function ao(e) {
|
|
|
1560
1579
|
}
|
|
1561
1580
|
function fr() {
|
|
1562
1581
|
}
|
|
1563
|
-
const
|
|
1564
|
-
function
|
|
1565
|
-
if (!
|
|
1582
|
+
const fn = /* @__PURE__ */ Object.create(null);
|
|
1583
|
+
function Ji(e) {
|
|
1584
|
+
if (!fn[e]) {
|
|
1566
1585
|
const t = _n(e);
|
|
1567
1586
|
if (!t) return;
|
|
1568
|
-
const n =
|
|
1587
|
+
const n = io(t), r = {
|
|
1569
1588
|
config: t,
|
|
1570
1589
|
redundancy: n
|
|
1571
1590
|
};
|
|
1572
|
-
|
|
1591
|
+
fn[e] = r;
|
|
1573
1592
|
}
|
|
1574
|
-
return
|
|
1593
|
+
return fn[e];
|
|
1575
1594
|
}
|
|
1576
|
-
function
|
|
1595
|
+
function Qi(e, t, n) {
|
|
1577
1596
|
let r, o;
|
|
1578
1597
|
if (typeof e == "string") {
|
|
1579
|
-
const i =
|
|
1598
|
+
const i = Dn(e);
|
|
1580
1599
|
if (!i)
|
|
1581
1600
|
return n(void 0, 424), fr;
|
|
1582
1601
|
o = i.send;
|
|
1583
|
-
const s =
|
|
1602
|
+
const s = Ji(e);
|
|
1584
1603
|
s && (r = s.redundancy);
|
|
1585
1604
|
} else {
|
|
1586
1605
|
const i = Un(e);
|
|
1587
1606
|
if (i) {
|
|
1588
|
-
r =
|
|
1589
|
-
const s = e.resources ? e.resources[0] : "", a =
|
|
1607
|
+
r = io(i);
|
|
1608
|
+
const s = e.resources ? e.resources[0] : "", a = Dn(s);
|
|
1590
1609
|
a && (o = a.send);
|
|
1591
1610
|
}
|
|
1592
1611
|
}
|
|
@@ -1594,15 +1613,15 @@ function Zi(e, t, n) {
|
|
|
1594
1613
|
}
|
|
1595
1614
|
function hr() {
|
|
1596
1615
|
}
|
|
1597
|
-
function
|
|
1616
|
+
function Zi(e) {
|
|
1598
1617
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1599
|
-
e.iconsLoaderFlag = !1,
|
|
1618
|
+
e.iconsLoaderFlag = !1, Gi(e);
|
|
1600
1619
|
}));
|
|
1601
1620
|
}
|
|
1602
|
-
function
|
|
1621
|
+
function es(e) {
|
|
1603
1622
|
const t = [], n = [];
|
|
1604
1623
|
return e.forEach((r) => {
|
|
1605
|
-
(r.match(
|
|
1624
|
+
(r.match(Xr) ? t : n).push(r);
|
|
1606
1625
|
}), {
|
|
1607
1626
|
valid: t,
|
|
1608
1627
|
invalid: n
|
|
@@ -1616,14 +1635,14 @@ function gt(e, t, n) {
|
|
|
1616
1635
|
});
|
|
1617
1636
|
}
|
|
1618
1637
|
if (n && typeof n == "object") try {
|
|
1619
|
-
if (!
|
|
1638
|
+
if (!Kr(e, n).length) {
|
|
1620
1639
|
r();
|
|
1621
1640
|
return;
|
|
1622
1641
|
}
|
|
1623
1642
|
} catch (o) {
|
|
1624
1643
|
console.error(o);
|
|
1625
1644
|
}
|
|
1626
|
-
r(),
|
|
1645
|
+
r(), Zi(e);
|
|
1627
1646
|
}
|
|
1628
1647
|
function gr(e, t) {
|
|
1629
1648
|
e instanceof Promise ? e.then((n) => {
|
|
@@ -1632,7 +1651,7 @@ function gr(e, t) {
|
|
|
1632
1651
|
t(null);
|
|
1633
1652
|
}) : t(e);
|
|
1634
1653
|
}
|
|
1635
|
-
function
|
|
1654
|
+
function ts(e, t) {
|
|
1636
1655
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1637
1656
|
e.iconsQueueFlag = !1;
|
|
1638
1657
|
const { provider: n, prefix: r } = e, o = e.iconsToLoad;
|
|
@@ -1657,22 +1676,22 @@ function ns(e, t) {
|
|
|
1657
1676
|
});
|
|
1658
1677
|
return;
|
|
1659
1678
|
}
|
|
1660
|
-
const { valid: s, invalid: a } =
|
|
1679
|
+
const { valid: s, invalid: a } = es(o);
|
|
1661
1680
|
if (a.length && gt(e, a, null), !s.length) return;
|
|
1662
|
-
const l = r.match(
|
|
1681
|
+
const l = r.match(Xr) ? Dn(n) : null;
|
|
1663
1682
|
if (!l) {
|
|
1664
1683
|
gt(e, s, null);
|
|
1665
1684
|
return;
|
|
1666
1685
|
}
|
|
1667
1686
|
l.prepare(n, r, s).forEach((u) => {
|
|
1668
|
-
|
|
1687
|
+
Qi(n, u, (d) => {
|
|
1669
1688
|
gt(e, u.icons, d);
|
|
1670
1689
|
});
|
|
1671
1690
|
});
|
|
1672
1691
|
}));
|
|
1673
1692
|
}
|
|
1674
|
-
const
|
|
1675
|
-
const n =
|
|
1693
|
+
const so = (e, t) => {
|
|
1694
|
+
const n = Yi(e, !0, Jr()), r = qi(n);
|
|
1676
1695
|
if (!r.pending.length) {
|
|
1677
1696
|
let l = !0;
|
|
1678
1697
|
return t && setTimeout(() => {
|
|
@@ -1694,20 +1713,20 @@ const lo = (e, t) => {
|
|
|
1694
1713
|
p.has(d) || (p.add(d), o[c][u].push(d));
|
|
1695
1714
|
}), i.forEach((l) => {
|
|
1696
1715
|
const c = o[l.provider][l.prefix];
|
|
1697
|
-
c.length &&
|
|
1698
|
-
}), t ?
|
|
1716
|
+
c.length && ts(l, c);
|
|
1717
|
+
}), t ? Wi(t, r, i) : hr;
|
|
1699
1718
|
};
|
|
1700
|
-
function
|
|
1719
|
+
function ns(e, t) {
|
|
1701
1720
|
const n = { ...e };
|
|
1702
1721
|
for (const r in t) {
|
|
1703
1722
|
const o = t[r], i = typeof o;
|
|
1704
|
-
r in
|
|
1723
|
+
r in Zr ? (o === null || o && (i === "string" || i === "number")) && (n[r] = o) : i === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
|
|
1705
1724
|
}
|
|
1706
1725
|
return n;
|
|
1707
1726
|
}
|
|
1708
|
-
const
|
|
1709
|
-
function
|
|
1710
|
-
t.split(
|
|
1727
|
+
const rs = /[\s,]+/;
|
|
1728
|
+
function os(e, t) {
|
|
1729
|
+
t.split(rs).forEach((n) => {
|
|
1711
1730
|
switch (n.trim()) {
|
|
1712
1731
|
case "horizontal":
|
|
1713
1732
|
e.hFlip = !0;
|
|
@@ -1718,7 +1737,7 @@ function is(e, t) {
|
|
|
1718
1737
|
}
|
|
1719
1738
|
});
|
|
1720
1739
|
}
|
|
1721
|
-
function
|
|
1740
|
+
function is(e, t = 0) {
|
|
1722
1741
|
const n = e.replace(/^-?[0-9.]*/, "");
|
|
1723
1742
|
function r(o) {
|
|
1724
1743
|
for (; o < 0; ) o += 4;
|
|
@@ -1743,69 +1762,69 @@ function ss(e, t = 0) {
|
|
|
1743
1762
|
}
|
|
1744
1763
|
return t;
|
|
1745
1764
|
}
|
|
1746
|
-
function
|
|
1765
|
+
function ss(e, t) {
|
|
1747
1766
|
let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1748
1767
|
for (const r in t) n += " " + r + '="' + t[r] + '"';
|
|
1749
1768
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
|
|
1750
1769
|
}
|
|
1751
|
-
function
|
|
1770
|
+
function as(e) {
|
|
1752
1771
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1753
1772
|
}
|
|
1754
|
-
function
|
|
1755
|
-
return "data:image/svg+xml," +
|
|
1773
|
+
function ls(e) {
|
|
1774
|
+
return "data:image/svg+xml," + as(e);
|
|
1756
1775
|
}
|
|
1757
|
-
function
|
|
1758
|
-
return 'url("' +
|
|
1776
|
+
function cs(e) {
|
|
1777
|
+
return 'url("' + ls(e) + '")';
|
|
1759
1778
|
}
|
|
1760
1779
|
let vt;
|
|
1761
|
-
function
|
|
1780
|
+
function ds() {
|
|
1762
1781
|
try {
|
|
1763
1782
|
vt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
1764
1783
|
} catch {
|
|
1765
1784
|
vt = null;
|
|
1766
1785
|
}
|
|
1767
1786
|
}
|
|
1768
|
-
function
|
|
1769
|
-
return vt === void 0 &&
|
|
1787
|
+
function us(e) {
|
|
1788
|
+
return vt === void 0 && ds(), vt ? vt.createHTML(e) : e;
|
|
1770
1789
|
}
|
|
1771
|
-
const
|
|
1772
|
-
...
|
|
1790
|
+
const ao = {
|
|
1791
|
+
...eo,
|
|
1773
1792
|
inline: !1
|
|
1774
|
-
},
|
|
1793
|
+
}, fs = {
|
|
1775
1794
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1776
1795
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1777
1796
|
"aria-hidden": !0,
|
|
1778
1797
|
role: "img"
|
|
1779
|
-
},
|
|
1798
|
+
}, hs = {
|
|
1780
1799
|
display: "inline-block"
|
|
1781
|
-
},
|
|
1800
|
+
}, Ln = {
|
|
1782
1801
|
backgroundColor: "currentColor"
|
|
1783
|
-
},
|
|
1802
|
+
}, lo = {
|
|
1784
1803
|
backgroundColor: "transparent"
|
|
1785
1804
|
}, pr = {
|
|
1786
1805
|
Image: "var(--svg)",
|
|
1787
1806
|
Repeat: "no-repeat",
|
|
1788
1807
|
Size: "100% 100%"
|
|
1789
1808
|
}, mr = {
|
|
1790
|
-
WebkitMask:
|
|
1791
|
-
mask:
|
|
1792
|
-
background:
|
|
1809
|
+
WebkitMask: Ln,
|
|
1810
|
+
mask: Ln,
|
|
1811
|
+
background: lo
|
|
1793
1812
|
};
|
|
1794
1813
|
for (const e in mr) {
|
|
1795
1814
|
const t = mr[e];
|
|
1796
1815
|
for (const n in pr)
|
|
1797
1816
|
t[e + n] = pr[n];
|
|
1798
1817
|
}
|
|
1799
|
-
const
|
|
1800
|
-
...
|
|
1818
|
+
const gs = {
|
|
1819
|
+
...ao,
|
|
1801
1820
|
inline: !0
|
|
1802
1821
|
};
|
|
1803
1822
|
function vr(e) {
|
|
1804
1823
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1805
1824
|
}
|
|
1806
|
-
const
|
|
1807
|
-
const r = t.inline ?
|
|
1808
|
-
...i === "svg" ?
|
|
1825
|
+
const ps = (e, t, n) => {
|
|
1826
|
+
const r = t.inline ? gs : ao, o = ns(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
|
|
1827
|
+
...i === "svg" ? fs : {}
|
|
1809
1828
|
};
|
|
1810
1829
|
if (n) {
|
|
1811
1830
|
const g = Kt(n, !1, !0);
|
|
@@ -1848,7 +1867,7 @@ const ms = (e, t, n) => {
|
|
|
1848
1867
|
break;
|
|
1849
1868
|
// Flip as string: 'horizontal,vertical'
|
|
1850
1869
|
case "flip":
|
|
1851
|
-
typeof m == "string" &&
|
|
1870
|
+
typeof m == "string" && os(o, m);
|
|
1852
1871
|
break;
|
|
1853
1872
|
// Color: copy to style
|
|
1854
1873
|
case "color":
|
|
@@ -1856,7 +1875,7 @@ const ms = (e, t, n) => {
|
|
|
1856
1875
|
break;
|
|
1857
1876
|
// Rotation as string
|
|
1858
1877
|
case "rotate":
|
|
1859
|
-
typeof m == "string" ? o[g] =
|
|
1878
|
+
typeof m == "string" ? o[g] = is(m) : typeof m == "number" && (o[g] = m);
|
|
1860
1879
|
break;
|
|
1861
1880
|
// Remove aria-hidden
|
|
1862
1881
|
case "ariaHidden":
|
|
@@ -1868,7 +1887,7 @@ const ms = (e, t, n) => {
|
|
|
1868
1887
|
r[g] === void 0 && (l[g] = m);
|
|
1869
1888
|
}
|
|
1870
1889
|
}
|
|
1871
|
-
const c =
|
|
1890
|
+
const c = to(e, o), u = c.attributes;
|
|
1872
1891
|
if (o.inline && (s.verticalAlign = "-0.125em"), i === "svg") {
|
|
1873
1892
|
l.style = {
|
|
1874
1893
|
...s,
|
|
@@ -1876,26 +1895,26 @@ const ms = (e, t, n) => {
|
|
|
1876
1895
|
}, Object.assign(l, u);
|
|
1877
1896
|
let g = 0, m = t.id;
|
|
1878
1897
|
return typeof m == "string" && (m = m.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
|
|
1879
|
-
__html:
|
|
1880
|
-
},
|
|
1898
|
+
__html: us(no(c.body, m ? () => m + "ID" + g++ : "iconifyReact"))
|
|
1899
|
+
}, Sn("svg", l);
|
|
1881
1900
|
}
|
|
1882
|
-
const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y =
|
|
1901
|
+
const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = ss(d, {
|
|
1883
1902
|
...u,
|
|
1884
1903
|
width: h + "",
|
|
1885
1904
|
height: p + ""
|
|
1886
1905
|
});
|
|
1887
1906
|
return l.style = {
|
|
1888
1907
|
...s,
|
|
1889
|
-
"--svg":
|
|
1908
|
+
"--svg": cs(y),
|
|
1890
1909
|
width: vr(u.width),
|
|
1891
1910
|
height: vr(u.height),
|
|
1892
|
-
...
|
|
1893
|
-
...k ?
|
|
1911
|
+
...hs,
|
|
1912
|
+
...k ? Ln : lo,
|
|
1894
1913
|
...a
|
|
1895
|
-
},
|
|
1914
|
+
}, Sn("span", l);
|
|
1896
1915
|
};
|
|
1897
|
-
|
|
1898
|
-
|
|
1916
|
+
Jr(!0);
|
|
1917
|
+
Fi("", Ui);
|
|
1899
1918
|
if (typeof document < "u" && typeof window < "u") {
|
|
1900
1919
|
const e = window;
|
|
1901
1920
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -1905,7 +1924,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1905
1924
|
// Check if item is an object and not null/array
|
|
1906
1925
|
(typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
|
|
1907
1926
|
typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
|
|
1908
|
-
!
|
|
1927
|
+
!Qr(r)) && console.error(n);
|
|
1909
1928
|
} catch {
|
|
1910
1929
|
console.error(n);
|
|
1911
1930
|
}
|
|
@@ -1920,14 +1939,14 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1920
1939
|
const o = t[n];
|
|
1921
1940
|
if (typeof o != "object" || !o || o.resources === void 0)
|
|
1922
1941
|
continue;
|
|
1923
|
-
|
|
1942
|
+
ro(n, o) || console.error(r);
|
|
1924
1943
|
} catch {
|
|
1925
1944
|
console.error(r);
|
|
1926
1945
|
}
|
|
1927
1946
|
}
|
|
1928
1947
|
}
|
|
1929
1948
|
}
|
|
1930
|
-
function
|
|
1949
|
+
function co(e) {
|
|
1931
1950
|
const [t, n] = B(!!e.ssr), [r, o] = B({});
|
|
1932
1951
|
function i(p) {
|
|
1933
1952
|
if (p) {
|
|
@@ -1973,7 +1992,7 @@ function fo(e) {
|
|
|
1973
1992
|
data: y
|
|
1974
1993
|
}))
|
|
1975
1994
|
if (y === void 0) {
|
|
1976
|
-
const g =
|
|
1995
|
+
const g = so([k], u);
|
|
1977
1996
|
o({
|
|
1978
1997
|
callback: g
|
|
1979
1998
|
});
|
|
@@ -1983,76 +2002,42 @@ function fo(e) {
|
|
|
1983
2002
|
t && u();
|
|
1984
2003
|
}, [e.icon, t]);
|
|
1985
2004
|
const { name: d, data: h } = s;
|
|
1986
|
-
return h ?
|
|
1987
|
-
...
|
|
2005
|
+
return h ? ps({
|
|
2006
|
+
...Bn,
|
|
1988
2007
|
...h
|
|
1989
|
-
}, e, d) : e.children ? e.children : e.fallback ? e.fallback :
|
|
2008
|
+
}, e, d) : e.children ? e.children : e.fallback ? e.fallback : Sn("span", {});
|
|
1990
2009
|
}
|
|
1991
|
-
const $ =
|
|
2010
|
+
const $ = Pn((e, t) => co({
|
|
1992
2011
|
...e,
|
|
1993
2012
|
_ref: t
|
|
1994
2013
|
}));
|
|
1995
|
-
|
|
2014
|
+
Pn((e, t) => co({
|
|
1996
2015
|
inline: !0,
|
|
1997
2016
|
...e,
|
|
1998
2017
|
_ref: t
|
|
1999
2018
|
}));
|
|
2000
|
-
const
|
|
2019
|
+
const uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2001
2020
|
__proto__: null,
|
|
2002
2021
|
Icon: $,
|
|
2003
|
-
addAPIProvider:
|
|
2004
|
-
addCollection:
|
|
2005
|
-
addIcon:
|
|
2006
|
-
buildIcon:
|
|
2007
|
-
calculateSize:
|
|
2008
|
-
loadIcons:
|
|
2009
|
-
replaceIDs:
|
|
2022
|
+
addAPIProvider: ro,
|
|
2023
|
+
addCollection: Qr,
|
|
2024
|
+
addIcon: Vn,
|
|
2025
|
+
buildIcon: to,
|
|
2026
|
+
calculateSize: An,
|
|
2027
|
+
loadIcons: so,
|
|
2028
|
+
replaceIDs: no
|
|
2010
2029
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
}
|
|
2015
|
-
/**
|
|
2016
|
-
* Protect the next click from triggering deselection
|
|
2017
|
-
* Automatically expires after one check or timeout
|
|
2018
|
-
*/
|
|
2019
|
-
protectNextClick() {
|
|
2020
|
-
this.isProtectedFlag = !0, this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
|
|
2021
|
-
this.isProtectedFlag = !1, this.timeout = null;
|
|
2022
|
-
}, this.timeoutDuration);
|
|
2023
|
-
}
|
|
2024
|
-
/**
|
|
2025
|
-
* Check if the current click should be protected
|
|
2026
|
-
* This consumes the protection (one-time use)
|
|
2027
|
-
* @returns {boolean} true if click should be protected, false otherwise
|
|
2028
|
-
*/
|
|
2029
|
-
shouldProtectClick() {
|
|
2030
|
-
const t = this.isProtectedFlag;
|
|
2031
|
-
return this.isProtectedFlag && (this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null)), t;
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* Manually clear protection (useful for cleanup)
|
|
2035
|
-
*/
|
|
2036
|
-
clearProtection() {
|
|
2037
|
-
this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null);
|
|
2038
|
-
}
|
|
2039
|
-
/**
|
|
2040
|
-
* Check if protection is currently active (without consuming it)
|
|
2041
|
-
* @returns {boolean} true if protection is active
|
|
2042
|
-
*/
|
|
2043
|
-
isProtected() {
|
|
2044
|
-
return this.isProtectedFlag;
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
const bs = new ys(), ws = Vr({ prefix: "sc" });
|
|
2030
|
+
if (typeof window < "u")
|
|
2031
|
+
for (const [e, t] of Object.entries(mi)) Vn(e, t);
|
|
2032
|
+
const ms = Vr({ prefix: "sc" });
|
|
2048
2033
|
function Re(...e) {
|
|
2049
|
-
return
|
|
2034
|
+
return ms(Br(e));
|
|
2050
2035
|
}
|
|
2051
|
-
const
|
|
2052
|
-
function
|
|
2053
|
-
return F.useContext(
|
|
2036
|
+
const uo = F.createContext({ variant: "transparent" });
|
|
2037
|
+
function vs() {
|
|
2038
|
+
return F.useContext(uo);
|
|
2054
2039
|
}
|
|
2055
|
-
const
|
|
2040
|
+
const ys = Ur("", {
|
|
2056
2041
|
variants: {
|
|
2057
2042
|
variant: {
|
|
2058
2043
|
transparent: "sc:bg-transparent",
|
|
@@ -2063,14 +2048,14 @@ const ks = Ur("", {
|
|
|
2063
2048
|
defaultVariants: {
|
|
2064
2049
|
variant: "default"
|
|
2065
2050
|
}
|
|
2066
|
-
}),
|
|
2051
|
+
}), fo = F.forwardRef(
|
|
2067
2052
|
({ className: e, variant: t = "default", asChild: n = !1, children: r, ...o }, i) => {
|
|
2068
|
-
const s = n ?
|
|
2069
|
-
return /* @__PURE__ */ f(
|
|
2053
|
+
const s = n ? pi : "div";
|
|
2054
|
+
return /* @__PURE__ */ f(uo.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Re(ys({ variant: t }), e), ...o, children: r }) });
|
|
2070
2055
|
}
|
|
2071
2056
|
);
|
|
2072
|
-
|
|
2073
|
-
const
|
|
2057
|
+
fo.displayName = "Surface";
|
|
2058
|
+
const bs = Ur(
|
|
2074
2059
|
"sc:inline-flex sc:items-center sc:justify-center sc:gap-2 sc:rounded-button sc:text-sm sc:transition-colors sc:focus-visible:outline-none sc:disabled:pointer-events-none sc:disabled:opacity-50 sc:font-button",
|
|
2075
2060
|
{
|
|
2076
2061
|
variants: {
|
|
@@ -2117,7 +2102,7 @@ const Cs = Ur(
|
|
|
2117
2102
|
}
|
|
2118
2103
|
), st = F.forwardRef(
|
|
2119
2104
|
({ className: e, variant: t, size: n, onPress: r, isPending: o, onClick: i, disabled: s, selected: a, children: l, ...c }, u) => {
|
|
2120
|
-
const { variant: d } =
|
|
2105
|
+
const { variant: d } = vs(), h = d === "default", p = d === "secondary", k = (g) => {
|
|
2121
2106
|
r && r(g), i && i(g);
|
|
2122
2107
|
}, y = {
|
|
2123
2108
|
secondary: t === "secondary" && (p ? "sc:bg-[var(--color-default-on-surface)] sc:hover:bg-[var(--color-default-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-default-on-surface)] sc:dark:hover:bg-[var(--color-default-on-surface)]/80" : !1),
|
|
@@ -2129,7 +2114,7 @@ const Cs = Ur(
|
|
|
2129
2114
|
"button",
|
|
2130
2115
|
{
|
|
2131
2116
|
className: Re(
|
|
2132
|
-
|
|
2117
|
+
bs({ variant: t, size: n }),
|
|
2133
2118
|
y.secondary,
|
|
2134
2119
|
y.field,
|
|
2135
2120
|
y.ghost,
|
|
@@ -2147,14 +2132,14 @@ const Cs = Ur(
|
|
|
2147
2132
|
}
|
|
2148
2133
|
);
|
|
2149
2134
|
st.displayName = "Button";
|
|
2150
|
-
const
|
|
2135
|
+
const ho = F.createContext(null);
|
|
2151
2136
|
function Wn() {
|
|
2152
|
-
const e = F.useContext(
|
|
2137
|
+
const e = F.useContext(ho);
|
|
2153
2138
|
if (!e)
|
|
2154
2139
|
throw new Error("Drawer components must be used within a Drawer");
|
|
2155
2140
|
return e;
|
|
2156
2141
|
}
|
|
2157
|
-
function
|
|
2142
|
+
function go({
|
|
2158
2143
|
open: e,
|
|
2159
2144
|
defaultOpen: t = !1,
|
|
2160
2145
|
onOpenChange: n,
|
|
@@ -2174,10 +2159,10 @@ function mo({
|
|
|
2174
2159
|
}, c);
|
|
2175
2160
|
return () => clearTimeout(d);
|
|
2176
2161
|
} else u.current && (u.current = !1, document.documentElement.hasAttribute("data-drawer-open") && (document.documentElement.removeAttribute("data-drawer-open"), window.dispatchEvent(new CustomEvent("drawer-close"))));
|
|
2177
|
-
}, [a]), /* @__PURE__ */ f(
|
|
2162
|
+
}, [a]), /* @__PURE__ */ f(ho.Provider, { value: { open: a, onOpenChange: l }, children: r });
|
|
2178
2163
|
}
|
|
2179
|
-
|
|
2180
|
-
const
|
|
2164
|
+
go.displayName = "Drawer";
|
|
2165
|
+
const ws = F.forwardRef(
|
|
2181
2166
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2182
2167
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2183
2168
|
t == null || t(a), i(!0);
|
|
@@ -2190,8 +2175,8 @@ const Ss = F.forwardRef(
|
|
|
2190
2175
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2191
2176
|
}
|
|
2192
2177
|
);
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2178
|
+
ws.displayName = "DrawerTrigger";
|
|
2179
|
+
const xs = F.forwardRef(
|
|
2195
2180
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2196
2181
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2197
2182
|
t == null || t(a), i(!1);
|
|
@@ -2204,8 +2189,8 @@ const Es = F.forwardRef(
|
|
|
2204
2189
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2205
2190
|
}
|
|
2206
2191
|
);
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2192
|
+
xs.displayName = "DrawerClose";
|
|
2193
|
+
const po = F.forwardRef(
|
|
2209
2194
|
({
|
|
2210
2195
|
className: e,
|
|
2211
2196
|
children: t,
|
|
@@ -2337,7 +2322,7 @@ const vo = F.forwardRef(
|
|
|
2337
2322
|
const Se = _ || w, ye = {
|
|
2338
2323
|
"--animation-duration": `${p}ms`
|
|
2339
2324
|
};
|
|
2340
|
-
return
|
|
2325
|
+
return Hn(
|
|
2341
2326
|
// The .sc-root wrapper is load-bearing: a body portal escapes the
|
|
2342
2327
|
// editor's .sc-root scope, so without it every scoped theme token
|
|
2343
2328
|
// (--sc-spacing-*, --sc-color-*, --sc-z-*) inside the drawer resolves
|
|
@@ -2397,7 +2382,7 @@ const vo = F.forwardRef(
|
|
|
2397
2382
|
top: n === "bottom" ? ke : 0,
|
|
2398
2383
|
transition: "top 10ms ease-out"
|
|
2399
2384
|
},
|
|
2400
|
-
children: /* @__PURE__ */ f(
|
|
2385
|
+
children: /* @__PURE__ */ f(fo, { asChild: !0, variant: "default", children: /* @__PURE__ */ j(
|
|
2401
2386
|
"div",
|
|
2402
2387
|
{
|
|
2403
2388
|
ref: Y,
|
|
@@ -2502,8 +2487,8 @@ const vo = F.forwardRef(
|
|
|
2502
2487
|
);
|
|
2503
2488
|
}
|
|
2504
2489
|
);
|
|
2505
|
-
|
|
2506
|
-
const
|
|
2490
|
+
po.displayName = "DrawerContent";
|
|
2491
|
+
const mo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
2507
2492
|
"h2",
|
|
2508
2493
|
{
|
|
2509
2494
|
ref: n,
|
|
@@ -2514,8 +2499,8 @@ const yo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2514
2499
|
...t
|
|
2515
2500
|
}
|
|
2516
2501
|
));
|
|
2517
|
-
|
|
2518
|
-
const
|
|
2502
|
+
mo.displayName = "DrawerTitle";
|
|
2503
|
+
const vo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
2519
2504
|
"p",
|
|
2520
2505
|
{
|
|
2521
2506
|
ref: n,
|
|
@@ -2523,8 +2508,8 @@ const bo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2523
2508
|
...t
|
|
2524
2509
|
}
|
|
2525
2510
|
));
|
|
2526
|
-
|
|
2527
|
-
const
|
|
2511
|
+
vo.displayName = "DrawerDescription";
|
|
2512
|
+
const ks = ot.Provider, Cs = ot.Root, Xt = ot.Trigger, At = F.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(ot.Portal, { children: /* @__PURE__ */ f(
|
|
2528
2513
|
ot.Content,
|
|
2529
2514
|
{
|
|
2530
2515
|
ref: r,
|
|
@@ -2539,14 +2524,14 @@ const As = ot.Provider, Ms = ot.Root, Xt = ot.Trigger, At = F.forwardRef(({ clas
|
|
|
2539
2524
|
}
|
|
2540
2525
|
) }));
|
|
2541
2526
|
At.displayName = ot.Content.displayName;
|
|
2542
|
-
const
|
|
2527
|
+
const Ss = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(ks, { children: /* @__PURE__ */ f(Cs, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), qn = Object.assign(Ss, {
|
|
2543
2528
|
Trigger: Xt,
|
|
2544
2529
|
Content: At
|
|
2545
|
-
}),
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2530
|
+
}), Es = Vr({ prefix: "sc" });
|
|
2531
|
+
function Tn(...e) {
|
|
2532
|
+
return Es(Br(e));
|
|
2548
2533
|
}
|
|
2549
|
-
const
|
|
2534
|
+
const As = {
|
|
2550
2535
|
"gravity-ui": 1.2,
|
|
2551
2536
|
// Thinner strokes need +20% (20px → 24px)
|
|
2552
2537
|
lucide: 1,
|
|
@@ -2564,11 +2549,11 @@ const Ts = {
|
|
|
2564
2549
|
// Filled variants are heavy
|
|
2565
2550
|
"simple-icons": 0.95,
|
|
2566
2551
|
"eos-icons": 1
|
|
2567
|
-
},
|
|
2552
|
+
}, Ms = 1, Ds = {
|
|
2568
2553
|
"gravity-ui:arrow-rotate-left": { x: 4, y: 4 },
|
|
2569
2554
|
"gravity-ui:arrow-rotate-right": { x: -4, y: 4 },
|
|
2570
2555
|
"gravity-ui:sparkles": { x: 2, y: -2 }
|
|
2571
|
-
},
|
|
2556
|
+
}, Ls = {
|
|
2572
2557
|
xs: 12,
|
|
2573
2558
|
sm: 16,
|
|
2574
2559
|
md: 20,
|
|
@@ -2576,35 +2561,35 @@ const Ts = {
|
|
|
2576
2561
|
xl: 32,
|
|
2577
2562
|
toolbar: { mobile: 24, desktop: 20 }
|
|
2578
2563
|
};
|
|
2579
|
-
function
|
|
2564
|
+
function Ts(e) {
|
|
2580
2565
|
const t = e.indexOf(":");
|
|
2581
2566
|
return t === -1 ? "" : e.substring(0, t);
|
|
2582
2567
|
}
|
|
2583
|
-
function
|
|
2584
|
-
return
|
|
2568
|
+
function Is(e) {
|
|
2569
|
+
return As[e] ?? Ms;
|
|
2585
2570
|
}
|
|
2586
|
-
function
|
|
2587
|
-
return
|
|
2571
|
+
function Rs(e) {
|
|
2572
|
+
return Ds[e] ?? null;
|
|
2588
2573
|
}
|
|
2589
|
-
function
|
|
2590
|
-
const n =
|
|
2574
|
+
function hn(e, t) {
|
|
2575
|
+
const n = Is(t);
|
|
2591
2576
|
return Math.round(e * n);
|
|
2592
2577
|
}
|
|
2593
|
-
const
|
|
2578
|
+
const yo = ({
|
|
2594
2579
|
icon: e,
|
|
2595
2580
|
size: t = "md",
|
|
2596
2581
|
className: n
|
|
2597
2582
|
}) => {
|
|
2598
|
-
const r =
|
|
2583
|
+
const r = Ts(e), o = Ls[t], i = Rs(e);
|
|
2599
2584
|
if (typeof o == "object") {
|
|
2600
|
-
const l =
|
|
2585
|
+
const l = hn(o.mobile, r), c = hn(o.desktop, r), u = i ? {
|
|
2601
2586
|
x: i.x * l / 20,
|
|
2602
2587
|
y: i.y * l / 20
|
|
2603
2588
|
} : null;
|
|
2604
2589
|
return /* @__PURE__ */ f(
|
|
2605
2590
|
"span",
|
|
2606
2591
|
{
|
|
2607
|
-
className:
|
|
2592
|
+
className: Tn("sc-normalized-icon-responsive sc:inline-flex", n),
|
|
2608
2593
|
style: {
|
|
2609
2594
|
"--icon-size-mobile": `${l}px`,
|
|
2610
2595
|
"--icon-size-desktop": `${c}px`,
|
|
@@ -2623,14 +2608,14 @@ const wo = ({
|
|
|
2623
2608
|
}
|
|
2624
2609
|
);
|
|
2625
2610
|
}
|
|
2626
|
-
const s =
|
|
2611
|
+
const s = hn(o, r), a = i ? {
|
|
2627
2612
|
x: i.x * s / 20,
|
|
2628
2613
|
y: i.y * s / 20
|
|
2629
2614
|
} : null;
|
|
2630
2615
|
return /* @__PURE__ */ f(
|
|
2631
2616
|
"span",
|
|
2632
2617
|
{
|
|
2633
|
-
className:
|
|
2618
|
+
className: Tn("sc:inline-flex", n),
|
|
2634
2619
|
style: { width: `${s}px`, height: `${s}px` },
|
|
2635
2620
|
children: /* @__PURE__ */ f(
|
|
2636
2621
|
$,
|
|
@@ -2644,8 +2629,8 @@ const wo = ({
|
|
|
2644
2629
|
}
|
|
2645
2630
|
);
|
|
2646
2631
|
};
|
|
2647
|
-
|
|
2648
|
-
const
|
|
2632
|
+
yo.displayName = "NormalizedIcon";
|
|
2633
|
+
const In = ne.forwardRef(
|
|
2649
2634
|
({
|
|
2650
2635
|
icon: e,
|
|
2651
2636
|
onClick: t,
|
|
@@ -2672,8 +2657,8 @@ const Rn = ne.forwardRef(
|
|
|
2672
2657
|
"data-active": n,
|
|
2673
2658
|
"data-testid": a,
|
|
2674
2659
|
onMouseLeave: u,
|
|
2675
|
-
className:
|
|
2676
|
-
children: typeof e == "string" ? /* @__PURE__ */ f(
|
|
2660
|
+
className: Tn(c),
|
|
2661
|
+
children: typeof e == "string" ? /* @__PURE__ */ f(yo, { icon: e, size: "toolbar" }) : e
|
|
2677
2662
|
}
|
|
2678
2663
|
);
|
|
2679
2664
|
return !r || i ? h : /* @__PURE__ */ j(qn, { delay: o, children: [
|
|
@@ -2682,7 +2667,7 @@ const Rn = ne.forwardRef(
|
|
|
2682
2667
|
] });
|
|
2683
2668
|
}
|
|
2684
2669
|
);
|
|
2685
|
-
|
|
2670
|
+
In.displayName = "ToolbarButton";
|
|
2686
2671
|
const G = {
|
|
2687
2672
|
// Navigation/Actions
|
|
2688
2673
|
plus: "lucide:plus",
|
|
@@ -2781,7 +2766,7 @@ const G = {
|
|
|
2781
2766
|
n && /* @__PURE__ */ f("span", { className: "sc:ml-auto sc:text-sm sc:text-text-muted", children: n }),
|
|
2782
2767
|
r && !n && /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "sc:ml-auto sc:shrink-0", children: /* @__PURE__ */ f("path", { d: "M13 4L6 11L3 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2783
2768
|
] });
|
|
2784
|
-
},
|
|
2769
|
+
}, gn = Qe("useArtboards"), Ns = () => {
|
|
2785
2770
|
const {
|
|
2786
2771
|
artboards: e,
|
|
2787
2772
|
artboardManager: t,
|
|
@@ -2829,7 +2814,7 @@ const G = {
|
|
|
2829
2814
|
}, [t, n]), d = N((g) => {
|
|
2830
2815
|
const m = e.find((S) => S.id === g);
|
|
2831
2816
|
if (!m) {
|
|
2832
|
-
|
|
2817
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2833
2818
|
return;
|
|
2834
2819
|
}
|
|
2835
2820
|
t.createArtboard({
|
|
@@ -2842,14 +2827,14 @@ const G = {
|
|
|
2842
2827
|
}, [e, t, n]), h = N((g, m) => {
|
|
2843
2828
|
const S = e.find((M) => M.id === g);
|
|
2844
2829
|
if (!S) {
|
|
2845
|
-
|
|
2830
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2846
2831
|
return;
|
|
2847
2832
|
}
|
|
2848
2833
|
S.name = m, n();
|
|
2849
2834
|
}, [e, n]), p = N((g, m) => {
|
|
2850
2835
|
const S = e.find((M) => M.id === g);
|
|
2851
2836
|
if (!S) {
|
|
2852
|
-
|
|
2837
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2853
2838
|
return;
|
|
2854
2839
|
}
|
|
2855
2840
|
m.name !== void 0 && (S.name = m.name), m.width !== void 0 && (S.width = m.width), m.height !== void 0 && (S.height = m.height), m.backgroundColor !== void 0 && (S.backgroundColor = m.backgroundColor), m.clipShape !== void 0 && (S.clipShape = m.clipShape), "distressTexture" in m && (S.distressTexture = m.distressTexture ? { ...m.distressTexture } : void 0), n();
|
|
@@ -2895,13 +2880,13 @@ function Kn(e) {
|
|
|
2895
2880
|
function Mt(e) {
|
|
2896
2881
|
return at(e) ? !1 : e instanceof Ce(e).HTMLElement;
|
|
2897
2882
|
}
|
|
2898
|
-
function
|
|
2883
|
+
function bo(e) {
|
|
2899
2884
|
return e instanceof Ce(e).SVGElement;
|
|
2900
2885
|
}
|
|
2901
2886
|
function lt(e) {
|
|
2902
|
-
return e ? at(e) ? e.document : Yn(e) ? Kn(e) ? e : Mt(e) ||
|
|
2887
|
+
return e ? at(e) ? e.document : Yn(e) ? Kn(e) ? e : Mt(e) || bo(e) ? e.ownerDocument : document : document : document;
|
|
2903
2888
|
}
|
|
2904
|
-
const _e = Jt ?
|
|
2889
|
+
const _e = Jt ? $n : q;
|
|
2905
2890
|
function Qt(e) {
|
|
2906
2891
|
const t = V(e);
|
|
2907
2892
|
return _e(() => {
|
|
@@ -2912,7 +2897,7 @@ function Qt(e) {
|
|
|
2912
2897
|
return t.current == null ? void 0 : t.current(...r);
|
|
2913
2898
|
}, []);
|
|
2914
2899
|
}
|
|
2915
|
-
function
|
|
2900
|
+
function zs() {
|
|
2916
2901
|
const e = V(null), t = N((r, o) => {
|
|
2917
2902
|
e.current = setInterval(r, o);
|
|
2918
2903
|
}, []), n = N(() => {
|
|
@@ -2954,16 +2939,16 @@ function Ut(e) {
|
|
|
2954
2939
|
t.current = e;
|
|
2955
2940
|
}, [e]), t.current;
|
|
2956
2941
|
}
|
|
2957
|
-
let
|
|
2942
|
+
let pn = {};
|
|
2958
2943
|
function Zt(e, t) {
|
|
2959
2944
|
return X(() => {
|
|
2960
2945
|
if (t)
|
|
2961
2946
|
return t;
|
|
2962
|
-
const n =
|
|
2963
|
-
return
|
|
2947
|
+
const n = pn[e] == null ? 0 : pn[e] + 1;
|
|
2948
|
+
return pn[e] = n, e + "-" + n;
|
|
2964
2949
|
}, [e, t]);
|
|
2965
2950
|
}
|
|
2966
|
-
function
|
|
2951
|
+
function wo(e) {
|
|
2967
2952
|
return function(t) {
|
|
2968
2953
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
2969
2954
|
r[o - 1] = arguments[o];
|
|
@@ -2979,8 +2964,8 @@ function ko(e) {
|
|
|
2979
2964
|
});
|
|
2980
2965
|
};
|
|
2981
2966
|
}
|
|
2982
|
-
const nt = /* @__PURE__ */
|
|
2983
|
-
function
|
|
2967
|
+
const nt = /* @__PURE__ */ wo(1), Ct = /* @__PURE__ */ wo(-1);
|
|
2968
|
+
function Os(e) {
|
|
2984
2969
|
return "clientX" in e && "clientY" in e;
|
|
2985
2970
|
}
|
|
2986
2971
|
function Xn(e) {
|
|
@@ -2991,7 +2976,7 @@ function Xn(e) {
|
|
|
2991
2976
|
} = Ce(e.target);
|
|
2992
2977
|
return t && e instanceof t;
|
|
2993
2978
|
}
|
|
2994
|
-
function
|
|
2979
|
+
function Fs(e) {
|
|
2995
2980
|
if (!e)
|
|
2996
2981
|
return !1;
|
|
2997
2982
|
const {
|
|
@@ -3000,7 +2985,7 @@ function Hs(e) {
|
|
|
3000
2985
|
return t && e instanceof t;
|
|
3001
2986
|
}
|
|
3002
2987
|
function Gt(e) {
|
|
3003
|
-
if (
|
|
2988
|
+
if (Fs(e)) {
|
|
3004
2989
|
if (e.touches && e.touches.length) {
|
|
3005
2990
|
const {
|
|
3006
2991
|
clientX: t,
|
|
@@ -3021,7 +3006,7 @@ function Gt(e) {
|
|
|
3021
3006
|
};
|
|
3022
3007
|
}
|
|
3023
3008
|
}
|
|
3024
|
-
return
|
|
3009
|
+
return Os(e) ? {
|
|
3025
3010
|
x: e.clientX,
|
|
3026
3011
|
y: e.clientY
|
|
3027
3012
|
} : null;
|
|
@@ -3066,23 +3051,23 @@ const St = /* @__PURE__ */ Object.freeze({
|
|
|
3066
3051
|
}
|
|
3067
3052
|
}
|
|
3068
3053
|
}), yr = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
3069
|
-
function
|
|
3054
|
+
function js(e) {
|
|
3070
3055
|
return e.matches(yr) ? e : e.querySelector(yr);
|
|
3071
3056
|
}
|
|
3072
|
-
const
|
|
3057
|
+
const Ps = {
|
|
3073
3058
|
display: "none"
|
|
3074
3059
|
};
|
|
3075
|
-
function
|
|
3060
|
+
function $s(e) {
|
|
3076
3061
|
let {
|
|
3077
3062
|
id: t,
|
|
3078
3063
|
value: n
|
|
3079
3064
|
} = e;
|
|
3080
3065
|
return ne.createElement("div", {
|
|
3081
3066
|
id: t,
|
|
3082
|
-
style:
|
|
3067
|
+
style: Ps
|
|
3083
3068
|
}, n);
|
|
3084
3069
|
}
|
|
3085
|
-
function
|
|
3070
|
+
function Hs(e) {
|
|
3086
3071
|
let {
|
|
3087
3072
|
id: t,
|
|
3088
3073
|
announcement: n,
|
|
@@ -3110,7 +3095,7 @@ function Gs(e) {
|
|
|
3110
3095
|
"aria-atomic": !0
|
|
3111
3096
|
}, n);
|
|
3112
3097
|
}
|
|
3113
|
-
function
|
|
3098
|
+
function Bs() {
|
|
3114
3099
|
const [e, t] = B("");
|
|
3115
3100
|
return {
|
|
3116
3101
|
announce: N((r) => {
|
|
@@ -3119,16 +3104,16 @@ function _s() {
|
|
|
3119
3104
|
announcement: e
|
|
3120
3105
|
};
|
|
3121
3106
|
}
|
|
3122
|
-
const
|
|
3123
|
-
function
|
|
3124
|
-
const t = Be(
|
|
3107
|
+
const xo = /* @__PURE__ */ Je(null);
|
|
3108
|
+
function Vs(e) {
|
|
3109
|
+
const t = Be(xo);
|
|
3125
3110
|
q(() => {
|
|
3126
3111
|
if (!t)
|
|
3127
3112
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
3128
3113
|
return t(e);
|
|
3129
3114
|
}, [e, t]);
|
|
3130
3115
|
}
|
|
3131
|
-
function
|
|
3116
|
+
function Us() {
|
|
3132
3117
|
const [e] = B(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
3133
3118
|
return [N((r) => {
|
|
3134
3119
|
let {
|
|
@@ -3141,13 +3126,13 @@ function qs() {
|
|
|
3141
3126
|
});
|
|
3142
3127
|
}, [e]), t];
|
|
3143
3128
|
}
|
|
3144
|
-
const
|
|
3129
|
+
const Gs = {
|
|
3145
3130
|
draggable: `
|
|
3146
3131
|
To pick up a draggable item, press the space bar.
|
|
3147
3132
|
While dragging, use the arrow keys to move the item.
|
|
3148
3133
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
3149
3134
|
`
|
|
3150
|
-
},
|
|
3135
|
+
}, _s = {
|
|
3151
3136
|
onDragStart(e) {
|
|
3152
3137
|
let {
|
|
3153
3138
|
active: t
|
|
@@ -3175,20 +3160,20 @@ const Ys = {
|
|
|
3175
3160
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
3176
3161
|
}
|
|
3177
3162
|
};
|
|
3178
|
-
function
|
|
3163
|
+
function Ws(e) {
|
|
3179
3164
|
let {
|
|
3180
|
-
announcements: t =
|
|
3165
|
+
announcements: t = _s,
|
|
3181
3166
|
container: n,
|
|
3182
3167
|
hiddenTextDescribedById: r,
|
|
3183
|
-
screenReaderInstructions: o =
|
|
3168
|
+
screenReaderInstructions: o = Gs
|
|
3184
3169
|
} = e;
|
|
3185
3170
|
const {
|
|
3186
3171
|
announce: i,
|
|
3187
3172
|
announcement: s
|
|
3188
|
-
} =
|
|
3173
|
+
} = Bs(), a = Zt("DndLiveRegion"), [l, c] = B(!1);
|
|
3189
3174
|
if (q(() => {
|
|
3190
3175
|
c(!0);
|
|
3191
|
-
}, []),
|
|
3176
|
+
}, []), Vs(X(() => ({
|
|
3192
3177
|
onDragStart(d) {
|
|
3193
3178
|
let {
|
|
3194
3179
|
active: h
|
|
@@ -3239,14 +3224,14 @@ function Xs(e) {
|
|
|
3239
3224
|
}
|
|
3240
3225
|
}), [i, t])), !l)
|
|
3241
3226
|
return null;
|
|
3242
|
-
const u = ne.createElement(ne.Fragment, null, ne.createElement(
|
|
3227
|
+
const u = ne.createElement(ne.Fragment, null, ne.createElement($s, {
|
|
3243
3228
|
id: r,
|
|
3244
3229
|
value: o.draggable
|
|
3245
|
-
}), ne.createElement(
|
|
3230
|
+
}), ne.createElement(Hs, {
|
|
3246
3231
|
id: a,
|
|
3247
3232
|
announcement: s
|
|
3248
3233
|
}));
|
|
3249
|
-
return n ?
|
|
3234
|
+
return n ? Hn(u, n) : u;
|
|
3250
3235
|
}
|
|
3251
3236
|
var ce;
|
|
3252
3237
|
(function(e) {
|
|
@@ -3264,7 +3249,7 @@ function br(e, t) {
|
|
|
3264
3249
|
[e, t]
|
|
3265
3250
|
);
|
|
3266
3251
|
}
|
|
3267
|
-
function
|
|
3252
|
+
function qs() {
|
|
3268
3253
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
3269
3254
|
t[n] = arguments[n];
|
|
3270
3255
|
return X(
|
|
@@ -3280,7 +3265,7 @@ const Fe = /* @__PURE__ */ Object.freeze({
|
|
|
3280
3265
|
function Jn(e, t) {
|
|
3281
3266
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
3282
3267
|
}
|
|
3283
|
-
function
|
|
3268
|
+
function Ys(e, t) {
|
|
3284
3269
|
const n = Gt(e);
|
|
3285
3270
|
if (!n)
|
|
3286
3271
|
return "0 0";
|
|
@@ -3302,7 +3287,7 @@ function Qn(e, t) {
|
|
|
3302
3287
|
} = t;
|
|
3303
3288
|
return n - r;
|
|
3304
3289
|
}
|
|
3305
|
-
function
|
|
3290
|
+
function Ks(e, t) {
|
|
3306
3291
|
let {
|
|
3307
3292
|
data: {
|
|
3308
3293
|
value: n
|
|
@@ -3314,7 +3299,7 @@ function Zs(e, t) {
|
|
|
3314
3299
|
} = t;
|
|
3315
3300
|
return r - n;
|
|
3316
3301
|
}
|
|
3317
|
-
function
|
|
3302
|
+
function Rn(e) {
|
|
3318
3303
|
let {
|
|
3319
3304
|
left: t,
|
|
3320
3305
|
top: n,
|
|
@@ -3335,7 +3320,7 @@ function Nn(e) {
|
|
|
3335
3320
|
y: n + r
|
|
3336
3321
|
}];
|
|
3337
3322
|
}
|
|
3338
|
-
function
|
|
3323
|
+
function ko(e, t) {
|
|
3339
3324
|
if (!e || e.length === 0)
|
|
3340
3325
|
return null;
|
|
3341
3326
|
const [n] = e;
|
|
@@ -3347,7 +3332,7 @@ function wr(e, t, n) {
|
|
|
3347
3332
|
y: n + e.height * 0.5
|
|
3348
3333
|
};
|
|
3349
3334
|
}
|
|
3350
|
-
const
|
|
3335
|
+
const Xs = (e) => {
|
|
3351
3336
|
let {
|
|
3352
3337
|
collisionRect: t,
|
|
3353
3338
|
droppableRects: n,
|
|
@@ -3370,19 +3355,19 @@ const ea = (e) => {
|
|
|
3370
3355
|
}
|
|
3371
3356
|
}
|
|
3372
3357
|
return i.sort(Qn);
|
|
3373
|
-
},
|
|
3358
|
+
}, Js = (e) => {
|
|
3374
3359
|
let {
|
|
3375
3360
|
collisionRect: t,
|
|
3376
3361
|
droppableRects: n,
|
|
3377
3362
|
droppableContainers: r
|
|
3378
3363
|
} = e;
|
|
3379
|
-
const o =
|
|
3364
|
+
const o = Rn(t), i = [];
|
|
3380
3365
|
for (const s of r) {
|
|
3381
3366
|
const {
|
|
3382
3367
|
id: a
|
|
3383
3368
|
} = s, l = n.get(a);
|
|
3384
3369
|
if (l) {
|
|
3385
|
-
const c =
|
|
3370
|
+
const c = Rn(l), u = o.reduce((h, p, k) => h + Jn(c[k], p), 0), d = Number((u / 4).toFixed(4));
|
|
3386
3371
|
i.push({
|
|
3387
3372
|
id: a,
|
|
3388
3373
|
data: {
|
|
@@ -3394,7 +3379,7 @@ const ea = (e) => {
|
|
|
3394
3379
|
}
|
|
3395
3380
|
return i.sort(Qn);
|
|
3396
3381
|
};
|
|
3397
|
-
function
|
|
3382
|
+
function Qs(e, t) {
|
|
3398
3383
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
|
|
3399
3384
|
if (r < o && n < i) {
|
|
3400
3385
|
const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
|
|
@@ -3402,7 +3387,7 @@ function na(e, t) {
|
|
|
3402
3387
|
}
|
|
3403
3388
|
return 0;
|
|
3404
3389
|
}
|
|
3405
|
-
const
|
|
3390
|
+
const Zs = (e) => {
|
|
3406
3391
|
let {
|
|
3407
3392
|
collisionRect: t,
|
|
3408
3393
|
droppableRects: n,
|
|
@@ -3414,7 +3399,7 @@ const ra = (e) => {
|
|
|
3414
3399
|
id: s
|
|
3415
3400
|
} = i, a = n.get(s);
|
|
3416
3401
|
if (a) {
|
|
3417
|
-
const l =
|
|
3402
|
+
const l = Qs(a, t);
|
|
3418
3403
|
l > 0 && o.push({
|
|
3419
3404
|
id: s,
|
|
3420
3405
|
data: {
|
|
@@ -3424,9 +3409,9 @@ const ra = (e) => {
|
|
|
3424
3409
|
});
|
|
3425
3410
|
}
|
|
3426
3411
|
}
|
|
3427
|
-
return o.sort(
|
|
3412
|
+
return o.sort(Ks);
|
|
3428
3413
|
};
|
|
3429
|
-
function
|
|
3414
|
+
function ea(e, t) {
|
|
3430
3415
|
const {
|
|
3431
3416
|
top: n,
|
|
3432
3417
|
left: r,
|
|
@@ -3435,7 +3420,7 @@ function oa(e, t) {
|
|
|
3435
3420
|
} = t;
|
|
3436
3421
|
return n <= e.y && e.y <= o && r <= e.x && e.x <= i;
|
|
3437
3422
|
}
|
|
3438
|
-
const
|
|
3423
|
+
const ta = (e) => {
|
|
3439
3424
|
let {
|
|
3440
3425
|
droppableContainers: t,
|
|
3441
3426
|
droppableRects: n,
|
|
@@ -3448,8 +3433,8 @@ const ia = (e) => {
|
|
|
3448
3433
|
const {
|
|
3449
3434
|
id: s
|
|
3450
3435
|
} = i, a = n.get(s);
|
|
3451
|
-
if (a &&
|
|
3452
|
-
const c =
|
|
3436
|
+
if (a && ea(r, a)) {
|
|
3437
|
+
const c = Rn(a).reduce((d, h) => d + Jn(r, h), 0), u = Number((c / 4).toFixed(4));
|
|
3453
3438
|
o.push({
|
|
3454
3439
|
id: s,
|
|
3455
3440
|
data: {
|
|
@@ -3461,20 +3446,20 @@ const ia = (e) => {
|
|
|
3461
3446
|
}
|
|
3462
3447
|
return o.sort(Qn);
|
|
3463
3448
|
};
|
|
3464
|
-
function
|
|
3449
|
+
function na(e, t, n) {
|
|
3465
3450
|
return {
|
|
3466
3451
|
...e,
|
|
3467
3452
|
scaleX: t && n ? t.width / n.width : 1,
|
|
3468
3453
|
scaleY: t && n ? t.height / n.height : 1
|
|
3469
3454
|
};
|
|
3470
3455
|
}
|
|
3471
|
-
function
|
|
3456
|
+
function Co(e, t) {
|
|
3472
3457
|
return e && t ? {
|
|
3473
3458
|
x: e.left - t.left,
|
|
3474
3459
|
y: e.top - t.top
|
|
3475
3460
|
} : Fe;
|
|
3476
3461
|
}
|
|
3477
|
-
function
|
|
3462
|
+
function ra(e) {
|
|
3478
3463
|
return function(n) {
|
|
3479
3464
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
3480
3465
|
o[i - 1] = arguments[i];
|
|
@@ -3489,8 +3474,8 @@ function aa(e) {
|
|
|
3489
3474
|
});
|
|
3490
3475
|
};
|
|
3491
3476
|
}
|
|
3492
|
-
const
|
|
3493
|
-
function
|
|
3477
|
+
const oa = /* @__PURE__ */ ra(1);
|
|
3478
|
+
function So(e) {
|
|
3494
3479
|
if (e.startsWith("matrix3d(")) {
|
|
3495
3480
|
const t = e.slice(9, -1).split(/, /);
|
|
3496
3481
|
return {
|
|
@@ -3510,8 +3495,8 @@ function Ao(e) {
|
|
|
3510
3495
|
}
|
|
3511
3496
|
return null;
|
|
3512
3497
|
}
|
|
3513
|
-
function
|
|
3514
|
-
const r =
|
|
3498
|
+
function ia(e, t, n) {
|
|
3499
|
+
const r = So(t);
|
|
3515
3500
|
if (!r)
|
|
3516
3501
|
return e;
|
|
3517
3502
|
const {
|
|
@@ -3529,18 +3514,18 @@ function ca(e, t, n) {
|
|
|
3529
3514
|
left: l
|
|
3530
3515
|
};
|
|
3531
3516
|
}
|
|
3532
|
-
const
|
|
3517
|
+
const sa = {
|
|
3533
3518
|
ignoreTransform: !1
|
|
3534
3519
|
};
|
|
3535
3520
|
function Lt(e, t) {
|
|
3536
|
-
t === void 0 && (t =
|
|
3521
|
+
t === void 0 && (t = sa);
|
|
3537
3522
|
let n = e.getBoundingClientRect();
|
|
3538
3523
|
if (t.ignoreTransform) {
|
|
3539
3524
|
const {
|
|
3540
3525
|
transform: c,
|
|
3541
3526
|
transformOrigin: u
|
|
3542
3527
|
} = Ce(e).getComputedStyle(e);
|
|
3543
|
-
c && (n =
|
|
3528
|
+
c && (n = ia(n, c, u));
|
|
3544
3529
|
}
|
|
3545
3530
|
const {
|
|
3546
3531
|
top: r,
|
|
@@ -3564,7 +3549,7 @@ function xr(e) {
|
|
|
3564
3549
|
ignoreTransform: !0
|
|
3565
3550
|
});
|
|
3566
3551
|
}
|
|
3567
|
-
function
|
|
3552
|
+
function aa(e) {
|
|
3568
3553
|
const t = e.innerWidth, n = e.innerHeight;
|
|
3569
3554
|
return {
|
|
3570
3555
|
top: 0,
|
|
@@ -3575,10 +3560,10 @@ function ua(e) {
|
|
|
3575
3560
|
height: n
|
|
3576
3561
|
};
|
|
3577
3562
|
}
|
|
3578
|
-
function
|
|
3563
|
+
function la(e, t) {
|
|
3579
3564
|
return t === void 0 && (t = Ce(e).getComputedStyle(e)), t.position === "fixed";
|
|
3580
3565
|
}
|
|
3581
|
-
function
|
|
3566
|
+
function ca(e, t) {
|
|
3582
3567
|
t === void 0 && (t = Ce(e).getComputedStyle(e));
|
|
3583
3568
|
const n = /(auto|scroll|overlay)/;
|
|
3584
3569
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
@@ -3593,44 +3578,44 @@ function en(e, t) {
|
|
|
3593
3578
|
return n;
|
|
3594
3579
|
if (Kn(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
3595
3580
|
return n.push(o.scrollingElement), n;
|
|
3596
|
-
if (!Mt(o) ||
|
|
3581
|
+
if (!Mt(o) || bo(o) || n.includes(o))
|
|
3597
3582
|
return n;
|
|
3598
3583
|
const i = Ce(e).getComputedStyle(o);
|
|
3599
|
-
return o !== e &&
|
|
3584
|
+
return o !== e && ca(o, i) && n.push(o), la(o, i) ? n : r(o.parentNode);
|
|
3600
3585
|
}
|
|
3601
3586
|
return e ? r(e) : n;
|
|
3602
3587
|
}
|
|
3603
|
-
function
|
|
3588
|
+
function Eo(e) {
|
|
3604
3589
|
const [t] = en(e, 1);
|
|
3605
3590
|
return t ?? null;
|
|
3606
3591
|
}
|
|
3607
|
-
function
|
|
3592
|
+
function mn(e) {
|
|
3608
3593
|
return !Jt || !e ? null : at(e) ? e : Yn(e) ? Kn(e) || e === lt(e).scrollingElement ? window : Mt(e) ? e : null : null;
|
|
3609
3594
|
}
|
|
3610
|
-
function
|
|
3595
|
+
function Ao(e) {
|
|
3611
3596
|
return at(e) ? e.scrollX : e.scrollLeft;
|
|
3612
3597
|
}
|
|
3613
|
-
function
|
|
3598
|
+
function Mo(e) {
|
|
3614
3599
|
return at(e) ? e.scrollY : e.scrollTop;
|
|
3615
3600
|
}
|
|
3616
|
-
function
|
|
3601
|
+
function Nn(e) {
|
|
3617
3602
|
return {
|
|
3618
|
-
x:
|
|
3619
|
-
y:
|
|
3603
|
+
x: Ao(e),
|
|
3604
|
+
y: Mo(e)
|
|
3620
3605
|
};
|
|
3621
3606
|
}
|
|
3622
3607
|
var ge;
|
|
3623
3608
|
(function(e) {
|
|
3624
3609
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
3625
3610
|
})(ge || (ge = {}));
|
|
3626
|
-
function
|
|
3611
|
+
function Do(e) {
|
|
3627
3612
|
return !Jt || !e ? !1 : e === document.scrollingElement;
|
|
3628
3613
|
}
|
|
3629
|
-
function
|
|
3614
|
+
function Lo(e) {
|
|
3630
3615
|
const t = {
|
|
3631
3616
|
x: 0,
|
|
3632
3617
|
y: 0
|
|
3633
|
-
}, n =
|
|
3618
|
+
}, n = Do(e) ? {
|
|
3634
3619
|
height: window.innerHeight,
|
|
3635
3620
|
width: window.innerWidth
|
|
3636
3621
|
} : {
|
|
@@ -3649,24 +3634,24 @@ function Io(e) {
|
|
|
3649
3634
|
minScroll: t
|
|
3650
3635
|
};
|
|
3651
3636
|
}
|
|
3652
|
-
const
|
|
3637
|
+
const da = {
|
|
3653
3638
|
x: 0.2,
|
|
3654
3639
|
y: 0.2
|
|
3655
3640
|
};
|
|
3656
|
-
function
|
|
3641
|
+
function ua(e, t, n, r, o) {
|
|
3657
3642
|
let {
|
|
3658
3643
|
top: i,
|
|
3659
3644
|
left: s,
|
|
3660
3645
|
right: a,
|
|
3661
3646
|
bottom: l
|
|
3662
3647
|
} = n;
|
|
3663
|
-
r === void 0 && (r = 10), o === void 0 && (o =
|
|
3648
|
+
r === void 0 && (r = 10), o === void 0 && (o = da);
|
|
3664
3649
|
const {
|
|
3665
3650
|
isTop: c,
|
|
3666
3651
|
isBottom: u,
|
|
3667
3652
|
isLeft: d,
|
|
3668
3653
|
isRight: h
|
|
3669
|
-
} =
|
|
3654
|
+
} = Lo(e), p = {
|
|
3670
3655
|
x: 0,
|
|
3671
3656
|
y: 0
|
|
3672
3657
|
}, k = {
|
|
@@ -3681,7 +3666,7 @@ function pa(e, t, n, r, o) {
|
|
|
3681
3666
|
speed: k
|
|
3682
3667
|
};
|
|
3683
3668
|
}
|
|
3684
|
-
function
|
|
3669
|
+
function fa(e) {
|
|
3685
3670
|
if (e === document.scrollingElement) {
|
|
3686
3671
|
const {
|
|
3687
3672
|
innerWidth: i,
|
|
@@ -3711,16 +3696,16 @@ function ma(e) {
|
|
|
3711
3696
|
height: e.clientHeight
|
|
3712
3697
|
};
|
|
3713
3698
|
}
|
|
3714
|
-
function
|
|
3715
|
-
return e.reduce((t, n) => nt(t,
|
|
3699
|
+
function To(e) {
|
|
3700
|
+
return e.reduce((t, n) => nt(t, Nn(n)), Fe);
|
|
3716
3701
|
}
|
|
3717
|
-
function
|
|
3718
|
-
return e.reduce((t, n) => t +
|
|
3702
|
+
function ha(e) {
|
|
3703
|
+
return e.reduce((t, n) => t + Ao(n), 0);
|
|
3719
3704
|
}
|
|
3720
|
-
function
|
|
3721
|
-
return e.reduce((t, n) => t +
|
|
3705
|
+
function ga(e) {
|
|
3706
|
+
return e.reduce((t, n) => t + Mo(n), 0);
|
|
3722
3707
|
}
|
|
3723
|
-
function
|
|
3708
|
+
function Io(e, t) {
|
|
3724
3709
|
if (t === void 0 && (t = Lt), !e)
|
|
3725
3710
|
return;
|
|
3726
3711
|
const {
|
|
@@ -3729,20 +3714,20 @@ function No(e, t) {
|
|
|
3729
3714
|
bottom: o,
|
|
3730
3715
|
right: i
|
|
3731
3716
|
} = t(e);
|
|
3732
|
-
|
|
3717
|
+
Eo(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
3733
3718
|
block: "center",
|
|
3734
3719
|
inline: "center"
|
|
3735
3720
|
});
|
|
3736
3721
|
}
|
|
3737
|
-
const
|
|
3722
|
+
const pa = [["x", ["left", "right"], ha], ["y", ["top", "bottom"], ga]];
|
|
3738
3723
|
class Zn {
|
|
3739
3724
|
constructor(t, n) {
|
|
3740
3725
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
3741
|
-
const r = en(n), o =
|
|
3726
|
+
const r = en(n), o = To(r);
|
|
3742
3727
|
this.rect = {
|
|
3743
3728
|
...t
|
|
3744
3729
|
}, this.width = t.width, this.height = t.height;
|
|
3745
|
-
for (const [i, s, a] of
|
|
3730
|
+
for (const [i, s, a] of pa)
|
|
3746
3731
|
for (const l of s)
|
|
3747
3732
|
Object.defineProperty(this, l, {
|
|
3748
3733
|
get: () => {
|
|
@@ -3770,13 +3755,13 @@ class yt {
|
|
|
3770
3755
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
3771
3756
|
}
|
|
3772
3757
|
}
|
|
3773
|
-
function
|
|
3758
|
+
function ma(e) {
|
|
3774
3759
|
const {
|
|
3775
3760
|
EventTarget: t
|
|
3776
3761
|
} = Ce(e);
|
|
3777
3762
|
return e instanceof t ? e : lt(e);
|
|
3778
3763
|
}
|
|
3779
|
-
function
|
|
3764
|
+
function vn(e, t) {
|
|
3780
3765
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
3781
3766
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
3782
3767
|
}
|
|
@@ -3787,18 +3772,18 @@ var Ne;
|
|
|
3787
3772
|
function kr(e) {
|
|
3788
3773
|
e.preventDefault();
|
|
3789
3774
|
}
|
|
3790
|
-
function
|
|
3775
|
+
function va(e) {
|
|
3791
3776
|
e.stopPropagation();
|
|
3792
3777
|
}
|
|
3793
3778
|
var U;
|
|
3794
3779
|
(function(e) {
|
|
3795
3780
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
3796
3781
|
})(U || (U = {}));
|
|
3797
|
-
const
|
|
3782
|
+
const Ro = {
|
|
3798
3783
|
start: [U.Space, U.Enter],
|
|
3799
3784
|
cancel: [U.Esc],
|
|
3800
3785
|
end: [U.Space, U.Enter, U.Tab]
|
|
3801
|
-
},
|
|
3786
|
+
}, ya = (e, t) => {
|
|
3802
3787
|
let {
|
|
3803
3788
|
currentCoordinates: n
|
|
3804
3789
|
} = t;
|
|
@@ -3843,7 +3828,7 @@ class er {
|
|
|
3843
3828
|
activeNode: t,
|
|
3844
3829
|
onStart: n
|
|
3845
3830
|
} = this.props, r = t.node.current;
|
|
3846
|
-
r &&
|
|
3831
|
+
r && Io(r), n(Fe);
|
|
3847
3832
|
}
|
|
3848
3833
|
handleKeyDown(t) {
|
|
3849
3834
|
if (Xn(t)) {
|
|
@@ -3852,8 +3837,8 @@ class er {
|
|
|
3852
3837
|
context: r,
|
|
3853
3838
|
options: o
|
|
3854
3839
|
} = this.props, {
|
|
3855
|
-
keyboardCodes: i =
|
|
3856
|
-
coordinateGetter: s =
|
|
3840
|
+
keyboardCodes: i = Ro,
|
|
3841
|
+
coordinateGetter: s = ya,
|
|
3857
3842
|
scrollBehavior: a = "smooth"
|
|
3858
3843
|
} = o, {
|
|
3859
3844
|
code: l
|
|
@@ -3893,7 +3878,7 @@ class er {
|
|
|
3893
3878
|
isBottom: L,
|
|
3894
3879
|
maxScroll: I,
|
|
3895
3880
|
minScroll: b
|
|
3896
|
-
} =
|
|
3881
|
+
} = Lo(y), E = fa(y), v = {
|
|
3897
3882
|
x: Math.min(g === U.Right ? E.right - E.width / 2 : E.right, Math.max(g === U.Right ? E.left : E.left + E.width / 2, d.x)),
|
|
3898
3883
|
y: Math.min(g === U.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(g === U.Down ? E.top : E.top + E.height / 2, d.y))
|
|
3899
3884
|
}, D = g === U.Right && !S || g === U.Left && !M, w = g === U.Down && !L || g === U.Up && !m;
|
|
@@ -3957,7 +3942,7 @@ er.activators = [{
|
|
|
3957
3942
|
eventName: "onKeyDown",
|
|
3958
3943
|
handler: (e, t, n) => {
|
|
3959
3944
|
let {
|
|
3960
|
-
keyboardCodes: r =
|
|
3945
|
+
keyboardCodes: r = Ro,
|
|
3961
3946
|
onActivation: o
|
|
3962
3947
|
} = t, {
|
|
3963
3948
|
active: i
|
|
@@ -3983,7 +3968,7 @@ function Sr(e) {
|
|
|
3983
3968
|
class tr {
|
|
3984
3969
|
constructor(t, n, r) {
|
|
3985
3970
|
var o;
|
|
3986
|
-
r === void 0 && (r =
|
|
3971
|
+
r === void 0 && (r = ma(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
3987
3972
|
const {
|
|
3988
3973
|
event: i
|
|
3989
3974
|
} = t, {
|
|
@@ -4037,7 +4022,7 @@ class tr {
|
|
|
4037
4022
|
} = this, {
|
|
4038
4023
|
onStart: n
|
|
4039
4024
|
} = this.props;
|
|
4040
|
-
t && (this.activated = !0, this.documentListeners.add(Ne.Click,
|
|
4025
|
+
t && (this.activated = !0, this.documentListeners.add(Ne.Click, va, {
|
|
4041
4026
|
capture: !0
|
|
4042
4027
|
}), this.removeTextSelection(), this.documentListeners.add(Ne.SelectionChange, this.removeTextSelection), n(t));
|
|
4043
4028
|
}
|
|
@@ -4058,12 +4043,12 @@ class tr {
|
|
|
4058
4043
|
const l = (n = Gt(t)) != null ? n : Fe, c = Ct(o, l);
|
|
4059
4044
|
if (!r && a) {
|
|
4060
4045
|
if (Cr(a)) {
|
|
4061
|
-
if (a.tolerance != null &&
|
|
4046
|
+
if (a.tolerance != null && vn(c, a.tolerance))
|
|
4062
4047
|
return this.handleCancel();
|
|
4063
|
-
if (
|
|
4048
|
+
if (vn(c, a.distance))
|
|
4064
4049
|
return this.handleStart();
|
|
4065
4050
|
}
|
|
4066
|
-
if (Sr(a) &&
|
|
4051
|
+
if (Sr(a) && vn(c, a.tolerance))
|
|
4067
4052
|
return this.handleCancel();
|
|
4068
4053
|
this.handlePending(a, c);
|
|
4069
4054
|
return;
|
|
@@ -4092,7 +4077,7 @@ class tr {
|
|
|
4092
4077
|
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
4093
4078
|
}
|
|
4094
4079
|
}
|
|
4095
|
-
const
|
|
4080
|
+
const ba = {
|
|
4096
4081
|
cancel: {
|
|
4097
4082
|
name: "pointercancel"
|
|
4098
4083
|
},
|
|
@@ -4108,7 +4093,7 @@ class nr extends tr {
|
|
|
4108
4093
|
const {
|
|
4109
4094
|
event: n
|
|
4110
4095
|
} = t, r = lt(n.target);
|
|
4111
|
-
super(t,
|
|
4096
|
+
super(t, ba, r);
|
|
4112
4097
|
}
|
|
4113
4098
|
}
|
|
4114
4099
|
nr.activators = [{
|
|
@@ -4124,7 +4109,7 @@ nr.activators = [{
|
|
|
4124
4109
|
}), !0);
|
|
4125
4110
|
}
|
|
4126
4111
|
}];
|
|
4127
|
-
const
|
|
4112
|
+
const wa = {
|
|
4128
4113
|
move: {
|
|
4129
4114
|
name: "mousemove"
|
|
4130
4115
|
},
|
|
@@ -4132,16 +4117,16 @@ const Sa = {
|
|
|
4132
4117
|
name: "mouseup"
|
|
4133
4118
|
}
|
|
4134
4119
|
};
|
|
4135
|
-
var
|
|
4120
|
+
var zn;
|
|
4136
4121
|
(function(e) {
|
|
4137
4122
|
e[e.RightClick = 2] = "RightClick";
|
|
4138
|
-
})(
|
|
4139
|
-
class
|
|
4123
|
+
})(zn || (zn = {}));
|
|
4124
|
+
class xa extends tr {
|
|
4140
4125
|
constructor(t) {
|
|
4141
|
-
super(t,
|
|
4126
|
+
super(t, wa, lt(t.event.target));
|
|
4142
4127
|
}
|
|
4143
4128
|
}
|
|
4144
|
-
|
|
4129
|
+
xa.activators = [{
|
|
4145
4130
|
eventName: "onMouseDown",
|
|
4146
4131
|
handler: (e, t) => {
|
|
4147
4132
|
let {
|
|
@@ -4149,12 +4134,12 @@ Ea.activators = [{
|
|
|
4149
4134
|
} = e, {
|
|
4150
4135
|
onActivation: r
|
|
4151
4136
|
} = t;
|
|
4152
|
-
return n.button ===
|
|
4137
|
+
return n.button === zn.RightClick ? !1 : (r == null || r({
|
|
4153
4138
|
event: n
|
|
4154
4139
|
}), !0);
|
|
4155
4140
|
}
|
|
4156
4141
|
}];
|
|
4157
|
-
const
|
|
4142
|
+
const yn = {
|
|
4158
4143
|
cancel: {
|
|
4159
4144
|
name: "touchcancel"
|
|
4160
4145
|
},
|
|
@@ -4165,22 +4150,22 @@ const bn = {
|
|
|
4165
4150
|
name: "touchend"
|
|
4166
4151
|
}
|
|
4167
4152
|
};
|
|
4168
|
-
class
|
|
4153
|
+
class ka extends tr {
|
|
4169
4154
|
constructor(t) {
|
|
4170
|
-
super(t,
|
|
4155
|
+
super(t, yn);
|
|
4171
4156
|
}
|
|
4172
4157
|
static setup() {
|
|
4173
|
-
return window.addEventListener(
|
|
4158
|
+
return window.addEventListener(yn.move.name, t, {
|
|
4174
4159
|
capture: !1,
|
|
4175
4160
|
passive: !1
|
|
4176
4161
|
}), function() {
|
|
4177
|
-
window.removeEventListener(
|
|
4162
|
+
window.removeEventListener(yn.move.name, t);
|
|
4178
4163
|
};
|
|
4179
4164
|
function t() {
|
|
4180
4165
|
}
|
|
4181
4166
|
}
|
|
4182
4167
|
}
|
|
4183
|
-
|
|
4168
|
+
ka.activators = [{
|
|
4184
4169
|
eventName: "onTouchStart",
|
|
4185
4170
|
handler: (e, t) => {
|
|
4186
4171
|
let {
|
|
@@ -4204,7 +4189,7 @@ var Wt;
|
|
|
4204
4189
|
(function(e) {
|
|
4205
4190
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
4206
4191
|
})(Wt || (Wt = {}));
|
|
4207
|
-
function
|
|
4192
|
+
function Ca(e) {
|
|
4208
4193
|
let {
|
|
4209
4194
|
acceleration: t,
|
|
4210
4195
|
activator: n = bt.Pointer,
|
|
@@ -4219,10 +4204,10 @@ function Ma(e) {
|
|
|
4219
4204
|
delta: d,
|
|
4220
4205
|
threshold: h
|
|
4221
4206
|
} = e;
|
|
4222
|
-
const p =
|
|
4207
|
+
const p = Ea({
|
|
4223
4208
|
delta: d,
|
|
4224
4209
|
disabled: !i
|
|
4225
|
-
}), [k, y] =
|
|
4210
|
+
}), [k, y] = zs(), g = V({
|
|
4226
4211
|
x: 0,
|
|
4227
4212
|
y: 0
|
|
4228
4213
|
}), m = V({
|
|
@@ -4262,7 +4247,7 @@ function Ma(e) {
|
|
|
4262
4247
|
const {
|
|
4263
4248
|
direction: D,
|
|
4264
4249
|
speed: w
|
|
4265
|
-
} =
|
|
4250
|
+
} = ua(b, v, S, t, h);
|
|
4266
4251
|
for (const A of ["x", "y"])
|
|
4267
4252
|
p[A][D[A]] || (w[A] = 0, D[A] = 0);
|
|
4268
4253
|
if (w.x > 0 || w.y > 0) {
|
|
@@ -4299,7 +4284,7 @@ function Ma(e) {
|
|
|
4299
4284
|
]
|
|
4300
4285
|
);
|
|
4301
4286
|
}
|
|
4302
|
-
const
|
|
4287
|
+
const Sa = {
|
|
4303
4288
|
x: {
|
|
4304
4289
|
[ge.Backward]: !1,
|
|
4305
4290
|
[ge.Forward]: !1
|
|
@@ -4309,7 +4294,7 @@ const Da = {
|
|
|
4309
4294
|
[ge.Forward]: !1
|
|
4310
4295
|
}
|
|
4311
4296
|
};
|
|
4312
|
-
function
|
|
4297
|
+
function Ea(e) {
|
|
4313
4298
|
let {
|
|
4314
4299
|
delta: t,
|
|
4315
4300
|
disabled: n
|
|
@@ -4317,7 +4302,7 @@ function La(e) {
|
|
|
4317
4302
|
const r = Ut(t);
|
|
4318
4303
|
return Dt((o) => {
|
|
4319
4304
|
if (n || !r || !o)
|
|
4320
|
-
return
|
|
4305
|
+
return Sa;
|
|
4321
4306
|
const i = {
|
|
4322
4307
|
x: Math.sign(t.x - r.x),
|
|
4323
4308
|
y: Math.sign(t.y - r.y)
|
|
@@ -4334,14 +4319,14 @@ function La(e) {
|
|
|
4334
4319
|
};
|
|
4335
4320
|
}, [n, t, r]);
|
|
4336
4321
|
}
|
|
4337
|
-
function
|
|
4322
|
+
function Aa(e, t) {
|
|
4338
4323
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
4339
4324
|
return Dt((o) => {
|
|
4340
4325
|
var i;
|
|
4341
4326
|
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
4342
4327
|
}, [r, t]);
|
|
4343
4328
|
}
|
|
4344
|
-
function
|
|
4329
|
+
function Ma(e, t) {
|
|
4345
4330
|
return X(() => e.reduce((n, r) => {
|
|
4346
4331
|
const {
|
|
4347
4332
|
sensor: o
|
|
@@ -4356,12 +4341,12 @@ var Et;
|
|
|
4356
4341
|
(function(e) {
|
|
4357
4342
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
4358
4343
|
})(Et || (Et = {}));
|
|
4359
|
-
var
|
|
4344
|
+
var On;
|
|
4360
4345
|
(function(e) {
|
|
4361
4346
|
e.Optimized = "optimized";
|
|
4362
|
-
})(
|
|
4347
|
+
})(On || (On = {}));
|
|
4363
4348
|
const Er = /* @__PURE__ */ new Map();
|
|
4364
|
-
function
|
|
4349
|
+
function Da(e, t) {
|
|
4365
4350
|
let {
|
|
4366
4351
|
dragging: n,
|
|
4367
4352
|
dependencies: r,
|
|
@@ -4433,10 +4418,10 @@ function Ra(e, t) {
|
|
|
4433
4418
|
function rr(e, t) {
|
|
4434
4419
|
return Dt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
4435
4420
|
}
|
|
4436
|
-
function
|
|
4421
|
+
function La(e, t) {
|
|
4437
4422
|
return rr(e, t);
|
|
4438
4423
|
}
|
|
4439
|
-
function
|
|
4424
|
+
function Ta(e) {
|
|
4440
4425
|
let {
|
|
4441
4426
|
callback: t,
|
|
4442
4427
|
disabled: n
|
|
@@ -4470,11 +4455,11 @@ function tn(e) {
|
|
|
4470
4455
|
);
|
|
4471
4456
|
return q(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
4472
4457
|
}
|
|
4473
|
-
function
|
|
4458
|
+
function Ia(e) {
|
|
4474
4459
|
return new Zn(Lt(e), e);
|
|
4475
4460
|
}
|
|
4476
4461
|
function Ar(e, t, n) {
|
|
4477
|
-
t === void 0 && (t =
|
|
4462
|
+
t === void 0 && (t = Ia);
|
|
4478
4463
|
const [r, o] = B(null);
|
|
4479
4464
|
function i() {
|
|
4480
4465
|
o((l) => {
|
|
@@ -4488,7 +4473,7 @@ function Ar(e, t, n) {
|
|
|
4488
4473
|
return JSON.stringify(l) === JSON.stringify(u) ? l : u;
|
|
4489
4474
|
});
|
|
4490
4475
|
}
|
|
4491
|
-
const s =
|
|
4476
|
+
const s = Ta({
|
|
4492
4477
|
callback(l) {
|
|
4493
4478
|
if (e)
|
|
4494
4479
|
for (const c of l) {
|
|
@@ -4512,31 +4497,31 @@ function Ar(e, t, n) {
|
|
|
4512
4497
|
})) : (a == null || a.disconnect(), s == null || s.disconnect());
|
|
4513
4498
|
}, [e]), r;
|
|
4514
4499
|
}
|
|
4515
|
-
function
|
|
4500
|
+
function Ra(e) {
|
|
4516
4501
|
const t = rr(e);
|
|
4517
|
-
return
|
|
4502
|
+
return Co(e, t);
|
|
4518
4503
|
}
|
|
4519
4504
|
const Mr = [];
|
|
4520
|
-
function
|
|
4505
|
+
function Na(e) {
|
|
4521
4506
|
const t = V(e), n = Dt((r) => e ? r && r !== Mr && e && t.current && e.parentNode === t.current.parentNode ? r : en(e) : Mr, [e]);
|
|
4522
4507
|
return q(() => {
|
|
4523
4508
|
t.current = e;
|
|
4524
4509
|
}, [e]), n;
|
|
4525
4510
|
}
|
|
4526
|
-
function
|
|
4511
|
+
function za(e) {
|
|
4527
4512
|
const [t, n] = B(null), r = V(e), o = N((i) => {
|
|
4528
|
-
const s =
|
|
4529
|
-
s && n((a) => a ? (a.set(s,
|
|
4513
|
+
const s = mn(i.target);
|
|
4514
|
+
s && n((a) => a ? (a.set(s, Nn(s)), new Map(a)) : null);
|
|
4530
4515
|
}, []);
|
|
4531
4516
|
return q(() => {
|
|
4532
4517
|
const i = r.current;
|
|
4533
4518
|
if (e !== i) {
|
|
4534
4519
|
s(i);
|
|
4535
4520
|
const a = e.map((l) => {
|
|
4536
|
-
const c =
|
|
4521
|
+
const c = mn(l);
|
|
4537
4522
|
return c ? (c.addEventListener("scroll", o, {
|
|
4538
4523
|
passive: !0
|
|
4539
|
-
}), [c,
|
|
4524
|
+
}), [c, Nn(c)]) : null;
|
|
4540
4525
|
}).filter((l) => l != null);
|
|
4541
4526
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
4542
4527
|
}
|
|
@@ -4545,11 +4530,11 @@ function Pa(e) {
|
|
|
4545
4530
|
};
|
|
4546
4531
|
function s(a) {
|
|
4547
4532
|
a.forEach((l) => {
|
|
4548
|
-
const c =
|
|
4533
|
+
const c = mn(l);
|
|
4549
4534
|
c == null || c.removeEventListener("scroll", o);
|
|
4550
4535
|
});
|
|
4551
4536
|
}
|
|
4552
|
-
}, [o, e]), X(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) :
|
|
4537
|
+
}, [o, e]), X(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) : To(e) : Fe, [e, t]);
|
|
4553
4538
|
}
|
|
4554
4539
|
function Dr(e, t) {
|
|
4555
4540
|
t === void 0 && (t = []);
|
|
@@ -4565,7 +4550,7 @@ function Dr(e, t) {
|
|
|
4565
4550
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
4566
4551
|
}, [e]), n.current ? Ct(e, n.current) : Fe;
|
|
4567
4552
|
}
|
|
4568
|
-
function
|
|
4553
|
+
function Oa(e) {
|
|
4569
4554
|
q(
|
|
4570
4555
|
() => {
|
|
4571
4556
|
if (!Jt)
|
|
@@ -4591,7 +4576,7 @@ function $a(e) {
|
|
|
4591
4576
|
})
|
|
4592
4577
|
);
|
|
4593
4578
|
}
|
|
4594
|
-
function
|
|
4579
|
+
function Fa(e, t) {
|
|
4595
4580
|
return X(() => e.reduce((n, r) => {
|
|
4596
4581
|
let {
|
|
4597
4582
|
eventName: o,
|
|
@@ -4602,15 +4587,15 @@ function Ha(e, t) {
|
|
|
4602
4587
|
}, n;
|
|
4603
4588
|
}, {}), [e, t]);
|
|
4604
4589
|
}
|
|
4605
|
-
function
|
|
4606
|
-
return X(() => e ?
|
|
4590
|
+
function No(e) {
|
|
4591
|
+
return X(() => e ? aa(e) : null, [e]);
|
|
4607
4592
|
}
|
|
4608
4593
|
const Lr = [];
|
|
4609
|
-
function
|
|
4594
|
+
function ja(e, t) {
|
|
4610
4595
|
t === void 0 && (t = Lt);
|
|
4611
|
-
const [n] = e, r =
|
|
4596
|
+
const [n] = e, r = No(n ? Ce(n) : null), [o, i] = B(Lr);
|
|
4612
4597
|
function s() {
|
|
4613
|
-
i(() => e.length ? e.map((l) =>
|
|
4598
|
+
i(() => e.length ? e.map((l) => Do(l) ? r : new Zn(t(l), l)) : Lr);
|
|
4614
4599
|
}
|
|
4615
4600
|
const a = tn({
|
|
4616
4601
|
callback: s
|
|
@@ -4619,7 +4604,7 @@ function Ba(e, t) {
|
|
|
4619
4604
|
a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
|
|
4620
4605
|
}, [e]), o;
|
|
4621
4606
|
}
|
|
4622
|
-
function
|
|
4607
|
+
function zo(e) {
|
|
4623
4608
|
if (!e)
|
|
4624
4609
|
return null;
|
|
4625
4610
|
if (e.children.length > 1)
|
|
@@ -4627,7 +4612,7 @@ function Fo(e) {
|
|
|
4627
4612
|
const t = e.children[0];
|
|
4628
4613
|
return Mt(t) ? t : e;
|
|
4629
4614
|
}
|
|
4630
|
-
function
|
|
4615
|
+
function Pa(e) {
|
|
4631
4616
|
let {
|
|
4632
4617
|
measure: t
|
|
4633
4618
|
} = e;
|
|
@@ -4649,7 +4634,7 @@ function Va(e) {
|
|
|
4649
4634
|
}, [t]), i = tn({
|
|
4650
4635
|
callback: o
|
|
4651
4636
|
}), s = N((c) => {
|
|
4652
|
-
const u =
|
|
4637
|
+
const u = zo(c);
|
|
4653
4638
|
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
4654
4639
|
}, [t, i]), [a, l] = Vt(s);
|
|
4655
4640
|
return X(() => ({
|
|
@@ -4658,13 +4643,13 @@ function Va(e) {
|
|
|
4658
4643
|
setRef: l
|
|
4659
4644
|
}), [n, a, l]);
|
|
4660
4645
|
}
|
|
4661
|
-
const
|
|
4646
|
+
const $a = [{
|
|
4662
4647
|
sensor: nr,
|
|
4663
4648
|
options: {}
|
|
4664
4649
|
}, {
|
|
4665
4650
|
sensor: er,
|
|
4666
4651
|
options: {}
|
|
4667
|
-
}],
|
|
4652
|
+
}], Ha = {
|
|
4668
4653
|
current: {}
|
|
4669
4654
|
}, Ht = {
|
|
4670
4655
|
draggable: {
|
|
@@ -4673,7 +4658,7 @@ const Ua = [{
|
|
|
4673
4658
|
droppable: {
|
|
4674
4659
|
measure: xr,
|
|
4675
4660
|
strategy: Et.WhileDragging,
|
|
4676
|
-
frequency:
|
|
4661
|
+
frequency: On.Optimized
|
|
4677
4662
|
},
|
|
4678
4663
|
dragOverlay: {
|
|
4679
4664
|
measure: Lt
|
|
@@ -4700,7 +4685,7 @@ class wt extends Map {
|
|
|
4700
4685
|
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
4701
4686
|
}
|
|
4702
4687
|
}
|
|
4703
|
-
const
|
|
4688
|
+
const Ba = {
|
|
4704
4689
|
activatorEvent: null,
|
|
4705
4690
|
active: null,
|
|
4706
4691
|
activeNode: null,
|
|
@@ -4724,7 +4709,7 @@ const _a = {
|
|
|
4724
4709
|
measureDroppableContainers: _t,
|
|
4725
4710
|
windowRect: null,
|
|
4726
4711
|
measuringScheduled: !1
|
|
4727
|
-
},
|
|
4712
|
+
}, Oo = {
|
|
4728
4713
|
activatorEvent: null,
|
|
4729
4714
|
activators: [],
|
|
4730
4715
|
active: null,
|
|
@@ -4736,8 +4721,8 @@ const _a = {
|
|
|
4736
4721
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
4737
4722
|
over: null,
|
|
4738
4723
|
measureDroppableContainers: _t
|
|
4739
|
-
}, Tt = /* @__PURE__ */ Je(
|
|
4740
|
-
function
|
|
4724
|
+
}, Tt = /* @__PURE__ */ Je(Oo), Fo = /* @__PURE__ */ Je(Ba);
|
|
4725
|
+
function Va() {
|
|
4741
4726
|
return {
|
|
4742
4727
|
draggable: {
|
|
4743
4728
|
active: null,
|
|
@@ -4756,7 +4741,7 @@ function Wa() {
|
|
|
4756
4741
|
}
|
|
4757
4742
|
};
|
|
4758
4743
|
}
|
|
4759
|
-
function
|
|
4744
|
+
function Ua(e, t) {
|
|
4760
4745
|
switch (t.type) {
|
|
4761
4746
|
case ce.DragStart:
|
|
4762
4747
|
return {
|
|
@@ -4849,7 +4834,7 @@ function qa(e, t) {
|
|
|
4849
4834
|
return e;
|
|
4850
4835
|
}
|
|
4851
4836
|
}
|
|
4852
|
-
function
|
|
4837
|
+
function Ga(e) {
|
|
4853
4838
|
let {
|
|
4854
4839
|
disabled: t
|
|
4855
4840
|
} = e;
|
|
@@ -4875,7 +4860,7 @@ function Ya(e) {
|
|
|
4875
4860
|
for (const u of [l.current, c.current]) {
|
|
4876
4861
|
if (!u)
|
|
4877
4862
|
continue;
|
|
4878
|
-
const d =
|
|
4863
|
+
const d = js(u);
|
|
4879
4864
|
if (d) {
|
|
4880
4865
|
d.focus();
|
|
4881
4866
|
break;
|
|
@@ -4885,7 +4870,7 @@ function Ya(e) {
|
|
|
4885
4870
|
}
|
|
4886
4871
|
}, [r, t, o, s, i]), null;
|
|
4887
4872
|
}
|
|
4888
|
-
function
|
|
4873
|
+
function jo(e, t) {
|
|
4889
4874
|
let {
|
|
4890
4875
|
transform: n,
|
|
4891
4876
|
...r
|
|
@@ -4895,7 +4880,7 @@ function $o(e, t) {
|
|
|
4895
4880
|
...r
|
|
4896
4881
|
}), n) : n;
|
|
4897
4882
|
}
|
|
4898
|
-
function
|
|
4883
|
+
function _a(e) {
|
|
4899
4884
|
return X(
|
|
4900
4885
|
() => ({
|
|
4901
4886
|
draggable: {
|
|
@@ -4915,7 +4900,7 @@ function Ka(e) {
|
|
|
4915
4900
|
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
4916
4901
|
);
|
|
4917
4902
|
}
|
|
4918
|
-
function
|
|
4903
|
+
function Wa(e) {
|
|
4919
4904
|
let {
|
|
4920
4905
|
activeNode: t,
|
|
4921
4906
|
measure: n,
|
|
@@ -4939,9 +4924,9 @@ function Xa(e) {
|
|
|
4939
4924
|
const c = t == null ? void 0 : t.node.current;
|
|
4940
4925
|
if (!c || c.isConnected === !1)
|
|
4941
4926
|
return;
|
|
4942
|
-
const u = n(c), d =
|
|
4927
|
+
const u = n(c), d = Co(u, r);
|
|
4943
4928
|
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
4944
|
-
const h =
|
|
4929
|
+
const h = Eo(c);
|
|
4945
4930
|
h && h.scrollBy({
|
|
4946
4931
|
top: d.y,
|
|
4947
4932
|
left: d.x
|
|
@@ -4958,20 +4943,20 @@ var Ke;
|
|
|
4958
4943
|
(function(e) {
|
|
4959
4944
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
4960
4945
|
})(Ke || (Ke = {}));
|
|
4961
|
-
const
|
|
4946
|
+
const qa = /* @__PURE__ */ Qo(function(t) {
|
|
4962
4947
|
var n, r, o, i;
|
|
4963
4948
|
let {
|
|
4964
4949
|
id: s,
|
|
4965
4950
|
accessibility: a,
|
|
4966
4951
|
autoScroll: l = !0,
|
|
4967
4952
|
children: c,
|
|
4968
|
-
sensors: u =
|
|
4969
|
-
collisionDetection: d =
|
|
4953
|
+
sensors: u = $a,
|
|
4954
|
+
collisionDetection: d = Zs,
|
|
4970
4955
|
measuring: h,
|
|
4971
4956
|
modifiers: p,
|
|
4972
4957
|
...k
|
|
4973
4958
|
} = t;
|
|
4974
|
-
const y =
|
|
4959
|
+
const y = Zo(Ua, void 0, Va), [g, m] = y, [S, M] = Us(), [L, I] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
|
|
4975
4960
|
draggable: {
|
|
4976
4961
|
active: E,
|
|
4977
4962
|
nodes: v,
|
|
@@ -4988,19 +4973,19 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
4988
4973
|
return E != null ? {
|
|
4989
4974
|
id: E,
|
|
4990
4975
|
// It's possible for the active node to unmount while dragging
|
|
4991
|
-
data: (we = A == null ? void 0 : A.data) != null ? we :
|
|
4976
|
+
data: (we = A == null ? void 0 : A.data) != null ? we : Ha,
|
|
4992
4977
|
rect: T
|
|
4993
4978
|
} : null;
|
|
4994
|
-
}, [E, A]), W = V(null), [ae, _] = B(null), [J, Y] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = X(() => w.getEnabled(), [w]), ie =
|
|
4979
|
+
}, [E, A]), W = V(null), [ae, _] = B(null), [J, Y] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = X(() => w.getEnabled(), [w]), ie = _a(h), {
|
|
4995
4980
|
droppableRects: de,
|
|
4996
4981
|
measureDroppableContainers: je,
|
|
4997
4982
|
measuringScheduled: ze
|
|
4998
|
-
} =
|
|
4983
|
+
} = Da(xe, {
|
|
4999
4984
|
dragging: b,
|
|
5000
4985
|
dependencies: [D.x, D.y],
|
|
5001
4986
|
config: ie.droppable
|
|
5002
|
-
}), le =
|
|
5003
|
-
|
|
4987
|
+
}), le = Aa(v, E), De = X(() => J ? Gt(J) : null, [J]), ee = Jo(), se = La(le, ie.draggable.measure);
|
|
4988
|
+
Wa({
|
|
5004
4989
|
activeNode: E != null ? v.get(E) : null,
|
|
5005
4990
|
config: ee.layoutShiftCompensation,
|
|
5006
4991
|
initialRect: se,
|
|
@@ -5020,9 +5005,9 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5020
5005
|
over: null,
|
|
5021
5006
|
scrollableAncestors: [],
|
|
5022
5007
|
scrollAdjustedTranslate: null
|
|
5023
|
-
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue =
|
|
5008
|
+
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue = Pa({
|
|
5024
5009
|
measure: ie.dragOverlay.measure
|
|
5025
|
-
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C =
|
|
5010
|
+
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C = Ra(x ? null : P), R = No(Ve ? Ce(Ve) : null), z = Na(b ? Ze ?? le : null), Z = ja(z), H = jo(p, {
|
|
5026
5011
|
transform: {
|
|
5027
5012
|
x: D.x - C.x,
|
|
5028
5013
|
y: D.y - C.y,
|
|
@@ -5039,13 +5024,13 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5039
5024
|
scrollableAncestors: z,
|
|
5040
5025
|
scrollableAncestorRects: Z,
|
|
5041
5026
|
windowRect: R
|
|
5042
|
-
}), Q = De ? nt(De, D) : null, fe =
|
|
5027
|
+
}), Q = De ? nt(De, D) : null, fe = za(z), Le = Dr(fe), oe = Dr(fe, [P]), Se = nt(H, Le), ye = Oe ? oa(Oe, H) : null, K = O && ye ? d({
|
|
5043
5028
|
active: O,
|
|
5044
5029
|
collisionRect: ye,
|
|
5045
5030
|
droppableRects: de,
|
|
5046
5031
|
droppableContainers: xe,
|
|
5047
5032
|
pointerCoordinates: Q
|
|
5048
|
-
}) : null, he =
|
|
5033
|
+
}) : null, he = ko(K, "id"), [be, It] = B(null), on = x ? H : nt(H, oe), Rt = na(on, (i = be == null ? void 0 : be.rect) != null ? i : null, P), ct = V(null), Nt = N(
|
|
5049
5034
|
(we, Ee) => {
|
|
5050
5035
|
let {
|
|
5051
5036
|
sensor: Ae,
|
|
@@ -5185,8 +5170,8 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5185
5170
|
we(Ae, Ee.options, Pe) === !0 && (Te.dndKit = {
|
|
5186
5171
|
capturedBy: Ee.sensor
|
|
5187
5172
|
}, W.current = We, Nt(Ae, Ee));
|
|
5188
|
-
}, [v, Nt]), Ot =
|
|
5189
|
-
|
|
5173
|
+
}, [v, Nt]), Ot = Ma(u, zt);
|
|
5174
|
+
Oa(u), _e(() => {
|
|
5190
5175
|
P && L === Ke.Initializing && I(Ke.Initialized);
|
|
5191
5176
|
}, [P, L]), q(
|
|
5192
5177
|
() => {
|
|
@@ -5275,7 +5260,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5275
5260
|
initial: Oe,
|
|
5276
5261
|
translated: ye
|
|
5277
5262
|
};
|
|
5278
|
-
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]),
|
|
5263
|
+
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]), Ca({
|
|
5279
5264
|
...ee,
|
|
5280
5265
|
delta: D,
|
|
5281
5266
|
draggingRect: ye,
|
|
@@ -5283,7 +5268,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5283
5268
|
scrollableAncestors: z,
|
|
5284
5269
|
scrollableAncestorRects: Z
|
|
5285
5270
|
});
|
|
5286
|
-
const
|
|
5271
|
+
const Ko = X(() => ({
|
|
5287
5272
|
active: O,
|
|
5288
5273
|
activeNode: le,
|
|
5289
5274
|
activeNodeRect: P,
|
|
@@ -5301,7 +5286,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5301
5286
|
measuringConfiguration: ie,
|
|
5302
5287
|
measuringScheduled: ze,
|
|
5303
5288
|
windowRect: R
|
|
5304
|
-
}), [O, le, P, J, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]),
|
|
5289
|
+
}), [O, le, P, J, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]), Xo = X(() => ({
|
|
5305
5290
|
activatorEvent: J,
|
|
5306
5291
|
activators: Ot,
|
|
5307
5292
|
active: O,
|
|
@@ -5314,21 +5299,21 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5314
5299
|
over: be,
|
|
5315
5300
|
measureDroppableContainers: je
|
|
5316
5301
|
}), [J, Ot, O, P, m, pe, v, be, je]);
|
|
5317
|
-
return ne.createElement(
|
|
5302
|
+
return ne.createElement(xo.Provider, {
|
|
5318
5303
|
value: M
|
|
5319
5304
|
}, ne.createElement(Tt.Provider, {
|
|
5320
|
-
value:
|
|
5321
|
-
}, ne.createElement(
|
|
5322
|
-
value:
|
|
5305
|
+
value: Xo
|
|
5306
|
+
}, ne.createElement(Fo.Provider, {
|
|
5307
|
+
value: Ko
|
|
5323
5308
|
}, ne.createElement(nn.Provider, {
|
|
5324
5309
|
value: Rt
|
|
5325
|
-
}, c)), ne.createElement(
|
|
5310
|
+
}, c)), ne.createElement(Ga, {
|
|
5326
5311
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
5327
|
-
})), ne.createElement(
|
|
5312
|
+
})), ne.createElement(Ws, {
|
|
5328
5313
|
...a,
|
|
5329
5314
|
hiddenTextDescribedById: pe
|
|
5330
5315
|
}));
|
|
5331
|
-
function
|
|
5316
|
+
function Jo() {
|
|
5332
5317
|
const we = (ae == null ? void 0 : ae.autoScrollEnabled) === !1, Ee = typeof l == "object" ? l.enabled === !1 : l === !1, Ae = b && !we && !Ee;
|
|
5333
5318
|
return typeof l == "object" ? {
|
|
5334
5319
|
...l,
|
|
@@ -5337,15 +5322,15 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5337
5322
|
enabled: Ae
|
|
5338
5323
|
};
|
|
5339
5324
|
}
|
|
5340
|
-
}),
|
|
5341
|
-
function
|
|
5325
|
+
}), Ya = /* @__PURE__ */ Je(null), Tr = "button", Ka = "Draggable";
|
|
5326
|
+
function Xa(e) {
|
|
5342
5327
|
let {
|
|
5343
5328
|
id: t,
|
|
5344
5329
|
data: n,
|
|
5345
5330
|
disabled: r = !1,
|
|
5346
5331
|
attributes: o
|
|
5347
5332
|
} = e;
|
|
5348
|
-
const i = Zt(
|
|
5333
|
+
const i = Zt(Ka), {
|
|
5349
5334
|
activators: s,
|
|
5350
5335
|
activatorEvent: a,
|
|
5351
5336
|
active: l,
|
|
@@ -5357,7 +5342,7 @@ function el(e) {
|
|
|
5357
5342
|
role: p = Tr,
|
|
5358
5343
|
roleDescription: k = "draggable",
|
|
5359
5344
|
tabIndex: y = 0
|
|
5360
|
-
} = o ?? {}, g = (l == null ? void 0 : l.id) === t, m = Be(g ? nn :
|
|
5345
|
+
} = o ?? {}, g = (l == null ? void 0 : l.id) === t, m = Be(g ? nn : Ya), [S, M] = Vt(), [L, I] = Vt(), b = Fa(s, t), E = kt(n);
|
|
5361
5346
|
_e(
|
|
5362
5347
|
() => (d.set(t, {
|
|
5363
5348
|
id: t,
|
|
@@ -5394,20 +5379,20 @@ function el(e) {
|
|
|
5394
5379
|
transform: m
|
|
5395
5380
|
};
|
|
5396
5381
|
}
|
|
5397
|
-
function
|
|
5398
|
-
return Be(
|
|
5382
|
+
function Ja() {
|
|
5383
|
+
return Be(Fo);
|
|
5399
5384
|
}
|
|
5400
|
-
const
|
|
5385
|
+
const Qa = "Droppable", Za = {
|
|
5401
5386
|
timeout: 25
|
|
5402
5387
|
};
|
|
5403
|
-
function
|
|
5388
|
+
function Po(e) {
|
|
5404
5389
|
let {
|
|
5405
5390
|
data: t,
|
|
5406
5391
|
disabled: n = !1,
|
|
5407
5392
|
id: r,
|
|
5408
5393
|
resizeObserverConfig: o
|
|
5409
5394
|
} = e;
|
|
5410
|
-
const i = Zt(
|
|
5395
|
+
const i = Zt(Qa), {
|
|
5411
5396
|
active: s,
|
|
5412
5397
|
dispatch: a,
|
|
5413
5398
|
over: l,
|
|
@@ -5419,7 +5404,7 @@ function Ho(e) {
|
|
|
5419
5404
|
updateMeasurementsFor: y,
|
|
5420
5405
|
timeout: g
|
|
5421
5406
|
} = {
|
|
5422
|
-
...
|
|
5407
|
+
...Za,
|
|
5423
5408
|
...o
|
|
5424
5409
|
}, m = kt(y ?? r), S = N(
|
|
5425
5410
|
() => {
|
|
@@ -5475,7 +5460,7 @@ function Ho(e) {
|
|
|
5475
5460
|
setNodeRef: b
|
|
5476
5461
|
};
|
|
5477
5462
|
}
|
|
5478
|
-
function
|
|
5463
|
+
function el(e) {
|
|
5479
5464
|
let {
|
|
5480
5465
|
animation: t,
|
|
5481
5466
|
children: n
|
|
@@ -5492,30 +5477,30 @@ function ol(e) {
|
|
|
5492
5477
|
Promise.resolve(t(c, i)).then(() => {
|
|
5493
5478
|
o(null);
|
|
5494
5479
|
});
|
|
5495
|
-
}, [t, r, i]), ne.createElement(ne.Fragment, null, n, r ?
|
|
5480
|
+
}, [t, r, i]), ne.createElement(ne.Fragment, null, n, r ? ei(r, {
|
|
5496
5481
|
ref: s
|
|
5497
5482
|
}) : null);
|
|
5498
5483
|
}
|
|
5499
|
-
const
|
|
5484
|
+
const tl = {
|
|
5500
5485
|
x: 0,
|
|
5501
5486
|
y: 0,
|
|
5502
5487
|
scaleX: 1,
|
|
5503
5488
|
scaleY: 1
|
|
5504
5489
|
};
|
|
5505
|
-
function
|
|
5490
|
+
function nl(e) {
|
|
5506
5491
|
let {
|
|
5507
5492
|
children: t
|
|
5508
5493
|
} = e;
|
|
5509
5494
|
return ne.createElement(Tt.Provider, {
|
|
5510
|
-
value:
|
|
5495
|
+
value: Oo
|
|
5511
5496
|
}, ne.createElement(nn.Provider, {
|
|
5512
|
-
value:
|
|
5497
|
+
value: tl
|
|
5513
5498
|
}, t));
|
|
5514
5499
|
}
|
|
5515
|
-
const
|
|
5500
|
+
const rl = {
|
|
5516
5501
|
position: "fixed",
|
|
5517
5502
|
touchAction: "none"
|
|
5518
|
-
},
|
|
5503
|
+
}, ol = (e) => Xn(e) ? "transform 250ms ease" : void 0, il = /* @__PURE__ */ Pn((e, t) => {
|
|
5519
5504
|
let {
|
|
5520
5505
|
as: n,
|
|
5521
5506
|
activatorEvent: r,
|
|
@@ -5525,7 +5510,7 @@ const al = {
|
|
|
5525
5510
|
rect: a,
|
|
5526
5511
|
style: l,
|
|
5527
5512
|
transform: c,
|
|
5528
|
-
transition: u =
|
|
5513
|
+
transition: u = ol
|
|
5529
5514
|
} = e;
|
|
5530
5515
|
if (!a)
|
|
5531
5516
|
return null;
|
|
@@ -5534,13 +5519,13 @@ const al = {
|
|
|
5534
5519
|
scaleX: 1,
|
|
5535
5520
|
scaleY: 1
|
|
5536
5521
|
}, h = {
|
|
5537
|
-
...
|
|
5522
|
+
...rl,
|
|
5538
5523
|
width: a.width,
|
|
5539
5524
|
height: a.height,
|
|
5540
5525
|
top: a.top,
|
|
5541
5526
|
left: a.left,
|
|
5542
5527
|
transform: St.Transform.toString(d),
|
|
5543
|
-
transformOrigin: o && r ?
|
|
5528
|
+
transformOrigin: o && r ? Ys(r, a) : void 0,
|
|
5544
5529
|
transition: typeof u == "function" ? u(r) : u,
|
|
5545
5530
|
...l
|
|
5546
5531
|
};
|
|
@@ -5549,7 +5534,7 @@ const al = {
|
|
|
5549
5534
|
style: h,
|
|
5550
5535
|
ref: t
|
|
5551
5536
|
}, i);
|
|
5552
|
-
}),
|
|
5537
|
+
}), sl = (e) => (t) => {
|
|
5553
5538
|
let {
|
|
5554
5539
|
active: n,
|
|
5555
5540
|
dragOverlay: r
|
|
@@ -5569,7 +5554,7 @@ const al = {
|
|
|
5569
5554
|
n.node.style.setProperty(l, c);
|
|
5570
5555
|
s != null && s.active && n.node.classList.remove(s.active);
|
|
5571
5556
|
};
|
|
5572
|
-
},
|
|
5557
|
+
}, al = (e) => {
|
|
5573
5558
|
let {
|
|
5574
5559
|
transform: {
|
|
5575
5560
|
initial: t,
|
|
@@ -5581,11 +5566,11 @@ const al = {
|
|
|
5581
5566
|
}, {
|
|
5582
5567
|
transform: St.Transform.toString(n)
|
|
5583
5568
|
}];
|
|
5584
|
-
},
|
|
5569
|
+
}, ll = {
|
|
5585
5570
|
duration: 250,
|
|
5586
5571
|
easing: "ease",
|
|
5587
|
-
keyframes:
|
|
5588
|
-
sideEffects: /* @__PURE__ */
|
|
5572
|
+
keyframes: al,
|
|
5573
|
+
sideEffects: /* @__PURE__ */ sl({
|
|
5589
5574
|
styles: {
|
|
5590
5575
|
active: {
|
|
5591
5576
|
opacity: "0"
|
|
@@ -5593,7 +5578,7 @@ const al = {
|
|
|
5593
5578
|
}
|
|
5594
5579
|
})
|
|
5595
5580
|
};
|
|
5596
|
-
function
|
|
5581
|
+
function cl(e) {
|
|
5597
5582
|
let {
|
|
5598
5583
|
config: t,
|
|
5599
5584
|
draggableNodes: n,
|
|
@@ -5609,16 +5594,16 @@ function hl(e) {
|
|
|
5609
5594
|
const l = a.node.current;
|
|
5610
5595
|
if (!l)
|
|
5611
5596
|
return;
|
|
5612
|
-
const c =
|
|
5597
|
+
const c = zo(s);
|
|
5613
5598
|
if (!c)
|
|
5614
5599
|
return;
|
|
5615
5600
|
const {
|
|
5616
5601
|
transform: u
|
|
5617
|
-
} = Ce(s).getComputedStyle(s), d =
|
|
5602
|
+
} = Ce(s).getComputedStyle(s), d = So(u);
|
|
5618
5603
|
if (!d)
|
|
5619
5604
|
return;
|
|
5620
|
-
const h = typeof t == "function" ? t :
|
|
5621
|
-
return
|
|
5605
|
+
const h = typeof t == "function" ? t : dl(t);
|
|
5606
|
+
return Io(l, o.draggable.measure), h({
|
|
5622
5607
|
active: {
|
|
5623
5608
|
id: i,
|
|
5624
5609
|
data: a.data,
|
|
@@ -5636,14 +5621,14 @@ function hl(e) {
|
|
|
5636
5621
|
});
|
|
5637
5622
|
});
|
|
5638
5623
|
}
|
|
5639
|
-
function
|
|
5624
|
+
function dl(e) {
|
|
5640
5625
|
const {
|
|
5641
5626
|
duration: t,
|
|
5642
5627
|
easing: n,
|
|
5643
5628
|
sideEffects: r,
|
|
5644
5629
|
keyframes: o
|
|
5645
5630
|
} = {
|
|
5646
|
-
...
|
|
5631
|
+
...ll,
|
|
5647
5632
|
...e
|
|
5648
5633
|
};
|
|
5649
5634
|
return (i) => {
|
|
@@ -5693,13 +5678,13 @@ function gl(e) {
|
|
|
5693
5678
|
};
|
|
5694
5679
|
}
|
|
5695
5680
|
let Ir = 0;
|
|
5696
|
-
function
|
|
5681
|
+
function ul(e) {
|
|
5697
5682
|
return X(() => {
|
|
5698
5683
|
if (e != null)
|
|
5699
5684
|
return Ir++, Ir;
|
|
5700
5685
|
}, [e]);
|
|
5701
5686
|
}
|
|
5702
|
-
const
|
|
5687
|
+
const fl = /* @__PURE__ */ ne.memo((e) => {
|
|
5703
5688
|
let {
|
|
5704
5689
|
adjustScale: t = !1,
|
|
5705
5690
|
children: n,
|
|
@@ -5724,7 +5709,7 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5724
5709
|
scrollableAncestors: M,
|
|
5725
5710
|
scrollableAncestorRects: L,
|
|
5726
5711
|
windowRect: I
|
|
5727
|
-
} =
|
|
5712
|
+
} = Ja(), b = Be(nn), E = ul(d == null ? void 0 : d.id), v = jo(s, {
|
|
5728
5713
|
activatorEvent: u,
|
|
5729
5714
|
active: d,
|
|
5730
5715
|
activeNodeRect: h,
|
|
@@ -5736,15 +5721,15 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5736
5721
|
scrollableAncestorRects: L,
|
|
5737
5722
|
transform: b,
|
|
5738
5723
|
windowRect: I
|
|
5739
|
-
}), D = rr(h), w =
|
|
5724
|
+
}), D = rr(h), w = cl({
|
|
5740
5725
|
config: r,
|
|
5741
5726
|
draggableNodes: k,
|
|
5742
5727
|
droppableContainers: y,
|
|
5743
5728
|
measuringConfiguration: S
|
|
5744
5729
|
}), A = D ? g.setRef : void 0;
|
|
5745
|
-
return ne.createElement(
|
|
5730
|
+
return ne.createElement(nl, null, ne.createElement(el, {
|
|
5746
5731
|
animation: w
|
|
5747
|
-
}, d && E ? ne.createElement(
|
|
5732
|
+
}, d && E ? ne.createElement(il, {
|
|
5748
5733
|
key: E,
|
|
5749
5734
|
id: d.id,
|
|
5750
5735
|
ref: A,
|
|
@@ -5767,7 +5752,7 @@ function qt(e) {
|
|
|
5767
5752
|
const t = e.data.current;
|
|
5768
5753
|
return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
|
|
5769
5754
|
}
|
|
5770
|
-
const
|
|
5755
|
+
const hl = [U.Down, U.Right, U.Up, U.Left], gl = (e, t) => {
|
|
5771
5756
|
let {
|
|
5772
5757
|
context: {
|
|
5773
5758
|
active: n,
|
|
@@ -5778,7 +5763,7 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5778
5763
|
scrollableAncestors: a
|
|
5779
5764
|
}
|
|
5780
5765
|
} = t;
|
|
5781
|
-
if (
|
|
5766
|
+
if (hl.includes(e.code)) {
|
|
5782
5767
|
if (e.preventDefault(), !n || !r)
|
|
5783
5768
|
return;
|
|
5784
5769
|
const l = [];
|
|
@@ -5802,16 +5787,16 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5802
5787
|
break;
|
|
5803
5788
|
}
|
|
5804
5789
|
});
|
|
5805
|
-
const c =
|
|
5790
|
+
const c = Js({
|
|
5806
5791
|
collisionRect: r,
|
|
5807
5792
|
droppableRects: o,
|
|
5808
5793
|
droppableContainers: l
|
|
5809
5794
|
});
|
|
5810
|
-
let u =
|
|
5795
|
+
let u = ko(c, "id");
|
|
5811
5796
|
if (u === (s == null ? void 0 : s.id) && c.length > 1 && (u = c[1].id), u != null) {
|
|
5812
5797
|
const d = i.get(n.id), h = i.get(u), p = h ? o.get(h.id) : null, k = h == null ? void 0 : h.node.current;
|
|
5813
5798
|
if (k && p && d && h) {
|
|
5814
|
-
const g = en(k).some((b, E) => a[E] !== b), m =
|
|
5799
|
+
const g = en(k).some((b, E) => a[E] !== b), m = $o(d, h), S = pl(d, h), M = g || !m ? {
|
|
5815
5800
|
x: 0,
|
|
5816
5801
|
y: 0
|
|
5817
5802
|
} : {
|
|
@@ -5826,11 +5811,11 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5826
5811
|
}
|
|
5827
5812
|
}
|
|
5828
5813
|
};
|
|
5829
|
-
function
|
|
5814
|
+
function $o(e, t) {
|
|
5830
5815
|
return !qt(e) || !qt(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
5831
5816
|
}
|
|
5832
|
-
function
|
|
5833
|
-
return !qt(e) || !qt(t) ||
|
|
5817
|
+
function pl(e, t) {
|
|
5818
|
+
return !qt(e) || !qt(t) || !$o(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
|
|
5834
5819
|
}
|
|
5835
5820
|
function Rr(e) {
|
|
5836
5821
|
var n;
|
|
@@ -5838,7 +5823,7 @@ function Rr(e) {
|
|
|
5838
5823
|
const t = (n = e[0].data) == null ? void 0 : n.zone;
|
|
5839
5824
|
return t === "before" || t === "after" || t === "into" ? t : null;
|
|
5840
5825
|
}
|
|
5841
|
-
function
|
|
5826
|
+
function ml(e) {
|
|
5842
5827
|
const {
|
|
5843
5828
|
onReorder: t,
|
|
5844
5829
|
onGroupReorder: n,
|
|
@@ -5846,14 +5831,14 @@ function wl(e) {
|
|
|
5846
5831
|
onDropIntoGroupAtPosition: o,
|
|
5847
5832
|
onRemoveFromGroup: i,
|
|
5848
5833
|
findParentGroup: s
|
|
5849
|
-
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k =
|
|
5834
|
+
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k = qs(
|
|
5850
5835
|
br(nr, {
|
|
5851
5836
|
activationConstraint: {
|
|
5852
5837
|
distance: 5
|
|
5853
5838
|
}
|
|
5854
5839
|
}),
|
|
5855
5840
|
br(er, {
|
|
5856
|
-
coordinateGetter:
|
|
5841
|
+
coordinateGetter: gl
|
|
5857
5842
|
})
|
|
5858
5843
|
), y = N((I) => {
|
|
5859
5844
|
l(String(I.active.id));
|
|
@@ -5918,11 +5903,11 @@ function wl(e) {
|
|
|
5918
5903
|
onDragCancel: L
|
|
5919
5904
|
};
|
|
5920
5905
|
}
|
|
5921
|
-
const
|
|
5906
|
+
const vl = (e) => {
|
|
5922
5907
|
var h, p;
|
|
5923
5908
|
const { pointerCoordinates: t, droppableContainers: n, droppableRects: r } = e;
|
|
5924
|
-
let o =
|
|
5925
|
-
if (o.length === 0 && (o =
|
|
5909
|
+
let o = ta(e);
|
|
5910
|
+
if (o.length === 0 && (o = Xs(e)), o.length === 0 || !t) return o;
|
|
5926
5911
|
const i = o[0];
|
|
5927
5912
|
if (String(i.id).startsWith("group-footer::"))
|
|
5928
5913
|
return [{ ...i, data: { ...i.data, zone: "after" } }];
|
|
@@ -5934,7 +5919,7 @@ const xl = (e) => {
|
|
|
5934
5919
|
...i,
|
|
5935
5920
|
data: { ...i.data, zone: d }
|
|
5936
5921
|
}];
|
|
5937
|
-
},
|
|
5922
|
+
}, yl = ({
|
|
5938
5923
|
layer: e,
|
|
5939
5924
|
isOver: t,
|
|
5940
5925
|
dropPosition: n,
|
|
@@ -5948,7 +5933,7 @@ const xl = (e) => {
|
|
|
5948
5933
|
onDelete: u,
|
|
5949
5934
|
deleteSuppressed: d
|
|
5950
5935
|
}) => {
|
|
5951
|
-
const { attributes: h, listeners: p, setNodeRef: k, isDragging: y } =
|
|
5936
|
+
const { attributes: h, listeners: p, setNodeRef: k, isDragging: y } = Xa({ id: e.id }), { setNodeRef: g } = Po({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((D) => {
|
|
5952
5937
|
k(D), g(D);
|
|
5953
5938
|
}, [k, g]), S = e.isGroup, M = e.depth > 0, L = M ? e.depth * 24 : 0, I = {
|
|
5954
5939
|
opacity: y ? 0.3 : 1,
|
|
@@ -6119,8 +6104,8 @@ const xl = (e) => {
|
|
|
6119
6104
|
title: e,
|
|
6120
6105
|
children: r
|
|
6121
6106
|
}
|
|
6122
|
-
),
|
|
6123
|
-
const { setNodeRef: r } =
|
|
6107
|
+
), bl = ({ groupId: e, isOver: t, depth: n }) => {
|
|
6108
|
+
const { setNodeRef: r } = Po({ id: `group-footer::${e}` }), o = (n + 1) * 24;
|
|
6124
6109
|
return /* @__PURE__ */ f(
|
|
6125
6110
|
"div",
|
|
6126
6111
|
{
|
|
@@ -6135,7 +6120,7 @@ const xl = (e) => {
|
|
|
6135
6120
|
}
|
|
6136
6121
|
}
|
|
6137
6122
|
);
|
|
6138
|
-
},
|
|
6123
|
+
}, wl = ({ layer: e, showPreviewImages: t, previewDisplaySize: n }) => /* @__PURE__ */ j(
|
|
6139
6124
|
"div",
|
|
6140
6125
|
{
|
|
6141
6126
|
style: {
|
|
@@ -6185,7 +6170,7 @@ const xl = (e) => {
|
|
|
6185
6170
|
/* @__PURE__ */ f("span", { style: { fontSize: 13, color: "var(--foreground, #333)" }, children: e.name })
|
|
6186
6171
|
]
|
|
6187
6172
|
}
|
|
6188
|
-
),
|
|
6173
|
+
), xl = ({
|
|
6189
6174
|
width: e = 250,
|
|
6190
6175
|
height: t,
|
|
6191
6176
|
showPreviewImages: n = !0,
|
|
@@ -6196,7 +6181,7 @@ const xl = (e) => {
|
|
|
6196
6181
|
showHeader: a = !0,
|
|
6197
6182
|
...l
|
|
6198
6183
|
}) => {
|
|
6199
|
-
const { activeArtboard: c } =
|
|
6184
|
+
const { activeArtboard: c } = Ns(), u = (c == null ? void 0 : c.previewBackgroundColor) || (c == null ? void 0 : c.backgroundColor) || "transparent", d = 80, h = 160, {
|
|
6200
6185
|
layers: p,
|
|
6201
6186
|
flatLayers: k,
|
|
6202
6187
|
selectLayer: y,
|
|
@@ -6212,7 +6197,7 @@ const xl = (e) => {
|
|
|
6212
6197
|
findElementById: D,
|
|
6213
6198
|
findParentGroup: w,
|
|
6214
6199
|
generateAllPreviews: A
|
|
6215
|
-
} =
|
|
6200
|
+
} = yi({
|
|
6216
6201
|
...l,
|
|
6217
6202
|
previewSize: h,
|
|
6218
6203
|
previewBackgroundColor: u
|
|
@@ -6220,7 +6205,7 @@ const xl = (e) => {
|
|
|
6220
6205
|
q(() => {
|
|
6221
6206
|
n && k.length > 0 && A();
|
|
6222
6207
|
}, [n, k.length, u, A]);
|
|
6223
|
-
const T =
|
|
6208
|
+
const T = ti(), O = N(
|
|
6224
6209
|
(ee) => {
|
|
6225
6210
|
var se;
|
|
6226
6211
|
return T((se = D(ee.id)) == null ? void 0 : se.name);
|
|
@@ -6238,7 +6223,7 @@ const xl = (e) => {
|
|
|
6238
6223
|
ke && !ve ? E(ee, se, P) : L(ee, se, P);
|
|
6239
6224
|
},
|
|
6240
6225
|
[w, E, L]
|
|
6241
|
-
), _ =
|
|
6226
|
+
), _ = ml({
|
|
6242
6227
|
onReorder: ae,
|
|
6243
6228
|
onDropIntoGroup: b,
|
|
6244
6229
|
onDropIntoGroupAtPosition: (ee, se) => b(ee, se),
|
|
@@ -6247,7 +6232,7 @@ const xl = (e) => {
|
|
|
6247
6232
|
findParentGroup: w
|
|
6248
6233
|
}), J = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6249
6234
|
/* @__PURE__ */ f(
|
|
6250
|
-
|
|
6235
|
+
yl,
|
|
6251
6236
|
{
|
|
6252
6237
|
layer: P,
|
|
6253
6238
|
isOver: _.overId === P.id,
|
|
@@ -6265,7 +6250,7 @@ const xl = (e) => {
|
|
|
6265
6250
|
),
|
|
6266
6251
|
P.children && J(P.children),
|
|
6267
6252
|
P.isGroup && /* @__PURE__ */ f(
|
|
6268
|
-
|
|
6253
|
+
bl,
|
|
6269
6254
|
{
|
|
6270
6255
|
groupId: P.id,
|
|
6271
6256
|
isOver: _.overId === `group-footer::${P.id}`,
|
|
@@ -6274,7 +6259,7 @@ const xl = (e) => {
|
|
|
6274
6259
|
)
|
|
6275
6260
|
] }, P.id)), Y = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6276
6261
|
/* @__PURE__ */ f(
|
|
6277
|
-
|
|
6262
|
+
kl,
|
|
6278
6263
|
{
|
|
6279
6264
|
layer: P,
|
|
6280
6265
|
showPreviewImages: n,
|
|
@@ -6351,10 +6336,10 @@ const xl = (e) => {
|
|
|
6351
6336
|
),
|
|
6352
6337
|
/* @__PURE__ */ j("div", { style: { flex: 1, overflow: "auto", minHeight: 0 }, children: [
|
|
6353
6338
|
p.length > 0 ? r ? /* @__PURE__ */ j(
|
|
6354
|
-
|
|
6339
|
+
qa,
|
|
6355
6340
|
{
|
|
6356
6341
|
sensors: _.sensors,
|
|
6357
|
-
collisionDetection:
|
|
6342
|
+
collisionDetection: vl,
|
|
6358
6343
|
onDragStart: _.onDragStart,
|
|
6359
6344
|
onDragMove: _.onDragMove,
|
|
6360
6345
|
onDragOver: _.onDragOver,
|
|
@@ -6362,8 +6347,8 @@ const xl = (e) => {
|
|
|
6362
6347
|
onDragCancel: _.onDragCancel,
|
|
6363
6348
|
children: [
|
|
6364
6349
|
J(p),
|
|
6365
|
-
/* @__PURE__ */ f(
|
|
6366
|
-
|
|
6350
|
+
/* @__PURE__ */ f(fl, { dropAnimation: null, children: te ? /* @__PURE__ */ f(
|
|
6351
|
+
wl,
|
|
6367
6352
|
{
|
|
6368
6353
|
layer: te,
|
|
6369
6354
|
showPreviewImages: n,
|
|
@@ -6400,7 +6385,7 @@ const xl = (e) => {
|
|
|
6400
6385
|
]
|
|
6401
6386
|
}
|
|
6402
6387
|
);
|
|
6403
|
-
},
|
|
6388
|
+
}, kl = ({ layer: e, showPreviewImages: t, previewDisplaySize: n, onSelect: r, onToggleVisibility: o, onToggleLock: i, onDuplicate: s, onDelete: a, deleteSuppressed: l }) => {
|
|
6404
6389
|
const c = e.depth > 0, u = c ? e.depth * 24 : 0, d = e.isSelected ? { outline: "3px solid var(--primary, var(--accent-primary, #007AFF))", outlineOffset: "2px" } : {}, h = {
|
|
6405
6390
|
paddingLeft: u + 8,
|
|
6406
6391
|
paddingRight: 8,
|
|
@@ -6485,7 +6470,7 @@ const xl = (e) => {
|
|
|
6485
6470
|
] })
|
|
6486
6471
|
] }, e.id);
|
|
6487
6472
|
};
|
|
6488
|
-
class
|
|
6473
|
+
class fc {
|
|
6489
6474
|
constructor() {
|
|
6490
6475
|
this.canvasIds = /* @__PURE__ */ new Set(), this.requirements = /* @__PURE__ */ new Map(), this.textFields = /* @__PURE__ */ new Map(), this.controls = /* @__PURE__ */ new Map(), this.parts = /* @__PURE__ */ new Map(), this.bridge = null, this.listeners = /* @__PURE__ */ new Set(), this.version = 0, this.getVersion = () => this.version, this.subscribe = (t) => (this.listeners.add(t), () => this.listeners.delete(t));
|
|
6491
6476
|
}
|
|
@@ -6586,9 +6571,9 @@ class mc {
|
|
|
6586
6571
|
for (const t of [...this.listeners]) t();
|
|
6587
6572
|
}
|
|
6588
6573
|
}
|
|
6589
|
-
const
|
|
6574
|
+
const Ho = Je(null);
|
|
6590
6575
|
function or(e) {
|
|
6591
|
-
const t = Be(
|
|
6576
|
+
const t = Be(Ho);
|
|
6592
6577
|
if (!t)
|
|
6593
6578
|
throw new rt(
|
|
6594
6579
|
"E_OUTSIDE_ROOT",
|
|
@@ -6599,36 +6584,36 @@ function or(e) {
|
|
|
6599
6584
|
}
|
|
6600
6585
|
function ir(e) {
|
|
6601
6586
|
const t = or(e), n = Pr();
|
|
6602
|
-
|
|
6587
|
+
$n(
|
|
6603
6588
|
() => t.registry.requireCanvas(n, e),
|
|
6604
6589
|
[t.registry, n, e]
|
|
6605
6590
|
);
|
|
6606
6591
|
}
|
|
6607
6592
|
function rn(e, t) {
|
|
6608
|
-
const n = Be(
|
|
6593
|
+
const n = Be(Ho), r = (n == null ? void 0 : n.registry) ?? null, o = Pr(), i = t == null ? void 0 : t.mockupId, s = t == null ? void 0 : t.floatingToolbar, a = X(
|
|
6609
6594
|
() => ({
|
|
6610
6595
|
...i !== void 0 ? { mockupId: i } : {},
|
|
6611
6596
|
...s !== void 0 ? { floatingToolbar: s } : {}
|
|
6612
6597
|
}),
|
|
6613
6598
|
[i, s]
|
|
6614
6599
|
);
|
|
6615
|
-
|
|
6600
|
+
$n(() => {
|
|
6616
6601
|
if (r)
|
|
6617
6602
|
return r.registerPart(o, e, a);
|
|
6618
6603
|
}, [r, o, e, a]);
|
|
6619
6604
|
}
|
|
6620
|
-
function
|
|
6605
|
+
function hc(e) {
|
|
6621
6606
|
return {
|
|
6622
6607
|
reportInvariant(t) {
|
|
6623
|
-
if (
|
|
6608
|
+
if (ii()) throw t;
|
|
6624
6609
|
e(t);
|
|
6625
6610
|
},
|
|
6626
6611
|
reportRuntimeError(t) {
|
|
6627
|
-
|
|
6612
|
+
ni(t), e(t);
|
|
6628
6613
|
}
|
|
6629
6614
|
};
|
|
6630
6615
|
}
|
|
6631
|
-
function
|
|
6616
|
+
function Cl(e) {
|
|
6632
6617
|
const { elements: t } = e.getState();
|
|
6633
6618
|
return t.map((n, r) => {
|
|
6634
6619
|
const o = n, i = o.transformType ?? "custom", s = o.name ?? i.charAt(0).toUpperCase() + i.slice(1);
|
|
@@ -6640,23 +6625,23 @@ function Ml(e) {
|
|
|
6640
6625
|
};
|
|
6641
6626
|
});
|
|
6642
6627
|
}
|
|
6643
|
-
function
|
|
6628
|
+
function Sl(e) {
|
|
6644
6629
|
const t = V(null), n = () => {
|
|
6645
6630
|
var i;
|
|
6646
|
-
const r =
|
|
6631
|
+
const r = Cl(e), o = r.map((s) => `${s.key}|${s.kind}|${s.visible}`).join(`
|
|
6647
6632
|
`);
|
|
6648
6633
|
return ((i = t.current) == null ? void 0 : i.key) !== o && (t.current = { key: o, rows: r }), t.current.rows;
|
|
6649
6634
|
};
|
|
6650
6635
|
return $r(e.subscribe, n, n);
|
|
6651
6636
|
}
|
|
6652
|
-
function
|
|
6637
|
+
function El(e) {
|
|
6653
6638
|
return e === "image" ? G.image : e === "shape" ? G.shapes : e === "group" ? "lucide:folder-open" : G.text;
|
|
6654
6639
|
}
|
|
6655
|
-
function
|
|
6640
|
+
function Al({
|
|
6656
6641
|
store: e,
|
|
6657
6642
|
direction: t
|
|
6658
6643
|
}) {
|
|
6659
|
-
const r = [...
|
|
6644
|
+
const r = [...Sl(e)].reverse();
|
|
6660
6645
|
return /* @__PURE__ */ f(
|
|
6661
6646
|
"div",
|
|
6662
6647
|
{
|
|
@@ -6680,7 +6665,7 @@ function Tl({
|
|
|
6680
6665
|
opacity: o.visible ? 1 : 0.4
|
|
6681
6666
|
},
|
|
6682
6667
|
children: [
|
|
6683
|
-
/* @__PURE__ */ f($, { icon:
|
|
6668
|
+
/* @__PURE__ */ f($, { icon: El(o.kind), style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 } }),
|
|
6684
6669
|
/* @__PURE__ */ f(
|
|
6685
6670
|
"span",
|
|
6686
6671
|
{
|
|
@@ -6701,7 +6686,7 @@ function Tl({
|
|
|
6701
6686
|
}
|
|
6702
6687
|
);
|
|
6703
6688
|
}
|
|
6704
|
-
function
|
|
6689
|
+
function gc({
|
|
6705
6690
|
direction: e = "vertical",
|
|
6706
6691
|
className: t,
|
|
6707
6692
|
style: n
|
|
@@ -6713,9 +6698,9 @@ function yc({
|
|
|
6713
6698
|
() => o.hasCanvas(),
|
|
6714
6699
|
() => o.hasCanvas()
|
|
6715
6700
|
);
|
|
6716
|
-
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(
|
|
6701
|
+
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(xl, { style: { width: "100%" } }) : /* @__PURE__ */ f(Al, { store: r.store, direction: e }) });
|
|
6717
6702
|
}
|
|
6718
|
-
const
|
|
6703
|
+
const Bo = ({
|
|
6719
6704
|
trigger: e,
|
|
6720
6705
|
children: t,
|
|
6721
6706
|
isOpen: n,
|
|
@@ -6728,7 +6713,7 @@ const Uo = ({
|
|
|
6728
6713
|
contentClassName: c = ""
|
|
6729
6714
|
}) => {
|
|
6730
6715
|
const u = V(null), d = V(null), h = V(null), [p, k] = B({}), [y, g] = B(!1), m = (M) => {
|
|
6731
|
-
M.stopPropagation(), !n && a &&
|
|
6716
|
+
M.stopPropagation(), !n && a && wi.protectNextClick(), r(!n);
|
|
6732
6717
|
};
|
|
6733
6718
|
q(() => {
|
|
6734
6719
|
if (!n) return;
|
|
@@ -6800,12 +6785,12 @@ const Uo = ({
|
|
|
6800
6785
|
);
|
|
6801
6786
|
return /* @__PURE__ */ j("div", { className: `sc:relative sc:inline-flex ${l}`.trim(), ref: u, children: [
|
|
6802
6787
|
/* @__PURE__ */ f("div", { ref: d, onClick: m, children: e }),
|
|
6803
|
-
S &&
|
|
6788
|
+
S && Hn(
|
|
6804
6789
|
/* @__PURE__ */ f("div", { className: "sc-root", style: { display: "contents" }, children: S }),
|
|
6805
6790
|
document.body
|
|
6806
6791
|
)
|
|
6807
6792
|
] });
|
|
6808
|
-
},
|
|
6793
|
+
}, Fn = ({ children: e, className: t = "", minWidth: n = "160px", maxHeight: r }) => {
|
|
6809
6794
|
const o = r ? `max-h-[${r}]` : "", i = { minWidth: n };
|
|
6810
6795
|
return /* @__PURE__ */ f(
|
|
6811
6796
|
"div",
|
|
@@ -6816,7 +6801,7 @@ const Uo = ({
|
|
|
6816
6801
|
children: e
|
|
6817
6802
|
}
|
|
6818
6803
|
);
|
|
6819
|
-
},
|
|
6804
|
+
}, Vo = [
|
|
6820
6805
|
{ type: "custom", label: "Text", icon: /* @__PURE__ */ f($, { icon: G.text, className: "sc:size-[18px]" }) },
|
|
6821
6806
|
{ type: "image", label: "Image", icon: /* @__PURE__ */ f($, { icon: G.image, className: "sc:size-[18px]" }) },
|
|
6822
6807
|
{ type: "shape", label: "Shape", icon: /* @__PURE__ */ f($, { icon: G.shapes, className: "sc:size-[18px]" }) },
|
|
@@ -6824,7 +6809,7 @@ const Uo = ({
|
|
|
6824
6809
|
{ type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f($, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
|
|
6825
6810
|
{ type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f($, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
|
|
6826
6811
|
];
|
|
6827
|
-
function
|
|
6812
|
+
function Ml() {
|
|
6828
6813
|
const [e, t] = ne.useState(!1);
|
|
6829
6814
|
return ne.useEffect(() => {
|
|
6830
6815
|
if (typeof document > "u") return;
|
|
@@ -6837,7 +6822,7 @@ function Il() {
|
|
|
6837
6822
|
}), () => r.disconnect();
|
|
6838
6823
|
}, []), e;
|
|
6839
6824
|
}
|
|
6840
|
-
const
|
|
6825
|
+
const Dl = ({
|
|
6841
6826
|
isOpen: e,
|
|
6842
6827
|
onClose: t,
|
|
6843
6828
|
title: n,
|
|
@@ -6856,14 +6841,14 @@ const Rl = ({
|
|
|
6856
6841
|
disableOverflowHidden: y = !1,
|
|
6857
6842
|
"data-testid": g
|
|
6858
6843
|
}) => {
|
|
6859
|
-
const m = i === "bottom" ? s || a : void 0, M =
|
|
6844
|
+
const m = i === "bottom" ? s || a : void 0, M = Ml() ? 0.65 : 0.4;
|
|
6860
6845
|
return /* @__PURE__ */ f(
|
|
6861
|
-
|
|
6846
|
+
go,
|
|
6862
6847
|
{
|
|
6863
6848
|
open: e,
|
|
6864
6849
|
onOpenChange: (L) => !L && t(),
|
|
6865
6850
|
children: /* @__PURE__ */ j(
|
|
6866
|
-
|
|
6851
|
+
po,
|
|
6867
6852
|
{
|
|
6868
6853
|
placement: i,
|
|
6869
6854
|
width: l,
|
|
@@ -6881,8 +6866,8 @@ const Rl = ({
|
|
|
6881
6866
|
"data-testid": g,
|
|
6882
6867
|
"data-preserve-selection": !0,
|
|
6883
6868
|
children: [
|
|
6884
|
-
/* @__PURE__ */ f(
|
|
6885
|
-
r && /* @__PURE__ */ f(
|
|
6869
|
+
/* @__PURE__ */ f(mo, { className: "sc:sr-only", children: n }),
|
|
6870
|
+
r && /* @__PURE__ */ f(vo, { className: "sc:sr-only", children: r }),
|
|
6886
6871
|
k ? (
|
|
6887
6872
|
// Custom scroll control - children manage their own scrolling
|
|
6888
6873
|
/* @__PURE__ */ j("div", { className: "sc:flex sc:flex-col sc:flex-1 sc:min-h-0", children: [
|
|
@@ -6933,7 +6918,7 @@ const Rl = ({
|
|
|
6933
6918
|
)
|
|
6934
6919
|
}
|
|
6935
6920
|
);
|
|
6936
|
-
},
|
|
6921
|
+
}, Ll = ({ className: e }) => /* @__PURE__ */ f(
|
|
6937
6922
|
"svg",
|
|
6938
6923
|
{
|
|
6939
6924
|
className: e,
|
|
@@ -6946,7 +6931,7 @@ const Rl = ({
|
|
|
6946
6931
|
"aria-hidden": !0,
|
|
6947
6932
|
children: /* @__PURE__ */ f("path", { d: "M12 2L21 8L18 19L6 19L3 8L12 2Z" })
|
|
6948
6933
|
}
|
|
6949
|
-
),
|
|
6934
|
+
), Tl = ({ className: e }) => /* @__PURE__ */ f(
|
|
6950
6935
|
"svg",
|
|
6951
6936
|
{
|
|
6952
6937
|
className: e,
|
|
@@ -6957,15 +6942,15 @@ const Rl = ({
|
|
|
6957
6942
|
"aria-hidden": !0,
|
|
6958
6943
|
children: /* @__PURE__ */ f("ellipse", { cx: "12", cy: "12", rx: "9", ry: "6" })
|
|
6959
6944
|
}
|
|
6960
|
-
),
|
|
6945
|
+
), jn = "sc:size-10", Il = [
|
|
6961
6946
|
{ id: "rectangle", label: "Rectangle", icon: "lucide:square" },
|
|
6962
6947
|
{ id: "circle", label: "Circle", icon: "lucide:circle" },
|
|
6963
|
-
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(
|
|
6948
|
+
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(Tl, { className: jn }) },
|
|
6964
6949
|
{ id: "triangle", label: "Triangle", icon: "lucide:triangle" },
|
|
6965
|
-
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(
|
|
6950
|
+
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(Ll, { className: jn }) },
|
|
6966
6951
|
{ id: "star", label: "Star", icon: "lucide:star" },
|
|
6967
6952
|
{ id: "line", label: "Line", icon: "lucide:minus" }
|
|
6968
|
-
],
|
|
6953
|
+
], Uo = ({
|
|
6969
6954
|
isOpen: e,
|
|
6970
6955
|
onClose: t,
|
|
6971
6956
|
onSelectType: n,
|
|
@@ -6975,7 +6960,7 @@ const Rl = ({
|
|
|
6975
6960
|
n(a), t();
|
|
6976
6961
|
};
|
|
6977
6962
|
return /* @__PURE__ */ j(
|
|
6978
|
-
|
|
6963
|
+
Dl,
|
|
6979
6964
|
{
|
|
6980
6965
|
isOpen: e,
|
|
6981
6966
|
onClose: t,
|
|
@@ -7004,7 +6989,7 @@ const Rl = ({
|
|
|
7004
6989
|
{
|
|
7005
6990
|
className: "sc:grid sc:grid-cols-3 sc:gap-2 sc:p-4",
|
|
7006
6991
|
"data-testid": "shape-type-list",
|
|
7007
|
-
children:
|
|
6992
|
+
children: Il.map((a) => {
|
|
7008
6993
|
const l = a.id === r;
|
|
7009
6994
|
return /* @__PURE__ */ j(
|
|
7010
6995
|
"button",
|
|
@@ -7019,7 +7004,7 @@ const Rl = ({
|
|
|
7019
7004
|
"span",
|
|
7020
7005
|
{
|
|
7021
7006
|
className: l ? "sc:text-primary" : "sc:text-foreground/85",
|
|
7022
|
-
children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f($, { icon: a.icon, className:
|
|
7007
|
+
children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f($, { icon: a.icon, className: jn })
|
|
7023
7008
|
}
|
|
7024
7009
|
),
|
|
7025
7010
|
/* @__PURE__ */ f(
|
|
@@ -7039,7 +7024,7 @@ const Rl = ({
|
|
|
7039
7024
|
]
|
|
7040
7025
|
}
|
|
7041
7026
|
);
|
|
7042
|
-
},
|
|
7027
|
+
}, bn = Qe("MenuButton"), Rl = ({
|
|
7043
7028
|
isLayersPanelOpen: e = !1,
|
|
7044
7029
|
onToggleLayersPanel: t,
|
|
7045
7030
|
onOpenImageBrowser: n,
|
|
@@ -7054,7 +7039,7 @@ const Rl = ({
|
|
|
7054
7039
|
const { ExportManager: v } = await import("./ExportManager-DEJgxB0S.js").then((T) => T._), { artboardManager: D, elements: w } = a(), A = D.getAllArtboards();
|
|
7055
7040
|
v.exportToJSON(A, w, D), c(!1);
|
|
7056
7041
|
} catch (v) {
|
|
7057
|
-
|
|
7042
|
+
bn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
|
|
7058
7043
|
}
|
|
7059
7044
|
}, g = () => {
|
|
7060
7045
|
var v;
|
|
@@ -7089,7 +7074,7 @@ This will replace your current workspace. Continue?`
|
|
|
7089
7074
|
} else
|
|
7090
7075
|
alert(`Failed to load: ${A.error || "Unknown error"}`);
|
|
7091
7076
|
} catch (A) {
|
|
7092
|
-
|
|
7077
|
+
bn.error("Failed to load workspace:", A), alert("Failed to load workspace. Please check the file and try again.");
|
|
7093
7078
|
}
|
|
7094
7079
|
k.current && (k.current.value = "");
|
|
7095
7080
|
}
|
|
@@ -7112,7 +7097,7 @@ This will replace your current workspace. Continue?`
|
|
|
7112
7097
|
transparentBackground: !1
|
|
7113
7098
|
}), c(!1);
|
|
7114
7099
|
} catch (T) {
|
|
7115
|
-
|
|
7100
|
+
bn.error("Failed to export artboard:", T), alert("Failed to export artboard. Please try again.");
|
|
7116
7101
|
}
|
|
7117
7102
|
}, M = async (v) => {
|
|
7118
7103
|
if (v === "image" && n) {
|
|
@@ -7126,10 +7111,10 @@ This will replace your current workspace. Continue?`
|
|
|
7126
7111
|
await a().handleAddElement(v), c(!1), d(!1);
|
|
7127
7112
|
}, L = async (v) => {
|
|
7128
7113
|
p(!1), await a().handleAddElement("shape", { shapeType: v });
|
|
7129
|
-
}, I =
|
|
7114
|
+
}, I = Vo, b = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
|
|
7130
7115
|
return /* @__PURE__ */ j(an, { children: [
|
|
7131
7116
|
/* @__PURE__ */ f(
|
|
7132
|
-
|
|
7117
|
+
Bo,
|
|
7133
7118
|
{
|
|
7134
7119
|
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7135
7120
|
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(
|
|
@@ -7148,7 +7133,7 @@ This will replace your current workspace. Continue?`
|
|
|
7148
7133
|
onToggle: c,
|
|
7149
7134
|
position: "bottom",
|
|
7150
7135
|
align: "end",
|
|
7151
|
-
children: /* @__PURE__ */ j(
|
|
7136
|
+
children: /* @__PURE__ */ j(Fn, { minWidth: "200px", children: [
|
|
7152
7137
|
/* @__PURE__ */ j(
|
|
7153
7138
|
"div",
|
|
7154
7139
|
{
|
|
@@ -7166,7 +7151,7 @@ This will replace your current workspace. Continue?`
|
|
|
7166
7151
|
top: 0,
|
|
7167
7152
|
zIndex: "var(--sc-z-sticky)"
|
|
7168
7153
|
},
|
|
7169
|
-
children: /* @__PURE__ */ f(
|
|
7154
|
+
children: /* @__PURE__ */ f(Fn, { minWidth: "180px", children: I.map((v) => /* @__PURE__ */ f(
|
|
7170
7155
|
Xe,
|
|
7171
7156
|
{
|
|
7172
7157
|
icon: v.icon,
|
|
@@ -7223,7 +7208,7 @@ This will replace your current workspace. Continue?`
|
|
|
7223
7208
|
}
|
|
7224
7209
|
),
|
|
7225
7210
|
/* @__PURE__ */ f(
|
|
7226
|
-
|
|
7211
|
+
Uo,
|
|
7227
7212
|
{
|
|
7228
7213
|
isOpen: h,
|
|
7229
7214
|
onClose: () => p(!1),
|
|
@@ -7232,7 +7217,7 @@ This will replace your current workspace. Continue?`
|
|
|
7232
7217
|
)
|
|
7233
7218
|
] });
|
|
7234
7219
|
};
|
|
7235
|
-
function
|
|
7220
|
+
function Go({
|
|
7236
7221
|
part: e,
|
|
7237
7222
|
isOpen: t,
|
|
7238
7223
|
onOpenChange: n
|
|
@@ -7241,7 +7226,7 @@ function Wo({
|
|
|
7241
7226
|
return q(() => {
|
|
7242
7227
|
if (!t || o) return;
|
|
7243
7228
|
let s = !1;
|
|
7244
|
-
return import("./ImagePanel-
|
|
7229
|
+
return import("./ImagePanel-BaEJnUvS.js").then(
|
|
7245
7230
|
(a) => {
|
|
7246
7231
|
s || i(() => a.ImagePanel);
|
|
7247
7232
|
},
|
|
@@ -7259,13 +7244,13 @@ function Wo({
|
|
|
7259
7244
|
};
|
|
7260
7245
|
}, [t, o, r]), o ? /* @__PURE__ */ f(o, { isOpen: t, onOpenChange: n }) : null;
|
|
7261
7246
|
}
|
|
7262
|
-
function
|
|
7247
|
+
function pc({ className: e, style: t }) {
|
|
7263
7248
|
ir("Editor.Menu"), rn("Editor.Menu");
|
|
7264
7249
|
const [n, r] = B(!1);
|
|
7265
7250
|
return /* @__PURE__ */ j("div", { "data-sc-part": "menu", className: e, style: t, children: [
|
|
7266
|
-
/* @__PURE__ */ f(
|
|
7251
|
+
/* @__PURE__ */ f(Rl, { onOpenImageBrowser: () => r(!0) }),
|
|
7267
7252
|
/* @__PURE__ */ f(
|
|
7268
|
-
|
|
7253
|
+
Go,
|
|
7269
7254
|
{
|
|
7270
7255
|
part: "Editor.Menu",
|
|
7271
7256
|
isOpen: n,
|
|
@@ -7274,11 +7259,11 @@ function bc({ className: e, style: t }) {
|
|
|
7274
7259
|
)
|
|
7275
7260
|
] });
|
|
7276
7261
|
}
|
|
7277
|
-
const
|
|
7278
|
-
const { undo: e, redo: t, canUndo: n, canRedo: r } =
|
|
7262
|
+
const Nl = () => {
|
|
7263
|
+
const { undo: e, redo: t, canUndo: n, canRedo: r } = ri();
|
|
7279
7264
|
return /* @__PURE__ */ j("div", { className: "sc-undo-redo", style: { display: "inline-flex", gap: 4 }, children: [
|
|
7280
7265
|
/* @__PURE__ */ f(
|
|
7281
|
-
|
|
7266
|
+
In,
|
|
7282
7267
|
{
|
|
7283
7268
|
icon: G.undo,
|
|
7284
7269
|
onClick: e,
|
|
@@ -7288,7 +7273,7 @@ const jl = () => {
|
|
|
7288
7273
|
}
|
|
7289
7274
|
),
|
|
7290
7275
|
/* @__PURE__ */ f(
|
|
7291
|
-
|
|
7276
|
+
In,
|
|
7292
7277
|
{
|
|
7293
7278
|
icon: G.redo,
|
|
7294
7279
|
onClick: t,
|
|
@@ -7299,10 +7284,10 @@ const jl = () => {
|
|
|
7299
7284
|
)
|
|
7300
7285
|
] });
|
|
7301
7286
|
};
|
|
7302
|
-
function
|
|
7303
|
-
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(
|
|
7287
|
+
function mc({ className: e, style: t }) {
|
|
7288
|
+
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(Nl, {}) });
|
|
7304
7289
|
}
|
|
7305
|
-
function
|
|
7290
|
+
function vc({ className: e, style: t }) {
|
|
7306
7291
|
ir("Editor.Add"), rn("Editor.Add");
|
|
7307
7292
|
const { get: n } = Hr(), [r, o] = B(!1), [i, s] = B(!1), [a, l] = B(!1), c = async (d) => {
|
|
7308
7293
|
if (o(!1), d === "shape") {
|
|
@@ -7319,7 +7304,7 @@ function xc({ className: e, style: t }) {
|
|
|
7319
7304
|
};
|
|
7320
7305
|
return /* @__PURE__ */ j("div", { "data-sc-part": "add", className: e, style: t, children: [
|
|
7321
7306
|
/* @__PURE__ */ f(
|
|
7322
|
-
|
|
7307
|
+
Bo,
|
|
7323
7308
|
{
|
|
7324
7309
|
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7325
7310
|
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(st, { variant: "ghost", size: "icon", "aria-label": "Add element", children: /* @__PURE__ */ f($, { icon: G.plus, className: "sc:size-6" }) }) }),
|
|
@@ -7329,7 +7314,7 @@ function xc({ className: e, style: t }) {
|
|
|
7329
7314
|
onToggle: o,
|
|
7330
7315
|
position: "bottom",
|
|
7331
7316
|
align: "start",
|
|
7332
|
-
children: /* @__PURE__ */ f(
|
|
7317
|
+
children: /* @__PURE__ */ f(Fn, { minWidth: "180px", children: Vo.map((d) => /* @__PURE__ */ f(
|
|
7333
7318
|
Xe,
|
|
7334
7319
|
{
|
|
7335
7320
|
icon: d.icon,
|
|
@@ -7341,7 +7326,7 @@ function xc({ className: e, style: t }) {
|
|
|
7341
7326
|
}
|
|
7342
7327
|
),
|
|
7343
7328
|
/* @__PURE__ */ f(
|
|
7344
|
-
|
|
7329
|
+
Uo,
|
|
7345
7330
|
{
|
|
7346
7331
|
isOpen: i,
|
|
7347
7332
|
onClose: () => s(!1),
|
|
@@ -7349,7 +7334,7 @@ function xc({ className: e, style: t }) {
|
|
|
7349
7334
|
}
|
|
7350
7335
|
),
|
|
7351
7336
|
/* @__PURE__ */ f(
|
|
7352
|
-
|
|
7337
|
+
Go,
|
|
7353
7338
|
{
|
|
7354
7339
|
part: "Editor.Add",
|
|
7355
7340
|
isOpen: a,
|
|
@@ -7358,8 +7343,8 @@ function xc({ className: e, style: t }) {
|
|
|
7358
7343
|
)
|
|
7359
7344
|
] });
|
|
7360
7345
|
}
|
|
7361
|
-
const
|
|
7362
|
-
function
|
|
7346
|
+
const zl = Qe("useExport");
|
|
7347
|
+
function yc() {
|
|
7363
7348
|
const {
|
|
7364
7349
|
artboards: e,
|
|
7365
7350
|
artboardManager: t,
|
|
@@ -7487,7 +7472,7 @@ function kc() {
|
|
|
7487
7472
|
xe[ie] = de;
|
|
7488
7473
|
d((ie) => ({ ...ie, ...xe })), W && W(xe);
|
|
7489
7474
|
} catch (te) {
|
|
7490
|
-
|
|
7475
|
+
zl.error("[useExport] Continuous export error:", te);
|
|
7491
7476
|
}
|
|
7492
7477
|
};
|
|
7493
7478
|
(async () => {
|
|
@@ -7512,7 +7497,7 @@ function kc() {
|
|
|
7512
7497
|
workerStats: h
|
|
7513
7498
|
};
|
|
7514
7499
|
}
|
|
7515
|
-
async function
|
|
7500
|
+
async function _o(e, t) {
|
|
7516
7501
|
try {
|
|
7517
7502
|
const n = await e.json();
|
|
7518
7503
|
if (n && typeof n == "object") {
|
|
@@ -7524,7 +7509,7 @@ async function qo(e, t) {
|
|
|
7524
7509
|
}
|
|
7525
7510
|
return t;
|
|
7526
7511
|
}
|
|
7527
|
-
function
|
|
7512
|
+
function Ol(e) {
|
|
7528
7513
|
return {
|
|
7529
7514
|
async search({ query: t, page: n, perPage: r = 30 }) {
|
|
7530
7515
|
const o = new URLSearchParams({
|
|
@@ -7536,7 +7521,7 @@ function $l(e) {
|
|
|
7536
7521
|
credentials: "same-origin"
|
|
7537
7522
|
});
|
|
7538
7523
|
if (!s.ok)
|
|
7539
|
-
throw new Error(await
|
|
7524
|
+
throw new Error(await _o(s, `Image search failed (${s.status})`));
|
|
7540
7525
|
return await s.json();
|
|
7541
7526
|
},
|
|
7542
7527
|
trackSelect(t) {
|
|
@@ -7555,7 +7540,7 @@ function $l(e) {
|
|
|
7555
7540
|
}
|
|
7556
7541
|
};
|
|
7557
7542
|
}
|
|
7558
|
-
function
|
|
7543
|
+
function Fl(e) {
|
|
7559
7544
|
return {
|
|
7560
7545
|
async generate({ prompt: t, width: n, height: r, numberResults: o }) {
|
|
7561
7546
|
const i = await fetch(e, {
|
|
@@ -7565,13 +7550,13 @@ function Hl(e) {
|
|
|
7565
7550
|
body: JSON.stringify({ prompt: t, width: n, height: r, numberResults: o })
|
|
7566
7551
|
});
|
|
7567
7552
|
if (!i.ok)
|
|
7568
|
-
throw new Error(await
|
|
7553
|
+
throw new Error(await _o(i, `Image generation failed (${i.status})`));
|
|
7569
7554
|
const s = await i.json();
|
|
7570
7555
|
return { images: s.images ?? (s.imageUrl ? [{ imageUrl: s.imageUrl }] : []) };
|
|
7571
7556
|
}
|
|
7572
7557
|
};
|
|
7573
7558
|
}
|
|
7574
|
-
function
|
|
7559
|
+
function jl(e) {
|
|
7575
7560
|
const t = "/api/image-proxy?url=";
|
|
7576
7561
|
if (!e || !e.startsWith(t)) return e;
|
|
7577
7562
|
try {
|
|
@@ -7580,9 +7565,9 @@ function Bl(e) {
|
|
|
7580
7565
|
return e;
|
|
7581
7566
|
}
|
|
7582
7567
|
}
|
|
7583
|
-
function
|
|
7568
|
+
function Pl(e) {
|
|
7584
7569
|
return async function(n) {
|
|
7585
|
-
const r =
|
|
7570
|
+
const r = jl(n);
|
|
7586
7571
|
if (!/^https?:\/\//.test(r))
|
|
7587
7572
|
throw new Error("Background removal isn't available for this image yet");
|
|
7588
7573
|
const o = await fetch(e, {
|
|
@@ -7596,7 +7581,7 @@ function Vl(e) {
|
|
|
7596
7581
|
return i.imageUrl;
|
|
7597
7582
|
};
|
|
7598
7583
|
}
|
|
7599
|
-
function
|
|
7584
|
+
function $l(e) {
|
|
7600
7585
|
return async function(n) {
|
|
7601
7586
|
if (!/^https?:\/\//.test(n)) return n;
|
|
7602
7587
|
const r = await fetch(e, {
|
|
@@ -7610,16 +7595,16 @@ function Ul(e) {
|
|
|
7610
7595
|
return o.imageUrl;
|
|
7611
7596
|
};
|
|
7612
7597
|
}
|
|
7613
|
-
const
|
|
7614
|
-
function
|
|
7598
|
+
const Wo = {}, qo = Je(Wo);
|
|
7599
|
+
function bc({ services: e, children: t }) {
|
|
7615
7600
|
const n = X(() => e ? {
|
|
7616
|
-
imageSearch: e.imageSearch ?? (e.imageSearchUrl ?
|
|
7617
|
-
generate: e.generate ?? (e.generateUrl ?
|
|
7601
|
+
imageSearch: e.imageSearch ?? (e.imageSearchUrl ? Ol(e.imageSearchUrl) : void 0),
|
|
7602
|
+
generate: e.generate ?? (e.generateUrl ? Fl(e.generateUrl) : void 0),
|
|
7618
7603
|
vectors: e.vectors,
|
|
7619
|
-
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ?
|
|
7620
|
-
ingestImage: e.ingestImage ?? (e.ingestImageUrl ?
|
|
7604
|
+
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Pl(e.bgRemoveUrl) : void 0),
|
|
7605
|
+
ingestImage: e.ingestImage ?? (e.ingestImageUrl ? $l(e.ingestImageUrl) : void 0),
|
|
7621
7606
|
onFontUpload: e.onFontUpload
|
|
7622
|
-
} :
|
|
7607
|
+
} : Wo, [
|
|
7623
7608
|
e == null ? void 0 : e.imageSearch,
|
|
7624
7609
|
e == null ? void 0 : e.imageSearchUrl,
|
|
7625
7610
|
e == null ? void 0 : e.generate,
|
|
@@ -7631,14 +7616,14 @@ function Cc({ services: e, children: t }) {
|
|
|
7631
7616
|
e == null ? void 0 : e.ingestImage,
|
|
7632
7617
|
e == null ? void 0 : e.onFontUpload
|
|
7633
7618
|
]);
|
|
7634
|
-
return /* @__PURE__ */ f(
|
|
7619
|
+
return /* @__PURE__ */ f(qo.Provider, { value: n, children: t });
|
|
7635
7620
|
}
|
|
7636
|
-
function
|
|
7637
|
-
return Be(
|
|
7621
|
+
function wc() {
|
|
7622
|
+
return Be(qo);
|
|
7638
7623
|
}
|
|
7639
7624
|
const Nr = Qe("GoogleFontsService");
|
|
7640
7625
|
let tt = [], pt = null;
|
|
7641
|
-
async function
|
|
7626
|
+
async function Hl() {
|
|
7642
7627
|
return tt.length > 0 ? tt : pt || (pt = fetch("/google-fonts.json").then((e) => {
|
|
7643
7628
|
if (!e.ok)
|
|
7644
7629
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
@@ -7651,10 +7636,10 @@ async function Gl() {
|
|
|
7651
7636
|
popularity: t.popularity
|
|
7652
7637
|
})) : Nr.error("Unexpected API response structure:", e), tt)).catch((e) => (Nr.error("Error fetching Google Fonts:", e), pt = null, [])), pt);
|
|
7653
7638
|
}
|
|
7654
|
-
function
|
|
7639
|
+
function wn() {
|
|
7655
7640
|
return tt;
|
|
7656
7641
|
}
|
|
7657
|
-
function
|
|
7642
|
+
function Bl() {
|
|
7658
7643
|
return tt.length > 0;
|
|
7659
7644
|
}
|
|
7660
7645
|
function zr(e) {
|
|
@@ -7667,7 +7652,7 @@ function zr(e) {
|
|
|
7667
7652
|
}[e.toLowerCase()] || "display";
|
|
7668
7653
|
}
|
|
7669
7654
|
const Or = Qe("UnifiedFontService");
|
|
7670
|
-
class
|
|
7655
|
+
class Vl {
|
|
7671
7656
|
constructor() {
|
|
7672
7657
|
this.searchCache = /* @__PURE__ */ new Map(), this.previewFontLinks = /* @__PURE__ */ new Set();
|
|
7673
7658
|
}
|
|
@@ -7679,7 +7664,7 @@ class Wl {
|
|
|
7679
7664
|
*/
|
|
7680
7665
|
async initialize() {
|
|
7681
7666
|
try {
|
|
7682
|
-
await
|
|
7667
|
+
await Hl();
|
|
7683
7668
|
} catch (t) {
|
|
7684
7669
|
Or.error("Failed to initialize UnifiedFontService:", t);
|
|
7685
7670
|
}
|
|
@@ -7688,7 +7673,7 @@ class Wl {
|
|
|
7688
7673
|
* Check if fonts are loaded
|
|
7689
7674
|
*/
|
|
7690
7675
|
isFontsLoaded() {
|
|
7691
|
-
return
|
|
7676
|
+
return Bl();
|
|
7692
7677
|
}
|
|
7693
7678
|
// ========================================
|
|
7694
7679
|
// Font Retrieval
|
|
@@ -7698,7 +7683,7 @@ class Wl {
|
|
|
7698
7683
|
* Returns system fonts + Google Fonts (deduplicated)
|
|
7699
7684
|
*/
|
|
7700
7685
|
getAllFonts() {
|
|
7701
|
-
const t = ln.filter((r) => !r.googleFont), n = this.mapGoogleFonts(
|
|
7686
|
+
const t = ln.filter((r) => !r.googleFont), n = this.mapGoogleFonts(wn());
|
|
7702
7687
|
return this.mergeFonts([...t, ...n]);
|
|
7703
7688
|
}
|
|
7704
7689
|
/**
|
|
@@ -7719,7 +7704,7 @@ class Wl {
|
|
|
7719
7704
|
const n = `search:${t.toLowerCase()}`;
|
|
7720
7705
|
if (this.searchCache.has(n))
|
|
7721
7706
|
return this.searchCache.get(n);
|
|
7722
|
-
const r = t.toLowerCase().trim(), o =
|
|
7707
|
+
const r = t.toLowerCase().trim(), o = wn().filter((s) => s.family.toLowerCase().includes(r)).map((s) => this.mapGoogleFont(s)), i = this.mergeFonts(o);
|
|
7723
7708
|
return this.searchCache.set(n, i), i;
|
|
7724
7709
|
}
|
|
7725
7710
|
/**
|
|
@@ -7731,7 +7716,7 @@ class Wl {
|
|
|
7731
7716
|
const n = `category:${t}`;
|
|
7732
7717
|
if (this.searchCache.has(n))
|
|
7733
7718
|
return this.searchCache.get(n);
|
|
7734
|
-
const r =
|
|
7719
|
+
const r = wn().filter((i) => zr(i.category) === t).map((i) => this.mapGoogleFont(i)), o = this.mergeFonts(r);
|
|
7735
7720
|
return this.searchCache.set(n, o), o;
|
|
7736
7721
|
}
|
|
7737
7722
|
/**
|
|
@@ -7872,36 +7857,36 @@ class Wl {
|
|
|
7872
7857
|
};
|
|
7873
7858
|
}
|
|
7874
7859
|
}
|
|
7875
|
-
const
|
|
7876
|
-
function
|
|
7877
|
-
return e instanceof
|
|
7860
|
+
const xc = new Vl();
|
|
7861
|
+
function Yo(e) {
|
|
7862
|
+
return e instanceof ci;
|
|
7878
7863
|
}
|
|
7879
|
-
function
|
|
7880
|
-
return e instanceof
|
|
7864
|
+
function Ul(e) {
|
|
7865
|
+
return e instanceof si;
|
|
7881
7866
|
}
|
|
7882
|
-
function
|
|
7883
|
-
return e instanceof
|
|
7867
|
+
function Gl(e) {
|
|
7868
|
+
return e instanceof li;
|
|
7884
7869
|
}
|
|
7885
|
-
function
|
|
7870
|
+
function _l(e) {
|
|
7886
7871
|
return e instanceof Ie;
|
|
7887
7872
|
}
|
|
7888
|
-
function
|
|
7889
|
-
return e instanceof
|
|
7873
|
+
function Wl(e) {
|
|
7874
|
+
return e instanceof ai;
|
|
7890
7875
|
}
|
|
7891
|
-
function
|
|
7892
|
-
return
|
|
7876
|
+
function ql(e) {
|
|
7877
|
+
return Yo(e) ? "text" : Ul(e) ? "image" : Gl(e) ? "shape" : _l(e) ? "group" : Wl(e) ? "path" : null;
|
|
7893
7878
|
}
|
|
7894
|
-
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"],
|
|
7895
|
-
text: [...mt, ...
|
|
7896
|
-
shape: [...mt, ...
|
|
7897
|
-
image: [...mt, ...
|
|
7879
|
+
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Yl = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Kl = ["fillColor", "fill", "width", "height"], Xl = ["imageUrl", "width", "height", "adjustments"], Jl = {
|
|
7880
|
+
text: [...mt, ...Yl],
|
|
7881
|
+
shape: [...mt, ...Kl],
|
|
7882
|
+
image: [...mt, ...Xl],
|
|
7898
7883
|
group: [...mt],
|
|
7899
7884
|
path: [...mt]
|
|
7900
|
-
},
|
|
7885
|
+
}, xn = ["left", "center", "right"], jt = ["brightness", "contrast", "saturation"], kn = 3;
|
|
7901
7886
|
function He(e, t) {
|
|
7902
7887
|
return new rt("E_INVALID_PATCH", e, { ...t, docSlug: "embed-mode" });
|
|
7903
7888
|
}
|
|
7904
|
-
function
|
|
7889
|
+
function Cn(e, t, n) {
|
|
7905
7890
|
if (typeof t != "number" || !Number.isFinite(t))
|
|
7906
7891
|
throw He(
|
|
7907
7892
|
`patch key "${e}" must be a finite number, got ${JSON.stringify(t)} (element kind: ${n}).`,
|
|
@@ -7915,8 +7900,8 @@ function Fr(e, t, n, r) {
|
|
|
7915
7900
|
{ key: e, kind: r, value: t }
|
|
7916
7901
|
);
|
|
7917
7902
|
}
|
|
7918
|
-
function
|
|
7919
|
-
const n =
|
|
7903
|
+
function Ql(e, t) {
|
|
7904
|
+
const n = oi(t), r = n ? t.name : t;
|
|
7920
7905
|
if (!n) {
|
|
7921
7906
|
const a = e.get(r);
|
|
7922
7907
|
if (a) return a;
|
|
@@ -7930,11 +7915,11 @@ function nc(e, t) {
|
|
|
7930
7915
|
{ layerName: r, validNames: s, validIds: i.map((a) => a.id), docSlug: "embed-mode" }
|
|
7931
7916
|
);
|
|
7932
7917
|
}
|
|
7933
|
-
function
|
|
7934
|
-
const n =
|
|
7918
|
+
function Zl(e, t) {
|
|
7919
|
+
const n = ql(e);
|
|
7935
7920
|
if (!n)
|
|
7936
7921
|
throw He("target is not a patchable editor element.", { kind: null });
|
|
7937
|
-
const r =
|
|
7922
|
+
const r = Jl[n];
|
|
7938
7923
|
for (const [o, i] of Object.entries(t))
|
|
7939
7924
|
if (i !== void 0) {
|
|
7940
7925
|
if (!r.includes(o))
|
|
@@ -7946,10 +7931,10 @@ function rc(e, t) {
|
|
|
7946
7931
|
case "x":
|
|
7947
7932
|
case "y":
|
|
7948
7933
|
case "rotation":
|
|
7949
|
-
|
|
7934
|
+
Cn(o, i, n);
|
|
7950
7935
|
break;
|
|
7951
7936
|
case "opacity":
|
|
7952
|
-
if (
|
|
7937
|
+
if (Cn(o, i, n), i < 0 || i > 1)
|
|
7953
7938
|
throw He(`opacity must be between 0 and 1, got ${i} (element kind: ${n}).`, {
|
|
7954
7939
|
key: o,
|
|
7955
7940
|
kind: n,
|
|
@@ -7959,7 +7944,7 @@ function rc(e, t) {
|
|
|
7959
7944
|
case "fontSize":
|
|
7960
7945
|
case "width":
|
|
7961
7946
|
case "height":
|
|
7962
|
-
if (
|
|
7947
|
+
if (Cn(o, i, n), i <= 0)
|
|
7963
7948
|
throw He(`${o} must be > 0, got ${i} (element kind: ${n}).`, { key: o, kind: n, value: i });
|
|
7964
7949
|
break;
|
|
7965
7950
|
case "name":
|
|
@@ -7977,26 +7962,26 @@ function rc(e, t) {
|
|
|
7977
7962
|
Fr(o, i, "boolean", n);
|
|
7978
7963
|
break;
|
|
7979
7964
|
case "fill":
|
|
7980
|
-
|
|
7965
|
+
di(i);
|
|
7981
7966
|
break;
|
|
7982
7967
|
case "textAlign":
|
|
7983
|
-
if (typeof i != "string" || !
|
|
7968
|
+
if (typeof i != "string" || !xn.includes(i))
|
|
7984
7969
|
throw He(
|
|
7985
|
-
`textAlign must be one of ${JSON.stringify(
|
|
7986
|
-
{ key: o, kind: n, value: i, validKeys:
|
|
7970
|
+
`textAlign must be one of ${JSON.stringify(xn)}, got ${JSON.stringify(i)}.`,
|
|
7971
|
+
{ key: o, kind: n, value: i, validKeys: xn }
|
|
7987
7972
|
);
|
|
7988
7973
|
break;
|
|
7989
7974
|
case "adjustments": {
|
|
7990
7975
|
if (typeof i != "object" || i === null || Array.isArray(i))
|
|
7991
7976
|
throw He(
|
|
7992
|
-
`adjustments must be an object { brightness, contrast, saturation } (each 0..${
|
|
7977
|
+
`adjustments must be an object { brightness, contrast, saturation } (each 0..${kn}, 1 = neutral), got ${JSON.stringify(i)} (element kind: ${n}).`,
|
|
7993
7978
|
{ key: o, kind: n, value: i }
|
|
7994
7979
|
);
|
|
7995
7980
|
for (const a of jt) {
|
|
7996
7981
|
const l = i[a];
|
|
7997
|
-
if (typeof l != "number" || !Number.isFinite(l) || l < 0 || l >
|
|
7982
|
+
if (typeof l != "number" || !Number.isFinite(l) || l < 0 || l > kn)
|
|
7998
7983
|
throw He(
|
|
7999
|
-
`adjustments.${a} must be a finite number between 0 and ${
|
|
7984
|
+
`adjustments.${a} must be a finite number between 0 and ${kn} (1 = neutral), got ${JSON.stringify(l)} (element kind: ${n}).`,
|
|
8000
7985
|
{ key: `adjustments.${a}`, kind: n, value: l }
|
|
8001
7986
|
);
|
|
8002
7987
|
}
|
|
@@ -8012,17 +7997,17 @@ function rc(e, t) {
|
|
|
8012
7997
|
}
|
|
8013
7998
|
return n;
|
|
8014
7999
|
}
|
|
8015
|
-
function
|
|
8000
|
+
function ec(e, t) {
|
|
8016
8001
|
let n = !1;
|
|
8017
|
-
if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked),
|
|
8018
|
-
return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (
|
|
8002
|
+
if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked), Yo(e))
|
|
8003
|
+
return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (ui.clearCache(e.fontFamily), e.fontFamily = t.fontFamily), t.bold !== void 0 && (e.bold = t.bold), t.italic !== void 0 && (e.italic = t.italic), t.textAlign !== void 0 && (e.textAlign = t.textAlign), { needsImageLoad: n };
|
|
8019
8004
|
const r = e;
|
|
8020
8005
|
if (t.width !== void 0 && (r.transformData.width = t.width), t.height !== void 0 && (r.transformData.height = t.height), t.fillColor !== void 0) {
|
|
8021
8006
|
const o = e.transformData;
|
|
8022
8007
|
o.fillColor = t.fillColor, delete o.fill;
|
|
8023
8008
|
}
|
|
8024
|
-
if (t.fill !== void 0 && (e.transformData.fill =
|
|
8025
|
-
const o = e, i =
|
|
8009
|
+
if (t.fill !== void 0 && (e.transformData.fill = fi(t.fill)), t.adjustments !== void 0) {
|
|
8010
|
+
const o = e, i = hi(t.adjustments);
|
|
8026
8011
|
i ? o.transformData.adjustments = i : delete o.transformData.adjustments;
|
|
8027
8012
|
}
|
|
8028
8013
|
if (t.imageUrl !== void 0) {
|
|
@@ -8032,7 +8017,7 @@ function oc(e, t) {
|
|
|
8032
8017
|
return { needsImageLoad: n };
|
|
8033
8018
|
}
|
|
8034
8019
|
const jr = Qe("useCommands");
|
|
8035
|
-
function
|
|
8020
|
+
function kc() {
|
|
8036
8021
|
const e = Yt(), {
|
|
8037
8022
|
undo: t,
|
|
8038
8023
|
redo: n,
|
|
@@ -8057,10 +8042,10 @@ function Ac() {
|
|
|
8057
8042
|
const M = V(null), L = N(
|
|
8058
8043
|
(E, v, D) => {
|
|
8059
8044
|
const w = m.current;
|
|
8060
|
-
let A =
|
|
8045
|
+
let A = Ql(w, E);
|
|
8061
8046
|
const T = y.getArtboardIdForElement(A.id) ?? y.getActiveArtboardId(), O = T ? g.peekArtboard(T) : null;
|
|
8062
|
-
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement),
|
|
8063
|
-
const W = A.clone(), { needsImageLoad: ae } =
|
|
8047
|
+
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), Zl(A, v);
|
|
8048
|
+
const W = A.clone(), { needsImageLoad: ae } = ec(W, v);
|
|
8064
8049
|
if (ae) {
|
|
8065
8050
|
const J = W;
|
|
8066
8051
|
J.onLoadCallback = (Y) => {
|
|
@@ -8110,58 +8095,59 @@ function Ac() {
|
|
|
8110
8095
|
};
|
|
8111
8096
|
}
|
|
8112
8097
|
export {
|
|
8098
|
+
uc as $,
|
|
8113
8099
|
ir as A,
|
|
8114
8100
|
st as B,
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8101
|
+
bc as C,
|
|
8102
|
+
Dl as D,
|
|
8103
|
+
Ho as E,
|
|
8104
|
+
vc as F,
|
|
8105
|
+
pc as G,
|
|
8106
|
+
mc as H,
|
|
8121
8107
|
$ as I,
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8108
|
+
gc as J,
|
|
8109
|
+
ql as K,
|
|
8110
|
+
xl as L,
|
|
8111
|
+
Rl as M,
|
|
8112
|
+
_l as N,
|
|
8113
|
+
Ul as O,
|
|
8114
|
+
Wl as P,
|
|
8115
|
+
Gl as Q,
|
|
8116
|
+
Yo as R,
|
|
8117
|
+
Uo as S,
|
|
8132
8118
|
qn as T,
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8119
|
+
xc as U,
|
|
8120
|
+
uo as V,
|
|
8121
|
+
ks as W,
|
|
8122
|
+
In as X,
|
|
8123
|
+
go as Y,
|
|
8124
|
+
po as Z,
|
|
8125
|
+
mo as _,
|
|
8126
|
+
Re as a,
|
|
8127
|
+
wc as b,
|
|
8128
|
+
mi as c,
|
|
8129
|
+
Ns as d,
|
|
8130
|
+
$l as e,
|
|
8131
|
+
Pl as f,
|
|
8132
|
+
Fl as g,
|
|
8133
|
+
Ol as h,
|
|
8148
8134
|
G as i,
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8135
|
+
kc as j,
|
|
8136
|
+
yc as k,
|
|
8137
|
+
yi as l,
|
|
8138
|
+
Tn as m,
|
|
8139
|
+
fc as n,
|
|
8140
|
+
hc as o,
|
|
8141
|
+
Bo as p,
|
|
8156
8142
|
Xt as q,
|
|
8157
8143
|
At as r,
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8144
|
+
wi as s,
|
|
8145
|
+
Fn as t,
|
|
8146
|
+
vs as u,
|
|
8161
8147
|
Xe as v,
|
|
8162
|
-
|
|
8163
|
-
|
|
8148
|
+
fo as w,
|
|
8149
|
+
ys as x,
|
|
8164
8150
|
or as y,
|
|
8165
8151
|
rn as z
|
|
8166
8152
|
};
|
|
8167
|
-
//# sourceMappingURL=useCommands-
|
|
8153
|
+
//# sourceMappingURL=useCommands-C6nE770t.js.map
|