nam-rich-text-editor 9.0.3 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rich-text-editor.es.js +965 -906
- package/dist/rich-text-editor.umd.js +6 -6
- package/dist/toolbars/HyperlinkButton.d.ts +1 -0
- package/dist/toolbars/InsertVideoButton.d.ts +1 -0
- package/dist/toolbars/QuoteButton.d.ts +1 -0
- package/dist/toolbars/RemoveFormatButton.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Kr, { useRef as
|
|
2
|
-
function
|
|
1
|
+
import Kr, { useRef as On, useEffect as Qr } from "react";
|
|
2
|
+
function Zr() {
|
|
3
3
|
const d = document.createElement("select");
|
|
4
4
|
return d.innerHTML = `
|
|
5
5
|
<option value="Arial">Arial</option>
|
|
@@ -30,8 +30,8 @@ function to() {
|
|
|
30
30
|
<option value="h3">Heading 3</option>
|
|
31
31
|
<option value="h4">Heading 4</option>
|
|
32
32
|
`, d.onchange = () => {
|
|
33
|
-
const
|
|
34
|
-
document.execCommand("formatBlock", !1, `<${
|
|
33
|
+
const h = d.value, g = h === "p" ? "P" : h.toUpperCase();
|
|
34
|
+
document.execCommand("formatBlock", !1, `<${g}>`);
|
|
35
35
|
}, d;
|
|
36
36
|
}
|
|
37
37
|
const no = {
|
|
@@ -45,18 +45,18 @@ const no = {
|
|
|
45
45
|
"stroke-linecap": "round",
|
|
46
46
|
"stroke-linejoin": "round"
|
|
47
47
|
};
|
|
48
|
-
const jn = ([d,
|
|
48
|
+
const jn = ([d, h, g]) => {
|
|
49
49
|
const f = document.createElementNS("http://www.w3.org/2000/svg", d);
|
|
50
|
-
return Object.keys(
|
|
51
|
-
f.setAttribute(
|
|
52
|
-
}),
|
|
53
|
-
const
|
|
54
|
-
f.appendChild(
|
|
50
|
+
return Object.keys(h).forEach((y) => {
|
|
51
|
+
f.setAttribute(y, String(h[y]));
|
|
52
|
+
}), g?.length && g.forEach((y) => {
|
|
53
|
+
const T = jn(y);
|
|
54
|
+
f.appendChild(T);
|
|
55
55
|
}), f;
|
|
56
|
-
},
|
|
56
|
+
}, te = (d, h = {}) => {
|
|
57
57
|
const f = {
|
|
58
58
|
...no,
|
|
59
|
-
...
|
|
59
|
+
...h
|
|
60
60
|
};
|
|
61
61
|
return jn(["svg", f, d]);
|
|
62
62
|
};
|
|
@@ -74,18 +74,22 @@ const io = [
|
|
|
74
74
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
|
|
75
75
|
];
|
|
76
76
|
const ao = [
|
|
77
|
+
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }],
|
|
78
|
+
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }]
|
|
79
|
+
];
|
|
80
|
+
const so = [
|
|
77
81
|
["path", { d: "M21 5H11" }],
|
|
78
82
|
["path", { d: "M21 12H11" }],
|
|
79
83
|
["path", { d: "M21 19H11" }],
|
|
80
84
|
["path", { d: "m7 8-4 4 4 4" }]
|
|
81
85
|
];
|
|
82
|
-
const
|
|
86
|
+
const co = [
|
|
83
87
|
["path", { d: "M21 5H11" }],
|
|
84
88
|
["path", { d: "M21 12H11" }],
|
|
85
89
|
["path", { d: "M21 19H11" }],
|
|
86
90
|
["path", { d: "m3 8 4 4-4 4" }]
|
|
87
91
|
];
|
|
88
|
-
const
|
|
92
|
+
const lo = [
|
|
89
93
|
["path", { d: "M11 5h10" }],
|
|
90
94
|
["path", { d: "M11 12h10" }],
|
|
91
95
|
["path", { d: "M11 19h10" }],
|
|
@@ -93,7 +97,7 @@ const co = [
|
|
|
93
97
|
["path", { d: "M4 9h2" }],
|
|
94
98
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
|
|
95
99
|
];
|
|
96
|
-
const
|
|
100
|
+
const uo = [
|
|
97
101
|
["path", { d: "M3 5h.01" }],
|
|
98
102
|
["path", { d: "M3 12h.01" }],
|
|
99
103
|
["path", { d: "M3 19h.01" }],
|
|
@@ -101,226 +105,273 @@ const lo = [
|
|
|
101
105
|
["path", { d: "M8 12h13" }],
|
|
102
106
|
["path", { d: "M8 19h13" }]
|
|
103
107
|
];
|
|
104
|
-
const
|
|
108
|
+
const po = [
|
|
105
109
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }],
|
|
106
110
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }],
|
|
107
111
|
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }],
|
|
108
112
|
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" }]
|
|
109
113
|
];
|
|
110
|
-
const
|
|
114
|
+
const fo = [
|
|
111
115
|
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }],
|
|
112
116
|
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }],
|
|
113
117
|
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }],
|
|
114
118
|
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" }]
|
|
115
119
|
];
|
|
116
|
-
const
|
|
120
|
+
const ho = [
|
|
121
|
+
[
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"path",
|
|
129
|
+
{
|
|
130
|
+
d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
];
|
|
134
|
+
const vo = [
|
|
117
135
|
["path", { d: "M21 7v6h-6" }],
|
|
118
136
|
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" }]
|
|
119
137
|
];
|
|
120
|
-
const
|
|
138
|
+
const go = [
|
|
139
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }],
|
|
140
|
+
["path", { d: "M3 3v5h5" }]
|
|
141
|
+
];
|
|
142
|
+
const mo = [
|
|
121
143
|
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
|
|
122
144
|
["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
|
|
123
145
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
|
|
124
146
|
];
|
|
125
|
-
const
|
|
147
|
+
const yo = [
|
|
126
148
|
["path", { d: "M21 5H3" }],
|
|
127
149
|
["path", { d: "M17 12H7" }],
|
|
128
150
|
["path", { d: "M19 19H5" }]
|
|
129
151
|
];
|
|
130
|
-
const
|
|
152
|
+
const bo = [
|
|
131
153
|
["path", { d: "M21 5H3" }],
|
|
132
154
|
["path", { d: "M21 12H9" }],
|
|
133
155
|
["path", { d: "M21 19H7" }]
|
|
134
156
|
];
|
|
135
|
-
const
|
|
157
|
+
const xo = [
|
|
136
158
|
["path", { d: "M3 5h18" }],
|
|
137
159
|
["path", { d: "M3 12h18" }],
|
|
138
160
|
["path", { d: "M3 19h18" }]
|
|
139
161
|
];
|
|
140
|
-
const
|
|
162
|
+
const wo = [
|
|
141
163
|
["path", { d: "M21 5H3" }],
|
|
142
164
|
["path", { d: "M15 12H3" }],
|
|
143
165
|
["path", { d: "M17 19H3" }]
|
|
144
166
|
];
|
|
145
|
-
const
|
|
167
|
+
const Eo = [
|
|
146
168
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
|
|
147
169
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
|
|
148
170
|
];
|
|
149
|
-
const
|
|
171
|
+
const ko = [
|
|
150
172
|
["path", { d: "M3 7v6h6" }],
|
|
151
173
|
["path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }]
|
|
152
174
|
];
|
|
153
|
-
|
|
175
|
+
const To = [
|
|
176
|
+
["path", { d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" }],
|
|
177
|
+
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
|
|
178
|
+
];
|
|
179
|
+
function So() {
|
|
154
180
|
const d = document.createDocumentFragment();
|
|
155
181
|
return [
|
|
156
182
|
{ command: "bold", icon: ro, title: "Bold" },
|
|
157
183
|
{ command: "italic", icon: io, title: "Italic" },
|
|
158
|
-
{ command: "underline", icon:
|
|
159
|
-
{ command: "strikeThrough", icon:
|
|
160
|
-
].forEach((
|
|
161
|
-
const f = document.createElement("button"),
|
|
162
|
-
f.appendChild(
|
|
184
|
+
{ command: "underline", icon: Eo, title: "Underline" },
|
|
185
|
+
{ command: "strikeThrough", icon: mo, title: "Strikethrough" }
|
|
186
|
+
].forEach((g) => {
|
|
187
|
+
const f = document.createElement("button"), y = te(g.icon, { width: 16, height: 16 });
|
|
188
|
+
f.appendChild(y), f.title = g.title, f.style.fontWeight = g.command === "bold" ? "bold" : "normal", f.style.fontStyle = g.command === "italic" ? "italic" : "normal", f.style.textDecoration = g.command === "underline" ? "underline" : "none", f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "6px 10px", f.style.borderRadius = "3px", f.style.cursor = "pointer", f.style.color = "#000000", f.onmouseover = () => f.style.backgroundColor = "#f0f0f0", f.onmouseout = () => f.style.backgroundColor = "#ffffff", f.onclick = () => document.execCommand(g.command), d.appendChild(f);
|
|
163
189
|
}), d;
|
|
164
190
|
}
|
|
165
|
-
let
|
|
191
|
+
let $e = null;
|
|
166
192
|
function Pe(d) {
|
|
167
193
|
if (d) {
|
|
168
|
-
|
|
194
|
+
$e = d.cloneRange();
|
|
169
195
|
return;
|
|
170
196
|
}
|
|
171
|
-
const
|
|
172
|
-
if (!
|
|
173
|
-
|
|
197
|
+
const h = window.getSelection();
|
|
198
|
+
if (!h || h.rangeCount === 0) {
|
|
199
|
+
$e = null;
|
|
174
200
|
return;
|
|
175
201
|
}
|
|
176
|
-
|
|
202
|
+
$e = h.getRangeAt(0).cloneRange();
|
|
177
203
|
}
|
|
178
|
-
function
|
|
204
|
+
function Pn() {
|
|
179
205
|
const d = window.getSelection();
|
|
180
|
-
d && (d.removeAllRanges(),
|
|
206
|
+
d && (d.removeAllRanges(), $e && d.addRange($e.cloneRange()));
|
|
181
207
|
}
|
|
182
|
-
function Fn(d,
|
|
183
|
-
const
|
|
184
|
-
if (!
|
|
185
|
-
const f =
|
|
208
|
+
function Fn(d, h) {
|
|
209
|
+
const g = window.getSelection();
|
|
210
|
+
if (!g || g.rangeCount === 0) return;
|
|
211
|
+
const f = g.getRangeAt(0);
|
|
186
212
|
if (!f.collapsed) {
|
|
187
213
|
const z = document.createElement("span");
|
|
188
|
-
z.style[d] =
|
|
214
|
+
z.style[d] = h;
|
|
189
215
|
const R = f.extractContents();
|
|
190
|
-
z.appendChild(R), f.insertNode(z),
|
|
191
|
-
const
|
|
192
|
-
|
|
216
|
+
z.appendChild(R), f.insertNode(z), g.removeAllRanges();
|
|
217
|
+
const ne = document.createRange();
|
|
218
|
+
ne.selectNodeContents(z), g.addRange(ne), Pe(ne);
|
|
193
219
|
return;
|
|
194
220
|
}
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
|
|
221
|
+
const y = document.createElement("span");
|
|
222
|
+
y.style[d] = h, y.appendChild(document.createTextNode("")), f.insertNode(y), g.removeAllRanges();
|
|
223
|
+
const T = document.createRange();
|
|
224
|
+
T.setStart(y.firstChild, 0), T.setEnd(y.firstChild, 0), g.addRange(T), Pe(T);
|
|
199
225
|
}
|
|
200
|
-
function
|
|
226
|
+
function _o(d) {
|
|
201
227
|
Fn("color", d);
|
|
202
228
|
}
|
|
203
|
-
function
|
|
229
|
+
function Co(d) {
|
|
204
230
|
Fn("backgroundColor", d);
|
|
205
231
|
}
|
|
206
|
-
function
|
|
207
|
-
const d = document.createDocumentFragment(),
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}, d.appendChild(
|
|
232
|
+
function Mo() {
|
|
233
|
+
const d = document.createDocumentFragment(), h = document.createElement("input");
|
|
234
|
+
h.type = "color", h.style.display = "none", h.title = "Text Color";
|
|
235
|
+
const g = document.createElement("button");
|
|
236
|
+
g.textContent = "A", g.style.color = "#000", g.style.fontSize = "16px", g.style.fontWeight = "bold", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.padding = "4px 8px", g.style.cursor = "pointer", g.style.backgroundColor = "#fff", g.title = "Text Color", g.onclick = () => h.click(), h.onchange = () => {
|
|
237
|
+
Pn(), _o(h.value), g.style.color = h.value;
|
|
238
|
+
}, d.appendChild(g), d.appendChild(h);
|
|
213
239
|
const f = document.createElement("input");
|
|
214
240
|
f.type = "color", f.style.display = "none", f.title = "Background Color";
|
|
215
|
-
const
|
|
216
|
-
return
|
|
217
|
-
|
|
218
|
-
}, d.appendChild(
|
|
241
|
+
const y = document.createElement("button");
|
|
242
|
+
return y.textContent = "BA", y.style.color = "#000", y.style.fontSize = "14px", y.style.fontWeight = "bold", y.style.border = "1px solid #ccc", y.style.borderRadius = "4px", y.style.padding = "4px 6px", y.style.cursor = "pointer", y.style.backgroundColor = "#fff", y.title = "Background Color", y.onclick = () => f.click(), f.onchange = () => {
|
|
243
|
+
Pn(), Co(f.value), y.style.backgroundColor = f.value, y.style.color = "#000";
|
|
244
|
+
}, d.appendChild(y), d.appendChild(f), d;
|
|
219
245
|
}
|
|
220
|
-
function
|
|
246
|
+
function Oo() {
|
|
221
247
|
const d = document.createDocumentFragment();
|
|
222
248
|
return [
|
|
223
|
-
{ command: "justifyLeft", icon:
|
|
224
|
-
{ command: "justifyCenter", icon:
|
|
225
|
-
{ command: "justifyRight", icon:
|
|
226
|
-
{ command: "justifyFull", icon:
|
|
227
|
-
].forEach((
|
|
228
|
-
const f = document.createElement("button"),
|
|
229
|
-
f.appendChild(
|
|
249
|
+
{ command: "justifyLeft", icon: wo, title: "Align Left" },
|
|
250
|
+
{ command: "justifyCenter", icon: yo, title: "Align Center" },
|
|
251
|
+
{ command: "justifyRight", icon: bo, title: "Align Right" },
|
|
252
|
+
{ command: "justifyFull", icon: xo, title: "Justify" }
|
|
253
|
+
].forEach((g) => {
|
|
254
|
+
const f = document.createElement("button"), y = te(g.icon, { width: 16, height: 16 });
|
|
255
|
+
f.appendChild(y), f.title = g.title, f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "6px 10px", f.style.borderRadius = "3px", f.style.cursor = "pointer", f.style.color = "#000000", f.onmouseover = () => f.style.backgroundColor = "#f0f0f0", f.onmouseout = () => f.style.backgroundColor = "#ffffff", f.onclick = () => document.execCommand(g.command), d.appendChild(f);
|
|
230
256
|
}), d;
|
|
231
257
|
}
|
|
232
|
-
function
|
|
258
|
+
function Po() {
|
|
233
259
|
const d = document.createDocumentFragment();
|
|
234
260
|
return [
|
|
235
|
-
{ command: "insertUnorderedList", icon:
|
|
236
|
-
{ command: "insertOrderedList", icon:
|
|
237
|
-
].forEach((
|
|
238
|
-
const f = document.createElement("button"),
|
|
239
|
-
f.appendChild(
|
|
261
|
+
{ command: "insertUnorderedList", icon: uo, title: "Bullet List" },
|
|
262
|
+
{ command: "insertOrderedList", icon: lo, title: "Numbered List" }
|
|
263
|
+
].forEach((g) => {
|
|
264
|
+
const f = document.createElement("button"), y = te(g.icon, { width: 16, height: 16 });
|
|
265
|
+
f.appendChild(y), f.title = g.title, f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "6px 10px", f.style.borderRadius = "3px", f.style.cursor = "pointer", f.style.color = "#000000", f.onmouseover = () => f.style.backgroundColor = "#f0f0f0", f.onmouseout = () => f.style.backgroundColor = "#ffffff", f.onclick = () => document.execCommand(g.command), d.appendChild(f);
|
|
240
266
|
}), d;
|
|
241
267
|
}
|
|
242
|
-
function
|
|
268
|
+
function Ro() {
|
|
243
269
|
const d = document.createDocumentFragment();
|
|
244
270
|
return [
|
|
245
|
-
{ command: "indent", icon:
|
|
246
|
-
{ command: "outdent", icon:
|
|
247
|
-
].forEach((
|
|
248
|
-
const f = document.createElement("button"),
|
|
249
|
-
f.appendChild(
|
|
271
|
+
{ command: "indent", icon: co, title: "Increase Indent" },
|
|
272
|
+
{ command: "outdent", icon: so, title: "Decrease Indent" }
|
|
273
|
+
].forEach((g) => {
|
|
274
|
+
const f = document.createElement("button"), y = te(g.icon, { width: 16, height: 16 });
|
|
275
|
+
f.appendChild(y), f.title = g.title, f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "6px 10px", f.style.borderRadius = "3px", f.style.cursor = "pointer", f.style.color = "#000000", f.onmouseover = () => f.style.backgroundColor = "#f0f0f0", f.onmouseout = () => f.style.backgroundColor = "#ffffff", f.onclick = () => document.execCommand(g.command), d.appendChild(f);
|
|
250
276
|
}), d;
|
|
251
277
|
}
|
|
252
|
-
function
|
|
278
|
+
function Io() {
|
|
253
279
|
const d = document.createDocumentFragment();
|
|
254
280
|
return [
|
|
255
|
-
{ command: "undo", icon:
|
|
256
|
-
{ command: "redo", icon:
|
|
257
|
-
].forEach((
|
|
258
|
-
const f = document.createElement("button"),
|
|
259
|
-
f.appendChild(
|
|
281
|
+
{ command: "undo", icon: ko, title: "Undo" },
|
|
282
|
+
{ command: "redo", icon: vo, title: "Redo" }
|
|
283
|
+
].forEach((g) => {
|
|
284
|
+
const f = document.createElement("button"), y = te(g.icon, { width: 16, height: 16 });
|
|
285
|
+
f.appendChild(y), f.title = g.title, f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "6px 10px", f.style.borderRadius = "3px", f.style.cursor = "pointer", f.style.color = "#000000", f.onmouseover = () => f.style.backgroundColor = "#f0f0f0", f.onmouseout = () => f.style.backgroundColor = "#ffffff", f.onclick = () => document.execCommand(g.command), d.appendChild(f);
|
|
260
286
|
}), d;
|
|
261
287
|
}
|
|
262
|
-
function
|
|
263
|
-
const d = document.createElement("button"),
|
|
264
|
-
return d.appendChild(
|
|
288
|
+
function Do() {
|
|
289
|
+
const d = document.createElement("button"), h = te(oo, { width: 16, height: 16 });
|
|
290
|
+
return d.appendChild(h), d.title = "Insert Image", d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff", d;
|
|
265
291
|
}
|
|
266
|
-
function
|
|
267
|
-
const d = document.createElement("button"),
|
|
292
|
+
function Ao() {
|
|
293
|
+
const d = document.createElement("button"), h = te(po, {
|
|
268
294
|
width: 16,
|
|
269
295
|
height: 16
|
|
270
|
-
}),
|
|
296
|
+
}), g = te(fo, {
|
|
271
297
|
width: 16,
|
|
272
298
|
height: 16
|
|
273
299
|
});
|
|
274
|
-
d.appendChild(
|
|
300
|
+
d.appendChild(h), d.title = "Toggle Fullscreen", d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff";
|
|
275
301
|
let f = !1;
|
|
276
302
|
return d.onclick = () => {
|
|
277
|
-
const
|
|
303
|
+
const y = document.querySelector(
|
|
278
304
|
".editor-container"
|
|
279
305
|
);
|
|
280
|
-
if (!
|
|
281
|
-
const
|
|
282
|
-
f ? (
|
|
306
|
+
if (!y) return;
|
|
307
|
+
const T = y.querySelector(".editor");
|
|
308
|
+
f ? (y.style.position = "", y.style.top = "", y.style.left = "", y.style.width = "", y.style.height = "", y.style.zIndex = "", y.style.backgroundColor = "", y.style.display = "", y.style.flexDirection = "", T && (T.style.flexGrow = "", T.style.overflowY = "", T.style.border = "", T.style.borderRadius = "", T.style.boxShadow = ""), d.replaceChild(h, g), f = !1) : (y.style.position = "fixed", y.style.top = "0", y.style.left = "0", y.style.width = "100vw", y.style.height = "100vh", y.style.zIndex = "9999", y.style.backgroundColor = "#ffffff", y.style.display = "flex", y.style.flexDirection = "column", T && (T.style.flexGrow = "1", T.style.overflowY = "auto", T.style.border = "none", T.style.borderRadius = "0", T.style.boxShadow = "none"), d.replaceChild(g, h), f = !0);
|
|
283
309
|
}, d;
|
|
284
310
|
}
|
|
285
|
-
function
|
|
311
|
+
function zo() {
|
|
312
|
+
const d = document.createDocumentFragment(), h = document.createElement("button"), g = te(ao, { width: 16, height: 16 });
|
|
313
|
+
return h.appendChild(g), h.title = "Insert Hyperlink", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff", h.onclick = () => {
|
|
314
|
+
const f = prompt("Enter the URL:");
|
|
315
|
+
f && document.execCommand("createLink", !1, f);
|
|
316
|
+
}, d.appendChild(h), d;
|
|
317
|
+
}
|
|
318
|
+
function jo() {
|
|
319
|
+
const d = document.createDocumentFragment(), h = document.createElement("button"), g = te(ho, { width: 16, height: 16 });
|
|
320
|
+
return h.appendChild(g), h.title = "Insert Quote", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff", h.onclick = () => document.execCommand("formatBlock", !1, "blockquote"), d.appendChild(h), d;
|
|
321
|
+
}
|
|
322
|
+
function Fo() {
|
|
323
|
+
const d = document.createDocumentFragment(), h = document.createElement("button"), g = te(go, { width: 16, height: 16 });
|
|
324
|
+
return h.appendChild(g), h.title = "Remove Formatting", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff", h.onclick = () => document.execCommand("removeFormat"), d.appendChild(h), d;
|
|
325
|
+
}
|
|
326
|
+
function Lo() {
|
|
327
|
+
const d = document.createDocumentFragment(), h = document.createElement("button"), g = te(To, { width: 16, height: 16 });
|
|
328
|
+
return h.appendChild(g), h.title = "Insert Video", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff", h.onclick = () => {
|
|
329
|
+
const f = prompt("Enter the video URL:");
|
|
330
|
+
if (f) {
|
|
331
|
+
const y = `<video controls src="${f}" style="max-width: 100%;"></video>`;
|
|
332
|
+
document.execCommand("insertHTML", !1, y);
|
|
333
|
+
}
|
|
334
|
+
}, d.appendChild(h), d;
|
|
335
|
+
}
|
|
336
|
+
function No() {
|
|
286
337
|
const d = document.createElement("div");
|
|
287
338
|
d.style.display = "flex", d.style.flexWrap = "wrap", d.style.gap = "8px", d.style.marginBottom = "10px", d.style.padding = "12px", d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.borderRadius = "4px", d.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
|
|
288
|
-
const
|
|
289
|
-
|
|
339
|
+
const h = Zr();
|
|
340
|
+
h.innerHTML = `
|
|
290
341
|
<option value="Arial">Arial</option>
|
|
291
342
|
<option value="Times New Roman">Times New Roman</option>
|
|
292
343
|
<option value="Courier New">Courier New</option>
|
|
293
344
|
<option value="Georgia">Georgia</option>
|
|
294
345
|
<option value="Verdana">Verdana</option>
|
|
295
|
-
`,
|
|
296
|
-
const
|
|
297
|
-
|
|
346
|
+
`, h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "4px", h.style.borderRadius = "3px", h.style.color = "#000000", h.onchange = () => document.execCommand("fontName", !1, h.value), d.appendChild(h);
|
|
347
|
+
const g = to();
|
|
348
|
+
g.title = "Heading", g.style.border = "1px solid #e1e1e1", g.style.backgroundColor = "#ffffff", g.style.padding = "4px", g.style.borderRadius = "3px", g.style.color = "#000000", g.innerHTML = `
|
|
298
349
|
<option value="p">Normal</option>
|
|
299
350
|
<option value="h1">Heading 1</option>
|
|
300
351
|
<option value="h2">Heading 2</option>
|
|
301
352
|
<option value="h3">Heading 3</option>
|
|
302
353
|
<option value="h4">Heading 4</option>
|
|
303
|
-
`,
|
|
304
|
-
const
|
|
305
|
-
document.execCommand("formatBlock", !1, `<${
|
|
306
|
-
}, d.appendChild(
|
|
354
|
+
`, g.onchange = () => {
|
|
355
|
+
const $ = g.value, J = $ === "p" ? "P" : $.toUpperCase();
|
|
356
|
+
document.execCommand("formatBlock", !1, `<${J}>`);
|
|
357
|
+
}, d.appendChild(g), document.addEventListener("selectionchange", () => {
|
|
307
358
|
try {
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
310
|
-
let
|
|
311
|
-
for (;
|
|
312
|
-
|
|
313
|
-
if (!
|
|
314
|
-
let
|
|
315
|
-
for (;
|
|
316
|
-
const Z =
|
|
359
|
+
const $ = window.getSelection();
|
|
360
|
+
if (!$ || !$.anchorNode) return;
|
|
361
|
+
let J = $.anchorNode;
|
|
362
|
+
for (; J && J.nodeType !== Node.ELEMENT_NODE; )
|
|
363
|
+
J = J.parentNode;
|
|
364
|
+
if (!J) return;
|
|
365
|
+
let V = J;
|
|
366
|
+
for (; V && V !== document.body && V !== d.parentElement; ) {
|
|
367
|
+
const Z = V.tagName?.toUpperCase?.();
|
|
317
368
|
if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
|
|
318
|
-
|
|
369
|
+
g.value = Z === "P" ? "p" : Z.toLowerCase();
|
|
319
370
|
return;
|
|
320
371
|
}
|
|
321
|
-
|
|
372
|
+
V = V.parentElement;
|
|
322
373
|
}
|
|
323
|
-
|
|
374
|
+
g.value = "p";
|
|
324
375
|
} catch {
|
|
325
376
|
}
|
|
326
377
|
});
|
|
@@ -334,70 +385,78 @@ function Ro() {
|
|
|
334
385
|
<option value="6">24pt</option>
|
|
335
386
|
<option value="7">36pt</option>
|
|
336
387
|
`, f.style.border = "1px solid #e1e1e1", f.style.backgroundColor = "#ffffff", f.style.padding = "4px", f.style.borderRadius = "3px", f.style.color = "#000000", f.onchange = () => document.execCommand("fontSize", !1, f.value), d.appendChild(f);
|
|
337
|
-
const
|
|
338
|
-
d.appendChild(
|
|
339
|
-
const
|
|
340
|
-
d.appendChild(
|
|
341
|
-
const z =
|
|
388
|
+
const y = So();
|
|
389
|
+
d.appendChild(y);
|
|
390
|
+
const T = Mo();
|
|
391
|
+
d.appendChild(T);
|
|
392
|
+
const z = Oo();
|
|
342
393
|
d.appendChild(z);
|
|
343
|
-
const R =
|
|
394
|
+
const R = Po();
|
|
344
395
|
d.appendChild(R);
|
|
345
|
-
const
|
|
346
|
-
d.appendChild(
|
|
347
|
-
const
|
|
348
|
-
d.appendChild(
|
|
349
|
-
const F =
|
|
396
|
+
const ne = Ro();
|
|
397
|
+
d.appendChild(ne);
|
|
398
|
+
const Y = Io();
|
|
399
|
+
d.appendChild(Y);
|
|
400
|
+
const F = Do();
|
|
350
401
|
d.appendChild(F);
|
|
351
|
-
const
|
|
352
|
-
|
|
402
|
+
const he = zo();
|
|
403
|
+
d.appendChild(he);
|
|
404
|
+
const se = jo();
|
|
405
|
+
d.appendChild(se);
|
|
406
|
+
const Q = Fo();
|
|
407
|
+
d.appendChild(Q);
|
|
408
|
+
const ce = Lo();
|
|
409
|
+
d.appendChild(ce);
|
|
410
|
+
const Te = Ao();
|
|
411
|
+
return d.appendChild(Te), d;
|
|
353
412
|
}
|
|
354
|
-
function
|
|
355
|
-
const
|
|
356
|
-
return
|
|
413
|
+
function Ho(d, h) {
|
|
414
|
+
const g = document.createElement("div");
|
|
415
|
+
return g.classList.add("editor"), g.contentEditable = "true", g.style.color = "#000000", g.style.border = "1px solid #e1e1e1", g.style.minHeight = "400px", g.style.padding = "15px", g.style.fontFamily = "Arial, sans-serif", g.style.fontSize = "14px", g.style.lineHeight = "1.5", g.style.outline = "none", g.style.backgroundColor = "#ffffff", g.style.borderRadius = "4px", g.style.boxShadow = "inset 0 1px 3px rgba(0,0,0,0.1)", g.style.direction = "ltr", g.style.textAlign = "left", g.innerHTML = "", g.addEventListener("dragover", (f) => {
|
|
357
416
|
f.preventDefault(), f.stopPropagation();
|
|
358
|
-
}),
|
|
417
|
+
}), g.addEventListener("drop", (f) => {
|
|
359
418
|
f.preventDefault(), f.stopPropagation();
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
362
|
-
for (let
|
|
363
|
-
const z =
|
|
419
|
+
const y = f.dataTransfer?.files;
|
|
420
|
+
if (y && y.length > 0)
|
|
421
|
+
for (let T = 0; T < y.length; T++) {
|
|
422
|
+
const z = y[T];
|
|
364
423
|
if (z.type.startsWith("image/")) {
|
|
365
424
|
const R = new FileReader();
|
|
366
|
-
R.onload = (
|
|
367
|
-
const
|
|
368
|
-
|
|
425
|
+
R.onload = (ne) => {
|
|
426
|
+
const Y = document.createElement("img");
|
|
427
|
+
Y.src = ne.target?.result, Y.style.maxWidth = "100%", Y.style.width = "100%", Y.style.height = "auto", Y.style.cursor = "pointer", Y.draggable = !1;
|
|
369
428
|
const F = document.createElement("div");
|
|
370
|
-
F.className = "editor-image-wrapper", F.style.display = "inline-block", F.style.position = "relative", F.style.maxWidth = "100%", F.style.width = "auto", F.style.height = "auto", F.contentEditable = "false", F.style.userSelect = "none", F.style.boxSizing = "border-box", F.style.touchAction = "none", F.appendChild(
|
|
429
|
+
F.className = "editor-image-wrapper", F.style.display = "inline-block", F.style.position = "relative", F.style.maxWidth = "100%", F.style.width = "auto", F.style.height = "auto", F.contentEditable = "false", F.style.userSelect = "none", F.style.boxSizing = "border-box", F.style.touchAction = "none", F.appendChild(Y), g.appendChild(F);
|
|
371
430
|
}, R.readAsDataURL(z);
|
|
372
431
|
}
|
|
373
432
|
}
|
|
374
|
-
}),
|
|
375
|
-
const
|
|
376
|
-
let
|
|
377
|
-
|
|
378
|
-
}),
|
|
433
|
+
}), g.addEventListener("click", (f) => {
|
|
434
|
+
const y = f.target;
|
|
435
|
+
let T = y;
|
|
436
|
+
y.tagName === "IMG" && (T = y.parentElement), T && T.classList.contains("editor-image-wrapper") && h(T);
|
|
437
|
+
}), g.addEventListener("keyup", () => Pe()), g.addEventListener("mouseup", () => Pe()), g.addEventListener("focus", () => Pe()), window.addEventListener("selectionchange", () => {
|
|
379
438
|
try {
|
|
380
439
|
const f = window.getSelection();
|
|
381
440
|
if (!f || !f.anchorNode) return;
|
|
382
|
-
let
|
|
383
|
-
for (;
|
|
384
|
-
|
|
385
|
-
if (!
|
|
386
|
-
|
|
441
|
+
let y = f.anchorNode;
|
|
442
|
+
for (; y && y.nodeType !== Node.ELEMENT_NODE; )
|
|
443
|
+
y = y.parentNode;
|
|
444
|
+
if (!y) return;
|
|
445
|
+
g.contains(y) && Pe();
|
|
387
446
|
} catch {
|
|
388
447
|
}
|
|
389
|
-
}),
|
|
448
|
+
}), g;
|
|
390
449
|
}
|
|
391
|
-
function
|
|
450
|
+
function Bo(d) {
|
|
392
451
|
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
393
452
|
}
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
return Rn || (Rn = 1, (function(d,
|
|
397
|
-
(function(
|
|
453
|
+
var Xe = { exports: {} }, Yo = Xe.exports, Rn;
|
|
454
|
+
function Vo() {
|
|
455
|
+
return Rn || (Rn = 1, (function(d, h) {
|
|
456
|
+
(function(g, f) {
|
|
398
457
|
d.exports = f();
|
|
399
|
-
})(
|
|
400
|
-
function
|
|
458
|
+
})(Yo, (function() {
|
|
459
|
+
function g(t, e) {
|
|
401
460
|
var n = Object.keys(t);
|
|
402
461
|
if (Object.getOwnPropertySymbols) {
|
|
403
462
|
var r = Object.getOwnPropertySymbols(t);
|
|
@@ -410,55 +469,55 @@ function zo() {
|
|
|
410
469
|
function f(t) {
|
|
411
470
|
for (var e = 1; e < arguments.length; e++) {
|
|
412
471
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
413
|
-
e % 2 ?
|
|
414
|
-
|
|
415
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
472
|
+
e % 2 ? g(Object(n), !0).forEach((function(r) {
|
|
473
|
+
ne(t, r, n[r]);
|
|
474
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : g(Object(n)).forEach((function(r) {
|
|
416
475
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
417
476
|
}));
|
|
418
477
|
}
|
|
419
478
|
return t;
|
|
420
479
|
}
|
|
421
|
-
function
|
|
422
|
-
return
|
|
480
|
+
function y(t) {
|
|
481
|
+
return y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
423
482
|
return typeof e;
|
|
424
483
|
} : function(e) {
|
|
425
484
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
426
|
-
},
|
|
485
|
+
}, y(t);
|
|
427
486
|
}
|
|
428
|
-
function
|
|
487
|
+
function T(t, e) {
|
|
429
488
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
430
489
|
}
|
|
431
490
|
function z(t, e) {
|
|
432
491
|
for (var n = 0; n < e.length; n++) {
|
|
433
492
|
var r = e[n];
|
|
434
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t,
|
|
493
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, Te(r.key), r);
|
|
435
494
|
}
|
|
436
495
|
}
|
|
437
496
|
function R(t, e, n) {
|
|
438
497
|
return e && z(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
439
498
|
}
|
|
440
|
-
function
|
|
441
|
-
return (e =
|
|
499
|
+
function ne(t, e, n) {
|
|
500
|
+
return (e = Te(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
|
|
442
501
|
}
|
|
443
|
-
function
|
|
502
|
+
function Y(t, e) {
|
|
444
503
|
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
445
|
-
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e &&
|
|
504
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && he(t, e);
|
|
446
505
|
}
|
|
447
506
|
function F(t) {
|
|
448
507
|
return F = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
449
508
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
450
509
|
}, F(t);
|
|
451
510
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
511
|
+
function he(t, e) {
|
|
512
|
+
return he = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
454
513
|
return n.__proto__ = r, n;
|
|
455
|
-
},
|
|
514
|
+
}, he(t, e);
|
|
456
515
|
}
|
|
457
|
-
function
|
|
516
|
+
function se(t) {
|
|
458
517
|
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
459
518
|
return t;
|
|
460
519
|
}
|
|
461
|
-
function
|
|
520
|
+
function Q(t) {
|
|
462
521
|
var e = (function() {
|
|
463
522
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
464
523
|
if (typeof Proxy == "function") return !0;
|
|
@@ -478,12 +537,12 @@ function zo() {
|
|
|
478
537
|
return (function(i, a) {
|
|
479
538
|
if (a && (typeof a == "object" || typeof a == "function")) return a;
|
|
480
539
|
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
481
|
-
return
|
|
540
|
+
return se(i);
|
|
482
541
|
})(this, n);
|
|
483
542
|
};
|
|
484
543
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
544
|
+
function ce() {
|
|
545
|
+
return ce = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
|
|
487
546
|
var r = (function(i, a) {
|
|
488
547
|
for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = F(i)) !== null; ) ;
|
|
489
548
|
return i;
|
|
@@ -492,9 +551,9 @@ function zo() {
|
|
|
492
551
|
var o = Object.getOwnPropertyDescriptor(r, e);
|
|
493
552
|
return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
|
|
494
553
|
}
|
|
495
|
-
},
|
|
554
|
+
}, ce.apply(this, arguments);
|
|
496
555
|
}
|
|
497
|
-
function
|
|
556
|
+
function Te(t) {
|
|
498
557
|
var e = (function(n, r) {
|
|
499
558
|
if (typeof n != "object" || n === null) return n;
|
|
500
559
|
var o = n[Symbol.toPrimitive];
|
|
@@ -507,49 +566,49 @@ function zo() {
|
|
|
507
566
|
})(t, "string");
|
|
508
567
|
return typeof e == "symbol" ? e : e + "";
|
|
509
568
|
}
|
|
510
|
-
var
|
|
569
|
+
var $ = function(t) {
|
|
511
570
|
return !(!t || !t.Window) && t instanceof t.Window;
|
|
512
|
-
},
|
|
513
|
-
function
|
|
514
|
-
|
|
571
|
+
}, J = void 0, V = void 0;
|
|
572
|
+
function Z(t) {
|
|
573
|
+
J = t;
|
|
515
574
|
var e = t.document.createTextNode("");
|
|
516
|
-
e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)),
|
|
575
|
+
e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), V = t;
|
|
517
576
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
577
|
+
function re(t) {
|
|
578
|
+
return $(t) ? t : (t.ownerDocument || t).defaultView || V.window;
|
|
520
579
|
}
|
|
521
|
-
typeof window < "u" && window &&
|
|
522
|
-
var
|
|
523
|
-
return !!t &&
|
|
580
|
+
typeof window < "u" && window && Z(window);
|
|
581
|
+
var Se = function(t) {
|
|
582
|
+
return !!t && y(t) === "object";
|
|
524
583
|
}, Ge = function(t) {
|
|
525
584
|
return typeof t == "function";
|
|
526
|
-
},
|
|
527
|
-
return t ===
|
|
585
|
+
}, m = { window: function(t) {
|
|
586
|
+
return t === V || $(t);
|
|
528
587
|
}, docFrag: function(t) {
|
|
529
|
-
return
|
|
530
|
-
}, object:
|
|
588
|
+
return Se(t) && t.nodeType === 11;
|
|
589
|
+
}, object: Se, func: Ge, number: function(t) {
|
|
531
590
|
return typeof t == "number";
|
|
532
591
|
}, bool: function(t) {
|
|
533
592
|
return typeof t == "boolean";
|
|
534
593
|
}, string: function(t) {
|
|
535
594
|
return typeof t == "string";
|
|
536
595
|
}, element: function(t) {
|
|
537
|
-
if (!t ||
|
|
538
|
-
var e =
|
|
539
|
-
return /object|function/.test(typeof Element > "u" ? "undefined" :
|
|
596
|
+
if (!t || y(t) !== "object") return !1;
|
|
597
|
+
var e = re(t) || V;
|
|
598
|
+
return /object|function/.test(typeof Element > "u" ? "undefined" : y(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
|
|
540
599
|
}, plainObject: function(t) {
|
|
541
|
-
return
|
|
600
|
+
return Se(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
|
|
542
601
|
}, array: function(t) {
|
|
543
|
-
return
|
|
602
|
+
return Se(t) && t.length !== void 0 && Ge(t.splice);
|
|
544
603
|
} };
|
|
545
|
-
function
|
|
604
|
+
function Re(t) {
|
|
546
605
|
var e = t.interaction;
|
|
547
606
|
if (e.prepared.name === "drag") {
|
|
548
607
|
var n = e.prepared.axis;
|
|
549
608
|
n === "x" ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : n === "y" && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);
|
|
550
609
|
}
|
|
551
610
|
}
|
|
552
|
-
function
|
|
611
|
+
function _e(t) {
|
|
553
612
|
var e = t.iEvent, n = t.interaction;
|
|
554
613
|
if (n.prepared.name === "drag") {
|
|
555
614
|
var r = n.prepared.axis;
|
|
@@ -559,29 +618,29 @@ function zo() {
|
|
|
559
618
|
}
|
|
560
619
|
}
|
|
561
620
|
}
|
|
562
|
-
var
|
|
621
|
+
var Ce = { id: "actions/drag", install: function(t) {
|
|
563
622
|
var e = t.actions, n = t.Interactable, r = t.defaults;
|
|
564
|
-
n.prototype.draggable =
|
|
565
|
-
}, listeners: { "interactions:before-action-move":
|
|
623
|
+
n.prototype.draggable = Ce.draggable, e.map.drag = Ce, e.methodDict.drag = "draggable", r.actions.drag = Ce.defaults;
|
|
624
|
+
}, listeners: { "interactions:before-action-move": Re, "interactions:action-resume": Re, "interactions:action-move": _e, "auto-start:check": function(t) {
|
|
566
625
|
var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
|
|
567
626
|
if (o && o.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (r & n.options.drag.mouseButtons) != 0)) return t.action = { name: "drag", axis: o.lockAxis === "start" ? o.startAxis : o.lockAxis }, !1;
|
|
568
627
|
} }, draggable: function(t) {
|
|
569
|
-
return
|
|
570
|
-
}, beforeMove:
|
|
628
|
+
return m.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : m.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
|
|
629
|
+
}, beforeMove: Re, move: _e, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
|
|
571
630
|
return "move";
|
|
572
631
|
}, filterEventType: function(t) {
|
|
573
632
|
return t.search("drag") === 0;
|
|
574
|
-
} }, Je =
|
|
633
|
+
} }, Je = Ce, W = { init: function(t) {
|
|
575
634
|
var e = t;
|
|
576
|
-
|
|
635
|
+
W.document = e.document, W.DocumentFragment = e.DocumentFragment || le, W.SVGElement = e.SVGElement || le, W.SVGSVGElement = e.SVGSVGElement || le, W.SVGElementInstance = e.SVGElementInstance || le, W.Element = e.Element || le, W.HTMLElement = e.HTMLElement || W.Element, W.Event = e.Event, W.Touch = e.Touch || le, W.PointerEvent = e.PointerEvent || e.MSPointerEvent;
|
|
577
636
|
}, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
|
|
578
|
-
function
|
|
637
|
+
function le() {
|
|
579
638
|
}
|
|
580
|
-
var
|
|
581
|
-
var e =
|
|
582
|
-
|
|
583
|
-
}, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null },
|
|
584
|
-
function
|
|
639
|
+
var B = W, U = { init: function(t) {
|
|
640
|
+
var e = B.Element, n = t.navigator || {};
|
|
641
|
+
U.supportsTouch = "ontouchstart" in t || m.func(t.DocumentTouch) && B.document instanceof t.DocumentTouch, U.supportsPointerEvent = n.pointerEnabled !== !1 && !!B.PointerEvent, U.isIOS = /iP(hone|od|ad)/.test(n.platform), U.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), U.isIe9 = /MSIE 9/.test(n.userAgent), U.isOperaMobile = n.appName === "Opera" && U.supportsTouch && /Presto/.test(n.userAgent), U.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", U.pEventTypes = U.supportsPointerEvent ? B.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, U.wheelEvent = B.document && "onmousewheel" in B.document ? "mousewheel" : "wheel";
|
|
642
|
+
}, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, G = U;
|
|
643
|
+
function ae(t, e) {
|
|
585
644
|
if (t.contains) return t.contains(e);
|
|
586
645
|
for (; e; ) {
|
|
587
646
|
if (e === t) return !0;
|
|
@@ -589,98 +648,98 @@ function zo() {
|
|
|
589
648
|
}
|
|
590
649
|
return !1;
|
|
591
650
|
}
|
|
592
|
-
function
|
|
593
|
-
for (;
|
|
594
|
-
if (
|
|
595
|
-
t =
|
|
651
|
+
function Ie(t, e) {
|
|
652
|
+
for (; m.element(t); ) {
|
|
653
|
+
if (oe(t, e)) return t;
|
|
654
|
+
t = ee(t);
|
|
596
655
|
}
|
|
597
656
|
return null;
|
|
598
657
|
}
|
|
599
|
-
function
|
|
658
|
+
function ee(t) {
|
|
600
659
|
var e = t.parentNode;
|
|
601
|
-
if (
|
|
602
|
-
for (; (e = e.host) &&
|
|
660
|
+
if (m.docFrag(e)) {
|
|
661
|
+
for (; (e = e.host) && m.docFrag(e); ) ;
|
|
603
662
|
return e;
|
|
604
663
|
}
|
|
605
664
|
return e;
|
|
606
665
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
666
|
+
function oe(t, e) {
|
|
667
|
+
return V !== J && (e = e.replace(/\/deep\//g, " ")), t[G.prefixedMatchesSelector](e);
|
|
609
668
|
}
|
|
610
|
-
var
|
|
669
|
+
var b = function(t) {
|
|
611
670
|
return t.parentNode || t.host;
|
|
612
671
|
};
|
|
613
672
|
function I(t, e) {
|
|
614
|
-
for (var n, r = [], o = t; (n =
|
|
673
|
+
for (var n, r = [], o = t; (n = b(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
|
|
615
674
|
return r;
|
|
616
675
|
}
|
|
617
676
|
function j(t, e, n) {
|
|
618
|
-
for (;
|
|
619
|
-
if (
|
|
620
|
-
if ((t =
|
|
677
|
+
for (; m.element(t); ) {
|
|
678
|
+
if (oe(t, e)) return !0;
|
|
679
|
+
if ((t = ee(t)) === n) return oe(t, e);
|
|
621
680
|
}
|
|
622
681
|
return !1;
|
|
623
682
|
}
|
|
624
683
|
function N(t) {
|
|
625
684
|
return t.correspondingUseElement || t;
|
|
626
685
|
}
|
|
627
|
-
function
|
|
628
|
-
var e = t instanceof
|
|
686
|
+
function ve(t) {
|
|
687
|
+
var e = t instanceof B.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
|
|
629
688
|
return e && { left: e.left, right: e.right, top: e.top, bottom: e.bottom, width: e.width || e.right - e.left, height: e.height || e.bottom - e.top };
|
|
630
689
|
}
|
|
631
|
-
function
|
|
632
|
-
var e, n =
|
|
633
|
-
if (!
|
|
634
|
-
var r = { x: (e = (e =
|
|
690
|
+
function xe(t) {
|
|
691
|
+
var e, n = ve(t);
|
|
692
|
+
if (!G.isIOS7 && n) {
|
|
693
|
+
var r = { x: (e = (e = re(t)) || V).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
|
|
635
694
|
n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
|
|
636
695
|
}
|
|
637
696
|
return n;
|
|
638
697
|
}
|
|
639
698
|
function H(t) {
|
|
640
|
-
for (var e = []; t; ) e.push(t), t =
|
|
699
|
+
for (var e = []; t; ) e.push(t), t = ee(t);
|
|
641
700
|
return e;
|
|
642
701
|
}
|
|
643
|
-
function
|
|
644
|
-
return !!
|
|
702
|
+
function ue(t) {
|
|
703
|
+
return !!m.string(t) && (B.document.querySelector(t), !0);
|
|
645
704
|
}
|
|
646
705
|
function _(t, e) {
|
|
647
706
|
for (var n in e) t[n] = e[n];
|
|
648
707
|
return t;
|
|
649
708
|
}
|
|
650
709
|
function Ke(t, e, n) {
|
|
651
|
-
return t === "parent" ?
|
|
710
|
+
return t === "parent" ? ee(n) : t === "self" ? e.getRect(n) : Ie(n, t);
|
|
652
711
|
}
|
|
653
|
-
function
|
|
712
|
+
function De(t, e, n, r) {
|
|
654
713
|
var o = t;
|
|
655
|
-
return
|
|
714
|
+
return m.string(o) ? o = Ke(o, e, n) : m.func(o) && (o = o.apply(void 0, r)), m.element(o) && (o = xe(o)), o;
|
|
656
715
|
}
|
|
657
|
-
function
|
|
716
|
+
function Qe(t) {
|
|
658
717
|
return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
|
|
659
718
|
}
|
|
660
719
|
function ht(t) {
|
|
661
720
|
return !t || "x" in t && "y" in t || ((t = _({}, t)).x = t.left || 0, t.y = t.top || 0, t.width = t.width || (t.right || 0) - t.x, t.height = t.height || (t.bottom || 0) - t.y), t;
|
|
662
721
|
}
|
|
663
|
-
function
|
|
722
|
+
function Ze(t, e, n) {
|
|
664
723
|
t.left && (e.left += n.x), t.right && (e.right += n.x), t.top && (e.top += n.y), t.bottom && (e.bottom += n.y), e.width = e.right - e.left, e.height = e.bottom - e.top;
|
|
665
724
|
}
|
|
666
|
-
function
|
|
725
|
+
function Ae(t, e, n) {
|
|
667
726
|
var r = n && t.options[n];
|
|
668
|
-
return
|
|
727
|
+
return Qe(De(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
|
|
669
728
|
}
|
|
670
|
-
function
|
|
729
|
+
function we(t, e) {
|
|
671
730
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(c) {
|
|
672
731
|
return !0;
|
|
673
732
|
}, r = arguments.length > 3 ? arguments[3] : void 0;
|
|
674
|
-
if (r = r || {},
|
|
675
|
-
return
|
|
733
|
+
if (r = r || {}, m.string(t) && t.search(" ") !== -1 && (t = Lt(t)), m.array(t)) return t.forEach((function(c) {
|
|
734
|
+
return we(c, e, n, r);
|
|
676
735
|
})), r;
|
|
677
|
-
if (
|
|
678
|
-
else if (
|
|
736
|
+
if (m.object(t) && (e = t, t = ""), m.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
|
|
737
|
+
else if (m.array(e)) for (var o = 0, i = e; o < i.length; o++) {
|
|
679
738
|
var a = i[o];
|
|
680
|
-
|
|
739
|
+
we(t, a, n, r);
|
|
681
740
|
}
|
|
682
|
-
else if (
|
|
683
|
-
|
|
741
|
+
else if (m.object(e)) for (var s in e)
|
|
742
|
+
we(Lt(s).map((function(c) {
|
|
684
743
|
return "".concat(t).concat(c);
|
|
685
744
|
})), e[s], n, r);
|
|
686
745
|
return r;
|
|
@@ -688,7 +747,7 @@ function zo() {
|
|
|
688
747
|
function Lt(t) {
|
|
689
748
|
return t.trim().split(/ +/);
|
|
690
749
|
}
|
|
691
|
-
var
|
|
750
|
+
var ze = function(t, e) {
|
|
692
751
|
return Math.sqrt(t * t + e * e);
|
|
693
752
|
}, Ln = ["webkit", "moz"];
|
|
694
753
|
function et(t, e) {
|
|
@@ -713,26 +772,26 @@ function zo() {
|
|
|
713
772
|
t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
|
|
714
773
|
}
|
|
715
774
|
function Ht(t) {
|
|
716
|
-
return t instanceof
|
|
775
|
+
return t instanceof B.Event || t instanceof B.Touch;
|
|
717
776
|
}
|
|
718
777
|
function nt(t, e, n) {
|
|
719
778
|
return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
|
|
720
779
|
}
|
|
721
780
|
function Bt(t, e) {
|
|
722
|
-
return e = e || { x: 0, y: 0 },
|
|
781
|
+
return e = e || { x: 0, y: 0 }, G.isOperaMobile && Ht(t) ? (nt("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : nt("page", t, e), e;
|
|
723
782
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
783
|
+
function je(t) {
|
|
784
|
+
return m.number(t.pointerId) ? t.pointerId : t.identifier;
|
|
726
785
|
}
|
|
727
786
|
function Nn(t, e, n) {
|
|
728
787
|
var r = e.length > 1 ? Yt(e) : e[0];
|
|
729
788
|
Bt(r, t.page), (function(o, i) {
|
|
730
|
-
i = i || {},
|
|
789
|
+
i = i || {}, G.isOperaMobile && Ht(o) ? nt("screen", o, i) : nt("client", o, i);
|
|
731
790
|
})(r, t.client), t.timeStamp = n;
|
|
732
791
|
}
|
|
733
792
|
function vt(t) {
|
|
734
793
|
var e = [];
|
|
735
|
-
return
|
|
794
|
+
return m.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
|
|
736
795
|
}
|
|
737
796
|
function Yt(t) {
|
|
738
797
|
for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
|
|
@@ -749,22 +808,22 @@ function zo() {
|
|
|
749
808
|
}
|
|
750
809
|
function mt(t, e) {
|
|
751
810
|
var n = e + "X", r = e + "Y", o = vt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
|
|
752
|
-
return
|
|
811
|
+
return ze(i, a);
|
|
753
812
|
}
|
|
754
813
|
function yt(t, e) {
|
|
755
814
|
var n = e + "X", r = e + "Y", o = vt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
|
|
756
815
|
return 180 * Math.atan2(a, i) / Math.PI;
|
|
757
816
|
}
|
|
758
|
-
function
|
|
759
|
-
return
|
|
817
|
+
function Vt(t) {
|
|
818
|
+
return m.string(t.pointerType) ? t.pointerType : m.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof B.Touch ? "touch" : "mouse";
|
|
760
819
|
}
|
|
761
|
-
function
|
|
762
|
-
var e =
|
|
820
|
+
function Wt(t) {
|
|
821
|
+
var e = m.func(t.composedPath) ? t.composedPath() : t.path;
|
|
763
822
|
return [N(e ? e[0] : t.target), N(t.currentTarget)];
|
|
764
823
|
}
|
|
765
824
|
var rt = (function() {
|
|
766
825
|
function t(e) {
|
|
767
|
-
|
|
826
|
+
T(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
|
|
768
827
|
}
|
|
769
828
|
return R(t, [{ key: "preventDefault", value: function() {
|
|
770
829
|
} }, { key: "stopPropagation", value: function() {
|
|
@@ -777,32 +836,32 @@ function zo() {
|
|
|
777
836
|
return this._interaction._proxy;
|
|
778
837
|
}, set: function() {
|
|
779
838
|
} });
|
|
780
|
-
var
|
|
839
|
+
var Ut = function(t, e) {
|
|
781
840
|
for (var n = 0; n < e.length; n++) {
|
|
782
841
|
var r = e[n];
|
|
783
842
|
t.push(r);
|
|
784
843
|
}
|
|
785
844
|
return t;
|
|
786
845
|
}, qt = function(t) {
|
|
787
|
-
return
|
|
788
|
-
},
|
|
846
|
+
return Ut([], t);
|
|
847
|
+
}, Fe = function(t, e) {
|
|
789
848
|
for (var n = 0; n < t.length; n++) if (e(t[n], n, t)) return n;
|
|
790
849
|
return -1;
|
|
791
|
-
},
|
|
792
|
-
return t[
|
|
793
|
-
},
|
|
794
|
-
|
|
795
|
-
var e =
|
|
850
|
+
}, Le = function(t, e) {
|
|
851
|
+
return t[Fe(t, e)];
|
|
852
|
+
}, Me = (function(t) {
|
|
853
|
+
Y(n, t);
|
|
854
|
+
var e = Q(n);
|
|
796
855
|
function n(r, o, i) {
|
|
797
856
|
var a;
|
|
798
|
-
|
|
857
|
+
T(this, n), (a = e.call(this, o._interaction)).dropzone = void 0, a.dragEvent = void 0, a.relatedTarget = void 0, a.draggable = void 0, a.propagationStopped = !1, a.immediatePropagationStopped = !1;
|
|
799
858
|
var s = i === "dragleave" ? r.prev : r.cur, c = s.element, u = s.dropzone;
|
|
800
859
|
return a.type = i, a.target = c, a.currentTarget = c, a.dropzone = u, a.dragEvent = o, a.relatedTarget = o.target, a.draggable = o.interactable, a.timeStamp = o.timeStamp, a;
|
|
801
860
|
}
|
|
802
861
|
return R(n, [{ key: "reject", value: function() {
|
|
803
862
|
var r = this, o = this._interaction.dropState;
|
|
804
863
|
if (this.type === "dropactivate" || this.dropzone && o.cur.dropzone === this.dropzone && o.cur.element === this.target) if (o.prev.dropzone = this.dropzone, o.prev.element = this.target, o.rejected = !0, o.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
|
|
805
|
-
var i = o.activeDrops, a =
|
|
864
|
+
var i = o.activeDrops, a = Fe(i, (function(c) {
|
|
806
865
|
var u = c.dropzone, l = c.element;
|
|
807
866
|
return u === r.dropzone && l === r.target;
|
|
808
867
|
}));
|
|
@@ -829,9 +888,9 @@ function zo() {
|
|
|
829
888
|
var l = u[c];
|
|
830
889
|
if (l.options.drop.enabled) {
|
|
831
890
|
var p = l.options.drop.accept;
|
|
832
|
-
if (!(
|
|
833
|
-
var
|
|
834
|
-
|
|
891
|
+
if (!(m.element(p) && p !== a || m.string(p) && !oe(a, p) || m.func(p) && !p({ dropzone: l, draggableElement: a }))) for (var v = 0, w = l.getAllElements(); v < w.length; v++) {
|
|
892
|
+
var x = w[v];
|
|
893
|
+
x !== a && s.push({ dropzone: l, element: x, rect: l.getRect(x) });
|
|
835
894
|
}
|
|
836
895
|
}
|
|
837
896
|
}
|
|
@@ -844,42 +903,42 @@ function zo() {
|
|
|
844
903
|
}
|
|
845
904
|
function $t(t, e, n) {
|
|
846
905
|
for (var r = t.dropState, o = t.interactable, i = t.element, a = [], s = 0, c = r.activeDrops; s < c.length; s++) {
|
|
847
|
-
var u = c[s], l = u.dropzone, p = u.element,
|
|
848
|
-
a.push(
|
|
849
|
-
}
|
|
850
|
-
var
|
|
851
|
-
for (var S,
|
|
852
|
-
var
|
|
853
|
-
if (
|
|
854
|
-
var
|
|
855
|
-
if (
|
|
856
|
-
|
|
906
|
+
var u = c[s], l = u.dropzone, p = u.element, v = u.rect, w = l.dropCheck(e, n, o, i, p, v);
|
|
907
|
+
a.push(w ? p : null);
|
|
908
|
+
}
|
|
909
|
+
var x = (function(E) {
|
|
910
|
+
for (var S, k, C, P = [], A = 0; A < E.length; A++) {
|
|
911
|
+
var M = E[A], D = E[S];
|
|
912
|
+
if (M && A !== S) if (D) {
|
|
913
|
+
var X = b(M), L = b(D);
|
|
914
|
+
if (X !== M.ownerDocument) if (L !== M.ownerDocument) if (X !== L) {
|
|
915
|
+
P = P.length ? P : I(D);
|
|
857
916
|
var K = void 0;
|
|
858
|
-
if (D instanceof
|
|
859
|
-
if (
|
|
860
|
-
K =
|
|
861
|
-
} else K =
|
|
862
|
-
for (var
|
|
863
|
-
var dt = [
|
|
864
|
-
if (dt[0]) for (var
|
|
865
|
-
if (
|
|
866
|
-
S = A,
|
|
917
|
+
if (D instanceof B.HTMLElement && M instanceof B.SVGElement && !(M instanceof B.SVGSVGElement)) {
|
|
918
|
+
if (M === L) continue;
|
|
919
|
+
K = M.ownerSVGElement;
|
|
920
|
+
} else K = M;
|
|
921
|
+
for (var ie = I(K, D.ownerDocument), fe = 0; ie[fe] && ie[fe] === P[fe]; ) fe++;
|
|
922
|
+
var dt = [ie[fe - 1], ie[fe], P[fe]];
|
|
923
|
+
if (dt[0]) for (var We = dt[0].lastChild; We; ) {
|
|
924
|
+
if (We === dt[1]) {
|
|
925
|
+
S = A, P = ie;
|
|
867
926
|
break;
|
|
868
927
|
}
|
|
869
|
-
if (
|
|
870
|
-
|
|
928
|
+
if (We === dt[2]) break;
|
|
929
|
+
We = We.previousSibling;
|
|
871
930
|
}
|
|
872
|
-
} else
|
|
931
|
+
} else C = D, (parseInt(re(k = M).getComputedStyle(k).zIndex, 10) || 0) >= (parseInt(re(C).getComputedStyle(C).zIndex, 10) || 0) && (S = A);
|
|
873
932
|
else S = A;
|
|
874
933
|
} else S = A;
|
|
875
934
|
}
|
|
876
935
|
return S;
|
|
877
936
|
})(a);
|
|
878
|
-
return r.activeDrops[
|
|
937
|
+
return r.activeDrops[x] || null;
|
|
879
938
|
}
|
|
880
939
|
function xt(t, e, n) {
|
|
881
940
|
var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
|
|
882
|
-
return n.type === "dragstart" && (o.activate = new
|
|
941
|
+
return n.type === "dragstart" && (o.activate = new Me(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Me(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new Me(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new Me(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Me(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Me(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
|
|
883
942
|
}
|
|
884
943
|
function wt(t, e) {
|
|
885
944
|
var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
|
|
@@ -898,37 +957,37 @@ function zo() {
|
|
|
898
957
|
var e = t.actions, n = t.interactStatic, r = t.Interactable, o = t.defaults;
|
|
899
958
|
t.usePlugin(Je), r.prototype.dropzone = function(i) {
|
|
900
959
|
return (function(a, s) {
|
|
901
|
-
if (
|
|
960
|
+
if (m.object(s)) {
|
|
902
961
|
if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
|
|
903
|
-
var c =
|
|
904
|
-
return p[/^(enter|leave)/.test(
|
|
962
|
+
var c = we(s.listeners), u = Object.keys(c).reduce((function(p, v) {
|
|
963
|
+
return p[/^(enter|leave)/.test(v) ? "drag".concat(v) : /^(activate|deactivate|move)/.test(v) ? "drop".concat(v) : v] = c[v], p;
|
|
905
964
|
}), {}), l = a.options.drop.listeners;
|
|
906
965
|
l && a.off(l), a.on(u), a.options.drop.listeners = u;
|
|
907
966
|
}
|
|
908
|
-
return
|
|
967
|
+
return m.func(s.ondrop) && a.on("drop", s.ondrop), m.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), m.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), m.func(s.ondragenter) && a.on("dragenter", s.ondragenter), m.func(s.ondragleave) && a.on("dragleave", s.ondragleave), m.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : m.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
|
|
909
968
|
}
|
|
910
|
-
return
|
|
969
|
+
return m.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
|
|
911
970
|
})(this, i);
|
|
912
971
|
}, r.prototype.dropCheck = function(i, a, s, c, u, l) {
|
|
913
|
-
return (function(p,
|
|
914
|
-
var
|
|
915
|
-
if (!(
|
|
916
|
-
var
|
|
917
|
-
if (
|
|
918
|
-
var A =
|
|
919
|
-
|
|
920
|
-
var D =
|
|
921
|
-
|
|
972
|
+
return (function(p, v, w, x, E, S, k) {
|
|
973
|
+
var C = !1;
|
|
974
|
+
if (!(k = k || p.getRect(S))) return !!p.options.drop.checker && p.options.drop.checker(v, w, C, p, S, x, E);
|
|
975
|
+
var P = p.options.drop.overlap;
|
|
976
|
+
if (P === "pointer") {
|
|
977
|
+
var A = Ae(x, E, "drag"), M = Bt(v);
|
|
978
|
+
M.x += A.x, M.y += A.y;
|
|
979
|
+
var D = M.x > k.left && M.x < k.right, X = M.y > k.top && M.y < k.bottom;
|
|
980
|
+
C = D && X;
|
|
922
981
|
}
|
|
923
|
-
var L =
|
|
924
|
-
if (L &&
|
|
925
|
-
var K = L.left + L.width / 2,
|
|
926
|
-
|
|
982
|
+
var L = x.getRect(E);
|
|
983
|
+
if (L && P === "center") {
|
|
984
|
+
var K = L.left + L.width / 2, ie = L.top + L.height / 2;
|
|
985
|
+
C = K >= k.left && K <= k.right && ie >= k.top && ie <= k.bottom;
|
|
927
986
|
}
|
|
928
|
-
return L &&
|
|
987
|
+
return L && m.number(P) && (C = Math.max(0, Math.min(k.right, L.right) - Math.max(k.left, L.left)) * Math.max(0, Math.min(k.bottom, L.bottom) - Math.max(k.top, L.top)) / (L.width * L.height) >= P), p.options.drop.checker && (C = p.options.drop.checker(v, w, C, p, S, x, E)), C;
|
|
929
988
|
})(this, i, a, s, c, u, l);
|
|
930
989
|
}, n.dynamicDrop = function(i) {
|
|
931
|
-
return
|
|
990
|
+
return m.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
|
|
932
991
|
}, _(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Jt.defaults;
|
|
933
992
|
}, listeners: { "interactions:before-action-start": function(t) {
|
|
934
993
|
var e = t.interaction;
|
|
@@ -970,14 +1029,14 @@ function zo() {
|
|
|
970
1029
|
var c = e.prevEvent;
|
|
971
1030
|
n.distance = c.distance, n.box = c.box, n.scale = c.scale, n.ds = 0, n.angle = c.angle, n.da = 0;
|
|
972
1031
|
} else n.distance = mt(o, s), n.box = gt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = yt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
|
|
973
|
-
e.gesture.distance = n.distance, e.gesture.angle = n.angle,
|
|
1032
|
+
e.gesture.distance = n.distance, e.gesture.angle = n.angle, m.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
|
|
974
1033
|
}
|
|
975
1034
|
}
|
|
976
|
-
var
|
|
1035
|
+
var kt = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
|
|
977
1036
|
var e = t.actions, n = t.Interactable, r = t.defaults;
|
|
978
1037
|
n.prototype.gesturable = function(o) {
|
|
979
|
-
return
|
|
980
|
-
}, e.map.gesture =
|
|
1038
|
+
return m.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : m.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
|
|
1039
|
+
}, e.map.gesture = kt, e.methodDict.gesture = "gesturable", r.actions.gesture = kt.defaults;
|
|
981
1040
|
}, listeners: { "interactions:action-start": Et, "interactions:action-move": Et, "interactions:action-end": Et, "interactions:new": function(t) {
|
|
982
1041
|
t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
|
|
983
1042
|
}, "auto-start:check": function(t) {
|
|
@@ -989,11 +1048,11 @@ function zo() {
|
|
|
989
1048
|
return "";
|
|
990
1049
|
}, filterEventType: function(t) {
|
|
991
1050
|
return t.search("gesture") === 0;
|
|
992
|
-
} }, Bn =
|
|
1051
|
+
} }, Bn = kt;
|
|
993
1052
|
function Yn(t, e, n, r, o, i, a) {
|
|
994
1053
|
if (!e) return !1;
|
|
995
1054
|
if (e === !0) {
|
|
996
|
-
var s =
|
|
1055
|
+
var s = m.number(i.width) ? i.width : i.right - i.left, c = m.number(i.height) ? i.height : i.bottom - i.top;
|
|
997
1056
|
if (a = Math.min(a, Math.abs((t === "left" || t === "right" ? s : c) / 2)), s < 0 && (t === "left" ? t = "right" : t === "right" && (t = "left")), c < 0 && (t === "top" ? t = "bottom" : t === "bottom" && (t = "top")), t === "left") {
|
|
998
1057
|
var u = s >= 0 ? i.left : i.right;
|
|
999
1058
|
return n.x < u + a;
|
|
@@ -1005,7 +1064,7 @@ function zo() {
|
|
|
1005
1064
|
if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
|
|
1006
1065
|
if (t === "bottom") return n.y > (c >= 0 ? i.bottom : i.top) - a;
|
|
1007
1066
|
}
|
|
1008
|
-
return !!
|
|
1067
|
+
return !!m.element(r) && (m.element(e) ? e === r : j(r, e, o));
|
|
1009
1068
|
}
|
|
1010
1069
|
function Kt(t) {
|
|
1011
1070
|
var e = t.iEvent, n = t.interaction;
|
|
@@ -1014,15 +1073,15 @@ function zo() {
|
|
|
1014
1073
|
n.interactable.options.resize.square ? (n.resizeAxes === "y" ? r.delta.x = r.delta.y : r.delta.y = r.delta.x, r.axes = "xy") : (r.axes = n.resizeAxes, n.resizeAxes === "x" ? r.delta.y = 0 : n.resizeAxes === "y" && (r.delta.x = 0));
|
|
1015
1074
|
}
|
|
1016
1075
|
}
|
|
1017
|
-
var
|
|
1076
|
+
var pe, Ee, de = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
|
|
1018
1077
|
var e = t.actions, n = t.browser, r = t.Interactable, o = t.defaults;
|
|
1019
|
-
|
|
1078
|
+
de.cursors = (function(i) {
|
|
1020
1079
|
return i.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
|
|
1021
|
-
})(n),
|
|
1080
|
+
})(n), de.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(i) {
|
|
1022
1081
|
return (function(a, s, c) {
|
|
1023
|
-
return
|
|
1082
|
+
return m.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), m.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = c.defaults.actions.resize.axis), m.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : m.bool(s.square) && (a.options.resize.square = s.square), a) : m.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
|
|
1024
1083
|
})(this, i, t);
|
|
1025
|
-
}, e.map.resize =
|
|
1084
|
+
}, e.map.resize = de, e.methodDict.resize = "resizable", o.actions.resize = de.defaults;
|
|
1026
1085
|
}, listeners: { "interactions:new": function(t) {
|
|
1027
1086
|
t.interaction.resizeAxes = "xy";
|
|
1028
1087
|
}, "interactions:action-start": function(t) {
|
|
@@ -1037,20 +1096,20 @@ function zo() {
|
|
|
1037
1096
|
(function(e) {
|
|
1038
1097
|
var n = e.iEvent, r = e.interaction;
|
|
1039
1098
|
if (r.prepared.name === "resize" && r.prepared.edges) {
|
|
1040
|
-
var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, c = r._rects, u = c.start, l = c.corrected, p = c.delta,
|
|
1041
|
-
if (_(
|
|
1099
|
+
var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, c = r._rects, u = c.start, l = c.corrected, p = c.delta, v = c.previous;
|
|
1100
|
+
if (_(v, l), a) {
|
|
1042
1101
|
if (_(l, s), i === "reposition") {
|
|
1043
1102
|
if (l.top > l.bottom) {
|
|
1044
|
-
var
|
|
1045
|
-
l.top = l.bottom, l.bottom =
|
|
1103
|
+
var w = l.top;
|
|
1104
|
+
l.top = l.bottom, l.bottom = w;
|
|
1046
1105
|
}
|
|
1047
1106
|
if (l.left > l.right) {
|
|
1048
|
-
var
|
|
1049
|
-
l.left = l.right, l.right =
|
|
1107
|
+
var x = l.left;
|
|
1108
|
+
l.left = l.right, l.right = x;
|
|
1050
1109
|
}
|
|
1051
1110
|
}
|
|
1052
1111
|
} else l.top = Math.min(s.top, u.bottom), l.bottom = Math.max(s.bottom, u.top), l.left = Math.min(s.left, u.right), l.right = Math.max(s.right, u.left);
|
|
1053
|
-
for (var
|
|
1112
|
+
for (var E in l.width = l.right - l.left, l.height = l.bottom - l.top, l) p[E] = l[E] - v[E];
|
|
1054
1113
|
o.edges = r.prepared.edges, o.rect = l, o.deltaRect = p;
|
|
1055
1114
|
}
|
|
1056
1115
|
})(t), Kt(t);
|
|
@@ -1065,19 +1124,19 @@ function zo() {
|
|
|
1065
1124
|
if (o) {
|
|
1066
1125
|
var a = _({}, e.coords.cur.page), s = n.options.resize;
|
|
1067
1126
|
if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (i & s.mouseButtons) != 0)) {
|
|
1068
|
-
if (
|
|
1127
|
+
if (m.object(s.edges)) {
|
|
1069
1128
|
var c = { left: !1, right: !1, top: !1, bottom: !1 };
|
|
1070
|
-
for (var u in c) c[u] = Yn(u, s.edges[u], a, e._latestPointer.eventTarget, r, o, s.margin ||
|
|
1129
|
+
for (var u in c) c[u] = Yn(u, s.edges[u], a, e._latestPointer.eventTarget, r, o, s.margin || de.defaultMargin);
|
|
1071
1130
|
c.left = c.left && !c.right, c.top = c.top && !c.bottom, (c.left || c.right || c.top || c.bottom) && (t.action = { name: "resize", edges: c });
|
|
1072
1131
|
} else {
|
|
1073
|
-
var l = s.axis !== "y" && a.x > o.right -
|
|
1132
|
+
var l = s.axis !== "y" && a.x > o.right - de.defaultMargin, p = s.axis !== "x" && a.y > o.bottom - de.defaultMargin;
|
|
1074
1133
|
(l || p) && (t.action = { name: "resize", axes: (l ? "x" : "") + (p ? "y" : "") });
|
|
1075
1134
|
}
|
|
1076
1135
|
return !t.action && void 0;
|
|
1077
1136
|
}
|
|
1078
1137
|
}
|
|
1079
1138
|
} }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(t) {
|
|
1080
|
-
var e = t.edges, n = t.axis, r = t.name, o =
|
|
1139
|
+
var e = t.edges, n = t.axis, r = t.name, o = de.cursors, i = null;
|
|
1081
1140
|
if (n) i = o[r + n];
|
|
1082
1141
|
else if (e) {
|
|
1083
1142
|
for (var a = "", s = 0, c = ["top", "bottom", "left", "right"]; s < c.length; s++) {
|
|
@@ -1089,102 +1148,102 @@ function zo() {
|
|
|
1089
1148
|
return i;
|
|
1090
1149
|
}, filterEventType: function(t) {
|
|
1091
1150
|
return t.search("resize") === 0;
|
|
1092
|
-
}, defaultMargin: null },
|
|
1093
|
-
t.usePlugin(Bn), t.usePlugin(
|
|
1094
|
-
} },
|
|
1095
|
-
return
|
|
1151
|
+
}, defaultMargin: null }, Vn = de, Wn = { id: "actions", install: function(t) {
|
|
1152
|
+
t.usePlugin(Bn), t.usePlugin(Vn), t.usePlugin(Je), t.usePlugin(Hn);
|
|
1153
|
+
} }, Qt = 0, ge = { request: function(t) {
|
|
1154
|
+
return pe(t);
|
|
1096
1155
|
}, cancel: function(t) {
|
|
1097
|
-
return
|
|
1156
|
+
return Ee(t);
|
|
1098
1157
|
}, init: function(t) {
|
|
1099
|
-
if (
|
|
1158
|
+
if (pe = t.requestAnimationFrame, Ee = t.cancelAnimationFrame, !pe) for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
|
|
1100
1159
|
var r = e[n];
|
|
1101
|
-
|
|
1160
|
+
pe = t["".concat(r, "RequestAnimationFrame")], Ee = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
|
|
1102
1161
|
}
|
|
1103
|
-
|
|
1104
|
-
var i = Date.now(), a = Math.max(0, 16 - (i -
|
|
1162
|
+
pe = pe && pe.bind(t), Ee = Ee && Ee.bind(t), pe || (pe = function(o) {
|
|
1163
|
+
var i = Date.now(), a = Math.max(0, 16 - (i - Qt)), s = t.setTimeout((function() {
|
|
1105
1164
|
o(i + a);
|
|
1106
1165
|
}), a);
|
|
1107
|
-
return
|
|
1108
|
-
},
|
|
1166
|
+
return Qt = i + a, s;
|
|
1167
|
+
}, Ee = function(o) {
|
|
1109
1168
|
return clearTimeout(o);
|
|
1110
1169
|
});
|
|
1111
|
-
} },
|
|
1112
|
-
|
|
1170
|
+
} }, O = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
|
|
1171
|
+
O.isScrolling = !0, ge.cancel(O.i), t.autoScroll = O, O.interaction = t, O.prevTime = O.now(), O.i = ge.request(O.scroll);
|
|
1113
1172
|
}, stop: function() {
|
|
1114
|
-
|
|
1173
|
+
O.isScrolling = !1, O.interaction && (O.interaction.autoScroll = null), ge.cancel(O.i);
|
|
1115
1174
|
}, scroll: function() {
|
|
1116
|
-
var t =
|
|
1175
|
+
var t = O.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = Zt(o.container, e, n), a = O.now(), s = (a - O.prevTime) / 1e3, c = o.speed * s;
|
|
1117
1176
|
if (c >= 1) {
|
|
1118
|
-
var u = { x:
|
|
1177
|
+
var u = { x: O.x * c, y: O.y * c };
|
|
1119
1178
|
if (u.x || u.y) {
|
|
1120
1179
|
var l = en(i);
|
|
1121
|
-
|
|
1122
|
-
var p = en(i),
|
|
1123
|
-
(
|
|
1180
|
+
m.window(i) ? i.scrollBy(u.x, u.y) : i && (i.scrollLeft += u.x, i.scrollTop += u.y);
|
|
1181
|
+
var p = en(i), v = { x: p.x - l.x, y: p.y - l.y };
|
|
1182
|
+
(v.x || v.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: v, interaction: t, container: i });
|
|
1124
1183
|
}
|
|
1125
|
-
|
|
1184
|
+
O.prevTime = a;
|
|
1126
1185
|
}
|
|
1127
|
-
|
|
1186
|
+
O.isScrolling && (ge.cancel(O.i), O.i = ge.request(O.scroll));
|
|
1128
1187
|
}, check: function(t, e) {
|
|
1129
1188
|
var n;
|
|
1130
1189
|
return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
|
|
1131
1190
|
}, onInteractionMove: function(t) {
|
|
1132
1191
|
var e = t.interaction, n = t.pointer;
|
|
1133
|
-
if (e.interacting() &&
|
|
1192
|
+
if (e.interacting() && O.check(e.interactable, e.prepared.name)) if (e.simulation) O.x = O.y = 0;
|
|
1134
1193
|
else {
|
|
1135
|
-
var r, o, i, a, s = e.interactable, c = e.element, u = e.prepared.name, l = s.options[u].autoScroll, p =
|
|
1136
|
-
if (
|
|
1194
|
+
var r, o, i, a, s = e.interactable, c = e.element, u = e.prepared.name, l = s.options[u].autoScroll, p = Zt(l.container, s, c);
|
|
1195
|
+
if (m.window(p)) a = n.clientX < O.margin, r = n.clientY < O.margin, o = n.clientX > p.innerWidth - O.margin, i = n.clientY > p.innerHeight - O.margin;
|
|
1137
1196
|
else {
|
|
1138
|
-
var
|
|
1139
|
-
a = n.clientX <
|
|
1197
|
+
var v = ve(p);
|
|
1198
|
+
a = n.clientX < v.left + O.margin, r = n.clientY < v.top + O.margin, o = n.clientX > v.right - O.margin, i = n.clientY > v.bottom - O.margin;
|
|
1140
1199
|
}
|
|
1141
|
-
|
|
1200
|
+
O.x = o ? 1 : a ? -1 : 0, O.y = i ? 1 : r ? -1 : 0, O.isScrolling || (O.margin = l.margin, O.speed = l.speed, O.start(e));
|
|
1142
1201
|
}
|
|
1143
1202
|
} };
|
|
1144
|
-
function
|
|
1145
|
-
return (
|
|
1203
|
+
function Zt(t, e, n) {
|
|
1204
|
+
return (m.string(t) ? Ke(t, e, n) : t) || re(n);
|
|
1146
1205
|
}
|
|
1147
1206
|
function en(t) {
|
|
1148
|
-
return
|
|
1207
|
+
return m.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
|
|
1149
1208
|
}
|
|
1150
|
-
var
|
|
1209
|
+
var Un = { id: "auto-scroll", install: function(t) {
|
|
1151
1210
|
var e = t.defaults, n = t.actions;
|
|
1152
|
-
t.autoScroll =
|
|
1211
|
+
t.autoScroll = O, O.now = function() {
|
|
1153
1212
|
return t.now();
|
|
1154
|
-
}, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll =
|
|
1213
|
+
}, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = O.defaults;
|
|
1155
1214
|
}, listeners: { "interactions:new": function(t) {
|
|
1156
1215
|
t.interaction.autoScroll = null;
|
|
1157
1216
|
}, "interactions:destroy": function(t) {
|
|
1158
|
-
t.interaction.autoScroll = null,
|
|
1159
|
-
}, "interactions:stop":
|
|
1160
|
-
return
|
|
1161
|
-
} } }, qn =
|
|
1162
|
-
function
|
|
1217
|
+
t.interaction.autoScroll = null, O.stop(), O.interaction && (O.interaction = null);
|
|
1218
|
+
}, "interactions:stop": O.stop, "interactions:action-move": function(t) {
|
|
1219
|
+
return O.onInteractionMove(t);
|
|
1220
|
+
} } }, qn = Un;
|
|
1221
|
+
function Ne(t, e) {
|
|
1163
1222
|
var n = !1;
|
|
1164
1223
|
return function() {
|
|
1165
|
-
return n || (
|
|
1224
|
+
return n || (V.console.warn(e), n = !0), t.apply(this, arguments);
|
|
1166
1225
|
};
|
|
1167
1226
|
}
|
|
1168
|
-
function
|
|
1227
|
+
function Tt(t, e) {
|
|
1169
1228
|
return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
|
|
1170
1229
|
}
|
|
1171
1230
|
function Xn(t) {
|
|
1172
|
-
return
|
|
1231
|
+
return m.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
|
|
1173
1232
|
}
|
|
1174
1233
|
function $n(t) {
|
|
1175
|
-
return
|
|
1234
|
+
return m.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
|
|
1176
1235
|
}
|
|
1177
1236
|
var Gn = { id: "auto-start/interactableMethods", install: function(t) {
|
|
1178
1237
|
var e = t.Interactable;
|
|
1179
1238
|
e.prototype.getAction = function(n, r, o, i) {
|
|
1180
1239
|
var a = (function(s, c, u, l, p) {
|
|
1181
|
-
var
|
|
1182
|
-
return p.fire("auto-start:check",
|
|
1240
|
+
var v = s.getRect(l), w = c.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[c.button], x = { action: null, interactable: s, interaction: u, element: l, rect: v, buttons: w };
|
|
1241
|
+
return p.fire("auto-start:check", x), x.action;
|
|
1183
1242
|
})(this, r, o, i, t);
|
|
1184
1243
|
return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, i, o) : a;
|
|
1185
|
-
}, e.prototype.ignoreFrom =
|
|
1244
|
+
}, e.prototype.ignoreFrom = Ne((function(n) {
|
|
1186
1245
|
return this._backCompatOption("ignoreFrom", n);
|
|
1187
|
-
}), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom =
|
|
1246
|
+
}), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = Ne((function(n) {
|
|
1188
1247
|
return this._backCompatOption("allowFrom", n);
|
|
1189
1248
|
}), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = $n, e.prototype.styleCursor = Xn;
|
|
1190
1249
|
} };
|
|
@@ -1195,8 +1254,8 @@ function zo() {
|
|
|
1195
1254
|
for (var s = 0, c = r.length; s < c; s++) {
|
|
1196
1255
|
var u = r[s], l = o[s], p = u.getAction(e, n, t, l);
|
|
1197
1256
|
if (p) {
|
|
1198
|
-
var
|
|
1199
|
-
if (
|
|
1257
|
+
var v = tn(p, u, l, i, a);
|
|
1258
|
+
if (v) return { action: v, interactable: u, element: l };
|
|
1200
1259
|
}
|
|
1201
1260
|
}
|
|
1202
1261
|
return { action: null, interactable: null, element: null };
|
|
@@ -1206,30 +1265,30 @@ function zo() {
|
|
|
1206
1265
|
function c(l) {
|
|
1207
1266
|
i.push(l), a.push(s);
|
|
1208
1267
|
}
|
|
1209
|
-
for (;
|
|
1268
|
+
for (; m.element(s); ) {
|
|
1210
1269
|
i = [], a = [], o.interactables.forEachMatch(s, c);
|
|
1211
1270
|
var u = Jn(t, e, n, i, a, r, o);
|
|
1212
1271
|
if (u.action && !u.interactable.options[u.action.name].manualStart) return u;
|
|
1213
|
-
s =
|
|
1272
|
+
s = ee(s);
|
|
1214
1273
|
}
|
|
1215
1274
|
return { action: null, interactable: null, element: null };
|
|
1216
1275
|
}
|
|
1217
1276
|
function rn(t, e, n) {
|
|
1218
1277
|
var r = e.action, o = e.interactable, i = e.element;
|
|
1219
|
-
r = r || { name: null }, t.interactable = o, t.element = i,
|
|
1278
|
+
r = r || { name: null }, t.interactable = o, t.element = i, Tt(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, an(t, n), n.fire("autoStart:prepared", { interaction: t });
|
|
1220
1279
|
}
|
|
1221
1280
|
function ot(t, e, n, r) {
|
|
1222
1281
|
var o = t.options, i = o[n.name].max, a = o[n.name].maxPerElement, s = r.autoStart.maxInteractions, c = 0, u = 0, l = 0;
|
|
1223
1282
|
if (!(i && a && s)) return !1;
|
|
1224
|
-
for (var p = 0,
|
|
1225
|
-
var
|
|
1226
|
-
if (
|
|
1283
|
+
for (var p = 0, v = r.interactions.list; p < v.length; p++) {
|
|
1284
|
+
var w = v[p], x = w.prepared.name;
|
|
1285
|
+
if (w.interacting() && (++c >= s || w.interactable === t && ((u += x === n.name ? 1 : 0) >= i || w.element === e && (l++, x === n.name && l >= a))))
|
|
1227
1286
|
return !1;
|
|
1228
1287
|
}
|
|
1229
1288
|
return s > 0;
|
|
1230
1289
|
}
|
|
1231
1290
|
function on(t, e) {
|
|
1232
|
-
return
|
|
1291
|
+
return m.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
|
|
1233
1292
|
}
|
|
1234
1293
|
function St(t, e, n) {
|
|
1235
1294
|
var r = n.autoStart.cursorElement;
|
|
@@ -1241,7 +1300,7 @@ function zo() {
|
|
|
1241
1300
|
var i = "";
|
|
1242
1301
|
if (o.name) {
|
|
1243
1302
|
var a = n.options[o.name].cursorChecker;
|
|
1244
|
-
i =
|
|
1303
|
+
i = m.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
|
|
1245
1304
|
}
|
|
1246
1305
|
St(t.element, i || "", e);
|
|
1247
1306
|
} else e.autoStart.cursorElement && St(e.autoStart.cursorElement, "", e);
|
|
@@ -1269,48 +1328,48 @@ function zo() {
|
|
|
1269
1328
|
}, "interactions:stop": function(t, e) {
|
|
1270
1329
|
var n = t.interaction, r = n.interactable;
|
|
1271
1330
|
r && r.options.styleCursor && St(n.element, "", e);
|
|
1272
|
-
} }, maxInteractions: on, withinInteractionLimit: ot, validateAction: tn }, _t = Kn,
|
|
1331
|
+
} }, maxInteractions: on, withinInteractionLimit: ot, validateAction: tn }, _t = Kn, Qn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
|
|
1273
1332
|
var n = t.interaction, r = t.eventTarget, o = t.dx, i = t.dy;
|
|
1274
1333
|
if (n.prepared.name === "drag") {
|
|
1275
1334
|
var a = Math.abs(o), s = Math.abs(i), c = n.interactable.options.drag, u = c.startAxis, l = a > s ? "x" : a < s ? "y" : "xy";
|
|
1276
1335
|
if (n.prepared.axis = c.lockAxis === "start" ? l[0] : c.lockAxis, l !== "xy" && u !== "xy" && u !== l) {
|
|
1277
1336
|
n.prepared.name = null;
|
|
1278
|
-
for (var p = r,
|
|
1279
|
-
if (
|
|
1280
|
-
var
|
|
1281
|
-
if (!
|
|
1282
|
-
var S =
|
|
1283
|
-
if (S && S.name === "drag" && (function(
|
|
1284
|
-
if (!
|
|
1285
|
-
var
|
|
1286
|
-
return
|
|
1287
|
-
})(l,
|
|
1337
|
+
for (var p = r, v = function(x) {
|
|
1338
|
+
if (x !== n.interactable) {
|
|
1339
|
+
var E = n.interactable.options.drag;
|
|
1340
|
+
if (!E.manualStart && x.testIgnoreAllow(E, p, r)) {
|
|
1341
|
+
var S = x.getAction(n.downPointer, n.downEvent, n, p);
|
|
1342
|
+
if (S && S.name === "drag" && (function(k, C) {
|
|
1343
|
+
if (!C) return !1;
|
|
1344
|
+
var P = C.options.drag.startAxis;
|
|
1345
|
+
return k === "xy" || P === "xy" || P === k;
|
|
1346
|
+
})(l, x) && _t.validateAction(S, x, p, r, e)) return x;
|
|
1288
1347
|
}
|
|
1289
1348
|
}
|
|
1290
|
-
};
|
|
1291
|
-
var
|
|
1292
|
-
if (
|
|
1293
|
-
n.prepared.name = "drag", n.interactable =
|
|
1349
|
+
}; m.element(p); ) {
|
|
1350
|
+
var w = e.interactables.forEachMatch(p, v);
|
|
1351
|
+
if (w) {
|
|
1352
|
+
n.prepared.name = "drag", n.interactable = w, n.element = p;
|
|
1294
1353
|
break;
|
|
1295
1354
|
}
|
|
1296
|
-
p =
|
|
1355
|
+
p = ee(p);
|
|
1297
1356
|
}
|
|
1298
1357
|
}
|
|
1299
1358
|
}
|
|
1300
1359
|
} } };
|
|
1301
|
-
function
|
|
1360
|
+
function Ct(t) {
|
|
1302
1361
|
var e = t.prepared && t.prepared.name;
|
|
1303
1362
|
if (!e) return null;
|
|
1304
1363
|
var n = t.interactable.options;
|
|
1305
1364
|
return n[e].hold || n[e].delay;
|
|
1306
1365
|
}
|
|
1307
|
-
var
|
|
1366
|
+
var Zn = { id: "auto-start/hold", install: function(t) {
|
|
1308
1367
|
var e = t.defaults;
|
|
1309
1368
|
t.usePlugin(_t), e.perAction.hold = 0, e.perAction.delay = 0;
|
|
1310
1369
|
}, listeners: { "interactions:new": function(t) {
|
|
1311
1370
|
t.interaction.autoStartHoldTimer = null;
|
|
1312
1371
|
}, "autoStart:prepared": function(t) {
|
|
1313
|
-
var e = t.interaction, n =
|
|
1372
|
+
var e = t.interaction, n = Ct(e);
|
|
1314
1373
|
n > 0 && (e.autoStartHoldTimer = setTimeout((function() {
|
|
1315
1374
|
e.start(e.prepared, e.interactable, e.element);
|
|
1316
1375
|
}), n));
|
|
@@ -1319,11 +1378,11 @@ function zo() {
|
|
|
1319
1378
|
e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);
|
|
1320
1379
|
}, "autoStart:before-start": function(t) {
|
|
1321
1380
|
var e = t.interaction;
|
|
1322
|
-
|
|
1323
|
-
} }, getHoldDuration:
|
|
1324
|
-
t.usePlugin(_t), t.usePlugin(er), t.usePlugin(
|
|
1381
|
+
Ct(e) > 0 && (e.prepared.name = null);
|
|
1382
|
+
} }, getHoldDuration: Ct }, er = Zn, tr = { id: "auto-start", install: function(t) {
|
|
1383
|
+
t.usePlugin(_t), t.usePlugin(er), t.usePlugin(Qn);
|
|
1325
1384
|
} }, nr = function(t) {
|
|
1326
|
-
return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) :
|
|
1385
|
+
return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : m.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
|
|
1327
1386
|
};
|
|
1328
1387
|
function rr(t) {
|
|
1329
1388
|
var e = t.interaction, n = t.event;
|
|
@@ -1336,16 +1395,16 @@ function zo() {
|
|
|
1336
1395
|
var a = r.options.preventDefault;
|
|
1337
1396
|
if (a !== "never") if (a !== "always") {
|
|
1338
1397
|
if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
|
|
1339
|
-
var s =
|
|
1398
|
+
var s = re(i.target).document, c = o.getDocOptions(s);
|
|
1340
1399
|
if (!c || !c.events || c.events.passive !== !1) return;
|
|
1341
1400
|
}
|
|
1342
|
-
/^(mouse|pointer|touch)*(down|start)/i.test(i.type) ||
|
|
1401
|
+
/^(mouse|pointer|touch)*(down|start)/i.test(i.type) || m.element(i.target) && oe(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
|
|
1343
1402
|
} else i.preventDefault();
|
|
1344
1403
|
})(this, t, n);
|
|
1345
1404
|
}, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
|
|
1346
1405
|
for (var r = 0, o = t.interactions.list; r < o.length; r++) {
|
|
1347
1406
|
var i = o[r];
|
|
1348
|
-
if (i.element && (i.element === n.target ||
|
|
1407
|
+
if (i.element && (i.element === n.target || ae(i.element, n.target))) return void i.interactable.checkAndPreventDefault(n);
|
|
1349
1408
|
}
|
|
1350
1409
|
} });
|
|
1351
1410
|
}, listeners: ["down", "move", "up", "cancel"].reduce((function(t, e) {
|
|
@@ -1360,22 +1419,22 @@ function zo() {
|
|
|
1360
1419
|
var e = {};
|
|
1361
1420
|
for (var n in t) {
|
|
1362
1421
|
var r = t[n];
|
|
1363
|
-
|
|
1422
|
+
m.plainObject(r) ? e[n] = Oe(r) : m.array(r) ? e[n] = qt(r) : e[n] = r;
|
|
1364
1423
|
}
|
|
1365
1424
|
return e;
|
|
1366
1425
|
}
|
|
1367
|
-
var
|
|
1426
|
+
var Mt = (function() {
|
|
1368
1427
|
function t(e) {
|
|
1369
|
-
|
|
1428
|
+
T(this, t), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = at(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
|
|
1370
1429
|
}
|
|
1371
1430
|
return R(t, [{ key: "start", value: function(e, n) {
|
|
1372
1431
|
var r, o, i = e.phase, a = this.interaction, s = (function(u) {
|
|
1373
1432
|
var l = u.interactable.options[u.prepared.name], p = l.modifiers;
|
|
1374
|
-
return p && p.length ? p : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(
|
|
1375
|
-
var
|
|
1376
|
-
return
|
|
1377
|
-
})).filter((function(
|
|
1378
|
-
return !!
|
|
1433
|
+
return p && p.length ? p : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(v) {
|
|
1434
|
+
var w = l[v];
|
|
1435
|
+
return w && w.enabled && { options: w, methods: w._methods };
|
|
1436
|
+
})).filter((function(v) {
|
|
1437
|
+
return !!v;
|
|
1379
1438
|
}));
|
|
1380
1439
|
})(a);
|
|
1381
1440
|
this.prepareStates(s), this.startEdges = _({}, a.edges), this.edges = _({}, this.startEdges), this.startOffset = (r = a.rect, o = n, r ? { left: o.x - r.left, top: o.y - r.top, right: r.right - o.x, bottom: r.bottom - o.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
|
|
@@ -1393,25 +1452,25 @@ function zo() {
|
|
|
1393
1452
|
var n = e.phase, r = e.preEnd, o = e.skipModifiers, i = e.rect, a = e.edges;
|
|
1394
1453
|
e.coords = _({}, e.pageCoords), e.rect = _({}, i), e.edges = _({}, a);
|
|
1395
1454
|
for (var s = o ? this.states.slice(o) : this.states, c = at(e.coords, e.rect), u = 0; u < s.length; u++) {
|
|
1396
|
-
var l, p = s[u],
|
|
1397
|
-
(l = p.methods) != null && l.set && this.shouldDo(
|
|
1455
|
+
var l, p = s[u], v = p.options, w = _({}, e.coords), x = null;
|
|
1456
|
+
(l = p.methods) != null && l.set && this.shouldDo(v, r, n) && (e.state = p, x = p.methods.set(e), Ze(e.edges, e.rect, { x: e.coords.x - w.x, y: e.coords.y - w.y })), c.eventProps.push(x);
|
|
1398
1457
|
}
|
|
1399
1458
|
_(this.edges, e.edges), c.delta.x = e.coords.x - e.pageCoords.x, c.delta.y = e.coords.y - e.pageCoords.y, c.rectDelta.left = e.rect.left - i.left, c.rectDelta.right = e.rect.right - i.right, c.rectDelta.top = e.rect.top - i.top, c.rectDelta.bottom = e.rect.bottom - i.bottom;
|
|
1400
|
-
var
|
|
1401
|
-
if (
|
|
1402
|
-
var
|
|
1403
|
-
c.changed =
|
|
1459
|
+
var E = this.result.coords, S = this.result.rect;
|
|
1460
|
+
if (E && S) {
|
|
1461
|
+
var k = c.rect.left !== S.left || c.rect.right !== S.right || c.rect.top !== S.top || c.rect.bottom !== S.bottom;
|
|
1462
|
+
c.changed = k || E.x !== c.coords.x || E.y !== c.coords.y;
|
|
1404
1463
|
}
|
|
1405
1464
|
return c;
|
|
1406
1465
|
} }, { key: "applyToInteraction", value: function(e) {
|
|
1407
1466
|
var n = this.interaction, r = e.phase, o = n.coords.cur, i = n.coords.start, a = this.result, s = this.startDelta, c = a.delta;
|
|
1408
1467
|
r === "start" && _(this.startDelta, a.delta);
|
|
1409
1468
|
for (var u = 0, l = [[i, s], [o, c]]; u < l.length; u++) {
|
|
1410
|
-
var p = l[u],
|
|
1411
|
-
|
|
1469
|
+
var p = l[u], v = p[0], w = p[1];
|
|
1470
|
+
v.page.x += w.x, v.page.y += w.y, v.client.x += w.x, v.client.y += w.y;
|
|
1412
1471
|
}
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1472
|
+
var x = this.result.rectDelta, E = e.rect || n.rect;
|
|
1473
|
+
E.left += x.left, E.right += x.right, E.top += x.top, E.bottom += x.bottom, E.width = E.right - E.left, E.height = E.bottom - E.top;
|
|
1415
1474
|
} }, { key: "setAndApply", value: function(e) {
|
|
1416
1475
|
var n = this.interaction, r = e.phase, o = e.preEnd, i = e.skipModifiers, a = this.setAll(this.fillArg({ preEnd: o, phase: r, pageCoords: e.modifiedCoords || n.coords.cur.page }));
|
|
1417
1476
|
if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
|
|
@@ -1454,8 +1513,8 @@ function zo() {
|
|
|
1454
1513
|
var n = e.interaction, r = n.coords, o = n.rect, i = n.modification;
|
|
1455
1514
|
if (i.result) {
|
|
1456
1515
|
for (var a = i.startDelta, s = i.result, c = s.delta, u = s.rectDelta, l = 0, p = [[r.start, a], [r.cur, c]]; l < p.length; l++) {
|
|
1457
|
-
var
|
|
1458
|
-
|
|
1516
|
+
var v = p[l], w = v[0], x = v[1];
|
|
1517
|
+
w.page.x -= x.x, w.page.y -= x.y, w.client.x -= x.x, w.client.y -= x.y;
|
|
1459
1518
|
}
|
|
1460
1519
|
o.left -= u.left, o.right -= u.right, o.top -= u.top, o.bottom -= u.bottom;
|
|
1461
1520
|
}
|
|
@@ -1472,7 +1531,7 @@ function zo() {
|
|
|
1472
1531
|
function at(t, e) {
|
|
1473
1532
|
return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
|
|
1474
1533
|
}
|
|
1475
|
-
function
|
|
1534
|
+
function me(t, e) {
|
|
1476
1535
|
var n = t.defaults, r = { start: t.start, set: t.set, beforeEnd: t.beforeEnd, stop: t.stop }, o = function(i) {
|
|
1477
1536
|
var a = i || {};
|
|
1478
1537
|
for (var s in a.enabled = a.enabled !== !1, n) s in a || (a[s] = n[s]);
|
|
@@ -1485,7 +1544,7 @@ function zo() {
|
|
|
1485
1544
|
};
|
|
1486
1545
|
return e && typeof e == "string" && (o._defaults = n, o._methods = r), o;
|
|
1487
1546
|
}
|
|
1488
|
-
function
|
|
1547
|
+
function He(t) {
|
|
1489
1548
|
var e = t.iEvent, n = t.interaction.modification.result;
|
|
1490
1549
|
n && (e.modifiers = n.eventProps);
|
|
1491
1550
|
}
|
|
@@ -1493,7 +1552,7 @@ function zo() {
|
|
|
1493
1552
|
t.defaults.perAction.modifiers = [];
|
|
1494
1553
|
}, listeners: { "interactions:new": function(t) {
|
|
1495
1554
|
var e = t.interaction;
|
|
1496
|
-
e.modification = new
|
|
1555
|
+
e.modification = new Mt(e);
|
|
1497
1556
|
}, "interactions:before-action-start": function(t) {
|
|
1498
1557
|
var e = t.interaction, n = t.interaction.modification;
|
|
1499
1558
|
n.start(t, e.coords.start.page), e.edges = n.edges, n.applyToInteraction(t);
|
|
@@ -1503,20 +1562,20 @@ function zo() {
|
|
|
1503
1562
|
}, "interactions:before-action-end": function(t) {
|
|
1504
1563
|
var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
|
|
1505
1564
|
return e.edges = n.startEdges, r;
|
|
1506
|
-
}, "interactions:action-start":
|
|
1565
|
+
}, "interactions:action-start": He, "interactions:action-move": He, "interactions:action-end": He, "interactions:after-action-start": function(t) {
|
|
1507
1566
|
return t.interaction.modification.restoreInteractionCoords(t);
|
|
1508
1567
|
}, "interactions:after-action-move": function(t) {
|
|
1509
1568
|
return t.interaction.modification.restoreInteractionCoords(t);
|
|
1510
1569
|
}, "interactions:stop": function(t) {
|
|
1511
1570
|
return t.interaction.modification.stop(t);
|
|
1512
|
-
} } }, cn = or, ln = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} },
|
|
1513
|
-
|
|
1514
|
-
var e =
|
|
1571
|
+
} } }, cn = or, ln = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Ot = (function(t) {
|
|
1572
|
+
Y(n, t);
|
|
1573
|
+
var e = Q(n);
|
|
1515
1574
|
function n(r, o, i, a, s, c, u) {
|
|
1516
1575
|
var l;
|
|
1517
|
-
|
|
1518
|
-
var p = r.interactable,
|
|
1519
|
-
return l.page = _({},
|
|
1576
|
+
T(this, n), (l = e.call(this, r)).relatedTarget = null, l.screenX = void 0, l.screenY = void 0, l.button = void 0, l.buttons = void 0, l.ctrlKey = void 0, l.shiftKey = void 0, l.altKey = void 0, l.metaKey = void 0, l.page = void 0, l.client = void 0, l.delta = void 0, l.rect = void 0, l.x0 = void 0, l.y0 = void 0, l.t0 = void 0, l.dt = void 0, l.duration = void 0, l.clientX0 = void 0, l.clientY0 = void 0, l.velocity = void 0, l.speed = void 0, l.swipe = void 0, l.axes = void 0, l.preEnd = void 0, s = s || r.element;
|
|
1577
|
+
var p = r.interactable, v = (p && p.options || ln).deltaSource, w = Ae(p, s, i), x = a === "start", E = a === "end", S = x ? se(l) : r.prevEvent, k = x ? r.coords.start : E ? { page: S.page, client: S.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
|
|
1578
|
+
return l.page = _({}, k.page), l.client = _({}, k.client), l.rect = _({}, r.rect), l.timeStamp = k.timeStamp, E || (l.page.x -= w.x, l.page.y -= w.y, l.client.x -= w.x, l.client.y -= w.y), l.ctrlKey = o.ctrlKey, l.altKey = o.altKey, l.shiftKey = o.shiftKey, l.metaKey = o.metaKey, l.button = o.button, l.buttons = o.buttons, l.target = s, l.currentTarget = s, l.preEnd = c, l.type = u || i + (a || ""), l.interactable = p, l.t0 = x ? r.pointers[r.pointers.length - 1].downTime : S.t0, l.x0 = r.coords.start.page.x - w.x, l.y0 = r.coords.start.page.y - w.y, l.clientX0 = r.coords.start.client.x - w.x, l.clientY0 = r.coords.start.client.y - w.y, l.delta = x || E ? { x: 0, y: 0 } : { x: l[v].x - S[v].x, y: l[v].y - S[v].y }, l.dt = r.coords.delta.timeStamp, l.duration = l.timeStamp - l.t0, l.velocity = _({}, r.coords.velocity[v]), l.speed = ze(l.velocity.x, l.velocity.y), l.swipe = E || a === "inertiastart" ? l.getSwipe() : null, l;
|
|
1520
1579
|
}
|
|
1521
1580
|
return R(n, [{ key: "getSwipe", value: function() {
|
|
1522
1581
|
var r = this._interaction;
|
|
@@ -1532,7 +1591,7 @@ function zo() {
|
|
|
1532
1591
|
this.propagationStopped = !0;
|
|
1533
1592
|
} }]), n;
|
|
1534
1593
|
})(rt);
|
|
1535
|
-
Object.defineProperties(
|
|
1594
|
+
Object.defineProperties(Ot.prototype, { pageX: { get: function() {
|
|
1536
1595
|
return this.page.x;
|
|
1537
1596
|
}, set: function(t) {
|
|
1538
1597
|
this.page.x = t;
|
|
@@ -1566,7 +1625,7 @@ function zo() {
|
|
|
1566
1625
|
this.velocity.y = t;
|
|
1567
1626
|
} } });
|
|
1568
1627
|
var ir = R((function t(e, n, r, o, i) {
|
|
1569
|
-
|
|
1628
|
+
T(this, t), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = e, this.pointer = n, this.event = r, this.downTime = o, this.downTarget = i;
|
|
1570
1629
|
})), ar = (function(t) {
|
|
1571
1630
|
return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
|
|
1572
1631
|
})({}), un = (function(t) {
|
|
@@ -1574,7 +1633,7 @@ function zo() {
|
|
|
1574
1633
|
})({}), sr = 0, cr = (function() {
|
|
1575
1634
|
function t(e) {
|
|
1576
1635
|
var n = this, r = e.pointerType, o = e.scopeFire;
|
|
1577
|
-
|
|
1636
|
+
T(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Ne((function(l) {
|
|
1578
1637
|
this.move(l);
|
|
1579
1638
|
}), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = sr++, this._scopeFire = o, this.pointerType = r;
|
|
1580
1639
|
var i = this;
|
|
@@ -1599,11 +1658,11 @@ function zo() {
|
|
|
1599
1658
|
var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
|
|
1600
1659
|
this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: o, pointerInfo: i, type: "down", interaction: this });
|
|
1601
1660
|
} }, { key: "start", value: function(e, n, r) {
|
|
1602
|
-
return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (
|
|
1661
|
+
return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (Tt(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? _({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
|
|
1603
1662
|
} }, { key: "pointerMove", value: function(e, n, r) {
|
|
1604
1663
|
this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
|
|
1605
1664
|
var o, i, a = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
|
|
1606
|
-
this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved =
|
|
1665
|
+
this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = ze(o, i) > this.pointerMoveTolerance);
|
|
1607
1666
|
var s, c, u, l = this.getPointerIndex(e), p = { pointer: e, pointerIndex: l, pointerInfo: this.pointers[l], event: n, type: "move", eventTarget: r, dx: o, dy: i, duplicate: a, interaction: this };
|
|
1608
1667
|
a || (s = this.coords.velocity, c = this.coords.delta, u = Math.max(c.timeStamp / 1e3, 1e-3), s.page.x = c.page.x / u, s.page.y = c.page.y / u, s.client.x = c.client.x / u, s.client.y = c.client.y / u, s.timeStamp = u), this._scopeFire("interactions:move", p), a || this.simulation || (this.interacting() && (p.type = null, this.move(p)), this.pointerWasMoved && tt(this.coords.prev, this.coords.cur));
|
|
1609
1668
|
} }, { key: "move", value: function(e) {
|
|
@@ -1625,14 +1684,14 @@ function zo() {
|
|
|
1625
1684
|
} }, { key: "stop", value: function() {
|
|
1626
1685
|
this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
|
|
1627
1686
|
} }, { key: "getPointerIndex", value: function(e) {
|
|
1628
|
-
var n =
|
|
1629
|
-
return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 :
|
|
1687
|
+
var n = je(e);
|
|
1688
|
+
return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : Fe(this.pointers, (function(r) {
|
|
1630
1689
|
return r.id === n;
|
|
1631
1690
|
}));
|
|
1632
1691
|
} }, { key: "getPointerInfo", value: function(e) {
|
|
1633
1692
|
return this.pointers[this.getPointerIndex(e)];
|
|
1634
1693
|
} }, { key: "updatePointer", value: function(e, n, r, o) {
|
|
1635
|
-
var i, a, s, c =
|
|
1694
|
+
var i, a, s, c = je(e), u = this.getPointerIndex(e), l = this.pointers[u];
|
|
1636
1695
|
return o = o !== !1 && (o || /(down|start)$/i.test(n.type)), l ? l.pointer = e : (l = new ir(c, e, n, null, null), u = this.pointers.length, this.pointers.push(l)), Nn(this.coords.cur, this.pointers.map((function(p) {
|
|
1637
1696
|
return p.pointer;
|
|
1638
1697
|
})), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, l.downTime = this.coords.cur.timeStamp, l.downTarget = r, et(this.downPointer, e), this.interacting() || (tt(this.coords.start, this.coords.cur), tt(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: l, pointerIndex: u, interaction: this }), u;
|
|
@@ -1647,13 +1706,13 @@ function zo() {
|
|
|
1647
1706
|
} }, { key: "destroy", value: function() {
|
|
1648
1707
|
this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
|
|
1649
1708
|
} }, { key: "_createPreparedEvent", value: function(e, n, r, o) {
|
|
1650
|
-
return new
|
|
1709
|
+
return new Ot(this, e, this.prepared.name, n, this.element, r, o);
|
|
1651
1710
|
} }, { key: "_fireEvent", value: function(e) {
|
|
1652
1711
|
var n;
|
|
1653
1712
|
(n = this.interactable) == null || n.fire(e), (!this.prevEvent || e.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = e);
|
|
1654
1713
|
} }, { key: "_doPhase", value: function(e) {
|
|
1655
1714
|
var n = e.event, r = e.phase, o = e.preEnd, i = e.type, a = this.rect;
|
|
1656
|
-
if (a && r === "move" && (
|
|
1715
|
+
if (a && r === "move" && (Ze(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1) return !1;
|
|
1657
1716
|
var s = e.iEvent = this._createPreparedEvent(n, r, o, i);
|
|
1658
1717
|
return this._scopeFire("interactions:action-".concat(r), e), r === "start" && (this.prevEvent = s), this._fireEvent(s), this._scopeFire("interactions:after-action-".concat(r), e), !0;
|
|
1659
1718
|
} }, { key: "_now", value: function() {
|
|
@@ -1668,13 +1727,13 @@ function zo() {
|
|
|
1668
1727
|
return !(!n.offset.pending.x && !n.offset.pending.y);
|
|
1669
1728
|
})(t)) return !1;
|
|
1670
1729
|
var e = t.offset.pending;
|
|
1671
|
-
return
|
|
1730
|
+
return Pt(t.coords.cur, e), Pt(t.coords.delta, e), Ze(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
|
|
1672
1731
|
}
|
|
1673
1732
|
function lr(t) {
|
|
1674
1733
|
var e = t.x, n = t.y;
|
|
1675
1734
|
this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
|
|
1676
1735
|
}
|
|
1677
|
-
function
|
|
1736
|
+
function Pt(t, e) {
|
|
1678
1737
|
var n = t.page, r = t.client, o = e.x, i = e.y;
|
|
1679
1738
|
n.x += o, n.y += i, r.x += o, r.y += i;
|
|
1680
1739
|
}
|
|
@@ -1685,7 +1744,7 @@ function zo() {
|
|
|
1685
1744
|
t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
|
|
1686
1745
|
}, "interactions:update-pointer": function(t) {
|
|
1687
1746
|
return (function(e) {
|
|
1688
|
-
e.pointerIsDown && (
|
|
1747
|
+
e.pointerIsDown && (Pt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
|
|
1689
1748
|
})(t.interaction);
|
|
1690
1749
|
}, "interactions:before-action-start": pn, "interactions:before-action-move": pn, "interactions:before-action-end": function(t) {
|
|
1691
1750
|
var e = t.interaction;
|
|
@@ -1695,12 +1754,12 @@ function zo() {
|
|
|
1695
1754
|
e.offset.total.x = 0, e.offset.total.y = 0, e.offset.pending.x = 0, e.offset.pending.y = 0;
|
|
1696
1755
|
} } }, fn = ur, pr = (function() {
|
|
1697
1756
|
function t(e) {
|
|
1698
|
-
|
|
1757
|
+
T(this, t), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = e;
|
|
1699
1758
|
}
|
|
1700
1759
|
return R(t, [{ key: "start", value: function(e) {
|
|
1701
1760
|
var n = this.interaction, r = st(n);
|
|
1702
1761
|
if (!r || !r.enabled) return !1;
|
|
1703
|
-
var o = n.coords.velocity.client, i =
|
|
1762
|
+
var o = n.coords.velocity.client, i = ze(o.x, o.y), a = this.modification || (this.modification = new Mt(n));
|
|
1704
1763
|
if (a.copyFrom(n.modification), this.t0 = n._now(), this.allowResume = r.allowResume, this.v0 = i, this.currentOffset = { x: 0, y: 0 }, this.startCoords = n.coords.cur.page, this.modifierArg = a.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - n.coords.cur.timeStamp < 50 && i > r.minSpeed && i > r.endSpeed) this.startInertia();
|
|
1705
1764
|
else {
|
|
1706
1765
|
if (a.result = a.setAll(this.modifierArg), !a.result.changed) return !1;
|
|
@@ -1721,16 +1780,16 @@ function zo() {
|
|
|
1721
1780
|
}));
|
|
1722
1781
|
} }, { key: "onNextFrame", value: function(e) {
|
|
1723
1782
|
var n = this;
|
|
1724
|
-
this.timeout =
|
|
1783
|
+
this.timeout = ge.request((function() {
|
|
1725
1784
|
n.active && e();
|
|
1726
1785
|
}));
|
|
1727
1786
|
} }, { key: "inertiaTick", value: function() {
|
|
1728
1787
|
var e, n, r, o, i, a, s, c = this, u = this.interaction, l = st(u).resistance, p = (u._now() - this.t0) / 1e3;
|
|
1729
1788
|
if (p < this.te) {
|
|
1730
|
-
var
|
|
1731
|
-
this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y,
|
|
1732
|
-
var
|
|
1733
|
-
this.currentOffset.x +=
|
|
1789
|
+
var v, w = 1 - (Math.exp(-l * p) - this.lambda_v0) / this.one_ve_v0;
|
|
1790
|
+
this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, v = { x: hn(s = w, e, r, i), y: hn(s, n, o, a) }) : v = { x: this.targetOffset.x * w, y: this.targetOffset.y * w };
|
|
1791
|
+
var x = { x: v.x - this.currentOffset.x, y: v.y - this.currentOffset.y };
|
|
1792
|
+
this.currentOffset.x += x.x, this.currentOffset.y += x.y, u.offsetBy(x), u.move(), this.onNextFrame((function() {
|
|
1734
1793
|
return c.inertiaTick();
|
|
1735
1794
|
}));
|
|
1736
1795
|
} else u.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
|
|
@@ -1748,7 +1807,7 @@ function zo() {
|
|
|
1748
1807
|
} }, { key: "end", value: function() {
|
|
1749
1808
|
this.interaction.move(), this.interaction.end(), this.stop();
|
|
1750
1809
|
} }, { key: "stop", value: function() {
|
|
1751
|
-
this.active = this.smoothEnd = !1, this.interaction.simulation = null,
|
|
1810
|
+
this.active = this.smoothEnd = !1, this.interaction.simulation = null, ge.cancel(this.timeout);
|
|
1752
1811
|
} }]), t;
|
|
1753
1812
|
})();
|
|
1754
1813
|
function st(t) {
|
|
@@ -1766,12 +1825,12 @@ function zo() {
|
|
|
1766
1825
|
return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
|
|
1767
1826
|
}, "interactions:down": function(t) {
|
|
1768
1827
|
var e = t.interaction, n = t.eventTarget, r = e.inertia;
|
|
1769
|
-
if (r.active) for (var o = n;
|
|
1828
|
+
if (r.active) for (var o = n; m.element(o); ) {
|
|
1770
1829
|
if (o === e.element) {
|
|
1771
1830
|
r.resume(t);
|
|
1772
1831
|
break;
|
|
1773
1832
|
}
|
|
1774
|
-
o =
|
|
1833
|
+
o = ee(o);
|
|
1775
1834
|
}
|
|
1776
1835
|
}, "interactions:stop": function(t) {
|
|
1777
1836
|
var e = t.interaction.inertia;
|
|
@@ -1781,7 +1840,7 @@ function zo() {
|
|
|
1781
1840
|
e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
|
|
1782
1841
|
}, "interactions:before-action-inertiastart": function(t) {
|
|
1783
1842
|
return t.interaction.modification.setAndApply(t);
|
|
1784
|
-
}, "interactions:action-resume":
|
|
1843
|
+
}, "interactions:action-resume": He, "interactions:action-inertiastart": He, "interactions:after-action-inertiastart": function(t) {
|
|
1785
1844
|
return t.interaction.modification.restoreInteractionCoords(t);
|
|
1786
1845
|
}, "interactions:after-action-resume": function(t) {
|
|
1787
1846
|
return t.interaction.modification.restoreInteractionCoords(t);
|
|
@@ -1803,16 +1862,16 @@ function zo() {
|
|
|
1803
1862
|
}
|
|
1804
1863
|
var mn = (function() {
|
|
1805
1864
|
function t(e) {
|
|
1806
|
-
|
|
1865
|
+
T(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = _({}, e || {});
|
|
1807
1866
|
}
|
|
1808
1867
|
return R(t, [{ key: "fire", value: function(e) {
|
|
1809
1868
|
var n, r = this.global;
|
|
1810
1869
|
(n = this.types[e.type]) && gn(e, n), !e.propagationStopped && r && (n = r[e.type]) && gn(e, n);
|
|
1811
1870
|
} }, { key: "on", value: function(e, n) {
|
|
1812
|
-
var r =
|
|
1813
|
-
for (e in r) this.types[e] =
|
|
1871
|
+
var r = we(e, n);
|
|
1872
|
+
for (e in r) this.types[e] = Ut(this.types[e] || [], r[e]);
|
|
1814
1873
|
} }, { key: "off", value: function(e, n) {
|
|
1815
|
-
var r =
|
|
1874
|
+
var r = we(e, n);
|
|
1816
1875
|
for (e in r) {
|
|
1817
1876
|
var o = this.types[e];
|
|
1818
1877
|
if (o && o.length) for (var i = 0, a = r[e]; i < a.length; i++) {
|
|
@@ -1825,7 +1884,7 @@ function zo() {
|
|
|
1825
1884
|
} }]), t;
|
|
1826
1885
|
})(), hr = (function() {
|
|
1827
1886
|
function t(e) {
|
|
1828
|
-
|
|
1887
|
+
T(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, et(this, e);
|
|
1829
1888
|
}
|
|
1830
1889
|
return R(t, [{ key: "preventOriginalDefault", value: function() {
|
|
1831
1890
|
this.originalEvent.preventDefault();
|
|
@@ -1835,94 +1894,94 @@ function zo() {
|
|
|
1835
1894
|
this.originalEvent.stopImmediatePropagation();
|
|
1836
1895
|
} }]), t;
|
|
1837
1896
|
})();
|
|
1838
|
-
function
|
|
1839
|
-
return
|
|
1897
|
+
function Be(t) {
|
|
1898
|
+
return m.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
|
|
1840
1899
|
}
|
|
1841
1900
|
function ct(t, e) {
|
|
1842
1901
|
return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
|
|
1843
1902
|
}
|
|
1844
1903
|
var vr = { id: "events", install: function(t) {
|
|
1845
|
-
var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(l, p,
|
|
1846
|
-
var
|
|
1847
|
-
if (!r[
|
|
1848
|
-
r[
|
|
1904
|
+
var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(l, p, v, w, x) {
|
|
1905
|
+
var E = Be(x);
|
|
1906
|
+
if (!r[v]) {
|
|
1907
|
+
r[v] = [];
|
|
1849
1908
|
for (var S = 0; S < o.length; S++) {
|
|
1850
|
-
var
|
|
1851
|
-
a(
|
|
1909
|
+
var k = o[S];
|
|
1910
|
+
a(k, v, c), a(k, v, u, !0);
|
|
1852
1911
|
}
|
|
1853
1912
|
}
|
|
1854
|
-
var
|
|
1913
|
+
var C = r[v], P = Le(C, (function(A) {
|
|
1855
1914
|
return A.selector === l && A.context === p;
|
|
1856
1915
|
}));
|
|
1857
|
-
|
|
1858
|
-
}, removeDelegate: function(l, p,
|
|
1859
|
-
var
|
|
1860
|
-
if (
|
|
1861
|
-
for (
|
|
1862
|
-
var
|
|
1863
|
-
if (
|
|
1864
|
-
for (var A =
|
|
1865
|
-
var D = A[
|
|
1866
|
-
if (D.func ===
|
|
1867
|
-
A.splice(
|
|
1916
|
+
P || (P = { selector: l, context: p, listeners: [] }, C.push(P)), P.listeners.push({ func: w, options: E });
|
|
1917
|
+
}, removeDelegate: function(l, p, v, w, x) {
|
|
1918
|
+
var E, S = Be(x), k = r[v], C = !1;
|
|
1919
|
+
if (k)
|
|
1920
|
+
for (E = k.length - 1; E >= 0; E--) {
|
|
1921
|
+
var P = k[E];
|
|
1922
|
+
if (P.selector === l && P.context === p) {
|
|
1923
|
+
for (var A = P.listeners, M = A.length - 1; M >= 0; M--) {
|
|
1924
|
+
var D = A[M];
|
|
1925
|
+
if (D.func === w && ct(D.options, S)) {
|
|
1926
|
+
A.splice(M, 1), A.length || (k.splice(E, 1), s(p, v, c), s(p, v, u, !0)), C = !0;
|
|
1868
1927
|
break;
|
|
1869
1928
|
}
|
|
1870
1929
|
}
|
|
1871
|
-
if (
|
|
1930
|
+
if (C) break;
|
|
1872
1931
|
}
|
|
1873
1932
|
}
|
|
1874
1933
|
}, delegateListener: c, delegateUseCapture: u, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
|
|
1875
|
-
function a(l, p,
|
|
1934
|
+
function a(l, p, v, w) {
|
|
1876
1935
|
if (l.addEventListener) {
|
|
1877
|
-
var
|
|
1936
|
+
var x = Be(w), E = Le(n, (function(S) {
|
|
1878
1937
|
return S.eventTarget === l;
|
|
1879
1938
|
}));
|
|
1880
|
-
|
|
1881
|
-
return S.func ===
|
|
1882
|
-
})) || (l.addEventListener(p,
|
|
1939
|
+
E || (E = { eventTarget: l, events: {} }, n.push(E)), E.events[p] || (E.events[p] = []), Le(E.events[p], (function(S) {
|
|
1940
|
+
return S.func === v && ct(S.options, x);
|
|
1941
|
+
})) || (l.addEventListener(p, v, i.supportsOptions ? x : x.capture), E.events[p].push({ func: v, options: x }));
|
|
1883
1942
|
}
|
|
1884
1943
|
}
|
|
1885
|
-
function s(l, p,
|
|
1944
|
+
function s(l, p, v, w) {
|
|
1886
1945
|
if (l.addEventListener && l.removeEventListener) {
|
|
1887
|
-
var
|
|
1888
|
-
return
|
|
1889
|
-
})),
|
|
1890
|
-
if (
|
|
1891
|
-
var S = !1,
|
|
1892
|
-
if (
|
|
1893
|
-
if (
|
|
1894
|
-
for (var
|
|
1895
|
-
var
|
|
1896
|
-
s(l, p,
|
|
1946
|
+
var x = Fe(n, (function(X) {
|
|
1947
|
+
return X.eventTarget === l;
|
|
1948
|
+
})), E = n[x];
|
|
1949
|
+
if (E && E.events) if (p !== "all") {
|
|
1950
|
+
var S = !1, k = E.events[p];
|
|
1951
|
+
if (k) {
|
|
1952
|
+
if (v === "all") {
|
|
1953
|
+
for (var C = k.length - 1; C >= 0; C--) {
|
|
1954
|
+
var P = k[C];
|
|
1955
|
+
s(l, p, P.func, P.options);
|
|
1897
1956
|
}
|
|
1898
1957
|
return;
|
|
1899
1958
|
}
|
|
1900
|
-
for (var A =
|
|
1901
|
-
var D =
|
|
1902
|
-
if (D.func ===
|
|
1903
|
-
l.removeEventListener(p,
|
|
1959
|
+
for (var A = Be(w), M = 0; M < k.length; M++) {
|
|
1960
|
+
var D = k[M];
|
|
1961
|
+
if (D.func === v && ct(D.options, A)) {
|
|
1962
|
+
l.removeEventListener(p, v, i.supportsOptions ? A : A.capture), k.splice(M, 1), k.length === 0 && (delete E.events[p], S = !0);
|
|
1904
1963
|
break;
|
|
1905
1964
|
}
|
|
1906
1965
|
}
|
|
1907
1966
|
}
|
|
1908
|
-
S && !Object.keys(
|
|
1909
|
-
} else for (p in
|
|
1967
|
+
S && !Object.keys(E.events).length && n.splice(x, 1);
|
|
1968
|
+
} else for (p in E.events) E.events.hasOwnProperty(p) && s(l, p, "all");
|
|
1910
1969
|
}
|
|
1911
1970
|
}
|
|
1912
1971
|
function c(l, p) {
|
|
1913
|
-
for (var
|
|
1914
|
-
for (var
|
|
1915
|
-
var
|
|
1916
|
-
if (
|
|
1917
|
-
var
|
|
1918
|
-
|
|
1919
|
-
for (var D = 0; D <
|
|
1920
|
-
var
|
|
1921
|
-
ct(
|
|
1972
|
+
for (var v = Be(p), w = new hr(l), x = r[l.type], E = Wt(l)[0], S = E; m.element(S); ) {
|
|
1973
|
+
for (var k = 0; k < x.length; k++) {
|
|
1974
|
+
var C = x[k], P = C.selector, A = C.context;
|
|
1975
|
+
if (oe(S, P) && ae(A, E) && ae(A, S)) {
|
|
1976
|
+
var M = C.listeners;
|
|
1977
|
+
w.currentTarget = S;
|
|
1978
|
+
for (var D = 0; D < M.length; D++) {
|
|
1979
|
+
var X = M[D];
|
|
1980
|
+
ct(X.options, v) && X.func(w);
|
|
1922
1981
|
}
|
|
1923
1982
|
}
|
|
1924
1983
|
}
|
|
1925
|
-
S =
|
|
1984
|
+
S = ee(S);
|
|
1926
1985
|
}
|
|
1927
1986
|
}
|
|
1928
1987
|
function u(l) {
|
|
@@ -1946,7 +2005,7 @@ function zo() {
|
|
|
1946
2005
|
var s = a[i], c = r;
|
|
1947
2006
|
if (s.simulation && s.simulation.allowResume && s.pointerType === e) for (; c; ) {
|
|
1948
2007
|
if (c === s.element) return s;
|
|
1949
|
-
c =
|
|
2008
|
+
c = ee(c);
|
|
1950
2009
|
}
|
|
1951
2010
|
}
|
|
1952
2011
|
return null;
|
|
@@ -1992,27 +2051,27 @@ function zo() {
|
|
|
1992
2051
|
var gr = Rt, It = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
|
|
1993
2052
|
function bn(t, e) {
|
|
1994
2053
|
return function(n) {
|
|
1995
|
-
var r = e.interactions.list, o =
|
|
2054
|
+
var r = e.interactions.list, o = Vt(n), i = Wt(n), a = i[0], s = i[1], c = [];
|
|
1996
2055
|
if (/^touch/.test(n.type)) {
|
|
1997
2056
|
e.prevTouchTime = e.now();
|
|
1998
2057
|
for (var u = 0, l = n.changedTouches; u < l.length; u++) {
|
|
1999
|
-
var p = l[u],
|
|
2000
|
-
c.push([
|
|
2058
|
+
var p = l[u], v = { pointer: p, pointerId: je(p), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, w = xn(v);
|
|
2059
|
+
c.push([v.pointer, v.eventTarget, v.curEventTarget, w]);
|
|
2001
2060
|
}
|
|
2002
2061
|
} else {
|
|
2003
|
-
var
|
|
2004
|
-
if (!
|
|
2005
|
-
for (var
|
|
2006
|
-
|
|
2062
|
+
var x = !1;
|
|
2063
|
+
if (!G.supportsPointerEvent && /mouse/.test(n.type)) {
|
|
2064
|
+
for (var E = 0; E < r.length && !x; E++) x = r[E].pointerType !== "mouse" && r[E].pointerIsDown;
|
|
2065
|
+
x = x || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
|
|
2007
2066
|
}
|
|
2008
|
-
if (!
|
|
2009
|
-
var S = { pointer: n, pointerId:
|
|
2010
|
-
c.push([S.pointer, S.eventTarget, S.curEventTarget,
|
|
2067
|
+
if (!x) {
|
|
2068
|
+
var S = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, k = xn(S);
|
|
2069
|
+
c.push([S.pointer, S.eventTarget, S.curEventTarget, k]);
|
|
2011
2070
|
}
|
|
2012
2071
|
}
|
|
2013
|
-
for (var
|
|
2014
|
-
var
|
|
2015
|
-
|
|
2072
|
+
for (var C = 0; C < c.length; C++) {
|
|
2073
|
+
var P = c[C], A = P[0], M = P[1], D = P[2];
|
|
2074
|
+
P[3][t](A, n, M, D);
|
|
2016
2075
|
}
|
|
2017
2076
|
};
|
|
2018
2077
|
}
|
|
@@ -2033,26 +2092,26 @@ function zo() {
|
|
|
2033
2092
|
var r = It[n];
|
|
2034
2093
|
e[r] = bn(r, t);
|
|
2035
2094
|
}
|
|
2036
|
-
var o, i =
|
|
2095
|
+
var o, i = G.pEventTypes;
|
|
2037
2096
|
function a() {
|
|
2038
2097
|
for (var s = 0, c = t.interactions.list; s < c.length; s++) {
|
|
2039
2098
|
var u = c[s];
|
|
2040
2099
|
if (u.pointerIsDown && u.pointerType === "touch" && !u._interacting) for (var l = function() {
|
|
2041
|
-
var
|
|
2042
|
-
t.documents.some((function(
|
|
2043
|
-
return
|
|
2044
|
-
})) || u.removePointer(
|
|
2045
|
-
}, p = 0,
|
|
2100
|
+
var w = v[p];
|
|
2101
|
+
t.documents.some((function(x) {
|
|
2102
|
+
return ae(x.doc, w.downTarget);
|
|
2103
|
+
})) || u.removePointer(w.pointer, w.event);
|
|
2104
|
+
}, p = 0, v = u.pointers; p < v.length; p++) l();
|
|
2046
2105
|
}
|
|
2047
2106
|
}
|
|
2048
|
-
(o =
|
|
2107
|
+
(o = B.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
|
|
2049
2108
|
for (var c = 0, u = t.interactions.list; c < u.length; c++)
|
|
2050
2109
|
u[c].documentBlur(s);
|
|
2051
2110
|
} }), t.prevTouchTime = 0, t.Interaction = (function(s) {
|
|
2052
|
-
|
|
2053
|
-
var c =
|
|
2111
|
+
Y(u, s);
|
|
2112
|
+
var c = Q(u);
|
|
2054
2113
|
function u() {
|
|
2055
|
-
return
|
|
2114
|
+
return T(this, u), c.apply(this, arguments);
|
|
2056
2115
|
}
|
|
2057
2116
|
return R(u, [{ key: "pointerMoveTolerance", get: function() {
|
|
2058
2117
|
return t.interactions.pointerMoveTolerance;
|
|
@@ -2077,37 +2136,37 @@ function zo() {
|
|
|
2077
2136
|
var o = e.interactions.list[r];
|
|
2078
2137
|
o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
|
|
2079
2138
|
}
|
|
2080
|
-
} }, onDocSignal: Dt, doOnInteractions: bn, methodNames: It }, yr = mr,
|
|
2139
|
+
} }, onDocSignal: Dt, doOnInteractions: bn, methodNames: It }, yr = mr, ye = (function(t) {
|
|
2081
2140
|
return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
|
|
2082
|
-
})(
|
|
2141
|
+
})(ye || {}), br = (function() {
|
|
2083
2142
|
function t(e, n, r, o) {
|
|
2084
|
-
|
|
2143
|
+
T(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new mn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = re(ue(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
|
|
2085
2144
|
}
|
|
2086
2145
|
return R(t, [{ key: "_defaults", get: function() {
|
|
2087
2146
|
return { base: {}, perAction: {}, actions: {} };
|
|
2088
2147
|
} }, { key: "setOnEvents", value: function(e, n) {
|
|
2089
|
-
return
|
|
2148
|
+
return m.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), m.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), m.func(n.onend) && this.on("".concat(e, "end"), n.onend), m.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
|
|
2090
2149
|
} }, { key: "updatePerActionListeners", value: function(e, n, r) {
|
|
2091
2150
|
var o, i = this, a = (o = this._actions.map[e]) == null ? void 0 : o.filterEventType, s = function(c) {
|
|
2092
2151
|
return (a == null || a(c)) && it(c, i._actions);
|
|
2093
2152
|
};
|
|
2094
|
-
(
|
|
2153
|
+
(m.array(n) || m.object(n)) && this._onOff(ye.Off, e, n, void 0, s), (m.array(r) || m.object(r)) && this._onOff(ye.On, e, r, void 0, s);
|
|
2095
2154
|
} }, { key: "setPerAction", value: function(e, n) {
|
|
2096
2155
|
var r = this._defaults;
|
|
2097
2156
|
for (var o in n) {
|
|
2098
2157
|
var i = o, a = this.options[e], s = n[i];
|
|
2099
|
-
i === "listeners" && this.updatePerActionListeners(e, a.listeners, s),
|
|
2158
|
+
i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), m.array(s) ? a[i] = qt(s) : m.plainObject(s) ? (a[i] = _(a[i] || {}, Oe(s)), m.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : m.bool(s) && m.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
|
|
2100
2159
|
}
|
|
2101
2160
|
} }, { key: "getRect", value: function(e) {
|
|
2102
|
-
return e = e || (
|
|
2161
|
+
return e = e || (m.element(this.target) ? this.target : null), m.string(this.target) && (e = e || this._context.querySelector(this.target)), xe(e);
|
|
2103
2162
|
} }, { key: "rectChecker", value: function(e) {
|
|
2104
2163
|
var n = this;
|
|
2105
|
-
return
|
|
2164
|
+
return m.func(e) ? (this.getRect = function(r) {
|
|
2106
2165
|
var o = _({}, e.apply(n, r));
|
|
2107
2166
|
return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
|
|
2108
2167
|
}, this) : e === null ? (delete this.getRect, this) : this.getRect;
|
|
2109
2168
|
} }, { key: "_backCompatOption", value: function(e, n) {
|
|
2110
|
-
if (
|
|
2169
|
+
if (ue(n) || m.object(n)) {
|
|
2111
2170
|
for (var r in this.options[e] = n, this._actions.map) this.options[r][e] = n;
|
|
2112
2171
|
return this;
|
|
2113
2172
|
}
|
|
@@ -2118,44 +2177,44 @@ function zo() {
|
|
|
2118
2177
|
return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
|
|
2119
2178
|
} }, { key: "getAllElements", value: function() {
|
|
2120
2179
|
var e = this.target;
|
|
2121
|
-
return
|
|
2180
|
+
return m.string(e) ? Array.from(this._context.querySelectorAll(e)) : m.func(e) && e.getAllElements ? e.getAllElements() : m.element(e) ? [e] : [];
|
|
2122
2181
|
} }, { key: "context", value: function() {
|
|
2123
2182
|
return this._context;
|
|
2124
2183
|
} }, { key: "inContext", value: function(e) {
|
|
2125
|
-
return this._context === e.ownerDocument ||
|
|
2184
|
+
return this._context === e.ownerDocument || ae(this._context, e);
|
|
2126
2185
|
} }, { key: "testIgnoreAllow", value: function(e, n, r) {
|
|
2127
2186
|
return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
|
|
2128
2187
|
} }, { key: "testAllow", value: function(e, n, r) {
|
|
2129
|
-
return !e || !!
|
|
2188
|
+
return !e || !!m.element(r) && (m.string(e) ? j(r, e, n) : !!m.element(e) && ae(e, r));
|
|
2130
2189
|
} }, { key: "testIgnore", value: function(e, n, r) {
|
|
2131
|
-
return !(!e || !
|
|
2190
|
+
return !(!e || !m.element(r)) && (m.string(e) ? j(r, e, n) : !!m.element(e) && ae(e, r));
|
|
2132
2191
|
} }, { key: "fire", value: function(e) {
|
|
2133
2192
|
return this.events.fire(e), this;
|
|
2134
2193
|
} }, { key: "_onOff", value: function(e, n, r, o, i) {
|
|
2135
|
-
|
|
2136
|
-
var a =
|
|
2194
|
+
m.object(n) && !m.array(n) && (o = r, r = null);
|
|
2195
|
+
var a = we(n, r, i);
|
|
2137
2196
|
for (var s in a) {
|
|
2138
|
-
s === "wheel" && (s =
|
|
2197
|
+
s === "wheel" && (s = G.wheelEvent);
|
|
2139
2198
|
for (var c = 0, u = a[s]; c < u.length; c++) {
|
|
2140
2199
|
var l = u[c];
|
|
2141
|
-
it(s, this._actions) ? this.events[e ===
|
|
2200
|
+
it(s, this._actions) ? this.events[e === ye.On ? "on" : "off"](s, l) : m.string(this.target) ? this._scopeEvents[e === ye.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, l, o) : this._scopeEvents[e === ye.On ? "add" : "remove"](this.target, s, l, o);
|
|
2142
2201
|
}
|
|
2143
2202
|
}
|
|
2144
2203
|
return this;
|
|
2145
2204
|
} }, { key: "on", value: function(e, n, r) {
|
|
2146
|
-
return this._onOff(
|
|
2205
|
+
return this._onOff(ye.On, e, n, r);
|
|
2147
2206
|
} }, { key: "off", value: function(e, n, r) {
|
|
2148
|
-
return this._onOff(
|
|
2207
|
+
return this._onOff(ye.Off, e, n, r);
|
|
2149
2208
|
} }, { key: "set", value: function(e) {
|
|
2150
2209
|
var n = this._defaults;
|
|
2151
|
-
for (var r in
|
|
2210
|
+
for (var r in m.object(e) || (e = {}), this.options = Oe(n.base), this._actions.methodDict) {
|
|
2152
2211
|
var o = r, i = this._actions.methodDict[o];
|
|
2153
2212
|
this.options[o] = {}, this.setPerAction(o, _(_({}, n.perAction), n.actions[o])), this[i](e[o]);
|
|
2154
2213
|
}
|
|
2155
|
-
for (var a in e) a !== "getRect" ?
|
|
2214
|
+
for (var a in e) a !== "getRect" ? m.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
|
|
2156
2215
|
return this;
|
|
2157
2216
|
} }, { key: "unset", value: function() {
|
|
2158
|
-
if (
|
|
2217
|
+
if (m.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
|
|
2159
2218
|
var o = n[r], i = o.selector, a = o.context, s = o.listeners;
|
|
2160
2219
|
i === this.target && a === this._context && n.splice(r, 1);
|
|
2161
2220
|
for (var c = s.length - 1; c >= 0; c--) this._scopeEvents.removeDelegate(this.target, this._context, e, s[c][0], s[c][1]);
|
|
@@ -2165,8 +2224,8 @@ function zo() {
|
|
|
2165
2224
|
})(), xr = (function() {
|
|
2166
2225
|
function t(e) {
|
|
2167
2226
|
var n = this;
|
|
2168
|
-
|
|
2169
|
-
var o = r.interactable, i = o.target, a =
|
|
2227
|
+
T(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
|
|
2228
|
+
var o = r.interactable, i = o.target, a = m.string(i) ? n.selectorMap[i] : i[n.scope.id], s = Fe(a, (function(c) {
|
|
2170
2229
|
return c === o;
|
|
2171
2230
|
}));
|
|
2172
2231
|
a.splice(s, 1);
|
|
@@ -2175,89 +2234,89 @@ function zo() {
|
|
|
2175
2234
|
return R(t, [{ key: "new", value: function(e, n) {
|
|
2176
2235
|
n = _(n || {}, { actions: this.scope.actions });
|
|
2177
2236
|
var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
|
|
2178
|
-
return this.scope.addDocument(r._doc), this.list.push(r),
|
|
2237
|
+
return this.scope.addDocument(r._doc), this.list.push(r), m.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
|
|
2179
2238
|
} }, { key: "getExisting", value: function(e, n) {
|
|
2180
|
-
var r = n && n.context || this.scope.document, o =
|
|
2181
|
-
if (i) return
|
|
2239
|
+
var r = n && n.context || this.scope.document, o = m.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
|
|
2240
|
+
if (i) return Le(i, (function(a) {
|
|
2182
2241
|
return a._context === r && (o || a.inContext(e));
|
|
2183
2242
|
}));
|
|
2184
2243
|
} }, { key: "forEachMatch", value: function(e, n) {
|
|
2185
2244
|
for (var r = 0, o = this.list; r < o.length; r++) {
|
|
2186
2245
|
var i = o[r], a = void 0;
|
|
2187
|
-
if ((
|
|
2246
|
+
if ((m.string(i.target) ? m.element(e) && oe(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
|
|
2188
2247
|
}
|
|
2189
2248
|
} }]), t;
|
|
2190
2249
|
})(), wr = (function() {
|
|
2191
2250
|
function t() {
|
|
2192
2251
|
var e = this;
|
|
2193
|
-
|
|
2252
|
+
T(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = G, this.defaults = Oe(ln), this.Eventable = mn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
|
|
2194
2253
|
var o = function i(a, s) {
|
|
2195
2254
|
var c = r.interactables.getExisting(a, s);
|
|
2196
2255
|
return c || ((c = r.interactables.new(a, s)).events.global = i.globalEvents), c;
|
|
2197
2256
|
};
|
|
2198
|
-
return o.getPointerAverage = Yt, o.getTouchBBox = gt, o.getTouchDistance = mt, o.getTouchAngle = yt, o.getElementRect =
|
|
2257
|
+
return o.getPointerAverage = Yt, o.getTouchBBox = gt, o.getTouchDistance = mt, o.getTouchAngle = yt, o.getElementRect = xe, o.getElementClientRect = ve, o.matchesSelector = oe, o.closest = Ie, o.globalEvents = {}, o.version = "1.10.27", o.scope = r, o.use = function(i, a) {
|
|
2199
2258
|
return this.scope.usePlugin(i, a), this;
|
|
2200
2259
|
}, o.isSet = function(i, a) {
|
|
2201
2260
|
return !!this.scope.interactables.get(i, a && a.context);
|
|
2202
|
-
}, o.on =
|
|
2203
|
-
if (
|
|
2261
|
+
}, o.on = Ne((function(i, a, s) {
|
|
2262
|
+
if (m.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), m.array(i)) {
|
|
2204
2263
|
for (var c = 0, u = i; c < u.length; c++) {
|
|
2205
2264
|
var l = u[c];
|
|
2206
2265
|
this.on(l, a, s);
|
|
2207
2266
|
}
|
|
2208
2267
|
return this;
|
|
2209
2268
|
}
|
|
2210
|
-
if (
|
|
2269
|
+
if (m.object(i)) {
|
|
2211
2270
|
for (var p in i) this.on(p, i[p], a);
|
|
2212
2271
|
return this;
|
|
2213
2272
|
}
|
|
2214
2273
|
return it(i, this.scope.actions) ? this.globalEvents[i] ? this.globalEvents[i].push(a) : this.globalEvents[i] = [a] : this.scope.events.add(this.scope.document, i, a, { options: s }), this;
|
|
2215
|
-
}), "The interact.on() method is being deprecated"), o.off =
|
|
2216
|
-
if (
|
|
2274
|
+
}), "The interact.on() method is being deprecated"), o.off = Ne((function(i, a, s) {
|
|
2275
|
+
if (m.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), m.array(i)) {
|
|
2217
2276
|
for (var c = 0, u = i; c < u.length; c++) {
|
|
2218
2277
|
var l = u[c];
|
|
2219
2278
|
this.off(l, a, s);
|
|
2220
2279
|
}
|
|
2221
2280
|
return this;
|
|
2222
2281
|
}
|
|
2223
|
-
if (
|
|
2282
|
+
if (m.object(i)) {
|
|
2224
2283
|
for (var p in i) this.off(p, i[p], a);
|
|
2225
2284
|
return this;
|
|
2226
2285
|
}
|
|
2227
|
-
var
|
|
2228
|
-
return it(i, this.scope.actions) ? i in this.globalEvents && (
|
|
2286
|
+
var v;
|
|
2287
|
+
return it(i, this.scope.actions) ? i in this.globalEvents && (v = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(v, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
|
|
2229
2288
|
}), "The interact.off() method is being deprecated"), o.debug = function() {
|
|
2230
2289
|
return this.scope;
|
|
2231
2290
|
}, o.supportsTouch = function() {
|
|
2232
|
-
return
|
|
2291
|
+
return G.supportsTouch;
|
|
2233
2292
|
}, o.supportsPointerEvent = function() {
|
|
2234
|
-
return
|
|
2293
|
+
return G.supportsPointerEvent;
|
|
2235
2294
|
}, o.stop = function() {
|
|
2236
2295
|
for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
|
|
2237
2296
|
return this;
|
|
2238
2297
|
}, o.pointerMoveTolerance = function(i) {
|
|
2239
|
-
return
|
|
2298
|
+
return m.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
|
|
2240
2299
|
}, o.addDocument = function(i, a) {
|
|
2241
2300
|
this.scope.addDocument(i, a);
|
|
2242
2301
|
}, o.removeDocument = function(i) {
|
|
2243
2302
|
this.scope.removeDocument(i);
|
|
2244
2303
|
}, o;
|
|
2245
|
-
})(this), this.InteractEvent =
|
|
2304
|
+
})(this), this.InteractEvent = Ot, this.Interactable = void 0, this.interactables = new xr(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
|
|
2246
2305
|
return e.removeDocument(r.target);
|
|
2247
2306
|
};
|
|
2248
2307
|
var n = this;
|
|
2249
2308
|
this.Interactable = (function(r) {
|
|
2250
|
-
|
|
2251
|
-
var o =
|
|
2309
|
+
Y(i, r);
|
|
2310
|
+
var o = Q(i);
|
|
2252
2311
|
function i() {
|
|
2253
|
-
return
|
|
2312
|
+
return T(this, i), o.apply(this, arguments);
|
|
2254
2313
|
}
|
|
2255
2314
|
return R(i, [{ key: "_defaults", get: function() {
|
|
2256
2315
|
return n.defaults;
|
|
2257
2316
|
} }, { key: "set", value: function(a) {
|
|
2258
|
-
return
|
|
2317
|
+
return ce(F(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
|
|
2259
2318
|
} }, { key: "unset", value: function() {
|
|
2260
|
-
|
|
2319
|
+
ce(F(i.prototype), "unset", this).call(this);
|
|
2261
2320
|
var a = n.interactables.list.indexOf(this);
|
|
2262
2321
|
a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
|
|
2263
2322
|
} }]), i;
|
|
@@ -2272,7 +2331,7 @@ function zo() {
|
|
|
2272
2331
|
}
|
|
2273
2332
|
} }, { key: "init", value: function(e) {
|
|
2274
2333
|
return this.isInitialized ? this : (function(n, r) {
|
|
2275
|
-
return n.isInitialized = !0,
|
|
2334
|
+
return n.isInitialized = !0, m.window(r) && Z(r), B.init(r), G.init(r), ge.init(r), n.window = r, n.document = r.document, n.usePlugin(yr), n.usePlugin(vr), n;
|
|
2276
2335
|
})(this, e);
|
|
2277
2336
|
} }, { key: "pluginIsInstalled", value: function(e) {
|
|
2278
2337
|
var n = e.id;
|
|
@@ -2292,10 +2351,10 @@ function zo() {
|
|
|
2292
2351
|
return this;
|
|
2293
2352
|
} }, { key: "addDocument", value: function(e, n) {
|
|
2294
2353
|
if (this.getDocIndex(e) !== -1) return !1;
|
|
2295
|
-
var r =
|
|
2354
|
+
var r = re(e);
|
|
2296
2355
|
n = n ? _({}, n) : {}, this.documents.push({ doc: e, options: n }), this.events.documents.push(e), e !== this.document && this.events.add(r, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: e, window: r, scope: this, options: n });
|
|
2297
2356
|
} }, { key: "removeDocument", value: function(e) {
|
|
2298
|
-
var n = this.getDocIndex(e), r =
|
|
2357
|
+
var n = this.getDocIndex(e), r = re(e), o = this.documents[n].options;
|
|
2299
2358
|
this.events.remove(r, "unload", this.onWindowUnload), this.documents.splice(n, 1), this.events.documents.splice(n, 1), this.fire("scope:remove-document", { doc: e, window: r, scope: this, options: o });
|
|
2300
2359
|
} }, { key: "getDocIndex", value: function(e) {
|
|
2301
2360
|
for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
|
|
@@ -2310,9 +2369,9 @@ function zo() {
|
|
|
2310
2369
|
function wn(t) {
|
|
2311
2370
|
return t && t.replace(/\/.*$/, "");
|
|
2312
2371
|
}
|
|
2313
|
-
var En = new wr(),
|
|
2372
|
+
var En = new wr(), q = En.interactStatic, Er = typeof globalThis < "u" ? globalThis : window;
|
|
2314
2373
|
En.init(Er);
|
|
2315
|
-
var
|
|
2374
|
+
var kr = Object.freeze({ __proto__: null, edgeTarget: function() {
|
|
2316
2375
|
}, elements: function() {
|
|
2317
2376
|
}, grid: function(t) {
|
|
2318
2377
|
var e = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(r) {
|
|
@@ -2320,40 +2379,40 @@ function zo() {
|
|
|
2320
2379
|
return o in t || i in t;
|
|
2321
2380
|
})), n = function(r, o) {
|
|
2322
2381
|
for (var i = t.range, a = t.limits, s = a === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : a, c = t.offset, u = c === void 0 ? { x: 0, y: 0 } : c, l = { range: i, grid: t, x: null, y: null }, p = 0; p < e.length; p++) {
|
|
2323
|
-
var
|
|
2324
|
-
l[
|
|
2382
|
+
var v = e[p], w = v[0], x = v[1], E = Math.round((r - u.x) / t[w]), S = Math.round((o - u.y) / t[x]);
|
|
2383
|
+
l[w] = Math.max(s.left, Math.min(s.right, E * t[w] + u.x)), l[x] = Math.max(s.top, Math.min(s.bottom, S * t[x] + u.y));
|
|
2325
2384
|
}
|
|
2326
2385
|
return l;
|
|
2327
2386
|
};
|
|
2328
2387
|
return n.grid = t, n.coordFields = e, n;
|
|
2329
|
-
} }),
|
|
2388
|
+
} }), Tr = { id: "snappers", install: function(t) {
|
|
2330
2389
|
var e = t.interactStatic;
|
|
2331
|
-
e.snappers = _(e.snappers || {},
|
|
2332
|
-
} }, Sr =
|
|
2390
|
+
e.snappers = _(e.snappers || {}, kr), e.createSnapGrid = e.snappers.grid;
|
|
2391
|
+
} }, Sr = Tr, _r = { start: function(t) {
|
|
2333
2392
|
var e = t.state, n = t.rect, r = t.edges, o = t.pageCoords, i = e.options, a = i.ratio, s = i.enabled, c = e.options, u = c.equalDelta, l = c.modifiers;
|
|
2334
2393
|
a === "preserve" && (a = n.width / n.height), e.startCoords = _({}, o), e.startRect = _({}, n), e.ratio = a, e.equalDelta = u;
|
|
2335
2394
|
var p = e.linkedEdges = { top: r.top || r.left && !r.bottom, left: r.left || r.top && !r.right, bottom: r.bottom || r.right && !r.top, right: r.right || r.bottom && !r.left };
|
|
2336
2395
|
if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
|
|
2337
|
-
var
|
|
2338
|
-
e.edgeSign = { x:
|
|
2396
|
+
var v = (p.left ? 1 : -1) * (p.top ? 1 : -1);
|
|
2397
|
+
e.edgeSign = { x: v, y: v };
|
|
2339
2398
|
} else e.edgeSign = { x: p.left ? -1 : 1, y: p.top ? -1 : 1 };
|
|
2340
2399
|
if (s !== !1 && _(r, p), l != null && l.length) {
|
|
2341
|
-
var
|
|
2342
|
-
|
|
2400
|
+
var w = new Mt(t.interaction);
|
|
2401
|
+
w.copyFrom(t.interaction.modification), w.prepareStates(l), e.subModification = w, w.startAll(f({}, t));
|
|
2343
2402
|
}
|
|
2344
2403
|
}, set: function(t) {
|
|
2345
|
-
var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = _({}, r), a = e.equalDelta ?
|
|
2404
|
+
var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = _({}, r), a = e.equalDelta ? Cr : Mr;
|
|
2346
2405
|
if (_(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
|
|
2347
2406
|
var s = _({}, n);
|
|
2348
|
-
|
|
2407
|
+
Ze(o, s, { x: r.x - i.x, y: r.y - i.y });
|
|
2349
2408
|
var c = e.subModification.setAll(f(f({}, t), {}, { rect: s, edges: o, pageCoords: r, prevCoords: r, prevRect: s })), u = c.delta;
|
|
2350
2409
|
return c.changed && (a(e, Math.abs(u.x) > Math.abs(u.y), c.coords, c.rect), _(r, c.coords)), c.eventProps;
|
|
2351
2410
|
}, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
|
|
2352
|
-
function
|
|
2411
|
+
function Cr(t, e, n) {
|
|
2353
2412
|
var r = t.startCoords, o = t.edgeSign;
|
|
2354
2413
|
e ? n.y = r.y + (n.x - r.x) * o.y : n.x = r.x + (n.y - r.y) * o.x;
|
|
2355
2414
|
}
|
|
2356
|
-
function
|
|
2415
|
+
function Mr(t, e, n, r) {
|
|
2357
2416
|
var o = t.startRect, i = t.startCoords, a = t.ratio, s = t.edgeSign;
|
|
2358
2417
|
if (e) {
|
|
2359
2418
|
var c = r.width / a;
|
|
@@ -2363,17 +2422,17 @@ function zo() {
|
|
|
2363
2422
|
n.x = i.x + (u - o.width) * s.x;
|
|
2364
2423
|
}
|
|
2365
2424
|
}
|
|
2366
|
-
var
|
|
2425
|
+
var Or = me(_r, "aspectRatio"), kn = function() {
|
|
2367
2426
|
};
|
|
2368
|
-
|
|
2369
|
-
var lt =
|
|
2370
|
-
function
|
|
2371
|
-
return
|
|
2427
|
+
kn._defaults = {};
|
|
2428
|
+
var lt = kn;
|
|
2429
|
+
function ke(t, e, n) {
|
|
2430
|
+
return m.func(t) ? De(t, e.interactable, e.element, [n.x, n.y, e]) : De(t, e.interactable, e.element);
|
|
2372
2431
|
}
|
|
2373
2432
|
var ut = { start: function(t) {
|
|
2374
2433
|
var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, c = _({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
|
|
2375
2434
|
if (e && s) {
|
|
2376
|
-
var u =
|
|
2435
|
+
var u = ke(a.restriction, o, i);
|
|
2377
2436
|
if (u) {
|
|
2378
2437
|
var l = u.right - u.left - e.width, p = u.bottom - u.top - e.height;
|
|
2379
2438
|
l < 0 && (c.left += l, c.right += l), p < 0 && (c.top += p, c.bottom += p);
|
|
@@ -2382,14 +2441,14 @@ function zo() {
|
|
|
2382
2441
|
}
|
|
2383
2442
|
r.offset = c;
|
|
2384
2443
|
}, set: function(t) {
|
|
2385
|
-
var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a =
|
|
2444
|
+
var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = ke(o.restriction, n, e);
|
|
2386
2445
|
if (a) {
|
|
2387
2446
|
var s = (function(c) {
|
|
2388
2447
|
return !c || "left" in c && "top" in c || ((c = _({}, c)).left = c.x || 0, c.top = c.y || 0, c.right = c.right || c.left + c.width, c.bottom = c.bottom || c.top + c.height), c;
|
|
2389
2448
|
})(a);
|
|
2390
2449
|
e.x = Math.max(Math.min(s.right - i.right, e.x), s.left + i.left), e.y = Math.max(Math.min(s.bottom - i.bottom, e.y), s.top + i.top);
|
|
2391
2450
|
}
|
|
2392
|
-
}, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } },
|
|
2451
|
+
}, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = me(ut, "restrict"), Tn = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, Sn = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
|
|
2393
2452
|
function _n(t, e) {
|
|
2394
2453
|
for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
|
|
2395
2454
|
var o = r[n];
|
|
@@ -2397,53 +2456,53 @@ function zo() {
|
|
|
2397
2456
|
}
|
|
2398
2457
|
return t;
|
|
2399
2458
|
}
|
|
2400
|
-
var
|
|
2459
|
+
var Ye = { noInner: Tn, noOuter: Sn, start: function(t) {
|
|
2401
2460
|
var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
|
|
2402
|
-
i && (e =
|
|
2461
|
+
i && (e = Qe(ke(i.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, o.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
|
|
2403
2462
|
}, set: function(t) {
|
|
2404
2463
|
var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
|
|
2405
2464
|
if (n) {
|
|
2406
|
-
var s = _({}, e), c =
|
|
2407
|
-
_n(c,
|
|
2465
|
+
var s = _({}, e), c = ke(a.inner, r, s) || {}, u = ke(a.outer, r, s) || {};
|
|
2466
|
+
_n(c, Tn), _n(u, Sn), n.top ? e.y = Math.min(Math.max(u.top + i.top, s.y), c.top + i.top) : n.bottom && (e.y = Math.max(Math.min(u.bottom + i.bottom, s.y), c.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(u.left + i.left, s.x), c.left + i.left) : n.right && (e.x = Math.max(Math.min(u.right + i.right, s.x), c.right + i.right));
|
|
2408
2467
|
}
|
|
2409
|
-
}, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Rr =
|
|
2468
|
+
}, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Rr = me(Ye, "restrictEdges"), Ir = _({ get elementRect() {
|
|
2410
2469
|
return { top: 0, left: 0, bottom: 1, right: 1 };
|
|
2411
2470
|
}, set elementRect(t) {
|
|
2412
|
-
} }, ut.defaults), Dr =
|
|
2413
|
-
return
|
|
2471
|
+
} }, ut.defaults), Dr = me({ start: ut.start, set: ut.set, defaults: Ir }, "restrictRect"), Ar = { width: -1 / 0, height: -1 / 0 }, zr = { width: 1 / 0, height: 1 / 0 }, jr = me({ start: function(t) {
|
|
2472
|
+
return Ye.start(t);
|
|
2414
2473
|
}, set: function(t) {
|
|
2415
2474
|
var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
|
|
2416
2475
|
if (o) {
|
|
2417
|
-
var a = ht(
|
|
2418
|
-
n.options = { endOnly: i.endOnly, inner: _({},
|
|
2476
|
+
var a = ht(ke(i.min, e, t.coords)) || Ar, s = ht(ke(i.max, e, t.coords)) || zr;
|
|
2477
|
+
n.options = { endOnly: i.endOnly, inner: _({}, Ye.noInner), outer: _({}, Ye.noOuter) }, o.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : o.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), o.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : o.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), Ye.set(t), n.options = i;
|
|
2419
2478
|
}
|
|
2420
2479
|
}, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), At = { start: function(t) {
|
|
2421
|
-
var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, c = a.options, u = c.offsetWithOrigin ? (function(
|
|
2422
|
-
var
|
|
2423
|
-
return
|
|
2480
|
+
var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, c = a.options, u = c.offsetWithOrigin ? (function(v) {
|
|
2481
|
+
var w = v.interaction.element, x = Qe(De(v.state.options.origin, null, null, [w])), E = x || Ae(v.interactable, w, v.interaction.prepared.name);
|
|
2482
|
+
return E;
|
|
2424
2483
|
})(t) : { x: 0, y: 0 };
|
|
2425
2484
|
if (c.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
|
|
2426
2485
|
else {
|
|
2427
|
-
var l =
|
|
2428
|
-
(e =
|
|
2486
|
+
var l = De(c.offset, r, o, [n]);
|
|
2487
|
+
(e = Qe(l) || { x: 0, y: 0 }).x += u.x, e.y += u.y;
|
|
2429
2488
|
}
|
|
2430
2489
|
var p = c.relativePoints;
|
|
2431
|
-
a.offsets = i && p && p.length ? p.map((function(
|
|
2432
|
-
return { index:
|
|
2490
|
+
a.offsets = i && p && p.length ? p.map((function(v, w) {
|
|
2491
|
+
return { index: w, relativePoint: v, x: s.left - i.width * v.x + e.x, y: s.top - i.height * v.y + e.y };
|
|
2433
2492
|
})) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
|
|
2434
2493
|
}, set: function(t) {
|
|
2435
|
-
var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a =
|
|
2494
|
+
var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = Ae(e.interactable, e.element, e.prepared.name), s = _({}, n), c = [];
|
|
2436
2495
|
o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
|
|
2437
|
-
for (var u = 0, l = i; u < l.length; u++) for (var p = l[u],
|
|
2438
|
-
var S = o.targets[
|
|
2439
|
-
(
|
|
2496
|
+
for (var u = 0, l = i; u < l.length; u++) for (var p = l[u], v = s.x - p.x, w = s.y - p.y, x = 0, E = o.targets.length; x < E; x++) {
|
|
2497
|
+
var S = o.targets[x], k = void 0;
|
|
2498
|
+
(k = m.func(S) ? S(v, w, e._proxy, p, x) : S) && c.push({ x: (m.number(k.x) ? k.x : v) + p.x, y: (m.number(k.y) ? k.y : w) + p.y, range: m.number(k.range) ? k.range : o.range, source: S, index: x, offset: p });
|
|
2440
2499
|
}
|
|
2441
|
-
for (var
|
|
2442
|
-
var A = c[
|
|
2443
|
-
|
|
2500
|
+
for (var C = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, P = 0; P < c.length; P++) {
|
|
2501
|
+
var A = c[P], M = A.range, D = A.x - s.x, X = A.y - s.y, L = ze(D, X), K = L <= M;
|
|
2502
|
+
M === 1 / 0 && C.inRange && C.range !== 1 / 0 && (K = !1), C.target && !(K ? C.inRange && M !== 1 / 0 ? L / M < C.distance / C.range : M === 1 / 0 && C.range !== 1 / 0 || L < C.distance : !C.inRange && L < C.distance) || (C.target = A, C.distance = L, C.range = M, C.inRange = K, C.delta.x = D, C.delta.y = X);
|
|
2444
2503
|
}
|
|
2445
|
-
return
|
|
2446
|
-
}, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr =
|
|
2504
|
+
return C.inRange && (n.x = C.target.x, n.y = C.target.y), r.closest = C, C;
|
|
2505
|
+
}, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = me(At, "snap"), pt = { start: function(t) {
|
|
2447
2506
|
var e = t.state, n = t.edges, r = e.options;
|
|
2448
2507
|
if (!n) return null;
|
|
2449
2508
|
t.state = { options: { targets: null, relativePoints: [{ x: n.left ? 0 : 1, y: n.top ? 0 : 1 }], offset: r.offset || "self", origin: { x: 0, y: 0 }, range: r.range } }, e.targetFields = e.targetFields || [["width", "height"], ["x", "y"]], At.start(t), e.offsets = t.state.offsets, t.state = e;
|
|
@@ -2452,11 +2511,11 @@ function zo() {
|
|
|
2452
2511
|
n.options = _({}, o), n.options.targets = [];
|
|
2453
2512
|
for (var s = 0, c = o.targets || []; s < c.length; s++) {
|
|
2454
2513
|
var u = c[s], l = void 0;
|
|
2455
|
-
if (l =
|
|
2456
|
-
for (var p = 0,
|
|
2457
|
-
var
|
|
2458
|
-
if (
|
|
2459
|
-
l.x = l[
|
|
2514
|
+
if (l = m.func(u) ? u(a.x, a.y, e) : u) {
|
|
2515
|
+
for (var p = 0, v = n.targetFields; p < v.length; p++) {
|
|
2516
|
+
var w = v[p], x = w[0], E = w[1];
|
|
2517
|
+
if (x in l || E in l) {
|
|
2518
|
+
l.x = l[x], l.y = l[E];
|
|
2460
2519
|
break;
|
|
2461
2520
|
}
|
|
2462
2521
|
}
|
|
@@ -2465,7 +2524,7 @@ function zo() {
|
|
|
2465
2524
|
}
|
|
2466
2525
|
var S = At.set(t);
|
|
2467
2526
|
return n.options = o, S;
|
|
2468
|
-
}, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, Lr =
|
|
2527
|
+
}, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, Lr = me(pt, "snapSize"), zt = { aspectRatio: Or, restrictEdges: Rr, restrict: Pr, restrictRect: Dr, restrictSize: jr, snapEdges: me({ start: function(t) {
|
|
2469
2528
|
var e = t.edges;
|
|
2470
2529
|
return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], pt.start(t)) : null;
|
|
2471
2530
|
}, set: pt.set, defaults: _(Oe(pt.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: Lr, spring: lt, avoid: lt, transform: lt, rubberband: lt }, Nr = { id: "modifiers", install: function(t) {
|
|
@@ -2474,12 +2533,12 @@ function zo() {
|
|
|
2474
2533
|
var r = zt[n], o = r._defaults, i = r._methods;
|
|
2475
2534
|
o._methods = i, t.defaults.perAction[n] = o;
|
|
2476
2535
|
}
|
|
2477
|
-
} }, Hr = Nr,
|
|
2478
|
-
|
|
2479
|
-
var e =
|
|
2536
|
+
} }, Hr = Nr, Cn = (function(t) {
|
|
2537
|
+
Y(n, t);
|
|
2538
|
+
var e = Q(n);
|
|
2480
2539
|
function n(r, o, i, a, s, c) {
|
|
2481
2540
|
var u;
|
|
2482
|
-
if (
|
|
2541
|
+
if (T(this, n), et(se(u = e.call(this, s)), i), i !== o && et(se(u), o), u.timeStamp = c, u.originalEvent = i, u.type = r, u.pointerId = je(o), u.pointerType = Vt(o), u.target = a, u.currentTarget = null, r === "tap") {
|
|
2483
2542
|
var l = s.getPointerIndex(o);
|
|
2484
2543
|
u.dt = u.timeStamp - s.pointers[l].downTime;
|
|
2485
2544
|
var p = u.timeStamp - s.tapTime;
|
|
@@ -2496,8 +2555,8 @@ function zo() {
|
|
|
2496
2555
|
} }, { key: "preventDefault", value: function() {
|
|
2497
2556
|
this.originalEvent.preventDefault();
|
|
2498
2557
|
} }]), n;
|
|
2499
|
-
})(rt),
|
|
2500
|
-
t.pointerEvents =
|
|
2558
|
+
})(rt), Ve = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
|
|
2559
|
+
t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, _(t.actions.phaselessTypes, Ve.types);
|
|
2501
2560
|
}, listeners: { "interactions:new": function(t) {
|
|
2502
2561
|
var e = t.interaction;
|
|
2503
2562
|
e.prevTap = null, e.tapTime = 0;
|
|
@@ -2506,69 +2565,69 @@ function zo() {
|
|
|
2506
2565
|
!e && n.hold || (n.hold = { duration: 1 / 0, timeout: null });
|
|
2507
2566
|
}, "interactions:move": function(t, e) {
|
|
2508
2567
|
var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
|
|
2509
|
-
t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t),
|
|
2568
|
+
t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), be({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
|
|
2510
2569
|
}, "interactions:down": function(t, e) {
|
|
2511
2570
|
(function(n, r) {
|
|
2512
|
-
for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, c = n.pointerIndex, u = o.pointers[c].hold, l = H(s), p = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: l, node: null },
|
|
2513
|
-
var
|
|
2514
|
-
p.node =
|
|
2571
|
+
for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, c = n.pointerIndex, u = o.pointers[c].hold, l = H(s), p = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: l, node: null }, v = 0; v < l.length; v++) {
|
|
2572
|
+
var w = l[v];
|
|
2573
|
+
p.node = w, r.fire("pointerEvents:collect-targets", p);
|
|
2515
2574
|
}
|
|
2516
2575
|
if (p.targets.length) {
|
|
2517
|
-
for (var
|
|
2518
|
-
var
|
|
2519
|
-
|
|
2576
|
+
for (var x = 1 / 0, E = 0, S = p.targets; E < S.length; E++) {
|
|
2577
|
+
var k = S[E].eventable.options.holdDuration;
|
|
2578
|
+
k < x && (x = k);
|
|
2520
2579
|
}
|
|
2521
|
-
u.duration =
|
|
2522
|
-
|
|
2523
|
-
}),
|
|
2580
|
+
u.duration = x, u.timeout = setTimeout((function() {
|
|
2581
|
+
be({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
|
|
2582
|
+
}), x);
|
|
2524
2583
|
}
|
|
2525
|
-
})(t, e),
|
|
2584
|
+
})(t, e), be(t, e);
|
|
2526
2585
|
}, "interactions:up": function(t, e) {
|
|
2527
|
-
jt(t),
|
|
2586
|
+
jt(t), be(t, e), (function(n, r) {
|
|
2528
2587
|
var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget;
|
|
2529
|
-
o.pointerWasMoved ||
|
|
2588
|
+
o.pointerWasMoved || be({ interaction: o, eventTarget: s, pointer: i, event: a, type: "tap" }, r);
|
|
2530
2589
|
})(t, e);
|
|
2531
2590
|
}, "interactions:cancel": function(t, e) {
|
|
2532
|
-
jt(t),
|
|
2533
|
-
} }, PointerEvent:
|
|
2534
|
-
function
|
|
2535
|
-
var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, c = s === void 0 ?
|
|
2591
|
+
jt(t), be(t, e);
|
|
2592
|
+
} }, PointerEvent: Cn, fire: be, collectEventTargets: Mn, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
|
|
2593
|
+
function be(t, e) {
|
|
2594
|
+
var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, c = s === void 0 ? Mn(t, e) : s, u = new Cn(a, r, o, i, n, e.now());
|
|
2536
2595
|
e.fire("pointerEvents:new", { pointerEvent: u });
|
|
2537
2596
|
for (var l = { interaction: n, pointer: r, event: o, eventTarget: i, targets: c, type: a, pointerEvent: u }, p = 0; p < c.length; p++) {
|
|
2538
|
-
var
|
|
2539
|
-
for (var
|
|
2540
|
-
var
|
|
2541
|
-
if (u._subtractOrigin(
|
|
2597
|
+
var v = c[p];
|
|
2598
|
+
for (var w in v.props || {}) u[w] = v.props[w];
|
|
2599
|
+
var x = Ae(v.eventable, v.node);
|
|
2600
|
+
if (u._subtractOrigin(x), u.eventable = v.eventable, u.currentTarget = v.node, v.eventable.fire(u), u._addOrigin(x), u.immediatePropagationStopped || u.propagationStopped && p + 1 < c.length && c[p + 1].node !== u.currentTarget) break;
|
|
2542
2601
|
}
|
|
2543
2602
|
if (e.fire("pointerEvents:fired", l), a === "tap") {
|
|
2544
|
-
var
|
|
2545
|
-
n.prevTap =
|
|
2603
|
+
var E = u.double ? be({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : u;
|
|
2604
|
+
n.prevTap = E, n.tapTime = E.timeStamp;
|
|
2546
2605
|
}
|
|
2547
2606
|
return u;
|
|
2548
2607
|
}
|
|
2549
|
-
function
|
|
2608
|
+
function Mn(t, e) {
|
|
2550
2609
|
var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = n.getPointerIndex(r), c = n.pointers[s];
|
|
2551
2610
|
if (a === "tap" && (n.pointerWasMoved || !c || c.downTarget !== i)) return [];
|
|
2552
2611
|
for (var u = H(i), l = { interaction: n, pointer: r, event: o, eventTarget: i, type: a, path: u, targets: [], node: null }, p = 0; p < u.length; p++) {
|
|
2553
|
-
var
|
|
2554
|
-
l.node =
|
|
2612
|
+
var v = u[p];
|
|
2613
|
+
l.node = v, e.fire("pointerEvents:collect-targets", l);
|
|
2555
2614
|
}
|
|
2556
|
-
return a === "hold" && (l.targets = l.targets.filter((function(
|
|
2557
|
-
var
|
|
2558
|
-
return
|
|
2615
|
+
return a === "hold" && (l.targets = l.targets.filter((function(w) {
|
|
2616
|
+
var x, E;
|
|
2617
|
+
return w.eventable.options.holdDuration === ((x = n.pointers[s]) == null || (E = x.hold) == null ? void 0 : E.duration);
|
|
2559
2618
|
}))), l.targets;
|
|
2560
2619
|
}
|
|
2561
2620
|
function jt(t) {
|
|
2562
2621
|
var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
|
|
2563
2622
|
r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
|
|
2564
2623
|
}
|
|
2565
|
-
var Br = Object.freeze({ __proto__: null, default:
|
|
2624
|
+
var Br = Object.freeze({ __proto__: null, default: Ve });
|
|
2566
2625
|
function Yr(t) {
|
|
2567
2626
|
var e = t.interaction;
|
|
2568
2627
|
e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
|
|
2569
2628
|
}
|
|
2570
|
-
var
|
|
2571
|
-
t.usePlugin(
|
|
2629
|
+
var Vr = { id: "pointer-events/holdRepeat", install: function(t) {
|
|
2630
|
+
t.usePlugin(Ve);
|
|
2572
2631
|
var e = t.pointerEvents;
|
|
2573
2632
|
e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
|
|
2574
2633
|
}, listeners: ["move", "up", "cancel", "endall"].reduce((function(t, e) {
|
|
@@ -2584,7 +2643,7 @@ function zo() {
|
|
|
2584
2643
|
e.pointerEvents.fire({ interaction: n, eventTarget: o, type: "hold", pointer: r, event: r }, e);
|
|
2585
2644
|
}), a));
|
|
2586
2645
|
}
|
|
2587
|
-
} }) },
|
|
2646
|
+
} }) }, Wr = Vr, Ur = { id: "pointer-events/interactableTargets", install: function(t) {
|
|
2588
2647
|
var e = t.Interactable;
|
|
2589
2648
|
e.prototype.pointerEvents = function(r) {
|
|
2590
2649
|
return _(this.events.options, r), this;
|
|
@@ -2608,24 +2667,24 @@ function zo() {
|
|
|
2608
2667
|
}, "interactable:set": function(t, e) {
|
|
2609
2668
|
var n = t.interactable, r = t.options;
|
|
2610
2669
|
_(n.events.options, e.pointerEvents.defaults), _(n.events.options, r.pointerEvents || {});
|
|
2611
|
-
} } }, qr =
|
|
2612
|
-
t.usePlugin(Br), t.usePlugin(
|
|
2670
|
+
} } }, qr = Ur, Xr = { id: "pointer-events", install: function(t) {
|
|
2671
|
+
t.usePlugin(Br), t.usePlugin(Wr), t.usePlugin(qr);
|
|
2613
2672
|
} }, $r = Xr, Gr = { id: "reflow", install: function(t) {
|
|
2614
2673
|
var e = t.Interactable;
|
|
2615
2674
|
t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
|
|
2616
2675
|
return (function(r, o, i) {
|
|
2617
2676
|
for (var a = r.getAllElements(), s = i.window.Promise, c = s ? [] : null, u = function() {
|
|
2618
|
-
var p = a[l],
|
|
2619
|
-
if (!
|
|
2620
|
-
var
|
|
2621
|
-
return
|
|
2677
|
+
var p = a[l], v = r.getRect(p);
|
|
2678
|
+
if (!v) return 1;
|
|
2679
|
+
var w, x = Le(i.interactions.list, (function(k) {
|
|
2680
|
+
return k.interacting() && k.interactable === r && k.element === p && k.prepared.name === o.name;
|
|
2622
2681
|
}));
|
|
2623
|
-
if (
|
|
2624
|
-
|
|
2682
|
+
if (x) x.move(), c && (w = x._reflowPromise || new s((function(k) {
|
|
2683
|
+
x._reflowResolve = k;
|
|
2625
2684
|
})));
|
|
2626
2685
|
else {
|
|
2627
|
-
var
|
|
2628
|
-
return { coords:
|
|
2686
|
+
var E = ht(v), S = /* @__PURE__ */ (function(k) {
|
|
2687
|
+
return { coords: k, get page() {
|
|
2629
2688
|
return this.coords.page;
|
|
2630
2689
|
}, get client() {
|
|
2631
2690
|
return this.coords.client;
|
|
@@ -2651,17 +2710,17 @@ function zo() {
|
|
|
2651
2710
|
return this.coords.buttons;
|
|
2652
2711
|
}, preventDefault: function() {
|
|
2653
2712
|
} };
|
|
2654
|
-
})({ page: { x:
|
|
2655
|
-
|
|
2656
|
-
var D =
|
|
2657
|
-
D.interactable =
|
|
2658
|
-
var L =
|
|
2659
|
-
D._reflowResolve =
|
|
2713
|
+
})({ page: { x: E.x, y: E.y }, client: { x: E.x, y: E.y }, timeStamp: i.now() });
|
|
2714
|
+
w = (function(k, C, P, A, M) {
|
|
2715
|
+
var D = k.interactions.new({ pointerType: "reflow" }), X = { interaction: D, event: M, pointer: M, eventTarget: P, phase: "reflow" };
|
|
2716
|
+
D.interactable = C, D.element = P, D.prevEvent = M, D.updatePointer(M, M, P, !0), Nt(D.coords.delta), Tt(D.prepared, A), D._doPhase(X);
|
|
2717
|
+
var L = k.window, K = L.Promise, ie = K ? new K((function(fe) {
|
|
2718
|
+
D._reflowResolve = fe;
|
|
2660
2719
|
})) : void 0;
|
|
2661
|
-
return D._reflowPromise =
|
|
2720
|
+
return D._reflowPromise = ie, D.start(A, C, P), D._interacting ? (D.move(X), D.end(M)) : (D.stop(), D._reflowResolve()), D.removePointer(M, M), ie;
|
|
2662
2721
|
})(i, r, p, o, S);
|
|
2663
2722
|
}
|
|
2664
|
-
c && c.push(
|
|
2723
|
+
c && c.push(w);
|
|
2665
2724
|
}, l = 0; l < a.length && !u(); l++) ;
|
|
2666
2725
|
return c && s.all(c).then((function() {
|
|
2667
2726
|
return r;
|
|
@@ -2674,50 +2733,50 @@ function zo() {
|
|
|
2674
2733
|
r.splice(r.indexOf(o), 1);
|
|
2675
2734
|
})(e.interactions.list, n));
|
|
2676
2735
|
} } }, Jr = Gr;
|
|
2677
|
-
if (
|
|
2678
|
-
d.exports =
|
|
2736
|
+
if (q.use(sn), q.use(fn), q.use($r), q.use(fr), q.use(Hr), q.use(tr), q.use(Wn), q.use(qn), q.use(Jr), q.default = q, y(d) === "object" && d) try {
|
|
2737
|
+
d.exports = q;
|
|
2679
2738
|
} catch {
|
|
2680
2739
|
}
|
|
2681
|
-
return
|
|
2740
|
+
return q.default = q, q;
|
|
2682
2741
|
}));
|
|
2683
|
-
})(
|
|
2742
|
+
})(Xe, Xe.exports)), Xe.exports;
|
|
2684
2743
|
}
|
|
2685
|
-
var
|
|
2686
|
-
const Ft = /* @__PURE__ */
|
|
2744
|
+
var Wo = /* @__PURE__ */ Vo();
|
|
2745
|
+
const Ft = /* @__PURE__ */ Bo(Wo);
|
|
2687
2746
|
function In(d) {
|
|
2688
|
-
const
|
|
2689
|
-
|
|
2690
|
-
const f =
|
|
2747
|
+
const h = document.createElement("input");
|
|
2748
|
+
h.type = "file", h.accept = "image/*", h.onchange = (g) => {
|
|
2749
|
+
const f = g.target.files?.[0];
|
|
2691
2750
|
if (f) {
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2751
|
+
const y = new FileReader();
|
|
2752
|
+
y.onload = (T) => {
|
|
2694
2753
|
const z = document.createElement("img");
|
|
2695
|
-
z.src =
|
|
2754
|
+
z.src = T.target?.result, z.style.maxWidth = "100%", z.style.width = "100%", z.style.height = "auto", z.style.cursor = "pointer", z.draggable = !1;
|
|
2696
2755
|
const R = document.createElement("div");
|
|
2697
2756
|
R.className = "editor-image-wrapper", R.style.display = "inline-block", R.style.position = "relative", R.style.maxWidth = "100%", R.style.width = "auto", R.style.height = "auto", R.contentEditable = "false", R.style.boxSizing = "border-box", R.style.touchAction = "none", R.style.userSelect = "none", R.appendChild(z), d.appendChild(R), d.focus();
|
|
2698
|
-
},
|
|
2757
|
+
}, y.readAsDataURL(f);
|
|
2699
2758
|
}
|
|
2700
|
-
},
|
|
2759
|
+
}, h.click();
|
|
2701
2760
|
}
|
|
2702
|
-
function
|
|
2703
|
-
let
|
|
2704
|
-
if (d.tagName === "IMG" ?
|
|
2705
|
-
const
|
|
2706
|
-
if (
|
|
2707
|
-
if (
|
|
2708
|
-
const f =
|
|
2709
|
-
Ft(
|
|
2761
|
+
function Uo(d) {
|
|
2762
|
+
let h = null;
|
|
2763
|
+
if (d.tagName === "IMG" ? h = d.parentElement : h = d, !h) return;
|
|
2764
|
+
const g = h.querySelector("img");
|
|
2765
|
+
if (g)
|
|
2766
|
+
if (h.classList.contains("resizable")) {
|
|
2767
|
+
const f = h.getBoundingClientRect(), y = Math.round(f.width) + "px", T = Math.round(f.height) + "px";
|
|
2768
|
+
Ft(h).unset(), h.classList.remove("resizable"), h.style.border = "none", h.style.transform = "", h.dataset.x = "", h.dataset.y = "", h.style.width = y, h.style.height = T, h.contentEditable = "false", g && (g.style.width = "100%", g.style.height = "100%");
|
|
2710
2769
|
} else {
|
|
2711
|
-
|
|
2712
|
-
const f =
|
|
2713
|
-
|
|
2770
|
+
h.classList.add("resizable"), h.style.border = "2px dashed #007bff", h.style.position = "relative", h.style.userSelect = "none";
|
|
2771
|
+
const f = h.getBoundingClientRect();
|
|
2772
|
+
h.style.width = f.width + "px", h.style.height = f.height + "px", g && (g.style.width = "100%", g.style.height = "100%"), Ft(h).resizable({
|
|
2714
2773
|
edges: { left: !0, right: !0, bottom: !0, top: !0 },
|
|
2715
2774
|
listeners: {
|
|
2716
|
-
move: (
|
|
2717
|
-
const
|
|
2718
|
-
Object.assign(
|
|
2719
|
-
width: `${
|
|
2720
|
-
height: `${
|
|
2775
|
+
move: (y) => {
|
|
2776
|
+
const T = y.target;
|
|
2777
|
+
Object.assign(T.style, {
|
|
2778
|
+
width: `${y.rect.width}px`,
|
|
2779
|
+
height: `${y.rect.height}px`
|
|
2721
2780
|
});
|
|
2722
2781
|
}
|
|
2723
2782
|
},
|
|
@@ -2728,19 +2787,19 @@ function Fo(d) {
|
|
|
2728
2787
|
});
|
|
2729
2788
|
}
|
|
2730
2789
|
}
|
|
2731
|
-
class
|
|
2790
|
+
class qo {
|
|
2732
2791
|
container;
|
|
2733
2792
|
toolbar;
|
|
2734
2793
|
editor;
|
|
2735
2794
|
constructor() {
|
|
2736
|
-
this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor =
|
|
2795
|
+
this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Ho(
|
|
2737
2796
|
() => In(this.editor),
|
|
2738
|
-
(
|
|
2739
|
-
), this.toolbar =
|
|
2740
|
-
const
|
|
2797
|
+
(g) => Uo(g)
|
|
2798
|
+
), this.toolbar = No();
|
|
2799
|
+
const h = this.toolbar.querySelector(
|
|
2741
2800
|
'button[title="Insert Image"]'
|
|
2742
2801
|
);
|
|
2743
|
-
|
|
2802
|
+
h && (h.onclick = () => In(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
|
|
2744
2803
|
}
|
|
2745
2804
|
getElement() {
|
|
2746
2805
|
return this.container;
|
|
@@ -2748,195 +2807,195 @@ class Lo {
|
|
|
2748
2807
|
getHTML() {
|
|
2749
2808
|
return this.editor.innerHTML;
|
|
2750
2809
|
}
|
|
2751
|
-
setHTML(
|
|
2752
|
-
this.editor.innerHTML =
|
|
2810
|
+
setHTML(h) {
|
|
2811
|
+
this.editor.innerHTML = h;
|
|
2753
2812
|
}
|
|
2754
2813
|
}
|
|
2755
|
-
var ft = { exports: {} },
|
|
2814
|
+
var ft = { exports: {} }, Ue = {};
|
|
2756
2815
|
var Dn;
|
|
2757
|
-
function
|
|
2758
|
-
if (Dn) return
|
|
2816
|
+
function Xo() {
|
|
2817
|
+
if (Dn) return Ue;
|
|
2759
2818
|
Dn = 1;
|
|
2760
|
-
var d = Symbol.for("react.transitional.element"),
|
|
2761
|
-
function
|
|
2819
|
+
var d = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
|
|
2820
|
+
function g(f, y, T) {
|
|
2762
2821
|
var z = null;
|
|
2763
|
-
if (
|
|
2764
|
-
|
|
2765
|
-
for (var R in
|
|
2766
|
-
R !== "key" && (
|
|
2767
|
-
} else
|
|
2768
|
-
return
|
|
2822
|
+
if (T !== void 0 && (z = "" + T), y.key !== void 0 && (z = "" + y.key), "key" in y) {
|
|
2823
|
+
T = {};
|
|
2824
|
+
for (var R in y)
|
|
2825
|
+
R !== "key" && (T[R] = y[R]);
|
|
2826
|
+
} else T = y;
|
|
2827
|
+
return y = T.ref, {
|
|
2769
2828
|
$$typeof: d,
|
|
2770
2829
|
type: f,
|
|
2771
2830
|
key: z,
|
|
2772
|
-
ref:
|
|
2773
|
-
props:
|
|
2831
|
+
ref: y !== void 0 ? y : null,
|
|
2832
|
+
props: T
|
|
2774
2833
|
};
|
|
2775
2834
|
}
|
|
2776
|
-
return
|
|
2835
|
+
return Ue.Fragment = h, Ue.jsx = g, Ue.jsxs = g, Ue;
|
|
2777
2836
|
}
|
|
2778
|
-
var
|
|
2837
|
+
var qe = {};
|
|
2779
2838
|
var An;
|
|
2780
|
-
function
|
|
2839
|
+
function $o() {
|
|
2781
2840
|
return An || (An = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2782
|
-
function d(
|
|
2783
|
-
if (
|
|
2784
|
-
if (typeof
|
|
2785
|
-
return
|
|
2786
|
-
if (typeof
|
|
2787
|
-
switch (
|
|
2788
|
-
case
|
|
2841
|
+
function d(b) {
|
|
2842
|
+
if (b == null) return null;
|
|
2843
|
+
if (typeof b == "function")
|
|
2844
|
+
return b.$$typeof === Je ? null : b.displayName || b.name || null;
|
|
2845
|
+
if (typeof b == "string") return b;
|
|
2846
|
+
switch (b) {
|
|
2847
|
+
case $:
|
|
2789
2848
|
return "Fragment";
|
|
2790
|
-
case
|
|
2849
|
+
case V:
|
|
2791
2850
|
return "Profiler";
|
|
2792
|
-
case
|
|
2851
|
+
case J:
|
|
2793
2852
|
return "StrictMode";
|
|
2794
2853
|
case Ge:
|
|
2795
2854
|
return "Suspense";
|
|
2796
|
-
case
|
|
2855
|
+
case m:
|
|
2797
2856
|
return "SuspenseList";
|
|
2798
|
-
case
|
|
2857
|
+
case Ce:
|
|
2799
2858
|
return "Activity";
|
|
2800
2859
|
}
|
|
2801
|
-
if (typeof
|
|
2802
|
-
switch (typeof
|
|
2860
|
+
if (typeof b == "object")
|
|
2861
|
+
switch (typeof b.tag == "number" && console.error(
|
|
2803
2862
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
2804
|
-
),
|
|
2805
|
-
case Z:
|
|
2806
|
-
return "Portal";
|
|
2807
|
-
case te:
|
|
2808
|
-
return y.displayName || "Context";
|
|
2809
|
-
case $e:
|
|
2810
|
-
return (y._context.displayName || "Context") + ".Consumer";
|
|
2863
|
+
), b.$$typeof) {
|
|
2811
2864
|
case Te:
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2865
|
+
return "Portal";
|
|
2866
|
+
case re:
|
|
2867
|
+
return b.displayName || "Context";
|
|
2868
|
+
case Z:
|
|
2869
|
+
return (b._context.displayName || "Context") + ".Consumer";
|
|
2870
|
+
case Se:
|
|
2871
|
+
var I = b.render;
|
|
2872
|
+
return b = b.displayName, b || (b = I.displayName || I.name || "", b = b !== "" ? "ForwardRef(" + b + ")" : "ForwardRef"), b;
|
|
2873
|
+
case Re:
|
|
2874
|
+
return I = b.displayName || null, I !== null ? I : d(b.type) || "Memo";
|
|
2875
|
+
case _e:
|
|
2876
|
+
I = b._payload, b = b._init;
|
|
2818
2877
|
try {
|
|
2819
|
-
return d(
|
|
2878
|
+
return d(b(I));
|
|
2820
2879
|
} catch {
|
|
2821
2880
|
}
|
|
2822
2881
|
}
|
|
2823
2882
|
return null;
|
|
2824
2883
|
}
|
|
2825
|
-
function
|
|
2826
|
-
return "" +
|
|
2884
|
+
function h(b) {
|
|
2885
|
+
return "" + b;
|
|
2827
2886
|
}
|
|
2828
|
-
function
|
|
2887
|
+
function g(b) {
|
|
2829
2888
|
try {
|
|
2830
|
-
|
|
2889
|
+
h(b);
|
|
2831
2890
|
var I = !1;
|
|
2832
2891
|
} catch {
|
|
2833
2892
|
I = !0;
|
|
2834
2893
|
}
|
|
2835
2894
|
if (I) {
|
|
2836
2895
|
I = console;
|
|
2837
|
-
var j = I.error, N = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
2896
|
+
var j = I.error, N = typeof Symbol == "function" && Symbol.toStringTag && b[Symbol.toStringTag] || b.constructor.name || "Object";
|
|
2838
2897
|
return j.call(
|
|
2839
2898
|
I,
|
|
2840
2899
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2841
2900
|
N
|
|
2842
|
-
),
|
|
2901
|
+
), h(b);
|
|
2843
2902
|
}
|
|
2844
2903
|
}
|
|
2845
|
-
function f(
|
|
2846
|
-
if (
|
|
2847
|
-
if (typeof
|
|
2904
|
+
function f(b) {
|
|
2905
|
+
if (b === $) return "<>";
|
|
2906
|
+
if (typeof b == "object" && b !== null && b.$$typeof === _e)
|
|
2848
2907
|
return "<...>";
|
|
2849
2908
|
try {
|
|
2850
|
-
var I = d(
|
|
2909
|
+
var I = d(b);
|
|
2851
2910
|
return I ? "<" + I + ">" : "<...>";
|
|
2852
2911
|
} catch {
|
|
2853
2912
|
return "<...>";
|
|
2854
2913
|
}
|
|
2855
2914
|
}
|
|
2856
|
-
function
|
|
2857
|
-
var
|
|
2858
|
-
return
|
|
2915
|
+
function y() {
|
|
2916
|
+
var b = W.A;
|
|
2917
|
+
return b === null ? null : b.getOwner();
|
|
2859
2918
|
}
|
|
2860
|
-
function
|
|
2919
|
+
function T() {
|
|
2861
2920
|
return Error("react-stack-top-frame");
|
|
2862
2921
|
}
|
|
2863
|
-
function z(
|
|
2864
|
-
if (
|
|
2865
|
-
var I = Object.getOwnPropertyDescriptor(
|
|
2922
|
+
function z(b) {
|
|
2923
|
+
if (le.call(b, "key")) {
|
|
2924
|
+
var I = Object.getOwnPropertyDescriptor(b, "key").get;
|
|
2866
2925
|
if (I && I.isReactWarning) return !1;
|
|
2867
2926
|
}
|
|
2868
|
-
return
|
|
2927
|
+
return b.key !== void 0;
|
|
2869
2928
|
}
|
|
2870
|
-
function R(
|
|
2929
|
+
function R(b, I) {
|
|
2871
2930
|
function j() {
|
|
2872
|
-
|
|
2931
|
+
G || (G = !0, console.error(
|
|
2873
2932
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2874
2933
|
I
|
|
2875
2934
|
));
|
|
2876
2935
|
}
|
|
2877
|
-
j.isReactWarning = !0, Object.defineProperty(
|
|
2936
|
+
j.isReactWarning = !0, Object.defineProperty(b, "key", {
|
|
2878
2937
|
get: j,
|
|
2879
2938
|
configurable: !0
|
|
2880
2939
|
});
|
|
2881
2940
|
}
|
|
2882
|
-
function
|
|
2883
|
-
var
|
|
2884
|
-
return
|
|
2941
|
+
function ne() {
|
|
2942
|
+
var b = d(this.type);
|
|
2943
|
+
return ae[b] || (ae[b] = !0, console.error(
|
|
2885
2944
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
2886
|
-
)),
|
|
2945
|
+
)), b = this.props.ref, b !== void 0 ? b : null;
|
|
2887
2946
|
}
|
|
2888
|
-
function
|
|
2947
|
+
function Y(b, I, j, N, ve, xe) {
|
|
2889
2948
|
var H = j.ref;
|
|
2890
|
-
return
|
|
2891
|
-
$$typeof:
|
|
2892
|
-
type:
|
|
2949
|
+
return b = {
|
|
2950
|
+
$$typeof: ce,
|
|
2951
|
+
type: b,
|
|
2893
2952
|
key: I,
|
|
2894
2953
|
props: j,
|
|
2895
2954
|
_owner: N
|
|
2896
|
-
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(
|
|
2955
|
+
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(b, "ref", {
|
|
2897
2956
|
enumerable: !1,
|
|
2898
|
-
get:
|
|
2899
|
-
}) : Object.defineProperty(
|
|
2957
|
+
get: ne
|
|
2958
|
+
}) : Object.defineProperty(b, "ref", { enumerable: !1, value: null }), b._store = {}, Object.defineProperty(b._store, "validated", {
|
|
2900
2959
|
configurable: !1,
|
|
2901
2960
|
enumerable: !1,
|
|
2902
2961
|
writable: !0,
|
|
2903
2962
|
value: 0
|
|
2904
|
-
}), Object.defineProperty(
|
|
2963
|
+
}), Object.defineProperty(b, "_debugInfo", {
|
|
2905
2964
|
configurable: !1,
|
|
2906
2965
|
enumerable: !1,
|
|
2907
2966
|
writable: !0,
|
|
2908
2967
|
value: null
|
|
2909
|
-
}), Object.defineProperty(
|
|
2968
|
+
}), Object.defineProperty(b, "_debugStack", {
|
|
2910
2969
|
configurable: !1,
|
|
2911
2970
|
enumerable: !1,
|
|
2912
2971
|
writable: !0,
|
|
2913
|
-
value:
|
|
2914
|
-
}), Object.defineProperty(
|
|
2972
|
+
value: ve
|
|
2973
|
+
}), Object.defineProperty(b, "_debugTask", {
|
|
2915
2974
|
configurable: !1,
|
|
2916
2975
|
enumerable: !1,
|
|
2917
2976
|
writable: !0,
|
|
2918
|
-
value:
|
|
2919
|
-
}), Object.freeze && (Object.freeze(
|
|
2977
|
+
value: xe
|
|
2978
|
+
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
2920
2979
|
}
|
|
2921
|
-
function F(
|
|
2980
|
+
function F(b, I, j, N, ve, xe) {
|
|
2922
2981
|
var H = I.children;
|
|
2923
2982
|
if (H !== void 0)
|
|
2924
2983
|
if (N)
|
|
2925
|
-
if (
|
|
2984
|
+
if (B(H)) {
|
|
2926
2985
|
for (N = 0; N < H.length; N++)
|
|
2927
|
-
|
|
2986
|
+
he(H[N]);
|
|
2928
2987
|
Object.freeze && Object.freeze(H);
|
|
2929
2988
|
} else
|
|
2930
2989
|
console.error(
|
|
2931
2990
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2932
2991
|
);
|
|
2933
|
-
else
|
|
2934
|
-
if (
|
|
2935
|
-
H = d(
|
|
2936
|
-
var
|
|
2992
|
+
else he(H);
|
|
2993
|
+
if (le.call(I, "key")) {
|
|
2994
|
+
H = d(b);
|
|
2995
|
+
var ue = Object.keys(I).filter(function(Ke) {
|
|
2937
2996
|
return Ke !== "key";
|
|
2938
2997
|
});
|
|
2939
|
-
N = 0 <
|
|
2998
|
+
N = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", oe[H + N] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2940
2999
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2941
3000
|
let props = %s;
|
|
2942
3001
|
<%s {...props} />
|
|
@@ -2945,90 +3004,90 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2945
3004
|
<%s key={someKey} {...props} />`,
|
|
2946
3005
|
N,
|
|
2947
3006
|
H,
|
|
2948
|
-
|
|
3007
|
+
ue,
|
|
2949
3008
|
H
|
|
2950
|
-
),
|
|
3009
|
+
), oe[H + N] = !0);
|
|
2951
3010
|
}
|
|
2952
|
-
if (H = null, j !== void 0 && (
|
|
3011
|
+
if (H = null, j !== void 0 && (g(j), H = "" + j), z(I) && (g(I.key), H = "" + I.key), "key" in I) {
|
|
2953
3012
|
j = {};
|
|
2954
3013
|
for (var _ in I)
|
|
2955
3014
|
_ !== "key" && (j[_] = I[_]);
|
|
2956
3015
|
} else j = I;
|
|
2957
3016
|
return H && R(
|
|
2958
3017
|
j,
|
|
2959
|
-
typeof
|
|
2960
|
-
),
|
|
2961
|
-
|
|
3018
|
+
typeof b == "function" ? b.displayName || b.name || "Unknown" : b
|
|
3019
|
+
), Y(
|
|
3020
|
+
b,
|
|
2962
3021
|
H,
|
|
2963
3022
|
j,
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
3023
|
+
y(),
|
|
3024
|
+
ve,
|
|
3025
|
+
xe
|
|
2967
3026
|
);
|
|
2968
3027
|
}
|
|
2969
|
-
function
|
|
2970
|
-
|
|
3028
|
+
function he(b) {
|
|
3029
|
+
se(b) ? b._store && (b._store.validated = 1) : typeof b == "object" && b !== null && b.$$typeof === _e && (b._payload.status === "fulfilled" ? se(b._payload.value) && b._payload.value._store && (b._payload.value._store.validated = 1) : b._store && (b._store.validated = 1));
|
|
2971
3030
|
}
|
|
2972
|
-
function
|
|
2973
|
-
return typeof
|
|
3031
|
+
function se(b) {
|
|
3032
|
+
return typeof b == "object" && b !== null && b.$$typeof === ce;
|
|
2974
3033
|
}
|
|
2975
|
-
var
|
|
3034
|
+
var Q = Kr, ce = Symbol.for("react.transitional.element"), Te = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), J = Symbol.for("react.strict_mode"), V = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), re = Symbol.for("react.context"), Se = Symbol.for("react.forward_ref"), Ge = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), Re = Symbol.for("react.memo"), _e = Symbol.for("react.lazy"), Ce = Symbol.for("react.activity"), Je = Symbol.for("react.client.reference"), W = Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, B = Array.isArray, U = console.createTask ? console.createTask : function() {
|
|
2976
3035
|
return null;
|
|
2977
3036
|
};
|
|
2978
|
-
|
|
2979
|
-
react_stack_bottom_frame: function(
|
|
2980
|
-
return
|
|
3037
|
+
Q = {
|
|
3038
|
+
react_stack_bottom_frame: function(b) {
|
|
3039
|
+
return b();
|
|
2981
3040
|
}
|
|
2982
3041
|
};
|
|
2983
|
-
var
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
)(),
|
|
2987
|
-
|
|
2988
|
-
var N = 1e4 >
|
|
3042
|
+
var G, ae = {}, Ie = Q.react_stack_bottom_frame.bind(
|
|
3043
|
+
Q,
|
|
3044
|
+
T
|
|
3045
|
+
)(), ee = U(f(T)), oe = {};
|
|
3046
|
+
qe.Fragment = $, qe.jsx = function(b, I, j) {
|
|
3047
|
+
var N = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
2989
3048
|
return F(
|
|
2990
|
-
|
|
3049
|
+
b,
|
|
2991
3050
|
I,
|
|
2992
3051
|
j,
|
|
2993
3052
|
!1,
|
|
2994
|
-
N ? Error("react-stack-top-frame") :
|
|
2995
|
-
N ?
|
|
3053
|
+
N ? Error("react-stack-top-frame") : Ie,
|
|
3054
|
+
N ? U(f(b)) : ee
|
|
2996
3055
|
);
|
|
2997
|
-
},
|
|
2998
|
-
var N = 1e4 >
|
|
3056
|
+
}, qe.jsxs = function(b, I, j) {
|
|
3057
|
+
var N = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
2999
3058
|
return F(
|
|
3000
|
-
|
|
3059
|
+
b,
|
|
3001
3060
|
I,
|
|
3002
3061
|
j,
|
|
3003
3062
|
!0,
|
|
3004
|
-
N ? Error("react-stack-top-frame") :
|
|
3005
|
-
N ?
|
|
3063
|
+
N ? Error("react-stack-top-frame") : Ie,
|
|
3064
|
+
N ? U(f(b)) : ee
|
|
3006
3065
|
);
|
|
3007
3066
|
};
|
|
3008
|
-
})()),
|
|
3067
|
+
})()), qe;
|
|
3009
3068
|
}
|
|
3010
3069
|
var zn;
|
|
3011
|
-
function
|
|
3012
|
-
return zn || (zn = 1, process.env.NODE_ENV === "production" ? ft.exports =
|
|
3070
|
+
function Go() {
|
|
3071
|
+
return zn || (zn = 1, process.env.NODE_ENV === "production" ? ft.exports = Xo() : ft.exports = $o()), ft.exports;
|
|
3013
3072
|
}
|
|
3014
|
-
var
|
|
3015
|
-
const
|
|
3073
|
+
var Jo = Go();
|
|
3074
|
+
const Qo = ({
|
|
3016
3075
|
onChange: d,
|
|
3017
|
-
initialValue:
|
|
3076
|
+
initialValue: h
|
|
3018
3077
|
}) => {
|
|
3019
|
-
const
|
|
3020
|
-
return
|
|
3021
|
-
if (f.current && !
|
|
3022
|
-
|
|
3023
|
-
const
|
|
3024
|
-
const z =
|
|
3078
|
+
const g = On(null), f = On(null);
|
|
3079
|
+
return Qr(() => {
|
|
3080
|
+
if (f.current && !g.current) {
|
|
3081
|
+
g.current = new qo(), f.current.appendChild(g.current.getElement()), h && g.current.setHTML(h);
|
|
3082
|
+
const y = g.current.getElement(), T = () => {
|
|
3083
|
+
const z = g.current?.getHTML() || "";
|
|
3025
3084
|
d?.(z);
|
|
3026
3085
|
};
|
|
3027
|
-
|
|
3086
|
+
y.addEventListener("input", T), y.addEventListener("keyup", T), y.addEventListener("paste", T);
|
|
3028
3087
|
}
|
|
3029
|
-
}, [d,
|
|
3088
|
+
}, [d, h]), /* @__PURE__ */ Jo.jsx("div", { ref: f });
|
|
3030
3089
|
};
|
|
3031
3090
|
export {
|
|
3032
|
-
|
|
3033
|
-
|
|
3091
|
+
qo as RichTextEditor,
|
|
3092
|
+
Qo as RichTextEditorComponent
|
|
3034
3093
|
};
|