nam-rich-text-editor 9.2.2 → 9.2.3

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.
@@ -1,17 +1,17 @@
1
1
  import Qr, { forwardRef as Zr, useRef as Xe, useEffect as Ht, useImperativeHandle as eo } from "react";
2
2
  function to() {
3
- const v = document.createElement("select");
4
- return v.innerHTML = `
3
+ const h = document.createElement("select");
4
+ return h.innerHTML = `
5
5
  <option value="Arial">Arial</option>
6
6
  <option value="Times New Roman">Times New Roman</option>
7
7
  <option value="Courier New">Courier New</option>
8
8
  <option value="Georgia">Georgia</option>
9
9
  <option value="Verdana">Verdana</option>
10
- `, v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "4px", v.style.borderRadius = "3px", v.style.color = "#000000", v.onchange = () => document.execCommand("fontName", !1, v.value), v;
10
+ `, 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), h;
11
11
  }
12
12
  function no() {
13
- const v = document.createElement("select");
14
- return v.innerHTML = `
13
+ const h = document.createElement("select");
14
+ return h.innerHTML = `
15
15
  <option value="1">8pt</option>
16
16
  <option value="2">10pt</option>
17
17
  <option value="3" selected>12pt</option>
@@ -19,20 +19,20 @@ function no() {
19
19
  <option value="5">18pt</option>
20
20
  <option value="6">24pt</option>
21
21
  <option value="7">36pt</option>
22
- `, v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "4px", v.style.borderRadius = "3px", v.style.color = "#000000", v.onchange = () => document.execCommand("fontSize", !1, v.value), v;
22
+ `, 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("fontSize", !1, h.value), h;
23
23
  }
24
24
  function ro() {
25
- const v = document.createElement("select");
26
- return v.title = "Heading", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "4px", v.style.borderRadius = "3px", v.style.color = "#000000", v.innerHTML = `
25
+ const h = document.createElement("select");
26
+ return h.title = "Heading", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "4px", h.style.borderRadius = "3px", h.style.color = "#000000", h.innerHTML = `
27
27
  <option value="p">Normal</option>
28
28
  <option value="h1">Heading 1</option>
29
29
  <option value="h2">Heading 2</option>
30
30
  <option value="h3">Heading 3</option>
31
31
  <option value="h4">Heading 4</option>
32
- `, v.onchange = () => {
33
- const h = v.value, p = h === "p" ? "P" : h.toUpperCase();
32
+ `, h.onchange = () => {
33
+ const m = h.value, p = m === "p" ? "P" : m.toUpperCase();
34
34
  document.execCommand("formatBlock", !1, `<${p}>`);
35
- }, v;
35
+ }, h;
36
36
  }
37
37
  const oo = {
38
38
  xmlns: "http://www.w3.org/2000/svg",
@@ -45,20 +45,20 @@ const oo = {
45
45
  "stroke-linecap": "round",
46
46
  "stroke-linejoin": "round"
47
47
  };
48
- const Ln = ([v, h, p]) => {
49
- const u = document.createElementNS("http://www.w3.org/2000/svg", v);
50
- return Object.keys(h).forEach((m) => {
51
- u.setAttribute(m, String(h[m]));
52
- }), p?.length && p.forEach((m) => {
53
- const g = Ln(m);
54
- u.appendChild(g);
48
+ const zn = ([h, m, p]) => {
49
+ const u = document.createElementNS("http://www.w3.org/2000/svg", h);
50
+ return Object.keys(m).forEach((v) => {
51
+ u.setAttribute(v, String(m[v]));
52
+ }), p?.length && p.forEach((v) => {
53
+ const y = zn(v);
54
+ u.appendChild(y);
55
55
  }), u;
56
- }, ye = (v, h = {}) => {
56
+ }, ye = (h, m = {}) => {
57
57
  const u = {
58
58
  ...oo,
59
- ...h
59
+ ...m
60
60
  };
61
- return Ln(["svg", u, v]);
61
+ return zn(["svg", u, h]);
62
62
  };
63
63
  const io = [
64
64
  ["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]
@@ -111,13 +111,13 @@ const ho = [
111
111
  ["path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }],
112
112
  ["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" }]
113
113
  ];
114
- const vo = [
114
+ const mo = [
115
115
  ["path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }],
116
116
  ["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }],
117
117
  ["path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }],
118
118
  ["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" }]
119
119
  ];
120
- const mo = [
120
+ const vo = [
121
121
  [
122
122
  "path",
123
123
  {
@@ -177,48 +177,48 @@ const To = [
177
177
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
178
178
  ];
179
179
  let Qe = null;
180
- function de(v) {
181
- if (v) {
182
- Qe = v.cloneRange();
180
+ function de(h) {
181
+ if (h) {
182
+ Qe = h.cloneRange();
183
183
  return;
184
184
  }
185
- const h = window.getSelection();
186
- if (!h || h.rangeCount === 0) {
185
+ const m = window.getSelection();
186
+ if (!m || m.rangeCount === 0) {
187
187
  Qe = null;
188
188
  return;
189
189
  }
190
- Qe = h.getRangeAt(0).cloneRange();
190
+ Qe = m.getRangeAt(0).cloneRange();
191
191
  }
192
- function Ae() {
193
- const v = window.getSelection();
194
- v && (v.removeAllRanges(), Qe && v.addRange(Qe.cloneRange()));
192
+ function Re() {
193
+ const h = window.getSelection();
194
+ h && (h.removeAllRanges(), Qe && h.addRange(Qe.cloneRange()));
195
195
  }
196
- function Fn(v, h) {
196
+ function Fn(h, m) {
197
197
  const p = window.getSelection();
198
198
  if (!p || p.rangeCount === 0) return;
199
199
  const u = p.getRangeAt(0);
200
200
  if (!u.collapsed) {
201
201
  const w = document.createElement("span");
202
- w.style[v] = h;
203
- const y = u.extractContents();
204
- w.appendChild(y), u.insertNode(w), p.removeAllRanges();
205
- const _ = document.createRange();
206
- _.selectNodeContents(w), p.addRange(_), de(_);
202
+ w.style[h] = m;
203
+ const g = u.extractContents();
204
+ w.appendChild(g), u.insertNode(w), p.removeAllRanges();
205
+ const T = document.createRange();
206
+ T.selectNodeContents(w), p.addRange(T), de(T);
207
207
  return;
208
208
  }
209
- const m = document.createElement("span");
210
- m.style[v] = h, m.appendChild(document.createTextNode("​")), u.insertNode(m), p.removeAllRanges();
211
- const g = document.createRange();
212
- g.setStart(m.firstChild, 0), g.setEnd(m.firstChild, 0), p.addRange(g), de(g);
209
+ const v = document.createElement("span");
210
+ v.style[h] = m, v.appendChild(document.createTextNode("​")), u.insertNode(v), p.removeAllRanges();
211
+ const y = document.createRange();
212
+ y.setStart(v.firstChild, 0), y.setEnd(v.firstChild, 0), p.addRange(y), de(y);
213
213
  }
214
- function _o(v) {
215
- Fn("color", v);
214
+ function _o(h) {
215
+ Fn("color", h);
216
216
  }
217
- function Mo(v) {
218
- Fn("backgroundColor", v);
217
+ function Ao(h) {
218
+ Fn("backgroundColor", h);
219
219
  }
220
- function Ro() {
221
- const v = document.createDocumentFragment();
220
+ function Mo() {
221
+ const h = document.createDocumentFragment();
222
222
  return [
223
223
  { command: "bold", icon: io, title: "Bold" },
224
224
  { command: "italic", icon: so, title: "Italic" },
@@ -226,39 +226,39 @@ function Ro() {
226
226
  { command: "strikeThrough", icon: bo, title: "Strikethrough" }
227
227
  ].forEach((p) => {
228
228
  const u = document.createElement("div");
229
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
230
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
229
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (y) => {
230
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), u.click());
231
231
  });
232
- const m = ye(p.icon, { width: 16, height: 16 });
233
- u.appendChild(m), u.title = p.title, u.style.fontWeight = p.command === "bold" ? "bold" : "normal", u.style.fontStyle = p.command === "italic" ? "italic" : "normal", u.style.textDecoration = p.command === "underline" ? "underline" : "none", u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
234
- g.preventDefault(), de();
235
- }), u.onclick = (g) => {
236
- g.preventDefault();
232
+ const v = ye(p.icon, { width: 16, height: 16 });
233
+ u.appendChild(v), u.title = p.title, u.style.fontWeight = p.command === "bold" ? "bold" : "normal", u.style.fontStyle = p.command === "italic" ? "italic" : "normal", u.style.textDecoration = p.command === "underline" ? "underline" : "none", u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (y) => {
234
+ y.preventDefault(), de();
235
+ }), u.onclick = (y) => {
236
+ y.preventDefault();
237
237
  const w = u.closest(".editor-container")?.querySelector(".editor");
238
- w && (Ae(), w.focus()), document.execCommand(p.command), w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
239
- }, v.appendChild(u);
240
- }), v;
238
+ w && (Re(), w.focus()), document.execCommand(p.command), w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
239
+ }, h.appendChild(u);
240
+ }), h;
241
241
  }
242
- function Ao() {
243
- const v = document.createDocumentFragment(), h = document.createElement("input");
244
- h.type = "color", h.style.display = "none", h.title = "Text Color";
242
+ function Ro() {
243
+ const h = document.createDocumentFragment(), m = document.createElement("input");
244
+ m.type = "color", m.style.display = "none", m.title = "Text Color";
245
245
  const p = document.createElement("div");
246
- p.setAttribute("role", "button"), p.tabIndex = 0, p.style.userSelect = "none", p.addEventListener("keydown", (g) => {
247
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), p.click());
248
- }), p.textContent = "A", p.style.color = "#000", p.style.fontSize = "16px", p.style.fontWeight = "bold", p.style.border = "1px solid #ccc", p.style.borderRadius = "4px", p.style.padding = "4px 8px", p.style.cursor = "pointer", p.style.backgroundColor = "#fff", p.title = "Text Color", p.onclick = () => h.click(), h.onchange = () => {
249
- Ae(), _o(h.value), p.style.color = h.value;
250
- }, v.appendChild(p), v.appendChild(h);
246
+ p.setAttribute("role", "button"), p.tabIndex = 0, p.style.userSelect = "none", p.addEventListener("keydown", (y) => {
247
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), p.click());
248
+ }), p.textContent = "A", p.style.color = "#000", p.style.fontSize = "16px", p.style.fontWeight = "bold", p.style.border = "1px solid #ccc", p.style.borderRadius = "4px", p.style.padding = "4px 8px", p.style.cursor = "pointer", p.style.backgroundColor = "#fff", p.title = "Text Color", p.onclick = () => m.click(), m.onchange = () => {
249
+ Re(), _o(m.value), p.style.color = m.value;
250
+ }, h.appendChild(p), h.appendChild(m);
251
251
  const u = document.createElement("input");
252
252
  u.type = "color", u.style.display = "none", u.title = "Background Color";
253
- const m = document.createElement("div");
254
- return m.setAttribute("role", "button"), m.tabIndex = 0, m.style.userSelect = "none", m.addEventListener("keydown", (g) => {
255
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), m.click());
256
- }), m.textContent = "BA", m.style.color = "#000", m.style.fontSize = "14px", m.style.fontWeight = "bold", m.style.border = "1px solid #ccc", m.style.borderRadius = "4px", m.style.padding = "4px 6px", m.style.cursor = "pointer", m.style.backgroundColor = "#fff", m.title = "Background Color", m.onclick = () => u.click(), u.onchange = () => {
257
- Ae(), Mo(u.value), m.style.backgroundColor = u.value, m.style.color = "#000";
258
- }, v.appendChild(m), v.appendChild(u), v;
253
+ const v = document.createElement("div");
254
+ return v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (y) => {
255
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), v.click());
256
+ }), v.textContent = "BA", v.style.color = "#000", v.style.fontSize = "14px", v.style.fontWeight = "bold", v.style.border = "1px solid #ccc", v.style.borderRadius = "4px", v.style.padding = "4px 6px", v.style.cursor = "pointer", v.style.backgroundColor = "#fff", v.title = "Background Color", v.onclick = () => u.click(), u.onchange = () => {
257
+ Re(), Ao(u.value), v.style.backgroundColor = u.value, v.style.color = "#000";
258
+ }, h.appendChild(v), h.appendChild(u), h;
259
259
  }
260
260
  function Io() {
261
- const v = document.createDocumentFragment();
261
+ const h = document.createDocumentFragment();
262
262
  return [
263
263
  {
264
264
  command: "justifyLeft",
@@ -286,262 +286,264 @@ function Io() {
286
286
  }
287
287
  ].forEach((p) => {
288
288
  const u = document.createElement("div");
289
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
290
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
289
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (y) => {
290
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), u.click());
291
291
  });
292
- const m = ye(p.icon, { width: 16, height: 16 });
293
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
294
- g.preventDefault();
295
- }), u.onclick = (g) => {
296
- g.preventDefault(), g.stopPropagation();
297
- const y = u.closest(".editor-container")?.querySelector(".editor");
298
- if (!y) return;
299
- const _ = window.__selectedImageContainer;
300
- if (console.log("Align clicked, selectedContainer:", _), _ && y.contains(_)) {
301
- _.style.textAlign = p.align, console.log("Applied align:", p.align, "to container"), y.dispatchEvent(new Event("input", { bubbles: !0 }));
292
+ const v = ye(p.icon, { width: 16, height: 16 });
293
+ u.appendChild(v), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (y) => {
294
+ y.preventDefault();
295
+ }), u.onclick = (y) => {
296
+ y.preventDefault(), y.stopPropagation();
297
+ const g = u.closest(".editor-container")?.querySelector(".editor");
298
+ if (!g) return;
299
+ const T = window.__selectedImageContainer;
300
+ if (console.log("Align clicked, selectedContainer:", T), T && g.contains(T)) {
301
+ T.style.textAlign = p.align, console.log("Applied align:", p.align, "to container"), g.dispatchEvent(new Event("input", { bubbles: !0 }));
302
302
  return;
303
303
  }
304
- const M = window.getSelection();
305
- if (M && M.rangeCount > 0 && M.anchorNode) {
306
- let C = M.anchorNode;
307
- for (; C && C.nodeType !== Node.ELEMENT_NODE; )
308
- C = C.parentNode;
309
- let T = C;
310
- for (; T && T !== y && T !== document.body; ) {
311
- if (T.tagName === "P" || T.classList.contains("editor-image-container")) {
312
- T.style.textAlign = p.align, y.dispatchEvent(new Event("input", { bubbles: !0 }));
304
+ const A = window.getSelection();
305
+ if (A && A.rangeCount > 0 && A.anchorNode) {
306
+ let k = A.anchorNode;
307
+ for (; k && k.nodeType !== Node.ELEMENT_NODE; )
308
+ k = k.parentNode;
309
+ let _ = k;
310
+ for (; _ && _ !== g && _ !== document.body; ) {
311
+ if (_.tagName === "P" || _.classList.contains("editor-image-container")) {
312
+ _.style.textAlign = p.align, g.dispatchEvent(new Event("input", { bubbles: !0 }));
313
313
  return;
314
314
  }
315
- T = T.parentElement;
315
+ _ = _.parentElement;
316
316
  }
317
317
  }
318
- document.execCommand(p.command), y.dispatchEvent(new Event("input", { bubbles: !0 }));
319
- }, v.appendChild(u);
320
- }), v;
318
+ document.execCommand(p.command), g.dispatchEvent(new Event("input", { bubbles: !0 }));
319
+ }, h.appendChild(u);
320
+ }), h;
321
321
  }
322
- function Po(v) {
323
- v.querySelectorAll("p > ul, p > ol").forEach((p) => {
322
+ function Po(h) {
323
+ h.querySelectorAll(
324
+ "p > ul, p > ol, div:not(.editor-image-container):not(.editor-image-wrapper) > ul, div:not(.editor-image-container):not(.editor-image-wrapper) > ol"
325
+ ).forEach((p) => {
324
326
  const u = p.parentElement;
325
- u && u.tagName === "P" && (u.parentNode?.insertBefore(p, u.nextSibling), !u.textContent?.trim() && !u.querySelector("img") && u.remove());
327
+ u && (u.tagName === "P" || u.tagName === "DIV" && !u.classList.contains("editor-image-container") && !u.classList.contains("editor-image-wrapper") && u !== h) && (u.parentNode?.insertBefore(p, u.nextSibling), !u.textContent?.trim() && !u.querySelector("img") && u.remove());
326
328
  });
327
329
  }
328
330
  function Oo() {
329
- const v = document.createDocumentFragment();
331
+ const h = document.createDocumentFragment();
330
332
  return [
331
333
  { command: "insertUnorderedList", icon: fo, title: "Bullet List" },
332
334
  { command: "insertOrderedList", icon: po, title: "Numbered List" }
333
335
  ].forEach((p) => {
334
336
  const u = document.createElement("div");
335
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
336
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
337
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (y) => {
338
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), u.click());
337
339
  });
338
- const m = ye(p.icon, { width: 16, height: 16 });
339
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
340
- g.preventDefault(), de();
341
- }), u.onclick = (g) => {
342
- g.preventDefault();
340
+ const v = ye(p.icon, { width: 16, height: 16 });
341
+ u.appendChild(v), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (y) => {
342
+ y.preventDefault(), de();
343
+ }), u.onclick = (y) => {
344
+ y.preventDefault();
343
345
  const w = u.closest(".editor-container")?.querySelector(".editor");
344
- w ? (Ae(), w.focus(), document.execCommand(p.command), setTimeout(() => {
346
+ w ? (Re(), w.focus(), document.execCommand(p.command), setTimeout(() => {
345
347
  Po(w), w.dispatchEvent(new Event("input", { bubbles: !0 }));
346
348
  }, 0)) : document.execCommand(p.command);
347
- }, v.appendChild(u);
348
- }), v;
349
+ }, h.appendChild(u);
350
+ }), h;
349
351
  }
350
352
  function Do() {
351
- const v = document.createDocumentFragment();
353
+ const h = document.createDocumentFragment();
352
354
  return [
353
355
  { command: "indent", icon: uo, title: "Increase Indent" },
354
356
  { command: "outdent", icon: co, title: "Decrease Indent" }
355
357
  ].forEach((p) => {
356
358
  const u = document.createElement("div");
357
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
358
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
359
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (y) => {
360
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), u.click());
359
361
  });
360
- const m = ye(p.icon, { width: 16, height: 16 });
361
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
362
- }), v;
362
+ const v = ye(p.icon, { width: 16, height: 16 });
363
+ u.appendChild(v), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), h.appendChild(u);
364
+ }), h;
363
365
  }
364
366
  function No() {
365
- const v = document.createDocumentFragment();
367
+ const h = document.createDocumentFragment();
366
368
  return [
367
369
  { command: "undo", icon: So, title: "Undo" },
368
370
  { command: "redo", icon: go, title: "Redo" }
369
371
  ].forEach((p) => {
370
372
  const u = document.createElement("div");
371
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
372
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
373
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (y) => {
374
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), u.click());
373
375
  });
374
- const m = ye(p.icon, { width: 16, height: 16 });
375
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
376
- }), v;
376
+ const v = ye(p.icon, { width: 16, height: 16 });
377
+ u.appendChild(v), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), h.appendChild(u);
378
+ }), h;
377
379
  }
378
- function zo() {
379
- const v = document.createElement("div");
380
- v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (p) => {
381
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), v.click());
380
+ function Lo() {
381
+ const h = document.createElement("div");
382
+ h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (p) => {
383
+ (p.key === "Enter" || p.key === " ") && (p.preventDefault(), h.click());
382
384
  });
383
- const h = ye(ao, { width: 16, height: 16 });
384
- return v.appendChild(h), v.title = "Insert Image", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff", v.onmousedown = () => de(), v;
385
+ const m = ye(ao, { width: 16, height: 16 });
386
+ return h.appendChild(m), h.title = "Insert Image", 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.onmousedown = () => de(), h;
385
387
  }
386
- function Lo() {
387
- const v = document.createElement("div");
388
- v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (w) => {
389
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), v.click());
388
+ function zo() {
389
+ const h = document.createElement("div");
390
+ h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (w) => {
391
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), h.click());
390
392
  });
