nam-rich-text-editor 9.2.2 → 9.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 C = document.createRange();
206
+ C.selectNodeContents(w), p.addRange(C), de(C);
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 Ao(h) {
215
+ Fn("color", h);
216
216
  }
217
- function Mo(v) {
218
- Fn("backgroundColor", v);
217
+ function _o(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(), Ao(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(), _o(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,483 +286,485 @@ 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 C = window.__selectedImageContainer;
300
+ if (console.log("Align clicked, selectedContainer:", C), C && g.contains(C)) {
301
+ C.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 S = window.getSelection();
305
+ if (S && S.rangeCount > 0 && S.anchorNode) {
306
+ let k = S.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
- function Oo() {
329
- const v = document.createDocumentFragment();
330
+ function Do() {
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
- function Do() {
351
- const v = document.createDocumentFragment();
352
+ function Oo() {
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 C = 9998;
414
+ document.querySelectorAll("body *").forEach((S) => {
415
+ const k = window.getComputedStyle(S).getPropertyValue("z-index"), _ = parseInt(k, 10);
416
+ !isNaN(_) && _ > 0 && (C = Math.max(C, _));
417
+ }), w.style.zIndex = String(Math.max(C + 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", (I) => {
438
+ (I.key === "Enter" || I.key === " " || I.key === "Escape") && (I.preventDefault(), g.click());
439
+ }), g.onclick = () => {
440
+ p.style.display = "none", y.value = "", C = 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 C = null;
443
+ const S = document.createElement("div");
444
+ S.setAttribute("role", "button"), S.tabIndex = 0, S.style.userSelect = "none", S.textContent = "Insert", S.style.padding = "8px 16px", S.style.border = "none", S.style.borderRadius = "4px", S.style.backgroundColor = "#007bff", S.style.color = "#fff", S.style.cursor = "pointer", S.addEventListener("keydown", (I) => {
445
+ (I.key === "Enter" || I.key === " ") && (I.preventDefault(), S.click());
446
+ }), S.onclick = () => {
447
+ const I = y.value.trim();
448
+ if (I)
449
+ if (C)
450
+ C.setAttribute("href", I), C.setAttribute("target", "_blank"), C.setAttribute("rel", "noopener noreferrer"), C.setAttribute("tabindex", "0");
449
451
  else {
450
- Ae(), document.execCommand("createLink", !1, A);
451
- const j = window.getSelection();
452
- 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");
452
+ Re(), document.execCommand("createLink", !1, I);
453
+ const W = window.getSelection();
454
+ if (W && W.rangeCount > 0) {
455
+ let N = W.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 = "", C = null;
470
+ }, w.appendChild(g), w.appendChild(S), u.appendChild(v), u.appendChild(y), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), y.onkeydown = (I) => {
471
+ I.key === "Enter" ? S.click() : I.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
+ C = null;
478
+ const I = window.getSelection();
479
+ if (I && I.rangeCount > 0) {
480
+ let N = I.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
+ C = P, y.value = C.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;
499
- if (j.tagName === "A") {
500
- A.preventDefault();
501
- const F = j.getAttribute("href");
502
- F && window.open(F, "_blank");
493
+ }, k.addEventListener("keydown", (I) => {
494
+ (I.key === "Enter" || I.key === " ") && (I.preventDefault(), k.click());
495
+ }), k.onclick = () => {
496
+ p.style.display = "flex", y.focus();
497
+ }, m.appendChild(k);
498
+ const O = h.querySelector(".editor");
499
+ return O && O.addEventListener("click", (I) => {
500
+ const W = I.target;
501
+ if (W.tagName === "A") {
502
+ I.preventDefault();
503
+ const N = W.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
- 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";
537
- const j = document.createElement("div");
538
- j.className = "rte-modal-preview";
539
- const F = document.createElement("div");
540
- F.className = "rte-blockquote-title";
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 = () => {
525
+ u.style.display = "none", X = null;
526
+ }, y.appendChild(w), y.appendChild(g);
527
+ const C = document.createElement("div");
528
+ C.className = "rte-modal-form";
529
+ const S = document.createElement("label");
530
+ S.textContent = "Title", S.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 O = document.createElement("input");
536
+ O.type = "url", O.placeholder = "https://example.com", O.className = "rte-input";
537
+ const I = document.createElement("div");
538
+ I.className = "rte-preview-label", I.textContent = "Preview";
539
+ const W = document.createElement("div");
540
+ W.className = "rte-modal-preview";
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);
545
- const L = document.createElement("div");
546
- L.className = "rte-modal-actions";
547
- const V = document.createElement("div");
548
- V.setAttribute("role", "button"), V.tabIndex = 0, V.style.userSelect = "none", V.className = "rte-btn-danger", V.textContent = "Remove", V.style.display = "none", V.onclick = () => {
549
- te && (te.remove(), te = null), u.style.display = "none";
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", W.appendChild(N), W.appendChild(P), W.appendChild(H), C.appendChild(S), C.appendChild(k), C.appendChild(_), C.appendChild(O), C.appendChild(I), C.appendChild(W);
547
+ const M = document.createElement("div");
548
+ M.className = "rte-modal-actions";
549
+ const F = document.createElement("div");
550
+ F.setAttribute("role", "button"), F.tabIndex = 0, F.style.userSelect = "none", F.className = "rte-btn-danger", F.textContent = "Remove", F.style.display = "none", F.onclick = () => {
551
+ X && (X.remove(), X = null), u.style.display = "none";
550
552
  };
551
- const Z = document.createElement("div");
552
- Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-muted", Z.textContent = "Cancel", Z.onclick = () => {
553
- u.style.display = "none", te = null;
553
+ const $ = document.createElement("div");
554
+ $.setAttribute("role", "button"), $.tabIndex = 0, $.style.userSelect = "none", $.className = "rte-btn-muted", $.textContent = "Cancel", $.onclick = () => {
555
+ u.style.display = "none", X = null;
554
556
  };
555
- const ie = document.createElement("div");
556
- 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
- if (W && !/^https?:\/\//i.test(W) && (W = `https://${W}`), te) {
560
- const le = te.querySelector(
557
+ const oe = document.createElement("div");
558
+ oe.setAttribute("role", "button"), oe.tabIndex = 0, oe.style.userSelect = "none", oe.className = "rte-btn-primary", oe.textContent = "Apply", oe.onclick = () => {
559
+ const ne = k.value.trim();
560
+ let B = O.value.trim();
561
+ if (B && !/^https?:\/\//i.test(B) && (B = `https://${B}`), X) {
562
+ const le = X.querySelector(
561
563
  ".rte-blockquote-title"
562
564
  );
563
565
  if (ne)
564
566
  if (le) le.textContent = ne;
565
567
  else {
566
- const J = document.createElement("div");
567
- J.className = "rte-blockquote-title", J.textContent = ne, te.insertBefore(J, te.firstChild);
568
+ const Z = document.createElement("div");
569
+ Z.className = "rte-blockquote-title", Z.textContent = ne, X.insertBefore(Z, X.firstChild);
568
570
  }
569
571
  else le && le.remove();
570
- const ce = te.querySelector(
572
+ const ce = X.querySelector(
571
573
  ".rte-blockquote-footer"
572
574
  );
573
- if (W)
575
+ if (B)
574
576
  if (ce) {
575
- const J = ce.querySelector("a");
576
- J.href = W, J.textContent = W;
577
+ const Z = ce.querySelector("a");
578
+ Z.href = B, Z.textContent = B;
577
579
  } else {
578
- const J = document.createElement("footer");
579
- J.className = "rte-blockquote-footer";
580
- const Q = document.createElement("cite"), X = document.createElement("a");
581
- X.href = W, X.textContent = W, X.target = "_blank", X.rel = "noopener noreferrer", Q.appendChild(X), J.appendChild(Q), te.appendChild(J);
580
+ const Z = document.createElement("footer");
581
+ Z.className = "rte-blockquote-footer";
582
+ const ee = document.createElement("cite"), K = document.createElement("a");
583
+ K.href = B, K.textContent = B, K.target = "_blank", K.rel = "noopener noreferrer", ee.appendChild(K), Z.appendChild(ee), X.appendChild(Z);
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";
589
591
  return;
590
592
  }
591
- const ce = le.getRangeAt(0), J = ce.extractContents(), Q = document.createElement("blockquote");
592
- if (Q.className = "rte-blockquote", ne) {
593
+ const ce = le.getRangeAt(0), Z = ce.extractContents(), ee = document.createElement("blockquote");
594
+ if (ee.className = "rte-blockquote", ne) {
593
595
  const re = document.createElement("div");
594
- re.className = "rte-blockquote-title", re.textContent = ne, Q.appendChild(re);
596
+ re.className = "rte-blockquote-title", re.textContent = ne, ee.appendChild(re);
595
597
  }
596
- const X = document.createElement("p");
597
- if (X.appendChild(J), Q.appendChild(X), W) {
598
+ const K = document.createElement("p");
599
+ if (K.appendChild(Z), ee.appendChild(K), B) {
598
600
  const re = document.createElement("footer");
599
601
  re.className = "rte-blockquote-footer";
600
602
  const se = document.createElement("cite"), pe = document.createElement("a");
601
- pe.href = W, pe.textContent = W, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), Q.appendChild(re);
603
+ pe.href = B, pe.textContent = B, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), ee.appendChild(re);
602
604
  }
603
- ce.insertNode(Q), le.removeAllRanges();
604
- const oe = document.createRange();
605
- oe.setStartAfter(Q), oe.collapse(!0), le.addRange(oe), de(oe);
605
+ ce.insertNode(ee), le.removeAllRanges();
606
+ const ie = document.createRange();
607
+ ie.setStartAfter(ee), ie.collapse(!0), le.addRange(ie), de(ie);
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
- let te = null, x = "";
610
- return h.onmousedown = () => {
611
- te = null, x = "";
609
+ u.style.display = "none", k.value = "", O.value = "", X = null;
610
+ }, M.appendChild(F), M.appendChild($), M.appendChild(oe), v.appendChild(y), v.appendChild(C), v.appendChild(M), u.appendChild(v), document.body.appendChild(u);
611
+ let X = null, b = "";
612
+ return m.onmousedown = () => {
613
+ X = null, b = "";
612
614
  const ne = window.getSelection();
613
615
  if (ne && ne.rangeCount > 0) {
614
- const W = ne.getRangeAt(0), le = document.createElement("div");
615
- le.appendChild(W.cloneContents()), x = le.innerHTML || W.toString();
616
- let ce = W.startContainer;
616
+ const B = ne.getRangeAt(0), le = document.createElement("div");
617
+ le.appendChild(B.cloneContents()), b = le.innerHTML || B.toString();
618
+ let ce = B.startContainer;
617
619
  for (; ce && ce.nodeType !== Node.ELEMENT_NODE; )
618
620
  ce = ce.parentNode;
619
- let J = ce;
620
- for (; J && J !== document.body; ) {
621
- if (J.tagName === "BLOCKQUOTE") {
622
- te = J;
623
- const Q = te.querySelector(
621
+ let Z = ce;
622
+ for (; Z && Z !== document.body; ) {
623
+ if (Z.tagName === "BLOCKQUOTE") {
624
+ X = Z;
625
+ const ee = X.querySelector(
624
626
  ".rte-blockquote-title"
625
- ), X = te.querySelector(
627
+ ), K = X.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";
629
- 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>` : "";
630
+ k.value = ee && ee.textContent || "", O.value = K && K.href || "", F.style.display = "inline-block";
631
+ const ie = X.querySelector("p");
632
+ P.innerHTML = ie ? ie.innerHTML : X.innerHTML, N.textContent = ee && ee.textContent || "", H.innerHTML = K ? `<a href="${K.href}">${K.href}</a>` : "";
631
633
  break;
632
634
  }
633
- J = J.parentElement;
635
+ Z = Z.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
+ X || (P.innerHTML = b || "<em>Selected text will appear here</em>", N.textContent = "", H.innerHTML = "", F.style.display = "none"), de();
639
+ }, k.oninput = () => N.textContent = k.value, O.oninput = () => {
640
+ const ne = O.value.trim();
641
+ if (!ne) H.innerHTML = "";
640
642
  else {
641
- const W = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
642
- $.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
643
+ const B = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
644
+ H.innerHTML = `<a href="${B}" target="_blank" rel="noopener noreferrer">${B}</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 Wo(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";
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 C = document.createElement("label");
672
+ C.className = "rte-label", C.textContent = "Video URL";
673
+ const S = document.createElement("input");
674
+ S.type = "url", S.className = "rte-input", S.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 O = document.createElement("div");
680
+ O.className = "rte-form-left";
681
+ const I = document.createElement("div");
682
+ I.className = "rte-form-right";
683
+ const W = document.createElement("div");
684
+ W.className = "rte-field", W.appendChild(C), W.appendChild(S);
685
+ const N = document.createElement("div");
686
+ N.className = "rte-dim-row";
677
687
  const P = document.createElement("div");
678
- P.className = "rte-form-left";
679
- const A = document.createElement("div");
680
- A.className = "rte-form-right";
681
- const j = document.createElement("div");
682
- j.className = "rte-field", j.appendChild(_), j.appendChild(M);
688
+ P.style.display = "flex", P.style.flexDirection = "column";
689
+ const H = document.createElement("label");
690
+ H.className = "rte-label", H.textContent = "Width (px)";
691
+ const M = document.createElement("input");
692
+ M.type = "text", M.className = "rte-dim-input", M.placeholder = "e.g., 560", P.appendChild(H), P.appendChild(M);
683
693
  const F = document.createElement("div");
684
- F.className = "rte-dim-row";
685
- const N = document.createElement("div");
686
- N.style.display = "flex", N.style.flexDirection = "column";
694
+ F.style.display = "flex", F.style.flexDirection = "column";
687
695
  const $ = document.createElement("label");
688
- $.className = "rte-label", $.textContent = "Width (px)";
689
- const L = document.createElement("input");
690
- L.type = "text", L.className = "rte-dim-input", L.placeholder = "e.g., 560", N.appendChild($), N.appendChild(L);
691
- const V = document.createElement("div");
692
- V.style.display = "flex", V.style.flexDirection = "column";
693
- const Z = document.createElement("label");
694
- Z.className = "rte-label", Z.textContent = "Height (px)";
695
- 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);
697
- const te = document.createElement("div");
698
- te.className = "rte-modal-actions";
699
- const x = document.createElement("div");
700
- 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";
696
+ $.className = "rte-label", $.textContent = "Height (px)";
697
+ const oe = document.createElement("input");
698
+ oe.type = "text", oe.className = "rte-dim-input", oe.placeholder = "e.g., 315", F.appendChild($), F.appendChild(oe), N.appendChild(P), N.appendChild(F), O.appendChild(W), O.appendChild(N), I.appendChild(k), I.appendChild(_), g.appendChild(O), g.appendChild(I);
699
+ const X = document.createElement("div");
700
+ X.className = "rte-modal-actions";
701
+ const b = document.createElement("div");
702
+ b.setAttribute("role", "button"), b.tabIndex = 0, b.style.userSelect = "none", b.className = "rte-btn-muted", b.textContent = "Cancel", b.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);
703
- const W = document.createElement("div");
704
- W.setAttribute("role", "button"), W.tabIndex = 0, W.style.userSelect = "none";
704
+ ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", X.appendChild(b), X.appendChild(ne), u.appendChild(v), u.appendChild(g), u.appendChild(X), p.appendChild(u), document.body.appendChild(p);
705
+ const B = document.createElement("div");
706
+ B.setAttribute("role", "button"), B.tabIndex = 0, B.style.userSelect = "none";
705
707
  const le = ye(To, { width: 16, height: 16 });
706
- 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
- (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), W.click());
708
- }), W.onclick = () => {
709
- T.innerHTML = "<em>No URL entered</em>", M.value = "", p.style.display = "flex", M.focus();
708
+ B.appendChild(le), B.title = "Insert Video", B.style.border = "1px solid #e1e1e1", B.style.backgroundColor = "#ffffff", B.style.padding = "6px 10px", B.style.borderRadius = "3px", B.style.cursor = "pointer", B.style.color = "#000000", B.onmouseover = () => B.style.backgroundColor = "#f0f0f0", B.onmouseout = () => B.style.backgroundColor = "#ffffff", B.onmousedown = () => de(), B.addEventListener("keydown", (ee) => {
709
+ (ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), B.click());
710
+ }), B.onclick = () => {
711
+ _.innerHTML = "<em>No URL entered</em>", S.value = "", p.style.display = "flex", S.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);
713
- if (!Q) {
714
- T.innerHTML = "<em>No preview</em>";
714
+ const ee = S.value.trim(), K = M && M.value.trim() || "", ie = oe && oe.value.trim() || "", re = parseInt(K, 10), se = parseInt(ie, 10);
715
+ if (!ee) {
716
+ _.innerHTML = "<em>No preview</em>";
715
717
  return;
716
718
  }
717
- const pe = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
719
+ const pe = ee.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], q = Number.isFinite(re) ? re : 320, V = Number.isFinite(se) ? se : 180;
722
+ _.innerHTML = `<iframe width="${q}" height="${V}" 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="${ee}"></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
- if (!Q) {
728
+ S.oninput = ce, typeof M < "u" && (M.oninput = ce), typeof oe < "u" && (oe.oninput = ce), ne.onclick = () => {
729
+ const ee = S.value.trim(), K = M && M.value.trim() || "", ie = oe && oe.value.trim() || "", re = parseInt(K, 10), se = parseInt(ie, 10);
730
+ if (!ee) {
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";
736
738
  return;
737
739
  }
738
- const fe = pe.getRangeAt(0), he = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
740
+ const fe = pe.getRangeAt(0), he = ee.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 V = he[1], J = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
744
+ J.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${V}" frameborder="0" allowfullscreen></iframe>`, J.contentEditable = "false", J.className = "editor-video-wrapper", J.style.display = "block", J.style.maxWidth = "100%", J.style.width = "auto", J.style.height = "auto", J.style.boxSizing = "border-box", J.style.userSelect = "none", E = J;
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 V = document.createElement("div"), J = document.createElement("video");
747
+ J.controls = !0, J.src = ee, Number.isFinite(re) && (J.width = re), Number.isFinite(se) && (J.height = se), J.style.maxWidth = "100%", J.style.display = "block", V.appendChild(J), V.contentEditable = "false", V.className = "editor-video-wrapper", V.style.display = "block", V.style.maxWidth = "100%", V.style.width = "auto", V.style.height = "auto", V.style.boxSizing = "border-box", V.style.userSelect = "none", E = V;
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 q = document.createRange();
751
+ q.setStartAfter(E), q.collapse(!0), pe.addRange(q), de(q);
750
752
  try {
751
- const q = J;
752
- q && typeof q.focus == "function" && (q.focus(), q.dispatchEvent(new Event("input", { bubbles: !0 })));
753
+ const V = Z;
754
+ V && typeof V.focus == "function" && (V.focus(), V.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", S.value = "", _.innerHTML = "";
756
758
  };
757
- const J = v.querySelector(".editor");
758
- return J && J.addEventListener("click", (Q) => {
759
- const X = Q.target;
760
- X && X.tagName === "VIDEO" && X.focus();
761
- }), h.appendChild(W), h;
759
+ const Z = h.querySelector(".editor");
760
+ return Z && Z.addEventListener("click", (ee) => {
761
+ const K = ee.target;
762
+ K && K.tagName === "VIDEO" && K.focus();
763
+ }), m.appendChild(B), 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 Bo(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,31 +781,31 @@ 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();
783
- document.execCommand("formatBlock", !1, `<${L}>`);
784
- }, h.appendChild(u), document.addEventListener("selectionchange", () => {
784
+ const H = u.value, M = H === "p" ? "P" : H.toUpperCase();
785
+ document.execCommand("formatBlock", !1, `<${M}>`);
786
+ }, m.appendChild(u), document.addEventListener("selectionchange", () => {
785
787
  try {
786
- const $ = window.getSelection();
787
- if (!$ || !$.anchorNode) return;
788
- let L = $.anchorNode;
789
- for (; L && L.nodeType !== Node.ELEMENT_NODE; )
790
- L = L.parentNode;
791
- if (!L) return;
792
- let V = L;
793
- for (; V && V !== document.body && V !== h.parentElement; ) {
794
- const Z = V.tagName?.toUpperCase?.();
795
- if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
796
- u.value = Z === "P" ? "p" : Z.toLowerCase();
788
+ const H = window.getSelection();
789
+ if (!H || !H.anchorNode) return;
790
+ let M = H.anchorNode;
791
+ for (; M && M.nodeType !== Node.ELEMENT_NODE; )
792
+ M = M.parentNode;
793
+ if (!M) return;
794
+ let F = M;
795
+ for (; F && F !== document.body && F !== m.parentElement; ) {
796
+ const $ = F.tagName?.toUpperCase?.();
797
+ if ($ === "H1" || $ === "H2" || $ === "H3" || $ === "H4" || $ === "P") {
798
+ u.value = $ === "P" ? "p" : $.toLowerCase();
797
799
  return;
798
800
  }
799
- V = V.parentElement;
801
+ F = F.parentElement;
800
802
  }
801
803
  u.value = "p";
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);
833
- 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;
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 C = Do();
824
+ m.appendChild(C);
825
+ const S = Oo();
826
+ m.appendChild(S);
827
+ const k = No();
828
+ m.appendChild(k);
829
+ const _ = Lo();
830
+ m.appendChild(_);
831
+ const O = Fo(h);
832
+ m.appendChild(O);
833
+ const I = jo();
834
+ m.appendChild(I);
835
+ const W = Ho();
836
+ m.appendChild(W);
837
+ const N = Wo(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 qo(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
+ C(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 C(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 S(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 O(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 I(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,31 +921,31 @@ 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 O(i);
931
933
  })(this, n);
932
934
  };
933
935
  }
934
- function j() {
935
- return j = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
936
+ function W() {
937
+ return W = 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) {
941
943
  var o = Object.getOwnPropertyDescriptor(r, e);
942
944
  return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
943
945
  }
944
- }, j.apply(this, arguments);
946
+ }, W.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,40 +958,40 @@ 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;
962
- function V(t) {
963
- $ = t;
963
+ }, H = void 0, M = void 0;
964
+ function F(t) {
965
+ H = t;
964
966
  var e = t.document.createTextNode("");
965
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), L = t;
967
+ e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), M = t;
966
968
  }
967
- function Z(t) {
968
- return N(t) ? t : (t.ownerDocument || t).defaultView || L.window;
969
+ function $(t) {
970
+ return P(t) ? t : (t.ownerDocument || t).defaultView || M.window;
969
971
  }
970
- typeof window < "u" && window && V(window);
971
- var ie = function(t) {
972
- return !!t && m(t) === "object";
973
- }, te = function(t) {
972
+ typeof window < "u" && window && F(window);
973
+ var oe = function(t) {
974
+ return !!t && v(t) === "object";
975
+ }, X = function(t) {
974
976
  return typeof t == "function";
975
- }, x = { window: function(t) {
976
- return t === L || N(t);
977
+ }, b = { window: function(t) {
978
+ return t === M || P(t);
977
979
  }, docFrag: function(t) {
978
- return ie(t) && t.nodeType === 11;
979
- }, object: ie, func: te, number: function(t) {
980
+ return oe(t) && t.nodeType === 11;
981
+ }, object: oe, func: X, number: function(t) {
980
982
  return typeof t == "number";
981
983
  }, bool: function(t) {
982
984
  return typeof t == "boolean";
983
985
  }, string: function(t) {
984
986
  return typeof t == "string";
985
987
  }, element: function(t) {
986
- if (!t || m(t) !== "object") return !1;
987
- 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";
988
+ if (!t || v(t) !== "object") return !1;
989
+ var e = $(t) || M;
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
- return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
992
+ return oe(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
991
993
  }, array: function(t) {
992
- return ie(t) && t.length !== void 0 && te(t.splice);
994
+ return oe(t) && t.length !== void 0 && X(t.splice);
993
995
  } };
994
996
  function ne(t) {
995
997
  var e = t.interaction;
@@ -998,7 +1000,7 @@ function $o() {
998
1000
  n === "x" ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : n === "y" && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);
999
1001
  }
1000
1002
  }
1001
- function W(t) {
1003
+ function B(t) {
1002
1004
  var e = t.iEvent, n = t.interaction;
1003
1005
  if (n.prepared.name === "drag") {
1004
1006
  var r = n.prepared.axis;
@@ -1011,25 +1013,25 @@ function $o() {
1011
1013
  var le = { id: "actions/drag", install: function(t) {
1012
1014
  var e = t.actions, n = t.Interactable, r = t.defaults;
1013
1015
  n.prototype.draggable = le.draggable, e.map.drag = le, e.methodDict.drag = "draggable", r.actions.drag = le.defaults;
1014
- }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": W, "auto-start:check": function(t) {
1016
+ }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": B, "auto-start:check": function(t) {
1015
1017
  var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
1016
1018
  if (o && o.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (r & n.options.drag.mouseButtons) != 0)) return t.action = { name: "drag", axis: o.lockAxis === "start" ? o.startAxis : o.lockAxis }, !1;
1017
1019
  } }, draggable: function(t) {
1018
- return x.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : x.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1019
- }, beforeMove: ne, move: W, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1020
+ return b.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : b.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1021
+ }, beforeMove: ne, move: B, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1020
1022
  return "move";
1021
1023
  }, filterEventType: function(t) {
1022
1024
  return t.search("drag") === 0;
1023
- } }, ce = le, J = { init: function(t) {
1025
+ } }, ce = le, Z = { init: function(t) {
1024
1026
  var e = t;
1025
- J.document = e.document, J.DocumentFragment = e.DocumentFragment || Q, J.SVGElement = e.SVGElement || Q, J.SVGSVGElement = e.SVGSVGElement || Q, J.SVGElementInstance = e.SVGElementInstance || Q, J.Element = e.Element || Q, J.HTMLElement = e.HTMLElement || J.Element, J.Event = e.Event, J.Touch = e.Touch || Q, J.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1027
+ Z.document = e.document, Z.DocumentFragment = e.DocumentFragment || ee, Z.SVGElement = e.SVGElement || ee, Z.SVGSVGElement = e.SVGSVGElement || ee, Z.SVGElementInstance = e.SVGElementInstance || ee, Z.Element = e.Element || ee, Z.HTMLElement = e.HTMLElement || Z.Element, Z.Event = e.Event, Z.Touch = e.Touch || ee, Z.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1026
1028
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
1027
- function Q() {
1029
+ function ee() {
1028
1030
  }
1029
- var X = J, oe = { init: function(t) {
1030
- var e = X.Element, n = t.navigator || {};
1031
- oe.supportsTouch = "ontouchstart" in t || x.func(t.DocumentTouch) && X.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!X.PointerEvent, oe.isIOS = /iP(hone|od|ad)/.test(n.platform), oe.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), oe.isIe9 = /MSIE 9/.test(n.userAgent), oe.isOperaMobile = n.appName === "Opera" && oe.supportsTouch && /Presto/.test(n.userAgent), oe.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", oe.pEventTypes = oe.supportsPointerEvent ? X.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, oe.wheelEvent = X.document && "onmousewheel" in X.document ? "mousewheel" : "wheel";
1032
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, re = oe;
1031
+ var K = Z, ie = { init: function(t) {
1032
+ var e = K.Element, n = t.navigator || {};
1033
+ ie.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && K.document instanceof t.DocumentTouch, ie.supportsPointerEvent = n.pointerEnabled !== !1 && !!K.PointerEvent, ie.isIOS = /iP(hone|od|ad)/.test(n.platform), ie.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), ie.isIe9 = /MSIE 9/.test(n.userAgent), ie.isOperaMobile = n.appName === "Opera" && ie.supportsTouch && /Presto/.test(n.userAgent), ie.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", ie.pEventTypes = ie.supportsPointerEvent ? K.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, ie.wheelEvent = K.document && "onmousewheel" in K.document ? "mousewheel" : "wheel";
1034
+ }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, re = ie;
1033
1035
  function se(t, e) {
1034
1036
  if (t.contains) return t.contains(e);
1035
1037
  for (; e; ) {
@@ -1039,7 +1041,7 @@ function $o() {
1039
1041
  return !1;
1040
1042
  }
1041
1043
  function pe(t, e) {
1042
- for (; x.element(t); ) {
1044
+ for (; b.element(t); ) {
1043
1045
  if (he(t, e)) return t;
1044
1046
  t = fe(t);
1045
1047
  }
@@ -1047,40 +1049,40 @@ function $o() {
1047
1049
  }
1048
1050
  function fe(t) {
1049
1051
  var e = t.parentNode;
1050
- if (x.docFrag(e)) {
1051
- for (; (e = e.host) && x.docFrag(e); ) ;
1052
+ if (b.docFrag(e)) {
1053
+ for (; (e = e.host) && b.docFrag(e); ) ;
1052
1054
  return e;
1053
1055
  }
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 M !== 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 q(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) {
1067
- for (; x.element(t); ) {
1068
+ function V(t, e, n) {
1069
+ for (; b.element(t); ) {
1068
1070
  if (he(t, e)) return !0;
1069
1071
  if ((t = fe(t)) === n) return he(t, e);
1070
1072
  }
1071
1073
  return !1;
1072
1074
  }
1073
- function G(t) {
1075
+ function J(t) {
1074
1076
  return t.correspondingUseElement || t;
1075
1077
  }
1076
1078
  function xe(t) {
1077
- var e = t instanceof X.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1079
+ var e = t instanceof K.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1078
1080
  return e && { left: e.left, right: e.right, top: e.top, bottom: e.bottom, width: e.width || e.right - e.left, height: e.height || e.bottom - e.top };
1079
1081
  }
1080
1082
  function we(t) {
1081
1083
  var e, n = xe(t);
1082
1084
  if (!re.isIOS7 && n) {
1083
- var r = { x: (e = (e = Z(t)) || L).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1085
+ var r = { x: (e = (e = $(t)) || M).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1084
1086
  n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
1085
1087
  }
1086
1088
  return n;
@@ -1090,51 +1092,51 @@ function $o() {
1090
1092
  return e;
1091
1093
  }
1092
1094
  function Ee(t) {
1093
- return !!x.string(t) && (X.document.querySelector(t), !0);
1095
+ return !!b.string(t) && (K.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
- 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;
1106
+ return b.string(o) ? o = et(o, e, n) : b.func(o) && (o = o.apply(void 0, r)), b.element(o) && (o = we(o)), o;
1105
1107
  }
1106
1108
  function tt(t) {
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) {
1121
1123
  return !0;
1122
1124
  }, r = arguments.length > 3 ? arguments[3] : void 0;
1123
- if (r = r || {}, x.string(t) && t.search(" ") !== -1 && (t = Bt(t)), x.array(t)) return t.forEach((function(l) {
1125
+ if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = Wt(t)), b.array(t)) return t.forEach((function(l) {
1124
1126
  return Ie(l, e, n, r);
1125
1127
  })), r;
1126
- if (x.object(t) && (e = t, t = ""), x.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1127
- else if (x.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1128
+ if (b.object(t) && (e = t, t = ""), b.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1129
+ else if (b.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1128
1130
  var a = i[o];
1129
1131
  Ie(t, a, n, r);
1130
1132
  }
1131
- else if (x.object(e)) for (var s in e)
1132
- Ie(Bt(s).map((function(l) {
1133
+ else if (b.object(e)) for (var s in e)
1134
+ Ie(Wt(s).map((function(l) {
1133
1135
  return "".concat(t).concat(l);
1134
1136
  })), e[s], n, r);
1135
1137
  return r;
1136
1138
  }
1137
- function Bt(t) {
1139
+ function Wt(t) {
1138
1140
  return t.trim().split(/ +/);
1139
1141
  }
1140
1142
  var Fe = function(t, e) {
@@ -1158,11 +1160,11 @@ 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 Bt(t) {
1162
1164
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1163
1165
  }
1164
1166
  function qt(t) {
1165
- return t instanceof X.Event || t instanceof X.Touch;
1167
+ return t instanceof K.Event || t instanceof K.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;
@@ -1171,7 +1173,7 @@ function $o() {
1171
1173
  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;
1172
1174
  }
1173
1175
  function je(t) {
1174
- return x.number(t.pointerId) ? t.pointerId : t.identifier;
1176
+ return b.number(t.pointerId) ? t.pointerId : t.identifier;
1175
1177
  }
1176
1178
  function Hn(t, e, n) {
1177
1179
  var r = e.length > 1 ? $t(e) : e[0];
@@ -1181,7 +1183,7 @@ function $o() {
1181
1183
  }
1182
1184
  function yt(t) {
1183
1185
  var e = [];
1184
- return x.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1186
+ return b.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1185
1187
  }
1186
1188
  function $t(t) {
1187
1189
  for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
@@ -1205,17 +1207,17 @@ function $o() {
1205
1207
  return 180 * Math.atan2(a, i) / Math.PI;
1206
1208
  }
1207
1209
  function Vt(t) {
1208
- return x.string(t.pointerType) ? t.pointerType : x.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof X.Touch ? "touch" : "mouse";
1210
+ return b.string(t.pointerType) ? t.pointerType : b.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof K.Touch ? "touch" : "mouse";
1209
1211
  }
1210
1212
  function Ut(t) {
1211
- var e = x.func(t.composedPath) ? t.composedPath() : t.path;
1212
- return [G(e ? e[0] : t.target), G(t.currentTarget)];
1213
+ var e = b.func(t.composedPath) ? t.composedPath() : t.path;
1214
+ return [J(e ? e[0] : t.target), J(t.currentTarget)];
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() {
@@ -1237,18 +1239,18 @@ function $o() {
1237
1239
  }, He = function(t, e) {
1238
1240
  for (var n = 0; n < t.length; n++) if (e(t[n], n, t)) return n;
1239
1241
  return -1;
1240
- }, Be = function(t, e) {
1242
+ }, We = function(t, e) {
1241
1243
  return t[He(t, e)];
1242
- }, De = (function(t) {
1243
- M(n, t);
1244
- var e = A(n);
1244
+ }, Oe = (function(t) {
1245
+ S(n, t);
1246
+ var e = I(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) {
@@ -1278,9 +1280,9 @@ function $o() {
1278
1280
  var c = d[l];
1279
1281
  if (c.options.drop.enabled) {
1280
1282
  var f = c.options.drop.accept;
1281
- 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) });
1283
+ if (!(b.element(f) && f !== a || b.string(f) && !he(a, f) || b.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var x = 0, A = c.getAllElements(); x < A.length; x++) {
1284
+ var T = A[x];
1285
+ T !== a && s.push({ dropzone: c, element: T, rect: c.getRect(T) });
1284
1286
  }
1285
1287
  }
1286
1288
  }
@@ -1293,42 +1295,42 @@ function $o() {
1293
1295
  }
1294
1296
  function Jt(t, e, n) {
1295
1297
  for (var r = t.dropState, o = t.interactable, i = t.element, a = [], s = 0, l = r.activeDrops; s < l.length; s++) {
1296
- var d = l[s], c = d.dropzone, f = d.element, b = d.rect, S = c.dropCheck(e, n, o, i, f, b);
1297
- a.push(S ? f : null);
1298
- }
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);
1298
+ var d = l[s], c = d.dropzone, f = d.element, x = d.rect, A = c.dropCheck(e, n, o, i, f, x);
1299
+ a.push(A ? f : null);
1300
+ }
1301
+ var T = (function(R) {
1302
+ for (var L, D, j, G = [], te = 0; te < R.length; te++) {
1303
+ var Y = R[te], Q = R[L];
1304
+ if (Y && te !== L) if (Q) {
1305
+ var ve = E(Y), ae = E(Q);
1306
+ if (ve !== Y.ownerDocument) if (ae !== Y.ownerDocument) if (ve !== ae) {
1307
+ G = G.length ? G : q(Q);
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 (Q instanceof K.HTMLElement && Y instanceof K.SVGElement && !(Y instanceof K.SVGSVGElement)) {
1310
+ if (Y === ae) continue;
1311
+ ge = Y.ownerSVGElement;
1312
+ } else ge = Y;
1313
+ for (var be = q(ge, Q.ownerDocument), Se = 0; be[Se] && be[Se] === G[Se]; ) Se++;
1314
+ var mt = [be[Se - 1], be[Se], G[Se]];
1315
+ if (mt[0]) for (var Ue = mt[0].lastChild; Ue; ) {
1316
+ if (Ue === mt[1]) {
1317
+ L = te, G = 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 j = Q, (parseInt($(D = Y).getComputedStyle(D).zIndex, 10) || 0) >= (parseInt($(j).getComputedStyle(j).zIndex, 10) || 0) && (L = te);
1324
+ else L = te;
1325
+ } else L = te;
1324
1326
  }
1325
- return O;
1327
+ return L;
1326
1328
  })(a);
1327
- return r.activeDrops[k] || null;
1329
+ return r.activeDrops[T] || 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 };
1331
- return n.type === "dragstart" && (o.activate = new De(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new De(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new De(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new De(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new De(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new De(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1333
+ return n.type === "dragstart" && (o.activate = new Oe(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Oe(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new Oe(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new Oe(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Oe(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Oe(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1332
1334
  }
1333
1335
  function Ct(t, e) {
1334
1336
  var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
@@ -1347,38 +1349,38 @@ function $o() {
1347
1349
  var e = t.actions, n = t.interactStatic, r = t.Interactable, o = t.defaults;
1348
1350
  t.usePlugin(ce), r.prototype.dropzone = function(i) {
1349
1351
  return (function(a, s) {
1350
- if (x.object(s)) {
1352
+ if (b.object(s)) {
1351
1353
  if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
1352
- var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, b) {
1353
- return f[/^(enter|leave)/.test(b) ? "drag".concat(b) : /^(activate|deactivate|move)/.test(b) ? "drop".concat(b) : b] = l[b], f;
1354
+ var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, x) {
1355
+ return f[/^(enter|leave)/.test(x) ? "drag".concat(x) : /^(activate|deactivate|move)/.test(x) ? "drop".concat(x) : x] = l[x], f;
1354
1356
  }), {}), c = a.options.drop.listeners;
1355
1357
  c && a.off(c), a.on(d), a.options.drop.listeners = d;
1356
1358
  }
1357
- return x.func(s.ondrop) && a.on("drop", s.ondrop), x.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), x.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), x.func(s.ondragenter) && a.on("dragenter", s.ondragenter), x.func(s.ondragleave) && a.on("dragleave", s.ondragleave), x.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : x.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1359
+ return b.func(s.ondrop) && a.on("drop", s.ondrop), b.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), b.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), b.func(s.ondragenter) && a.on("dragenter", s.ondragenter), b.func(s.ondragleave) && a.on("dragleave", s.ondragleave), b.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : b.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1358
1360
  }
1359
- return x.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1361
+ return b.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);
1365
- var U = f.options.drop.overlap;
1366
- 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;
1364
+ return (function(f, x, A, T, R, L, D) {
1365
+ var j = !1;
1366
+ if (!(D = D || f.getRect(L))) return !!f.options.drop.checker && f.options.drop.checker(x, A, j, f, L, T, R);
1367
+ var G = f.options.drop.overlap;
1368
+ if (G === "pointer") {
1369
+ var te = ze(T, R, "drag"), Y = Yt(x);
1370
+ Y.x += te.x, Y.y += te.y;
1371
+ var Q = Y.x > D.left && Y.x < D.right, ve = Y.y > D.top && Y.y < D.bottom;
1372
+ j = Q && ve;
1371
1373
  }
1372
- var ae = k.getRect(R);
1373
- if (ae && U === "center") {
1374
+ var ae = T.getRect(R);
1375
+ if (ae && G === "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
+ j = ge >= D.left && ge <= D.right && be >= D.top && be <= D.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 && b.number(G) && (j = Math.max(0, Math.min(D.right, ae.right) - Math.max(D.left, ae.left)) * Math.max(0, Math.min(D.bottom, ae.bottom) - Math.max(D.top, ae.top)) / (ae.width * ae.height) >= G), f.options.drop.checker && (j = f.options.drop.checker(x, A, j, f, L, T, R)), j;
1378
1380
  })(this, i, a, s, l, d, c);
1379
1381
  }, n.dynamicDrop = function(i) {
1380
- 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;
1382
+ return b.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
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: [] });
@@ -1407,7 +1409,7 @@ function $o() {
1407
1409
  }
1408
1410
  } }, getActiveDrops: Et, getDrop: Jt, getDropEvents: kt, fireDropEvents: Ct, filterEventType: function(t) {
1409
1411
  return t.search("drag") === 0 || t.search("drop") === 0;
1410
- }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Bn = Zt;
1412
+ }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Wn = Zt;
1411
1413
  function St(t) {
1412
1414
  var e = t.interaction, n = t.iEvent, r = t.phase;
1413
1415
  if (e.prepared.name === "gesture") {
@@ -1419,13 +1421,13 @@ function $o() {
1419
1421
  var l = e.prevEvent;
1420
1422
  n.distance = l.distance, n.box = l.box, n.scale = l.scale, n.ds = 0, n.angle = l.angle, n.da = 0;
1421
1423
  } else n.distance = xt(o, s), n.box = bt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = wt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
1422
- e.gesture.distance = n.distance, e.gesture.angle = n.angle, x.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1424
+ e.gesture.distance = n.distance, e.gesture.angle = n.angle, b.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1423
1425
  }
1424
1426
  }
1425
1427
  var Tt = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1426
1428
  var e = t.actions, n = t.Interactable, r = t.defaults;
1427
1429
  n.prototype.gesturable = function(o) {
1428
- return x.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : x.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1430
+ return b.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : b.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1429
1431
  }, e.map.gesture = Tt, e.methodDict.gesture = "gesturable", r.actions.gesture = Tt.defaults;
1430
1432
  }, listeners: { "interactions:action-start": St, "interactions:action-move": St, "interactions:action-end": St, "interactions:new": function(t) {
1431
1433
  t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
@@ -1438,11 +1440,11 @@ function $o() {
1438
1440
  return "";
1439
1441
  }, filterEventType: function(t) {
1440
1442
  return t.search("gesture") === 0;
1441
- } }, Wn = Tt;
1443
+ } }, Bn = Tt;
1442
1444
  function qn(t, e, n, r, o, i, a) {
1443
1445
  if (!e) return !1;
1444
1446
  if (e === !0) {
1445
- var s = x.number(i.width) ? i.width : i.right - i.left, l = x.number(i.height) ? i.height : i.bottom - i.top;
1447
+ var s = b.number(i.width) ? i.width : i.right - i.left, l = b.number(i.height) ? i.height : i.bottom - i.top;
1446
1448
  if (a = Math.min(a, Math.abs((t === "left" || t === "right" ? s : l) / 2)), s < 0 && (t === "left" ? t = "right" : t === "right" && (t = "left")), l < 0 && (t === "top" ? t = "bottom" : t === "bottom" && (t = "top")), t === "left") {
1447
1449
  var d = s >= 0 ? i.left : i.right;
1448
1450
  return n.x < d + a;
@@ -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 !!b.element(r) && (b.element(e) ? e === r : V(r, e, o));
1458
1460
  }
1459
1461
  function en(t) {
1460
1462
  var e = t.iEvent, n = t.interaction;
@@ -1469,7 +1471,7 @@ function $o() {
1469
1471
  return i.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
1470
1472
  })(n), Ce.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(i) {
1471
1473
  return (function(a, s, l) {
1472
- return x.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), x.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), x.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : x.bool(s.square) && (a.options.resize.square = s.square), a) : x.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1474
+ return b.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), b.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), b.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : b.bool(s.square) && (a.options.resize.square = s.square), a) : b.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1473
1475
  })(this, i, t);
1474
1476
  }, e.map.resize = Ce, e.methodDict.resize = "resizable", o.actions.resize = Ce.defaults;
1475
1477
  }, listeners: { "interactions:new": function(t) {
@@ -1479,27 +1481,27 @@ 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) {
1486
1488
  (function(e) {
1487
1489
  var n = e.iEvent, r = e.interaction;
1488
1490
  if (r.prepared.name === "resize" && r.prepared.edges) {
1489
- 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") {
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, x = l.previous;
1492
+ if (z(x, c), a) {
1493
+ if (z(c, s), i === "reposition") {
1492
1494
  if (c.top > c.bottom) {
1493
- var S = c.top;
1494
- c.top = c.bottom, c.bottom = S;
1495
+ var A = c.top;
1496
+ c.top = c.bottom, c.bottom = A;
1495
1497
  }
1496
1498
  if (c.left > c.right) {
1497
- var k = c.left;
1498
- c.left = c.right, c.right = k;
1499
+ var T = c.left;
1500
+ c.left = c.right, c.right = T;
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 R in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[R] = c[R] - x[R];
1503
1505
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1504
1506
  }
1505
1507
  })(t), en(t);
@@ -1512,9 +1514,9 @@ 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
- if (x.object(s.edges)) {
1519
+ if (b.object(s.edges)) {
1518
1520
  var l = { left: !1, right: !1, top: !1, bottom: !1 };
1519
1521
  for (var d in l) l[d] = qn(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 });
@@ -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(Bn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Wn);
1543
1545
  } }, tn = 0, Te = { request: function(t) {
1544
1546
  return ke(t);
1545
1547
  }, cancel: function(t) {
@@ -1557,83 +1559,83 @@ 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
+ } }, U = { 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
+ U.isScrolling = !0, Te.cancel(U.i), t.autoScroll = U, U.interaction = t, U.prevTime = U.now(), U.i = Te.request(U.scroll);
1562
1564
  }, stop: function() {
1563
- Y.isScrolling = !1, Y.interaction && (Y.interaction.autoScroll = null), Te.cancel(Y.i);
1565
+ U.isScrolling = !1, U.interaction && (U.interaction.autoScroll = null), Te.cancel(U.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 = U.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = U.now(), s = (a - U.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: U.x * l, y: U.y * l };
1568
1570
  if (d.x || d.y) {
1569
1571
  var c = rn(i);
1570
- x.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1571
- var f = rn(i), b = { x: f.x - c.x, y: f.y - c.y };
1572
- (b.x || b.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: b, interaction: t, container: i });
1572
+ b.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1573
+ var f = rn(i), x = { x: f.x - c.x, y: f.y - c.y };
1574
+ (x.x || x.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: x, interaction: t, container: i });
1573
1575
  }
1574
- Y.prevTime = a;
1576
+ U.prevTime = a;
1575
1577
  }
1576
- Y.isScrolling && (Te.cancel(Y.i), Y.i = Te.request(Y.scroll));
1578
+ U.isScrolling && (Te.cancel(U.i), U.i = Te.request(U.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() && U.check(e.interactable, e.prepared.name)) if (e.simulation) U.x = U.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 (b.window(f)) a = n.clientX < U.margin, r = n.clientY < U.margin, o = n.clientX > f.innerWidth - U.margin, i = n.clientY > f.innerHeight - U.margin;
1586
1588
  else {
1587
- 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;
1589
+ var x = xe(f);
1590
+ a = n.clientX < x.left + U.margin, r = n.clientY < x.top + U.margin, o = n.clientX > x.right - U.margin, i = n.clientY > x.bottom - U.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
+ U.x = o ? 1 : a ? -1 : 0, U.y = i ? 1 : r ? -1 : 0, U.isScrolling || (U.margin = c.margin, U.speed = c.speed, U.start(e));
1591
1593
  }
1592
1594
  } };
1593
1595
  function nn(t, e, n) {
1594
- return (x.string(t) ? et(t, e, n) : t) || Z(n);
1596
+ return (b.string(t) ? et(t, e, n) : t) || $(n);
1595
1597
  }
1596
1598
  function rn(t) {
1597
- return x.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1599
+ return b.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
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 = U, U.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 = U.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, U.stop(), U.interaction && (U.interaction = null);
1610
+ }, "interactions:stop": U.stop, "interactions:action-move": function(t) {
1611
+ return U.onInteractionMove(t);
1610
1612
  } } }, Un = Vn;
1611
- function We(t, e) {
1613
+ function Be(t, e) {
1612
1614
  var n = !1;
1613
1615
  return function() {
1614
- return n || (L.console.warn(e), n = !0), t.apply(this, arguments);
1616
+ return n || (M.console.warn(e), n = !0), t.apply(this, arguments);
1615
1617
  };
1616
1618
  }
1617
- function _t(t, e) {
1619
+ function At(t, e) {
1618
1620
  return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
1619
1621
  }
1620
1622
  function Xn(t) {
1621
- return x.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1623
+ return b.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1622
1624
  }
1623
1625
  function Gn(t) {
1624
- return x.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1626
+ return b.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1625
1627
  }
1626
1628
  var Kn = { id: "auto-start/interactableMethods", install: function(t) {
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 x = s.getRect(c), A = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], T = { action: null, interactable: s, interaction: d, element: c, rect: x, buttons: A };
1633
+ return f.fire("auto-start:check", T), T.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 = Be((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 = Be((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
  } };
@@ -1644,8 +1646,8 @@ function $o() {
1644
1646
  for (var s = 0, l = r.length; s < l; s++) {
1645
1647
  var d = r[s], c = o[s], f = d.getAction(e, n, t, c);
1646
1648
  if (f) {
1647
- var b = on(f, d, c, i, a);
1648
- if (b) return { action: b, interactable: d, element: c };
1649
+ var x = on(f, d, c, i, a);
1650
+ if (x) return { action: x, interactable: d, element: c };
1649
1651
  }
1650
1652
  }
1651
1653
  return { action: null, interactable: null, element: null };
@@ -1655,7 +1657,7 @@ function $o() {
1655
1657
  function l(c) {
1656
1658
  i.push(c), a.push(s);
1657
1659
  }
1658
- for (; x.element(s); ) {
1660
+ for (; b.element(s); ) {
1659
1661
  i = [], a = [], o.interactables.forEachMatch(s, l);
1660
1662
  var d = Jn(t, e, n, i, a, r, o);
1661
1663
  if (d.action && !d.interactable.options[d.action.name].manualStart) return d;
@@ -1665,22 +1667,22 @@ function $o() {
1665
1667
  }
1666
1668
  function sn(t, e, n) {
1667
1669
  var r = e.action, o = e.interactable, i = e.element;
1668
- r = r || { name: null }, t.interactable = o, t.element = i, _t(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
1670
+ r = r || { name: null }, t.interactable = o, t.element = i, At(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
1669
1671
  }
1670
1672
  function st(t, e, n, r) {
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
- 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))))
1675
+ for (var f = 0, x = r.interactions.list; f < x.length; f++) {
1676
+ var A = x[f], T = A.prepared.name;
1677
+ if (A.interacting() && (++l >= s || A.interactable === t && ((d += T === n.name ? 1 : 0) >= i || A.element === e && (c++, T === n.name && c >= a))))
1676
1678
  return !1;
1677
1679
  }
1678
1680
  return s > 0;
1679
1681
  }
1680
1682
  function ln(t, e) {
1681
- return x.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1683
+ return b.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1682
1684
  }
1683
- function Mt(t, e, n) {
1685
+ function _t(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
  }
@@ -1690,14 +1692,14 @@ function $o() {
1690
1692
  var i = "";
1691
1693
  if (o.name) {
1692
1694
  var a = n.options[o.name].cursorChecker;
1693
- i = x.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1695
+ i = b.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
+ _t(t.element, i || "", e);
1698
+ } else e.autoStart.cursorElement && _t(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,29 +1719,29 @@ 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 && _t(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
+ for (var f = r, x = function(T) {
1730
+ if (T !== n.interactable) {
1729
1731
  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;
1732
+ if (!R.manualStart && T.testIgnoreAllow(R, f, r)) {
1733
+ var L = T.getAction(n.downPointer, n.downEvent, n, f);
1734
+ if (L && L.name === "drag" && (function(D, j) {
1735
+ if (!j) return !1;
1736
+ var G = j.options.drag.startAxis;
1737
+ return D === "xy" || G === "xy" || G === D;
1738
+ })(c, T) && Mt.validateAction(L, T, f, r, e)) return T;
1737
1739
  }
1738
1740
  }
1739
- }; x.element(f); ) {
1740
- var S = e.interactables.forEachMatch(f, b);
1741
- if (S) {
1742
- n.prepared.name = "drag", n.interactable = S, n.element = f;
1741
+ }; b.element(f); ) {
1742
+ var A = e.interactables.forEachMatch(f, x);
1743
+ if (A) {
1744
+ n.prepared.name = "drag", n.interactable = A, n.element = f;
1743
1745
  break;
1744
1746
  }
1745
1747
  f = fe(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,11 +1770,11 @@ 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
- return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : x.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1777
+ return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : b.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1776
1778
  };
1777
1779
  function or(t) {
1778
1780
  var e = t.interaction, n = t.event;
@@ -1785,10 +1787,10 @@ function $o() {
1785
1787
  var a = r.options.preventDefault;
1786
1788
  if (a !== "never") if (a !== "always") {
1787
1789
  if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
1788
- var s = Z(i.target).document, l = o.getDocOptions(s);
1790
+ var s = $(i.target).document, l = o.getDocOptions(s);
1789
1791
  if (!l || !l.events || l.events.passive !== !1) return;
1790
1792
  }
1791
- /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || x.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1793
+ /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || b.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1792
1794
  } else i.preventDefault();
1793
1795
  })(this, t, n);
1794
1796
  }, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
@@ -1809,25 +1811,25 @@ function $o() {
1809
1811
  var e = {};
1810
1812
  for (var n in t) {
1811
1813
  var r = t[n];
1812
- x.plainObject(r) ? e[n] = Ne(r) : x.array(r) ? e[n] = Gt(r) : e[n] = r;
1814
+ b.plainObject(r) ? e[n] = Ne(r) : b.array(r) ? e[n] = Gt(r) : e[n] = r;
1813
1815
  }
1814
1816
  return e;
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
- return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(b) {
1824
- var S = c[b];
1825
- return S && S.enabled && { options: S, methods: S._methods };
1826
- })).filter((function(b) {
1827
- return !!b;
1825
+ return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(x) {
1826
+ var A = c[x];
1827
+ return A && A.enabled && { options: A, methods: A._methods };
1828
+ })).filter((function(x) {
1829
+ return !!x;
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], x = f.options, A = z({}, e.coords), T = null;
1848
+ (c = f.methods) != null && c.set && this.shouldDo(x, r, n) && (e.state = f, T = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - A.x, y: e.coords.y - A.y })), l.eventProps.push(T);
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 R = this.result.coords, L = this.result.rect;
1852
+ if (R && L) {
1853
+ var D = l.rect.left !== L.left || l.rect.right !== L.right || l.rect.top !== L.top || l.rect.bottom !== L.bottom;
1854
+ l.changed = D || R.x !== l.coords.x || R.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
- var f = c[d], b = f[0], S = f[1];
1860
- b.page.x += S.x, b.page.y += S.y, b.client.x += S.x, b.client.y += S.y;
1861
+ var f = c[d], x = f[0], A = f[1];
1862
+ x.page.x += A.x, x.page.y += A.y, x.client.x += A.x, x.client.y += A.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 T = this.result.rectDelta, R = e.rect || n.rect;
1865
+ R.left += T.left, R.right += T.right, R.top += T.top, R.bottom += T.bottom, R.width = R.right - R.left, R.height = R.bottom - R.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 x = f[c], A = x[0], T = x[1];
1909
+ A.page.x -= T.x, A.page.y -= T.y, A.client.x -= T.x, A.client.y -= T.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;
@@ -1921,7 +1923,7 @@ function $o() {
1921
1923
  function ct(t, e) {
1922
1924
  return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
1923
1925
  }
1924
- function _e(t, e) {
1926
+ function Ae(t, e) {
1925
1927
  var n = t.defaults, r = { start: t.start, set: t.set, beforeEnd: t.beforeEnd, stop: t.stop }, o = function(i) {
1926
1928
  var a = i || {};
1927
1929
  for (var s in a.enabled = a.enabled !== !1, n) s in a || (a[s] = n[s]);
@@ -1959,15 +1961,15 @@ function $o() {
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
+ S(n, t);
1965
+ var e = I(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, x = (f && f.options || pn).deltaSource, A = ze(f, s, i), T = a === "start", R = a === "end", L = T ? O(c) : r.prevEvent, D = T ? r.coords.start : R ? { page: L.page, client: L.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1970
+ return c.page = z({}, D.page), c.client = z({}, D.client), c.rect = z({}, r.rect), c.timeStamp = D.timeStamp, R || (c.page.x -= A.x, c.page.y -= A.y, c.client.x -= A.x, c.client.y -= A.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 = T ? r.pointers[r.pointers.length - 1].downTime : L.t0, c.x0 = r.coords.start.page.x - A.x, c.y0 = r.coords.start.page.y - A.y, c.clientX0 = r.coords.start.client.x - A.x, c.clientY0 = r.coords.start.client.y - A.y, c.delta = T || R ? { x: 0, y: 0 } : { x: c[x].x - L[x].x, y: c[x].y - L[x].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = z({}, r.coords.velocity[x]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = R || 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 = Be((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) && (At(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 || Bt(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,20 +2112,20 @@ 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;
2119
2121
  var e = t.offset.pending;
2120
- return Ot(t.coords.cur, e), Ot(t.coords.delta, e), nt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2122
+ return Dt(t.coords.cur, e), Dt(t.coords.delta, e), nt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2121
2123
  }
2122
2124
  function ur(t) {
2123
2125
  var e = t.x, n = t.y;
2124
2126
  this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
2125
2127
  }
2126
- function Ot(t, e) {
2128
+ function Dt(t, e) {
2127
2129
  var n = t.page, r = t.client, o = e.x, i = e.y;
2128
2130
  n.x += o, n.y += i, r.x += o, r.y += i;
2129
2131
  }
@@ -2134,19 +2136,19 @@ function $o() {
2134
2136
  t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
2135
2137
  }, "interactions:update-pointer": function(t) {
2136
2138
  return (function(e) {
2137
- e.pointerIsDown && (Ot(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2139
+ e.pointerIsDown && (Dt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
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));
@@ -2176,10 +2178,10 @@ function $o() {
2176
2178
  } }, { key: "inertiaTick", value: function() {
2177
2179
  var e, n, r, o, i, a, s, l = this, d = this.interaction, c = ut(d).resistance, f = (d._now() - this.t0) / 1e3;
2178
2180
  if (f < this.te) {
2179
- var b, S = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2180
- 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() {
2181
+ var x, A = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2182
+ this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, x = { x: gn(s = A, e, r, i), y: gn(s, n, o, a) }) : x = { x: this.targetOffset.x * A, y: this.targetOffset.y * A };
2183
+ var T = { x: x.x - this.currentOffset.x, y: x.y - this.currentOffset.y };
2184
+ this.currentOffset.x += T.x, this.currentOffset.y += T.y, d.offsetBy(T), 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);
@@ -2215,7 +2217,7 @@ function $o() {
2215
2217
  return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
2216
2218
  }, "interactions:down": function(t) {
2217
2219
  var e = t.interaction, n = t.eventTarget, r = e.inertia;
2218
- if (r.active) for (var o = n; x.element(o); ) {
2220
+ if (r.active) for (var o = n; b.element(o); ) {
2219
2221
  if (o === e.element) {
2220
2222
  r.resume(t);
2221
2223
  break;
@@ -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();
@@ -2285,93 +2287,93 @@ function $o() {
2285
2287
  } }]), t;
2286
2288
  })();
2287
2289
  function Ye(t) {
2288
- return x.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2290
+ return b.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2289
2291
  }
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);
2296
- if (!r[b]) {
2297
- 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);
2295
+ var vr = { id: "events", install: function(t) {
2296
+ var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, x, A, T) {
2297
+ var R = Ye(T);
2298
+ if (!r[x]) {
2299
+ r[x] = [];
2300
+ for (var L = 0; L < o.length; L++) {
2301
+ var D = o[L];
2302
+ a(D, x, l), a(D, x, d, !0);
2301
2303
  }
2302
2304
  }
2303
- var z = r[b], U = Be(z, (function(ee) {
2304
- return ee.selector === c && ee.context === f;
2305
+ var j = r[x], G = We(j, (function(te) {
2306
+ return te.selector === c && te.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];
2312
- 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;
2308
+ G || (G = { selector: c, context: f, listeners: [] }, j.push(G)), G.listeners.push({ func: A, options: R });
2309
+ }, removeDelegate: function(c, f, x, A, T) {
2310
+ var R, L = Ye(T), D = r[x], j = !1;
2311
+ if (D)
2312
+ for (R = D.length - 1; R >= 0; R--) {
2313
+ var G = D[R];
2314
+ if (G.selector === c && G.context === f) {
2315
+ for (var te = G.listeners, Y = te.length - 1; Y >= 0; Y--) {
2316
+ var Q = te[Y];
2317
+ if (Q.func === A && dt(Q.options, L)) {
2318
+ te.splice(Y, 1), te.length || (D.splice(R, 1), s(f, x, l), s(f, x, d, !0)), j = !0;
2317
2319
  break;
2318
2320
  }
2319
2321
  }
2320
- if (z) break;
2322
+ if (j) break;
2321
2323
  }
2322
2324
  }
2323
2325
  }, delegateListener: l, delegateUseCapture: d, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2324
- function a(c, f, b, S) {
2326
+ function a(c, f, x, A) {
2325
2327
  if (c.addEventListener) {
2326
- var k = Ye(S), R = Be(n, (function(O) {
2327
- return O.eventTarget === c;
2328
+ var T = Ye(A), R = We(n, (function(L) {
2329
+ return L.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
+ R || (R = { eventTarget: c, events: {} }, n.push(R)), R.events[f] || (R.events[f] = []), We(R.events[f], (function(L) {
2332
+ return L.func === x && dt(L.options, T);
2333
+ })) || (c.addEventListener(f, x, i.supportsOptions ? T : T.capture), R.events[f].push({ func: x, options: T }));
2332
2334
  }
2333
2335
  }
2334
- function s(c, f, b, S) {
2336
+ function s(c, f, x, A) {
2335
2337
  if (c.addEventListener && c.removeEventListener) {
2336
- var k = He(n, (function(me) {
2337
- return me.eventTarget === c;
2338
- })), R = n[k];
2338
+ var T = He(n, (function(ve) {
2339
+ return ve.eventTarget === c;
2340
+ })), R = n[T];
2339
2341
  if (R && R.events) if (f !== "all") {
2340
- var O = !1, I = R.events[f];
2341
- if (I) {
2342
- if (b === "all") {
2343
- for (var z = I.length - 1; z >= 0; z--) {
2344
- var U = I[z];
2345
- s(c, f, U.func, U.options);
2342
+ var L = !1, D = R.events[f];
2343
+ if (D) {
2344
+ if (x === "all") {
2345
+ for (var j = D.length - 1; j >= 0; j--) {
2346
+ var G = D[j];
2347
+ s(c, f, G.func, G.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
- 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);
2351
+ for (var te = Ye(A), Y = 0; Y < D.length; Y++) {
2352
+ var Q = D[Y];
2353
+ if (Q.func === x && dt(Q.options, te)) {
2354
+ c.removeEventListener(f, x, i.supportsOptions ? te : te.capture), D.splice(Y, 1), D.length === 0 && (delete R.events[f], L = !0);
2353
2355
  break;
2354
2356
  }
2355
2357
  }
2356
2358
  }
2357
- O && !Object.keys(R.events).length && n.splice(k, 1);
2359
+ L && !Object.keys(R.events).length && n.splice(T, 1);
2358
2360
  } else for (f in R.events) R.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 x = Ye(f), A = new mr(c), T = r[c.type], R = Ut(c)[0], L = R; b.element(L); ) {
2365
+ for (var D = 0; D < T.length; D++) {
2366
+ var j = T[D], G = j.selector, te = j.context;
2367
+ if (he(L, G) && se(te, R) && se(te, L)) {
2368
+ var Y = j.listeners;
2369
+ A.currentTarget = L;
2370
+ for (var Q = 0; Q < Y.length; Q++) {
2371
+ var ve = Y[Q];
2372
+ dt(ve.options, x) && ve.func(A);
2371
2373
  }
2372
2374
  }
2373
2375
  }
2374
- O = fe(O);
2376
+ L = fe(L);
2375
2377
  }
2376
2378
  }
2377
2379
  function d(c) {
@@ -2382,9 +2384,9 @@ function $o() {
2382
2384
  }, get passive() {
2383
2385
  return i.supportsPassive = !0;
2384
2386
  } }), t.events = i, i;
2385
- } }, Dt = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2386
- for (var e = 0, n = Dt.methodOrder; e < n.length; e++) {
2387
- var r = n[e], o = Dt[r](t);
2387
+ } }, Ot = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2388
+ for (var e = 0, n = Ot.methodOrder; e < n.length; e++) {
2389
+ var r = n[e], o = Ot[r](t);
2388
2390
  if (o) return o;
2389
2391
  }
2390
2392
  return null;
@@ -2438,30 +2440,30 @@ function $o() {
2438
2440
  return n.id === e;
2439
2441
  }));
2440
2442
  }
2441
- var gr = Dt, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2443
+ var gr = Ot, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2442
2444
  function En(t, e) {
2443
2445
  return function(n) {
2444
2446
  var r = e.interactions.list, o = Vt(n), i = Ut(n), a = i[0], s = i[1], l = [];
2445
2447
  if (/^touch/.test(n.type)) {
2446
2448
  e.prevTouchTime = e.now();
2447
2449
  for (var d = 0, c = n.changedTouches; d < c.length; d++) {
2448
- var f = c[d], b = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, S = kn(b);
2449
- l.push([b.pointer, b.eventTarget, b.curEventTarget, S]);
2450
+ var f = c[d], x = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, A = kn(x);
2451
+ l.push([x.pointer, x.eventTarget, x.curEventTarget, A]);
2450
2452
  }
2451
2453
  } else {
2452
- var k = !1;
2454
+ var T = !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 R = 0; R < r.length && !T; R++) T = r[R].pointerType !== "mouse" && r[R].pointerIsDown;
2457
+ T = T || 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 (!T) {
2460
+ var L = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, D = kn(L);
2461
+ l.push([L.pointer, L.eventTarget, L.curEventTarget, D]);
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 j = 0; j < l.length; j++) {
2465
+ var G = l[j], te = G[0], Y = G[1], Q = G[2];
2466
+ G[3][t](te, n, Y, Q);
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++) {
@@ -2487,23 +2489,23 @@ function $o() {
2487
2489
  for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2488
2490
  var d = l[s];
2489
2491
  if (d.pointerIsDown && d.pointerType === "touch" && !d._interacting) for (var c = function() {
2490
- var S = b[f];
2491
- t.documents.some((function(k) {
2492
- return se(k.doc, S.downTarget);
2493
- })) || d.removePointer(S.pointer, S.event);
2494
- }, f = 0, b = d.pointers; f < b.length; f++) c();
2492
+ var A = x[f];
2493
+ t.documents.some((function(T) {
2494
+ return se(T.doc, A.downTarget);
2495
+ })) || d.removePointer(A.pointer, A.event);
2496
+ }, f = 0, x = d.pointers; f < x.length; f++) c();
2495
2497
  }
2496
2498
  }
2497
- (o = X.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2499
+ (o = K.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
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
+ S(d, s);
2504
+ var l = I(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,45 +2520,45 @@ 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, _e = (function(t) {
2530
2532
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2531
- })(Me || {}), xr = (function() {
2533
+ })(_e || {}), 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 = $(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
- 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
+ return b.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), b.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), b.func(n.onend) && this.on("".concat(e, "end"), n.onend), b.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2539
2541
  } }, { key: "updatePerActionListeners", value: function(e, n, r) {
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
+ (b.array(n) || b.object(n)) && this._onOff(_e.Off, e, n, void 0, s), (b.array(r) || b.object(r)) && this._onOff(_e.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), b.array(s) ? a[i] = Gt(s) : b.plainObject(s) ? (a[i] = z(a[i] || {}, Ne(s)), b.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : b.bool(s) && b.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2549
2551
  }
2550
2552
  } }, { key: "getRect", value: function(e) {
2551
- return e = e || (x.element(this.target) ? this.target : null), x.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2553
+ return e = e || (b.element(this.target) ? this.target : null), b.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
- return x.func(e) ? (this.getRect = function(r) {
2555
- var o = D({}, e.apply(n, r));
2556
+ return b.func(e) ? (this.getRect = function(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) {
2559
- if (Ee(n) || x.object(n)) {
2561
+ if (Ee(n) || b.object(n)) {
2560
2562
  for (var r in this.options[e] = n, this._actions.map) this.options[r][e] = n;
2561
2563
  return this;
2562
2564
  }
@@ -2567,7 +2569,7 @@ function $o() {
2567
2569
  return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
2568
2570
  } }, { key: "getAllElements", value: function() {
2569
2571
  var e = this.target;
2570
- return x.string(e) ? Array.from(this._context.querySelectorAll(e)) : x.func(e) && e.getAllElements ? e.getAllElements() : x.element(e) ? [e] : [];
2572
+ return b.string(e) ? Array.from(this._context.querySelectorAll(e)) : b.func(e) && e.getAllElements ? e.getAllElements() : b.element(e) ? [e] : [];
2571
2573
  } }, { key: "context", value: function() {
2572
2574
  return this._context;
2573
2575
  } }, { key: "inContext", value: function(e) {
@@ -2575,36 +2577,36 @@ 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 || !!b.element(r) && (b.string(e) ? V(r, e, n) : !!b.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 || !b.element(r)) && (b.string(e) ? V(r, e, n) : !!b.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) {
2584
- x.object(n) && !x.array(n) && (o = r, r = null);
2586
+ b.object(n) && !b.array(n) && (o = r, r = null);
2585
2587
  var a = Ie(n, r, i);
2586
2588
  for (var s in a) {
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 === _e.On ? "on" : "off"](s, c) : b.string(this.target) ? this._scopeEvents[e === _e.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === _e.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(_e.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(_e.Off, e, n, r);
2598
2600
  } }, { key: "set", value: function(e) {
2599
2601
  var n = this._defaults;
2600
- for (var r in x.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2602
+ for (var r in b.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
- for (var a in e) a !== "getRect" ? x.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2606
+ for (var a in e) a !== "getRect" ? b.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2605
2607
  return this;
2606
2608
  } }, { key: "unset", value: function() {
2607
- if (x.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2609
+ if (b.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2608
2610
  var o = n[r], i = o.selector, a = o.context, s = o.listeners;
2609
2611
  i === this.target && a === this._context && n.splice(r, 1);
2610
2612
  for (var l = s.length - 1; l >= 0; l--) this._scopeEvents.removeDelegate(this.target, this._context, e, s[l][0], s[l][1]);
@@ -2614,32 +2616,32 @@ 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) {
2618
- var o = r.interactable, i = o.target, a = x.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2619
+ y(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2620
+ var o = r.interactable, i = o.target, a = b.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
- 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;
2629
+ return this.scope.addDocument(r._doc), this.list.push(r), b.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) {
2629
- var r = n && n.context || this.scope.document, o = x.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2630
- if (i) return Be(i, (function(a) {
2631
+ var r = n && n.context || this.scope.document, o = b.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2632
+ if (i) return We(i, (function(a) {
2631
2633
  return a._context === r && (o || a.inContext(e));
2632
2634
  }));
2633
2635
  } }, { key: "forEachMatch", value: function(e, n) {
2634
2636
  for (var r = 0, o = this.list; r < o.length; r++) {
2635
2637
  var i = o[r], a = void 0;
2636
- if ((x.string(i.target) ? x.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2638
+ if ((b.string(i.target) ? b.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2637
2639
  }
2638
2640
  } }]), t;
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,33 +2650,33 @@ 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) {
2652
- if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2653
+ }, o.on = Be((function(i, a, s) {
2654
+ if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2653
2655
  for (var l = 0, d = i; l < d.length; l++) {
2654
2656
  var c = d[l];
2655
2657
  this.on(c, a, s);
2656
2658
  }
2657
2659
  return this;
2658
2660
  }
2659
- if (x.object(i)) {
2661
+ if (b.object(i)) {
2660
2662
  for (var f in i) this.on(f, i[f], a);
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) {
2665
- if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2666
+ }), "The interact.on() method is being deprecated"), o.off = Be((function(i, a, s) {
2667
+ if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2666
2668
  for (var l = 0, d = i; l < d.length; l++) {
2667
2669
  var c = d[l];
2668
2670
  this.off(c, a, s);
2669
2671
  }
2670
2672
  return this;
2671
2673
  }
2672
- if (x.object(i)) {
2674
+ if (b.object(i)) {
2673
2675
  for (var f in i) this.off(f, i[f], a);
2674
2676
  return this;
2675
2677
  }
2676
- var b;
2677
- return lt(i, this.scope.actions) ? i in this.globalEvents && (b = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(b, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2678
+ var x;
2679
+ return lt(i, this.scope.actions) ? i in this.globalEvents && (x = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(x, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2678
2680
  }), "The interact.off() method is being deprecated"), o.debug = function() {
2679
2681
  return this.scope;
2680
2682
  }, o.supportsTouch = function() {
@@ -2685,7 +2687,7 @@ function $o() {
2685
2687
  for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
2686
2688
  return this;
2687
2689
  }, o.pointerMoveTolerance = function(i) {
2688
- return x.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2690
+ return b.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2689
2691
  }, o.addDocument = function(i, a) {
2690
2692
  this.scope.addDocument(i, a);
2691
2693
  }, o.removeDocument = function(i) {
@@ -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
+ S(i, r);
2702
+ var o = I(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 W(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
+ W(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, b.window(r) && F(r), K.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;
@@ -2741,10 +2743,10 @@ function $o() {
2741
2743
  return this;
2742
2744
  } }, { key: "addDocument", value: function(e, n) {
2743
2745
  if (this.getDocIndex(e) !== -1) return !1;
2744
- 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 });
2746
+ var r = $(e);
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
- var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2749
+ var n = this.getDocIndex(e), r = $(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 });
2749
2751
  } }, { key: "getDocIndex", value: function(e) {
2750
2752
  for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
@@ -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 x = e[f], A = x[0], T = x[1], R = Math.round((r - d.x) / t[A]), L = Math.round((o - d.y) / t[T]);
2775
+ c[A] = Math.max(s.left, Math.min(s.right, R * t[A] + d.x)), c[T] = Math.max(s.top, Math.min(s.bottom, L * t[T] + 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;
2781
- } }, Tr = Sr, _r = { start: function(t) {
2782
+ e.snappers = z(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2783
+ } }, Tr = Sr, Ar = { 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
- var b = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2787
- e.edgeSign = { x: b, y: b };
2788
+ var x = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2789
+ e.edgeSign = { x, y: x };
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) {
2790
- var S = new It(t.interaction);
2791
- S.copyFrom(t.interaction.modification), S.prepareStates(c), e.subModification = S, S.startAll(u({}, t));
2791
+ if (s !== !1 && z(r, f), c != null && c.length) {
2792
+ var A = new It(t.interaction);
2793
+ A.copyFrom(t.interaction.modification), A.prepareStates(c), e.subModification = A, A.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 ? _r : 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 _r(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,17 +2814,17 @@ 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 = Ae(Ar, "aspectRatio"), Tn = function() {
2816
2818
  };
2817
2819
  Tn._defaults = {};
2818
2820
  var pt = Tn;
2819
- 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);
2821
+ function De(t, e, n) {
2822
+ return b.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
- var d = Oe(a.restriction, o, i);
2827
+ var d = De(a.restriction, o, i);
2826
2828
  if (d) {
2827
2829
  var c = d.right - d.left - e.width, f = d.bottom - d.top - e.height;
2828
2830
  c < 0 && (l.left += c, l.right += c), f < 0 && (l.top += f, l.bottom += f);
@@ -2831,104 +2833,104 @@ function $o() {
2831
2833
  }
2832
2834
  r.offset = l;
2833
2835
  }, set: function(t) {
2834
- var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2836
+ var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = De(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 = Ae(ft, "restrict"), An = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, _n = { 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: An, noOuter: _n, start: function(t) {
2850
2852
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
2851
- 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 };
2853
+ i && (e = tt(De(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 = De(a.inner, r, s) || {}, d = De(a.outer, r, s) || {};
2858
+ Mn(l, An), Mn(d, _n), 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 = Ae($e, "restrictEdges"), Dr = 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), Or = Ae({ start: ft.start, set: ft.set, defaults: Dr }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, Lr = { width: 1 / 0, height: 1 / 0 }, zr = Ae({ 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(De(i.min, e, t.coords)) || Nr, s = gt(De(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) {
2870
- 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);
2871
+ }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), zt = { start: function(t) {
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(x) {
2873
+ var A = x.interaction.element, T = tt(Le(x.state.options.origin, null, null, [A])), R = T || ze(x.interactable, A, x.interaction.prepared.name);
2872
2874
  return R;
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;
2880
- a.offsets = i && f && f.length ? f.map((function(b, S) {
2881
- return { index: S, relativePoint: b, x: s.left - i.width * b.x + e.x, y: s.top - i.height * b.y + e.y };
2882
+ a.offsets = i && f && f.length ? f.map((function(x, A) {
2883
+ return { index: A, relativePoint: x, x: s.left - i.width * x.x + e.x, y: s.top - i.height * x.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], x = s.x - f.x, A = s.y - f.y, T = 0, R = o.targets.length; T < R; T++) {
2889
+ var L = o.targets[T], D = void 0;
2890
+ (D = b.func(L) ? L(x, A, e._proxy, f, T) : L) && l.push({ x: (b.number(D.x) ? D.x : x) + f.x, y: (b.number(D.y) ? D.y : A) + f.y, range: b.number(D.range) ? D.range : o.range, source: L, index: T, 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 j = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, G = 0; G < l.length; G++) {
2893
+ var te = l[G], Y = te.range, Q = te.x - s.x, ve = te.y - s.y, ae = Fe(Q, ve), ge = ae <= Y;
2894
+ Y === 1 / 0 && j.inRange && j.range !== 1 / 0 && (ge = !1), j.target && !(ge ? j.inRange && Y !== 1 / 0 ? ae / Y < j.distance / j.range : Y === 1 / 0 && j.range !== 1 / 0 || ae < j.distance : !j.inRange && ae < j.distance) || (j.target = te, j.distance = ae, j.range = Y, j.inRange = ge, j.delta.x = Q, j.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 j.inRange && (n.x = j.target.x, n.y = j.target.y), r.closest = j, j;
2897
+ }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = Ae(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
- if (c = x.func(d) ? d(a.x, a.y, e) : d) {
2905
- 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];
2906
+ if (c = b.func(d) ? d(a.x, a.y, e) : d) {
2907
+ for (var f = 0, x = n.targetFields; f < x.length; f++) {
2908
+ var A = x[f], T = A[0], R = A[1];
2909
+ if (T in c || R in c) {
2910
+ c.x = c[T], c.y = c[R];
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 L = zt.set(t);
2918
+ return n.options = o, L;
2919
+ }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = Ae(ht, "snapSize"), Ft = { aspectRatio: Rr, restrictEdges: Pr, restrict: Ir, restrictRect: Or, restrictSize: zr, snapEdges: Ae({ 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
+ } }, Wr = Hr, Rn = (function(t) {
2929
+ S(n, t);
2930
+ var e = I(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(O(d = e.call(this, s)), i), i !== o && rt(O(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,42 +2957,42 @@ 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
- 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++) {
2962
- var S = c[b];
2963
- f.node = S, r.fire("pointerEvents:collect-targets", f);
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 }, x = 0; x < c.length; x++) {
2964
+ var A = c[x];
2965
+ f.node = A, 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 T = 1 / 0, R = 0, L = f.targets; R < L.length; R++) {
2969
+ var D = L[R].eventable.options.holdDuration;
2970
+ D < T && (T = D);
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 = T, d.timeout = setTimeout((function() {
2973
+ Me({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
2974
+ }), T);
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
- var b = l[f];
2988
- 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;
2989
+ var x = l[f];
2990
+ for (var A in x.props || {}) d[A] = x.props[A];
2991
+ var T = ze(x.eventable, x.node);
2992
+ if (d._subtractOrigin(T), d.eventable = x.eventable, d.currentTarget = x.node, x.eventable.fire(d), d._addOrigin(T), 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;
2995
+ var R = d.double ? Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2994
2996
  n.prevTap = R, n.tapTime = R.timeStamp;
2995
2997
  }
2996
2998
  return d;
@@ -2999,19 +3001,19 @@ function $o() {
2999
3001
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = n.getPointerIndex(r), l = n.pointers[s];
3000
3002
  if (a === "tap" && (n.pointerWasMoved || !l || l.downTarget !== i)) return [];
3001
3003
  for (var d = ue(i), c = { interaction: n, pointer: r, event: o, eventTarget: i, type: a, path: d, targets: [], node: null }, f = 0; f < d.length; f++) {
3002
- var b = d[f];
3003
- c.node = b, e.fire("pointerEvents:collect-targets", c);
3004
+ var x = d[f];
3005
+ c.node = x, e.fire("pointerEvents:collect-targets", c);
3004
3006
  }
3005
- 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);
3007
+ return a === "hold" && (c.targets = c.targets.filter((function(A) {
3008
+ var T, R;
3009
+ return A.eventable.options.holdDuration === ((T = n.pointers[s]) == null || (R = T.hold) == null ? void 0 : R.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 });
3016
+ var Br = Object.freeze({ __proto__: null, default: Ve });
3015
3017
  function qr(t) {
3016
3018
  var e = t.interaction;
3017
3019
  e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
@@ -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,25 +3058,25 @@ 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(Br), 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) {
3065
3067
  return (function(r, o, i) {
3066
3068
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, d = function() {
3067
- var f = a[c], b = r.getRect(f);
3068
- 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;
3069
+ var f = a[c], x = r.getRect(f);
3070
+ if (!x) return 1;
3071
+ var A, T = We(i.interactions.list, (function(D) {
3072
+ return D.interacting() && D.interactable === r && D.element === f && D.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 (T) T.move(), l && (A = T._reflowPromise || new s((function(D) {
3075
+ T._reflowResolve = D;
3074
3076
  })));
3075
3077
  else {
3076
- var R = gt(b), O = /* @__PURE__ */ (function(I) {
3077
- return { coords: I, get page() {
3078
+ var R = gt(x), L = /* @__PURE__ */ (function(D) {
3079
+ return { coords: D, get page() {
3078
3080
  return this.coords.page;
3079
3081
  }, get client() {
3080
3082
  return this.coords.client;
@@ -3101,16 +3103,16 @@ function $o() {
3101
3103
  }, preventDefault: function() {
3102
3104
  } };
3103
3105
  })({ 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) {
3108
- K._reflowResolve = Se;
3106
+ A = (function(D, j, G, te, Y) {
3107
+ var Q = D.interactions.new({ pointerType: "reflow" }), ve = { interaction: Q, event: Y, pointer: Y, eventTarget: G, phase: "reflow" };
3108
+ Q.interactable = j, Q.element = G, Q.prevEvent = Y, Q.updatePointer(Y, Y, G, !0), Bt(Q.coords.delta), At(Q.prepared, te), Q._doPhase(ve);
3109
+ var ae = D.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3110
+ Q._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 Q._reflowPromise = be, Q.start(te, j, G), Q._interacting ? (Q.move(ve), Q.end(Y)) : (Q.stop(), Q._reflowResolve()), Q.removePointer(Y, Y), be;
3113
+ })(i, r, f, o, L);
3112
3114
  }
3113
- l && l.push(S);
3115
+ l && l.push(A);
3114
3116
  }, c = 0; c < a.length && !d(); c++) ;
3115
3117
  return l && s.all(l).then((function() {
3116
3118
  return r;
@@ -3123,45 +3125,92 @@ 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(Wr), 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
3137
  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;
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");
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 C = (M) => {
3147
+ if (!M || M.includes("%")) return null;
3148
+ const F = String(M).match(/(\d+(?:\.\d+)?)/);
3149
+ if (!F) return null;
3150
+ const $ = Math.round(Number(F[1]));
3151
+ return Number.isFinite($) && $ > 0 ? $ : null;
3152
+ };
3153
+ let S = null;
3154
+ if (S = C(v.getAttribute("width")), S || (S = C(v.style.width)), !S) {
3155
+ const F = (v.getAttribute("style") || "").match(
3156
+ /(?:^|;)\s*width:\s*(\d+(?:\.\d+)?px)/i
3157
+ );
3158
+ F && (S = C(F[1]));
3159
+ }
3160
+ if (S || (S = C(v.style.maxWidth)), !S) {
3161
+ const M = v.closest(
3162
+ ".editor-image-wrapper"
3163
+ );
3164
+ M && (S = C(M.style.width) || C(M.getAttribute("width")));
3165
+ }
3166
+ if (!S) {
3167
+ const M = v.closest("figure");
3168
+ M && (S = C(M.style.width) || C(M.getAttribute("width")));
3169
+ }
3170
+ if (!S) {
3171
+ const M = v.parentElement;
3172
+ M && M.tagName !== "BODY" && (S = C(M.style.width) || C(M.getAttribute("width")));
3173
+ }
3174
+ S || (S = C(v.getAttribute("data-width"))), !S && v.naturalWidth > 0 && (S = v.naturalWidth);
3175
+ const k = S ? `${S}px` : "300px";
3176
+ let _ = "left";
3177
+ const O = v.closest("[data-align]");
3178
+ if (O)
3179
+ _ = O.getAttribute("data-align") || "left";
3180
+ else {
3181
+ const M = v.closest("figure"), F = v.closest("p"), $ = v.closest("div"), oe = (X) => {
3182
+ if (!X) return null;
3183
+ if (X.style.textAlign) return X.style.textAlign;
3184
+ const ne = (X.getAttribute("style") || "").match(
3185
+ /text-align:\s*(left|center|right|justify)/i
3186
+ );
3187
+ if (ne) return ne[1].toLowerCase();
3188
+ const B = X.getAttribute("align");
3189
+ return B ? B.toLowerCase() : X.classList.contains("center") || X.classList.contains("text-center") || X.classList.contains("align-center") ? "center" : X.classList.contains("right") || X.classList.contains("text-right") || X.classList.contains("align-right") ? "right" : null;
3190
+ };
3191
+ _ = oe(M) || oe($) || oe(F) || "left", (v.style.margin === "auto" || v.style.margin === "0 auto" || v.style.marginLeft === "auto" && v.style.marginRight === "auto") && (_ = "center"), v.style.display === "block" && (v.style.marginLeft === "auto" || v.style.marginRight === "auto") && (_ = "center");
3192
+ }
3193
+ const I = document.createElement("div");
3194
+ I.className = "editor-image-wrapper", I.style.display = "inline-block", I.style.position = "relative", I.style.maxWidth = "100%", I.style.width = k && k !== "0px" ? k.includes("px") ? k : `${k}px` : "300px", I.style.height = "auto", I.contentEditable = "false", I.style.boxSizing = "border-box", I.style.touchAction = "none", I.style.userSelect = "none", I.appendChild(g);
3195
+ const W = document.createElement("div");
3196
+ W.className = "editor-image-container", W.style.margin = "10px 0", W.style.textAlign = _, W.style.display = "block", W.appendChild(I);
3197
+ let N = v;
3198
+ const P = v.closest("figure"), H = v.closest("picture");
3150
3199
  if (P && p.body.contains(P))
3151
- T = P;
3152
- else if (A && p.body.contains(A))
3153
- T = A;
3200
+ N = P;
3201
+ else if (H && p.body.contains(H))
3202
+ N = H;
3154
3203
  else {
3155
- let j = m.parentNode;
3156
- 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()
3204
+ let M = v.parentNode;
3205
+ for (; M && M !== p.body && M.parentNode !== p.body && Array.from(M.childNodes).filter(
3206
+ ($) => $.nodeType === Node.ELEMENT_NODE || $.nodeType === Node.TEXT_NODE && $.textContent?.trim()
3158
3207
  ).length === 1; )
3159
- T = j, j = j.parentNode;
3208
+ N = M, M = M.parentNode;
3160
3209
  }
3161
- T && T.parentNode && p.body.contains(T) ? T.parentNode.replaceChild(C, T) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(C, m);
3210
+ N && N.parentNode && p.body.contains(N) ? N.parentNode.replaceChild(W, N) : v.parentNode && p.body.contains(v) && v.parentNode.replaceChild(W, v);
3162
3211
  }), p.body.innerHTML;
3163
3212
  }
3164
- function Xo(v, h) {
3213
+ function Xo(h, m) {
3165
3214
  const p = document.createElement("div");
3166
3215
  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
3216
  const u = document.createElement("style");
@@ -3182,209 +3231,249 @@ function Xo(v, h) {
3182
3231
  w.preventDefault(), w.stopPropagation();
3183
3232
  }), p.addEventListener("drop", (w) => {
3184
3233
  w.preventDefault(), w.stopPropagation();
3185
- const y = w.clientX, _ = w.clientY;
3186
- let M = null;
3234
+ const g = w.clientX, C = w.clientY;
3235
+ let S = null;
3187
3236
  if (document.caretRangeFromPoint)
3188
- M = document.caretRangeFromPoint(y, _);
3237
+ S = document.caretRangeFromPoint(g, C);
3189
3238
  else if (document.caretPositionFromPoint) {
3190
- const T = document.caretPositionFromPoint(y, _);
3191
- T && (M = document.createRange(), M.setStart(T.offsetNode, T.offset));
3239
+ const _ = document.caretPositionFromPoint(g, C);
3240
+ _ && (S = document.createRange(), S.setStart(_.offsetNode, _.offset));
3192
3241
  }
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)
3242
+ const k = w.dataTransfer?.files;
3243
+ if (k && k.length > 0)
3244
+ for (let _ = 0; _ < k.length; _++) {
3245
+ const O = k[_];
3246
+ if (O.type.startsWith("image/")) {
3247
+ const I = new FileReader();
3248
+ I.onload = (W) => {
3249
+ const N = document.createElement("img");
3250
+ N.src = W.target?.result, N.style.maxWidth = "100%", N.style.width = "100%", N.style.height = "auto", N.style.cursor = "pointer", N.draggable = !1;
3251
+ const P = document.createElement("div");
3252
+ 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);
3253
+ const H = document.createElement("div");
3254
+ if (H.className = "editor-image-container", H.style.margin = "10px 0", H.style.textAlign = "left", H.style.display = "block", H.appendChild(P), S)
3206
3255
  try {
3207
- M.insertNode($);
3208
- const L = window.getSelection();
3209
- if (L) {
3210
- L.removeAllRanges();
3211
- const V = document.createRange();
3212
- V.setStartAfter($), V.collapse(!0), L.addRange(V), de(V);
3256
+ S.insertNode(H);
3257
+ const M = window.getSelection();
3258
+ if (M) {
3259
+ M.removeAllRanges();
3260
+ const F = document.createRange();
3261
+ F.setStartAfter(H), F.collapse(!0), M.addRange(F), de(F);
3213
3262
  }
3214
3263
  } catch {
3215
- p.appendChild($);
3264
+ p.appendChild(H);
3216
3265
  }
3217
3266
  else
3218
- p.appendChild($);
3267
+ p.appendChild(H);
3219
3268
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
3220
- }, A.readAsDataURL(P);
3221
- }
3222
- }
3269
+ }, I.readAsDataURL(O);
3270
+ }
3271
+ }
3272
+ }), p.addEventListener("copy", (w) => {
3273
+ const g = window.getSelection();
3274
+ if (!g || g.rangeCount === 0) return;
3275
+ const S = g.getRangeAt(0).cloneContents(), k = document.createElement("div");
3276
+ k.appendChild(S), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3277
+ const P = N.querySelector("img");
3278
+ if (P) {
3279
+ const H = P, M = N;
3280
+ if (M.style.width) {
3281
+ const F = parseInt(M.style.width).toString();
3282
+ H.setAttribute("width", F), H.setAttribute("data-width", F);
3283
+ }
3284
+ M.style.width && M.setAttribute("data-wrapper-width", M.style.width);
3285
+ }
3286
+ }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3287
+ const P = N;
3288
+ P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3289
+ });
3290
+ const I = k.innerHTML, W = g.toString();
3291
+ w.clipboardData?.setData("text/html", I), w.clipboardData?.setData("text/plain", W), w.preventDefault();
3292
+ }), p.addEventListener("cut", (w) => {
3293
+ const g = window.getSelection();
3294
+ if (!g || g.rangeCount === 0) return;
3295
+ const C = g.getRangeAt(0), S = C.cloneContents(), k = document.createElement("div");
3296
+ k.appendChild(S), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3297
+ const P = N.querySelector("img");
3298
+ if (P) {
3299
+ const H = P, M = N;
3300
+ if (M.style.width) {
3301
+ const F = parseInt(M.style.width).toString();
3302
+ H.setAttribute("width", F), H.setAttribute("data-width", F);
3303
+ }
3304
+ M.style.width && M.setAttribute("data-wrapper-width", M.style.width);
3305
+ }
3306
+ }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3307
+ const P = N;
3308
+ P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3309
+ });
3310
+ const I = k.innerHTML, W = g.toString();
3311
+ w.clipboardData?.setData("text/html", I), w.clipboardData?.setData("text/plain", W), w.preventDefault(), C.deleteContents(), p.dispatchEvent(new Event("input", { bubbles: !0 }));
3223
3312
  }), p.addEventListener("paste", async (w) => {
3224
3313
  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) {
3232
- 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;
3238
- 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($);
3240
- const V = document.createElement("div");
3241
- V.className = "editor-image-container", V.style.margin = "10px 0", V.style.textAlign = "left", V.style.display = "block", V.appendChild(L);
3242
- const Z = window.getSelection();
3243
- if (Z && Z.rangeCount > 0) {
3244
- Z.getRangeAt(0).insertNode(V), Z.removeAllRanges();
3245
- const te = document.createRange();
3246
- te.setStartAfter(V), te.collapse(!0), Z.addRange(te);
3314
+ const g = w.clipboardData;
3315
+ if (!g) return;
3316
+ const S = Array.from(g.items).filter((O) => O.type.startsWith("image/"));
3317
+ if (S.length > 0) {
3318
+ for (const O of S) {
3319
+ const I = O.getAsFile();
3320
+ if (I) {
3321
+ const W = new FileReader();
3322
+ W.onload = (N) => {
3323
+ const P = N.target?.result;
3324
+ if (P) {
3325
+ const H = document.createElement("img");
3326
+ H.src = P, H.style.maxWidth = "100%", H.style.width = "100%", H.style.height = "auto", H.style.cursor = "pointer", H.draggable = !1;
3327
+ const M = document.createElement("div");
3328
+ M.className = "editor-image-wrapper", M.style.display = "inline-block", M.style.position = "relative", M.style.maxWidth = "100%", M.style.width = "auto", M.style.height = "auto", M.contentEditable = "false", M.style.boxSizing = "border-box", M.style.touchAction = "none", M.style.userSelect = "none", M.appendChild(H);
3329
+ const F = document.createElement("div");
3330
+ F.className = "editor-image-container", F.style.margin = "10px 0", F.style.textAlign = "left", F.style.display = "block", F.appendChild(M);
3331
+ const $ = window.getSelection();
3332
+ if ($ && $.rangeCount > 0) {
3333
+ $.getRangeAt(0).insertNode(F), $.removeAllRanges();
3334
+ const X = document.createRange();
3335
+ X.setStartAfter(F), X.collapse(!0), $.addRange(X);
3247
3336
  } else
3248
- p.appendChild(V);
3337
+ p.appendChild(F);
3249
3338
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3250
3339
  }
3251
- }, j.readAsDataURL(A);
3340
+ }, W.readAsDataURL(I);
3252
3341
  }
3253
3342
  }
3254
3343
  return;
3255
3344
  }
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;
3262
- 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);
3345
+ let k = g.getData("text/html");
3346
+ k ? k = Uo(k) : k = g.getData("text/plain");
3347
+ const _ = window.getSelection();
3348
+ if (_ && _.rangeCount > 0) {
3349
+ const O = _.getRangeAt(0), I = document.createElement("div");
3350
+ I.innerHTML = k;
3351
+ const W = document.createDocumentFragment();
3352
+ for (; I.firstChild; )
3353
+ W.appendChild(I.firstChild);
3354
+ O.deleteContents(), O.insertNode(W), O.collapse(!1), _.removeAllRanges(), _.addRange(O);
3266
3355
  } else {
3267
- const P = document.createElement("div");
3268
- for (P.innerHTML = C; P.firstChild; )
3269
- p.appendChild(P.firstChild);
3356
+ const O = document.createElement("div");
3357
+ for (O.innerHTML = k; O.firstChild; )
3358
+ p.appendChild(O.firstChild);
3270
3359
  }
3271
3360
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3272
3361
  }), 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));
3362
+ const g = w.target;
3363
+ let C = null;
3364
+ if (g.tagName === "IMG" ? C = g.parentElement : g.classList.contains("editor-image-wrapper") && (C = g), C && C.classList.contains("editor-image-wrapper")) {
3365
+ w.preventDefault(), w.stopPropagation(), p.querySelectorAll(".editor-image-wrapper").forEach((_) => {
3366
+ if (_ !== C && _.classList.contains("resizable")) {
3367
+ const O = _, I = O.getBoundingClientRect(), W = Math.round(I.width) + "px", N = Math.round(I.height) + "px";
3368
+ Ze(O).unset(), O.classList.remove("resizable"), O.style.border = "none", O.style.transform = "", O.dataset.x = "", O.dataset.y = "", O.style.width = W, O.style.height = N, O.contentEditable = "false";
3369
+ const P = O.querySelector("img");
3370
+ P && (P.style.width = "100%", P.style.height = "100%");
3371
+ }
3372
+ }), m(C);
3373
+ const k = C.parentElement;
3374
+ k && (k.classList.contains("editor-image-container") || k.tagName === "DIV" || k.tagName === "P") && (window.__selectedImageContainer = k, console.log("Selected image container:", k));
3286
3375
  } else
3287
3376
  window.__selectedImageContainer = null, p.querySelectorAll(
3288
3377
  ".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%");
3378
+ ).forEach((k) => {
3379
+ const _ = k, O = _.getBoundingClientRect(), I = Math.round(O.width) + "px", W = Math.round(O.height) + "px";
3380
+ Ze(_).unset(), _.classList.remove("resizable"), _.style.border = "none", _.style.transform = "", _.dataset.x = "", _.dataset.y = "", _.style.width = I, _.style.height = W, _.contentEditable = "false";
3381
+ const N = _.querySelector("img");
3382
+ N && (N.style.width = "100%", N.style.height = "100%");
3294
3383
  }), de();
3295
3384
  }), p.addEventListener("keyup", () => de()), p.addEventListener("mouseup", () => de()), p.addEventListener("focus", () => de()), window.addEventListener("selectionchange", () => {
3296
3385
  try {
3297
3386
  const w = window.getSelection();
3298
3387
  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();
3388
+ let g = w.anchorNode;
3389
+ for (; g && g.nodeType !== Node.ELEMENT_NODE; )
3390
+ g = g.parentNode;
3391
+ if (!g) return;
3392
+ p.contains(g) && de();
3304
3393
  } catch {
3305
3394
  }
3306
3395
  });
3307
- const m = () => {
3396
+ const v = () => {
3308
3397
  if (!p.firstChild) {
3309
3398
  p.innerHTML = "<p><br></p>";
3310
3399
  return;
3311
3400
  }
3312
3401
  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 && _)
3402
+ for (const g of w)
3403
+ if (g.nodeType === Node.TEXT_NODE && g.textContent?.trim()) {
3404
+ const C = window.getSelection();
3405
+ let S = null;
3406
+ C && C.rangeCount > 0 && (S = C.getRangeAt(0).cloneRange());
3407
+ const k = document.createElement("p");
3408
+ if (g.parentNode?.insertBefore(k, g), k.appendChild(g), S && C)
3320
3409
  try {
3321
- _.removeAllRanges(), _.addRange(M);
3410
+ C.removeAllRanges(), C.addRange(S);
3322
3411
  } catch {
3323
3412
  }
3324
3413
  }
3325
3414
  };
3326
- let g = null;
3415
+ let y = null;
3327
3416
  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;
3417
+ y && clearTimeout(y), y = setTimeout(() => v(), 100);
3418
+ }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : v(), p;
3330
3419
  }
3331
- function On(v) {
3332
- const h = document.createElement("input");
3333
- h.type = "file", h.accept = "image/*", h.onchange = (p) => {
3420
+ function Dn(h) {
3421
+ const m = document.createElement("input");
3422
+ m.type = "file", m.accept = "image/*", m.onchange = (p) => {
3334
3423
  const u = p.target.files?.[0];
3335
3424
  if (u) {
3336
- const m = new FileReader();
3337
- m.onload = (g) => {
3425
+ const v = new FileReader();
3426
+ v.onload = (y) => {
3338
3427
  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);
3428
+ w.src = y.target?.result, w.style.maxWidth = "100%", w.style.width = "100%", w.style.height = "auto", w.style.cursor = "pointer", w.draggable = !1;
3429
+ const g = document.createElement("div");
3430
+ 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);
3431
+ const C = document.createElement("div");
3432
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(g);
3344
3433
  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);
3434
+ Re();
3435
+ const S = window.getSelection();
3436
+ if (S && S.rangeCount > 0) {
3437
+ S.getRangeAt(0).insertNode(C), S.removeAllRanges();
3438
+ const _ = document.createRange();
3439
+ _.setStartAfter(C), _.collapse(!0), S.addRange(_), de(_);
3351
3440
  } else
3352
- v.appendChild(_), v.focus(), de();
3441
+ h.appendChild(C), h.focus(), de();
3353
3442
  } catch {
3354
- v.appendChild(_), v.focus(), de();
3443
+ h.appendChild(C), h.focus(), de();
3355
3444
  }
3356
- v.dispatchEvent(new Event("input", { bubbles: !0 })), v.focus();
3357
- }, m.readAsDataURL(u);
3445
+ h.dispatchEvent(new Event("input", { bubbles: !0 })), h.focus();
3446
+ }, v.readAsDataURL(u);
3358
3447
  }
3359
- }, h.click();
3448
+ }, m.click();
3360
3449
  }
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");
3450
+ function Go(h) {
3451
+ let m = null;
3452
+ if (h.tagName === "IMG" ? m = h.parentElement : m = h, !m) return;
3453
+ const p = m.querySelector("img");
3365
3454
  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");
3455
+ if (m.classList.contains("resizable")) {
3456
+ const u = m.getBoundingClientRect(), v = Math.round(u.width) + "px", y = Math.round(u.height) + "px";
3457
+ 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%");
3458
+ const w = m.closest(".editor");
3370
3459
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3371
3460
  } 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({
3461
+ m.classList.add("resizable"), m.style.border = "2px dashed #007bff", m.style.position = "relative", m.style.userSelect = "none";
3462
+ const u = m.getBoundingClientRect();
3463
+ 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
3464
  edges: { left: !0, right: !0, bottom: !0, top: !0 },
3376
3465
  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`
3466
+ move: (v) => {
3467
+ const y = v.target;
3468
+ Object.assign(y.style, {
3469
+ width: `${v.rect.width}px`,
3470
+ height: `${v.rect.height}px`
3382
3471
  });
3383
- const w = g.closest(".editor");
3472
+ const w = y.closest(".editor");
3384
3473
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3385
3474
  },
3386
- end: (m) => {
3387
- const w = m.target.closest(".editor");
3475
+ end: (v) => {
3476
+ const w = v.target.closest(".editor");
3388
3477
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3389
3478
  }
3390
3479
  },
@@ -3401,13 +3490,13 @@ class Ko {
3401
3490
  editor;
3402
3491
  constructor() {
3403
3492
  this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Xo(
3404
- () => On(this.editor),
3493
+ () => Dn(this.editor),
3405
3494
  (p) => Go(p)
3406
- ), this.toolbar = Wo(this.container);
3407
- const h = this.toolbar.querySelector(
3495
+ ), this.toolbar = Bo(this.container);
3496
+ const m = this.toolbar.querySelector(
3408
3497
  '[role="button"][title="Insert Image"]'
3409
3498
  );
3410
- h && (h.addEventListener("mousedown", () => de()), h.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3499
+ m && (m.addEventListener("mousedown", () => de()), m.onclick = () => Dn(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3411
3500
  }
3412
3501
  getElement() {
3413
3502
  return this.container;
@@ -3415,8 +3504,8 @@ class Ko {
3415
3504
  getHTML() {
3416
3505
  return this.editor.innerHTML;
3417
3506
  }
3418
- setHTML(h) {
3419
- this.editor.innerHTML = h, this.wrapUnwrappedImages();
3507
+ setHTML(m) {
3508
+ this.editor.innerHTML = m, this.wrapUnwrappedImages();
3420
3509
  }
3421
3510
  wrapUnwrappedImages() {
3422
3511
  Array.from(this.editor.querySelectorAll("img")).forEach((p) => {
@@ -3424,77 +3513,77 @@ class Ko {
3424
3513
  return;
3425
3514
  const u = p.parentElement;
3426
3515
  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");
3516
+ const _ = p;
3517
+ _.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
3518
  return;
3430
3519
  }
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`;
3520
+ const v = document.createElement("div");
3521
+ 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";
3522
+ const y = p;
3523
+ y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3524
+ const w = (_) => {
3525
+ if (!_) return null;
3526
+ const O = String(_).match(/(\d+(?:\.\d+)?)/);
3527
+ if (!O) return null;
3528
+ const I = Math.round(Number(O[1]));
3529
+ return Number.isFinite(I) && I > 0 ? I : null;
3530
+ }, g = w(y.getAttribute("width")) ?? w(y.style.width) ?? w(y.getAttribute("style"));
3531
+ g ? v.style.width = `${g}px` : y.onload = () => {
3532
+ const _ = this.editor.clientWidth || 0, O = y.naturalWidth || 0;
3533
+ if (O > 0) {
3534
+ const I = _ > 0 ? Math.min(O, _) : O;
3535
+ v.style.width = `${I}px`;
3447
3536
  }
3448
3537
  };
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));
3538
+ const C = document.createElement("div");
3539
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block";
3540
+ const S = y.closest("figure") ?? y.closest(".se-image-container") ?? y, k = S.parentNode;
3541
+ k && this.editor.contains(S) && k.contains(S) && (v.appendChild(y), C.appendChild(v), k.replaceChild(C, S));
3453
3542
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3454
3543
  }
3455
3544
  }
3456
- var mt = { exports: {} }, Ge = {};
3457
- var Dn;
3545
+ var vt = { exports: {} }, Ge = {};
3546
+ var On;
3458
3547
  function Jo() {
3459
- if (Dn) return Ge;
3460
- Dn = 1;
3461
- var v = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
3462
- function p(u, m, g) {
3548
+ if (On) return Ge;
3549
+ On = 1;
3550
+ var h = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
3551
+ function p(u, v, y) {
3463
3552
  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,
3553
+ if (y !== void 0 && (w = "" + y), v.key !== void 0 && (w = "" + v.key), "key" in v) {
3554
+ y = {};
3555
+ for (var g in v)
3556
+ g !== "key" && (y[g] = v[g]);
3557
+ } else y = v;
3558
+ return v = y.ref, {
3559
+ $$typeof: h,
3471
3560
  type: u,
3472
3561
  key: w,
3473
- ref: m !== void 0 ? m : null,
3474
- props: g
3562
+ ref: v !== void 0 ? v : null,
3563
+ props: y
3475
3564
  };
3476
3565
  }
3477
- return Ge.Fragment = h, Ge.jsx = p, Ge.jsxs = p, Ge;
3566
+ return Ge.Fragment = m, Ge.jsx = p, Ge.jsxs = p, Ge;
3478
3567
  }
3479
3568
  var Ke = {};
3480
3569
  var Nn;
3481
3570
  function Qo() {
3482
3571
  return Nn || (Nn = 1, process.env.NODE_ENV !== "production" && (function() {
3483
- function v(E) {
3572
+ function h(E) {
3484
3573
  if (E == null) return null;
3485
3574
  if (typeof E == "function")
3486
3575
  return E.$$typeof === ce ? null : E.displayName || E.name || null;
3487
3576
  if (typeof E == "string") return E;
3488
3577
  switch (E) {
3489
- case N:
3578
+ case P:
3490
3579
  return "Fragment";
3491
- case L:
3580
+ case M:
3492
3581
  return "Profiler";
3493
- case $:
3582
+ case H:
3494
3583
  return "StrictMode";
3495
- case te:
3584
+ case X:
3496
3585
  return "Suspense";
3497
- case x:
3586
+ case b:
3498
3587
  return "SuspenseList";
3499
3588
  case le:
3500
3589
  return "Activity";
@@ -3503,100 +3592,100 @@ function Qo() {
3503
3592
  switch (typeof E.tag == "number" && console.error(
3504
3593
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3505
3594
  ), E.$$typeof) {
3506
- case F:
3595
+ case N:
3507
3596
  return "Portal";
3508
- case Z:
3597
+ case $:
3509
3598
  return E.displayName || "Context";
3510
- case V:
3599
+ case F:
3511
3600
  return (E._context.displayName || "Context") + ".Consumer";
3512
- case ie:
3513
- var H = E.render;
3514
- return E = E.displayName, E || (E = H.displayName || H.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3601
+ case oe:
3602
+ var q = E.render;
3603
+ return E = E.displayName, E || (E = q.displayName || q.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3515
3604
  case ne:
3516
- return H = E.displayName || null, H !== null ? H : v(E.type) || "Memo";
3517
- case W:
3518
- H = E._payload, E = E._init;
3605
+ return q = E.displayName || null, q !== null ? q : h(E.type) || "Memo";
3606
+ case B:
3607
+ q = E._payload, E = E._init;
3519
3608
  try {
3520
- return v(E(H));
3609
+ return h(E(q));
3521
3610
  } catch {
3522
3611
  }
3523
3612
  }
3524
3613
  return null;
3525
3614
  }
3526
- function h(E) {
3615
+ function m(E) {
3527
3616
  return "" + E;
3528
3617
  }
3529
3618
  function p(E) {
3530
3619
  try {
3531
- h(E);
3532
- var H = !1;
3620
+ m(E);
3621
+ var q = !1;
3533
3622
  } catch {
3534
- H = !0;
3623
+ q = !0;
3535
3624
  }
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,
3625
+ if (q) {
3626
+ q = console;
3627
+ var V = q.error, J = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3628
+ return V.call(
3629
+ q,
3541
3630
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3542
- G
3543
- ), h(E);
3631
+ J
3632
+ ), m(E);
3544
3633
  }
3545
3634
  }
3546
3635
  function u(E) {
3547
- if (E === N) return "<>";
3548
- if (typeof E == "object" && E !== null && E.$$typeof === W)
3636
+ if (E === P) return "<>";
3637
+ if (typeof E == "object" && E !== null && E.$$typeof === B)
3549
3638
  return "<...>";
3550
3639
  try {
3551
- var H = v(E);
3552
- return H ? "<" + H + ">" : "<...>";
3640
+ var q = h(E);
3641
+ return q ? "<" + q + ">" : "<...>";
3553
3642
  } catch {
3554
3643
  return "<...>";
3555
3644
  }
3556
3645
  }
3557
- function m() {
3558
- var E = J.A;
3646
+ function v() {
3647
+ var E = Z.A;
3559
3648
  return E === null ? null : E.getOwner();
3560
3649
  }
3561
- function g() {
3650
+ function y() {
3562
3651
  return Error("react-stack-top-frame");
3563
3652
  }
3564
3653
  function w(E) {
3565
- if (Q.call(E, "key")) {
3566
- var H = Object.getOwnPropertyDescriptor(E, "key").get;
3567
- if (H && H.isReactWarning) return !1;
3654
+ if (ee.call(E, "key")) {
3655
+ var q = Object.getOwnPropertyDescriptor(E, "key").get;
3656
+ if (q && q.isReactWarning) return !1;
3568
3657
  }
3569
3658
  return E.key !== void 0;
3570
3659
  }
3571
- function y(E, H) {
3572
- function q() {
3660
+ function g(E, q) {
3661
+ function V() {
3573
3662
  re || (re = !0, console.error(
3574
3663
  "%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
3664
+ q
3576
3665
  ));
3577
3666
  }
3578
- q.isReactWarning = !0, Object.defineProperty(E, "key", {
3579
- get: q,
3667
+ V.isReactWarning = !0, Object.defineProperty(E, "key", {
3668
+ get: V,
3580
3669
  configurable: !0
3581
3670
  });
3582
3671
  }
3583
- function _() {
3584
- var E = v(this.type);
3672
+ function C() {
3673
+ var E = h(this.type);
3585
3674
  return se[E] || (se[E] = !0, console.error(
3586
3675
  "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
3676
  )), E = this.props.ref, E !== void 0 ? E : null;
3588
3677
  }
3589
- function M(E, H, q, G, xe, we) {
3590
- var ue = q.ref;
3678
+ function S(E, q, V, J, xe, we) {
3679
+ var ue = V.ref;
3591
3680
  return E = {
3592
- $$typeof: j,
3681
+ $$typeof: W,
3593
3682
  type: E,
3594
- key: H,
3595
- props: q,
3596
- _owner: G
3683
+ key: q,
3684
+ props: V,
3685
+ _owner: J
3597
3686
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(E, "ref", {
3598
3687
  enumerable: !1,
3599
- get: _
3688
+ get: C
3600
3689
  }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
3601
3690
  configurable: !1,
3602
3691
  enumerable: !1,
@@ -3619,126 +3708,126 @@ function Qo() {
3619
3708
  value: we
3620
3709
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
3621
3710
  }
3622
- function C(E, H, q, G, xe, we) {
3623
- var ue = H.children;
3711
+ function k(E, q, V, J, xe, we) {
3712
+ var ue = q.children;
3624
3713
  if (ue !== void 0)
3625
- if (G)
3626
- if (X(ue)) {
3627
- for (G = 0; G < ue.length; G++)
3628
- T(ue[G]);
3714
+ if (J)
3715
+ if (K(ue)) {
3716
+ for (J = 0; J < ue.length; J++)
3717
+ _(ue[J]);
3629
3718
  Object.freeze && Object.freeze(ue);
3630
3719
  } else
3631
3720
  console.error(
3632
3721
  "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
3722
  );
3634
- else T(ue);
3635
- if (Q.call(H, "key")) {
3636
- ue = v(E);
3637
- var Ee = Object.keys(H).filter(function(et) {
3723
+ else _(ue);
3724
+ if (ee.call(q, "key")) {
3725
+ ue = h(E);
3726
+ var Ee = Object.keys(q).filter(function(et) {
3638
3727
  return et !== "key";
3639
3728
  });
3640
- G = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + G] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3729
+ J = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + J] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3641
3730
  `A props object containing a "key" prop is being spread into JSX:
3642
3731
  let props = %s;
3643
3732
  <%s {...props} />
3644
3733
  React keys must be passed directly to JSX without using spread:
3645
3734
  let props = %s;
3646
3735
  <%s key={someKey} {...props} />`,
3647
- G,
3736
+ J,
3648
3737
  ue,
3649
3738
  Ee,
3650
3739
  ue
3651
- ), he[ue + G] = !0);
3652
- }
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,
3740
+ ), he[ue + J] = !0);
3741
+ }
3742
+ if (ue = null, V !== void 0 && (p(V), ue = "" + V), w(q) && (p(q.key), ue = "" + q.key), "key" in q) {
3743
+ V = {};
3744
+ for (var z in q)
3745
+ z !== "key" && (V[z] = q[z]);
3746
+ } else V = q;
3747
+ return ue && g(
3748
+ V,
3660
3749
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
3661
- ), M(
3750
+ ), S(
3662
3751
  E,
3663
3752
  ue,
3664
- q,
3665
- m(),
3753
+ V,
3754
+ v(),
3666
3755
  xe,
3667
3756
  we
3668
3757
  );
3669
3758
  }
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));
3759
+ function _(E) {
3760
+ O(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === B && (E._payload.status === "fulfilled" ? O(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3672
3761
  }
3673
- function P(E) {
3674
- return typeof E == "object" && E !== null && E.$$typeof === j;
3762
+ function O(E) {
3763
+ return typeof E == "object" && E !== null && E.$$typeof === W;
3675
3764
  }
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() {
3765
+ var I = Qr, W = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), oe = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), Z = I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, K = Array.isArray, ie = console.createTask ? console.createTask : function() {
3677
3766
  return null;
3678
3767
  };
3679
- A = {
3768
+ I = {
3680
3769
  react_stack_bottom_frame: function(E) {
3681
3770
  return E();
3682
3771
  }
3683
3772
  };
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) {
3689
- var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3690
- return C(
3773
+ var re, se = {}, pe = I.react_stack_bottom_frame.bind(
3774
+ I,
3775
+ y
3776
+ )(), fe = ie(u(y)), he = {};
3777
+ Ke.Fragment = P, Ke.jsx = function(E, q, V) {
3778
+ var J = 1e4 > Z.recentlyCreatedOwnerStacks++;
3779
+ return k(
3691
3780
  E,
3692
- H,
3693
3781
  q,
3782
+ V,
3694
3783
  !1,
3695
- G ? Error("react-stack-top-frame") : pe,
3696
- G ? oe(u(E)) : fe
3784
+ J ? Error("react-stack-top-frame") : pe,
3785
+ J ? ie(u(E)) : fe
3697
3786
  );
3698
- }, Ke.jsxs = function(E, H, q) {
3699
- var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3700
- return C(
3787
+ }, Ke.jsxs = function(E, q, V) {
3788
+ var J = 1e4 > Z.recentlyCreatedOwnerStacks++;
3789
+ return k(
3701
3790
  E,
3702
- H,
3703
3791
  q,
3792
+ V,
3704
3793
  !0,
3705
- G ? Error("react-stack-top-frame") : pe,
3706
- G ? oe(u(E)) : fe
3794
+ J ? Error("react-stack-top-frame") : pe,
3795
+ J ? ie(u(E)) : fe
3707
3796
  );
3708
3797
  };
3709
3798
  })()), Ke;
3710
3799
  }
3711
- var zn;
3800
+ var Ln;
3712
3801
  function Zo() {
3713
- return zn || (zn = 1, process.env.NODE_ENV === "production" ? mt.exports = Jo() : mt.exports = Qo()), mt.exports;
3802
+ return Ln || (Ln = 1, process.env.NODE_ENV === "production" ? vt.exports = Jo() : vt.exports = Qo()), vt.exports;
3714
3803
  }
3715
3804
  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);
3805
+ const ni = Zr(({ onChange: h, initialValue: m }, p) => {
3806
+ const u = Xe(null), v = Xe(null), y = Xe(m), w = Xe(h), g = Xe(!1);
3718
3807
  return Ht(() => {
3719
- w.current = v;
3720
- }, [v]), eo(p, () => ({
3721
- setHTML: (_) => {
3722
- u.current && u.current.setHTML(_);
3808
+ w.current = h;
3809
+ }, [h]), eo(p, () => ({
3810
+ setHTML: (C) => {
3811
+ u.current && u.current.setHTML(C);
3723
3812
  },
3724
3813
  getHTML: () => u.current?.getHTML() || ""
3725
3814
  })), 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(
3815
+ if (v.current && !u.current) {
3816
+ u.current = new Ko(), v.current.appendChild(u.current.getElement()), m && (u.current.setHTML(m), y.current = m), g.current = !0;
3817
+ const C = u.current.getElement(), S = C.querySelector(
3729
3818
  ".editor"
3730
- ), C = () => {
3731
- const T = u.current?.getHTML() || "";
3732
- w.current?.(T);
3819
+ ), k = () => {
3820
+ const _ = u.current?.getHTML() || "";
3821
+ w.current?.(_);
3733
3822
  };
3734
- M ? (M.addEventListener("input", C), M.addEventListener("paste", C)) : (_.addEventListener("input", C), _.addEventListener("paste", C));
3823
+ S ? (S.addEventListener("input", k), S.addEventListener("paste", k)) : (C.addEventListener("input", k), C.addEventListener("paste", k));
3735
3824
  }
3736
3825
  }, []), 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);
3826
+ if (g.current && u.current && m !== void 0 && m !== y.current) {
3827
+ const C = u.current.getHTML();
3828
+ m !== C && (u.current.setHTML(m), y.current = m);
3740
3829
  }
3741
- }, [h]), /* @__PURE__ */ ei.jsx("div", { ref: m });
3830
+ }, [m]), /* @__PURE__ */ ei.jsx("div", { ref: v });
3742
3831
  });
3743
3832
  export {
3744
3833
  Ko as RichTextEditor,