integration-modules 0.1.15 → 0.1.17
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/chunks/{EmojiBoardWidget-qFIIWsdw.js → EmojiBoardWidget-BT3AAibK.js} +188 -192
- package/dist/chunks/{EmojiBoardWidget-qFIIWsdw.js.map → EmojiBoardWidget-BT3AAibK.js.map} +1 -1
- package/dist/chunks/EmojiBoardWidget-CzGz4-vT.js +2 -0
- package/dist/chunks/{EmojiBoardWidget-uWxNQwpF.js.map → EmojiBoardWidget-CzGz4-vT.js.map} +1 -1
- package/dist/chunks/{ShapeBoardWidget-ChVcXBBP.js → ShapeBoardWidget-BmgYD5zN.js} +570 -561
- package/dist/chunks/ShapeBoardWidget-BmgYD5zN.js.map +1 -0
- package/dist/chunks/ShapeBoardWidget-quPjhnR6.js +2 -0
- package/dist/chunks/ShapeBoardWidget-quPjhnR6.js.map +1 -0
- package/dist/chunks/{constants-pVjh1MjZ.js → useStickersStore-BUOBakV7.js} +14 -13
- package/dist/chunks/useStickersStore-BUOBakV7.js.map +1 -0
- package/dist/chunks/useStickersStore-CZRuiluy.js +23 -0
- package/dist/chunks/useStickersStore-CZRuiluy.js.map +1 -0
- package/dist/emoji/index.cjs +1 -1
- package/dist/emoji/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +26 -24
- package/dist/index.mjs.map +1 -1
- package/dist/shape/index.cjs +1 -1
- package/dist/shape/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/EmojiBoardWidget-uWxNQwpF.js +0 -2
- package/dist/chunks/ShapeBoardWidget-CYvTmNUV.js +0 -2
- package/dist/chunks/ShapeBoardWidget-CYvTmNUV.js.map +0 -1
- package/dist/chunks/ShapeBoardWidget-ChVcXBBP.js.map +0 -1
- package/dist/chunks/constants-D-rHISmr.js +0 -23
- package/dist/chunks/constants-D-rHISmr.js.map +0 -1
- package/dist/chunks/constants-pVjh1MjZ.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as s,
|
|
2
|
-
import
|
|
3
|
-
import { useReactFlow as
|
|
4
|
-
const
|
|
1
|
+
import { j as s, b as vt, u as z } from "./useStickersStore-BUOBakV7.js";
|
|
2
|
+
import kt, { useState as I, useRef as F, useEffect as T, useMemo as _t } from "react";
|
|
3
|
+
import { useReactFlow as bt, NodeResizer as jt, Handle as nt, Position as rt } from "@xyflow/react";
|
|
4
|
+
const Et = [
|
|
5
5
|
{ id: "line", name: "Линия", defaultSize: { width: 80, height: 20 } },
|
|
6
6
|
{ id: "arrow", name: "Стрелка", defaultSize: { width: 180, height: 60 } },
|
|
7
7
|
{ id: "dblarrow", name: "Двойная стрелка", defaultSize: { width: 200, height: 60 } },
|
|
@@ -19,60 +19,150 @@ const St = [
|
|
|
19
19
|
{ id: "pyramid", name: "Пирамида", defaultSize: { width: 160, height: 160 } },
|
|
20
20
|
{ id: "circleArrow", name: "Круг со стрелкой", defaultSize: { width: 140, height: 140 } },
|
|
21
21
|
{ id: "table3x3LeftMerge", name: "Таблица 3×3", defaultSize: { width: 180, height: 180 } }
|
|
22
|
-
]
|
|
23
|
-
|
|
22
|
+
], St = {
|
|
23
|
+
square: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
24
|
+
circle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
25
|
+
triangle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,34 6,34", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
26
|
+
star: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx(
|
|
27
|
+
"polygon",
|
|
28
|
+
{
|
|
29
|
+
points: "20,4 25,16 38,16 27,24 32,36 20,28 8,36 13,24 2,16 15,16",
|
|
30
|
+
stroke: "black",
|
|
31
|
+
fill: "none",
|
|
32
|
+
strokeWidth: "2"
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
stick: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "16", y: "4", width: "8", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
36
|
+
line: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "36", y2: "20", stroke: "black", strokeWidth: "2" }) }),
|
|
37
|
+
arrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
|
|
38
|
+
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "30", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
39
|
+
/* @__PURE__ */ s.jsx("polygon", { points: "30,14 38,20 30,26", fill: "black" })
|
|
40
|
+
] }),
|
|
41
|
+
dblarrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
|
|
42
|
+
/* @__PURE__ */ s.jsx("polygon", { points: "4,20 12,14 12,26", fill: "black" }),
|
|
43
|
+
/* @__PURE__ */ s.jsx("line", { x1: "12", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
44
|
+
/* @__PURE__ */ s.jsx("polygon", { points: "28,14 36,20 28,26", fill: "black" })
|
|
45
|
+
] }),
|
|
46
|
+
parallelogram: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "8,8 34,8 26,32 0,32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
47
|
+
roundedRect: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "10", width: "28", height: "20", rx: "4", ry: "4", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
48
|
+
capsule: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "14", width: "28", height: "12", rx: "6", ry: "6", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
49
|
+
pentagon: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,15 28,32 12,32 6,15", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
50
|
+
chevron: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx(
|
|
51
|
+
"polyline",
|
|
52
|
+
{
|
|
53
|
+
points: "0,0 50,100 100,0",
|
|
54
|
+
fill: "none",
|
|
55
|
+
stroke: "black",
|
|
56
|
+
strokeWidth: "5"
|
|
57
|
+
}
|
|
58
|
+
) }),
|
|
59
|
+
table3x3: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
60
|
+
/* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
61
|
+
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
62
|
+
/* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
63
|
+
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "14", x2: "36", y2: "14", stroke: "black", strokeWidth: "2" }),
|
|
64
|
+
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "26", x2: "36", y2: "26", stroke: "black", strokeWidth: "2" })
|
|
65
|
+
] }),
|
|
66
|
+
pyramid: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
67
|
+
/* @__PURE__ */ s.jsx("polygon", { points: "20,4 36,36 4,36", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
68
|
+
/* @__PURE__ */ s.jsx("line", { x1: "15", y1: "12", x2: "25", y2: "12", stroke: "black", strokeWidth: "2" }),
|
|
69
|
+
/* @__PURE__ */ s.jsx("line", { x1: "11", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
70
|
+
/* @__PURE__ */ s.jsx("line", { x1: "7", y1: "28", x2: "32", y2: "28", stroke: "black", strokeWidth: "2" })
|
|
71
|
+
] }),
|
|
72
|
+
circleArrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
73
|
+
/* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
74
|
+
/* @__PURE__ */ s.jsx("line", { x1: "20", y1: "6", x2: "20", y2: "0", stroke: "black", strokeWidth: "2" }),
|
|
75
|
+
/* @__PURE__ */ s.jsx("polygon", { points: "18,2 22,2 20,0", fill: "black" })
|
|
76
|
+
] }),
|
|
77
|
+
table3x3LeftMerge: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
78
|
+
/* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
79
|
+
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
80
|
+
/* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
81
|
+
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "16", x2: "36", y2: "16", stroke: "black", strokeWidth: "2" }),
|
|
82
|
+
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "28", x2: "36", y2: "28", stroke: "black", strokeWidth: "2" })
|
|
83
|
+
] })
|
|
84
|
+
}, Wt = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", At = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", Ct = () => {
|
|
85
|
+
const [t, e] = I(!1), n = F(null), r = (o) => {
|
|
86
|
+
o.stopPropagation(), e((a) => !a);
|
|
87
|
+
};
|
|
88
|
+
T(() => {
|
|
89
|
+
if (!t) return;
|
|
90
|
+
const o = (a) => {
|
|
91
|
+
n.current && !n.current.contains(a.target) && e(!1);
|
|
92
|
+
};
|
|
93
|
+
return window.addEventListener("pointerdown", o), () => window.removeEventListener("pointerdown", o);
|
|
94
|
+
}, [t]);
|
|
95
|
+
const i = (o) => (a) => {
|
|
96
|
+
a.stopPropagation(), a.dataTransfer.setData(vt, JSON.stringify({ shapeId: o.id })), a.dataTransfer.effectAllowed = "copy";
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "left-toolbar-container dragHandle__custom", ref: n, onClick: (o) => o.stopPropagation(), children: [
|
|
99
|
+
/* @__PURE__ */ s.jsx("div", { className: `toolbar-card ${t ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ s.jsx("button", { onClick: r, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${t ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ s.jsx("div", { className: `toolbar-shape-plate ${t ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ s.jsx("img", { src: t ? At : Wt, alt: "Фигуры", draggable: !1 }) }) }) }),
|
|
100
|
+
t && /* @__PURE__ */ s.jsx("div", { className: "palette-wrapper", onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ s.jsx("div", { className: "shape-panel", children: /* @__PURE__ */ s.jsx("div", { className: "shape-grid", children: Et.map((o) => /* @__PURE__ */ s.jsx(
|
|
101
|
+
"button",
|
|
102
|
+
{
|
|
103
|
+
className: "shape-item",
|
|
104
|
+
draggable: !0,
|
|
105
|
+
onDragStart: i(o),
|
|
106
|
+
title: o.name,
|
|
107
|
+
children: St[o.id]
|
|
108
|
+
},
|
|
109
|
+
o.id
|
|
110
|
+
)) }) }) })
|
|
111
|
+
] });
|
|
112
|
+
};
|
|
113
|
+
async function C(t) {
|
|
24
114
|
return await t.text() || `HTTP ${t.status}`;
|
|
25
115
|
}
|
|
26
|
-
const
|
|
116
|
+
const J = {
|
|
27
117
|
async getAll() {
|
|
28
118
|
const t = await fetch("/api/v1/shapes/get-all");
|
|
29
119
|
if (!t.ok)
|
|
30
|
-
throw new Error(await
|
|
120
|
+
throw new Error(await C(t));
|
|
31
121
|
const e = await t.json();
|
|
32
122
|
return Array.isArray(e) ? e : [];
|
|
33
123
|
},
|
|
34
124
|
async getById(t) {
|
|
35
125
|
const e = await fetch(`/api/v1/shapes/${t}`);
|
|
36
126
|
if (!e.ok)
|
|
37
|
-
throw new Error(await
|
|
127
|
+
throw new Error(await C(e));
|
|
38
128
|
return await e.json();
|
|
39
129
|
},
|
|
40
|
-
async addToBoard(t, e, n,
|
|
41
|
-
const
|
|
130
|
+
async addToBoard(t, e, n, r) {
|
|
131
|
+
const i = await fetch("/api/v1/shapes/board", {
|
|
42
132
|
method: "POST",
|
|
43
133
|
headers: { "Content-Type": "application/json" },
|
|
44
|
-
body: JSON.stringify({ shapeId: t, width: e, height: n, rotation:
|
|
134
|
+
body: JSON.stringify({ shapeId: t, width: e, height: n, rotation: r })
|
|
45
135
|
});
|
|
46
|
-
if (!
|
|
47
|
-
throw new Error(await
|
|
48
|
-
return await
|
|
136
|
+
if (!i.ok)
|
|
137
|
+
throw new Error(await C(i));
|
|
138
|
+
return await i.json();
|
|
49
139
|
},
|
|
50
140
|
async getBoard() {
|
|
51
141
|
const t = await fetch("/api/v1/shapes/board");
|
|
52
142
|
if (!t.ok)
|
|
53
|
-
throw new Error(await
|
|
143
|
+
throw new Error(await C(t));
|
|
54
144
|
const e = await t.json();
|
|
55
145
|
return Array.isArray(e) ? e : [];
|
|
56
146
|
},
|
|
57
147
|
async getBoardById(t) {
|
|
58
148
|
const e = await fetch(`/api/v1/shapes/board/${t}`);
|
|
59
149
|
if (!e.ok)
|
|
60
|
-
throw new Error(await
|
|
150
|
+
throw new Error(await C(e));
|
|
61
151
|
return await e.json();
|
|
62
152
|
},
|
|
63
|
-
async updateBoardTransform(t, e, n,
|
|
64
|
-
const
|
|
153
|
+
async updateBoardTransform(t, e, n, r) {
|
|
154
|
+
const i = await fetch(`/api/v1/shapes/board/${t}/transform`, {
|
|
65
155
|
method: "PATCH",
|
|
66
156
|
headers: { "Content-Type": "application/json" },
|
|
67
|
-
body: JSON.stringify({ width: e, height: n, rotation:
|
|
157
|
+
body: JSON.stringify({ width: e, height: n, rotation: r })
|
|
68
158
|
});
|
|
69
|
-
if (!
|
|
70
|
-
throw new Error(await
|
|
71
|
-
return await
|
|
159
|
+
if (!i.ok)
|
|
160
|
+
throw new Error(await C(i));
|
|
161
|
+
return await i.json();
|
|
72
162
|
},
|
|
73
163
|
async delete(t) {
|
|
74
164
|
const e = await fetch(`/api/v1/shapes/${t}`, { method: "DELETE" });
|
|
75
|
-
if (!e.ok) throw new Error(await
|
|
165
|
+
if (!e.ok) throw new Error(await C(e));
|
|
76
166
|
return !0;
|
|
77
167
|
}
|
|
78
168
|
}, it = {
|
|
@@ -158,23 +248,23 @@ const G = {
|
|
|
158
248
|
capsule: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", rx: "50", ry: "50", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
159
249
|
pentagon: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,38 82,100 18,100 0,38", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
160
250
|
chevron: ({ stroke: t, sw: e = 2 }) => /* @__PURE__ */ s.jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx("polyline", { points: "0,0 50,100 100,0", fill: "none", stroke: t || "#000", strokeWidth: e, vectorEffect: "non-scaling-stroke" }) }),
|
|
161
|
-
table3x3: ({ fill: t, stroke: e, sw: n = 2, innerSw:
|
|
251
|
+
table3x3: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
162
252
|
/* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
163
|
-
/* @__PURE__ */ s.jsx("line", { x1: "0", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth:
|
|
164
|
-
/* @__PURE__ */ s.jsx("line", { x1: "0", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth:
|
|
165
|
-
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth:
|
|
166
|
-
/* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth:
|
|
253
|
+
/* @__PURE__ */ s.jsx("line", { x1: "0", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
254
|
+
/* @__PURE__ */ s.jsx("line", { x1: "0", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
255
|
+
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
256
|
+
/* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" })
|
|
167
257
|
] }),
|
|
168
|
-
table3x3LeftMerge: ({ fill: t, stroke: e, sw: n = 2, innerSw:
|
|
258
|
+
table3x3LeftMerge: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
169
259
|
/* @__PURE__ */ s.jsx("rect", { width: "100%", height: "100%", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
170
|
-
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth:
|
|
171
|
-
/* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth:
|
|
172
|
-
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth:
|
|
173
|
-
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth:
|
|
260
|
+
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "0", x2: "33%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
261
|
+
/* @__PURE__ */ s.jsx("line", { x1: "66%", y1: "0", x2: "66%", y2: "100%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
262
|
+
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "33%", x2: "100%", y2: "33%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }),
|
|
263
|
+
/* @__PURE__ */ s.jsx("line", { x1: "33%", y1: "66%", x2: "100%", y2: "66%", stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" })
|
|
174
264
|
] }),
|
|
175
|
-
pyramid: ({ fill: t, stroke: e, sw: n = 2, innerSw:
|
|
265
|
+
pyramid: ({ fill: t, stroke: e, sw: n = 2, innerSw: r = 1 }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
176
266
|
/* @__PURE__ */ s.jsx("polygon", { points: "50,0 100,100 0,100", fill: t || "transparent", stroke: e || "#000", strokeWidth: n, vectorEffect: "non-scaling-stroke" }),
|
|
177
|
-
[0.2, 0.4, 0.6, 0.8].map((
|
|
267
|
+
[0.2, 0.4, 0.6, 0.8].map((i, o) => /* @__PURE__ */ s.jsx("line", { x1: 50 - 50 * i, y1: i * 100, x2: 50 + 50 * i, y2: i * 100, stroke: e || "#000", strokeWidth: r, vectorEffect: "non-scaling-stroke" }, o))
|
|
178
268
|
] }),
|
|
179
269
|
circleArrow: ({ fill: t, stroke: e, sw: n = 2 }) => /* @__PURE__ */ s.jsxs("svg", { width: "100%", height: "100%", viewBox: "0 -30 100 130", preserveAspectRatio: "xMidYMid meet", children: [
|
|
180
270
|
/* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsx(
|
|
@@ -217,10 +307,10 @@ const G = {
|
|
|
217
307
|
)
|
|
218
308
|
] })
|
|
219
309
|
};
|
|
220
|
-
var
|
|
310
|
+
var Z = "http://www.w3.org/1999/xhtml";
|
|
221
311
|
const st = {
|
|
222
312
|
svg: "http://www.w3.org/2000/svg",
|
|
223
|
-
xhtml:
|
|
313
|
+
xhtml: Z,
|
|
224
314
|
xlink: "http://www.w3.org/1999/xlink",
|
|
225
315
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
226
316
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
@@ -229,59 +319,59 @@ function lt(t) {
|
|
|
229
319
|
var e = t += "", n = e.indexOf(":");
|
|
230
320
|
return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), st.hasOwnProperty(e) ? { space: st[e], local: t } : t;
|
|
231
321
|
}
|
|
232
|
-
function
|
|
322
|
+
function Nt(t) {
|
|
233
323
|
return function() {
|
|
234
324
|
var e = this.ownerDocument, n = this.namespaceURI;
|
|
235
|
-
return n ===
|
|
325
|
+
return n === Z && e.documentElement.namespaceURI === Z ? e.createElement(t) : e.createElementNS(n, t);
|
|
236
326
|
};
|
|
237
327
|
}
|
|
238
|
-
function
|
|
328
|
+
function Bt(t) {
|
|
239
329
|
return function() {
|
|
240
330
|
return this.ownerDocument.createElementNS(t.space, t.local);
|
|
241
331
|
};
|
|
242
332
|
}
|
|
243
333
|
function ct(t) {
|
|
244
334
|
var e = lt(t);
|
|
245
|
-
return (e.local ?
|
|
335
|
+
return (e.local ? Bt : Nt)(e);
|
|
246
336
|
}
|
|
247
|
-
function
|
|
337
|
+
function Rt() {
|
|
248
338
|
}
|
|
249
339
|
function ht(t) {
|
|
250
|
-
return t == null ?
|
|
340
|
+
return t == null ? Rt : function() {
|
|
251
341
|
return this.querySelector(t);
|
|
252
342
|
};
|
|
253
343
|
}
|
|
254
|
-
function
|
|
344
|
+
function zt(t) {
|
|
255
345
|
typeof t != "function" && (t = ht(t));
|
|
256
|
-
for (var e = this._groups, n = e.length,
|
|
257
|
-
for (var o = e[
|
|
346
|
+
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
347
|
+
for (var o = e[i], a = o.length, l = r[i] = new Array(a), h, u, d = 0; d < a; ++d)
|
|
258
348
|
(h = o[d]) && (u = t.call(h, h.__data__, d, o)) && ("__data__" in h && (u.__data__ = h.__data__), l[d] = u);
|
|
259
|
-
return new E(
|
|
349
|
+
return new E(r, this._parents);
|
|
260
350
|
}
|
|
261
|
-
function
|
|
351
|
+
function Tt(t) {
|
|
262
352
|
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
|
263
353
|
}
|
|
264
|
-
function
|
|
354
|
+
function Mt() {
|
|
265
355
|
return [];
|
|
266
356
|
}
|
|
267
|
-
function
|
|
268
|
-
return t == null ?
|
|
357
|
+
function Pt(t) {
|
|
358
|
+
return t == null ? Mt : function() {
|
|
269
359
|
return this.querySelectorAll(t);
|
|
270
360
|
};
|
|
271
361
|
}
|
|
272
|
-
function
|
|
362
|
+
function It(t) {
|
|
273
363
|
return function() {
|
|
274
|
-
return
|
|
364
|
+
return Tt(t.apply(this, arguments));
|
|
275
365
|
};
|
|
276
366
|
}
|
|
277
|
-
function
|
|
278
|
-
typeof t == "function" ? t =
|
|
279
|
-
for (var e = this._groups, n = e.length,
|
|
367
|
+
function Ft(t) {
|
|
368
|
+
typeof t == "function" ? t = It(t) : t = Pt(t);
|
|
369
|
+
for (var e = this._groups, n = e.length, r = [], i = [], o = 0; o < n; ++o)
|
|
280
370
|
for (var a = e[o], l = a.length, h, u = 0; u < l; ++u)
|
|
281
|
-
(h = a[u]) && (
|
|
282
|
-
return new E(
|
|
371
|
+
(h = a[u]) && (r.push(t.call(h, h.__data__, u, a)), i.push(h));
|
|
372
|
+
return new E(r, i);
|
|
283
373
|
}
|
|
284
|
-
function
|
|
374
|
+
function Ht(t) {
|
|
285
375
|
return function() {
|
|
286
376
|
return this.matches(t);
|
|
287
377
|
};
|
|
@@ -291,48 +381,48 @@ function ut(t) {
|
|
|
291
381
|
return e.matches(t);
|
|
292
382
|
};
|
|
293
383
|
}
|
|
294
|
-
var
|
|
295
|
-
function
|
|
384
|
+
var Lt = Array.prototype.find;
|
|
385
|
+
function Dt(t) {
|
|
296
386
|
return function() {
|
|
297
|
-
return
|
|
387
|
+
return Lt.call(this.children, t);
|
|
298
388
|
};
|
|
299
389
|
}
|
|
300
|
-
function
|
|
390
|
+
function Vt() {
|
|
301
391
|
return this.firstElementChild;
|
|
302
392
|
}
|
|
303
|
-
function
|
|
304
|
-
return this.select(t == null ?
|
|
393
|
+
function Ot(t) {
|
|
394
|
+
return this.select(t == null ? Vt : Dt(typeof t == "function" ? t : ut(t)));
|
|
305
395
|
}
|
|
306
|
-
var
|
|
307
|
-
function
|
|
396
|
+
var qt = Array.prototype.filter;
|
|
397
|
+
function Xt() {
|
|
308
398
|
return Array.from(this.children);
|
|
309
399
|
}
|
|
310
|
-
function
|
|
400
|
+
function $t(t) {
|
|
311
401
|
return function() {
|
|
312
|
-
return
|
|
402
|
+
return qt.call(this.children, t);
|
|
313
403
|
};
|
|
314
404
|
}
|
|
315
|
-
function
|
|
316
|
-
return this.selectAll(t == null ?
|
|
405
|
+
function Ut(t) {
|
|
406
|
+
return this.selectAll(t == null ? Xt : $t(typeof t == "function" ? t : ut(t)));
|
|
317
407
|
}
|
|
318
|
-
function
|
|
319
|
-
typeof t != "function" && (t =
|
|
320
|
-
for (var e = this._groups, n = e.length,
|
|
321
|
-
for (var o = e[
|
|
408
|
+
function Yt(t) {
|
|
409
|
+
typeof t != "function" && (t = Ht(t));
|
|
410
|
+
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
411
|
+
for (var o = e[i], a = o.length, l = r[i] = [], h, u = 0; u < a; ++u)
|
|
322
412
|
(h = o[u]) && t.call(h, h.__data__, u, o) && l.push(h);
|
|
323
|
-
return new E(
|
|
413
|
+
return new E(r, this._parents);
|
|
324
414
|
}
|
|
325
415
|
function ft(t) {
|
|
326
416
|
return new Array(t.length);
|
|
327
417
|
}
|
|
328
|
-
function
|
|
418
|
+
function Kt() {
|
|
329
419
|
return new E(this._enter || this._groups.map(ft), this._parents);
|
|
330
420
|
}
|
|
331
|
-
function
|
|
421
|
+
function U(t, e) {
|
|
332
422
|
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
|
333
423
|
}
|
|
334
|
-
|
|
335
|
-
constructor:
|
|
424
|
+
U.prototype = {
|
|
425
|
+
constructor: U,
|
|
336
426
|
appendChild: function(t) {
|
|
337
427
|
return this._parent.insertBefore(t, this._next);
|
|
338
428
|
},
|
|
@@ -346,200 +436,200 @@ Y.prototype = {
|
|
|
346
436
|
return this._parent.querySelectorAll(t);
|
|
347
437
|
}
|
|
348
438
|
};
|
|
349
|
-
function
|
|
439
|
+
function Jt(t) {
|
|
350
440
|
return function() {
|
|
351
441
|
return t;
|
|
352
442
|
};
|
|
353
443
|
}
|
|
354
|
-
function
|
|
444
|
+
function Zt(t, e, n, r, i, o) {
|
|
355
445
|
for (var a = 0, l, h = e.length, u = o.length; a < u; ++a)
|
|
356
|
-
(l = e[a]) ? (l.__data__ = o[a],
|
|
446
|
+
(l = e[a]) ? (l.__data__ = o[a], r[a] = l) : n[a] = new U(t, o[a]);
|
|
357
447
|
for (; a < h; ++a)
|
|
358
|
-
(l = e[a]) && (
|
|
448
|
+
(l = e[a]) && (i[a] = l);
|
|
359
449
|
}
|
|
360
|
-
function
|
|
361
|
-
var l, h, u = /* @__PURE__ */ new Map(), d = e.length,
|
|
450
|
+
function Gt(t, e, n, r, i, o, a) {
|
|
451
|
+
var l, h, u = /* @__PURE__ */ new Map(), d = e.length, x = o.length, g = new Array(d), m;
|
|
362
452
|
for (l = 0; l < d; ++l)
|
|
363
|
-
(h = e[l]) && (
|
|
364
|
-
for (l = 0; l <
|
|
365
|
-
|
|
453
|
+
(h = e[l]) && (g[l] = m = a.call(h, h.__data__, l, e) + "", u.has(m) ? i[l] = h : u.set(m, h));
|
|
454
|
+
for (l = 0; l < x; ++l)
|
|
455
|
+
m = a.call(t, o[l], l, o) + "", (h = u.get(m)) ? (r[l] = h, h.__data__ = o[l], u.delete(m)) : n[l] = new U(t, o[l]);
|
|
366
456
|
for (l = 0; l < d; ++l)
|
|
367
|
-
(h = e[l]) && u.get(
|
|
457
|
+
(h = e[l]) && u.get(g[l]) === h && (i[l] = h);
|
|
368
458
|
}
|
|
369
|
-
function
|
|
459
|
+
function Qt(t) {
|
|
370
460
|
return t.__data__;
|
|
371
461
|
}
|
|
372
|
-
function
|
|
373
|
-
if (!arguments.length) return Array.from(this,
|
|
374
|
-
var n = e ?
|
|
375
|
-
typeof t != "function" && (t =
|
|
376
|
-
for (var o =
|
|
377
|
-
var d =
|
|
378
|
-
n(d,
|
|
379
|
-
for (var
|
|
380
|
-
if (c = S[
|
|
381
|
-
for (
|
|
382
|
-
c._next =
|
|
462
|
+
function te(t, e) {
|
|
463
|
+
if (!arguments.length) return Array.from(this, Qt);
|
|
464
|
+
var n = e ? Gt : Zt, r = this._parents, i = this._groups;
|
|
465
|
+
typeof t != "function" && (t = Jt(t));
|
|
466
|
+
for (var o = i.length, a = new Array(o), l = new Array(o), h = new Array(o), u = 0; u < o; ++u) {
|
|
467
|
+
var d = r[u], x = i[u], g = x.length, m = ee(t.call(d, d && d.__data__, u, r)), v = m.length, S = l[u] = new Array(v), W = a[u] = new Array(v), N = h[u] = new Array(g);
|
|
468
|
+
n(d, x, S, W, N, m, e);
|
|
469
|
+
for (var j = 0, A = 0, c, f; j < v; ++j)
|
|
470
|
+
if (c = S[j]) {
|
|
471
|
+
for (j >= A && (A = j + 1); !(f = W[A]) && ++A < v; ) ;
|
|
472
|
+
c._next = f || null;
|
|
383
473
|
}
|
|
384
474
|
}
|
|
385
|
-
return a = new E(a,
|
|
475
|
+
return a = new E(a, r), a._enter = l, a._exit = h, a;
|
|
386
476
|
}
|
|
387
|
-
function
|
|
477
|
+
function ee(t) {
|
|
388
478
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
389
479
|
}
|
|
390
|
-
function
|
|
480
|
+
function ne() {
|
|
391
481
|
return new E(this._exit || this._groups.map(ft), this._parents);
|
|
392
482
|
}
|
|
393
|
-
function
|
|
394
|
-
var
|
|
395
|
-
return typeof t == "function" ? (
|
|
483
|
+
function re(t, e, n) {
|
|
484
|
+
var r = this.enter(), i = this, o = this.exit();
|
|
485
|
+
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? o.remove() : n(o), r && i ? r.merge(i).order() : i;
|
|
396
486
|
}
|
|
397
|
-
function
|
|
398
|
-
for (var e = t.selection ? t.selection() : t, n = this._groups,
|
|
399
|
-
for (var u = n[h], d =
|
|
400
|
-
(
|
|
401
|
-
for (; h <
|
|
487
|
+
function ie(t) {
|
|
488
|
+
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, o = r.length, a = Math.min(i, o), l = new Array(i), h = 0; h < a; ++h)
|
|
489
|
+
for (var u = n[h], d = r[h], x = u.length, g = l[h] = new Array(x), m, v = 0; v < x; ++v)
|
|
490
|
+
(m = u[v] || d[v]) && (g[v] = m);
|
|
491
|
+
for (; h < i; ++h)
|
|
402
492
|
l[h] = n[h];
|
|
403
493
|
return new E(l, this._parents);
|
|
404
494
|
}
|
|
405
|
-
function
|
|
495
|
+
function se() {
|
|
406
496
|
for (var t = this._groups, e = -1, n = t.length; ++e < n; )
|
|
407
|
-
for (var
|
|
408
|
-
(a = i
|
|
497
|
+
for (var r = t[e], i = r.length - 1, o = r[i], a; --i >= 0; )
|
|
498
|
+
(a = r[i]) && (o && a.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(a, o), o = a);
|
|
409
499
|
return this;
|
|
410
500
|
}
|
|
411
|
-
function
|
|
412
|
-
t || (t =
|
|
413
|
-
function e(
|
|
414
|
-
return
|
|
501
|
+
function oe(t) {
|
|
502
|
+
t || (t = ae);
|
|
503
|
+
function e(x, g) {
|
|
504
|
+
return x && g ? t(x.__data__, g.__data__) : !x - !g;
|
|
415
505
|
}
|
|
416
|
-
for (var n = this._groups,
|
|
417
|
-
for (var a = n[o], l = a.length, h =
|
|
506
|
+
for (var n = this._groups, r = n.length, i = new Array(r), o = 0; o < r; ++o) {
|
|
507
|
+
for (var a = n[o], l = a.length, h = i[o] = new Array(l), u, d = 0; d < l; ++d)
|
|
418
508
|
(u = a[d]) && (h[d] = u);
|
|
419
509
|
h.sort(e);
|
|
420
510
|
}
|
|
421
|
-
return new E(
|
|
511
|
+
return new E(i, this._parents).order();
|
|
422
512
|
}
|
|
423
|
-
function
|
|
513
|
+
function ae(t, e) {
|
|
424
514
|
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
425
515
|
}
|
|
426
|
-
function
|
|
516
|
+
function le() {
|
|
427
517
|
var t = arguments[0];
|
|
428
518
|
return arguments[0] = this, t.apply(null, arguments), this;
|
|
429
519
|
}
|
|
430
|
-
function
|
|
520
|
+
function ce() {
|
|
431
521
|
return Array.from(this);
|
|
432
522
|
}
|
|
433
|
-
function
|
|
523
|
+
function he() {
|
|
434
524
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
435
|
-
for (var
|
|
436
|
-
var a = i
|
|
525
|
+
for (var r = t[e], i = 0, o = r.length; i < o; ++i) {
|
|
526
|
+
var a = r[i];
|
|
437
527
|
if (a) return a;
|
|
438
528
|
}
|
|
439
529
|
return null;
|
|
440
530
|
}
|
|
441
|
-
function
|
|
531
|
+
function ue() {
|
|
442
532
|
let t = 0;
|
|
443
533
|
for (const e of this) ++t;
|
|
444
534
|
return t;
|
|
445
535
|
}
|
|
446
|
-
function
|
|
536
|
+
function fe() {
|
|
447
537
|
return !this.node();
|
|
448
538
|
}
|
|
449
|
-
function
|
|
450
|
-
for (var e = this._groups, n = 0,
|
|
451
|
-
for (var
|
|
452
|
-
(l =
|
|
539
|
+
function de(t) {
|
|
540
|
+
for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
|
|
541
|
+
for (var i = e[n], o = 0, a = i.length, l; o < a; ++o)
|
|
542
|
+
(l = i[o]) && t.call(l, l.__data__, o, i);
|
|
453
543
|
return this;
|
|
454
544
|
}
|
|
455
|
-
function
|
|
545
|
+
function ge(t) {
|
|
456
546
|
return function() {
|
|
457
547
|
this.removeAttribute(t);
|
|
458
548
|
};
|
|
459
549
|
}
|
|
460
|
-
function
|
|
550
|
+
function pe(t) {
|
|
461
551
|
return function() {
|
|
462
552
|
this.removeAttributeNS(t.space, t.local);
|
|
463
553
|
};
|
|
464
554
|
}
|
|
465
|
-
function
|
|
555
|
+
function ye(t, e) {
|
|
466
556
|
return function() {
|
|
467
557
|
this.setAttribute(t, e);
|
|
468
558
|
};
|
|
469
559
|
}
|
|
470
|
-
function
|
|
560
|
+
function we(t, e) {
|
|
471
561
|
return function() {
|
|
472
562
|
this.setAttributeNS(t.space, t.local, e);
|
|
473
563
|
};
|
|
474
564
|
}
|
|
475
|
-
function
|
|
565
|
+
function xe(t, e) {
|
|
476
566
|
return function() {
|
|
477
567
|
var n = e.apply(this, arguments);
|
|
478
568
|
n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
|
|
479
569
|
};
|
|
480
570
|
}
|
|
481
|
-
function
|
|
571
|
+
function me(t, e) {
|
|
482
572
|
return function() {
|
|
483
573
|
var n = e.apply(this, arguments);
|
|
484
574
|
n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
|
|
485
575
|
};
|
|
486
576
|
}
|
|
487
|
-
function
|
|
577
|
+
function ve(t, e) {
|
|
488
578
|
var n = lt(t);
|
|
489
579
|
if (arguments.length < 2) {
|
|
490
|
-
var
|
|
491
|
-
return n.local ?
|
|
580
|
+
var r = this.node();
|
|
581
|
+
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
492
582
|
}
|
|
493
|
-
return this.each((e == null ? n.local ?
|
|
583
|
+
return this.each((e == null ? n.local ? pe : ge : typeof e == "function" ? n.local ? me : xe : n.local ? we : ye)(n, e));
|
|
494
584
|
}
|
|
495
585
|
function dt(t) {
|
|
496
586
|
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
|
497
587
|
}
|
|
498
|
-
function
|
|
588
|
+
function ke(t) {
|
|
499
589
|
return function() {
|
|
500
590
|
this.style.removeProperty(t);
|
|
501
591
|
};
|
|
502
592
|
}
|
|
503
|
-
function
|
|
593
|
+
function _e(t, e, n) {
|
|
504
594
|
return function() {
|
|
505
595
|
this.style.setProperty(t, e, n);
|
|
506
596
|
};
|
|
507
597
|
}
|
|
508
|
-
function
|
|
598
|
+
function be(t, e, n) {
|
|
509
599
|
return function() {
|
|
510
|
-
var
|
|
511
|
-
|
|
600
|
+
var r = e.apply(this, arguments);
|
|
601
|
+
r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
|
|
512
602
|
};
|
|
513
603
|
}
|
|
514
|
-
function
|
|
515
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
604
|
+
function je(t, e, n) {
|
|
605
|
+
return arguments.length > 1 ? this.each((e == null ? ke : typeof e == "function" ? be : _e)(t, e, n ?? "")) : Ee(this.node(), t);
|
|
516
606
|
}
|
|
517
|
-
function
|
|
607
|
+
function Ee(t, e) {
|
|
518
608
|
return t.style.getPropertyValue(e) || dt(t).getComputedStyle(t, null).getPropertyValue(e);
|
|
519
609
|
}
|
|
520
|
-
function
|
|
610
|
+
function Se(t) {
|
|
521
611
|
return function() {
|
|
522
612
|
delete this[t];
|
|
523
613
|
};
|
|
524
614
|
}
|
|
525
|
-
function
|
|
615
|
+
function We(t, e) {
|
|
526
616
|
return function() {
|
|
527
617
|
this[t] = e;
|
|
528
618
|
};
|
|
529
619
|
}
|
|
530
|
-
function
|
|
620
|
+
function Ae(t, e) {
|
|
531
621
|
return function() {
|
|
532
622
|
var n = e.apply(this, arguments);
|
|
533
623
|
n == null ? delete this[t] : this[t] = n;
|
|
534
624
|
};
|
|
535
625
|
}
|
|
536
|
-
function
|
|
537
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
626
|
+
function Ce(t, e) {
|
|
627
|
+
return arguments.length > 1 ? this.each((e == null ? Se : typeof e == "function" ? Ae : We)(t, e)) : this.node()[t];
|
|
538
628
|
}
|
|
539
629
|
function gt(t) {
|
|
540
630
|
return t.trim().split(/^|\s+/);
|
|
541
631
|
}
|
|
542
|
-
function
|
|
632
|
+
function Q(t) {
|
|
543
633
|
return t.classList || new pt(t);
|
|
544
634
|
}
|
|
545
635
|
function pt(t) {
|
|
@@ -559,339 +649,339 @@ pt.prototype = {
|
|
|
559
649
|
}
|
|
560
650
|
};
|
|
561
651
|
function yt(t, e) {
|
|
562
|
-
for (var n =
|
|
652
|
+
for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
563
653
|
}
|
|
564
|
-
function
|
|
565
|
-
for (var n =
|
|
654
|
+
function wt(t, e) {
|
|
655
|
+
for (var n = Q(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
|
566
656
|
}
|
|
567
|
-
function
|
|
657
|
+
function Ne(t) {
|
|
568
658
|
return function() {
|
|
569
659
|
yt(this, t);
|
|
570
660
|
};
|
|
571
661
|
}
|
|
572
|
-
function
|
|
662
|
+
function Be(t) {
|
|
573
663
|
return function() {
|
|
574
|
-
|
|
664
|
+
wt(this, t);
|
|
575
665
|
};
|
|
576
666
|
}
|
|
577
|
-
function
|
|
667
|
+
function Re(t, e) {
|
|
578
668
|
return function() {
|
|
579
|
-
(e.apply(this, arguments) ? yt :
|
|
669
|
+
(e.apply(this, arguments) ? yt : wt)(this, t);
|
|
580
670
|
};
|
|
581
671
|
}
|
|
582
|
-
function
|
|
672
|
+
function ze(t, e) {
|
|
583
673
|
var n = gt(t + "");
|
|
584
674
|
if (arguments.length < 2) {
|
|
585
|
-
for (var
|
|
675
|
+
for (var r = Q(this.node()), i = -1, o = n.length; ++i < o; ) if (!r.contains(n[i])) return !1;
|
|
586
676
|
return !0;
|
|
587
677
|
}
|
|
588
|
-
return this.each((typeof e == "function" ?
|
|
678
|
+
return this.each((typeof e == "function" ? Re : e ? Ne : Be)(n, e));
|
|
589
679
|
}
|
|
590
|
-
function
|
|
680
|
+
function Te() {
|
|
591
681
|
this.textContent = "";
|
|
592
682
|
}
|
|
593
|
-
function
|
|
683
|
+
function Me(t) {
|
|
594
684
|
return function() {
|
|
595
685
|
this.textContent = t;
|
|
596
686
|
};
|
|
597
687
|
}
|
|
598
|
-
function
|
|
688
|
+
function Pe(t) {
|
|
599
689
|
return function() {
|
|
600
690
|
var e = t.apply(this, arguments);
|
|
601
691
|
this.textContent = e ?? "";
|
|
602
692
|
};
|
|
603
693
|
}
|
|
604
|
-
function
|
|
605
|
-
return arguments.length ? this.each(t == null ?
|
|
694
|
+
function Ie(t) {
|
|
695
|
+
return arguments.length ? this.each(t == null ? Te : (typeof t == "function" ? Pe : Me)(t)) : this.node().textContent;
|
|
606
696
|
}
|
|
607
|
-
function
|
|
697
|
+
function Fe() {
|
|
608
698
|
this.innerHTML = "";
|
|
609
699
|
}
|
|
610
|
-
function
|
|
700
|
+
function He(t) {
|
|
611
701
|
return function() {
|
|
612
702
|
this.innerHTML = t;
|
|
613
703
|
};
|
|
614
704
|
}
|
|
615
|
-
function
|
|
705
|
+
function Le(t) {
|
|
616
706
|
return function() {
|
|
617
707
|
var e = t.apply(this, arguments);
|
|
618
708
|
this.innerHTML = e ?? "";
|
|
619
709
|
};
|
|
620
710
|
}
|
|
621
|
-
function
|
|
622
|
-
return arguments.length ? this.each(t == null ?
|
|
711
|
+
function De(t) {
|
|
712
|
+
return arguments.length ? this.each(t == null ? Fe : (typeof t == "function" ? Le : He)(t)) : this.node().innerHTML;
|
|
623
713
|
}
|
|
624
|
-
function
|
|
714
|
+
function Ve() {
|
|
625
715
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
626
716
|
}
|
|
627
|
-
function
|
|
628
|
-
return this.each(
|
|
717
|
+
function Oe() {
|
|
718
|
+
return this.each(Ve);
|
|
629
719
|
}
|
|
630
|
-
function
|
|
720
|
+
function qe() {
|
|
631
721
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
632
722
|
}
|
|
633
|
-
function
|
|
634
|
-
return this.each(
|
|
723
|
+
function Xe() {
|
|
724
|
+
return this.each(qe);
|
|
635
725
|
}
|
|
636
|
-
function
|
|
726
|
+
function $e(t) {
|
|
637
727
|
var e = typeof t == "function" ? t : ct(t);
|
|
638
728
|
return this.select(function() {
|
|
639
729
|
return this.appendChild(e.apply(this, arguments));
|
|
640
730
|
});
|
|
641
731
|
}
|
|
642
|
-
function
|
|
732
|
+
function Ue() {
|
|
643
733
|
return null;
|
|
644
734
|
}
|
|
645
|
-
function
|
|
646
|
-
var n = typeof t == "function" ? t : ct(t),
|
|
735
|
+
function Ye(t, e) {
|
|
736
|
+
var n = typeof t == "function" ? t : ct(t), r = e == null ? Ue : typeof e == "function" ? e : ht(e);
|
|
647
737
|
return this.select(function() {
|
|
648
|
-
return this.insertBefore(n.apply(this, arguments),
|
|
738
|
+
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
649
739
|
});
|
|
650
740
|
}
|
|
651
|
-
function
|
|
741
|
+
function Ke() {
|
|
652
742
|
var t = this.parentNode;
|
|
653
743
|
t && t.removeChild(this);
|
|
654
744
|
}
|
|
655
|
-
function
|
|
656
|
-
return this.each(
|
|
745
|
+
function Je() {
|
|
746
|
+
return this.each(Ke);
|
|
657
747
|
}
|
|
658
|
-
function
|
|
748
|
+
function Ze() {
|
|
659
749
|
var t = this.cloneNode(!1), e = this.parentNode;
|
|
660
750
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
661
751
|
}
|
|
662
|
-
function
|
|
752
|
+
function Ge() {
|
|
663
753
|
var t = this.cloneNode(!0), e = this.parentNode;
|
|
664
754
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
665
755
|
}
|
|
666
|
-
function
|
|
667
|
-
return this.select(t ?
|
|
756
|
+
function Qe(t) {
|
|
757
|
+
return this.select(t ? Ge : Ze);
|
|
668
758
|
}
|
|
669
|
-
function
|
|
759
|
+
function tn(t) {
|
|
670
760
|
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
|
671
761
|
}
|
|
672
|
-
function
|
|
762
|
+
function en(t) {
|
|
673
763
|
return function(e) {
|
|
674
764
|
t.call(this, e, this.__data__);
|
|
675
765
|
};
|
|
676
766
|
}
|
|
677
|
-
function
|
|
767
|
+
function nn(t) {
|
|
678
768
|
return t.trim().split(/^|\s+/).map(function(e) {
|
|
679
|
-
var n = "",
|
|
680
|
-
return
|
|
769
|
+
var n = "", r = e.indexOf(".");
|
|
770
|
+
return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
|
|
681
771
|
});
|
|
682
772
|
}
|
|
683
|
-
function
|
|
773
|
+
function rn(t) {
|
|
684
774
|
return function() {
|
|
685
775
|
var e = this.__on;
|
|
686
776
|
if (e) {
|
|
687
|
-
for (var n = 0,
|
|
688
|
-
o = e[n], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++
|
|
689
|
-
++
|
|
777
|
+
for (var n = 0, r = -1, i = e.length, o; n < i; ++n)
|
|
778
|
+
o = e[n], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++r] = o;
|
|
779
|
+
++r ? e.length = r : delete this.__on;
|
|
690
780
|
}
|
|
691
781
|
};
|
|
692
782
|
}
|
|
693
|
-
function
|
|
783
|
+
function sn(t, e, n) {
|
|
694
784
|
return function() {
|
|
695
|
-
var
|
|
696
|
-
if (
|
|
697
|
-
for (var a = 0, l =
|
|
698
|
-
if ((
|
|
699
|
-
this.removeEventListener(
|
|
785
|
+
var r = this.__on, i, o = en(e);
|
|
786
|
+
if (r) {
|
|
787
|
+
for (var a = 0, l = r.length; a < l; ++a)
|
|
788
|
+
if ((i = r[a]).type === t.type && i.name === t.name) {
|
|
789
|
+
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = o, i.options = n), i.value = e;
|
|
700
790
|
return;
|
|
701
791
|
}
|
|
702
792
|
}
|
|
703
|
-
this.addEventListener(t.type, o, n),
|
|
793
|
+
this.addEventListener(t.type, o, n), i = { type: t.type, name: t.name, value: e, listener: o, options: n }, r ? r.push(i) : this.__on = [i];
|
|
704
794
|
};
|
|
705
795
|
}
|
|
706
|
-
function
|
|
707
|
-
var
|
|
796
|
+
function on(t, e, n) {
|
|
797
|
+
var r = nn(t + ""), i, o = r.length, a;
|
|
708
798
|
if (arguments.length < 2) {
|
|
709
799
|
var l = this.node().__on;
|
|
710
800
|
if (l) {
|
|
711
801
|
for (var h = 0, u = l.length, d; h < u; ++h)
|
|
712
|
-
for (
|
|
713
|
-
if ((a = i
|
|
802
|
+
for (i = 0, d = l[h]; i < o; ++i)
|
|
803
|
+
if ((a = r[i]).type === d.type && a.name === d.name)
|
|
714
804
|
return d.value;
|
|
715
805
|
}
|
|
716
806
|
return;
|
|
717
807
|
}
|
|
718
|
-
for (l = e ?
|
|
808
|
+
for (l = e ? sn : rn, i = 0; i < o; ++i) this.each(l(r[i], e, n));
|
|
719
809
|
return this;
|
|
720
810
|
}
|
|
721
|
-
function
|
|
722
|
-
var
|
|
723
|
-
typeof
|
|
811
|
+
function xt(t, e, n) {
|
|
812
|
+
var r = dt(t), i = r.CustomEvent;
|
|
813
|
+
typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
|
|
724
814
|
}
|
|
725
|
-
function
|
|
815
|
+
function an(t, e) {
|
|
726
816
|
return function() {
|
|
727
|
-
return
|
|
817
|
+
return xt(this, t, e);
|
|
728
818
|
};
|
|
729
819
|
}
|
|
730
|
-
function
|
|
820
|
+
function ln(t, e) {
|
|
731
821
|
return function() {
|
|
732
|
-
return
|
|
822
|
+
return xt(this, t, e.apply(this, arguments));
|
|
733
823
|
};
|
|
734
824
|
}
|
|
735
|
-
function
|
|
736
|
-
return this.each((typeof e == "function" ?
|
|
825
|
+
function cn(t, e) {
|
|
826
|
+
return this.each((typeof e == "function" ? ln : an)(t, e));
|
|
737
827
|
}
|
|
738
|
-
function*
|
|
828
|
+
function* hn() {
|
|
739
829
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
740
|
-
for (var
|
|
741
|
-
(a = i
|
|
830
|
+
for (var r = t[e], i = 0, o = r.length, a; i < o; ++i)
|
|
831
|
+
(a = r[i]) && (yield a);
|
|
742
832
|
}
|
|
743
|
-
var
|
|
833
|
+
var un = [null];
|
|
744
834
|
function E(t, e) {
|
|
745
835
|
this._groups = t, this._parents = e;
|
|
746
836
|
}
|
|
747
|
-
function
|
|
837
|
+
function fn() {
|
|
748
838
|
return this;
|
|
749
839
|
}
|
|
750
840
|
E.prototype = {
|
|
751
841
|
constructor: E,
|
|
752
|
-
select:
|
|
753
|
-
selectAll:
|
|
754
|
-
selectChild:
|
|
755
|
-
selectChildren:
|
|
756
|
-
filter:
|
|
757
|
-
data:
|
|
758
|
-
enter:
|
|
759
|
-
exit:
|
|
760
|
-
join:
|
|
761
|
-
merge:
|
|
762
|
-
selection:
|
|
763
|
-
order:
|
|
764
|
-
sort:
|
|
765
|
-
call:
|
|
766
|
-
nodes:
|
|
767
|
-
node:
|
|
768
|
-
size:
|
|
769
|
-
empty:
|
|
770
|
-
each:
|
|
771
|
-
attr:
|
|
772
|
-
style:
|
|
773
|
-
property:
|
|
774
|
-
classed:
|
|
775
|
-
text:
|
|
776
|
-
html:
|
|
777
|
-
raise:
|
|
778
|
-
lower:
|
|
779
|
-
append:
|
|
780
|
-
insert:
|
|
781
|
-
remove:
|
|
782
|
-
clone:
|
|
783
|
-
datum:
|
|
784
|
-
on
|
|
785
|
-
dispatch:
|
|
786
|
-
[Symbol.iterator]:
|
|
842
|
+
select: zt,
|
|
843
|
+
selectAll: Ft,
|
|
844
|
+
selectChild: Ot,
|
|
845
|
+
selectChildren: Ut,
|
|
846
|
+
filter: Yt,
|
|
847
|
+
data: te,
|
|
848
|
+
enter: Kt,
|
|
849
|
+
exit: ne,
|
|
850
|
+
join: re,
|
|
851
|
+
merge: ie,
|
|
852
|
+
selection: fn,
|
|
853
|
+
order: se,
|
|
854
|
+
sort: oe,
|
|
855
|
+
call: le,
|
|
856
|
+
nodes: ce,
|
|
857
|
+
node: he,
|
|
858
|
+
size: ue,
|
|
859
|
+
empty: fe,
|
|
860
|
+
each: de,
|
|
861
|
+
attr: ve,
|
|
862
|
+
style: je,
|
|
863
|
+
property: Ce,
|
|
864
|
+
classed: ze,
|
|
865
|
+
text: Ie,
|
|
866
|
+
html: De,
|
|
867
|
+
raise: Oe,
|
|
868
|
+
lower: Xe,
|
|
869
|
+
append: $e,
|
|
870
|
+
insert: Ye,
|
|
871
|
+
remove: Je,
|
|
872
|
+
clone: Qe,
|
|
873
|
+
datum: tn,
|
|
874
|
+
on,
|
|
875
|
+
dispatch: cn,
|
|
876
|
+
[Symbol.iterator]: hn
|
|
787
877
|
};
|
|
788
878
|
function H(t) {
|
|
789
|
-
return typeof t == "string" ? new E([[document.querySelector(t)]], [document.documentElement]) : new E([[t]],
|
|
879
|
+
return typeof t == "string" ? new E([[document.querySelector(t)]], [document.documentElement]) : new E([[t]], un);
|
|
790
880
|
}
|
|
791
|
-
function
|
|
881
|
+
function dn(t) {
|
|
792
882
|
let e;
|
|
793
883
|
for (; e = t.sourceEvent; ) t = e;
|
|
794
884
|
return t;
|
|
795
885
|
}
|
|
796
886
|
function ot(t, e) {
|
|
797
|
-
if (t =
|
|
887
|
+
if (t = dn(t), e === void 0 && (e = t.currentTarget), e) {
|
|
798
888
|
var n = e.ownerSVGElement || e;
|
|
799
889
|
if (n.createSVGPoint) {
|
|
800
|
-
var
|
|
801
|
-
return
|
|
890
|
+
var r = n.createSVGPoint();
|
|
891
|
+
return r.x = t.clientX, r.y = t.clientY, r = r.matrixTransform(e.getScreenCTM().inverse()), [r.x, r.y];
|
|
802
892
|
}
|
|
803
893
|
if (e.getBoundingClientRect) {
|
|
804
|
-
var
|
|
805
|
-
return [t.clientX -
|
|
894
|
+
var i = e.getBoundingClientRect();
|
|
895
|
+
return [t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop];
|
|
806
896
|
}
|
|
807
897
|
}
|
|
808
898
|
return [t.pageX, t.pageY];
|
|
809
899
|
}
|
|
810
|
-
const
|
|
811
|
-
var
|
|
900
|
+
const gn = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%200.75V6.75M0.75%206.75H6.75M0.75%206.75C3.07744%204.66141%205.23287%202.29676%208.49532%201.83779C10.4277%201.56593%2012.3961%201.92941%2014.1039%202.87343C15.8117%203.81746%2017.1664%205.29091%2017.9639%207.07177M18.75%2018.75V12.75M18.75%2012.75H12.75M18.75%2012.75C16.4225%2014.8386%2014.2671%2017.2032%2011.0047%2017.6622C9.07229%2017.9341%207.10391%2017.5706%205.3961%2016.6266C3.68829%2015.6825%202.33356%2014.2091%201.53604%2012.4282'%20stroke='%233367d9'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
901
|
+
var pn = { value: () => {
|
|
812
902
|
} };
|
|
813
903
|
function mt() {
|
|
814
|
-
for (var t = 0, e = arguments.length, n = {},
|
|
815
|
-
if (!(
|
|
816
|
-
n[
|
|
904
|
+
for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
|
|
905
|
+
if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
|
|
906
|
+
n[r] = [];
|
|
817
907
|
}
|
|
818
|
-
return new
|
|
908
|
+
return new $(n);
|
|
819
909
|
}
|
|
820
|
-
function
|
|
910
|
+
function $(t) {
|
|
821
911
|
this._ = t;
|
|
822
912
|
}
|
|
823
|
-
function
|
|
913
|
+
function yn(t, e) {
|
|
824
914
|
return t.trim().split(/^|\s+/).map(function(n) {
|
|
825
|
-
var
|
|
826
|
-
if (
|
|
827
|
-
return { type: n, name:
|
|
915
|
+
var r = "", i = n.indexOf(".");
|
|
916
|
+
if (i >= 0 && (r = n.slice(i + 1), n = n.slice(0, i)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
|
|
917
|
+
return { type: n, name: r };
|
|
828
918
|
});
|
|
829
919
|
}
|
|
830
|
-
|
|
831
|
-
constructor:
|
|
920
|
+
$.prototype = mt.prototype = {
|
|
921
|
+
constructor: $,
|
|
832
922
|
on: function(t, e) {
|
|
833
|
-
var n = this._,
|
|
923
|
+
var n = this._, r = yn(t + "", n), i, o = -1, a = r.length;
|
|
834
924
|
if (arguments.length < 2) {
|
|
835
|
-
for (; ++o < a; ) if ((
|
|
925
|
+
for (; ++o < a; ) if ((i = (t = r[o]).type) && (i = wn(n[i], t.name))) return i;
|
|
836
926
|
return;
|
|
837
927
|
}
|
|
838
928
|
if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
|
|
839
929
|
for (; ++o < a; )
|
|
840
|
-
if (
|
|
841
|
-
else if (e == null) for (
|
|
930
|
+
if (i = (t = r[o]).type) n[i] = at(n[i], t.name, e);
|
|
931
|
+
else if (e == null) for (i in n) n[i] = at(n[i], t.name, null);
|
|
842
932
|
return this;
|
|
843
933
|
},
|
|
844
934
|
copy: function() {
|
|
845
935
|
var t = {}, e = this._;
|
|
846
936
|
for (var n in e) t[n] = e[n].slice();
|
|
847
|
-
return new
|
|
937
|
+
return new $(t);
|
|
848
938
|
},
|
|
849
939
|
call: function(t, e) {
|
|
850
|
-
if ((
|
|
940
|
+
if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i, o; r < i; ++r) n[r] = arguments[r + 2];
|
|
851
941
|
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
852
|
-
for (o = this._[t],
|
|
942
|
+
for (o = this._[t], r = 0, i = o.length; r < i; ++r) o[r].value.apply(e, n);
|
|
853
943
|
},
|
|
854
944
|
apply: function(t, e, n) {
|
|
855
945
|
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
856
|
-
for (var
|
|
946
|
+
for (var r = this._[t], i = 0, o = r.length; i < o; ++i) r[i].value.apply(e, n);
|
|
857
947
|
}
|
|
858
948
|
};
|
|
859
|
-
function
|
|
860
|
-
for (var n = 0,
|
|
861
|
-
if ((
|
|
862
|
-
return
|
|
949
|
+
function wn(t, e) {
|
|
950
|
+
for (var n = 0, r = t.length, i; n < r; ++n)
|
|
951
|
+
if ((i = t[n]).name === e)
|
|
952
|
+
return i.value;
|
|
863
953
|
}
|
|
864
954
|
function at(t, e, n) {
|
|
865
|
-
for (var
|
|
866
|
-
if (t[
|
|
867
|
-
t[
|
|
955
|
+
for (var r = 0, i = t.length; r < i; ++r)
|
|
956
|
+
if (t[r].name === e) {
|
|
957
|
+
t[r] = pn, t = t.slice(0, r).concat(t.slice(r + 1));
|
|
868
958
|
break;
|
|
869
959
|
}
|
|
870
960
|
return n != null && t.push({ name: e, value: n }), t;
|
|
871
961
|
}
|
|
872
|
-
const
|
|
873
|
-
function
|
|
962
|
+
const xn = { passive: !1 }, L = { capture: !0, passive: !1 };
|
|
963
|
+
function K(t) {
|
|
874
964
|
t.stopImmediatePropagation();
|
|
875
965
|
}
|
|
876
966
|
function M(t) {
|
|
877
967
|
t.preventDefault(), t.stopImmediatePropagation();
|
|
878
968
|
}
|
|
879
|
-
function
|
|
880
|
-
var e = t.document.documentElement, n = H(t).on("dragstart.drag", M,
|
|
881
|
-
"onselectstart" in e ? n.on("selectstart.drag", M,
|
|
969
|
+
function mn(t) {
|
|
970
|
+
var e = t.document.documentElement, n = H(t).on("dragstart.drag", M, L);
|
|
971
|
+
"onselectstart" in e ? n.on("selectstart.drag", M, L) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
|
|
882
972
|
}
|
|
883
|
-
function
|
|
884
|
-
var n = t.document.documentElement,
|
|
885
|
-
e && (
|
|
886
|
-
|
|
887
|
-
}, 0)), "onselectstart" in n ?
|
|
973
|
+
function vn(t, e) {
|
|
974
|
+
var n = t.document.documentElement, r = H(t).on("dragstart.drag", null);
|
|
975
|
+
e && (r.on("click.drag", M, L), setTimeout(function() {
|
|
976
|
+
r.on("click.drag", null);
|
|
977
|
+
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
888
978
|
}
|
|
889
|
-
const
|
|
890
|
-
function
|
|
979
|
+
const q = (t) => () => t;
|
|
980
|
+
function G(t, {
|
|
891
981
|
sourceEvent: e,
|
|
892
982
|
subject: n,
|
|
893
|
-
target:
|
|
894
|
-
identifier:
|
|
983
|
+
target: r,
|
|
984
|
+
identifier: i,
|
|
895
985
|
active: o,
|
|
896
986
|
x: a,
|
|
897
987
|
y: l,
|
|
@@ -903,8 +993,8 @@ function tt(t, {
|
|
|
903
993
|
type: { value: t, enumerable: !0, configurable: !0 },
|
|
904
994
|
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
|
|
905
995
|
subject: { value: n, enumerable: !0, configurable: !0 },
|
|
906
|
-
target: { value:
|
|
907
|
-
identifier: { value:
|
|
996
|
+
target: { value: r, enumerable: !0, configurable: !0 },
|
|
997
|
+
identifier: { value: i, enumerable: !0, configurable: !0 },
|
|
908
998
|
active: { value: o, enumerable: !0, configurable: !0 },
|
|
909
999
|
x: { value: a, enumerable: !0, configurable: !0 },
|
|
910
1000
|
y: { value: l, enumerable: !0, configurable: !0 },
|
|
@@ -913,195 +1003,205 @@ function tt(t, {
|
|
|
913
1003
|
_: { value: d }
|
|
914
1004
|
});
|
|
915
1005
|
}
|
|
916
|
-
|
|
1006
|
+
G.prototype.on = function() {
|
|
917
1007
|
var t = this._.on.apply(this._, arguments);
|
|
918
1008
|
return t === this._ ? this : t;
|
|
919
1009
|
};
|
|
920
|
-
function
|
|
1010
|
+
function kn(t) {
|
|
921
1011
|
return !t.ctrlKey && !t.button;
|
|
922
1012
|
}
|
|
923
|
-
function
|
|
1013
|
+
function _n() {
|
|
924
1014
|
return this.parentNode;
|
|
925
1015
|
}
|
|
926
|
-
function
|
|
1016
|
+
function bn(t, e) {
|
|
927
1017
|
return e ?? { x: t.x, y: t.y };
|
|
928
1018
|
}
|
|
929
|
-
function
|
|
1019
|
+
function jn() {
|
|
930
1020
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
931
1021
|
}
|
|
932
|
-
function
|
|
933
|
-
var t =
|
|
934
|
-
function
|
|
935
|
-
c.on("mousedown.drag",
|
|
1022
|
+
function En() {
|
|
1023
|
+
var t = kn, e = _n, n = bn, r = jn, i = {}, o = mt("start", "drag", "end"), a = 0, l, h, u, d, x = 0;
|
|
1024
|
+
function g(c) {
|
|
1025
|
+
c.on("mousedown.drag", m).filter(r).on("touchstart.drag", W).on("touchmove.drag", N, xn).on("touchend.drag touchcancel.drag", j).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
936
1026
|
}
|
|
937
|
-
function
|
|
938
|
-
if (!(d || !t.call(this, c,
|
|
939
|
-
var
|
|
940
|
-
|
|
1027
|
+
function m(c, f) {
|
|
1028
|
+
if (!(d || !t.call(this, c, f))) {
|
|
1029
|
+
var p = A(this, e.call(this, c, f), c, f, "mouse");
|
|
1030
|
+
p && (H(c.view).on("mousemove.drag", v, L).on("mouseup.drag", S, L), mn(c.view), K(c), u = !1, l = c.clientX, h = c.clientY, p("start", c));
|
|
941
1031
|
}
|
|
942
1032
|
}
|
|
943
|
-
function
|
|
1033
|
+
function v(c) {
|
|
944
1034
|
if (M(c), !u) {
|
|
945
|
-
var
|
|
946
|
-
u =
|
|
1035
|
+
var f = c.clientX - l, p = c.clientY - h;
|
|
1036
|
+
u = f * f + p * p > x;
|
|
947
1037
|
}
|
|
948
|
-
|
|
1038
|
+
i.mouse("drag", c);
|
|
949
1039
|
}
|
|
950
1040
|
function S(c) {
|
|
951
|
-
H(c.view).on("mousemove.drag mouseup.drag", null),
|
|
1041
|
+
H(c.view).on("mousemove.drag mouseup.drag", null), vn(c.view, u), M(c), i.mouse("end", c);
|
|
952
1042
|
}
|
|
953
|
-
function W(c,
|
|
954
|
-
if (t.call(this, c,
|
|
955
|
-
var
|
|
956
|
-
for (
|
|
957
|
-
(
|
|
1043
|
+
function W(c, f) {
|
|
1044
|
+
if (t.call(this, c, f)) {
|
|
1045
|
+
var p = c.changedTouches, y = e.call(this, c, f), w = p.length, k, _;
|
|
1046
|
+
for (k = 0; k < w; ++k)
|
|
1047
|
+
(_ = A(this, y, c, f, p[k].identifier, p[k])) && (K(c), _("start", c, p[k]));
|
|
958
1048
|
}
|
|
959
1049
|
}
|
|
960
1050
|
function N(c) {
|
|
961
|
-
var
|
|
962
|
-
for (
|
|
963
|
-
(
|
|
1051
|
+
var f = c.changedTouches, p = f.length, y, w;
|
|
1052
|
+
for (y = 0; y < p; ++y)
|
|
1053
|
+
(w = i[f[y].identifier]) && (M(c), w("drag", c, f[y]));
|
|
964
1054
|
}
|
|
965
|
-
function
|
|
966
|
-
var
|
|
1055
|
+
function j(c) {
|
|
1056
|
+
var f = c.changedTouches, p = f.length, y, w;
|
|
967
1057
|
for (d && clearTimeout(d), d = setTimeout(function() {
|
|
968
1058
|
d = null;
|
|
969
|
-
}, 500),
|
|
970
|
-
(
|
|
1059
|
+
}, 500), y = 0; y < p; ++y)
|
|
1060
|
+
(w = i[f[y].identifier]) && (K(c), w("end", c, f[y]));
|
|
971
1061
|
}
|
|
972
|
-
function
|
|
973
|
-
var
|
|
974
|
-
if ((
|
|
975
|
-
sourceEvent:
|
|
976
|
-
target:
|
|
977
|
-
identifier:
|
|
1062
|
+
function A(c, f, p, y, w, k) {
|
|
1063
|
+
var _ = o.copy(), b = ot(k || p, f), D, V, B;
|
|
1064
|
+
if ((B = n.call(c, new G("beforestart", {
|
|
1065
|
+
sourceEvent: p,
|
|
1066
|
+
target: g,
|
|
1067
|
+
identifier: w,
|
|
978
1068
|
active: a,
|
|
979
|
-
x:
|
|
980
|
-
y:
|
|
1069
|
+
x: b[0],
|
|
1070
|
+
y: b[1],
|
|
981
1071
|
dx: 0,
|
|
982
1072
|
dy: 0,
|
|
983
|
-
dispatch:
|
|
984
|
-
}),
|
|
985
|
-
return
|
|
986
|
-
var
|
|
987
|
-
switch (
|
|
1073
|
+
dispatch: _
|
|
1074
|
+
}), y)) != null)
|
|
1075
|
+
return D = B.x - b[0] || 0, V = B.y - b[1] || 0, function tt(R, P, O) {
|
|
1076
|
+
var et = b, Y;
|
|
1077
|
+
switch (R) {
|
|
988
1078
|
case "start":
|
|
989
|
-
|
|
1079
|
+
i[w] = tt, Y = a++;
|
|
990
1080
|
break;
|
|
991
1081
|
case "end":
|
|
992
|
-
delete
|
|
1082
|
+
delete i[w], --a;
|
|
993
1083
|
case "drag":
|
|
994
|
-
|
|
1084
|
+
b = ot(O || P, f), Y = a;
|
|
995
1085
|
break;
|
|
996
1086
|
}
|
|
997
|
-
|
|
998
|
-
|
|
1087
|
+
_.call(
|
|
1088
|
+
R,
|
|
999
1089
|
c,
|
|
1000
|
-
new
|
|
1090
|
+
new G(R, {
|
|
1001
1091
|
sourceEvent: P,
|
|
1002
|
-
subject:
|
|
1003
|
-
target:
|
|
1004
|
-
identifier:
|
|
1005
|
-
active:
|
|
1006
|
-
x:
|
|
1007
|
-
y:
|
|
1008
|
-
dx:
|
|
1009
|
-
dy:
|
|
1010
|
-
dispatch:
|
|
1092
|
+
subject: B,
|
|
1093
|
+
target: g,
|
|
1094
|
+
identifier: w,
|
|
1095
|
+
active: Y,
|
|
1096
|
+
x: b[0] + D,
|
|
1097
|
+
y: b[1] + V,
|
|
1098
|
+
dx: b[0] - et[0],
|
|
1099
|
+
dy: b[1] - et[1],
|
|
1100
|
+
dispatch: _
|
|
1011
1101
|
}),
|
|
1012
|
-
|
|
1102
|
+
y
|
|
1013
1103
|
);
|
|
1014
1104
|
};
|
|
1015
1105
|
}
|
|
1016
|
-
return
|
|
1017
|
-
return arguments.length ? (t = typeof c == "function" ? c :
|
|
1018
|
-
},
|
|
1019
|
-
return arguments.length ? (e = typeof c == "function" ? c :
|
|
1020
|
-
},
|
|
1021
|
-
return arguments.length ? (n = typeof c == "function" ? c :
|
|
1022
|
-
},
|
|
1023
|
-
return arguments.length ? (
|
|
1024
|
-
},
|
|
1106
|
+
return g.filter = function(c) {
|
|
1107
|
+
return arguments.length ? (t = typeof c == "function" ? c : q(!!c), g) : t;
|
|
1108
|
+
}, g.container = function(c) {
|
|
1109
|
+
return arguments.length ? (e = typeof c == "function" ? c : q(c), g) : e;
|
|
1110
|
+
}, g.subject = function(c) {
|
|
1111
|
+
return arguments.length ? (n = typeof c == "function" ? c : q(c), g) : n;
|
|
1112
|
+
}, g.touchable = function(c) {
|
|
1113
|
+
return arguments.length ? (r = typeof c == "function" ? c : q(!!c), g) : r;
|
|
1114
|
+
}, g.on = function() {
|
|
1025
1115
|
var c = o.on.apply(o, arguments);
|
|
1026
|
-
return c === o ?
|
|
1027
|
-
},
|
|
1028
|
-
return arguments.length ? (
|
|
1029
|
-
},
|
|
1116
|
+
return c === o ? g : c;
|
|
1117
|
+
}, g.clickDistance = function(c) {
|
|
1118
|
+
return arguments.length ? (x = (c = +c) * c, g) : Math.sqrt(x);
|
|
1119
|
+
}, g;
|
|
1030
1120
|
}
|
|
1031
|
-
const
|
|
1121
|
+
const Sn = ({ id: t, data: e, style: n }) => {
|
|
1032
1122
|
const r = z(
|
|
1033
|
-
(
|
|
1034
|
-
),
|
|
1123
|
+
(f) => f.stickers.find((p) => p.id === e.stickerId)
|
|
1124
|
+
), i = z((f) => f.updateSticker), o = z((f) => f.bringToFront), a = z((f) => f.selectSticker), l = z((f) => f.selectedId), { setNodes: h } = bt(), u = F(null), d = F(0), x = F({ width: 0, height: 0 }), [g, m] = I(0), [v, S] = I({ width: 140, height: 140 }), [W, N] = I(!1), j = l === (r == null ? void 0 : r.id);
|
|
1035
1125
|
T(() => {
|
|
1036
1126
|
if (!r) return;
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1127
|
+
const f = Number(r.width) || 140, p = Number(r.height) || 140, y = Number(r.rotation) || 0;
|
|
1128
|
+
S({ width: f, height: p }), x.current = { width: f, height: p }, d.current = y, m(y);
|
|
1039
1129
|
}, [r]), T(() => {
|
|
1040
|
-
|
|
1041
|
-
}, [
|
|
1130
|
+
d.current = g;
|
|
1131
|
+
}, [g]), T(() => {
|
|
1042
1132
|
if (!r || !j) return;
|
|
1043
|
-
const
|
|
1044
|
-
if (!
|
|
1045
|
-
const p = H(
|
|
1046
|
-
var
|
|
1047
|
-
(
|
|
1133
|
+
const f = u.current;
|
|
1134
|
+
if (!f) return;
|
|
1135
|
+
const p = H(f), y = En().on("start", (w) => {
|
|
1136
|
+
var k, _;
|
|
1137
|
+
(_ = (k = w.sourceEvent) == null ? void 0 : k.stopPropagation) == null || _.call(k), N(!0);
|
|
1048
1138
|
}).on("drag", (w) => {
|
|
1049
|
-
var
|
|
1050
|
-
const
|
|
1051
|
-
if (!
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1139
|
+
var P, O;
|
|
1140
|
+
const k = (O = (P = w.sourceEvent) == null ? void 0 : P.target) == null ? void 0 : O.parentElement;
|
|
1141
|
+
if (!k) return;
|
|
1142
|
+
const _ = k.getBoundingClientRect(), b = _.left + _.width / 2, D = _.top + _.height / 2, V = w.sourceEvent.clientX - b, B = w.sourceEvent.clientY - D, R = Math.atan2(B, V) * (180 / Math.PI) + 90;
|
|
1143
|
+
d.current = R, m(R);
|
|
1054
1144
|
}).on("end", () => {
|
|
1055
|
-
|
|
1056
|
-
const w = Number(
|
|
1057
|
-
|
|
1145
|
+
N(!1);
|
|
1146
|
+
const w = Number(d.current) || 0;
|
|
1147
|
+
i(r.id, { rotation: w });
|
|
1058
1148
|
});
|
|
1059
|
-
return p.call(
|
|
1060
|
-
}, [j, r,
|
|
1061
|
-
const
|
|
1149
|
+
return p.call(y), () => p.on(".drag", null);
|
|
1150
|
+
}, [j, r, i]);
|
|
1151
|
+
const A = _t(() => {
|
|
1062
1152
|
if (!r) return null;
|
|
1063
|
-
const
|
|
1064
|
-
return
|
|
1065
|
-
}, [r]),
|
|
1066
|
-
|
|
1153
|
+
const f = it[r.shapeId];
|
|
1154
|
+
return f ? f(r) : it.square(r);
|
|
1155
|
+
}, [r]), c = (f) => {
|
|
1156
|
+
f.stopPropagation(), r && (o(r.id), a(r.id));
|
|
1067
1157
|
};
|
|
1068
1158
|
return r ? /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(
|
|
1069
1159
|
"div",
|
|
1070
1160
|
{
|
|
1071
|
-
onClick:
|
|
1161
|
+
onClick: c,
|
|
1162
|
+
className: "dragHandle__custom",
|
|
1072
1163
|
style: {
|
|
1073
1164
|
...n,
|
|
1074
1165
|
position: "relative",
|
|
1075
1166
|
zIndex: r.zIndex,
|
|
1076
|
-
cursor:
|
|
1077
|
-
width:
|
|
1078
|
-
height:
|
|
1079
|
-
transform: `rotate(${
|
|
1167
|
+
cursor: W ? "grabbing" : "grab",
|
|
1168
|
+
width: v.width,
|
|
1169
|
+
height: v.height,
|
|
1170
|
+
transform: `rotate(${g}deg)`,
|
|
1080
1171
|
transformOrigin: "50% 50%",
|
|
1081
1172
|
pointerEvents: "auto"
|
|
1082
1173
|
},
|
|
1083
|
-
"data-drag-disabled":
|
|
1174
|
+
"data-drag-disabled": W,
|
|
1084
1175
|
children: [
|
|
1085
1176
|
/* @__PURE__ */ s.jsx(
|
|
1086
|
-
|
|
1177
|
+
jt,
|
|
1087
1178
|
{
|
|
1088
1179
|
isVisible: j,
|
|
1089
1180
|
minWidth: 30,
|
|
1090
1181
|
minHeight: 30,
|
|
1091
|
-
resizeHandles: [
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1182
|
+
resizeHandles: [
|
|
1183
|
+
"top",
|
|
1184
|
+
"right",
|
|
1185
|
+
"bottom",
|
|
1186
|
+
"left",
|
|
1187
|
+
"topRight",
|
|
1188
|
+
"topLeft",
|
|
1189
|
+
"bottomRight",
|
|
1190
|
+
"bottomLeft"
|
|
1191
|
+
],
|
|
1192
|
+
onResize: (f, p) => {
|
|
1193
|
+
const y = Number(p.width) || 1, w = Number(p.height) || 1;
|
|
1194
|
+
S({ width: y, height: w }), x.current = { width: y, height: w };
|
|
1095
1195
|
},
|
|
1096
|
-
onResizeEnd: async (
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1099
|
-
(
|
|
1100
|
-
),
|
|
1196
|
+
onResizeEnd: async (f, p) => {
|
|
1197
|
+
const y = Math.max(1, Math.round(p.width)), w = Math.max(1, Math.round(p.height)), k = Number(d.current) || 0;
|
|
1198
|
+
S({ width: y, height: w }), x.current = { width: y, height: w }, h(
|
|
1199
|
+
(_) => _.map((b) => b.id === t ? { ...b, style: { ...b.style, width: y, height: w } } : b)
|
|
1200
|
+
), i(r.id, { width: y, height: w });
|
|
1101
1201
|
try {
|
|
1102
|
-
await
|
|
1103
|
-
} catch (
|
|
1104
|
-
console.warn("Не удалось сохранить размеры фигуры",
|
|
1202
|
+
await J.updateBoardTransform(t, y, w, k);
|
|
1203
|
+
} catch (_) {
|
|
1204
|
+
console.warn("Не удалось сохранить размеры фигуры", _);
|
|
1105
1205
|
}
|
|
1106
1206
|
}
|
|
1107
1207
|
}
|
|
@@ -1109,17 +1209,17 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
|
|
|
1109
1209
|
/* @__PURE__ */ s.jsx(
|
|
1110
1210
|
"svg",
|
|
1111
1211
|
{
|
|
1112
|
-
width:
|
|
1113
|
-
height:
|
|
1212
|
+
width: v.width,
|
|
1213
|
+
height: v.height,
|
|
1114
1214
|
viewBox: "0 0 100 100",
|
|
1115
1215
|
preserveAspectRatio: "none",
|
|
1116
|
-
children:
|
|
1216
|
+
children: A
|
|
1117
1217
|
}
|
|
1118
1218
|
),
|
|
1119
1219
|
j && /* @__PURE__ */ s.jsx(
|
|
1120
1220
|
"div",
|
|
1121
1221
|
{
|
|
1122
|
-
ref:
|
|
1222
|
+
ref: u,
|
|
1123
1223
|
className: "nodrag nopan",
|
|
1124
1224
|
style: {
|
|
1125
1225
|
position: "absolute",
|
|
@@ -1130,13 +1230,13 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
|
|
|
1130
1230
|
cursor: "grab",
|
|
1131
1231
|
zIndex: 1e3,
|
|
1132
1232
|
pointerEvents: "auto",
|
|
1133
|
-
transform: `translateX(-50%) rotate(${
|
|
1134
|
-
transition:
|
|
1233
|
+
transform: `translateX(-50%) rotate(${g}deg)`,
|
|
1234
|
+
transition: W ? "none" : "transform 0.15s ease-out"
|
|
1135
1235
|
},
|
|
1136
1236
|
children: /* @__PURE__ */ s.jsx(
|
|
1137
1237
|
"img",
|
|
1138
1238
|
{
|
|
1139
|
-
src:
|
|
1239
|
+
src: gn,
|
|
1140
1240
|
alt: "Rotate",
|
|
1141
1241
|
draggable: !1,
|
|
1142
1242
|
style: {
|
|
@@ -1153,103 +1253,12 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
|
|
|
1153
1253
|
]
|
|
1154
1254
|
}
|
|
1155
1255
|
) }) : null;
|
|
1156
|
-
}, bn = {
|
|
1157
|
-
square: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1158
|
-
circle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1159
|
-
triangle: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,34 6,34", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1160
|
-
star: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx(
|
|
1161
|
-
"polygon",
|
|
1162
|
-
{
|
|
1163
|
-
points: "20,4 25,16 38,16 27,24 32,36 20,28 8,36 13,24 2,16 15,16",
|
|
1164
|
-
stroke: "black",
|
|
1165
|
-
fill: "none",
|
|
1166
|
-
strokeWidth: "2"
|
|
1167
|
-
}
|
|
1168
|
-
) }),
|
|
1169
|
-
stick: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("rect", { x: "16", y: "4", width: "8", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1170
|
-
line: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", children: /* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "36", y2: "20", stroke: "black", strokeWidth: "2" }) }),
|
|
1171
|
-
arrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
|
|
1172
|
-
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "20", x2: "30", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
1173
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "30,14 38,20 30,26", fill: "black" })
|
|
1174
|
-
] }),
|
|
1175
|
-
dblarrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", children: [
|
|
1176
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "4,20 12,14 12,26", fill: "black" }),
|
|
1177
|
-
/* @__PURE__ */ s.jsx("line", { x1: "12", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
1178
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "28,14 36,20 28,26", fill: "black" })
|
|
1179
|
-
] }),
|
|
1180
|
-
parallelogram: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "8,8 34,8 26,32 0,32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1181
|
-
roundedRect: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "10", width: "28", height: "20", rx: "4", ry: "4", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1182
|
-
capsule: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("rect", { x: "6", y: "14", width: "28", height: "12", rx: "6", ry: "6", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1183
|
-
pentagon: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: /* @__PURE__ */ s.jsx("polygon", { points: "20,6 34,15 28,32 12,32 6,15", stroke: "black", fill: "none", strokeWidth: "2" }) }),
|
|
1184
|
-
chevron: /* @__PURE__ */ s.jsx("svg", { width: "40", height: "40", viewBox: "0 0 100 100", children: /* @__PURE__ */ s.jsx(
|
|
1185
|
-
"polyline",
|
|
1186
|
-
{
|
|
1187
|
-
points: "0,0 50,100 100,0",
|
|
1188
|
-
fill: "none",
|
|
1189
|
-
stroke: "black",
|
|
1190
|
-
strokeWidth: "5"
|
|
1191
|
-
}
|
|
1192
|
-
) }),
|
|
1193
|
-
table3x3: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
1194
|
-
/* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
1195
|
-
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
1196
|
-
/* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
1197
|
-
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "14", x2: "36", y2: "14", stroke: "black", strokeWidth: "2" }),
|
|
1198
|
-
/* @__PURE__ */ s.jsx("line", { x1: "4", y1: "26", x2: "36", y2: "26", stroke: "black", strokeWidth: "2" })
|
|
1199
|
-
] }),
|
|
1200
|
-
pyramid: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
1201
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "20,4 36,36 4,36", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
1202
|
-
/* @__PURE__ */ s.jsx("line", { x1: "15", y1: "12", x2: "25", y2: "12", stroke: "black", strokeWidth: "2" }),
|
|
1203
|
-
/* @__PURE__ */ s.jsx("line", { x1: "11", y1: "20", x2: "28", y2: "20", stroke: "black", strokeWidth: "2" }),
|
|
1204
|
-
/* @__PURE__ */ s.jsx("line", { x1: "7", y1: "28", x2: "32", y2: "28", stroke: "black", strokeWidth: "2" })
|
|
1205
|
-
] }),
|
|
1206
|
-
circleArrow: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
1207
|
-
/* @__PURE__ */ s.jsx("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
1208
|
-
/* @__PURE__ */ s.jsx("line", { x1: "20", y1: "6", x2: "20", y2: "0", stroke: "black", strokeWidth: "2" }),
|
|
1209
|
-
/* @__PURE__ */ s.jsx("polygon", { points: "18,2 22,2 20,0", fill: "black" })
|
|
1210
|
-
] }),
|
|
1211
|
-
table3x3LeftMerge: /* @__PURE__ */ s.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", children: [
|
|
1212
|
-
/* @__PURE__ */ s.jsx("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }),
|
|
1213
|
-
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "4", x2: "14", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
1214
|
-
/* @__PURE__ */ s.jsx("line", { x1: "26", y1: "4", x2: "26", y2: "36", stroke: "black", strokeWidth: "2" }),
|
|
1215
|
-
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "16", x2: "36", y2: "16", stroke: "black", strokeWidth: "2" }),
|
|
1216
|
-
/* @__PURE__ */ s.jsx("line", { x1: "14", y1: "28", x2: "36", y2: "28", stroke: "black", strokeWidth: "2" })
|
|
1217
|
-
] })
|
|
1218
|
-
}, jn = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", En = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", Sn = () => {
|
|
1219
|
-
const [t, e] = L(!1), n = F(null), i = (o) => {
|
|
1220
|
-
o.stopPropagation(), e((a) => !a);
|
|
1221
|
-
};
|
|
1222
|
-
T(() => {
|
|
1223
|
-
if (!t) return;
|
|
1224
|
-
const o = (a) => {
|
|
1225
|
-
n.current && !n.current.contains(a.target) && e(!1);
|
|
1226
|
-
};
|
|
1227
|
-
return window.addEventListener("pointerdown", o), () => window.removeEventListener("pointerdown", o);
|
|
1228
|
-
}, [t]);
|
|
1229
|
-
const r = (o) => (a) => {
|
|
1230
|
-
a.stopPropagation(), a.dataTransfer.setData(kt, JSON.stringify({ shapeId: o.id })), a.dataTransfer.effectAllowed = "copy";
|
|
1231
|
-
};
|
|
1232
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "left-toolbar-container", ref: n, onClick: (o) => o.stopPropagation(), children: [
|
|
1233
|
-
/* @__PURE__ */ s.jsx("div", { className: `toolbar-card ${t ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ s.jsx("button", { onClick: i, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${t ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ s.jsx("div", { className: `toolbar-shape-plate ${t ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ s.jsx("img", { src: t ? En : jn, alt: "Фигуры", draggable: !1 }) }) }) }),
|
|
1234
|
-
t && /* @__PURE__ */ s.jsx("div", { className: "palette-wrapper", onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ s.jsx("div", { className: "shape-panel", children: /* @__PURE__ */ s.jsx("div", { className: "shape-grid", children: St.map((o) => /* @__PURE__ */ s.jsx(
|
|
1235
|
-
"button",
|
|
1236
|
-
{
|
|
1237
|
-
className: "shape-item",
|
|
1238
|
-
draggable: !0,
|
|
1239
|
-
onDragStart: r(o),
|
|
1240
|
-
title: o.name,
|
|
1241
|
-
children: bn[o.id]
|
|
1242
|
-
},
|
|
1243
|
-
o.id
|
|
1244
|
-
)) }) }) }),
|
|
1245
|
-
/* @__PURE__ */ s.jsx(vt, { shapeOpen: t })
|
|
1246
|
-
] });
|
|
1247
1256
|
}, Wn = {
|
|
1248
|
-
shape:
|
|
1249
|
-
},
|
|
1257
|
+
shape: Sn
|
|
1258
|
+
}, X = ({ children: t }) => /* @__PURE__ */ s.jsx("div", { children: t }), Bn = ({ nodeTypes: t }) => {
|
|
1250
1259
|
const e = z((o) => o.setStickers);
|
|
1251
1260
|
F(null);
|
|
1252
|
-
const [n,
|
|
1261
|
+
const [n, r] = I(() => X);
|
|
1253
1262
|
({
|
|
1254
1263
|
...Wn,
|
|
1255
1264
|
...t || {}
|
|
@@ -1257,30 +1266,30 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
|
|
|
1257
1266
|
(async () => {
|
|
1258
1267
|
try {
|
|
1259
1268
|
const [a, l] = await Promise.all([
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
]), h = new Map(a.map((
|
|
1269
|
+
J.getAll(),
|
|
1270
|
+
J.getBoard()
|
|
1271
|
+
]), h = new Map(a.map((g) => [String(g.id), g.shapeId]));
|
|
1263
1272
|
let u = 30, d = 30;
|
|
1264
|
-
const
|
|
1265
|
-
for (const
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1268
|
-
id:
|
|
1269
|
-
stickerId:
|
|
1273
|
+
const x = [];
|
|
1274
|
+
for (const g of l) {
|
|
1275
|
+
const m = g.width ?? 140, v = g.height ?? 140, S = g.rotation ?? 0, W = h.get(String(g.shapeId)) ?? "square";
|
|
1276
|
+
x.push({
|
|
1277
|
+
id: g.id,
|
|
1278
|
+
stickerId: g.id,
|
|
1270
1279
|
type: "shape",
|
|
1271
1280
|
shapeId: W,
|
|
1272
|
-
shapeDbId:
|
|
1281
|
+
shapeDbId: g.shapeId,
|
|
1273
1282
|
x: u,
|
|
1274
1283
|
y: d,
|
|
1275
|
-
width:
|
|
1276
|
-
height:
|
|
1284
|
+
width: m,
|
|
1285
|
+
height: v,
|
|
1277
1286
|
rotation: S,
|
|
1278
1287
|
zIndex: 1,
|
|
1279
1288
|
fill: "transparent",
|
|
1280
1289
|
stroke: "#000"
|
|
1281
1290
|
}), u += 24, d += 24;
|
|
1282
1291
|
}
|
|
1283
|
-
e(
|
|
1292
|
+
e(x);
|
|
1284
1293
|
} catch (a) {
|
|
1285
1294
|
console.warn("Не удалось загрузить доску для фигур:", a);
|
|
1286
1295
|
}
|
|
@@ -1291,22 +1300,22 @@ const vt = ({ id: t, data: e, style: n, shapeOpen: i }) => {
|
|
|
1291
1300
|
if (!o)
|
|
1292
1301
|
return;
|
|
1293
1302
|
const l = (a && (a.Widget || a.default || (a == null ? void 0 : a.widget) || (a == null ? void 0 : a.XyflowWidget))) ?? null;
|
|
1294
|
-
typeof l == "function" ||
|
|
1303
|
+
typeof l == "function" || kt.isValidElement(l) ? r(() => l) : r(() => X);
|
|
1295
1304
|
}).catch(() => {
|
|
1296
|
-
o &&
|
|
1305
|
+
o && r(() => X);
|
|
1297
1306
|
}), () => {
|
|
1298
1307
|
o = !1;
|
|
1299
1308
|
};
|
|
1300
1309
|
}, []);
|
|
1301
|
-
const
|
|
1302
|
-
return /* @__PURE__ */ s.jsx(
|
|
1310
|
+
const i = n || X;
|
|
1311
|
+
return /* @__PURE__ */ s.jsx(i, { children: /* @__PURE__ */ s.jsx("div", { className: "relative flex h-screen w-screen bg-gray-100", children: /* @__PURE__ */ s.jsx(Ct, {}) }) });
|
|
1303
1312
|
};
|
|
1304
1313
|
export {
|
|
1305
1314
|
Bn as S,
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1315
|
+
Et as a,
|
|
1316
|
+
J as b,
|
|
1317
|
+
Sn as c,
|
|
1318
|
+
Ct as d,
|
|
1310
1319
|
Wn as s
|
|
1311
1320
|
};
|
|
1312
|
-
//# sourceMappingURL=ShapeBoardWidget-
|
|
1321
|
+
//# sourceMappingURL=ShapeBoardWidget-BmgYD5zN.js.map
|