391
- const h = ye(ho, {
393
+ const m = ye(ho, {
392
394
  width: 16,
393
395
  height: 16
394
- }), p = ye(vo, {
396
+ }), p = ye(mo, {
395
397
  width: 16,
396
398
  height: 16
397
399
  });
398
- v.appendChild(h), v.title = "Toggle Fullscreen", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff";
399
- let u = !1, m = "", g = "";
400
- return v.onclick = () => {
401
- const w = v.closest(
400
+ h.appendChild(m), h.title = "Toggle Fullscreen", 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";
401
+ let u = !1, v = "", y = "";
402
+ return h.onclick = () => {
403
+ const w = h.closest(
402
404
  ".editor-container"
403
405
  );
404
406
  if (!w) return;
405
- const y = w.querySelector(".editor");
407
+ const g = w.querySelector(".editor");
406
408
  if (u)
407
- m ? w.setAttribute("style", m) : w.removeAttribute("style"), y && (g ? y.setAttribute("style", g) : y.removeAttribute("style")), v.replaceChild(h, p), u = !1;
409
+ v ? w.setAttribute("style", v) : w.removeAttribute("style"), g && (y ? g.setAttribute("style", y) : g.removeAttribute("style")), h.replaceChild(m, p), u = !1;
408
410
  else {
409
- m = w.getAttribute("style") || "", g = y && y.getAttribute("style") || "", w.style.position = "fixed", w.style.top = "0", w.style.left = "0", w.style.width = "100vw", w.style.height = "100vh", w.style.margin = "0", w.style.padding = "0";
411
+ v = w.getAttribute("style") || "", y = g && g.getAttribute("style") || "", w.style.position = "fixed", w.style.top = "0", w.style.left = "0", w.style.width = "100vw", w.style.height = "100vh", w.style.margin = "0", w.style.padding = "0";
410
412
  try {
411
- let _ = 9998;
412
- document.querySelectorAll("body *").forEach((M) => {
413
- const C = window.getComputedStyle(M).getPropertyValue("z-index"), T = parseInt(C, 10);
414
- !isNaN(T) && T > 0 && (_ = Math.max(_, T));
415
- }), w.style.zIndex = String(Math.max(_ + 1, 9999));
413
+ let T = 9998;
414
+ document.querySelectorAll("body *").forEach((A) => {
415
+ const k = window.getComputedStyle(A).getPropertyValue("z-index"), _ = parseInt(k, 10);
416
+ !isNaN(_) && _ > 0 && (T = Math.max(T, _));
417
+ }), w.style.zIndex = String(Math.max(T + 1, 9999));
416
418
  } catch {
417
419
  w.style.zIndex = "9999";
418
420
  }
419
- w.style.backgroundColor = "#ffffff", w.style.display = "flex", w.style.flexDirection = "column", w.style.boxSizing = "border-box", y && (y.style.flex = "1 1 0", y.style.overflowY = "auto", y.style.border = "none", y.style.borderRadius = "0", y.style.boxShadow = "none", y.style.height = "", y.style.minHeight = "0", y.style.maxHeight = "none", y.style.padding = "20px", y.style.boxSizing = "border-box"), v.replaceChild(p, h), u = !0;
421
+ w.style.backgroundColor = "#ffffff", w.style.display = "flex", w.style.flexDirection = "column", w.style.boxSizing = "border-box", g && (g.style.flex = "1 1 0", g.style.overflowY = "auto", g.style.border = "none", g.style.borderRadius = "0", g.style.boxShadow = "none", g.style.height = "", g.style.minHeight = "0", g.style.maxHeight = "none", g.style.padding = "20px", g.style.boxSizing = "border-box"), h.replaceChild(p, m), u = !0;
420
422
  }
421
- }, v;
423
+ }, h;
422
424
  }
423
- function Fo(v) {
424
- const h = document.createDocumentFragment(), p = document.createElement("div");
425
+ function Fo(h) {
426
+ const m = document.createDocumentFragment(), p = document.createElement("div");
425
427
  p.style.position = "fixed", p.style.top = "0", p.style.left = "0", p.style.width = "100%", p.style.height = "100%", p.style.backgroundColor = "rgba(0, 0, 0, 0.5)", p.style.display = "none", p.style.zIndex = "1000", p.style.alignItems = "center", p.style.justifyContent = "center", p.style.flexDirection = "column";
426
428
  const u = document.createElement("div");
427
429
  u.style.backgroundColor = "#fff", u.style.padding = "20px", u.style.borderRadius = "8px", u.style.boxShadow = "0 4px 6px rgba(0, 0, 0, 0.1)", u.style.minWidth = "300px";
428
- const m = document.createElement("h3");
429
- m.textContent = "Insert Hyperlink", m.style.margin = "0 0 15px 0", m.style.fontSize = "18px", m.style.fontWeight = "bold";
430
- const g = document.createElement("input");
431
- g.type = "url", g.placeholder = "Enter URL (e.g., https://example.com)", g.style.width = "100%", g.style.padding = "8px", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.marginBottom = "15px", g.style.boxSizing = "border-box";
430
+ const v = document.createElement("h3");
431
+ v.textContent = "Insert Hyperlink", v.style.margin = "0 0 15px 0", v.style.fontSize = "18px", v.style.fontWeight = "bold";
432
+ const y = document.createElement("input");
433
+ y.type = "url", y.placeholder = "Enter URL (e.g., https://example.com)", y.style.width = "100%", y.style.padding = "8px", y.style.border = "1px solid #ccc", y.style.borderRadius = "4px", y.style.marginBottom = "15px", y.style.boxSizing = "border-box";
432
434
  const w = document.createElement("div");
433
435
  w.style.display = "flex", w.style.gap = "10px", w.style.justifyContent = "flex-end";
434
- const y = document.createElement("div");
435
- y.setAttribute("role", "button"), y.tabIndex = 0, y.style.userSelect = "none", y.textContent = "Cancel", y.style.padding = "8px 16px", y.style.border = "1px solid #ccc", y.style.borderRadius = "4px", y.style.backgroundColor = "#f5f5f5", y.style.cursor = "pointer", y.addEventListener("keydown", (A) => {
436
- (A.key === "Enter" || A.key === " " || A.key === "Escape") && (A.preventDefault(), y.click());
437
- }), y.onclick = () => {
438
- p.style.display = "none", g.value = "", _ = null;
436
+ const g = document.createElement("div");
437
+ g.setAttribute("role", "button"), g.tabIndex = 0, g.style.userSelect = "none", g.textContent = "Cancel", g.style.padding = "8px 16px", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.backgroundColor = "#f5f5f5", g.style.cursor = "pointer", g.addEventListener("keydown", (R) => {
438
+ (R.key === "Enter" || R.key === " " || R.key === "Escape") && (R.preventDefault(), g.click());
439
+ }), g.onclick = () => {
440
+ p.style.display = "none", y.value = "", T = null;
439
441
  };
440
- let _ = null;
441
- const M = document.createElement("div");
442
- M.setAttribute("role", "button"), M.tabIndex = 0, M.style.userSelect = "none", M.textContent = "Insert", M.style.padding = "8px 16px", M.style.border = "none", M.style.borderRadius = "4px", M.style.backgroundColor = "#007bff", M.style.color = "#fff", M.style.cursor = "pointer", M.addEventListener("keydown", (A) => {
443
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), M.click());
444
- }), M.onclick = () => {
445
- const A = g.value.trim();
446
- if (A)
447
- if (_)
448
- _.setAttribute("href", A), _.setAttribute("target", "_blank"), _.setAttribute("rel", "noopener noreferrer"), _.setAttribute("tabindex", "0");
442
+ let T = null;
443
+ const A = document.createElement("div");
444
+ A.setAttribute("role", "button"), A.tabIndex = 0, A.style.userSelect = "none", A.textContent = "Insert", A.style.padding = "8px 16px", A.style.border = "none", A.style.borderRadius = "4px", A.style.backgroundColor = "#007bff", A.style.color = "#fff", A.style.cursor = "pointer", A.addEventListener("keydown", (R) => {
445
+ (R.key === "Enter" || R.key === " ") && (R.preventDefault(), A.click());
446
+ }), A.onclick = () => {
447
+ const R = y.value.trim();
448
+ if (R)
449
+ if (T)
450
+ T.setAttribute("href", R), T.setAttribute("target", "_blank"), T.setAttribute("rel", "noopener noreferrer"), T.setAttribute("tabindex", "0");
449
451
  else {
450
- Ae(), document.execCommand("createLink", !1, A);
452
+ Re(), document.execCommand("createLink", !1, R);
451
453
  const j = window.getSelection();
452
454
  if (j && j.rangeCount > 0) {
453
- let F = j.getRangeAt(0).startContainer;
454
- for (; F && F.nodeType !== Node.ELEMENT_NODE; )
455
- F = F.parentNode;
456
- let N = F;
457
- for (; N && N !== document.body; ) {
458
- if (N.tagName === "A") {
459
- const $ = N;
460
- $.setAttribute("target", "_blank"), $.setAttribute("rel", "noopener noreferrer"), $.setAttribute("tabindex", "0");
455
+ let N = j.getRangeAt(0).startContainer;
456
+ for (; N && N.nodeType !== Node.ELEMENT_NODE; )
457
+ N = N.parentNode;
458
+ let P = N;
459
+ for (; P && P !== document.body; ) {
460
+ if (P.tagName === "A") {
461
+ const H = P;
462
+ H.setAttribute("target", "_blank"), H.setAttribute("rel", "noopener noreferrer"), H.setAttribute("tabindex", "0");
461
463
  break;
462
464
  }
463
- N = N.parentElement;
465
+ P = P.parentElement;
464
466
  }
465
467
  }
466
468
  }
467
- p.style.display = "none", g.value = "", _ = null;
468
- }, w.appendChild(y), w.appendChild(M), u.appendChild(m), u.appendChild(g), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), g.onkeydown = (A) => {
469
- A.key === "Enter" ? M.click() : A.key === "Escape" && y.click();
469
+ p.style.display = "none", y.value = "", T = null;
470
+ }, w.appendChild(g), w.appendChild(A), u.appendChild(v), u.appendChild(y), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), y.onkeydown = (R) => {
471
+ R.key === "Enter" ? A.click() : R.key === "Escape" && g.click();
470
472
  };
471
- const C = document.createElement("div");
472
- C.setAttribute("role", "button"), C.tabIndex = 0, C.style.userSelect = "none";
473
- const T = ye(lo, { width: 16, height: 16 });
474
- C.appendChild(T), C.title = "Insert Hyperlink", C.style.border = "1px solid #e1e1e1", C.style.backgroundColor = "#ffffff", C.style.padding = "6px 10px", C.style.borderRadius = "3px", C.style.cursor = "pointer", C.style.color = "#000000", C.onmouseover = () => C.style.backgroundColor = "#f0f0f0", C.onmouseout = () => C.style.backgroundColor = "#ffffff", C.onmousedown = () => {
475
- _ = null;
476
- const A = window.getSelection();
477
- if (A && A.rangeCount > 0) {
478
- let F = A.getRangeAt(0).startContainer;
479
- for (; F && F.nodeType !== Node.ELEMENT_NODE; )
480
- F = F.parentNode;
481
- let N = F;
482
- for (; N && N !== document.body; ) {
483
- if (N.tagName === "A") {
484
- _ = N, g.value = _.getAttribute("href") || "";
473
+ const k = document.createElement("div");
474
+ k.setAttribute("role", "button"), k.tabIndex = 0, k.style.userSelect = "none";
475
+ const _ = ye(lo, { width: 16, height: 16 });
476
+ k.appendChild(_), k.title = "Insert Hyperlink", k.style.border = "1px solid #e1e1e1", k.style.backgroundColor = "#ffffff", k.style.padding = "6px 10px", k.style.borderRadius = "3px", k.style.cursor = "pointer", k.style.color = "#000000", k.onmouseover = () => k.style.backgroundColor = "#f0f0f0", k.onmouseout = () => k.style.backgroundColor = "#ffffff", k.onmousedown = () => {
477
+ T = null;
478
+ const R = window.getSelection();
479
+ if (R && R.rangeCount > 0) {
480
+ let N = R.getRangeAt(0).startContainer;
481
+ for (; N && N.nodeType !== Node.ELEMENT_NODE; )
482
+ N = N.parentNode;
483
+ let P = N;
484
+ for (; P && P !== document.body; ) {
485
+ if (P.tagName === "A") {
486
+ T = P, y.value = T.getAttribute("href") || "";
485
487
  break;
486
488
  }
487
- N = N.parentElement;
489
+ P = P.parentElement;
488
490
  }
489
491
  }
490
492
  de();
491
- }, C.addEventListener("keydown", (A) => {
492
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), C.click());
493
- }), C.onclick = () => {
494
- p.style.display = "flex", g.focus();
495
- }, h.appendChild(C);
496
- const P = v.querySelector(".editor");
497
- return P && P.addEventListener("click", (A) => {
498
- const j = A.target;
493
+ }, k.addEventListener("keydown", (R) => {
494
+ (R.key === "Enter" || R.key === " ") && (R.preventDefault(), k.click());
495
+ }), k.onclick = () => {
496
+ p.style.display = "flex", y.focus();
497
+ }, m.appendChild(k);
498
+ const I = h.querySelector(".editor");
499
+ return I && I.addEventListener("click", (R) => {
500
+ const j = R.target;
499
501
  if (j.tagName === "A") {
500
- A.preventDefault();
501
- const F = j.getAttribute("href");
502
- F && window.open(F, "_blank");
502
+ R.preventDefault();
503
+ const N = j.getAttribute("href");
504
+ N && window.open(N, "_blank");
503
505
  }
504
- }), h;
506
+ }), m;
505
507
  }
506
508
  function jo() {
507
- const v = document.createDocumentFragment(), h = document.createElement("div");
508
- h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (ne) => {
509
- (ne.key === "Enter" || ne.key === " ") && (ne.preventDefault(), h.click());
509
+ const h = document.createDocumentFragment(), m = document.createElement("div");
510
+ m.setAttribute("role", "button"), m.tabIndex = 0, m.style.userSelect = "none", m.addEventListener("keydown", (ne) => {
511
+ (ne.key === "Enter" || ne.key === " ") && (ne.preventDefault(), m.click());
510
512
  });
511
- const p = ye(mo, { width: 16, height: 16 });
512
- h.appendChild(p), 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";
513
+ const p = ye(vo, { width: 16, height: 16 });
514
+ m.appendChild(p), m.title = "Insert Quote", m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.padding = "6px 10px", m.style.borderRadius = "3px", m.style.cursor = "pointer", m.style.color = "#000000", m.onmouseover = () => m.style.backgroundColor = "#f0f0f0", m.onmouseout = () => m.style.backgroundColor = "#ffffff";
513
515
  const u = document.createElement("div");
514
516
  u.className = "rte-modal-overlay", u.style.display = "none";
515
- const m = document.createElement("div");
516
- m.className = "rte-modal";
517
- const g = document.createElement("div");
518
- g.className = "rte-modal-header";
517
+ const v = document.createElement("div");
518
+ v.className = "rte-modal";
519
+ const y = document.createElement("div");
520
+ y.className = "rte-modal-header";
519
521
  const w = document.createElement("h3");
520
522
  w.textContent = "Insert Quote", w.className = "rte-modal-title";
521
- const y = document.createElement("div");
522
- y.setAttribute("role", "button"), y.tabIndex = 0, y.style.userSelect = "none", y.className = "rte-modal-close", y.innerHTML = "&times;", y.onclick = () => {
523
+ const g = document.createElement("div");
524
+ g.setAttribute("role", "button"), g.tabIndex = 0, g.style.userSelect = "none", g.className = "rte-modal-close", g.innerHTML = "&times;", g.onclick = () => {
523
525
  u.style.display = "none", te = null;
524
- }, g.appendChild(w), g.appendChild(y);
525
- const _ = document.createElement("div");
526
- _.className = "rte-modal-form";
527
- const M = document.createElement("label");
528
- M.textContent = "Title", M.className = "rte-label";
529
- const C = document.createElement("input");
530
- C.type = "text", C.placeholder = "e.g., Article title or source", C.className = "rte-input";
531
- const T = document.createElement("label");
532
- T.textContent = "Source URL", T.className = "rte-label";
533
- const P = document.createElement("input");
534
- P.type = "url", P.placeholder = "https://example.com", P.className = "rte-input";
535
- const A = document.createElement("div");
536
- A.className = "rte-preview-label", A.textContent = "Preview";
526
+ }, y.appendChild(w), y.appendChild(g);
527
+ const T = document.createElement("div");
528
+ T.className = "rte-modal-form";
529
+ const A = document.createElement("label");
530
+ A.textContent = "Title", A.className = "rte-label";
531
+ const k = document.createElement("input");
532
+ k.type = "text", k.placeholder = "e.g., Article title or source", k.className = "rte-input";
533
+ const _ = document.createElement("label");
534
+ _.textContent = "Source URL", _.className = "rte-label";
535
+ const I = document.createElement("input");
536
+ I.type = "url", I.placeholder = "https://example.com", I.className = "rte-input";
537
+ const R = document.createElement("div");
538
+ R.className = "rte-preview-label", R.textContent = "Preview";
537
539
  const j = document.createElement("div");
538
540
  j.className = "rte-modal-preview";
539
- const F = document.createElement("div");
540
- F.className = "rte-blockquote-title";
541
541
  const N = document.createElement("div");
542
- N.className = "rte-blockquote-content";
543
- const $ = document.createElement("div");
544
- $.className = "rte-blockquote-footer", j.appendChild(F), j.appendChild(N), j.appendChild($), _.appendChild(M), _.appendChild(C), _.appendChild(T), _.appendChild(P), _.appendChild(A), _.appendChild(j);
542
+ N.className = "rte-blockquote-title";
543
+ const P = document.createElement("div");
544
+ P.className = "rte-blockquote-content";
545
+ const H = document.createElement("div");
546
+ H.className = "rte-blockquote-footer", j.appendChild(N), j.appendChild(P), j.appendChild(H), T.appendChild(A), T.appendChild(k), T.appendChild(_), T.appendChild(I), T.appendChild(R), T.appendChild(j);
545
547
  const L = document.createElement("div");
546
548
  L.className = "rte-modal-actions";
547
549
  const V = document.createElement("div");
@@ -554,8 +556,8 @@ function jo() {
554
556
  };
555
557
  const ie = document.createElement("div");
556
558
  ie.setAttribute("role", "button"), ie.tabIndex = 0, ie.style.userSelect = "none", ie.className = "rte-btn-primary", ie.textContent = "Apply", ie.onclick = () => {
557
- const ne = C.value.trim();
558
- let W = P.value.trim();
559
+ const ne = k.value.trim();
560
+ let W = I.value.trim();
559
561
  if (W && !/^https?:\/\//i.test(W) && (W = `https://${W}`), te) {
560
562
  const le = te.querySelector(
561
563
  ".rte-blockquote-title"
@@ -582,7 +584,7 @@ function jo() {
582
584
  }
583
585
  else ce && ce.remove();
584
586
  } else {
585
- Ae();
587
+ Re();
586
588
  const le = window.getSelection();
587
589
  if (!le || le.rangeCount === 0) {
588
590
  u.style.display = "none";
@@ -604,10 +606,10 @@ function jo() {
604
606
  const oe = document.createRange();
605
607
  oe.setStartAfter(Q), oe.collapse(!0), le.addRange(oe), de(oe);
606
608
  }
607
- u.style.display = "none", C.value = "", P.value = "", te = null;
608
- }, L.appendChild(V), L.appendChild(Z), L.appendChild(ie), m.appendChild(g), m.appendChild(_), m.appendChild(L), u.appendChild(m), document.body.appendChild(u);
609
+ u.style.display = "none", k.value = "", I.value = "", te = null;
610
+ }, L.appendChild(V), L.appendChild(Z), L.appendChild(ie), v.appendChild(y), v.appendChild(T), v.appendChild(L), u.appendChild(v), document.body.appendChild(u);
609
611
  let te = null, x = "";
610
- return h.onmousedown = () => {
612
+ return m.onmousedown = () => {
611
613
  te = null, x = "";
612
614
  const ne = window.getSelection();
613
615
  if (ne && ne.rangeCount > 0) {
@@ -625,111 +627,111 @@ function jo() {
625
627
  ), X = te.querySelector(
626
628
  ".rte-blockquote-footer a"
627
629
  );
628
- C.value = Q && Q.textContent || "", P.value = X && X.href || "", V.style.display = "inline-block";
630
+ k.value = Q && Q.textContent || "", I.value = X && X.href || "", V.style.display = "inline-block";
629
631
  const oe = te.querySelector("p");
630
- N.innerHTML = oe ? oe.innerHTML : te.innerHTML, F.textContent = Q && Q.textContent || "", $.innerHTML = X ? `<a href="${X.href}">${X.href}</a>` : "";
632
+ P.innerHTML = oe ? oe.innerHTML : te.innerHTML, N.textContent = Q && Q.textContent || "", H.innerHTML = X ? `<a href="${X.href}">${X.href}</a>` : "";
631
633
  break;
632
634
  }
633
635
  J = J.parentElement;
634
636
  }
635
637
  }
636
- te || (N.innerHTML = x || "<em>Selected text will appear here</em>", F.textContent = "", $.innerHTML = "", V.style.display = "none"), de();
637
- }, C.oninput = () => F.textContent = C.value, P.oninput = () => {
638
- const ne = P.value.trim();
639
- if (!ne) $.innerHTML = "";
638
+ te || (P.innerHTML = x || "<em>Selected text will appear here</em>", N.textContent = "", H.innerHTML = "", V.style.display = "none"), de();
639
+ }, k.oninput = () => N.textContent = k.value, I.oninput = () => {
640
+ const ne = I.value.trim();
641
+ if (!ne) H.innerHTML = "";
640
642
  else {
641
643
  const W = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
642
- $.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
644
+ H.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
643
645
  }
644
- }, h.onclick = () => {
645
- u.style.display = "flex", C.focus();
646
- }, v.appendChild(h), v;
646
+ }, m.onclick = () => {
647
+ u.style.display = "flex", k.focus();
648
+ }, h.appendChild(m), h;
647
649
  }
648
650
  function Ho() {
649
- const v = document.createDocumentFragment(), h = document.createElement("div");
650
- h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (u) => {
651
- (u.key === "Enter" || u.key === " ") && (u.preventDefault(), h.click());
651
+ const h = document.createDocumentFragment(), m = document.createElement("div");
652
+ m.setAttribute("role", "button"), m.tabIndex = 0, m.style.userSelect = "none", m.addEventListener("keydown", (u) => {
653
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), m.click());
652
654
  });
653
655
  const p = ye(yo, { width: 16, height: 16 });
654
- return h.appendChild(p), 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"), v.appendChild(h), v;
656
+ return m.appendChild(p), m.title = "Remove Formatting", m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.padding = "6px 10px", m.style.borderRadius = "3px", m.style.cursor = "pointer", m.style.color = "#000000", m.onmouseover = () => m.style.backgroundColor = "#f0f0f0", m.onmouseout = () => m.style.backgroundColor = "#ffffff", m.onclick = () => document.execCommand("removeFormat"), h.appendChild(m), h;
655
657
  }
656
- function Bo(v) {
657
- const h = document.createDocumentFragment(), p = document.createElement("div");
658
+ function Bo(h) {
659
+ const m = document.createDocumentFragment(), p = document.createElement("div");
658
660
  p.className = "rte-modal-overlay", p.style.display = "none";
659
661
  const u = document.createElement("div");
660
662
  u.className = "rte-modal";
661
- const m = document.createElement("div");
662
- m.className = "rte-modal-header";
663
- const g = document.createElement("h3");
664
- g.className = "rte-modal-title", g.textContent = "Insert Video";
663
+ const v = document.createElement("div");
664
+ v.className = "rte-modal-header";
665
+ const y = document.createElement("h3");
666
+ y.className = "rte-modal-title", y.textContent = "Insert Video";
665
667
  const w = document.createElement("div");
666
- w.setAttribute("role", "button"), w.tabIndex = 0, w.style.userSelect = "none", w.className = "rte-modal-close", w.innerHTML = "&times;", w.onclick = () => p.style.display = "none", m.appendChild(g), m.appendChild(w);
667
- const y = document.createElement("div");
668
- y.className = "rte-modal-form";
669
- const _ = document.createElement("label");
670
- _.className = "rte-label", _.textContent = "Video URL";
671
- const M = document.createElement("input");
672
- M.type = "url", M.className = "rte-input", M.placeholder = "https://... or YouTube URL";
673
- const C = document.createElement("div");
674
- C.className = "rte-preview-label", C.textContent = "Preview";
675
- const T = document.createElement("div");
676
- T.className = "rte-modal-preview";
677
- const P = document.createElement("div");
678
- P.className = "rte-form-left";
679
- const A = document.createElement("div");
680
- A.className = "rte-form-right";
668
+ w.setAttribute("role", "button"), w.tabIndex = 0, w.style.userSelect = "none", w.className = "rte-modal-close", w.innerHTML = "&times;", w.onclick = () => p.style.display = "none", v.appendChild(y), v.appendChild(w);
669
+ const g = document.createElement("div");
670
+ g.className = "rte-modal-form";
671
+ const T = document.createElement("label");
672
+ T.className = "rte-label", T.textContent = "Video URL";
673
+ const A = document.createElement("input");
674
+ A.type = "url", A.className = "rte-input", A.placeholder = "https://... or YouTube URL";
675
+ const k = document.createElement("div");
676
+ k.className = "rte-preview-label", k.textContent = "Preview";
677
+ const _ = document.createElement("div");
678
+ _.className = "rte-modal-preview";
679
+ const I = document.createElement("div");
680
+ I.className = "rte-form-left";
681
+ const R = document.createElement("div");
682
+ R.className = "rte-form-right";
681
683
  const j = document.createElement("div");
682
- j.className = "rte-field", j.appendChild(_), j.appendChild(M);
683
- const F = document.createElement("div");
684
- F.className = "rte-dim-row";
684
+ j.className = "rte-field", j.appendChild(T), j.appendChild(A);
685
685
  const N = document.createElement("div");
686
- N.style.display = "flex", N.style.flexDirection = "column";
687
- const $ = document.createElement("label");
688
- $.className = "rte-label", $.textContent = "Width (px)";
686
+ N.className = "rte-dim-row";
687
+ const P = document.createElement("div");
688
+ P.style.display = "flex", P.style.flexDirection = "column";
689
+ const H = document.createElement("label");
690
+ H.className = "rte-label", H.textContent = "Width (px)";
689
691
  const L = document.createElement("input");
690
- L.type = "text", L.className = "rte-dim-input", L.placeholder = "e.g., 560", N.appendChild($), N.appendChild(L);
692
+ L.type = "text", L.className = "rte-dim-input", L.placeholder = "e.g., 560", P.appendChild(H), P.appendChild(L);
691
693
  const V = document.createElement("div");
692
694
  V.style.display = "flex", V.style.flexDirection = "column";
693
695
  const Z = document.createElement("label");
694
696
  Z.className = "rte-label", Z.textContent = "Height (px)";
695
697
  const ie = document.createElement("input");
696
- ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", V.appendChild(Z), V.appendChild(ie), F.appendChild(N), F.appendChild(V), P.appendChild(j), P.appendChild(F), A.appendChild(C), A.appendChild(T), y.appendChild(P), y.appendChild(A);
698
+ ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", V.appendChild(Z), V.appendChild(ie), N.appendChild(P), N.appendChild(V), I.appendChild(j), I.appendChild(N), R.appendChild(k), R.appendChild(_), g.appendChild(I), g.appendChild(R);
697
699
  const te = document.createElement("div");
698
700
  te.className = "rte-modal-actions";
699
701
  const x = document.createElement("div");
700
702
  x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-btn-muted", x.textContent = "Cancel", x.onclick = () => p.style.display = "none";
701
703
  const ne = document.createElement("div");
702
- ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", te.appendChild(x), te.appendChild(ne), u.appendChild(m), u.appendChild(y), u.appendChild(te), p.appendChild(u), document.body.appendChild(p);
704
+ ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", te.appendChild(x), te.appendChild(ne), u.appendChild(v), u.appendChild(g), u.appendChild(te), p.appendChild(u), document.body.appendChild(p);
703
705
  const W = document.createElement("div");
704
706
  W.setAttribute("role", "button"), W.tabIndex = 0, W.style.userSelect = "none";
705
707
  const le = ye(To, { width: 16, height: 16 });
706
708
  W.appendChild(le), W.title = "Insert Video", W.style.border = "1px solid #e1e1e1", W.style.backgroundColor = "#ffffff", W.style.padding = "6px 10px", W.style.borderRadius = "3px", W.style.cursor = "pointer", W.style.color = "#000000", W.onmouseover = () => W.style.backgroundColor = "#f0f0f0", W.onmouseout = () => W.style.backgroundColor = "#ffffff", W.onmousedown = () => de(), W.addEventListener("keydown", (Q) => {
707
709
  (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), W.click());
708
710
  }), W.onclick = () => {
709
- T.innerHTML = "<em>No URL entered</em>", M.value = "", p.style.display = "flex", M.focus();
711
+ _.innerHTML = "<em>No URL entered</em>", A.value = "", p.style.display = "flex", A.focus();
710
712
  };
711
713
  const ce = () => {
712
- const Q = M.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
714
+ const Q = A.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
713
715
  if (!Q) {
714
- T.innerHTML = "<em>No preview</em>";
716
+ _.innerHTML = "<em>No preview</em>";
715
717
  return;
716
718
  }
717
719
  const pe = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
718
720
  if (pe) {
719
- const E = pe[1], H = Number.isFinite(re) ? re : 320, q = Number.isFinite(se) ? se : 180;
720
- T.innerHTML = `<iframe width="${H}" height="${q}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
721
+ const E = pe[1], B = Number.isFinite(re) ? re : 320, Y = Number.isFinite(se) ? se : 180;
722
+ _.innerHTML = `<iframe width="${B}" height="${Y}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
721
723
  return;
722
724
  }
723
725
  const fe = Number.isFinite(re) ? `${re}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
724
- T.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${Q}"></video>`;
726
+ _.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${Q}"></video>`;
725
727
  };
726
- M.oninput = ce, typeof L < "u" && (L.oninput = ce), typeof ie < "u" && (ie.oninput = ce), ne.onclick = () => {
727
- const Q = M.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
728
+ A.oninput = ce, typeof L < "u" && (L.oninput = ce), typeof ie < "u" && (ie.oninput = ce), ne.onclick = () => {
729
+ const Q = A.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
728
730
  if (!Q) {
729
731
  p.style.display = "none";
730
732
  return;
731
733
  }
732
- Ae();
734
+ Re();
733
735
  const pe = window.getSelection();
734
736
  if (!pe || pe.rangeCount === 0) {
735
737
  p.style.display = "none";
@@ -738,31 +740,31 @@ function Bo(v) {
738
740
  const fe = pe.getRangeAt(0), he = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
739
741
  let E;
740
742
  if (he) {
741
- const q = he[1], G = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
742
- G.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${q}" frameborder="0" allowfullscreen></iframe>`, G.contentEditable = "false", G.className = "editor-video-wrapper", G.style.display = "block", G.style.maxWidth = "100%", G.style.width = "auto", G.style.height = "auto", G.style.boxSizing = "border-box", G.style.userSelect = "none", E = G;
743
+ const Y = he[1], G = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
744
+ G.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${Y}" frameborder="0" allowfullscreen></iframe>`, G.contentEditable = "false", G.className = "editor-video-wrapper", G.style.display = "block", G.style.maxWidth = "100%", G.style.width = "auto", G.style.height = "auto", G.style.boxSizing = "border-box", G.style.userSelect = "none", E = G;
743
745
  } else {
744
- const q = document.createElement("div"), G = document.createElement("video");
745
- G.controls = !0, G.src = Q, Number.isFinite(re) && (G.width = re), Number.isFinite(se) && (G.height = se), G.style.maxWidth = "100%", G.style.display = "block", q.appendChild(G), q.contentEditable = "false", q.className = "editor-video-wrapper", q.style.display = "block", q.style.maxWidth = "100%", q.style.width = "auto", q.style.height = "auto", q.style.boxSizing = "border-box", q.style.userSelect = "none", E = q;
746
+ const Y = document.createElement("div"), G = document.createElement("video");
747
+ G.controls = !0, G.src = Q, Number.isFinite(re) && (G.width = re), Number.isFinite(se) && (G.height = se), G.style.maxWidth = "100%", G.style.display = "block", Y.appendChild(G), Y.contentEditable = "false", Y.className = "editor-video-wrapper", Y.style.display = "block", Y.style.maxWidth = "100%", Y.style.width = "auto", Y.style.height = "auto", Y.style.boxSizing = "border-box", Y.style.userSelect = "none", E = Y;
746
748
  }
747
749
  fe.insertNode(E), pe.removeAllRanges();
748
- const H = document.createRange();
749
- H.setStartAfter(E), H.collapse(!0), pe.addRange(H), de(H);
750
+ const B = document.createRange();
751
+ B.setStartAfter(E), B.collapse(!0), pe.addRange(B), de(B);
750
752
  try {
751
- const q = J;
752
- q && typeof q.focus == "function" && (q.focus(), q.dispatchEvent(new Event("input", { bubbles: !0 })));
753
+ const Y = J;
754
+ Y && typeof Y.focus == "function" && (Y.focus(), Y.dispatchEvent(new Event("input", { bubbles: !0 })));
753
755
  } catch {
754
756
  }
755
- p.style.display = "none", M.value = "", T.innerHTML = "";
757
+ p.style.display = "none", A.value = "", _.innerHTML = "";
756
758
  };
757
- const J = v.querySelector(".editor");
759
+ const J = h.querySelector(".editor");
758
760
  return J && J.addEventListener("click", (Q) => {
759
761
  const X = Q.target;
760
762
  X && X.tagName === "VIDEO" && X.focus();
761
- }), h.appendChild(W), h;
763
+ }), m.appendChild(W), m;
762
764
  }
763
- function Wo(v) {
764
- const h = document.createElement("div");
765
- h.style.display = "flex", h.style.flexWrap = "wrap", h.style.gap = "8px", h.style.marginBottom = "10px", h.style.padding = "12px", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.borderRadius = "4px", h.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
765
+ function qo(h) {
766
+ const m = document.createElement("div");
767
+ m.style.display = "flex", m.style.flexWrap = "wrap", m.style.gap = "8px", m.style.marginBottom = "10px", m.style.padding = "12px", m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.borderRadius = "4px", m.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
766
768
  const p = to();
767
769
  p.innerHTML = `
768
770
  <option value="Arial">Arial</option>
@@ -770,7 +772,7 @@ function Wo(v) {
770
772
  <option value="Courier New">Courier New</option>
771
773
  <option value="Georgia">Georgia</option>
772
774
  <option value="Verdana">Verdana</option>
773
- `, p.style.border = "1px solid #e1e1e1", p.style.backgroundColor = "#ffffff", p.style.padding = "4px", p.style.borderRadius = "3px", p.style.color = "#000000", p.onchange = () => document.execCommand("fontName", !1, p.value), h.appendChild(p);
775
+ `, p.style.border = "1px solid #e1e1e1", p.style.backgroundColor = "#ffffff", p.style.padding = "4px", p.style.borderRadius = "3px", p.style.color = "#000000", p.onchange = () => document.execCommand("fontName", !1, p.value), m.appendChild(p);
774
776
  const u = ro();
775
777
  u.title = "Heading", u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "4px", u.style.borderRadius = "3px", u.style.color = "#000000", u.innerHTML = `
776
778
  <option value="p">Normal</option>
@@ -779,18 +781,18 @@ function Wo(v) {
779
781
  <option value="h3">Heading 3</option>
780
782
  <option value="h4">Heading 4</option>
781
783
  `, u.onchange = () => {
782
- const $ = u.value, L = $ === "p" ? "P" : $.toUpperCase();
784
+ const H = u.value, L = H === "p" ? "P" : H.toUpperCase();
783
785
  document.execCommand("formatBlock", !1, `<${L}>`);
784
- }, h.appendChild(u), document.addEventListener("selectionchange", () => {
786
+ }, m.appendChild(u), document.addEventListener("selectionchange", () => {
785
787
  try {
786
- const $ = window.getSelection();
787
- if (!$ || !$.anchorNode) return;
788
- let L = $.anchorNode;
788
+ const H = window.getSelection();
789
+ if (!H || !H.anchorNode) return;
790
+ let L = H.anchorNode;
789
791
  for (; L && L.nodeType !== Node.ELEMENT_NODE; )
790
792
  L = L.parentNode;
791
793
  if (!L) return;
792
794
  let V = L;
793
- for (; V && V !== document.body && V !== h.parentElement; ) {
795
+ for (; V && V !== document.body && V !== m.parentElement; ) {
794
796
  const Z = V.tagName?.toUpperCase?.();
795
797
  if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
796
798
  u.value = Z === "P" ? "p" : Z.toLowerCase();
@@ -802,8 +804,8 @@ function Wo(v) {
802
804
  } catch {
803
805
  }
804
806
  });
805
- const m = no();
806
- m.innerHTML = `
807
+ const v = no();
808
+ v.innerHTML = `
807
809
  <option value="1">8pt</option>
808
810
  <option value="2">10pt</option>
809
811
  <option value="3" selected>12pt</option>
@@ -811,40 +813,40 @@ function Wo(v) {
811
813
  <option value="5">18pt</option>
812
814
  <option value="6">24pt</option>
813
815
  <option value="7">36pt</option>
814
- `, m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.padding = "4px", m.style.borderRadius = "3px", m.style.color = "#000000", m.onchange = () => document.execCommand("fontSize", !1, m.value), h.appendChild(m);
815
- const g = Ro();
816
- h.appendChild(g);
817
- const w = Ao();
818
- h.appendChild(w);
819
- const y = Io();
820
- h.appendChild(y);
821
- const _ = Oo();
822
- h.appendChild(_);
823
- const M = Do();
824
- h.appendChild(M);
825
- const C = No();
826
- h.appendChild(C);
827
- const T = zo();
828
- h.appendChild(T);
829
- const P = Fo(v);
830
- h.appendChild(P);
831
- const A = jo();
832
- h.appendChild(A);
816
+ `, v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "4px", v.style.borderRadius = "3px", v.style.color = "#000000", v.onchange = () => document.execCommand("fontSize", !1, v.value), m.appendChild(v);
817
+ const y = Mo();
818
+ m.appendChild(y);
819
+ const w = Ro();
820
+ m.appendChild(w);
821
+ const g = Io();
822
+ m.appendChild(g);
823
+ const T = Oo();
824
+ m.appendChild(T);
825
+ const A = Do();
826
+ m.appendChild(A);
827
+ const k = No();
828
+ m.appendChild(k);
829
+ const _ = Lo();
830
+ m.appendChild(_);
831
+ const I = Fo(h);
832
+ m.appendChild(I);
833
+ const R = jo();
834
+ m.appendChild(R);
833
835
  const j = Ho();
834
- h.appendChild(j);
835
- const F = Bo(v);
836
- h.appendChild(F);
837
- const N = Lo();
838
- return h.appendChild(N), h;
836
+ m.appendChild(j);
837
+ const N = Bo(h);
838
+ m.appendChild(N);
839
+ const P = zo();
840
+ return m.appendChild(P), m;
839
841
  }
840
- function qo(v) {
841
- return v && v.__esModule && Object.prototype.hasOwnProperty.call(v, "default") ? v.default : v;
842
+ function Wo(h) {
843
+ return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
842
844
  }
843
845
  var Je = { exports: {} }, Yo = Je.exports, Pn;
844
846
  function $o() {
845
- return Pn || (Pn = 1, (function(v, h) {
847
+ return Pn || (Pn = 1, (function(h, m) {
846
848
  (function(p, u) {
847
- v.exports = u();
849
+ h.exports = u();
848
850
  })(Yo, (function() {
849
851
  function p(t, e) {
850
852
  var n = Object.keys(t);
@@ -860,54 +862,54 @@ function $o() {
860
862
  for (var e = 1; e < arguments.length; e++) {
861
863
  var n = arguments[e] != null ? arguments[e] : {};
862
864
  e % 2 ? p(Object(n), !0).forEach((function(r) {
863
- _(t, r, n[r]);
865
+ T(t, r, n[r]);
864
866
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach((function(r) {
865
867
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
866
868
  }));
867
869
  }
868
870
  return t;
869
871
  }
870
- function m(t) {
871
- return m = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
872
+ function v(t) {
873
+ return v = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
872
874
  return typeof e;
873
875
  } : function(e) {
874
876
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
875
- }, m(t);
877
+ }, v(t);
876
878
  }
877
- function g(t, e) {
879
+ function y(t, e) {
878
880
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
879
881
  }
880
882
  function w(t, e) {
881
883
  for (var n = 0; n < e.length; n++) {
882
884
  var r = e[n];
883
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, F(r.key), r);
885
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, N(r.key), r);
884
886
  }
885
887
  }
886
- function y(t, e, n) {
888
+ function g(t, e, n) {
887
889
  return e && w(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
888
890
  }
889
- function _(t, e, n) {
890
- return (e = F(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
891
+ function T(t, e, n) {
892
+ return (e = N(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
891
893
  }
892
- function M(t, e) {
894
+ function A(t, e) {
893
895
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
894
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && T(t, e);
896
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _(t, e);
895
897
  }
896
- function C(t) {
897
- return C = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
898
+ function k(t) {
899
+ return k = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
898
900
  return e.__proto__ || Object.getPrototypeOf(e);
899
- }, C(t);
901
+ }, k(t);
900
902
  }
901
- function T(t, e) {
902
- return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
903
+ function _(t, e) {
904
+ return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
903
905
  return n.__proto__ = r, n;
904
- }, T(t, e);
906
+ }, _(t, e);
905
907
  }
906
- function P(t) {
908
+ function I(t) {
907
909
  if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
908
910
  return t;
909
911
  }
910
- function A(t) {
912
+ function R(t) {
911
913
  var e = (function() {
912
914
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
913
915
  if (typeof Proxy == "function") return !0;
@@ -919,22 +921,22 @@ function $o() {
919
921
  }
920
922
  })();
921
923
  return function() {
922
- var n, r = C(t);
924
+ var n, r = k(t);
923
925
  if (e) {
924
- var o = C(this).constructor;
926
+ var o = k(this).constructor;
925
927
  n = Reflect.construct(r, arguments, o);
926
928
  } else n = r.apply(this, arguments);
927
929
  return (function(i, a) {
928
930
  if (a && (typeof a == "object" || typeof a == "function")) return a;
929
931
  if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
930
- return P(i);
932
+ return I(i);
931
933
  })(this, n);
932
934
  };
933
935
  }
934
936
  function j() {
935
937
  return j = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
936
938
  var r = (function(i, a) {
937
- for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = C(i)) !== null; ) ;
939
+ for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = k(i)) !== null; ) ;
938
940
  return i;
939
941
  })(t, e);
940
942
  if (r) {
@@ -943,7 +945,7 @@ function $o() {
943
945
  }
944
946
  }, j.apply(this, arguments);
945
947
  }
946
- function F(t) {
948
+ function N(t) {
947
949
  var e = (function(n, r) {
948
950
  if (typeof n != "object" || n === null) return n;
949
951
  var o = n[Symbol.toPrimitive];
@@ -956,24 +958,24 @@ function $o() {
956
958
  })(t, "string");
957
959
  return typeof e == "symbol" ? e : e + "";
958
960
  }
959
- var N = function(t) {
961
+ var P = function(t) {
960
962
  return !(!t || !t.Window) && t instanceof t.Window;
961
- }, $ = void 0, L = void 0;
963
+ }, H = void 0, L = void 0;
962
964
  function V(t) {
963
- $ = t;
965
+ H = t;
964
966
  var e = t.document.createTextNode("");
965
967
  e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), L = t;
966
968
  }
967
969
  function Z(t) {
968
- return N(t) ? t : (t.ownerDocument || t).defaultView || L.window;
970
+ return P(t) ? t : (t.ownerDocument || t).defaultView || L.window;
969
971
  }
970
972
  typeof window < "u" && window && V(window);
971
973
  var ie = function(t) {
972
- return !!t && m(t) === "object";
974
+ return !!t && v(t) === "object";
973
975
  }, te = function(t) {
974
976
  return typeof t == "function";
975
977
  }, x = { window: function(t) {
976
- return t === L || N(t);
978
+ return t === L || P(t);
977
979
  }, docFrag: function(t) {
978
980
  return ie(t) && t.nodeType === 11;
979
981
  }, object: ie, func: te, number: function(t) {
@@ -983,9 +985,9 @@ function $o() {
983
985
  }, string: function(t) {
984
986
  return typeof t == "string";
985
987
  }, element: function(t) {
986
- if (!t || m(t) !== "object") return !1;
988
+ if (!t || v(t) !== "object") return !1;
987
989
  var e = Z(t) || L;
988
- return /object|function/.test(typeof Element > "u" ? "undefined" : m(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
990
+ return /object|function/.test(typeof Element > "u" ? "undefined" : v(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
989
991
  }, plainObject: function(t) {
990
992
  return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
991
993
  }, array: function(t) {
@@ -1054,16 +1056,16 @@ function $o() {
1054
1056
  return e;
1055
1057
  }
1056
1058
  function he(t, e) {
1057
- return L !== $ && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1059
+ return L !== H && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1058
1060
  }
1059
1061
  var E = function(t) {
1060
1062
  return t.parentNode || t.host;
1061
1063
  };
1062
- function H(t, e) {
1064
+ function B(t, e) {
1063
1065
  for (var n, r = [], o = t; (n = E(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1064
1066
  return r;
1065
1067
  }
1066
- function q(t, e, n) {
1068
+ function Y(t, e, n) {
1067
1069
  for (; x.element(t); ) {
1068
1070
  if (he(t, e)) return !0;
1069
1071
  if ((t = fe(t)) === n) return he(t, e);
@@ -1092,14 +1094,14 @@ function $o() {
1092
1094
  function Ee(t) {
1093
1095
  return !!x.string(t) && (X.document.querySelector(t), !0);
1094
1096
  }
1095
- function D(t, e) {
1097
+ function z(t, e) {
1096
1098
  for (var n in e) t[n] = e[n];
1097
1099
  return t;
1098
1100
  }
1099
1101
  function et(t, e, n) {
1100
1102
  return t === "parent" ? fe(n) : t === "self" ? e.getRect(n) : pe(n, t);
1101
1103
  }
1102
- function ze(t, e, n, r) {
1104
+ function Le(t, e, n, r) {
1103
1105
  var o = t;
1104
1106
  return x.string(o) ? o = et(o, e, n) : x.func(o) && (o = o.apply(void 0, r)), x.element(o) && (o = we(o)), o;
1105
1107
  }
@@ -1107,14 +1109,14 @@ function $o() {
1107
1109
  return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
1108
1110
  }
1109
1111
  function gt(t) {
1110
- return !t || "x" in t && "y" in t || ((t = D({}, 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;
1112
+ return !t || "x" in t && "y" in t || ((t = z({}, 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;
1111
1113
  }
1112
1114
  function nt(t, e, n) {
1113
1115
  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;
1114
1116
  }
1115
- function Le(t, e, n) {
1117
+ function ze(t, e, n) {
1116
1118
  var r = n && t.options[n];
1117
- return tt(ze(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1119
+ return tt(Le(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1118
1120
  }
1119
1121
  function Ie(t, e) {
1120
1122
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
@@ -1158,17 +1160,17 @@ function $o() {
1158
1160
  function ot(t, e) {
1159
1161
  t.page = t.page || {}, t.page.x = e.page.x, t.page.y = e.page.y, t.client = t.client || {}, t.client.x = e.client.x, t.client.y = e.client.y, t.timeStamp = e.timeStamp;
1160
1162
  }
1161
- function Wt(t) {
1163
+ function qt(t) {
1162
1164
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1163
1165
  }
1164
- function qt(t) {
1166
+ function Wt(t) {
1165
1167
  return t instanceof X.Event || t instanceof X.Touch;
1166
1168
  }
1167
1169
  function it(t, e, n) {
1168
1170
  return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
1169
1171
  }
1170
1172
  function Yt(t, e) {
1171
- return e = e || { x: 0, y: 0 }, re.isOperaMobile && qt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1173
+ return e = e || { x: 0, y: 0 }, re.isOperaMobile && Wt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1172
1174
  }
1173
1175
  function je(t) {
1174
1176
  return x.number(t.pointerId) ? t.pointerId : t.identifier;
@@ -1176,7 +1178,7 @@ function $o() {
1176
1178
  function Hn(t, e, n) {
1177
1179
  var r = e.length > 1 ? $t(e) : e[0];
1178
1180
  Yt(r, t.page), (function(o, i) {
1179
- i = i || {}, re.isOperaMobile && qt(o) ? it("screen", o, i) : it("client", o, i);
1181
+ i = i || {}, re.isOperaMobile && Wt(o) ? it("screen", o, i) : it("client", o, i);
1180
1182
  })(r, t.client), t.timeStamp = n;
1181
1183
  }
1182
1184
  function yt(t) {
@@ -1213,9 +1215,9 @@ function $o() {
1213
1215
  }
1214
1216
  var at = (function() {
1215
1217
  function t(e) {
1216
- g(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
1218
+ y(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
1217
1219
  }
1218
- return y(t, [{ key: "preventDefault", value: function() {
1220
+ return g(t, [{ key: "preventDefault", value: function() {
1219
1221
  } }, { key: "stopPropagation", value: function() {
1220
1222
  this.propagationStopped = !0;
1221
1223
  } }, { key: "stopImmediatePropagation", value: function() {
@@ -1240,15 +1242,15 @@ function $o() {
1240
1242
  }, Be = function(t, e) {
1241
1243
  return t[He(t, e)];
1242
1244
  }, De = (function(t) {
1243
- M(n, t);
1244
- var e = A(n);
1245
+ A(n, t);
1246
+ var e = R(n);
1245
1247
  function n(r, o, i) {
1246
1248
  var a;
1247
- g(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;
1249
+ y(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;
1248
1250
  var s = i === "dragleave" ? r.prev : r.cur, l = s.element, d = s.dropzone;
1249
1251
  return a.type = i, a.target = l, a.currentTarget = l, a.dropzone = d, a.dragEvent = o, a.relatedTarget = o.target, a.draggable = o.interactable, a.timeStamp = o.timeStamp, a;
1250
1252
  }
1251
- return y(n, [{ key: "reject", value: function() {
1253
+ return g(n, [{ key: "reject", value: function() {
1252
1254
  var r = this, o = this._interaction.dropState;
1253
1255
  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") {
1254
1256
  var i = o.activeDrops, a = He(i, (function(l) {
@@ -1279,8 +1281,8 @@ function $o() {
1279
1281
  if (c.options.drop.enabled) {
1280
1282
  var f = c.options.drop.accept;
1281
1283
  if (!(x.element(f) && f !== a || x.string(f) && !he(a, f) || x.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var b = 0, S = c.getAllElements(); b < S.length; b++) {
1282
- var k = S[b];
1283
- k !== a && s.push({ dropzone: c, element: k, rect: c.getRect(k) });
1284
+ var C = S[b];
1285
+ C !== a && s.push({ dropzone: c, element: C, rect: c.getRect(C) });
1284
1286
  }
1285
1287
  }
1286
1288
  }
@@ -1296,35 +1298,35 @@ function $o() {
1296
1298
  var d = l[s], c = d.dropzone, f = d.element, b = d.rect, S = c.dropCheck(e, n, o, i, f, b);
1297
1299
  a.push(S ? f : null);
1298
1300
  }
1299
- var k = (function(R) {
1300
- for (var O, I, z, U = [], ee = 0; ee < R.length; ee++) {
1301
- var B = R[ee], K = R[O];
1302
- if (B && ee !== O) if (K) {
1303
- var me = E(B), ae = E(K);
1304
- if (me !== B.ownerDocument) if (ae !== B.ownerDocument) if (me !== ae) {
1305
- U = U.length ? U : H(K);
1301
+ var C = (function(M) {
1302
+ for (var D, O, F, U = [], ee = 0; ee < M.length; ee++) {
1303
+ var q = M[ee], K = M[D];
1304
+ if (q && ee !== D) if (K) {
1305
+ var ve = E(q), ae = E(K);
1306
+ if (ve !== q.ownerDocument) if (ae !== q.ownerDocument) if (ve !== ae) {
1307
+ U = U.length ? U : B(K);
1306
1308
  var ge = void 0;
1307
- if (K instanceof X.HTMLElement && B instanceof X.SVGElement && !(B instanceof X.SVGSVGElement)) {
1308
- if (B === ae) continue;
1309
- ge = B.ownerSVGElement;
1310
- } else ge = B;
1311
- for (var be = H(ge, K.ownerDocument), Se = 0; be[Se] && be[Se] === U[Se]; ) Se++;
1312
- var vt = [be[Se - 1], be[Se], U[Se]];
1313
- if (vt[0]) for (var Ue = vt[0].lastChild; Ue; ) {
1314
- if (Ue === vt[1]) {
1315
- O = ee, U = be;
1309
+ if (K instanceof X.HTMLElement && q instanceof X.SVGElement && !(q instanceof X.SVGSVGElement)) {
1310
+ if (q === ae) continue;
1311
+ ge = q.ownerSVGElement;
1312
+ } else ge = q;
1313
+ for (var be = B(ge, K.ownerDocument), Se = 0; be[Se] && be[Se] === U[Se]; ) Se++;
1314
+ var mt = [be[Se - 1], be[Se], U[Se]];
1315
+ if (mt[0]) for (var Ue = mt[0].lastChild; Ue; ) {
1316
+ if (Ue === mt[1]) {
1317
+ D = ee, U = be;
1316
1318
  break;
1317
1319
  }
1318
- if (Ue === vt[2]) break;
1320
+ if (Ue === mt[2]) break;
1319
1321
  Ue = Ue.previousSibling;
1320
1322
  }
1321
- } else z = K, (parseInt(Z(I = B).getComputedStyle(I).zIndex, 10) || 0) >= (parseInt(Z(z).getComputedStyle(z).zIndex, 10) || 0) && (O = ee);
1322
- else O = ee;
1323
- } else O = ee;
1323
+ } else F = K, (parseInt(Z(O = q).getComputedStyle(O).zIndex, 10) || 0) >= (parseInt(Z(F).getComputedStyle(F).zIndex, 10) || 0) && (D = ee);
1324
+ else D = ee;
1325
+ } else D = ee;
1324
1326
  }
1325
- return O;
1327
+ return D;
1326
1328
  })(a);
1327
- return r.activeDrops[k] || null;
1329
+ return r.activeDrops[C] || null;
1328
1330
  }
1329
1331
  function kt(t, e, n) {
1330
1332
  var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
@@ -1359,26 +1361,26 @@ function $o() {
1359
1361
  return x.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1360
1362
  })(this, i);
1361
1363
  }, r.prototype.dropCheck = function(i, a, s, l, d, c) {
1362
- return (function(f, b, S, k, R, O, I) {
1363
- var z = !1;
1364
- if (!(I = I || f.getRect(O))) return !!f.options.drop.checker && f.options.drop.checker(b, S, z, f, O, k, R);
1364
+ return (function(f, b, S, C, M, D, O) {
1365
+ var F = !1;
1366
+ if (!(O = O || f.getRect(D))) return !!f.options.drop.checker && f.options.drop.checker(b, S, F, f, D, C, M);
1365
1367
  var U = f.options.drop.overlap;
1366
1368
  if (U === "pointer") {
1367
- var ee = Le(k, R, "drag"), B = Yt(b);
1368
- B.x += ee.x, B.y += ee.y;
1369
- var K = B.x > I.left && B.x < I.right, me = B.y > I.top && B.y < I.bottom;
1370
- z = K && me;
1369
+ var ee = ze(C, M, "drag"), q = Yt(b);
1370
+ q.x += ee.x, q.y += ee.y;
1371
+ var K = q.x > O.left && q.x < O.right, ve = q.y > O.top && q.y < O.bottom;
1372
+ F = K && ve;
1371
1373
  }
1372
- var ae = k.getRect(R);
1374
+ var ae = C.getRect(M);
1373
1375
  if (ae && U === "center") {
1374
1376
  var ge = ae.left + ae.width / 2, be = ae.top + ae.height / 2;
1375
- z = ge >= I.left && ge <= I.right && be >= I.top && be <= I.bottom;
1377
+ F = ge >= O.left && ge <= O.right && be >= O.top && be <= O.bottom;
1376
1378
  }
1377
- return ae && x.number(U) && (z = Math.max(0, Math.min(I.right, ae.right) - Math.max(I.left, ae.left)) * Math.max(0, Math.min(I.bottom, ae.bottom) - Math.max(I.top, ae.top)) / (ae.width * ae.height) >= U), f.options.drop.checker && (z = f.options.drop.checker(b, S, z, f, O, k, R)), z;
1379
+ return ae && x.number(U) && (F = Math.max(0, Math.min(O.right, ae.right) - Math.max(O.left, ae.left)) * Math.max(0, Math.min(O.bottom, ae.bottom) - Math.max(O.top, ae.top)) / (ae.width * ae.height) >= U), f.options.drop.checker && (F = f.options.drop.checker(b, S, F, f, D, C, M)), F;
1378
1380
  })(this, i, a, s, l, d, c);
1379
1381
  }, n.dynamicDrop = function(i) {
1380
1382
  return x.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1381
- }, D(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Zt.defaults;
1383
+ }, z(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Zt.defaults;
1382
1384
  }, listeners: { "interactions:before-action-start": function(t) {
1383
1385
  var e = t.interaction;
1384
1386
  e.prepared.name === "drag" && (e.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
@@ -1438,8 +1440,8 @@ function $o() {
1438
1440
  return "";
1439
1441
  }, filterEventType: function(t) {
1440
1442
  return t.search("gesture") === 0;
1441
- } }, Wn = Tt;
1442
- function qn(t, e, n, r, o, i, a) {
1443
+ } }, qn = Tt;
1444
+ function Wn(t, e, n, r, o, i, a) {
1443
1445
  if (!e) return !1;
1444
1446
  if (e === !0) {
1445
1447
  var s = x.number(i.width) ? i.width : i.right - i.left, l = x.number(i.height) ? i.height : i.bottom - i.top;
@@ -1454,7 +1456,7 @@ function $o() {
1454
1456
  if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
1455
1457
  if (t === "bottom") return n.y > (l >= 0 ? i.bottom : i.top) - a;
1456
1458
  }
1457
- return !!x.element(r) && (x.element(e) ? e === r : q(r, e, o));
1459
+ return !!x.element(r) && (x.element(e) ? e === r : Y(r, e, o));
1458
1460
  }
1459
1461
  function en(t) {
1460
1462
  var e = t.iEvent, n = t.interaction;
@@ -1479,7 +1481,7 @@ function $o() {
1479
1481
  var n = e.iEvent, r = e.interaction;
1480
1482
  if (r.prepared.name === "resize" && r.prepared.edges) {
1481
1483
  var o = n, i = r.rect;
1482
- r._rects = { start: D({}, i), corrected: D({}, i), previous: D({}, i), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, o.edges = r.prepared.edges, o.rect = r._rects.corrected, o.deltaRect = r._rects.delta;
1484
+ r._rects = { start: z({}, i), corrected: z({}, i), previous: z({}, i), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, o.edges = r.prepared.edges, o.rect = r._rects.corrected, o.deltaRect = r._rects.delta;
1483
1485
  }
1484
1486
  })(t), en(t);
1485
1487
  }, "interactions:action-move": function(t) {
@@ -1487,19 +1489,19 @@ function $o() {
1487
1489
  var n = e.iEvent, r = e.interaction;
1488
1490
  if (r.prepared.name === "resize" && r.prepared.edges) {
1489
1491
  var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, l = r._rects, d = l.start, c = l.corrected, f = l.delta, b = l.previous;
1490
- if (D(b, c), a) {
1491
- if (D(c, s), i === "reposition") {
1492
+ if (z(b, c), a) {
1493
+ if (z(c, s), i === "reposition") {
1492
1494
  if (c.top > c.bottom) {
1493
1495
  var S = c.top;
1494
1496
  c.top = c.bottom, c.bottom = S;
1495
1497
  }
1496
1498
  if (c.left > c.right) {
1497
- var k = c.left;
1498
- c.left = c.right, c.right = k;
1499
+ var C = c.left;
1500
+ c.left = c.right, c.right = C;
1499
1501
  }
1500
1502
  }
1501
1503
  } else c.top = Math.min(s.top, d.bottom), c.bottom = Math.max(s.bottom, d.top), c.left = Math.min(s.left, d.right), c.right = Math.max(s.right, d.left);
1502
- for (var R in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[R] = c[R] - b[R];
1504
+ for (var M in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[M] = c[M] - b[M];
1503
1505
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1504
1506
  }
1505
1507
  })(t), en(t);
@@ -1512,11 +1514,11 @@ function $o() {
1512
1514
  }, "auto-start:check": function(t) {
1513
1515
  var e = t.interaction, n = t.interactable, r = t.element, o = t.rect, i = t.buttons;
1514
1516
  if (o) {
1515
- var a = D({}, e.coords.cur.page), s = n.options.resize;
1517
+ var a = z({}, e.coords.cur.page), s = n.options.resize;
1516
1518
  if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (i & s.mouseButtons) != 0)) {
1517
1519
  if (x.object(s.edges)) {
1518
1520
  var l = { left: !1, right: !1, top: !1, bottom: !1 };
1519
- for (var d in l) l[d] = qn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1521
+ for (var d in l) l[d] = Wn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1520
1522
  l.left = l.left && !l.right, l.top = l.top && !l.bottom, (l.left || l.right || l.top || l.bottom) && (t.action = { name: "resize", edges: l });
1521
1523
  } else {
1522
1524
  var c = s.axis !== "y" && a.x > o.right - Ce.defaultMargin, f = s.axis !== "x" && a.y > o.bottom - Ce.defaultMargin;
@@ -1539,7 +1541,7 @@ function $o() {
1539
1541
  }, filterEventType: function(t) {
1540
1542
  return t.search("resize") === 0;
1541
1543
  }, defaultMargin: null }, Yn = Ce, $n = { id: "actions", install: function(t) {
1542
- t.usePlugin(Wn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1544
+ t.usePlugin(qn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1543
1545
  } }, tn = 0, Te = { request: function(t) {
1544
1546
  return ke(t);
1545
1547
  }, cancel: function(t) {
@@ -1557,37 +1559,37 @@ function $o() {
1557
1559
  }, Pe = function(o) {
1558
1560
  return clearTimeout(o);
1559
1561
  });
1560
- } }, Y = { 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) {
1561
- Y.isScrolling = !0, Te.cancel(Y.i), t.autoScroll = Y, Y.interaction = t, Y.prevTime = Y.now(), Y.i = Te.request(Y.scroll);
1562
+ } }, $ = { 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) {
1563
+ $.isScrolling = !0, Te.cancel($.i), t.autoScroll = $, $.interaction = t, $.prevTime = $.now(), $.i = Te.request($.scroll);
1562
1564
  }, stop: function() {
1563
- Y.isScrolling = !1, Y.interaction && (Y.interaction.autoScroll = null), Te.cancel(Y.i);
1565
+ $.isScrolling = !1, $.interaction && ($.interaction.autoScroll = null), Te.cancel($.i);
1564
1566
  }, scroll: function() {
1565
- var t = Y.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = Y.now(), s = (a - Y.prevTime) / 1e3, l = o.speed * s;
1567
+ var t = $.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = $.now(), s = (a - $.prevTime) / 1e3, l = o.speed * s;
1566
1568
  if (l >= 1) {
1567
- var d = { x: Y.x * l, y: Y.y * l };
1569
+ var d = { x: $.x * l, y: $.y * l };
1568
1570
  if (d.x || d.y) {
1569
1571
  var c = rn(i);
1570
1572
  x.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1571
1573
  var f = rn(i), b = { x: f.x - c.x, y: f.y - c.y };
1572
1574
  (b.x || b.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: b, interaction: t, container: i });
1573
1575
  }
1574
- Y.prevTime = a;
1576
+ $.prevTime = a;
1575
1577
  }
1576
- Y.isScrolling && (Te.cancel(Y.i), Y.i = Te.request(Y.scroll));
1578
+ $.isScrolling && (Te.cancel($.i), $.i = Te.request($.scroll));
1577
1579
  }, check: function(t, e) {
1578
1580
  var n;
1579
1581
  return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
1580
1582
  }, onInteractionMove: function(t) {
1581
1583
  var e = t.interaction, n = t.pointer;
1582
- if (e.interacting() && Y.check(e.interactable, e.prepared.name)) if (e.simulation) Y.x = Y.y = 0;
1584
+ if (e.interacting() && $.check(e.interactable, e.prepared.name)) if (e.simulation) $.x = $.y = 0;
1583
1585
  else {
1584
1586
  var r, o, i, a, s = e.interactable, l = e.element, d = e.prepared.name, c = s.options[d].autoScroll, f = nn(c.container, s, l);
1585
- if (x.window(f)) a = n.clientX < Y.margin, r = n.clientY < Y.margin, o = n.clientX > f.innerWidth - Y.margin, i = n.clientY > f.innerHeight - Y.margin;
1587
+ if (x.window(f)) a = n.clientX < $.margin, r = n.clientY < $.margin, o = n.clientX > f.innerWidth - $.margin, i = n.clientY > f.innerHeight - $.margin;
1586
1588
  else {
1587
1589
  var b = xe(f);
1588
- a = n.clientX < b.left + Y.margin, r = n.clientY < b.top + Y.margin, o = n.clientX > b.right - Y.margin, i = n.clientY > b.bottom - Y.margin;
1590
+ a = n.clientX < b.left + $.margin, r = n.clientY < b.top + $.margin, o = n.clientX > b.right - $.margin, i = n.clientY > b.bottom - $.margin;
1589
1591
  }
1590
- Y.x = o ? 1 : a ? -1 : 0, Y.y = i ? 1 : r ? -1 : 0, Y.isScrolling || (Y.margin = c.margin, Y.speed = c.speed, Y.start(e));
1592
+ $.x = o ? 1 : a ? -1 : 0, $.y = i ? 1 : r ? -1 : 0, $.isScrolling || ($.margin = c.margin, $.speed = c.speed, $.start(e));
1591
1593
  }
1592
1594
  } };
1593
1595
  function nn(t, e, n) {
@@ -1598,17 +1600,17 @@ function $o() {
1598
1600
  }
1599
1601
  var Vn = { id: "auto-scroll", install: function(t) {
1600
1602
  var e = t.defaults, n = t.actions;
1601
- t.autoScroll = Y, Y.now = function() {
1603
+ t.autoScroll = $, $.now = function() {
1602
1604
  return t.now();
1603
- }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = Y.defaults;
1605
+ }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = $.defaults;
1604
1606
  }, listeners: { "interactions:new": function(t) {
1605
1607
  t.interaction.autoScroll = null;
1606
1608
  }, "interactions:destroy": function(t) {
1607
- t.interaction.autoScroll = null, Y.stop(), Y.interaction && (Y.interaction = null);
1608
- }, "interactions:stop": Y.stop, "interactions:action-move": function(t) {
1609
- return Y.onInteractionMove(t);
1609
+ t.interaction.autoScroll = null, $.stop(), $.interaction && ($.interaction = null);
1610
+ }, "interactions:stop": $.stop, "interactions:action-move": function(t) {
1611
+ return $.onInteractionMove(t);
1610
1612
  } } }, Un = Vn;
1611
- function We(t, e) {
1613
+ function qe(t, e) {
1612
1614
  var n = !1;
1613
1615
  return function() {
1614
1616
  return n || (L.console.warn(e), n = !0), t.apply(this, arguments);
@@ -1627,13 +1629,13 @@ function $o() {
1627
1629
  var e = t.Interactable;
1628
1630
  e.prototype.getAction = function(n, r, o, i) {
1629
1631
  var a = (function(s, l, d, c, f) {
1630
- var b = s.getRect(c), S = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], k = { action: null, interactable: s, interaction: d, element: c, rect: b, buttons: S };
1631
- return f.fire("auto-start:check", k), k.action;
1632
+ var b = s.getRect(c), S = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], C = { action: null, interactable: s, interaction: d, element: c, rect: b, buttons: S };
1633
+ return f.fire("auto-start:check", C), C.action;
1632
1634
  })(this, r, o, i, t);
1633
1635
  return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, i, o) : a;
1634
- }, e.prototype.ignoreFrom = We((function(n) {
1636
+ }, e.prototype.ignoreFrom = qe((function(n) {
1635
1637
  return this._backCompatOption("ignoreFrom", n);
1636
- }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = We((function(n) {
1638
+ }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = qe((function(n) {
1637
1639
  return this._backCompatOption("allowFrom", n);
1638
1640
  }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = Gn, e.prototype.styleCursor = Xn;
1639
1641
  } };
@@ -1671,8 +1673,8 @@ function $o() {
1671
1673
  var o = t.options, i = o[n.name].max, a = o[n.name].maxPerElement, s = r.autoStart.maxInteractions, l = 0, d = 0, c = 0;
1672
1674
  if (!(i && a && s)) return !1;
1673
1675
  for (var f = 0, b = r.interactions.list; f < b.length; f++) {
1674
- var S = b[f], k = S.prepared.name;
1675
- if (S.interacting() && (++l >= s || S.interactable === t && ((d += k === n.name ? 1 : 0) >= i || S.element === e && (c++, k === n.name && c >= a))))
1676
+ var S = b[f], C = S.prepared.name;
1677
+ if (S.interacting() && (++l >= s || S.interactable === t && ((d += C === n.name ? 1 : 0) >= i || S.element === e && (c++, C === n.name && c >= a))))
1676
1678
  return !1;
1677
1679
  }
1678
1680
  return s > 0;
@@ -1680,7 +1682,7 @@ function $o() {
1680
1682
  function ln(t, e) {
1681
1683
  return x.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1682
1684
  }
1683
- function Mt(t, e, n) {
1685
+ function At(t, e, n) {
1684
1686
  var r = n.autoStart.cursorElement;
1685
1687
  r && r !== t && (r.style.cursor = ""), t.ownerDocument.documentElement.style.cursor = e, t.style.cursor = e, n.autoStart.cursorElement = e ? t : null;
1686
1688
  }
@@ -1692,12 +1694,12 @@ function $o() {
1692
1694
  var a = n.options[o.name].cursorChecker;
1693
1695
  i = x.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1694
1696
  }
1695
- Mt(t.element, i || "", e);
1696
- } else e.autoStart.cursorElement && Mt(e.autoStart.cursorElement, "", e);
1697
+ At(t.element, i || "", e);
1698
+ } else e.autoStart.cursorElement && At(e.autoStart.cursorElement, "", e);
1697
1699
  }
1698
1700
  var Qn = { id: "auto-start/base", before: ["actions"], install: function(t) {
1699
1701
  var e = t.interactStatic, n = t.defaults;
1700
- t.usePlugin(Kn), n.base.actionChecker = null, n.base.styleCursor = !0, D(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
1702
+ t.usePlugin(Kn), n.base.actionChecker = null, n.base.styleCursor = !0, z(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
1701
1703
  return ln(r, t);
1702
1704
  }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: st, cursorElement: null };
1703
1705
  }, listeners: { "interactions:down": function(t, e) {
@@ -1717,23 +1719,23 @@ function $o() {
1717
1719
  })(t, e);
1718
1720
  }, "interactions:stop": function(t, e) {
1719
1721
  var n = t.interaction, r = n.interactable;
1720
- r && r.options.styleCursor && Mt(n.element, "", e);
1721
- } }, maxInteractions: ln, withinInteractionLimit: st, validateAction: on }, Rt = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1722
+ r && r.options.styleCursor && At(n.element, "", e);
1723
+ } }, maxInteractions: ln, withinInteractionLimit: st, validateAction: on }, Mt = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1722
1724
  var n = t.interaction, r = t.eventTarget, o = t.dx, i = t.dy;
1723
1725
  if (n.prepared.name === "drag") {
1724
1726
  var a = Math.abs(o), s = Math.abs(i), l = n.interactable.options.drag, d = l.startAxis, c = a > s ? "x" : a < s ? "y" : "xy";
1725
1727
  if (n.prepared.axis = l.lockAxis === "start" ? c[0] : l.lockAxis, c !== "xy" && d !== "xy" && d !== c) {
1726
1728
  n.prepared.name = null;
1727
- for (var f = r, b = function(k) {
1728
- if (k !== n.interactable) {
1729
- var R = n.interactable.options.drag;
1730
- if (!R.manualStart && k.testIgnoreAllow(R, f, r)) {
1731
- var O = k.getAction(n.downPointer, n.downEvent, n, f);
1732
- if (O && O.name === "drag" && (function(I, z) {
1733
- if (!z) return !1;
1734
- var U = z.options.drag.startAxis;
1735
- return I === "xy" || U === "xy" || U === I;
1736
- })(c, k) && Rt.validateAction(O, k, f, r, e)) return k;
1729
+ for (var f = r, b = function(C) {
1730
+ if (C !== n.interactable) {
1731
+ var M = n.interactable.options.drag;
1732
+ if (!M.manualStart && C.testIgnoreAllow(M, f, r)) {
1733
+ var D = C.getAction(n.downPointer, n.downEvent, n, f);
1734
+ if (D && D.name === "drag" && (function(O, F) {
1735
+ if (!F) return !1;
1736
+ var U = F.options.drag.startAxis;
1737
+ return O === "xy" || U === "xy" || U === O;
1738
+ })(c, C) && Mt.validateAction(D, C, f, r, e)) return C;
1737
1739
  }
1738
1740
  }
1739
1741
  }; x.element(f); ) {
@@ -1747,7 +1749,7 @@ function $o() {
1747
1749
  }
1748
1750
  }
1749
1751
  } } };
1750
- function At(t) {
1752
+ function Rt(t) {
1751
1753
  var e = t.prepared && t.prepared.name;
1752
1754
  if (!e) return null;
1753
1755
  var n = t.interactable.options;
@@ -1755,11 +1757,11 @@ function $o() {
1755
1757
  }
1756
1758
  var er = { id: "auto-start/hold", install: function(t) {
1757
1759
  var e = t.defaults;
1758
- t.usePlugin(Rt), e.perAction.hold = 0, e.perAction.delay = 0;
1760
+ t.usePlugin(Mt), e.perAction.hold = 0, e.perAction.delay = 0;
1759
1761
  }, listeners: { "interactions:new": function(t) {
1760
1762
  t.interaction.autoStartHoldTimer = null;
1761
1763
  }, "autoStart:prepared": function(t) {
1762
- var e = t.interaction, n = At(e);
1764
+ var e = t.interaction, n = Rt(e);
1763
1765
  n > 0 && (e.autoStartHoldTimer = setTimeout((function() {
1764
1766
  e.start(e.prepared, e.interactable, e.element);
1765
1767
  }), n));
@@ -1768,9 +1770,9 @@ function $o() {
1768
1770
  e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);
1769
1771
  }, "autoStart:before-start": function(t) {
1770
1772
  var e = t.interaction;
1771
- At(e) > 0 && (e.prepared.name = null);
1772
- } }, getHoldDuration: At }, tr = er, nr = { id: "auto-start", install: function(t) {
1773
- t.usePlugin(Rt), t.usePlugin(tr), t.usePlugin(Zn);
1773
+ Rt(e) > 0 && (e.prepared.name = null);
1774
+ } }, getHoldDuration: Rt }, tr = er, nr = { id: "auto-start", install: function(t) {
1775
+ t.usePlugin(Mt), t.usePlugin(tr), t.usePlugin(Zn);
1774
1776
  } }, rr = function(t) {
1775
1777
  return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : x.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1776
1778
  };
@@ -1815,9 +1817,9 @@ function $o() {
1815
1817
  }
1816
1818
  var It = (function() {
1817
1819
  function t(e) {
1818
- g(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 = ct(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1820
+ y(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 = ct(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1819
1821
  }
1820
- return y(t, [{ key: "start", value: function(e, n) {
1822
+ return g(t, [{ key: "start", value: function(e, n) {
1821
1823
  var r, o, i = e.phase, a = this.interaction, s = (function(d) {
1822
1824
  var c = d.interactable.options[d.prepared.name], f = c.modifiers;
1823
1825
  return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(b) {
@@ -1827,7 +1829,7 @@ function $o() {
1827
1829
  return !!b;
1828
1830
  }));
1829
1831
  })(a);
1830
- this.prepareStates(s), this.startEdges = D({}, a.edges), this.edges = D({}, 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 };
1832
+ this.prepareStates(s), this.startEdges = z({}, a.edges), this.edges = z({}, 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 };
1831
1833
  var l = this.fillArg({ phase: i, pageCoords: n, preEnd: !1 });
1832
1834
  return this.result = ct(), this.startAll(l), this.result = this.setAll(l);
1833
1835
  } }, { key: "fillArg", value: function(e) {
@@ -1840,27 +1842,27 @@ function $o() {
1840
1842
  }
1841
1843
  } }, { key: "setAll", value: function(e) {
1842
1844
  var n = e.phase, r = e.preEnd, o = e.skipModifiers, i = e.rect, a = e.edges;
1843
- e.coords = D({}, e.pageCoords), e.rect = D({}, i), e.edges = D({}, a);
1845
+ e.coords = z({}, e.pageCoords), e.rect = z({}, i), e.edges = z({}, a);
1844
1846
  for (var s = o ? this.states.slice(o) : this.states, l = ct(e.coords, e.rect), d = 0; d < s.length; d++) {
1845
- var c, f = s[d], b = f.options, S = D({}, e.coords), k = null;
1846
- (c = f.methods) != null && c.set && this.shouldDo(b, r, n) && (e.state = f, k = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - S.x, y: e.coords.y - S.y })), l.eventProps.push(k);
1847
+ var c, f = s[d], b = f.options, S = z({}, e.coords), C = null;
1848
+ (c = f.methods) != null && c.set && this.shouldDo(b, r, n) && (e.state = f, C = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - S.x, y: e.coords.y - S.y })), l.eventProps.push(C);
1847
1849
  }
1848
- D(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - i.left, l.rectDelta.right = e.rect.right - i.right, l.rectDelta.top = e.rect.top - i.top, l.rectDelta.bottom = e.rect.bottom - i.bottom;
1849
- var R = this.result.coords, O = this.result.rect;
1850
- if (R && O) {
1851
- var I = l.rect.left !== O.left || l.rect.right !== O.right || l.rect.top !== O.top || l.rect.bottom !== O.bottom;
1852
- l.changed = I || R.x !== l.coords.x || R.y !== l.coords.y;
1850
+ z(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - i.left, l.rectDelta.right = e.rect.right - i.right, l.rectDelta.top = e.rect.top - i.top, l.rectDelta.bottom = e.rect.bottom - i.bottom;
1851
+ var M = this.result.coords, D = this.result.rect;
1852
+ if (M && D) {
1853
+ var O = l.rect.left !== D.left || l.rect.right !== D.right || l.rect.top !== D.top || l.rect.bottom !== D.bottom;
1854
+ l.changed = O || M.x !== l.coords.x || M.y !== l.coords.y;
1853
1855
  }
1854
1856
  return l;
1855
1857
  } }, { key: "applyToInteraction", value: function(e) {
1856
1858
  var n = this.interaction, r = e.phase, o = n.coords.cur, i = n.coords.start, a = this.result, s = this.startDelta, l = a.delta;
1857
- r === "start" && D(this.startDelta, a.delta);
1859
+ r === "start" && z(this.startDelta, a.delta);
1858
1860
  for (var d = 0, c = [[i, s], [o, l]]; d < c.length; d++) {
1859
1861
  var f = c[d], b = f[0], S = f[1];
1860
1862
  b.page.x += S.x, b.page.y += S.y, b.client.x += S.x, b.client.y += S.y;
1861
1863
  }
1862
- var k = this.result.rectDelta, R = e.rect || n.rect;
1863
- R.left += k.left, R.right += k.right, R.top += k.top, R.bottom += k.bottom, R.width = R.right - R.left, R.height = R.bottom - R.top;
1864
+ var C = this.result.rectDelta, M = e.rect || n.rect;
1865
+ M.left += C.left, M.right += C.right, M.top += C.top, M.bottom += C.bottom, M.width = M.right - M.left, M.height = M.bottom - M.top;
1864
1866
  } }, { key: "setAndApply", value: function(e) {
1865
1867
  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 }));
1866
1868
  if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
@@ -1884,7 +1886,7 @@ function $o() {
1884
1886
  } }, { key: "stop", value: function(e) {
1885
1887
  var n = e.interaction;
1886
1888
  if (this.states && this.states.length) {
1887
- var r = D({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1889
+ var r = z({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1888
1890
  this.fillArg(r);
1889
1891
  for (var o = 0, i = this.states; o < i.length; o++) {
1890
1892
  var a = i[o];
@@ -1903,8 +1905,8 @@ function $o() {
1903
1905
  var n = e.interaction, r = n.coords, o = n.rect, i = n.modification;
1904
1906
  if (i.result) {
1905
1907
  for (var a = i.startDelta, s = i.result, l = s.delta, d = s.rectDelta, c = 0, f = [[r.start, a], [r.cur, l]]; c < f.length; c++) {
1906
- var b = f[c], S = b[0], k = b[1];
1907
- S.page.x -= k.x, S.page.y -= k.y, S.client.x -= k.x, S.client.y -= k.y;
1908
+ var b = f[c], S = b[0], C = b[1];
1909
+ S.page.x -= C.x, S.page.y -= C.y, S.client.x -= C.x, S.client.y -= C.y;
1908
1910
  }
1909
1911
  o.left -= d.left, o.right -= d.right, o.top -= d.top, o.bottom -= d.bottom;
1910
1912
  }
@@ -1913,7 +1915,7 @@ function $o() {
1913
1915
  } }, { key: "copyFrom", value: function(e) {
1914
1916
  this.startOffset = e.startOffset, this.startDelta = e.startDelta, this.startEdges = e.startEdges, this.edges = e.edges, this.states = e.states.map((function(n) {
1915
1917
  return Ne(n);
1916
- })), this.result = ct(D({}, e.result.coords), D({}, e.result.rect));
1918
+ })), this.result = ct(z({}, e.result.coords), z({}, e.result.rect));
1917
1919
  } }, { key: "destroy", value: function() {
1918
1920
  for (var e in this) this[e] = null;
1919
1921
  } }]), t;
@@ -1934,7 +1936,7 @@ function $o() {
1934
1936
  };
1935
1937
  return e && typeof e == "string" && (o._defaults = n, o._methods = r), o;
1936
1938
  }
1937
- function qe(t) {
1939
+ function We(t) {
1938
1940
  var e = t.iEvent, n = t.interaction.modification.result;
1939
1941
  n && (e.modifiers = n.eventProps);
1940
1942
  }
@@ -1952,22 +1954,22 @@ function $o() {
1952
1954
  }, "interactions:before-action-end": function(t) {
1953
1955
  var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
1954
1956
  return e.edges = n.startEdges, r;
1955
- }, "interactions:action-start": qe, "interactions:action-move": qe, "interactions:action-end": qe, "interactions:after-action-start": function(t) {
1957
+ }, "interactions:action-start": We, "interactions:action-move": We, "interactions:action-end": We, "interactions:after-action-start": function(t) {
1956
1958
  return t.interaction.modification.restoreInteractionCoords(t);
1957
1959
  }, "interactions:after-action-move": function(t) {
1958
1960
  return t.interaction.modification.restoreInteractionCoords(t);
1959
1961
  }, "interactions:stop": function(t) {
1960
1962
  return t.interaction.modification.stop(t);
1961
1963
  } } }, dn = ir, pn = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Pt = (function(t) {
1962
- M(n, t);
1963
- var e = A(n);
1964
+ A(n, t);
1965
+ var e = R(n);
1964
1966
  function n(r, o, i, a, s, l, d) {
1965
1967
  var c;
1966
- g(this, n), (c = e.call(this, r)).relatedTarget = null, c.screenX = void 0, c.screenY = void 0, c.button = void 0, c.buttons = void 0, c.ctrlKey = void 0, c.shiftKey = void 0, c.altKey = void 0, c.metaKey = void 0, c.page = void 0, c.client = void 0, c.delta = void 0, c.rect = void 0, c.x0 = void 0, c.y0 = void 0, c.t0 = void 0, c.dt = void 0, c.duration = void 0, c.clientX0 = void 0, c.clientY0 = void 0, c.velocity = void 0, c.speed = void 0, c.swipe = void 0, c.axes = void 0, c.preEnd = void 0, s = s || r.element;
1967
- var f = r.interactable, b = (f && f.options || pn).deltaSource, S = Le(f, s, i), k = a === "start", R = a === "end", O = k ? P(c) : r.prevEvent, I = k ? r.coords.start : R ? { page: O.page, client: O.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1968
- return c.page = D({}, I.page), c.client = D({}, I.client), c.rect = D({}, r.rect), c.timeStamp = I.timeStamp, R || (c.page.x -= S.x, c.page.y -= S.y, c.client.x -= S.x, c.client.y -= S.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = k ? r.pointers[r.pointers.length - 1].downTime : O.t0, c.x0 = r.coords.start.page.x - S.x, c.y0 = r.coords.start.page.y - S.y, c.clientX0 = r.coords.start.client.x - S.x, c.clientY0 = r.coords.start.client.y - S.y, c.delta = k || R ? { x: 0, y: 0 } : { x: c[b].x - O[b].x, y: c[b].y - O[b].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = D({}, r.coords.velocity[b]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = R || a === "inertiastart" ? c.getSwipe() : null, c;
1968
+ y(this, n), (c = e.call(this, r)).relatedTarget = null, c.screenX = void 0, c.screenY = void 0, c.button = void 0, c.buttons = void 0, c.ctrlKey = void 0, c.shiftKey = void 0, c.altKey = void 0, c.metaKey = void 0, c.page = void 0, c.client = void 0, c.delta = void 0, c.rect = void 0, c.x0 = void 0, c.y0 = void 0, c.t0 = void 0, c.dt = void 0, c.duration = void 0, c.clientX0 = void 0, c.clientY0 = void 0, c.velocity = void 0, c.speed = void 0, c.swipe = void 0, c.axes = void 0, c.preEnd = void 0, s = s || r.element;
1969
+ var f = r.interactable, b = (f && f.options || pn).deltaSource, S = ze(f, s, i), C = a === "start", M = a === "end", D = C ? I(c) : r.prevEvent, O = C ? r.coords.start : M ? { page: D.page, client: D.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1970
+ return c.page = z({}, O.page), c.client = z({}, O.client), c.rect = z({}, r.rect), c.timeStamp = O.timeStamp, M || (c.page.x -= S.x, c.page.y -= S.y, c.client.x -= S.x, c.client.y -= S.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = C ? r.pointers[r.pointers.length - 1].downTime : D.t0, c.x0 = r.coords.start.page.x - S.x, c.y0 = r.coords.start.page.y - S.y, c.clientX0 = r.coords.start.client.x - S.x, c.clientY0 = r.coords.start.client.y - S.y, c.delta = C || M ? { x: 0, y: 0 } : { x: c[b].x - D[b].x, y: c[b].y - D[b].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = z({}, r.coords.velocity[b]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = M || a === "inertiastart" ? c.getSwipe() : null, c;
1969
1971
  }
1970
- return y(n, [{ key: "getSwipe", value: function() {
1972
+ return g(n, [{ key: "getSwipe", value: function() {
1971
1973
  var r = this._interaction;
1972
1974
  if (r.prevEvent.speed < 600 || this.timeStamp - r.prevEvent.timeStamp > 150) return null;
1973
1975
  var o = 180 * Math.atan2(r.prevEvent.velocityY, r.prevEvent.velocityX) / Math.PI;
@@ -2014,8 +2016,8 @@ function $o() {
2014
2016
  }, set: function(t) {
2015
2017
  this.velocity.y = t;
2016
2018
  } } });
2017
- var ar = y((function t(e, n, r, o, i) {
2018
- g(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;
2019
+ var ar = g((function t(e, n, r, o, i) {
2020
+ y(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;
2019
2021
  })), sr = (function(t) {
2020
2022
  return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
2021
2023
  })({}), fn = (function(t) {
@@ -2023,7 +2025,7 @@ function $o() {
2023
2025
  })({}), lr = 0, cr = (function() {
2024
2026
  function t(e) {
2025
2027
  var n = this, r = e.pointerType, o = e.scopeFire;
2026
- g(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 = We((function(c) {
2028
+ y(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 = qe((function(c) {
2027
2029
  this.move(c);
2028
2030
  }), "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 = lr++, this._scopeFire = o, this.pointerType = r;
2029
2031
  var i = this;
@@ -2042,13 +2044,13 @@ function $o() {
2042
2044
  for (var d in fn) l(d);
2043
2045
  this._scopeFire("interactions:new", { interaction: this });
2044
2046
  }
2045
- return y(t, [{ key: "pointerMoveTolerance", get: function() {
2047
+ return g(t, [{ key: "pointerMoveTolerance", get: function() {
2046
2048
  return 1;
2047
2049
  } }, { key: "pointerDown", value: function(e, n, r) {
2048
2050
  var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
2049
2051
  this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: o, pointerInfo: i, type: "down", interaction: this });
2050
2052
  } }, { key: "start", value: function(e, n, r) {
2051
- return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (_t(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? D({}, 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);
2053
+ return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (_t(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? z({}, 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);
2052
2054
  } }, { key: "pointerMove", value: function(e, n, r) {
2053
2055
  this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
2054
2056
  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;
@@ -2056,7 +2058,7 @@ function $o() {
2056
2058
  var s, l, d, c = this.getPointerIndex(e), f = { pointer: e, pointerIndex: c, pointerInfo: this.pointers[c], event: n, type: "move", eventTarget: r, dx: o, dy: i, duplicate: a, interaction: this };
2057
2059
  a || (s = this.coords.velocity, l = this.coords.delta, d = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / d, s.page.y = l.page.y / d, s.client.x = l.client.x / d, s.client.y = l.client.y / d, s.timeStamp = d), this._scopeFire("interactions:move", f), a || this.simulation || (this.interacting() && (f.type = null, this.move(f)), this.pointerWasMoved && ot(this.coords.prev, this.coords.cur));
2058
2060
  } }, { key: "move", value: function(e) {
2059
- e && e.event || Wt(this.coords.delta), (e = D({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2061
+ e && e.event || qt(this.coords.delta), (e = z({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2060
2062
  } }, { key: "pointerUp", value: function(e, n, r, o) {
2061
2063
  var i = this.getPointerIndex(e);
2062
2064
  i === -1 && (i = this.updatePointer(e, n, r, !1));
@@ -2110,9 +2112,9 @@ function $o() {
2110
2112
  } }]), t;
2111
2113
  })();
2112
2114
  function hn(t) {
2113
- vn(t.interaction);
2115
+ mn(t.interaction);
2114
2116
  }
2115
- function vn(t) {
2117
+ function mn(t) {
2116
2118
  if (!(function(n) {
2117
2119
  return !(!n.offset.pending.x && !n.offset.pending.y);
2118
2120
  })(t)) return !1;
@@ -2138,15 +2140,15 @@ function $o() {
2138
2140
  })(t.interaction);
2139
2141
  }, "interactions:before-action-start": hn, "interactions:before-action-move": hn, "interactions:before-action-end": function(t) {
2140
2142
  var e = t.interaction;
2141
- if (vn(e)) return e.move({ offset: !0 }), e.end(), !1;
2143
+ if (mn(e)) return e.move({ offset: !0 }), e.end(), !1;
2142
2144
  }, "interactions:stop": function(t) {
2143
2145
  var e = t.interaction;
2144
2146
  e.offset.total.x = 0, e.offset.total.y = 0, e.offset.pending.x = 0, e.offset.pending.y = 0;
2145
- } } }, mn = dr, pr = (function() {
2147
+ } } }, vn = dr, pr = (function() {
2146
2148
  function t(e) {
2147
- g(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;
2149
+ y(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;
2148
2150
  }
2149
- return y(t, [{ key: "start", value: function(e) {
2151
+ return g(t, [{ key: "start", value: function(e) {
2150
2152
  var n = this.interaction, r = ut(n);
2151
2153
  if (!r || !r.enabled) return !1;
2152
2154
  var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new It(n));
@@ -2178,8 +2180,8 @@ function $o() {
2178
2180
  if (f < this.te) {
2179
2181
  var b, S = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2180
2182
  this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, b = { x: gn(s = S, e, r, i), y: gn(s, n, o, a) }) : b = { x: this.targetOffset.x * S, y: this.targetOffset.y * S };
2181
- var k = { x: b.x - this.currentOffset.x, y: b.y - this.currentOffset.y };
2182
- this.currentOffset.x += k.x, this.currentOffset.y += k.y, d.offsetBy(k), d.move(), this.onNextFrame((function() {
2183
+ var C = { x: b.x - this.currentOffset.x, y: b.y - this.currentOffset.y };
2184
+ this.currentOffset.x += C.x, this.currentOffset.y += C.y, d.offsetBy(C), d.move(), this.onNextFrame((function() {
2183
2185
  return l.inertiaTick();
2184
2186
  }));
2185
2187
  } else d.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
@@ -2206,7 +2208,7 @@ function $o() {
2206
2208
  }
2207
2209
  var fr = { id: "inertia", before: ["modifiers", "actions"], install: function(t) {
2208
2210
  var e = t.defaults;
2209
- t.usePlugin(mn), t.usePlugin(dn), t.actions.phases.inertiastart = !0, t.actions.phases.resume = !0, e.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
2211
+ t.usePlugin(vn), t.usePlugin(dn), t.actions.phases.inertiastart = !0, t.actions.phases.resume = !0, e.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
2210
2212
  }, listeners: { "interactions:new": function(t) {
2211
2213
  var e = t.interaction;
2212
2214
  e.inertia = new pr(e);
@@ -2230,7 +2232,7 @@ function $o() {
2230
2232
  e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
2231
2233
  }, "interactions:before-action-inertiastart": function(t) {
2232
2234
  return t.interaction.modification.setAndApply(t);
2233
- }, "interactions:action-resume": qe, "interactions:action-inertiastart": qe, "interactions:after-action-inertiastart": function(t) {
2235
+ }, "interactions:action-resume": We, "interactions:action-inertiastart": We, "interactions:after-action-inertiastart": function(t) {
2234
2236
  return t.interaction.modification.restoreInteractionCoords(t);
2235
2237
  }, "interactions:after-action-resume": function(t) {
2236
2238
  return t.interaction.modification.restoreInteractionCoords(t);
@@ -2252,9 +2254,9 @@ function $o() {
2252
2254
  }
2253
2255
  var xn = (function() {
2254
2256
  function t(e) {
2255
- g(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = D({}, e || {});
2257
+ y(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = z({}, e || {});
2256
2258
  }
2257
- return y(t, [{ key: "fire", value: function(e) {
2259
+ return g(t, [{ key: "fire", value: function(e) {
2258
2260
  var n, r = this.global;
2259
2261
  (n = this.types[e.type]) && bn(e, n), !e.propagationStopped && r && (n = r[e.type]) && bn(e, n);
2260
2262
  } }, { key: "on", value: function(e, n) {
@@ -2272,11 +2274,11 @@ function $o() {
2272
2274
  } }, { key: "getRect", value: function(e) {
2273
2275
  return null;
2274
2276
  } }]), t;
2275
- })(), vr = (function() {
2277
+ })(), mr = (function() {
2276
2278
  function t(e) {
2277
- g(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, rt(this, e);
2279
+ y(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, rt(this, e);
2278
2280
  }
2279
- return y(t, [{ key: "preventOriginalDefault", value: function() {
2281
+ return g(t, [{ key: "preventOriginalDefault", value: function() {
2280
2282
  this.originalEvent.preventDefault();
2281
2283
  } }, { key: "stopPropagation", value: function() {
2282
2284
  this.originalEvent.stopPropagation();
@@ -2290,88 +2292,88 @@ function $o() {
2290
2292
  function dt(t, e) {
2291
2293
  return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
2292
2294
  }
2293
- var mr = { id: "events", install: function(t) {
2294
- var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, b, S, k) {
2295
- var R = Ye(k);
2295
+ var vr = { id: "events", install: function(t) {
2296
+ var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, b, S, C) {
2297
+ var M = Ye(C);
2296
2298
  if (!r[b]) {
2297
2299
  r[b] = [];
2298
- for (var O = 0; O < o.length; O++) {
2299
- var I = o[O];
2300
- a(I, b, l), a(I, b, d, !0);
2300
+ for (var D = 0; D < o.length; D++) {
2301
+ var O = o[D];
2302
+ a(O, b, l), a(O, b, d, !0);
2301
2303
  }
2302
2304
  }
2303
- var z = r[b], U = Be(z, (function(ee) {
2305
+ var F = r[b], U = Be(F, (function(ee) {
2304
2306
  return ee.selector === c && ee.context === f;
2305
2307
  }));
2306
- U || (U = { selector: c, context: f, listeners: [] }, z.push(U)), U.listeners.push({ func: S, options: R });
2307
- }, removeDelegate: function(c, f, b, S, k) {
2308
- var R, O = Ye(k), I = r[b], z = !1;
2309
- if (I)
2310
- for (R = I.length - 1; R >= 0; R--) {
2311
- var U = I[R];
2308
+ U || (U = { selector: c, context: f, listeners: [] }, F.push(U)), U.listeners.push({ func: S, options: M });
2309
+ }, removeDelegate: function(c, f, b, S, C) {
2310
+ var M, D = Ye(C), O = r[b], F = !1;
2311
+ if (O)
2312
+ for (M = O.length - 1; M >= 0; M--) {
2313
+ var U = O[M];
2312
2314
  if (U.selector === c && U.context === f) {
2313
- for (var ee = U.listeners, B = ee.length - 1; B >= 0; B--) {
2314
- var K = ee[B];
2315
- if (K.func === S && dt(K.options, O)) {
2316
- ee.splice(B, 1), ee.length || (I.splice(R, 1), s(f, b, l), s(f, b, d, !0)), z = !0;
2315
+ for (var ee = U.listeners, q = ee.length - 1; q >= 0; q--) {
2316
+ var K = ee[q];
2317
+ if (K.func === S && dt(K.options, D)) {
2318
+ ee.splice(q, 1), ee.length || (O.splice(M, 1), s(f, b, l), s(f, b, d, !0)), F = !0;
2317
2319
  break;
2318
2320
  }
2319
2321
  }
2320
- if (z) break;
2322
+ if (F) break;
2321
2323
  }
2322
2324
  }
2323
2325
  }, delegateListener: l, delegateUseCapture: d, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2324
2326
  function a(c, f, b, S) {
2325
2327
  if (c.addEventListener) {
2326
- var k = Ye(S), R = Be(n, (function(O) {
2327
- return O.eventTarget === c;
2328
+ var C = Ye(S), M = Be(n, (function(D) {
2329
+ return D.eventTarget === c;
2328
2330
  }));
2329
- R || (R = { eventTarget: c, events: {} }, n.push(R)), R.events[f] || (R.events[f] = []), Be(R.events[f], (function(O) {
2330
- return O.func === b && dt(O.options, k);
2331
- })) || (c.addEventListener(f, b, i.supportsOptions ? k : k.capture), R.events[f].push({ func: b, options: k }));
2331
+ M || (M = { eventTarget: c, events: {} }, n.push(M)), M.events[f] || (M.events[f] = []), Be(M.events[f], (function(D) {
2332
+ return D.func === b && dt(D.options, C);
2333
+ })) || (c.addEventListener(f, b, i.supportsOptions ? C : C.capture), M.events[f].push({ func: b, options: C }));
2332
2334
  }
2333
2335
  }
2334
2336
  function s(c, f, b, S) {
2335
2337
  if (c.addEventListener && c.removeEventListener) {
2336
- var k = He(n, (function(me) {
2337
- return me.eventTarget === c;
2338
- })), R = n[k];
2339
- if (R && R.events) if (f !== "all") {
2340
- var O = !1, I = R.events[f];
2341
- if (I) {
2338
+ var C = He(n, (function(ve) {
2339
+ return ve.eventTarget === c;
2340
+ })), M = n[C];
2341
+ if (M && M.events) if (f !== "all") {
2342
+ var D = !1, O = M.events[f];
2343
+ if (O) {
2342
2344
  if (b === "all") {
2343
- for (var z = I.length - 1; z >= 0; z--) {
2344
- var U = I[z];
2345
+ for (var F = O.length - 1; F >= 0; F--) {
2346
+ var U = O[F];
2345
2347
  s(c, f, U.func, U.options);
2346
2348
  }
2347
2349
  return;
2348
2350
  }
2349
- for (var ee = Ye(S), B = 0; B < I.length; B++) {
2350
- var K = I[B];
2351
+ for (var ee = Ye(S), q = 0; q < O.length; q++) {
2352
+ var K = O[q];
2351
2353
  if (K.func === b && dt(K.options, ee)) {
2352
- c.removeEventListener(f, b, i.supportsOptions ? ee : ee.capture), I.splice(B, 1), I.length === 0 && (delete R.events[f], O = !0);
2354
+ c.removeEventListener(f, b, i.supportsOptions ? ee : ee.capture), O.splice(q, 1), O.length === 0 && (delete M.events[f], D = !0);
2353
2355
  break;
2354
2356
  }
2355
2357
  }
2356
2358
  }
2357
- O && !Object.keys(R.events).length && n.splice(k, 1);
2358
- } else for (f in R.events) R.events.hasOwnProperty(f) && s(c, f, "all");
2359
+ D && !Object.keys(M.events).length && n.splice(C, 1);
2360
+ } else for (f in M.events) M.events.hasOwnProperty(f) && s(c, f, "all");
2359
2361
  }
2360
2362
  }
2361
2363
  function l(c, f) {
2362
- for (var b = Ye(f), S = new vr(c), k = r[c.type], R = Ut(c)[0], O = R; x.element(O); ) {
2363
- for (var I = 0; I < k.length; I++) {
2364
- var z = k[I], U = z.selector, ee = z.context;
2365
- if (he(O, U) && se(ee, R) && se(ee, O)) {
2366
- var B = z.listeners;
2367
- S.currentTarget = O;
2368
- for (var K = 0; K < B.length; K++) {
2369
- var me = B[K];
2370
- dt(me.options, b) && me.func(S);
2364
+ for (var b = Ye(f), S = new mr(c), C = r[c.type], M = Ut(c)[0], D = M; x.element(D); ) {
2365
+ for (var O = 0; O < C.length; O++) {
2366
+ var F = C[O], U = F.selector, ee = F.context;
2367
+ if (he(D, U) && se(ee, M) && se(ee, D)) {
2368
+ var q = F.listeners;
2369
+ S.currentTarget = D;
2370
+ for (var K = 0; K < q.length; K++) {
2371
+ var ve = q[K];
2372
+ dt(ve.options, b) && ve.func(S);
2371
2373
  }
2372
2374
  }
2373
2375
  }
2374
- O = fe(O);
2376
+ D = fe(D);
2375
2377
  }
2376
2378
  }
2377
2379
  function d(c) {
@@ -2449,19 +2451,19 @@ function $o() {
2449
2451
  l.push([b.pointer, b.eventTarget, b.curEventTarget, S]);
2450
2452
  }
2451
2453
  } else {
2452
- var k = !1;
2454
+ var C = !1;
2453
2455
  if (!re.supportsPointerEvent && /mouse/.test(n.type)) {
2454
- for (var R = 0; R < r.length && !k; R++) k = r[R].pointerType !== "mouse" && r[R].pointerIsDown;
2455
- k = k || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2456
+ for (var M = 0; M < r.length && !C; M++) C = r[M].pointerType !== "mouse" && r[M].pointerIsDown;
2457
+ C = C || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2456
2458
  }
2457
- if (!k) {
2458
- var O = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, I = kn(O);
2459
- l.push([O.pointer, O.eventTarget, O.curEventTarget, I]);
2459
+ if (!C) {
2460
+ var D = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, O = kn(D);
2461
+ l.push([D.pointer, D.eventTarget, D.curEventTarget, O]);
2460
2462
  }
2461
2463
  }
2462
- for (var z = 0; z < l.length; z++) {
2463
- var U = l[z], ee = U[0], B = U[1], K = U[2];
2464
- U[3][t](ee, n, B, K);
2464
+ for (var F = 0; F < l.length; F++) {
2465
+ var U = l[F], ee = U[0], q = U[1], K = U[2];
2466
+ U[3][t](ee, n, q, K);
2465
2467
  }
2466
2468
  };
2467
2469
  }
@@ -2469,7 +2471,7 @@ function $o() {
2469
2471
  var e = t.pointerType, n = t.scope, r = { interaction: gr.search(t), searchDetails: t };
2470
2472
  return n.fire("interactions:find", r), r.interaction || n.interactions.new({ pointerType: e });
2471
2473
  }
2472
- function zt(t, e) {
2474
+ function Lt(t, e) {
2473
2475
  var n = t.doc, r = t.scope, o = t.options, i = r.interactions.docEvents, a = r.events, s = a[e];
2474
2476
  for (var l in r.browser.isIOS && !o.events && (o.events = { passive: !1 }), a.delegatedEvents) s(n, l, a.delegateListener), s(n, l, a.delegateUseCapture, !0);
2475
2477
  for (var d = o && o.events, c = 0; c < i.length; c++) {
@@ -2488,8 +2490,8 @@ function $o() {
2488
2490
  var d = l[s];
2489
2491
  if (d.pointerIsDown && d.pointerType === "touch" && !d._interacting) for (var c = function() {
2490
2492
  var S = b[f];
2491
- t.documents.some((function(k) {
2492
- return se(k.doc, S.downTarget);
2493
+ t.documents.some((function(C) {
2494
+ return se(C.doc, S.downTarget);
2493
2495
  })) || d.removePointer(S.pointer, S.event);
2494
2496
  }, f = 0, b = d.pointers; f < b.length; f++) c();
2495
2497
  }
@@ -2498,12 +2500,12 @@ function $o() {
2498
2500
  for (var l = 0, d = t.interactions.list; l < d.length; l++)
2499
2501
  d[l].documentBlur(s);
2500
2502
  } }), t.prevTouchTime = 0, t.Interaction = (function(s) {
2501
- M(d, s);
2502
- var l = A(d);
2503
+ A(d, s);
2504
+ var l = R(d);
2503
2505
  function d() {
2504
- return g(this, d), l.apply(this, arguments);
2506
+ return y(this, d), l.apply(this, arguments);
2505
2507
  }
2506
- return y(d, [{ key: "pointerMoveTolerance", get: function() {
2508
+ return g(d, [{ key: "pointerMoveTolerance", get: function() {
2507
2509
  return t.interactions.pointerMoveTolerance;
2508
2510
  }, set: function(c) {
2509
2511
  t.interactions.pointerMoveTolerance = c;
@@ -2518,21 +2520,21 @@ function $o() {
2518
2520
  return t.interactions.list.push(l), l;
2519
2521
  }, listeners: e, docEvents: o, pointerMoveTolerance: 1 }, t.usePlugin(un);
2520
2522
  }, listeners: { "scope:add-document": function(t) {
2521
- return zt(t, "add");
2523
+ return Lt(t, "add");
2522
2524
  }, "scope:remove-document": function(t) {
2523
- return zt(t, "remove");
2525
+ return Lt(t, "remove");
2524
2526
  }, "interactable:unset": function(t, e) {
2525
2527
  for (var n = t.interactable, r = e.interactions.list.length - 1; r >= 0; r--) {
2526
2528
  var o = e.interactions.list[r];
2527
2529
  o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2528
2530
  }
2529
- } }, onDocSignal: zt, doOnInteractions: En, methodNames: Nt }, br = yr, Me = (function(t) {
2531
+ } }, onDocSignal: Lt, doOnInteractions: En, methodNames: Nt }, br = yr, Ae = (function(t) {
2530
2532
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2531
- })(Me || {}), xr = (function() {
2533
+ })(Ae || {}), xr = (function() {
2532
2534
  function t(e, n, r, o) {
2533
- g(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new xn(), 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 = Z(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2535
+ y(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new xn(), 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 = Z(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2534
2536
  }
2535
- return y(t, [{ key: "_defaults", get: function() {
2537
+ return g(t, [{ key: "_defaults", get: function() {
2536
2538
  return { base: {}, perAction: {}, actions: {} };
2537
2539
  } }, { key: "setOnEvents", value: function(e, n) {
2538
2540
  return x.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), x.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), x.func(n.onend) && this.on("".concat(e, "end"), n.onend), x.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
@@ -2540,19 +2542,19 @@ function $o() {
2540
2542
  var o, i = this, a = (o = this._actions.map[e]) == null ? void 0 : o.filterEventType, s = function(l) {
2541
2543
  return (a == null || a(l)) && lt(l, i._actions);
2542
2544
  };
2543
- (x.array(n) || x.object(n)) && this._onOff(Me.Off, e, n, void 0, s), (x.array(r) || x.object(r)) && this._onOff(Me.On, e, r, void 0, s);
2545
+ (x.array(n) || x.object(n)) && this._onOff(Ae.Off, e, n, void 0, s), (x.array(r) || x.object(r)) && this._onOff(Ae.On, e, r, void 0, s);
2544
2546
  } }, { key: "setPerAction", value: function(e, n) {
2545
2547
  var r = this._defaults;
2546
2548
  for (var o in n) {
2547
2549
  var i = o, a = this.options[e], s = n[i];
2548
- i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), x.array(s) ? a[i] = Gt(s) : x.plainObject(s) ? (a[i] = D(a[i] || {}, Ne(s)), x.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : x.bool(s) && x.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2550
+ i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), x.array(s) ? a[i] = Gt(s) : x.plainObject(s) ? (a[i] = z(a[i] || {}, Ne(s)), x.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : x.bool(s) && x.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2549
2551
  }
2550
2552
  } }, { key: "getRect", value: function(e) {
2551
2553
  return e = e || (x.element(this.target) ? this.target : null), x.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2552
2554
  } }, { key: "rectChecker", value: function(e) {
2553
2555
  var n = this;
2554
2556
  return x.func(e) ? (this.getRect = function(r) {
2555
- var o = D({}, e.apply(n, r));
2557
+ var o = z({}, e.apply(n, r));
2556
2558
  return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
2557
2559
  }, this) : e === null ? (delete this.getRect, this) : this.getRect;
2558
2560
  } }, { key: "_backCompatOption", value: function(e, n) {
@@ -2575,9 +2577,9 @@ function $o() {
2575
2577
  } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2576
2578
  return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2577
2579
  } }, { key: "testAllow", value: function(e, n, r) {
2578
- return !e || !!x.element(r) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2580
+ return !e || !!x.element(r) && (x.string(e) ? Y(r, e, n) : !!x.element(e) && se(e, r));
2579
2581
  } }, { key: "testIgnore", value: function(e, n, r) {
2580
- return !(!e || !x.element(r)) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2582
+ return !(!e || !x.element(r)) && (x.string(e) ? Y(r, e, n) : !!x.element(e) && se(e, r));
2581
2583
  } }, { key: "fire", value: function(e) {
2582
2584
  return this.events.fire(e), this;
2583
2585
  } }, { key: "_onOff", value: function(e, n, r, o, i) {
@@ -2587,19 +2589,19 @@ function $o() {
2587
2589
  s === "wheel" && (s = re.wheelEvent);
2588
2590
  for (var l = 0, d = a[s]; l < d.length; l++) {
2589
2591
  var c = d[l];
2590
- lt(s, this._actions) ? this.events[e === Me.On ? "on" : "off"](s, c) : x.string(this.target) ? this._scopeEvents[e === Me.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Me.On ? "add" : "remove"](this.target, s, c, o);
2592
+ lt(s, this._actions) ? this.events[e === Ae.On ? "on" : "off"](s, c) : x.string(this.target) ? this._scopeEvents[e === Ae.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Ae.On ? "add" : "remove"](this.target, s, c, o);
2591
2593
  }
2592
2594
  }
2593
2595
  return this;
2594
2596
  } }, { key: "on", value: function(e, n, r) {
2595
- return this._onOff(Me.On, e, n, r);
2597
+ return this._onOff(Ae.On, e, n, r);
2596
2598
  } }, { key: "off", value: function(e, n, r) {
2597
- return this._onOff(Me.Off, e, n, r);
2599
+ return this._onOff(Ae.Off, e, n, r);
2598
2600
  } }, { key: "set", value: function(e) {
2599
2601
  var n = this._defaults;
2600
2602
  for (var r in x.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2601
2603
  var o = r, i = this._actions.methodDict[o];
2602
- this.options[o] = {}, this.setPerAction(o, D(D({}, n.perAction), n.actions[o])), this[i](e[o]);
2604
+ this.options[o] = {}, this.setPerAction(o, z(z({}, n.perAction), n.actions[o])), this[i](e[o]);
2603
2605
  }
2604
2606
  for (var a in e) a !== "getRect" ? x.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2605
2607
  return this;
@@ -2614,15 +2616,15 @@ function $o() {
2614
2616
  })(), wr = (function() {
2615
2617
  function t(e) {
2616
2618
  var n = this;
2617
- g(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2619
+ y(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2618
2620
  var o = r.interactable, i = o.target, a = x.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2619
2621
  return l === o;
2620
2622
  }));
2621
2623
  a.splice(s, 1);
2622
2624
  } });
2623
2625
  }
2624
- return y(t, [{ key: "new", value: function(e, n) {
2625
- n = D(n || {}, { actions: this.scope.actions });
2626
+ return g(t, [{ key: "new", value: function(e, n) {
2627
+ n = z(n || {}, { actions: this.scope.actions });
2626
2628
  var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2627
2629
  return this.scope.addDocument(r._doc), this.list.push(r), x.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;
2628
2630
  } }, { key: "getExisting", value: function(e, n) {
@@ -2639,7 +2641,7 @@ function $o() {
2639
2641
  })(), Er = (function() {
2640
2642
  function t() {
2641
2643
  var e = this;
2642
- g(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = re, this.defaults = Ne(pn), this.Eventable = xn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2644
+ y(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = re, this.defaults = Ne(pn), this.Eventable = xn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2643
2645
  var o = function i(a, s) {
2644
2646
  var l = r.interactables.getExisting(a, s);
2645
2647
  return l || ((l = r.interactables.new(a, s)).events.global = i.globalEvents), l;
@@ -2648,7 +2650,7 @@ function $o() {
2648
2650
  return this.scope.usePlugin(i, a), this;
2649
2651
  }, o.isSet = function(i, a) {
2650
2652
  return !!this.scope.interactables.get(i, a && a.context);
2651
- }, o.on = We((function(i, a, s) {
2653
+ }, o.on = qe((function(i, a, s) {
2652
2654
  if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2653
2655
  for (var l = 0, d = i; l < d.length; l++) {
2654
2656
  var c = d[l];
@@ -2661,7 +2663,7 @@ function $o() {
2661
2663
  return this;
2662
2664
  }
2663
2665
  return lt(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;
2664
- }), "The interact.on() method is being deprecated"), o.off = We((function(i, a, s) {
2666
+ }), "The interact.on() method is being deprecated"), o.off = qe((function(i, a, s) {
2665
2667
  if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2666
2668
  for (var l = 0, d = i; l < d.length; l++) {
2667
2669
  var c = d[l];
@@ -2696,23 +2698,23 @@ function $o() {
2696
2698
  };
2697
2699
  var n = this;
2698
2700
  this.Interactable = (function(r) {
2699
- M(i, r);
2700
- var o = A(i);
2701
+ A(i, r);
2702
+ var o = R(i);
2701
2703
  function i() {
2702
- return g(this, i), o.apply(this, arguments);
2704
+ return y(this, i), o.apply(this, arguments);
2703
2705
  }
2704
- return y(i, [{ key: "_defaults", get: function() {
2706
+ return g(i, [{ key: "_defaults", get: function() {
2705
2707
  return n.defaults;
2706
2708
  } }, { key: "set", value: function(a) {
2707
- return j(C(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2709
+ return j(k(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2708
2710
  } }, { key: "unset", value: function() {
2709
- j(C(i.prototype), "unset", this).call(this);
2711
+ j(k(i.prototype), "unset", this).call(this);
2710
2712
  var a = n.interactables.list.indexOf(this);
2711
2713
  a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2712
2714
  } }]), i;
2713
2715
  })(xr);
2714
2716
  }
2715
- return y(t, [{ key: "addListeners", value: function(e, n) {
2717
+ return g(t, [{ key: "addListeners", value: function(e, n) {
2716
2718
  this.listenerMaps.push({ id: n, map: e });
2717
2719
  } }, { key: "fire", value: function(e, n) {
2718
2720
  for (var r = 0, o = this.listenerMaps; r < o.length; r++) {
@@ -2721,7 +2723,7 @@ function $o() {
2721
2723
  }
2722
2724
  } }, { key: "init", value: function(e) {
2723
2725
  return this.isInitialized ? this : (function(n, r) {
2724
- return n.isInitialized = !0, x.window(r) && V(r), X.init(r), re.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(mr), n;
2726
+ return n.isInitialized = !0, x.window(r) && V(r), X.init(r), re.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(vr), n;
2725
2727
  })(this, e);
2726
2728
  } }, { key: "pluginIsInstalled", value: function(e) {
2727
2729
  var n = e.id;
@@ -2742,7 +2744,7 @@ function $o() {
2742
2744
  } }, { key: "addDocument", value: function(e, n) {
2743
2745
  if (this.getDocIndex(e) !== -1) return !1;
2744
2746
  var r = Z(e);
2745
- n = n ? D({}, 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 });
2747
+ n = n ? z({}, 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 });
2746
2748
  } }, { key: "removeDocument", value: function(e) {
2747
2749
  var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2748
2750
  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 });
@@ -2759,7 +2761,7 @@ function $o() {
2759
2761
  function Cn(t) {
2760
2762
  return t && t.replace(/\/.*$/, "");
2761
2763
  }
2762
- var Sn = new Er(), ve = Sn.interactStatic, kr = typeof globalThis < "u" ? globalThis : window;
2764
+ var Sn = new Er(), me = Sn.interactStatic, kr = typeof globalThis < "u" ? globalThis : window;
2763
2765
  Sn.init(kr);
2764
2766
  var Cr = Object.freeze({ __proto__: null, edgeTarget: function() {
2765
2767
  }, elements: function() {
@@ -2769,40 +2771,40 @@ function $o() {
2769
2771
  return o in t || i in t;
2770
2772
  })), n = function(r, o) {
2771
2773
  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, l = t.offset, d = l === void 0 ? { x: 0, y: 0 } : l, c = { range: i, grid: t, x: null, y: null }, f = 0; f < e.length; f++) {
2772
- var b = e[f], S = b[0], k = b[1], R = Math.round((r - d.x) / t[S]), O = Math.round((o - d.y) / t[k]);
2773
- c[S] = Math.max(s.left, Math.min(s.right, R * t[S] + d.x)), c[k] = Math.max(s.top, Math.min(s.bottom, O * t[k] + d.y));
2774
+ var b = e[f], S = b[0], C = b[1], M = Math.round((r - d.x) / t[S]), D = Math.round((o - d.y) / t[C]);
2775
+ c[S] = Math.max(s.left, Math.min(s.right, M * t[S] + d.x)), c[C] = Math.max(s.top, Math.min(s.bottom, D * t[C] + d.y));
2774
2776
  }
2775
2777
  return c;
2776
2778
  };
2777
2779
  return n.grid = t, n.coordFields = e, n;
2778
2780
  } }), Sr = { id: "snappers", install: function(t) {
2779
2781
  var e = t.interactStatic;
2780
- e.snappers = D(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2782
+ e.snappers = z(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2781
2783
  } }, Tr = Sr, _r = { start: function(t) {
2782
2784
  var e = t.state, n = t.rect, r = t.edges, o = t.pageCoords, i = e.options, a = i.ratio, s = i.enabled, l = e.options, d = l.equalDelta, c = l.modifiers;
2783
- a === "preserve" && (a = n.width / n.height), e.startCoords = D({}, o), e.startRect = D({}, n), e.ratio = a, e.equalDelta = d;
2785
+ a === "preserve" && (a = n.width / n.height), e.startCoords = z({}, o), e.startRect = z({}, n), e.ratio = a, e.equalDelta = d;
2784
2786
  var f = 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 };
2785
2787
  if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
2786
2788
  var b = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2787
2789
  e.edgeSign = { x: b, y: b };
2788
2790
  } else e.edgeSign = { x: f.left ? -1 : 1, y: f.top ? -1 : 1 };
2789
- if (s !== !1 && D(r, f), c != null && c.length) {
2791
+ if (s !== !1 && z(r, f), c != null && c.length) {
2790
2792
  var S = new It(t.interaction);
2791
2793
  S.copyFrom(t.interaction.modification), S.prepareStates(c), e.subModification = S, S.startAll(u({}, t));
2792
2794
  }
2793
2795
  }, set: function(t) {
2794
- var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = D({}, r), a = e.equalDelta ? Mr : Rr;
2795
- if (D(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2796
- var s = D({}, n);
2796
+ var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = z({}, r), a = e.equalDelta ? Ar : Mr;
2797
+ if (z(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2798
+ var s = z({}, n);
2797
2799
  nt(o, s, { x: r.x - i.x, y: r.y - i.y });
2798
2800
  var l = e.subModification.setAll(u(u({}, t), {}, { rect: s, edges: o, pageCoords: r, prevCoords: r, prevRect: s })), d = l.delta;
2799
- return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), D(r, l.coords)), l.eventProps;
2801
+ return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), z(r, l.coords)), l.eventProps;
2800
2802
  }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
2801
- function Mr(t, e, n) {
2803
+ function Ar(t, e, n) {
2802
2804
  var r = t.startCoords, o = t.edgeSign;
2803
2805
  e ? n.y = r.y + (n.x - r.x) * o.y : n.x = r.x + (n.y - r.y) * o.x;
2804
2806
  }
2805
- function Rr(t, e, n, r) {
2807
+ function Mr(t, e, n, r) {
2806
2808
  var o = t.startRect, i = t.startCoords, a = t.ratio, s = t.edgeSign;
2807
2809
  if (e) {
2808
2810
  var l = r.width / a;
@@ -2812,15 +2814,15 @@ function $o() {
2812
2814
  n.x = i.x + (d - o.width) * s.x;
2813
2815
  }
2814
2816
  }
2815
- var Ar = _e(_r, "aspectRatio"), Tn = function() {
2817
+ var Rr = _e(_r, "aspectRatio"), Tn = function() {
2816
2818
  };
2817
2819
  Tn._defaults = {};
2818
2820
  var pt = Tn;
2819
2821
  function Oe(t, e, n) {
2820
- return x.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2822
+ return x.func(t) ? Le(t, e.interactable, e.element, [n.x, n.y, e]) : Le(t, e.interactable, e.element);
2821
2823
  }
2822
2824
  var ft = { start: function(t) {
2823
- var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = D({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2825
+ var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = z({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2824
2826
  if (e && s) {
2825
2827
  var d = Oe(a.restriction, o, i);
2826
2828
  if (d) {
@@ -2834,46 +2836,46 @@ function $o() {
2834
2836
  var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2835
2837
  if (a) {
2836
2838
  var s = (function(l) {
2837
- return !l || "left" in l && "top" in l || ((l = D({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2839
+ return !l || "left" in l && "top" in l || ((l = z({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2838
2840
  })(a);
2839
2841
  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);
2840
2842
  }
2841
- }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(ft, "restrict"), _n = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, Mn = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2842
- function Rn(t, e) {
2843
+ }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(ft, "restrict"), _n = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, An = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2844
+ function Mn(t, e) {
2843
2845
  for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
2844
2846
  var o = r[n];
2845
2847
  o in t || (t[o] = e[o]);
2846
2848
  }
2847
2849
  return t;
2848
2850
  }
2849
- var $e = { noInner: _n, noOuter: Mn, start: function(t) {
2851
+ var $e = { noInner: _n, noOuter: An, start: function(t) {
2850
2852
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
2851
2853
  i && (e = tt(Oe(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 };
2852
2854
  }, set: function(t) {
2853
2855
  var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
2854
2856
  if (n) {
2855
- var s = D({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
2856
- Rn(l, _n), Rn(d, Mn), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2857
+ var s = z({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
2858
+ Mn(l, _n), Mn(d, An), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2857
2859
  }
2858
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = D({ get elementRect() {
2860
+ }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = z({ get elementRect() {
2859
2861
  return { top: 0, left: 0, bottom: 1, right: 1 };
2860
2862
  }, set elementRect(t) {
2861
- } }, ft.defaults), Dr = _e({ start: ft.start, set: ft.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, zr = { width: 1 / 0, height: 1 / 0 }, Lr = _e({ start: function(t) {
2863
+ } }, ft.defaults), Dr = _e({ start: ft.start, set: ft.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, Lr = { width: 1 / 0, height: 1 / 0 }, zr = _e({ start: function(t) {
2862
2864
  return $e.start(t);
2863
2865
  }, set: function(t) {
2864
2866
  var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
2865
2867
  if (o) {
2866
- var a = gt(Oe(i.min, e, t.coords)) || Nr, s = gt(Oe(i.max, e, t.coords)) || zr;
2867
- n.options = { endOnly: i.endOnly, inner: D({}, $e.noInner), outer: D({}, $e.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), $e.set(t), n.options = i;
2868
+ var a = gt(Oe(i.min, e, t.coords)) || Nr, s = gt(Oe(i.max, e, t.coords)) || Lr;
2869
+ n.options = { endOnly: i.endOnly, inner: z({}, $e.noInner), outer: z({}, $e.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), $e.set(t), n.options = i;
2868
2870
  }
2869
- }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Lt = { start: function(t) {
2871
+ }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), zt = { start: function(t) {
2870
2872
  var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, d = l.offsetWithOrigin ? (function(b) {
2871
- var S = b.interaction.element, k = tt(ze(b.state.options.origin, null, null, [S])), R = k || Le(b.interactable, S, b.interaction.prepared.name);
2872
- return R;
2873
+ var S = b.interaction.element, C = tt(Le(b.state.options.origin, null, null, [S])), M = C || ze(b.interactable, S, b.interaction.prepared.name);
2874
+ return M;
2873
2875
  })(t) : { x: 0, y: 0 };
2874
2876
  if (l.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
2875
2877
  else {
2876
- var c = ze(l.offset, r, o, [n]);
2878
+ var c = Le(l.offset, r, o, [n]);
2877
2879
  (e = tt(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
2878
2880
  }
2879
2881
  var f = l.relativePoints;
@@ -2881,54 +2883,54 @@ function $o() {
2881
2883
  return { index: S, relativePoint: b, x: s.left - i.width * b.x + e.x, y: s.top - i.height * b.y + e.y };
2882
2884
  })) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
2883
2885
  }, set: function(t) {
2884
- var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = Le(e.interactable, e.element, e.prepared.name), s = D({}, n), l = [];
2886
+ var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = ze(e.interactable, e.element, e.prepared.name), s = z({}, n), l = [];
2885
2887
  o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
2886
- for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], b = s.x - f.x, S = s.y - f.y, k = 0, R = o.targets.length; k < R; k++) {
2887
- var O = o.targets[k], I = void 0;
2888
- (I = x.func(O) ? O(b, S, e._proxy, f, k) : O) && l.push({ x: (x.number(I.x) ? I.x : b) + f.x, y: (x.number(I.y) ? I.y : S) + f.y, range: x.number(I.range) ? I.range : o.range, source: O, index: k, offset: f });
2888
+ for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], b = s.x - f.x, S = s.y - f.y, C = 0, M = o.targets.length; C < M; C++) {
2889
+ var D = o.targets[C], O = void 0;
2890
+ (O = x.func(D) ? D(b, S, e._proxy, f, C) : D) && l.push({ x: (x.number(O.x) ? O.x : b) + f.x, y: (x.number(O.y) ? O.y : S) + f.y, range: x.number(O.range) ? O.range : o.range, source: D, index: C, offset: f });
2889
2891
  }
2890
- for (var z = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, U = 0; U < l.length; U++) {
2891
- var ee = l[U], B = ee.range, K = ee.x - s.x, me = ee.y - s.y, ae = Fe(K, me), ge = ae <= B;
2892
- B === 1 / 0 && z.inRange && z.range !== 1 / 0 && (ge = !1), z.target && !(ge ? z.inRange && B !== 1 / 0 ? ae / B < z.distance / z.range : B === 1 / 0 && z.range !== 1 / 0 || ae < z.distance : !z.inRange && ae < z.distance) || (z.target = ee, z.distance = ae, z.range = B, z.inRange = ge, z.delta.x = K, z.delta.y = me);
2892
+ for (var F = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, U = 0; U < l.length; U++) {
2893
+ var ee = l[U], q = ee.range, K = ee.x - s.x, ve = ee.y - s.y, ae = Fe(K, ve), ge = ae <= q;
2894
+ q === 1 / 0 && F.inRange && F.range !== 1 / 0 && (ge = !1), F.target && !(ge ? F.inRange && q !== 1 / 0 ? ae / q < F.distance / F.range : q === 1 / 0 && F.range !== 1 / 0 || ae < F.distance : !F.inRange && ae < F.distance) || (F.target = ee, F.distance = ae, F.range = q, F.inRange = ge, F.delta.x = K, F.delta.y = ve);
2893
2895
  }
2894
- return z.inRange && (n.x = z.target.x, n.y = z.target.y), r.closest = z, z;
2895
- }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(Lt, "snap"), ht = { start: function(t) {
2896
+ return F.inRange && (n.x = F.target.x, n.y = F.target.y), r.closest = F, F;
2897
+ }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(zt, "snap"), ht = { start: function(t) {
2896
2898
  var e = t.state, n = t.edges, r = e.options;
2897
2899
  if (!n) return null;
2898
- 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"]], Lt.start(t), e.offsets = t.state.offsets, t.state = e;
2900
+ 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"]], zt.start(t), e.offsets = t.state.offsets, t.state = e;
2899
2901
  }, set: function(t) {
2900
2902
  var e = t.interaction, n = t.state, r = t.coords, o = n.options, i = n.offsets, a = { x: r.x - i[0].x, y: r.y - i[0].y };
2901
- n.options = D({}, o), n.options.targets = [];
2903
+ n.options = z({}, o), n.options.targets = [];
2902
2904
  for (var s = 0, l = o.targets || []; s < l.length; s++) {
2903
2905
  var d = l[s], c = void 0;
2904
2906
  if (c = x.func(d) ? d(a.x, a.y, e) : d) {
2905
2907
  for (var f = 0, b = n.targetFields; f < b.length; f++) {
2906
- var S = b[f], k = S[0], R = S[1];
2907
- if (k in c || R in c) {
2908
- c.x = c[k], c.y = c[R];
2908
+ var S = b[f], C = S[0], M = S[1];
2909
+ if (C in c || M in c) {
2910
+ c.x = c[C], c.y = c[M];
2909
2911
  break;
2910
2912
  }
2911
2913
  }
2912
2914
  n.options.targets.push(c);
2913
2915
  }
2914
2916
  }
2915
- var O = Lt.set(t);
2916
- return n.options = o, O;
2917
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(ht, "snapSize"), Ft = { aspectRatio: Ar, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: Lr, snapEdges: _e({ start: function(t) {
2917
+ var D = zt.set(t);
2918
+ return n.options = o, D;
2919
+ }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(ht, "snapSize"), Ft = { aspectRatio: Rr, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: zr, snapEdges: _e({ start: function(t) {
2918
2920
  var e = t.edges;
2919
2921
  return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], ht.start(t)) : null;
2920
- }, set: ht.set, defaults: D(Ne(ht.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: pt, avoid: pt, transform: pt, rubberband: pt }, Hr = { id: "modifiers", install: function(t) {
2922
+ }, set: ht.set, defaults: z(Ne(ht.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: pt, avoid: pt, transform: pt, rubberband: pt }, Hr = { id: "modifiers", install: function(t) {
2921
2923
  var e = t.interactStatic;
2922
2924
  for (var n in t.usePlugin(dn), t.usePlugin(Tr), e.modifiers = Ft, Ft) {
2923
2925
  var r = Ft[n], o = r._defaults, i = r._methods;
2924
2926
  o._methods = i, t.defaults.perAction[n] = o;
2925
2927
  }
2926
- } }, Br = Hr, An = (function(t) {
2927
- M(n, t);
2928
- var e = A(n);
2928
+ } }, Br = Hr, Rn = (function(t) {
2929
+ A(n, t);
2930
+ var e = R(n);
2929
2931
  function n(r, o, i, a, s, l) {
2930
2932
  var d;
2931
- if (g(this, n), rt(P(d = e.call(this, s)), i), i !== o && rt(P(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = Vt(o), d.target = a, d.currentTarget = null, r === "tap") {
2933
+ if (y(this, n), rt(I(d = e.call(this, s)), i), i !== o && rt(I(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = Vt(o), d.target = a, d.currentTarget = null, r === "tap") {
2932
2934
  var c = s.getPointerIndex(o);
2933
2935
  d.dt = d.timeStamp - s.pointers[c].downTime;
2934
2936
  var f = d.timeStamp - s.tapTime;
@@ -2936,7 +2938,7 @@ function $o() {
2936
2938
  } else r === "doubletap" && (d.dt = o.timeStamp - s.tapTime, d.double = !0);
2937
2939
  return d;
2938
2940
  }
2939
- return y(n, [{ key: "_subtractOrigin", value: function(r) {
2941
+ return g(n, [{ key: "_subtractOrigin", value: function(r) {
2940
2942
  var o = r.x, i = r.y;
2941
2943
  return this.pageX -= o, this.pageY -= i, this.clientX -= o, this.clientY -= i, this;
2942
2944
  } }, { key: "_addOrigin", value: function(r) {
@@ -2946,7 +2948,7 @@ function $o() {
2946
2948
  this.originalEvent.preventDefault();
2947
2949
  } }]), n;
2948
2950
  })(at), Ve = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
2949
- t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, D(t.actions.phaselessTypes, Ve.types);
2951
+ t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, z(t.actions.phaselessTypes, Ve.types);
2950
2952
  }, listeners: { "interactions:new": function(t) {
2951
2953
  var e = t.interaction;
2952
2954
  e.prevTap = null, e.tapTime = 0;
@@ -2955,7 +2957,7 @@ function $o() {
2955
2957
  !e && n.hold || (n.hold = { duration: 1 / 0, timeout: null });
2956
2958
  }, "interactions:move": function(t, e) {
2957
2959
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
2958
- t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
2960
+ t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
2959
2961
  }, "interactions:down": function(t, e) {
2960
2962
  (function(n, r) {
2961
2963
  for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, d = o.pointers[l].hold, c = ue(s), f = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, b = 0; b < c.length; b++) {
@@ -2963,35 +2965,35 @@ function $o() {
2963
2965
  f.node = S, r.fire("pointerEvents:collect-targets", f);
2964
2966
  }
2965
2967
  if (f.targets.length) {
2966
- for (var k = 1 / 0, R = 0, O = f.targets; R < O.length; R++) {
2967
- var I = O[R].eventable.options.holdDuration;
2968
- I < k && (k = I);
2968
+ for (var C = 1 / 0, M = 0, D = f.targets; M < D.length; M++) {
2969
+ var O = D[M].eventable.options.holdDuration;
2970
+ O < C && (C = O);
2969
2971
  }
2970
- d.duration = k, d.timeout = setTimeout((function() {
2971
- Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
2972
- }), k);
2972
+ d.duration = C, d.timeout = setTimeout((function() {
2973
+ Me({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
2974
+ }), C);
2973
2975
  }
2974
- })(t, e), Re(t, e);
2976
+ })(t, e), Me(t, e);
2975
2977
  }, "interactions:up": function(t, e) {
2976
- jt(t), Re(t, e), (function(n, r) {
2978
+ jt(t), Me(t, e), (function(n, r) {
2977
2979
  var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget;
2978
- o.pointerWasMoved || Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "tap" }, r);
2980
+ o.pointerWasMoved || Me({ interaction: o, eventTarget: s, pointer: i, event: a, type: "tap" }, r);
2979
2981
  })(t, e);
2980
2982
  }, "interactions:cancel": function(t, e) {
2981
- jt(t), Re(t, e);
2982
- } }, PointerEvent: An, fire: Re, collectEventTargets: In, 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 } };
2983
- function Re(t, e) {
2984
- var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? In(t, e) : s, d = new An(a, r, o, i, n, e.now());
2983
+ jt(t), Me(t, e);
2984
+ } }, PointerEvent: Rn, fire: Me, collectEventTargets: In, 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 } };
2985
+ function Me(t, e) {
2986
+ var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? In(t, e) : s, d = new Rn(a, r, o, i, n, e.now());
2985
2987
  e.fire("pointerEvents:new", { pointerEvent: d });
2986
2988
  for (var c = { interaction: n, pointer: r, event: o, eventTarget: i, targets: l, type: a, pointerEvent: d }, f = 0; f < l.length; f++) {
2987
2989
  var b = l[f];
2988
2990
  for (var S in b.props || {}) d[S] = b.props[S];
2989
- var k = Le(b.eventable, b.node);
2990
- if (d._subtractOrigin(k), d.eventable = b.eventable, d.currentTarget = b.node, b.eventable.fire(d), d._addOrigin(k), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
2991
+ var C = ze(b.eventable, b.node);
2992
+ if (d._subtractOrigin(C), d.eventable = b.eventable, d.currentTarget = b.node, b.eventable.fire(d), d._addOrigin(C), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
2991
2993
  }
2992
2994
  if (e.fire("pointerEvents:fired", c), a === "tap") {
2993
- var R = d.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2994
- n.prevTap = R, n.tapTime = R.timeStamp;
2995
+ var M = d.double ? Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2996
+ n.prevTap = M, n.tapTime = M.timeStamp;
2995
2997
  }
2996
2998
  return d;
2997
2999
  }
@@ -3003,16 +3005,16 @@ function $o() {
3003
3005
  c.node = b, e.fire("pointerEvents:collect-targets", c);
3004
3006
  }
3005
3007
  return a === "hold" && (c.targets = c.targets.filter((function(S) {
3006
- var k, R;
3007
- return S.eventable.options.holdDuration === ((k = n.pointers[s]) == null || (R = k.hold) == null ? void 0 : R.duration);
3008
+ var C, M;
3009
+ return S.eventable.options.holdDuration === ((C = n.pointers[s]) == null || (M = C.hold) == null ? void 0 : M.duration);
3008
3010
  }))), c.targets;
3009
3011
  }
3010
3012
  function jt(t) {
3011
3013
  var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
3012
3014
  r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
3013
3015
  }
3014
- var Wr = Object.freeze({ __proto__: null, default: Ve });
3015
- function qr(t) {
3016
+ var qr = Object.freeze({ __proto__: null, default: Ve });
3017
+ function Wr(t) {
3016
3018
  var e = t.interaction;
3017
3019
  e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
3018
3020
  }
@@ -3021,7 +3023,7 @@ function $o() {
3021
3023
  var e = t.pointerEvents;
3022
3024
  e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
3023
3025
  }, listeners: ["move", "up", "cancel", "endall"].reduce((function(t, e) {
3024
- return t["pointerEvents:".concat(e)] = qr, t;
3026
+ return t["pointerEvents:".concat(e)] = Wr, t;
3025
3027
  }), { "pointerEvents:new": function(t) {
3026
3028
  var e = t.pointerEvent;
3027
3029
  e.type === "hold" && (e.count = (e.count || 0) + 1);
@@ -3036,7 +3038,7 @@ function $o() {
3036
3038
  } }) }, $r = Yr, Vr = { id: "pointer-events/interactableTargets", install: function(t) {
3037
3039
  var e = t.Interactable;
3038
3040
  e.prototype.pointerEvents = function(r) {
3039
- return D(this.events.options, r), this;
3041
+ return z(this.events.options, r), this;
3040
3042
  };
3041
3043
  var n = e.prototype._backCompatOption;
3042
3044
  e.prototype._backCompatOption = function(r, o) {
@@ -3056,9 +3058,9 @@ function $o() {
3056
3058
  };
3057
3059
  }, "interactable:set": function(t, e) {
3058
3060
  var n = t.interactable, r = t.options;
3059
- D(n.events.options, e.pointerEvents.defaults), D(n.events.options, r.pointerEvents || {});
3061
+ z(n.events.options, e.pointerEvents.defaults), z(n.events.options, r.pointerEvents || {});
3060
3062
  } } }, Ur = Vr, Xr = { id: "pointer-events", install: function(t) {
3061
- t.usePlugin(Wr), t.usePlugin($r), t.usePlugin(Ur);
3063
+ t.usePlugin(qr), t.usePlugin($r), t.usePlugin(Ur);
3062
3064
  } }, Gr = Xr, Kr = { id: "reflow", install: function(t) {
3063
3065
  var e = t.Interactable;
3064
3066
  t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
@@ -3066,15 +3068,15 @@ function $o() {
3066
3068
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, d = function() {
3067
3069
  var f = a[c], b = r.getRect(f);
3068
3070
  if (!b) return 1;
3069
- var S, k = Be(i.interactions.list, (function(I) {
3070
- return I.interacting() && I.interactable === r && I.element === f && I.prepared.name === o.name;
3071
+ var S, C = Be(i.interactions.list, (function(O) {
3072
+ return O.interacting() && O.interactable === r && O.element === f && O.prepared.name === o.name;
3071
3073
  }));
3072
- if (k) k.move(), l && (S = k._reflowPromise || new s((function(I) {
3073
- k._reflowResolve = I;
3074
+ if (C) C.move(), l && (S = C._reflowPromise || new s((function(O) {
3075
+ C._reflowResolve = O;
3074
3076
  })));
3075
3077
  else {
3076
- var R = gt(b), O = /* @__PURE__ */ (function(I) {
3077
- return { coords: I, get page() {
3078
+ var M = gt(b), D = /* @__PURE__ */ (function(O) {
3079
+ return { coords: O, get page() {
3078
3080
  return this.coords.page;
3079
3081
  }, get client() {
3080
3082
  return this.coords.client;
@@ -3100,15 +3102,15 @@ function $o() {
3100
3102
  return this.coords.buttons;
3101
3103
  }, preventDefault: function() {
3102
3104
  } };
3103
- })({ page: { x: R.x, y: R.y }, client: { x: R.x, y: R.y }, timeStamp: i.now() });
3104
- S = (function(I, z, U, ee, B) {
3105
- var K = I.interactions.new({ pointerType: "reflow" }), me = { interaction: K, event: B, pointer: B, eventTarget: U, phase: "reflow" };
3106
- K.interactable = z, K.element = U, K.prevEvent = B, K.updatePointer(B, B, U, !0), Wt(K.coords.delta), _t(K.prepared, ee), K._doPhase(me);
3107
- var ae = I.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3105
+ })({ page: { x: M.x, y: M.y }, client: { x: M.x, y: M.y }, timeStamp: i.now() });
3106
+ S = (function(O, F, U, ee, q) {
3107
+ var K = O.interactions.new({ pointerType: "reflow" }), ve = { interaction: K, event: q, pointer: q, eventTarget: U, phase: "reflow" };
3108
+ K.interactable = F, K.element = U, K.prevEvent = q, K.updatePointer(q, q, U, !0), qt(K.coords.delta), _t(K.prepared, ee), K._doPhase(ve);
3109
+ var ae = O.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3108
3110
  K._reflowResolve = Se;
3109
3111
  })) : void 0;
3110
- return K._reflowPromise = be, K.start(ee, z, U), K._interacting ? (K.move(me), K.end(B)) : (K.stop(), K._reflowResolve()), K.removePointer(B, B), be;
3111
- })(i, r, f, o, O);
3112
+ return K._reflowPromise = be, K.start(ee, F, U), K._interacting ? (K.move(ve), K.end(q)) : (K.stop(), K._reflowResolve()), K.removePointer(q, q), be;
3113
+ })(i, r, f, o, D);
3112
3114
  }
3113
3115
  l && l.push(S);
3114
3116
  }, c = 0; c < a.length && !d(); c++) ;
@@ -3123,45 +3125,45 @@ function $o() {
3123
3125
  r.splice(r.indexOf(o), 1);
3124
3126
  })(e.interactions.list, n));
3125
3127
  } } }, Jr = Kr;
3126
- if (ve.use(un), ve.use(mn), ve.use(Gr), ve.use(hr), ve.use(Br), ve.use(nr), ve.use($n), ve.use(Un), ve.use(Jr), ve.default = ve, m(v) === "object" && v) try {
3127
- v.exports = ve;
3128
+ if (me.use(un), me.use(vn), me.use(Gr), me.use(hr), me.use(Br), me.use(nr), me.use($n), me.use(Un), me.use(Jr), me.default = me, v(h) === "object" && h) try {
3129
+ h.exports = me;
3128
3130
  } catch {
3129
3131
  }
3130
- return ve.default = ve, ve;
3132
+ return me.default = me, me;
3131
3133
  }));
3132
3134
  })(Je, Je.exports)), Je.exports;
3133
3135
  }
3134
3136
  var Vo = /* @__PURE__ */ $o();
3135
- const Ze = /* @__PURE__ */ qo(Vo);
3136
- function Uo(v) {
3137
- const p = new DOMParser().parseFromString(v, "text/html");
3138
- return Array.from(p.querySelectorAll("img")).forEach((m) => {
3139
- if (!p.body.contains(m) || m.closest(".editor-image-wrapper")) return;
3140
- const w = m.getAttribute("src") || m.src;
3137
+ const Ze = /* @__PURE__ */ Wo(Vo);
3138
+ function Uo(h) {
3139
+ const p = new DOMParser().parseFromString(h, "text/html");
3140
+ return Array.from(p.querySelectorAll("img")).forEach((v) => {
3141
+ if (!p.body.contains(v) || v.closest(".editor-image-wrapper")) return;
3142
+ const w = v.getAttribute("src") || v.src;
3141
3143
  if (!w) return;
3142
- const y = document.createElement("img");
3143
- y.src = w, m.alt && (y.alt = m.alt), m.title && (y.title = m.title), y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3144
- const _ = m.getAttribute("width") || m.style.width || (m.naturalWidth > 0 ? `${m.naturalWidth}px` : null), M = document.createElement("div");
3145
- M.className = "editor-image-wrapper", M.style.display = "inline-block", M.style.position = "relative", M.style.maxWidth = "100%", M.style.width = _ && _ !== "0px" ? _.includes("px") ? _ : `${_}px` : "300px", M.style.height = "auto", M.contentEditable = "false", M.style.boxSizing = "border-box", M.style.touchAction = "none", M.style.userSelect = "none", M.appendChild(y);
3146
- const C = document.createElement("div");
3147
- C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(M);
3148
- let T = m;
3149
- const P = m.closest("figure"), A = m.closest("picture");
3150
- if (P && p.body.contains(P))
3151
- T = P;
3152
- else if (A && p.body.contains(A))
3153
- T = A;
3144
+ const g = document.createElement("img");
3145
+ g.src = w, v.alt && (g.alt = v.alt), v.title && (g.title = v.title), g.style.maxWidth = "100%", g.style.width = "100%", g.style.height = "auto", g.style.cursor = "pointer", g.draggable = !1;
3146
+ const T = v.getAttribute("width") || v.style.width || (v.naturalWidth > 0 ? `${v.naturalWidth}px` : null), A = document.createElement("div");
3147
+ A.className = "editor-image-wrapper", A.style.display = "inline-block", A.style.position = "relative", A.style.maxWidth = "100%", A.style.width = T && T !== "0px" ? T.includes("px") ? T : `${T}px` : "300px", A.style.height = "auto", A.contentEditable = "false", A.style.boxSizing = "border-box", A.style.touchAction = "none", A.style.userSelect = "none", A.appendChild(g);
3148
+ const k = document.createElement("div");
3149
+ k.className = "editor-image-container", k.style.margin = "10px 0", k.style.textAlign = "left", k.style.display = "block", k.appendChild(A);
3150
+ let _ = v;
3151
+ const I = v.closest("figure"), R = v.closest("picture");
3152
+ if (I && p.body.contains(I))
3153
+ _ = I;
3154
+ else if (R && p.body.contains(R))
3155
+ _ = R;
3154
3156
  else {
3155
- let j = m.parentNode;
3157
+ let j = v.parentNode;
3156
3158
  for (; j && j !== p.body && j.parentNode !== p.body && Array.from(j.childNodes).filter(
3157
- (N) => N.nodeType === Node.ELEMENT_NODE || N.nodeType === Node.TEXT_NODE && N.textContent?.trim()
3159
+ (P) => P.nodeType === Node.ELEMENT_NODE || P.nodeType === Node.TEXT_NODE && P.textContent?.trim()
3158
3160
  ).length === 1; )
3159
- T = j, j = j.parentNode;
3161
+ _ = j, j = j.parentNode;
3160
3162
  }
3161
- T && T.parentNode && p.body.contains(T) ? T.parentNode.replaceChild(C, T) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(C, m);
3163
+ _ && _.parentNode && p.body.contains(_) ? _.parentNode.replaceChild(k, _) : v.parentNode && p.body.contains(v) && v.parentNode.replaceChild(k, v);
3162
3164
  }), p.body.innerHTML;
3163
3165
  }
3164
- function Xo(v, h) {
3166
+ function Xo(h, m) {
3165
3167
  const p = document.createElement("div");
3166
3168
  p.classList.add("editor"), p.contentEditable = "true", p.style.color = "#000000", p.style.border = "1px solid #e1e1e1", p.style.height = "400px", p.style.overflowY = "auto", p.style.padding = "15px", p.style.fontFamily = "Arial, sans-serif", p.style.fontSize = "14px", p.style.lineHeight = "1.5", p.style.outline = "none", p.style.backgroundColor = "#ffffff", p.style.borderRadius = "4px", p.style.boxShadow = "inset 0 1px 3px rgba(0,0,0,0.1)", p.style.direction = "ltr", p.style.textAlign = "left", p.style.scrollbarWidth = "none", p.style.msOverflowStyle = "none";
3167
3169
  const u = document.createElement("style");
@@ -3182,61 +3184,99 @@ function Xo(v, h) {
3182
3184
  w.preventDefault(), w.stopPropagation();
3183
3185
  }), p.addEventListener("drop", (w) => {
3184
3186
  w.preventDefault(), w.stopPropagation();
3185
- const y = w.clientX, _ = w.clientY;
3186
- let M = null;
3187
+ const g = w.clientX, T = w.clientY;
3188
+ let A = null;
3187
3189
  if (document.caretRangeFromPoint)
3188
- M = document.caretRangeFromPoint(y, _);
3190
+ A = document.caretRangeFromPoint(g, T);
3189
3191
  else if (document.caretPositionFromPoint) {
3190
- const T = document.caretPositionFromPoint(y, _);
3191
- T && (M = document.createRange(), M.setStart(T.offsetNode, T.offset));
3192
+ const _ = document.caretPositionFromPoint(g, T);
3193
+ _ && (A = document.createRange(), A.setStart(_.offsetNode, _.offset));
3192
3194
  }
3193
- const C = w.dataTransfer?.files;
3194
- if (C && C.length > 0)
3195
- for (let T = 0; T < C.length; T++) {
3196
- const P = C[T];
3197
- if (P.type.startsWith("image/")) {
3198
- const A = new FileReader();
3199
- A.onload = (j) => {
3200
- const F = document.createElement("img");
3201
- F.src = j.target?.result, F.style.maxWidth = "100%", F.style.width = "100%", F.style.height = "auto", F.style.cursor = "pointer", F.draggable = !1;
3202
- const N = document.createElement("div");
3203
- N.className = "editor-image-wrapper", N.style.display = "inline-block", N.style.position = "relative", N.style.maxWidth = "100%", N.style.width = "auto", N.style.height = "auto", N.contentEditable = "false", N.style.userSelect = "none", N.style.boxSizing = "border-box", N.style.touchAction = "none", N.appendChild(F);
3204
- const $ = document.createElement("div");
3205
- if ($.className = "editor-image-container", $.style.margin = "10px 0", $.style.textAlign = "left", $.style.display = "block", $.appendChild(N), M)
3195
+ const k = w.dataTransfer?.files;
3196
+ if (k && k.length > 0)
3197
+ for (let _ = 0; _ < k.length; _++) {
3198
+ const I = k[_];
3199
+ if (I.type.startsWith("image/")) {
3200
+ const R = new FileReader();
3201
+ R.onload = (j) => {
3202
+ const N = document.createElement("img");
3203
+ N.src = j.target?.result, N.style.maxWidth = "100%", N.style.width = "100%", N.style.height = "auto", N.style.cursor = "pointer", N.draggable = !1;
3204
+ const P = document.createElement("div");
3205
+ P.className = "editor-image-wrapper", P.style.display = "inline-block", P.style.position = "relative", P.style.maxWidth = "100%", P.style.width = "auto", P.style.height = "auto", P.contentEditable = "false", P.style.userSelect = "none", P.style.boxSizing = "border-box", P.style.touchAction = "none", P.appendChild(N);
3206
+ const H = document.createElement("div");
3207
+ if (H.className = "editor-image-container", H.style.margin = "10px 0", H.style.textAlign = "left", H.style.display = "block", H.appendChild(P), A)
3206
3208
  try {
3207
- M.insertNode($);
3209
+ A.insertNode(H);
3208
3210
  const L = window.getSelection();
3209
3211
  if (L) {
3210
3212
  L.removeAllRanges();
3211
3213
  const V = document.createRange();
3212
- V.setStartAfter($), V.collapse(!0), L.addRange(V), de(V);
3214
+ V.setStartAfter(H), V.collapse(!0), L.addRange(V), de(V);
3213
3215
  }
3214
3216
  } catch {
3215
- p.appendChild($);
3217
+ p.appendChild(H);
3216
3218
  }
3217
3219
  else
3218
- p.appendChild($);
3220
+ p.appendChild(H);
3219
3221
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
3220
- }, A.readAsDataURL(P);
3221
- }
3222
- }
3222
+ }, R.readAsDataURL(I);
3223
+ }
3224
+ }
3225
+ }), p.addEventListener("copy", (w) => {
3226
+ const g = window.getSelection();
3227
+ if (!g || g.rangeCount === 0) return;
3228
+ const A = g.getRangeAt(0).cloneContents(), k = document.createElement("div");
3229
+ k.appendChild(A), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3230
+ const P = N.querySelector("img");
3231
+ if (P) {
3232
+ const H = P, L = N;
3233
+ L.style.width && H.setAttribute(
3234
+ "width",
3235
+ parseInt(L.style.width).toString()
3236
+ );
3237
+ }
3238
+ }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3239
+ const P = N;
3240
+ P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3241
+ });
3242
+ const R = k.innerHTML, j = g.toString();
3243
+ w.clipboardData?.setData("text/html", R), w.clipboardData?.setData("text/plain", j), w.preventDefault();
3244
+ }), p.addEventListener("cut", (w) => {
3245
+ const g = window.getSelection();
3246
+ if (!g || g.rangeCount === 0) return;
3247
+ const T = g.getRangeAt(0), A = T.cloneContents(), k = document.createElement("div");
3248
+ k.appendChild(A), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3249
+ const P = N.querySelector("img");
3250
+ if (P) {
3251
+ const H = P, L = N;
3252
+ L.style.width && H.setAttribute(
3253
+ "width",
3254
+ parseInt(L.style.width).toString()
3255
+ );
3256
+ }
3257
+ }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3258
+ const P = N;
3259
+ P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3260
+ });
3261
+ const R = k.innerHTML, j = g.toString();
3262
+ w.clipboardData?.setData("text/html", R), w.clipboardData?.setData("text/plain", j), w.preventDefault(), T.deleteContents(), p.dispatchEvent(new Event("input", { bubbles: !0 }));
3223
3263
  }), p.addEventListener("paste", async (w) => {
3224
3264
  w.preventDefault();
3225
- const y = w.clipboardData;
3226
- if (!y) return;
3227
- const M = Array.from(y.items).filter((P) => P.type.startsWith("image/"));
3228
- if (M.length > 0) {
3229
- for (const P of M) {
3230
- const A = P.getAsFile();
3231
- if (A) {
3265
+ const g = w.clipboardData;
3266
+ if (!g) return;
3267
+ const A = Array.from(g.items).filter((I) => I.type.startsWith("image/"));
3268
+ if (A.length > 0) {
3269
+ for (const I of A) {
3270
+ const R = I.getAsFile();
3271
+ if (R) {
3232
3272
  const j = new FileReader();
3233
- j.onload = (F) => {
3234
- const N = F.target?.result;
3235
- if (N) {
3236
- const $ = document.createElement("img");
3237
- $.src = N, $.style.maxWidth = "100%", $.style.width = "100%", $.style.height = "auto", $.style.cursor = "pointer", $.draggable = !1;
3273
+ j.onload = (N) => {
3274
+ const P = N.target?.result;
3275
+ if (P) {
3276
+ const H = document.createElement("img");
3277
+ H.src = P, H.style.maxWidth = "100%", H.style.width = "100%", H.style.height = "auto", H.style.cursor = "pointer", H.draggable = !1;
3238
3278
  const L = document.createElement("div");
3239
- L.className = "editor-image-wrapper", L.style.display = "inline-block", L.style.position = "relative", L.style.maxWidth = "100%", L.style.width = "auto", L.style.height = "auto", L.contentEditable = "false", L.style.boxSizing = "border-box", L.style.touchAction = "none", L.style.userSelect = "none", L.appendChild($);
3279
+ L.className = "editor-image-wrapper", L.style.display = "inline-block", L.style.position = "relative", L.style.maxWidth = "100%", L.style.width = "auto", L.style.height = "auto", L.contentEditable = "false", L.style.boxSizing = "border-box", L.style.touchAction = "none", L.style.userSelect = "none", L.appendChild(H);
3240
3280
  const V = document.createElement("div");
3241
3281
  V.className = "editor-image-container", V.style.margin = "10px 0", V.style.textAlign = "left", V.style.display = "block", V.appendChild(L);
3242
3282
  const Z = window.getSelection();
@@ -3248,143 +3288,143 @@ function Xo(v, h) {
3248
3288
  p.appendChild(V);
3249
3289
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3250
3290
  }
3251
- }, j.readAsDataURL(A);
3291
+ }, j.readAsDataURL(R);
3252
3292
  }
3253
3293
  }
3254
3294
  return;
3255
3295
  }
3256
- let C = y.getData("text/html");
3257
- C ? C = Uo(C) : C = y.getData("text/plain");
3258
- const T = window.getSelection();
3259
- if (T && T.rangeCount > 0) {
3260
- const P = T.getRangeAt(0), A = document.createElement("div");
3261
- A.innerHTML = C;
3296
+ let k = g.getData("text/html");
3297
+ k ? k = Uo(k) : k = g.getData("text/plain");
3298
+ const _ = window.getSelection();
3299
+ if (_ && _.rangeCount > 0) {
3300
+ const I = _.getRangeAt(0), R = document.createElement("div");
3301
+ R.innerHTML = k;
3262
3302
  const j = document.createDocumentFragment();
3263
- for (; A.firstChild; )
3264
- j.appendChild(A.firstChild);
3265
- P.deleteContents(), P.insertNode(j), P.collapse(!1), T.removeAllRanges(), T.addRange(P);
3303
+ for (; R.firstChild; )
3304
+ j.appendChild(R.firstChild);
3305
+ I.deleteContents(), I.insertNode(j), I.collapse(!1), _.removeAllRanges(), _.addRange(I);
3266
3306
  } else {
3267
- const P = document.createElement("div");
3268
- for (P.innerHTML = C; P.firstChild; )
3269
- p.appendChild(P.firstChild);
3307
+ const I = document.createElement("div");
3308
+ for (I.innerHTML = k; I.firstChild; )
3309
+ p.appendChild(I.firstChild);
3270
3310
  }
3271
3311
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3272
3312
  }), p.addEventListener("click", (w) => {
3273
- const y = w.target;
3274
- let _ = null;
3275
- if (y.tagName === "IMG" ? _ = y.parentElement : y.classList.contains("editor-image-wrapper") && (_ = y), _ && _.classList.contains("editor-image-wrapper")) {
3276
- w.preventDefault(), w.stopPropagation(), p.querySelectorAll(".editor-image-wrapper").forEach((T) => {
3277
- if (T !== _ && T.classList.contains("resizable")) {
3278
- const P = T, A = P.getBoundingClientRect(), j = Math.round(A.width) + "px", F = Math.round(A.height) + "px";
3279
- Ze(P).unset(), P.classList.remove("resizable"), P.style.border = "none", P.style.transform = "", P.dataset.x = "", P.dataset.y = "", P.style.width = j, P.style.height = F, P.contentEditable = "false";
3280
- const N = P.querySelector("img");
3281
- N && (N.style.width = "100%", N.style.height = "100%");
3282
- }
3283
- }), h(_);
3284
- const C = _.parentElement;
3285
- C && (C.classList.contains("editor-image-container") || C.tagName === "DIV" || C.tagName === "P") && (window.__selectedImageContainer = C, console.log("Selected image container:", C));
3313
+ const g = w.target;
3314
+ let T = null;
3315
+ if (g.tagName === "IMG" ? T = g.parentElement : g.classList.contains("editor-image-wrapper") && (T = g), T && T.classList.contains("editor-image-wrapper")) {
3316
+ w.preventDefault(), w.stopPropagation(), p.querySelectorAll(".editor-image-wrapper").forEach((_) => {
3317
+ if (_ !== T && _.classList.contains("resizable")) {
3318
+ const I = _, R = I.getBoundingClientRect(), j = Math.round(R.width) + "px", N = Math.round(R.height) + "px";
3319
+ Ze(I).unset(), I.classList.remove("resizable"), I.style.border = "none", I.style.transform = "", I.dataset.x = "", I.dataset.y = "", I.style.width = j, I.style.height = N, I.contentEditable = "false";
3320
+ const P = I.querySelector("img");
3321
+ P && (P.style.width = "100%", P.style.height = "100%");
3322
+ }
3323
+ }), m(T);
3324
+ const k = T.parentElement;
3325
+ k && (k.classList.contains("editor-image-container") || k.tagName === "DIV" || k.tagName === "P") && (window.__selectedImageContainer = k, console.log("Selected image container:", k));
3286
3326
  } else
3287
3327
  window.__selectedImageContainer = null, p.querySelectorAll(
3288
3328
  ".editor-image-wrapper.resizable"
3289
- ).forEach((C) => {
3290
- const T = C, P = T.getBoundingClientRect(), A = Math.round(P.width) + "px", j = Math.round(P.height) + "px";
3291
- Ze(T).unset(), T.classList.remove("resizable"), T.style.border = "none", T.style.transform = "", T.dataset.x = "", T.dataset.y = "", T.style.width = A, T.style.height = j, T.contentEditable = "false";
3292
- const F = T.querySelector("img");
3293
- F && (F.style.width = "100%", F.style.height = "100%");
3329
+ ).forEach((k) => {
3330
+ const _ = k, I = _.getBoundingClientRect(), R = Math.round(I.width) + "px", j = Math.round(I.height) + "px";
3331
+ Ze(_).unset(), _.classList.remove("resizable"), _.style.border = "none", _.style.transform = "", _.dataset.x = "", _.dataset.y = "", _.style.width = R, _.style.height = j, _.contentEditable = "false";
3332
+ const N = _.querySelector("img");
3333
+ N && (N.style.width = "100%", N.style.height = "100%");
3294
3334
  }), de();
3295
3335
  }), p.addEventListener("keyup", () => de()), p.addEventListener("mouseup", () => de()), p.addEventListener("focus", () => de()), window.addEventListener("selectionchange", () => {
3296
3336
  try {
3297
3337
  const w = window.getSelection();
3298
3338
  if (!w || !w.anchorNode) return;
3299
- let y = w.anchorNode;
3300
- for (; y && y.nodeType !== Node.ELEMENT_NODE; )
3301
- y = y.parentNode;
3302
- if (!y) return;
3303
- p.contains(y) && de();
3339
+ let g = w.anchorNode;
3340
+ for (; g && g.nodeType !== Node.ELEMENT_NODE; )
3341
+ g = g.parentNode;
3342
+ if (!g) return;
3343
+ p.contains(g) && de();
3304
3344
  } catch {
3305
3345
  }
3306
3346
  });
3307
- const m = () => {
3347
+ const v = () => {
3308
3348
  if (!p.firstChild) {
3309
3349
  p.innerHTML = "<p><br></p>";
3310
3350
  return;
3311
3351
  }
3312
3352
  const w = Array.from(p.childNodes);
3313
- for (const y of w)
3314
- if (y.nodeType === Node.TEXT_NODE && y.textContent?.trim()) {
3315
- const _ = window.getSelection();
3316
- let M = null;
3317
- _ && _.rangeCount > 0 && (M = _.getRangeAt(0).cloneRange());
3318
- const C = document.createElement("p");
3319
- if (y.parentNode?.insertBefore(C, y), C.appendChild(y), M && _)
3353
+ for (const g of w)
3354
+ if (g.nodeType === Node.TEXT_NODE && g.textContent?.trim()) {
3355
+ const T = window.getSelection();
3356
+ let A = null;
3357
+ T && T.rangeCount > 0 && (A = T.getRangeAt(0).cloneRange());
3358
+ const k = document.createElement("p");
3359
+ if (g.parentNode?.insertBefore(k, g), k.appendChild(g), A && T)
3320
3360
  try {
3321
- _.removeAllRanges(), _.addRange(M);
3361
+ T.removeAllRanges(), T.addRange(A);
3322
3362
  } catch {
3323
3363
  }
3324
3364
  }
3325
3365
  };
3326
- let g = null;
3366
+ let y = null;
3327
3367
  return p.addEventListener("input", () => {
3328
- g && clearTimeout(g), g = setTimeout(() => m(), 100);
3329
- }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : m(), p;
3368
+ y && clearTimeout(y), y = setTimeout(() => v(), 100);
3369
+ }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : v(), p;
3330
3370
  }
3331
- function On(v) {
3332
- const h = document.createElement("input");
3333
- h.type = "file", h.accept = "image/*", h.onchange = (p) => {
3371
+ function On(h) {
3372
+ const m = document.createElement("input");
3373
+ m.type = "file", m.accept = "image/*", m.onchange = (p) => {
3334
3374
  const u = p.target.files?.[0];
3335
3375
  if (u) {
3336
- const m = new FileReader();
3337
- m.onload = (g) => {
3376
+ const v = new FileReader();
3377
+ v.onload = (y) => {
3338
3378
  const w = document.createElement("img");
3339
- w.src = g.target?.result, w.style.maxWidth = "100%", w.style.width = "100%", w.style.height = "auto", w.style.cursor = "pointer", w.draggable = !1;
3340
- const y = document.createElement("div");
3341
- y.className = "editor-image-wrapper", y.style.display = "inline-block", y.style.position = "relative", y.style.maxWidth = "100%", y.style.width = "auto", y.style.height = "auto", y.contentEditable = "false", y.style.boxSizing = "border-box", y.style.touchAction = "none", y.style.userSelect = "none", y.appendChild(w);
3342
- const _ = document.createElement("div");
3343
- _.className = "editor-image-container", _.style.margin = "10px 0", _.style.textAlign = "left", _.style.display = "block", _.appendChild(y);
3379
+ w.src = y.target?.result, w.style.maxWidth = "100%", w.style.width = "100%", w.style.height = "auto", w.style.cursor = "pointer", w.draggable = !1;
3380
+ const g = document.createElement("div");
3381
+ g.className = "editor-image-wrapper", g.style.display = "inline-block", g.style.position = "relative", g.style.maxWidth = "100%", g.style.width = "auto", g.style.height = "auto", g.contentEditable = "false", g.style.boxSizing = "border-box", g.style.touchAction = "none", g.style.userSelect = "none", g.appendChild(w);
3382
+ const T = document.createElement("div");
3383
+ T.className = "editor-image-container", T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block", T.appendChild(g);
3344
3384
  try {
3345
- Ae();
3346
- const M = window.getSelection();
3347
- if (M && M.rangeCount > 0) {
3348
- M.getRangeAt(0).insertNode(_), M.removeAllRanges();
3349
- const T = document.createRange();
3350
- T.setStartAfter(_), T.collapse(!0), M.addRange(T), de(T);
3385
+ Re();
3386
+ const A = window.getSelection();
3387
+ if (A && A.rangeCount > 0) {
3388
+ A.getRangeAt(0).insertNode(T), A.removeAllRanges();
3389
+ const _ = document.createRange();
3390
+ _.setStartAfter(T), _.collapse(!0), A.addRange(_), de(_);
3351
3391
  } else
3352
- v.appendChild(_), v.focus(), de();
3392
+ h.appendChild(T), h.focus(), de();
3353
3393
  } catch {
3354
- v.appendChild(_), v.focus(), de();
3394
+ h.appendChild(T), h.focus(), de();
3355
3395
  }
3356
- v.dispatchEvent(new Event("input", { bubbles: !0 })), v.focus();
3357
- }, m.readAsDataURL(u);
3396
+ h.dispatchEvent(new Event("input", { bubbles: !0 })), h.focus();
3397
+ }, v.readAsDataURL(u);
3358
3398
  }
3359
- }, h.click();
3399
+ }, m.click();
3360
3400
  }
3361
- function Go(v) {
3362
- let h = null;
3363
- if (v.tagName === "IMG" ? h = v.parentElement : h = v, !h) return;
3364
- const p = h.querySelector("img");
3401
+ function Go(h) {
3402
+ let m = null;
3403
+ if (h.tagName === "IMG" ? m = h.parentElement : m = h, !m) return;
3404
+ const p = m.querySelector("img");
3365
3405
  if (p)
3366
- if (h.classList.contains("resizable")) {
3367
- const u = h.getBoundingClientRect(), m = Math.round(u.width) + "px", g = Math.round(u.height) + "px";
3368
- Ze(h).unset(), h.classList.remove("resizable"), h.style.border = "none", h.style.transform = "", h.dataset.x = "", h.dataset.y = "", h.style.width = m, h.style.height = g, h.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3369
- const w = h.closest(".editor");
3406
+ if (m.classList.contains("resizable")) {
3407
+ const u = m.getBoundingClientRect(), v = Math.round(u.width) + "px", y = Math.round(u.height) + "px";
3408
+ Ze(m).unset(), m.classList.remove("resizable"), m.style.border = "none", m.style.transform = "", m.dataset.x = "", m.dataset.y = "", m.style.width = v, m.style.height = y, m.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3409
+ const w = m.closest(".editor");
3370
3410
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3371
3411
  } else {
3372
- h.classList.add("resizable"), h.style.border = "2px dashed #007bff", h.style.position = "relative", h.style.userSelect = "none";
3373
- const u = h.getBoundingClientRect();
3374
- h.style.width = u.width + "px", h.style.height = u.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), Ze(h).resizable({
3412
+ m.classList.add("resizable"), m.style.border = "2px dashed #007bff", m.style.position = "relative", m.style.userSelect = "none";
3413
+ const u = m.getBoundingClientRect();
3414
+ m.style.width = u.width + "px", m.style.height = u.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), Ze(m).resizable({
3375
3415
  edges: { left: !0, right: !0, bottom: !0, top: !0 },
3376
3416
  listeners: {
3377
- move: (m) => {
3378
- const g = m.target;
3379
- Object.assign(g.style, {
3380
- width: `${m.rect.width}px`,
3381
- height: `${m.rect.height}px`
3417
+ move: (v) => {
3418
+ const y = v.target;
3419
+ Object.assign(y.style, {
3420
+ width: `${v.rect.width}px`,
3421
+ height: `${v.rect.height}px`
3382
3422
  });
3383
- const w = g.closest(".editor");
3423
+ const w = y.closest(".editor");
3384
3424
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3385
3425
  },
3386
- end: (m) => {
3387
- const w = m.target.closest(".editor");
3426
+ end: (v) => {
3427
+ const w = v.target.closest(".editor");
3388
3428
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3389
3429
  }
3390
3430
  },
@@ -3403,11 +3443,11 @@ class Ko {
3403
3443
  this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Xo(
3404
3444
  () => On(this.editor),
3405
3445
  (p) => Go(p)
3406
- ), this.toolbar = Wo(this.container);
3407
- const h = this.toolbar.querySelector(
3446
+ ), this.toolbar = qo(this.container);
3447
+ const m = this.toolbar.querySelector(
3408
3448
  '[role="button"][title="Insert Image"]'
3409
3449
  );
3410
- h && (h.addEventListener("mousedown", () => de()), h.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3450
+ m && (m.addEventListener("mousedown", () => de()), m.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3411
3451
  }
3412
3452
  getElement() {
3413
3453
  return this.container;
@@ -3415,8 +3455,8 @@ class Ko {
3415
3455
  getHTML() {
3416
3456
  return this.editor.innerHTML;
3417
3457
  }
3418
- setHTML(h) {
3419
- this.editor.innerHTML = h, this.wrapUnwrappedImages();
3458
+ setHTML(m) {
3459
+ this.editor.innerHTML = m, this.wrapUnwrappedImages();
3420
3460
  }
3421
3461
  wrapUnwrappedImages() {
3422
3462
  Array.from(this.editor.querySelectorAll("img")).forEach((p) => {
@@ -3424,73 +3464,73 @@ class Ko {
3424
3464
  return;
3425
3465
  const u = p.parentElement;
3426
3466
  if (u && u.classList.contains("editor-image-wrapper")) {
3427
- const T = p;
3428
- T.style.maxWidth = "100%", T.style.width = "100%", T.style.height = "auto", T.style.cursor = "pointer", T.draggable = !1, u.contentEditable = "false", u.style.display || (u.style.display = "inline-block"), u.style.position || (u.style.position = "relative"), u.style.maxWidth = "100%", u.style.boxSizing = "border-box", u.style.touchAction = "none", u.style.userSelect = "none", (!u.style.width || u.style.width === "0px") && (u.style.width = "300px");
3467
+ const _ = p;
3468
+ _.style.maxWidth = "100%", _.style.width = "100%", _.style.height = "auto", _.style.cursor = "pointer", _.draggable = !1, u.contentEditable = "false", u.style.display || (u.style.display = "inline-block"), u.style.position || (u.style.position = "relative"), u.style.maxWidth = "100%", u.style.boxSizing = "border-box", u.style.touchAction = "none", u.style.userSelect = "none", (!u.style.width || u.style.width === "0px") && (u.style.width = "300px");
3429
3469
  return;
3430
3470
  }
3431
- const m = document.createElement("div");
3432
- m.className = "editor-image-wrapper", m.style.display = "inline-block", m.style.position = "relative", m.style.maxWidth = "100%", m.style.width = "300px", m.contentEditable = "false", m.style.userSelect = "none", m.style.boxSizing = "border-box", m.style.touchAction = "none";
3433
- const g = p;
3434
- g.style.maxWidth = "100%", g.style.width = "100%", g.style.height = "auto", g.style.cursor = "pointer", g.draggable = !1;
3435
- const w = (T) => {
3436
- if (!T) return null;
3437
- const P = String(T).match(/(\d+(?:\.\d+)?)/);
3438
- if (!P) return null;
3439
- const A = Math.round(Number(P[1]));
3440
- return Number.isFinite(A) && A > 0 ? A : null;
3441
- }, y = w(g.getAttribute("width")) ?? w(g.style.width) ?? w(g.getAttribute("style"));
3442
- y ? m.style.width = `${y}px` : g.onload = () => {
3443
- const T = this.editor.clientWidth || 0, P = g.naturalWidth || 0;
3444
- if (P > 0) {
3445
- const A = T > 0 ? Math.min(P, T) : P;
3446
- m.style.width = `${A}px`;
3471
+ const v = document.createElement("div");
3472
+ v.className = "editor-image-wrapper", v.style.display = "inline-block", v.style.position = "relative", v.style.maxWidth = "100%", v.style.width = "300px", v.contentEditable = "false", v.style.userSelect = "none", v.style.boxSizing = "border-box", v.style.touchAction = "none";
3473
+ const y = p;
3474
+ y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3475
+ const w = (_) => {
3476
+ if (!_) return null;
3477
+ const I = String(_).match(/(\d+(?:\.\d+)?)/);
3478
+ if (!I) return null;
3479
+ const R = Math.round(Number(I[1]));
3480
+ return Number.isFinite(R) && R > 0 ? R : null;
3481
+ }, g = w(y.getAttribute("width")) ?? w(y.style.width) ?? w(y.getAttribute("style"));
3482
+ g ? v.style.width = `${g}px` : y.onload = () => {
3483
+ const _ = this.editor.clientWidth || 0, I = y.naturalWidth || 0;
3484
+ if (I > 0) {
3485
+ const R = _ > 0 ? Math.min(I, _) : I;
3486
+ v.style.width = `${R}px`;
3447
3487
  }
3448
3488
  };
3449
- const _ = document.createElement("div");
3450
- _.className = "editor-image-container", _.style.margin = "10px 0", _.style.textAlign = "left", _.style.display = "block";
3451
- const M = g.closest("figure") ?? g.closest(".se-image-container") ?? g, C = M.parentNode;
3452
- C && this.editor.contains(M) && C.contains(M) && (m.appendChild(g), _.appendChild(m), C.replaceChild(_, M));
3489
+ const T = document.createElement("div");
3490
+ T.className = "editor-image-container", T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block";
3491
+ const A = y.closest("figure") ?? y.closest(".se-image-container") ?? y, k = A.parentNode;
3492
+ k && this.editor.contains(A) && k.contains(A) && (v.appendChild(y), T.appendChild(v), k.replaceChild(T, A));
3453
3493
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3454
3494
  }
3455
3495
  }
3456
- var mt = { exports: {} }, Ge = {};
3496
+ var vt = { exports: {} }, Ge = {};
3457
3497
  var Dn;
3458
3498
  function Jo() {
3459
3499
  if (Dn) return Ge;
3460
3500
  Dn = 1;
3461
- var v = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
3462
- function p(u, m, g) {
3501
+ var h = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
3502
+ function p(u, v, y) {
3463
3503
  var w = null;
3464
- if (g !== void 0 && (w = "" + g), m.key !== void 0 && (w = "" + m.key), "key" in m) {
3465
- g = {};
3466
- for (var y in m)
3467
- y !== "key" && (g[y] = m[y]);
3468
- } else g = m;
3469
- return m = g.ref, {
3470
- $$typeof: v,
3504
+ if (y !== void 0 && (w = "" + y), v.key !== void 0 && (w = "" + v.key), "key" in v) {
3505
+ y = {};
3506
+ for (var g in v)
3507
+ g !== "key" && (y[g] = v[g]);
3508
+ } else y = v;
3509
+ return v = y.ref, {
3510
+ $$typeof: h,
3471
3511
  type: u,
3472
3512
  key: w,
3473
- ref: m !== void 0 ? m : null,
3474
- props: g
3513
+ ref: v !== void 0 ? v : null,
3514
+ props: y
3475
3515
  };
3476
3516
  }
3477
- return Ge.Fragment = h, Ge.jsx = p, Ge.jsxs = p, Ge;
3517
+ return Ge.Fragment = m, Ge.jsx = p, Ge.jsxs = p, Ge;
3478
3518
  }
3479
3519
  var Ke = {};
3480
3520
  var Nn;
3481
3521
  function Qo() {
3482
3522
  return Nn || (Nn = 1, process.env.NODE_ENV !== "production" && (function() {
3483
- function v(E) {
3523
+ function h(E) {
3484
3524
  if (E == null) return null;
3485
3525
  if (typeof E == "function")
3486
3526
  return E.$$typeof === ce ? null : E.displayName || E.name || null;
3487
3527
  if (typeof E == "string") return E;
3488
3528
  switch (E) {
3489
- case N:
3529
+ case P:
3490
3530
  return "Fragment";
3491
3531
  case L:
3492
3532
  return "Profiler";
3493
- case $:
3533
+ case H:
3494
3534
  return "StrictMode";
3495
3535
  case te:
3496
3536
  return "Suspense";
@@ -3503,100 +3543,100 @@ function Qo() {
3503
3543
  switch (typeof E.tag == "number" && console.error(
3504
3544
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3505
3545
  ), E.$$typeof) {
3506
- case F:
3546
+ case N:
3507
3547
  return "Portal";
3508
3548
  case Z:
3509
3549
  return E.displayName || "Context";
3510
3550
  case V:
3511
3551
  return (E._context.displayName || "Context") + ".Consumer";
3512
3552
  case ie:
3513
- var H = E.render;
3514
- return E = E.displayName, E || (E = H.displayName || H.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3553
+ var B = E.render;
3554
+ return E = E.displayName, E || (E = B.displayName || B.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3515
3555
  case ne:
3516
- return H = E.displayName || null, H !== null ? H : v(E.type) || "Memo";
3556
+ return B = E.displayName || null, B !== null ? B : h(E.type) || "Memo";
3517
3557
  case W:
3518
- H = E._payload, E = E._init;
3558
+ B = E._payload, E = E._init;
3519
3559
  try {
3520
- return v(E(H));
3560
+ return h(E(B));
3521
3561
  } catch {
3522
3562
  }
3523
3563
  }
3524
3564
  return null;
3525
3565
  }
3526
- function h(E) {
3566
+ function m(E) {
3527
3567
  return "" + E;
3528
3568
  }
3529
3569
  function p(E) {
3530
3570
  try {
3531
- h(E);
3532
- var H = !1;
3571
+ m(E);
3572
+ var B = !1;
3533
3573
  } catch {
3534
- H = !0;
3574
+ B = !0;
3535
3575
  }
3536
- if (H) {
3537
- H = console;
3538
- var q = H.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3539
- return q.call(
3540
- H,
3576
+ if (B) {
3577
+ B = console;
3578
+ var Y = B.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3579
+ return Y.call(
3580
+ B,
3541
3581
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3542
3582
  G
3543
- ), h(E);
3583
+ ), m(E);
3544
3584
  }
3545
3585
  }
3546
3586
  function u(E) {
3547
- if (E === N) return "<>";
3587
+ if (E === P) return "<>";
3548
3588
  if (typeof E == "object" && E !== null && E.$$typeof === W)
3549
3589
  return "<...>";
3550
3590
  try {
3551
- var H = v(E);
3552
- return H ? "<" + H + ">" : "<...>";
3591
+ var B = h(E);
3592
+ return B ? "<" + B + ">" : "<...>";
3553
3593
  } catch {
3554
3594
  return "<...>";
3555
3595
  }
3556
3596
  }
3557
- function m() {
3597
+ function v() {
3558
3598
  var E = J.A;
3559
3599
  return E === null ? null : E.getOwner();
3560
3600
  }
3561
- function g() {
3601
+ function y() {
3562
3602
  return Error("react-stack-top-frame");
3563
3603
  }
3564
3604
  function w(E) {
3565
3605
  if (Q.call(E, "key")) {
3566
- var H = Object.getOwnPropertyDescriptor(E, "key").get;
3567
- if (H && H.isReactWarning) return !1;
3606
+ var B = Object.getOwnPropertyDescriptor(E, "key").get;
3607
+ if (B && B.isReactWarning) return !1;
3568
3608
  }
3569
3609
  return E.key !== void 0;
3570
3610
  }
3571
- function y(E, H) {
3572
- function q() {
3611
+ function g(E, B) {
3612
+ function Y() {
3573
3613
  re || (re = !0, console.error(
3574
3614
  "%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)",
3575
- H
3615
+ B
3576
3616
  ));
3577
3617
  }
3578
- q.isReactWarning = !0, Object.defineProperty(E, "key", {
3579
- get: q,
3618
+ Y.isReactWarning = !0, Object.defineProperty(E, "key", {
3619
+ get: Y,
3580
3620
  configurable: !0
3581
3621
  });
3582
3622
  }
3583
- function _() {
3584
- var E = v(this.type);
3623
+ function T() {
3624
+ var E = h(this.type);
3585
3625
  return se[E] || (se[E] = !0, console.error(
3586
3626
  "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."
3587
3627
  )), E = this.props.ref, E !== void 0 ? E : null;
3588
3628
  }
3589
- function M(E, H, q, G, xe, we) {
3590
- var ue = q.ref;
3629
+ function A(E, B, Y, G, xe, we) {
3630
+ var ue = Y.ref;
3591
3631
  return E = {
3592
3632
  $$typeof: j,
3593
3633
  type: E,
3594
- key: H,
3595
- props: q,
3634
+ key: B,
3635
+ props: Y,
3596
3636
  _owner: G
3597
3637
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(E, "ref", {
3598
3638
  enumerable: !1,
3599
- get: _
3639
+ get: T
3600
3640
  }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
3601
3641
  configurable: !1,
3602
3642
  enumerable: !1,
@@ -3619,22 +3659,22 @@ function Qo() {
3619
3659
  value: we
3620
3660
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
3621
3661
  }
3622
- function C(E, H, q, G, xe, we) {
3623
- var ue = H.children;
3662
+ function k(E, B, Y, G, xe, we) {
3663
+ var ue = B.children;
3624
3664
  if (ue !== void 0)
3625
3665
  if (G)
3626
3666
  if (X(ue)) {
3627
3667
  for (G = 0; G < ue.length; G++)
3628
- T(ue[G]);
3668
+ _(ue[G]);
3629
3669
  Object.freeze && Object.freeze(ue);
3630
3670
  } else
3631
3671
  console.error(
3632
3672
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3633
3673
  );
3634
- else T(ue);
3635
- if (Q.call(H, "key")) {
3636
- ue = v(E);
3637
- var Ee = Object.keys(H).filter(function(et) {
3674
+ else _(ue);
3675
+ if (Q.call(B, "key")) {
3676
+ ue = h(E);
3677
+ var Ee = Object.keys(B).filter(function(et) {
3638
3678
  return et !== "key";
3639
3679
  });
3640
3680
  G = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + G] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -3650,57 +3690,57 @@ React keys must be passed directly to JSX without using spread:
3650
3690
  ue
3651
3691
  ), he[ue + G] = !0);
3652
3692
  }
3653
- if (ue = null, q !== void 0 && (p(q), ue = "" + q), w(H) && (p(H.key), ue = "" + H.key), "key" in H) {
3654
- q = {};
3655
- for (var D in H)
3656
- D !== "key" && (q[D] = H[D]);
3657
- } else q = H;
3658
- return ue && y(
3659
- q,
3693
+ if (ue = null, Y !== void 0 && (p(Y), ue = "" + Y), w(B) && (p(B.key), ue = "" + B.key), "key" in B) {
3694
+ Y = {};
3695
+ for (var z in B)
3696
+ z !== "key" && (Y[z] = B[z]);
3697
+ } else Y = B;
3698
+ return ue && g(
3699
+ Y,
3660
3700
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
3661
- ), M(
3701
+ ), A(
3662
3702
  E,
3663
3703
  ue,
3664
- q,
3665
- m(),
3704
+ Y,
3705
+ v(),
3666
3706
  xe,
3667
3707
  we
3668
3708
  );
3669
3709
  }
3670
- function T(E) {
3671
- P(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === W && (E._payload.status === "fulfilled" ? P(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3710
+ function _(E) {
3711
+ I(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === W && (E._payload.status === "fulfilled" ? I(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3672
3712
  }
3673
- function P(E) {
3713
+ function I(E) {
3674
3714
  return typeof E == "object" && E !== null && E.$$typeof === j;
3675
3715
  }
3676
- var A = Qr, j = Symbol.for("react.transitional.element"), F = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), J = A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, X = Array.isArray, oe = console.createTask ? console.createTask : function() {
3716
+ var R = Qr, j = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), J = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, X = Array.isArray, oe = console.createTask ? console.createTask : function() {
3677
3717
  return null;
3678
3718
  };
3679
- A = {
3719
+ R = {
3680
3720
  react_stack_bottom_frame: function(E) {
3681
3721
  return E();
3682
3722
  }
3683
3723
  };
3684
- var re, se = {}, pe = A.react_stack_bottom_frame.bind(
3685
- A,
3686
- g
3687
- )(), fe = oe(u(g)), he = {};
3688
- Ke.Fragment = N, Ke.jsx = function(E, H, q) {
3724
+ var re, se = {}, pe = R.react_stack_bottom_frame.bind(
3725
+ R,
3726
+ y
3727
+ )(), fe = oe(u(y)), he = {};
3728
+ Ke.Fragment = P, Ke.jsx = function(E, B, Y) {
3689
3729
  var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3690
- return C(
3730
+ return k(
3691
3731
  E,
3692
- H,
3693
- q,
3732
+ B,
3733
+ Y,
3694
3734
  !1,
3695
3735
  G ? Error("react-stack-top-frame") : pe,
3696
3736
  G ? oe(u(E)) : fe
3697
3737
  );
3698
- }, Ke.jsxs = function(E, H, q) {
3738
+ }, Ke.jsxs = function(E, B, Y) {
3699
3739
  var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3700
- return C(
3740
+ return k(
3701
3741
  E,
3702
- H,
3703
- q,
3742
+ B,
3743
+ Y,
3704
3744
  !0,
3705
3745
  G ? Error("react-stack-top-frame") : pe,
3706
3746
  G ? oe(u(E)) : fe
@@ -3708,37 +3748,37 @@ React keys must be passed directly to JSX without using spread:
3708
3748
  };
3709
3749
  })()), Ke;
3710
3750
  }
3711
- var zn;
3751
+ var Ln;
3712
3752
  function Zo() {
3713
- return zn || (zn = 1, process.env.NODE_ENV === "production" ? mt.exports = Jo() : mt.exports = Qo()), mt.exports;
3753
+ return Ln || (Ln = 1, process.env.NODE_ENV === "production" ? vt.exports = Jo() : vt.exports = Qo()), vt.exports;
3714
3754
  }
3715
3755
  var ei = Zo();
3716
- const ni = Zr(({ onChange: v, initialValue: h }, p) => {
3717
- const u = Xe(null), m = Xe(null), g = Xe(h), w = Xe(v), y = Xe(!1);
3756
+ const ni = Zr(({ onChange: h, initialValue: m }, p) => {
3757
+ const u = Xe(null), v = Xe(null), y = Xe(m), w = Xe(h), g = Xe(!1);
3718
3758
  return Ht(() => {
3719
- w.current = v;
3720
- }, [v]), eo(p, () => ({
3721
- setHTML: (_) => {
3722
- u.current && u.current.setHTML(_);
3759
+ w.current = h;
3760
+ }, [h]), eo(p, () => ({
3761
+ setHTML: (T) => {
3762
+ u.current && u.current.setHTML(T);
3723
3763
  },
3724
3764
  getHTML: () => u.current?.getHTML() || ""
3725
3765
  })), Ht(() => {
3726
- if (m.current && !u.current) {
3727
- u.current = new Ko(), m.current.appendChild(u.current.getElement()), h && (u.current.setHTML(h), g.current = h), y.current = !0;
3728
- const _ = u.current.getElement(), M = _.querySelector(
3766
+ if (v.current && !u.current) {
3767
+ u.current = new Ko(), v.current.appendChild(u.current.getElement()), m && (u.current.setHTML(m), y.current = m), g.current = !0;
3768
+ const T = u.current.getElement(), A = T.querySelector(
3729
3769
  ".editor"
3730
- ), C = () => {
3731
- const T = u.current?.getHTML() || "";
3732
- w.current?.(T);
3770
+ ), k = () => {
3771
+ const _ = u.current?.getHTML() || "";
3772
+ w.current?.(_);
3733
3773
  };
3734
- M ? (M.addEventListener("input", C), M.addEventListener("paste", C)) : (_.addEventListener("input", C), _.addEventListener("paste", C));
3774
+ A ? (A.addEventListener("input", k), A.addEventListener("paste", k)) : (T.addEventListener("input", k), T.addEventListener("paste", k));
3735
3775
  }
3736
3776
  }, []), Ht(() => {
3737
- if (y.current && u.current && h !== void 0 && h !== g.current) {
3738
- const _ = u.current.getHTML();
3739
- h !== _ && (u.current.setHTML(h), g.current = h);
3777
+ if (g.current && u.current && m !== void 0 && m !== y.current) {
3778
+ const T = u.current.getHTML();
3779
+ m !== T && (u.current.setHTML(m), y.current = m);
3740
3780
  }
3741
- }, [h]), /* @__PURE__ */ ei.jsx("div", { ref: m });
3781
+ }, [m]), /* @__PURE__ */ ei.jsx("div", { ref: v });
3742
3782
  });
3743
3783
  export {
3744
3784
  Ko as RichTextEditor,