nam-rich-text-editor 9.2.1 → 9.2.2

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,4 +1,4 @@
1
- import Qr, { forwardRef as Zr, useRef as Xe, useEffect as jt, useImperativeHandle as eo } from "react";
1
+ import Qr, { forwardRef as Zr, useRef as Xe, useEffect as Ht, useImperativeHandle as eo } from "react";
2
2
  function to() {
3
3
  const v = document.createElement("select");
4
4
  return v.innerHTML = `
@@ -200,10 +200,10 @@ function Fn(v, h) {
200
200
  if (!u.collapsed) {
201
201
  const w = document.createElement("span");
202
202
  w.style[v] = h;
203
- const x = u.extractContents();
204
- w.appendChild(x), u.insertNode(w), p.removeAllRanges();
205
- const k = document.createRange();
206
- k.selectNodeContents(w), p.addRange(k), de(k);
203
+ const y = u.extractContents();
204
+ w.appendChild(y), u.insertNode(w), p.removeAllRanges();
205
+ const _ = document.createRange();
206
+ _.selectNodeContents(w), p.addRange(_), de(_);
207
207
  return;
208
208
  }
209
209
  const m = document.createElement("span");
@@ -290,34 +290,32 @@ function Io() {
290
290
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
291
291
  });
292
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.onclick = () => {
294
- const g = window.getSelection();
295
- if (g && g.rangeCount > 0) {
296
- let x = g.anchorNode;
297
- for (; x && x.nodeType !== Node.ELEMENT_NODE; )
298
- x = x.parentNode;
299
- let k = x, S = null;
300
- for (; k && k !== document.body && !k.classList.contains("editor"); ) {
301
- if ((k.tagName === "DIV" || k.tagName === "P") && k.querySelector(".editor-image-wrapper")) {
302
- S = k;
303
- break;
304
- }
305
- if (k.tagName === "P") {
306
- S = k;
307
- break;
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 }));
302
+ return;
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 }));
313
+ return;
308
314
  }
309
- k = k.parentElement;
310
- }
311
- if (S) {
312
- S.style.textAlign = p.align;
313
- const _ = u.closest(".editor-container")?.querySelector(".editor");
314
- _ && _.dispatchEvent(new Event("input", { bubbles: !0 }));
315
- return;
315
+ T = T.parentElement;
316
316
  }
317
317
  }
318
- document.execCommand(p.command);
319
- const w = u.closest(".editor-container")?.querySelector(".editor");
320
- w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
318
+ document.execCommand(p.command), y.dispatchEvent(new Event("input", { bubbles: !0 }));
321
319
  }, v.appendChild(u);
322
320
  }), v;
323
321
  }
@@ -404,21 +402,21 @@ function Lo() {
404
402
  ".editor-container"
405
403
  );
406
404
  if (!w) return;
407
- const x = w.querySelector(".editor");
405
+ const y = w.querySelector(".editor");
408
406
  if (u)
409
- m ? w.setAttribute("style", m) : w.removeAttribute("style"), x && (g ? x.setAttribute("style", g) : x.removeAttribute("style")), v.replaceChild(h, p), u = !1;
407
+ m ? w.setAttribute("style", m) : w.removeAttribute("style"), y && (g ? y.setAttribute("style", g) : y.removeAttribute("style")), v.replaceChild(h, p), u = !1;
410
408
  else {
411
- m = w.getAttribute("style") || "", g = x && x.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";
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";
412
410
  try {
413
- let k = 9998;
414
- document.querySelectorAll("body *").forEach((S) => {
415
- const _ = window.getComputedStyle(S).getPropertyValue("z-index"), A = parseInt(_, 10);
416
- !isNaN(A) && A > 0 && (k = Math.max(k, A));
417
- }), w.style.zIndex = String(Math.max(k + 1, 9999));
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));
418
416
  } catch {
419
417
  w.style.zIndex = "9999";
420
418
  }
421
- w.style.backgroundColor = "#ffffff", w.style.display = "flex", w.style.flexDirection = "column", w.style.boxSizing = "border-box", x && (x.style.flex = "1 1 0", x.style.overflowY = "auto", x.style.border = "none", x.style.borderRadius = "0", x.style.boxShadow = "none", x.style.height = "", x.style.minHeight = "0", x.style.maxHeight = "none", x.style.padding = "20px", x.style.boxSizing = "border-box"), v.replaceChild(p, h), u = !0;
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;
422
420
  }
423
421
  }, v;
424
422
  }
@@ -433,82 +431,82 @@ function Fo(v) {
433
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";
434
432
  const w = document.createElement("div");
435
433
  w.style.display = "flex", w.style.gap = "10px", w.style.justifyContent = "flex-end";
436
- const x = document.createElement("div");
437
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.textContent = "Cancel", x.style.padding = "8px 16px", x.style.border = "1px solid #ccc", x.style.borderRadius = "4px", x.style.backgroundColor = "#f5f5f5", x.style.cursor = "pointer", x.addEventListener("keydown", (P) => {
438
- (P.key === "Enter" || P.key === " " || P.key === "Escape") && (P.preventDefault(), x.click());
439
- }), x.onclick = () => {
440
- p.style.display = "none", g.value = "", k = null;
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;
441
439
  };
442
- let k = 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", (P) => {
445
- (P.key === "Enter" || P.key === " ") && (P.preventDefault(), S.click());
446
- }), S.onclick = () => {
447
- const P = g.value.trim();
448
- if (P)
449
- if (k)
450
- k.setAttribute("href", P), k.setAttribute("target", "_blank"), k.setAttribute("rel", "noopener noreferrer"), k.setAttribute("tabindex", "0");
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");
451
449
  else {
452
- Ae(), document.execCommand("createLink", !1, P);
453
- const G = window.getSelection();
454
- if (G && G.rangeCount > 0) {
455
- let W = G.getRangeAt(0).startContainer;
456
- for (; W && W.nodeType !== Node.ELEMENT_NODE; )
457
- W = W.parentNode;
458
- let N = W;
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;
459
457
  for (; N && N !== document.body; ) {
460
458
  if (N.tagName === "A") {
461
- const J = N;
462
- J.setAttribute("target", "_blank"), J.setAttribute("rel", "noopener noreferrer"), J.setAttribute("tabindex", "0");
459
+ const $ = N;
460
+ $.setAttribute("target", "_blank"), $.setAttribute("rel", "noopener noreferrer"), $.setAttribute("tabindex", "0");
463
461
  break;
464
462
  }
465
463
  N = N.parentElement;
466
464
  }
467
465
  }
468
466
  }
469
- p.style.display = "none", g.value = "", k = null;
470
- }, w.appendChild(x), w.appendChild(S), u.appendChild(m), u.appendChild(g), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), g.onkeydown = (P) => {
471
- P.key === "Enter" ? S.click() : P.key === "Escape" && x.click();
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();
472
470
  };
473
- const _ = document.createElement("div");
474
- _.setAttribute("role", "button"), _.tabIndex = 0, _.style.userSelect = "none";
475
- const A = ye(lo, { width: 16, height: 16 });
476
- _.appendChild(A), _.title = "Insert Hyperlink", _.style.border = "1px solid #e1e1e1", _.style.backgroundColor = "#ffffff", _.style.padding = "6px 10px", _.style.borderRadius = "3px", _.style.cursor = "pointer", _.style.color = "#000000", _.onmouseover = () => _.style.backgroundColor = "#f0f0f0", _.onmouseout = () => _.style.backgroundColor = "#ffffff", _.onmousedown = () => {
477
- k = null;
478
- const P = window.getSelection();
479
- if (P && P.rangeCount > 0) {
480
- let W = P.getRangeAt(0).startContainer;
481
- for (; W && W.nodeType !== Node.ELEMENT_NODE; )
482
- W = W.parentNode;
483
- let N = W;
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;
484
482
  for (; N && N !== document.body; ) {
485
483
  if (N.tagName === "A") {
486
- k = N, g.value = k.getAttribute("href") || "";
484
+ _ = N, g.value = _.getAttribute("href") || "";
487
485
  break;
488
486
  }
489
487
  N = N.parentElement;
490
488
  }
491
489
  }
492
490
  de();
493
- }, _.addEventListener("keydown", (P) => {
494
- (P.key === "Enter" || P.key === " ") && (P.preventDefault(), _.click());
495
- }), _.onclick = () => {
491
+ }, C.addEventListener("keydown", (A) => {
492
+ (A.key === "Enter" || A.key === " ") && (A.preventDefault(), C.click());
493
+ }), C.onclick = () => {
496
494
  p.style.display = "flex", g.focus();
497
- }, h.appendChild(_);
498
- const B = v.querySelector(".editor");
499
- return B && B.addEventListener("click", (P) => {
500
- const G = P.target;
501
- if (G.tagName === "A") {
502
- P.preventDefault();
503
- const W = G.getAttribute("href");
504
- W && window.open(W, "_blank");
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");
505
503
  }
506
504
  }), h;
507
505
  }
508
506
  function jo() {
509
507
  const v = document.createDocumentFragment(), h = document.createElement("div");
510
- h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (ee) => {
511
- (ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), h.click());
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());
512
510
  });
513
511
  const p = ye(mo, { width: 16, height: 16 });
514
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";
@@ -520,67 +518,67 @@ function jo() {
520
518
  g.className = "rte-modal-header";
521
519
  const w = document.createElement("h3");
522
520
  w.textContent = "Insert Quote", w.className = "rte-modal-title";
523
- const x = document.createElement("div");
524
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-modal-close", x.innerHTML = "×", x.onclick = () => {
525
- u.style.display = "none", re = null;
526
- }, g.appendChild(w), g.appendChild(x);
527
- const k = document.createElement("div");
528
- k.className = "rte-modal-form";
529
- const S = document.createElement("label");
530
- S.textContent = "Title", S.className = "rte-label";
531
- const _ = document.createElement("input");
532
- _.type = "text", _.placeholder = "e.g., Article title or source", _.className = "rte-input";
533
- const A = document.createElement("label");
534
- A.textContent = "Source URL", A.className = "rte-label";
535
- const B = document.createElement("input");
536
- B.type = "url", B.placeholder = "https://example.com", B.className = "rte-input";
537
- const P = document.createElement("div");
538
- P.className = "rte-preview-label", P.textContent = "Preview";
539
- const G = document.createElement("div");
540
- G.className = "rte-modal-preview";
541
- const W = document.createElement("div");
542
- W.className = "rte-blockquote-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 = "×", 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";
543
541
  const N = document.createElement("div");
544
542
  N.className = "rte-blockquote-content";
545
- const J = document.createElement("div");
546
- J.className = "rte-blockquote-footer", G.appendChild(W), G.appendChild(N), G.appendChild(J), k.appendChild(S), k.appendChild(_), k.appendChild(A), k.appendChild(B), k.appendChild(P), k.appendChild(G);
547
- const U = document.createElement("div");
548
- U.className = "rte-modal-actions";
549
- const Z = document.createElement("div");
550
- Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-danger", Z.textContent = "Remove", Z.style.display = "none", Z.onclick = () => {
551
- re && (re.remove(), re = null), u.style.display = "none";
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";
552
550
  };
553
- const ne = document.createElement("div");
554
- ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-muted", ne.textContent = "Cancel", ne.onclick = () => {
555
- u.style.display = "none", re = null;
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;
556
554
  };
557
555
  const ie = document.createElement("div");
558
556
  ie.setAttribute("role", "button"), ie.tabIndex = 0, ie.style.userSelect = "none", ie.className = "rte-btn-primary", ie.textContent = "Apply", ie.onclick = () => {
559
- const ee = _.value.trim();
560
- let F = B.value.trim();
561
- if (F && !/^https?:\/\//i.test(F) && (F = `https://${F}`), re) {
562
- const le = re.querySelector(
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(
563
561
  ".rte-blockquote-title"
564
562
  );
565
- if (ee)
566
- if (le) le.textContent = ee;
563
+ if (ne)
564
+ if (le) le.textContent = ne;
567
565
  else {
568
- const X = document.createElement("div");
569
- X.className = "rte-blockquote-title", X.textContent = ee, re.insertBefore(X, re.firstChild);
566
+ const J = document.createElement("div");
567
+ J.className = "rte-blockquote-title", J.textContent = ne, te.insertBefore(J, te.firstChild);
570
568
  }
571
569
  else le && le.remove();
572
- const ce = re.querySelector(
570
+ const ce = te.querySelector(
573
571
  ".rte-blockquote-footer"
574
572
  );
575
- if (F)
573
+ if (W)
576
574
  if (ce) {
577
- const X = ce.querySelector("a");
578
- X.href = F, X.textContent = F;
575
+ const J = ce.querySelector("a");
576
+ J.href = W, J.textContent = W;
579
577
  } else {
580
- const X = document.createElement("footer");
581
- X.className = "rte-blockquote-footer";
582
- const K = document.createElement("cite"), Y = document.createElement("a");
583
- Y.href = F, Y.textContent = F, Y.target = "_blank", Y.rel = "noopener noreferrer", K.appendChild(Y), X.appendChild(K), re.appendChild(X);
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);
584
582
  }
585
583
  else ce && ce.remove();
586
584
  } else {
@@ -590,61 +588,61 @@ function jo() {
590
588
  u.style.display = "none";
591
589
  return;
592
590
  }
593
- const ce = le.getRangeAt(0), X = ce.extractContents(), K = document.createElement("blockquote");
594
- if (K.className = "rte-blockquote", ee) {
595
- const te = document.createElement("div");
596
- te.className = "rte-blockquote-title", te.textContent = ee, K.appendChild(te);
591
+ const ce = le.getRangeAt(0), J = ce.extractContents(), Q = document.createElement("blockquote");
592
+ if (Q.className = "rte-blockquote", ne) {
593
+ const re = document.createElement("div");
594
+ re.className = "rte-blockquote-title", re.textContent = ne, Q.appendChild(re);
597
595
  }
598
- const Y = document.createElement("p");
599
- if (Y.appendChild(X), K.appendChild(Y), F) {
600
- const te = document.createElement("footer");
601
- te.className = "rte-blockquote-footer";
596
+ const X = document.createElement("p");
597
+ if (X.appendChild(J), Q.appendChild(X), W) {
598
+ const re = document.createElement("footer");
599
+ re.className = "rte-blockquote-footer";
602
600
  const se = document.createElement("cite"), pe = document.createElement("a");
603
- pe.href = F, pe.textContent = F, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), te.appendChild(se), K.appendChild(te);
601
+ pe.href = W, pe.textContent = W, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), Q.appendChild(re);
604
602
  }
605
- ce.insertNode(K), le.removeAllRanges();
603
+ ce.insertNode(Q), le.removeAllRanges();
606
604
  const oe = document.createRange();
607
- oe.setStartAfter(K), oe.collapse(!0), le.addRange(oe), de(oe);
605
+ oe.setStartAfter(Q), oe.collapse(!0), le.addRange(oe), de(oe);
608
606
  }
609
- u.style.display = "none", _.value = "", B.value = "", re = null;
610
- }, U.appendChild(Z), U.appendChild(ne), U.appendChild(ie), m.appendChild(g), m.appendChild(k), m.appendChild(U), u.appendChild(m), document.body.appendChild(u);
611
- let re = null, b = "";
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 = "";
612
610
  return h.onmousedown = () => {
613
- re = null, b = "";
614
- const ee = window.getSelection();
615
- if (ee && ee.rangeCount > 0) {
616
- const F = ee.getRangeAt(0), le = document.createElement("div");
617
- le.appendChild(F.cloneContents()), b = le.innerHTML || F.toString();
618
- let ce = F.startContainer;
611
+ te = null, x = "";
612
+ const ne = window.getSelection();
613
+ 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;
619
617
  for (; ce && ce.nodeType !== Node.ELEMENT_NODE; )
620
618
  ce = ce.parentNode;
621
- let X = ce;
622
- for (; X && X !== document.body; ) {
623
- if (X.tagName === "BLOCKQUOTE") {
624
- re = X;
625
- const K = re.querySelector(
619
+ let J = ce;
620
+ for (; J && J !== document.body; ) {
621
+ if (J.tagName === "BLOCKQUOTE") {
622
+ te = J;
623
+ const Q = te.querySelector(
626
624
  ".rte-blockquote-title"
627
- ), Y = re.querySelector(
625
+ ), X = te.querySelector(
628
626
  ".rte-blockquote-footer a"
629
627
  );
630
- _.value = K && K.textContent || "", B.value = Y && Y.href || "", Z.style.display = "inline-block";
631
- const oe = re.querySelector("p");
632
- N.innerHTML = oe ? oe.innerHTML : re.innerHTML, W.textContent = K && K.textContent || "", J.innerHTML = Y ? `<a href="${Y.href}">${Y.href}</a>` : "";
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>` : "";
633
631
  break;
634
632
  }
635
- X = X.parentElement;
633
+ J = J.parentElement;
636
634
  }
637
635
  }
638
- re || (N.innerHTML = b || "<em>Selected text will appear here</em>", W.textContent = "", J.innerHTML = "", Z.style.display = "none"), de();
639
- }, _.oninput = () => W.textContent = _.value, B.oninput = () => {
640
- const ee = B.value.trim();
641
- if (!ee) J.innerHTML = "";
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 = "";
642
640
  else {
643
- const F = /^https?:\/\//i.test(ee) ? ee : `https://${ee}`;
644
- J.innerHTML = `<a href="${F}" target="_blank" rel="noopener noreferrer">${F}</a>`;
641
+ const W = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
642
+ $.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
645
643
  }
646
644
  }, h.onclick = () => {
647
- u.style.display = "flex", _.focus();
645
+ u.style.display = "flex", C.focus();
648
646
  }, v.appendChild(h), v;
649
647
  }
650
648
  function Ho() {
@@ -666,68 +664,68 @@ function Bo(v) {
666
664
  g.className = "rte-modal-title", g.textContent = "Insert Video";
667
665
  const w = document.createElement("div");
668
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);
669
- const x = document.createElement("div");
670
- x.className = "rte-modal-form";
671
- const k = document.createElement("label");
672
- k.className = "rte-label", k.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 _ = document.createElement("div");
676
- _.className = "rte-preview-label", _.textContent = "Preview";
677
- const A = document.createElement("div");
678
- A.className = "rte-modal-preview";
679
- const B = document.createElement("div");
680
- B.className = "rte-form-left";
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";
681
677
  const P = document.createElement("div");
682
- P.className = "rte-form-right";
683
- const G = document.createElement("div");
684
- G.className = "rte-field", G.appendChild(k), G.appendChild(S);
685
- const W = document.createElement("div");
686
- W.className = "rte-dim-row";
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);
683
+ const F = document.createElement("div");
684
+ F.className = "rte-dim-row";
687
685
  const N = document.createElement("div");
688
686
  N.style.display = "flex", N.style.flexDirection = "column";
689
- const J = document.createElement("label");
690
- J.className = "rte-label", J.textContent = "Width (px)";
691
- const U = document.createElement("input");
692
- U.type = "text", U.className = "rte-dim-input", U.placeholder = "e.g., 560", N.appendChild(J), N.appendChild(U);
693
- const Z = document.createElement("div");
694
- Z.style.display = "flex", Z.style.flexDirection = "column";
695
- const ne = document.createElement("label");
696
- ne.className = "rte-label", ne.textContent = "Height (px)";
687
+ 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)";
697
695
  const ie = document.createElement("input");
698
- ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", Z.appendChild(ne), Z.appendChild(ie), W.appendChild(N), W.appendChild(Z), B.appendChild(G), B.appendChild(W), P.appendChild(_), P.appendChild(A), x.appendChild(B), x.appendChild(P);
699
- const re = document.createElement("div");
700
- re.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";
703
- const ee = document.createElement("div");
704
- ee.setAttribute("role", "button"), ee.tabIndex = 0, ee.style.userSelect = "none", ee.className = "rte-btn-primary", ee.textContent = "Insert", re.appendChild(b), re.appendChild(ee), u.appendChild(m), u.appendChild(x), u.appendChild(re), p.appendChild(u), document.body.appendChild(p);
705
- const F = document.createElement("div");
706
- F.setAttribute("role", "button"), F.tabIndex = 0, F.style.userSelect = "none";
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";
701
+ 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";
707
705
  const le = ye(To, { width: 16, height: 16 });
708
- F.appendChild(le), F.title = "Insert Video", F.style.border = "1px solid #e1e1e1", F.style.backgroundColor = "#ffffff", F.style.padding = "6px 10px", F.style.borderRadius = "3px", F.style.cursor = "pointer", F.style.color = "#000000", F.onmouseover = () => F.style.backgroundColor = "#f0f0f0", F.onmouseout = () => F.style.backgroundColor = "#ffffff", F.onmousedown = () => de(), F.addEventListener("keydown", (K) => {
709
- (K.key === "Enter" || K.key === " ") && (K.preventDefault(), F.click());
710
- }), F.onclick = () => {
711
- A.innerHTML = "<em>No URL entered</em>", S.value = "", p.style.display = "flex", S.focus();
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();
712
710
  };
713
711
  const ce = () => {
714
- const K = S.value.trim(), Y = U && U.value.trim() || "", oe = ie && ie.value.trim() || "", te = parseInt(Y, 10), se = parseInt(oe, 10);
715
- if (!K) {
716
- A.innerHTML = "<em>No preview</em>";
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>";
717
715
  return;
718
716
  }
719
- const pe = K.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
717
+ const pe = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
720
718
  if (pe) {
721
- const E = pe[1], z = Number.isFinite(te) ? te : 320, j = Number.isFinite(se) ? se : 180;
722
- A.innerHTML = `<iframe width="${z}" height="${j}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
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>`;
723
721
  return;
724
722
  }
725
- const fe = Number.isFinite(te) ? `${te}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
726
- A.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${K}"></video>`;
723
+ 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>`;
727
725
  };
728
- S.oninput = ce, typeof U < "u" && (U.oninput = ce), typeof ie < "u" && (ie.oninput = ce), ee.onclick = () => {
729
- const K = S.value.trim(), Y = U && U.value.trim() || "", oe = ie && ie.value.trim() || "", te = parseInt(Y, 10), se = parseInt(oe, 10);
730
- if (!K) {
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) {
731
729
  p.style.display = "none";
732
730
  return;
733
731
  }
@@ -737,32 +735,32 @@ function Bo(v) {
737
735
  p.style.display = "none";
738
736
  return;
739
737
  }
740
- const fe = pe.getRangeAt(0), he = K.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
738
+ const fe = pe.getRangeAt(0), he = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
741
739
  let E;
742
740
  if (he) {
743
- const j = he[1], $ = document.createElement("div"), xe = Number.isFinite(te) ? te : 560, we = Number.isFinite(se) ? se : 315;
744
- $.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${j}" frameborder="0" allowfullscreen></iframe>`, $.contentEditable = "false", $.className = "editor-video-wrapper", $.style.display = "block", $.style.maxWidth = "100%", $.style.width = "auto", $.style.height = "auto", $.style.boxSizing = "border-box", $.style.userSelect = "none", E = $;
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;
745
743
  } else {
746
- const j = document.createElement("div"), $ = document.createElement("video");
747
- $.controls = !0, $.src = K, Number.isFinite(te) && ($.width = te), Number.isFinite(se) && ($.height = se), $.style.maxWidth = "100%", $.style.display = "block", j.appendChild($), 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;
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;
748
746
  }
749
747
  fe.insertNode(E), pe.removeAllRanges();
750
- const z = document.createRange();
751
- z.setStartAfter(E), z.collapse(!0), pe.addRange(z), de(z);
748
+ const H = document.createRange();
749
+ H.setStartAfter(E), H.collapse(!0), pe.addRange(H), de(H);
752
750
  try {
753
- const j = X;
754
- j && typeof j.focus == "function" && (j.focus(), j.dispatchEvent(new Event("input", { bubbles: !0 })));
751
+ const q = J;
752
+ q && typeof q.focus == "function" && (q.focus(), q.dispatchEvent(new Event("input", { bubbles: !0 })));
755
753
  } catch {
756
754
  }
757
- p.style.display = "none", S.value = "", A.innerHTML = "";
755
+ p.style.display = "none", M.value = "", T.innerHTML = "";
758
756
  };
759
- const X = v.querySelector(".editor");
760
- return X && X.addEventListener("click", (K) => {
761
- const Y = K.target;
762
- Y && Y.tagName === "VIDEO" && Y.focus();
763
- }), h.appendChild(F), h;
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;
764
762
  }
765
- function qo(v) {
763
+ function Wo(v) {
766
764
  const h = document.createElement("div");
767
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)";
768
766
  const p = to();
@@ -781,24 +779,24 @@ function qo(v) {
781
779
  <option value="h3">Heading 3</option>
782
780
  <option value="h4">Heading 4</option>
783
781
  `, u.onchange = () => {
784
- const J = u.value, U = J === "p" ? "P" : J.toUpperCase();
785
- document.execCommand("formatBlock", !1, `<${U}>`);
782
+ const $ = u.value, L = $ === "p" ? "P" : $.toUpperCase();
783
+ document.execCommand("formatBlock", !1, `<${L}>`);
786
784
  }, h.appendChild(u), document.addEventListener("selectionchange", () => {
787
785
  try {
788
- const J = window.getSelection();
789
- if (!J || !J.anchorNode) return;
790
- let U = J.anchorNode;
791
- for (; U && U.nodeType !== Node.ELEMENT_NODE; )
792
- U = U.parentNode;
793
- if (!U) return;
794
- let Z = U;
795
- for (; Z && Z !== document.body && Z !== h.parentElement; ) {
796
- const ne = Z.tagName?.toUpperCase?.();
797
- if (ne === "H1" || ne === "H2" || ne === "H3" || ne === "H4" || ne === "P") {
798
- u.value = ne === "P" ? "p" : ne.toLowerCase();
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();
799
797
  return;
800
798
  }
801
- Z = Z.parentElement;
799
+ V = V.parentElement;
802
800
  }
803
801
  u.value = "p";
804
802
  } catch {
@@ -818,196 +816,36 @@ function qo(v) {
818
816
  h.appendChild(g);
819
817
  const w = Ao();
820
818
  h.appendChild(w);
821
- const x = Io();
822
- h.appendChild(x);
823
- const k = Oo();
824
- h.appendChild(k);
825
- const S = Do();
826
- h.appendChild(S);
827
- const _ = No();
819
+ const y = Io();
820
+ h.appendChild(y);
821
+ const _ = Oo();
828
822
  h.appendChild(_);
829
- const A = zo();
830
- h.appendChild(A);
831
- const B = Fo(v);
832
- h.appendChild(B);
833
- const P = jo();
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);
834
830
  h.appendChild(P);
835
- const G = Ho();
836
- h.appendChild(G);
837
- const W = Bo(v);
838
- h.appendChild(W);
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);
839
837
  const N = Lo();
840
838
  return h.appendChild(N), h;
841
839
  }
842
- function Wo(v) {
843
- const p = new DOMParser().parseFromString(v, "text/html");
844
- return Array.from(p.querySelectorAll("img")).forEach((m) => {
845
- if (!p.body.contains(m) || m.closest(".editor-image-wrapper")) return;
846
- const w = m.getAttribute("src") || m.src;
847
- if (!w) return;
848
- const x = document.createElement("img");
849
- x.src = w, m.alt && (x.alt = m.alt), m.title && (x.title = m.title), x.style.maxWidth = "100%", x.style.width = "100%", x.style.height = "auto", x.style.cursor = "pointer", x.draggable = !1;
850
- const k = m.getAttribute("width") || m.style.width || (m.naturalWidth > 0 ? `${m.naturalWidth}px` : null), S = document.createElement("div");
851
- S.className = "editor-image-wrapper", S.style.display = "inline-block", S.style.position = "relative", S.style.maxWidth = "100%", S.style.width = k && k !== "0px" ? k.includes("px") ? k : `${k}px` : "300px", S.style.height = "auto", S.contentEditable = "false", S.style.boxSizing = "border-box", S.style.touchAction = "none", S.style.userSelect = "none", S.appendChild(x);
852
- const _ = document.createElement("p");
853
- _.style.margin = "10px 0", _.style.textAlign = "left", _.style.display = "block", _.appendChild(S);
854
- let A = m;
855
- const B = m.closest("figure"), P = m.closest("picture");
856
- if (B && p.body.contains(B))
857
- A = B;
858
- else if (P && p.body.contains(P))
859
- A = P;
860
- else {
861
- let G = m.parentNode;
862
- for (; G && G !== p.body && G.parentNode !== p.body && Array.from(G.childNodes).filter(
863
- (N) => N.nodeType === Node.ELEMENT_NODE || N.nodeType === Node.TEXT_NODE && N.textContent?.trim()
864
- ).length === 1; )
865
- A = G, G = G.parentNode;
866
- }
867
- A && A.parentNode && p.body.contains(A) ? A.parentNode.replaceChild(_, A) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(_, m);
868
- }), p.body.innerHTML;
869
- }
870
- function Yo(v, h) {
871
- const p = document.createElement("div");
872
- 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";
873
- const u = document.createElement("style");
874
- u.textContent = `
875
- .editor::-webkit-scrollbar { display: none; }
876
- .editor ul, .editor ol {
877
- margin: 0.5em 0;
878
- padding-left: 2em;
879
- list-style-position: outside;
880
- }
881
- .editor ul { list-style-type: disc; }
882
- .editor ol { list-style-type: decimal; }
883
- .editor li {
884
- margin: 0.25em 0;
885
- display: list-item;
886
- }
887
- `, document.querySelector("style[data-editor-scrollbar]") || (u.setAttribute("data-editor-scrollbar", "true"), document.head.appendChild(u)), p.innerHTML = "", p.addEventListener("dragover", (w) => {
888
- w.preventDefault(), w.stopPropagation();
889
- }), p.addEventListener("drop", (w) => {
890
- w.preventDefault(), w.stopPropagation();
891
- const x = w.clientX, k = w.clientY;
892
- let S = null;
893
- if (document.caretRangeFromPoint)
894
- S = document.caretRangeFromPoint(x, k);
895
- else if (document.caretPositionFromPoint) {
896
- const A = document.caretPositionFromPoint(x, k);
897
- A && (S = document.createRange(), S.setStart(A.offsetNode, A.offset));
898
- }
899
- const _ = w.dataTransfer?.files;
900
- if (_ && _.length > 0)
901
- for (let A = 0; A < _.length; A++) {
902
- const B = _[A];
903
- if (B.type.startsWith("image/")) {
904
- const P = new FileReader();
905
- P.onload = (G) => {
906
- const W = document.createElement("img");
907
- W.src = G.target?.result, W.style.maxWidth = "100%", W.style.width = "100%", W.style.height = "auto", W.style.cursor = "pointer", W.draggable = !1;
908
- const N = document.createElement("div");
909
- 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(W);
910
- const J = document.createElement("div");
911
- if (J.contentEditable = "true", J.style.margin = "10px 0", J.style.textAlign = "left", J.style.display = "block", J.appendChild(N), S)
912
- try {
913
- S.insertNode(J);
914
- const U = window.getSelection();
915
- if (U) {
916
- U.removeAllRanges();
917
- const Z = document.createRange();
918
- Z.setStartAfter(J), Z.collapse(!0), U.addRange(Z), de(Z);
919
- }
920
- } catch {
921
- p.appendChild(J);
922
- }
923
- else
924
- p.appendChild(J);
925
- p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
926
- }, P.readAsDataURL(B);
927
- }
928
- }
929
- }), p.addEventListener("paste", (w) => {
930
- w.preventDefault();
931
- const x = w.clipboardData;
932
- if (!x) return;
933
- let k = x.getData("text/html");
934
- k ? k = Wo(k) : k = x.getData("text/plain");
935
- const S = window.getSelection();
936
- if (S && S.rangeCount > 0) {
937
- const _ = S.getRangeAt(0), A = document.createElement("div");
938
- A.innerHTML = k;
939
- const B = document.createDocumentFragment();
940
- for (; A.firstChild; )
941
- B.appendChild(A.firstChild);
942
- _.deleteContents(), _.insertNode(B), _.collapse(!1), S.removeAllRanges(), S.addRange(_);
943
- } else {
944
- const _ = document.createElement("div");
945
- for (_.innerHTML = k; _.firstChild; )
946
- p.appendChild(_.firstChild);
947
- }
948
- p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
949
- }), p.addEventListener("click", (w) => {
950
- const x = w.target;
951
- let k = x;
952
- if (x.tagName === "IMG" && (k = x.parentElement), k && k.classList.contains("editor-image-wrapper")) {
953
- w.preventDefault(), w.stopPropagation(), h(k);
954
- const S = k.parentElement;
955
- if (S && (S.tagName === "DIV" || S.tagName === "P") && S.querySelector(".editor-image-wrapper"))
956
- try {
957
- const _ = window.getSelection();
958
- if (_) {
959
- const A = document.createRange();
960
- A.selectNodeContents(S), _.removeAllRanges(), _.addRange(A), de();
961
- }
962
- } catch {
963
- }
964
- } else
965
- de();
966
- }), p.addEventListener("keyup", () => de()), p.addEventListener("mouseup", () => de()), p.addEventListener("focus", () => de()), window.addEventListener("selectionchange", () => {
967
- try {
968
- const w = window.getSelection();
969
- if (!w || !w.anchorNode) return;
970
- let x = w.anchorNode;
971
- for (; x && x.nodeType !== Node.ELEMENT_NODE; )
972
- x = x.parentNode;
973
- if (!x) return;
974
- p.contains(x) && de();
975
- } catch {
976
- }
977
- });
978
- const m = () => {
979
- if (!p.firstChild) {
980
- p.innerHTML = "<p><br></p>";
981
- return;
982
- }
983
- const w = Array.from(p.childNodes);
984
- for (const x of w)
985
- if (x.nodeType === Node.TEXT_NODE && x.textContent?.trim()) {
986
- const k = window.getSelection();
987
- let S = null;
988
- k && k.rangeCount > 0 && (S = k.getRangeAt(0).cloneRange());
989
- const _ = document.createElement("p");
990
- if (x.parentNode?.insertBefore(_, x), _.appendChild(x), S && k)
991
- try {
992
- k.removeAllRanges(), k.addRange(S);
993
- } catch {
994
- }
995
- }
996
- };
997
- let g = null;
998
- return p.addEventListener("input", () => {
999
- g && clearTimeout(g), g = setTimeout(() => m(), 100);
1000
- }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : m(), p;
1001
- }
1002
- function $o(v) {
840
+ function qo(v) {
1003
841
  return v && v.__esModule && Object.prototype.hasOwnProperty.call(v, "default") ? v.default : v;
1004
842
  }
1005
- var Je = { exports: {} }, Vo = Je.exports, Pn;
1006
- function Uo() {
843
+ var Je = { exports: {} }, Yo = Je.exports, Pn;
844
+ function $o() {
1007
845
  return Pn || (Pn = 1, (function(v, h) {
1008
846
  (function(p, u) {
1009
847
  v.exports = u();
1010
- })(Vo, (function() {
848
+ })(Yo, (function() {
1011
849
  function p(t, e) {
1012
850
  var n = Object.keys(t);
1013
851
  if (Object.getOwnPropertySymbols) {
@@ -1022,7 +860,7 @@ function Uo() {
1022
860
  for (var e = 1; e < arguments.length; e++) {
1023
861
  var n = arguments[e] != null ? arguments[e] : {};
1024
862
  e % 2 ? p(Object(n), !0).forEach((function(r) {
1025
- k(t, r, n[r]);
863
+ _(t, r, n[r]);
1026
864
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach((function(r) {
1027
865
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
1028
866
  }));
@@ -1042,34 +880,34 @@ function Uo() {
1042
880
  function w(t, e) {
1043
881
  for (var n = 0; n < e.length; n++) {
1044
882
  var r = e[n];
1045
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, W(r.key), r);
883
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, F(r.key), r);
1046
884
  }
1047
885
  }
1048
- function x(t, e, n) {
886
+ function y(t, e, n) {
1049
887
  return e && w(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1050
888
  }
1051
- function k(t, e, n) {
1052
- return (e = W(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
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;
1053
891
  }
1054
- function S(t, e) {
892
+ function M(t, e) {
1055
893
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
1056
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && A(t, e);
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);
1057
895
  }
1058
- function _(t) {
1059
- return _ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
896
+ function C(t) {
897
+ return C = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
1060
898
  return e.__proto__ || Object.getPrototypeOf(e);
1061
- }, _(t);
899
+ }, C(t);
1062
900
  }
1063
- function A(t, e) {
1064
- return A = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
901
+ function T(t, e) {
902
+ return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
1065
903
  return n.__proto__ = r, n;
1066
- }, A(t, e);
904
+ }, T(t, e);
1067
905
  }
1068
- function B(t) {
906
+ function P(t) {
1069
907
  if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1070
908
  return t;
1071
909
  }
1072
- function P(t) {
910
+ function A(t) {
1073
911
  var e = (function() {
1074
912
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
1075
913
  if (typeof Proxy == "function") return !0;
@@ -1081,31 +919,31 @@ function Uo() {
1081
919
  }
1082
920
  })();
1083
921
  return function() {
1084
- var n, r = _(t);
922
+ var n, r = C(t);
1085
923
  if (e) {
1086
- var o = _(this).constructor;
924
+ var o = C(this).constructor;
1087
925
  n = Reflect.construct(r, arguments, o);
1088
926
  } else n = r.apply(this, arguments);
1089
927
  return (function(i, a) {
1090
928
  if (a && (typeof a == "object" || typeof a == "function")) return a;
1091
929
  if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1092
- return B(i);
930
+ return P(i);
1093
931
  })(this, n);
1094
932
  };
1095
933
  }
1096
- function G() {
1097
- return G = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
934
+ function j() {
935
+ return j = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
1098
936
  var r = (function(i, a) {
1099
- for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = _(i)) !== null; ) ;
937
+ for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = C(i)) !== null; ) ;
1100
938
  return i;
1101
939
  })(t, e);
1102
940
  if (r) {
1103
941
  var o = Object.getOwnPropertyDescriptor(r, e);
1104
942
  return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
1105
943
  }
1106
- }, G.apply(this, arguments);
944
+ }, j.apply(this, arguments);
1107
945
  }
1108
- function W(t) {
946
+ function F(t) {
1109
947
  var e = (function(n, r) {
1110
948
  if (typeof n != "object" || n === null) return n;
1111
949
  var o = n[Symbol.toPrimitive];
@@ -1120,25 +958,25 @@ function Uo() {
1120
958
  }
1121
959
  var N = function(t) {
1122
960
  return !(!t || !t.Window) && t instanceof t.Window;
1123
- }, J = void 0, U = void 0;
1124
- function Z(t) {
1125
- J = t;
961
+ }, $ = void 0, L = void 0;
962
+ function V(t) {
963
+ $ = t;
1126
964
  var e = t.document.createTextNode("");
1127
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), U = t;
965
+ e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), L = t;
1128
966
  }
1129
- function ne(t) {
1130
- return N(t) ? t : (t.ownerDocument || t).defaultView || U.window;
967
+ function Z(t) {
968
+ return N(t) ? t : (t.ownerDocument || t).defaultView || L.window;
1131
969
  }
1132
- typeof window < "u" && window && Z(window);
970
+ typeof window < "u" && window && V(window);
1133
971
  var ie = function(t) {
1134
972
  return !!t && m(t) === "object";
1135
- }, re = function(t) {
973
+ }, te = function(t) {
1136
974
  return typeof t == "function";
1137
- }, b = { window: function(t) {
1138
- return t === U || N(t);
975
+ }, x = { window: function(t) {
976
+ return t === L || N(t);
1139
977
  }, docFrag: function(t) {
1140
978
  return ie(t) && t.nodeType === 11;
1141
- }, object: ie, func: re, number: function(t) {
979
+ }, object: ie, func: te, number: function(t) {
1142
980
  return typeof t == "number";
1143
981
  }, bool: function(t) {
1144
982
  return typeof t == "boolean";
@@ -1146,21 +984,21 @@ function Uo() {
1146
984
  return typeof t == "string";
1147
985
  }, element: function(t) {
1148
986
  if (!t || m(t) !== "object") return !1;
1149
- var e = ne(t) || U;
987
+ var e = Z(t) || L;
1150
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";
1151
989
  }, plainObject: function(t) {
1152
990
  return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
1153
991
  }, array: function(t) {
1154
- return ie(t) && t.length !== void 0 && re(t.splice);
992
+ return ie(t) && t.length !== void 0 && te(t.splice);
1155
993
  } };
1156
- function ee(t) {
994
+ function ne(t) {
1157
995
  var e = t.interaction;
1158
996
  if (e.prepared.name === "drag") {
1159
997
  var n = e.prepared.axis;
1160
998
  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);
1161
999
  }
1162
1000
  }
1163
- function F(t) {
1001
+ function W(t) {
1164
1002
  var e = t.iEvent, n = t.interaction;
1165
1003
  if (n.prepared.name === "drag") {
1166
1004
  var r = n.prepared.axis;
@@ -1173,25 +1011,25 @@ function Uo() {
1173
1011
  var le = { id: "actions/drag", install: function(t) {
1174
1012
  var e = t.actions, n = t.Interactable, r = t.defaults;
1175
1013
  n.prototype.draggable = le.draggable, e.map.drag = le, e.methodDict.drag = "draggable", r.actions.drag = le.defaults;
1176
- }, listeners: { "interactions:before-action-move": ee, "interactions:action-resume": ee, "interactions:action-move": F, "auto-start:check": function(t) {
1014
+ }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": W, "auto-start:check": function(t) {
1177
1015
  var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
1178
1016
  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;
1179
1017
  } }, draggable: function(t) {
1180
- 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;
1181
- }, beforeMove: ee, move: F, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
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() {
1182
1020
  return "move";
1183
1021
  }, filterEventType: function(t) {
1184
1022
  return t.search("drag") === 0;
1185
- } }, ce = le, X = { init: function(t) {
1023
+ } }, ce = le, J = { init: function(t) {
1186
1024
  var e = t;
1187
- X.document = e.document, X.DocumentFragment = e.DocumentFragment || K, X.SVGElement = e.SVGElement || K, X.SVGSVGElement = e.SVGSVGElement || K, X.SVGElementInstance = e.SVGElementInstance || K, X.Element = e.Element || K, X.HTMLElement = e.HTMLElement || X.Element, X.Event = e.Event, X.Touch = e.Touch || K, X.PointerEvent = e.PointerEvent || e.MSPointerEvent;
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;
1188
1026
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
1189
- function K() {
1027
+ function Q() {
1190
1028
  }
1191
- var Y = X, oe = { init: function(t) {
1192
- var e = Y.Element, n = t.navigator || {};
1193
- oe.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && Y.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!Y.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 ? Y.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 = Y.document && "onmousewheel" in Y.document ? "mousewheel" : "wheel";
1194
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, te = oe;
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;
1195
1033
  function se(t, e) {
1196
1034
  if (t.contains) return t.contains(e);
1197
1035
  for (; e; ) {
@@ -1201,7 +1039,7 @@ function Uo() {
1201
1039
  return !1;
1202
1040
  }
1203
1041
  function pe(t, e) {
1204
- for (; b.element(t); ) {
1042
+ for (; x.element(t); ) {
1205
1043
  if (he(t, e)) return t;
1206
1044
  t = fe(t);
1207
1045
  }
@@ -1209,40 +1047,40 @@ function Uo() {
1209
1047
  }
1210
1048
  function fe(t) {
1211
1049
  var e = t.parentNode;
1212
- if (b.docFrag(e)) {
1213
- for (; (e = e.host) && b.docFrag(e); ) ;
1050
+ if (x.docFrag(e)) {
1051
+ for (; (e = e.host) && x.docFrag(e); ) ;
1214
1052
  return e;
1215
1053
  }
1216
1054
  return e;
1217
1055
  }
1218
1056
  function he(t, e) {
1219
- return U !== J && (e = e.replace(/\/deep\//g, " ")), t[te.prefixedMatchesSelector](e);
1057
+ return L !== $ && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1220
1058
  }
1221
1059
  var E = function(t) {
1222
1060
  return t.parentNode || t.host;
1223
1061
  };
1224
- function z(t, e) {
1062
+ function H(t, e) {
1225
1063
  for (var n, r = [], o = t; (n = E(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1226
1064
  return r;
1227
1065
  }
1228
- function j(t, e, n) {
1229
- for (; b.element(t); ) {
1066
+ function q(t, e, n) {
1067
+ for (; x.element(t); ) {
1230
1068
  if (he(t, e)) return !0;
1231
1069
  if ((t = fe(t)) === n) return he(t, e);
1232
1070
  }
1233
1071
  return !1;
1234
1072
  }
1235
- function $(t) {
1073
+ function G(t) {
1236
1074
  return t.correspondingUseElement || t;
1237
1075
  }
1238
1076
  function xe(t) {
1239
- var e = t instanceof Y.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1077
+ var e = t instanceof X.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1240
1078
  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 };
1241
1079
  }
1242
1080
  function we(t) {
1243
1081
  var e, n = xe(t);
1244
- if (!te.isIOS7 && n) {
1245
- var r = { x: (e = (e = ne(t)) || U).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1082
+ 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 };
1246
1084
  n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
1247
1085
  }
1248
1086
  return n;
@@ -1252,45 +1090,45 @@ function Uo() {
1252
1090
  return e;
1253
1091
  }
1254
1092
  function Ee(t) {
1255
- return !!b.string(t) && (Y.document.querySelector(t), !0);
1093
+ return !!x.string(t) && (X.document.querySelector(t), !0);
1256
1094
  }
1257
- function O(t, e) {
1095
+ function D(t, e) {
1258
1096
  for (var n in e) t[n] = e[n];
1259
1097
  return t;
1260
1098
  }
1261
- function Ze(t, e, n) {
1099
+ function et(t, e, n) {
1262
1100
  return t === "parent" ? fe(n) : t === "self" ? e.getRect(n) : pe(n, t);
1263
1101
  }
1264
1102
  function ze(t, e, n, r) {
1265
1103
  var o = t;
1266
- return b.string(o) ? o = Ze(o, e, n) : b.func(o) && (o = o.apply(void 0, r)), b.element(o) && (o = we(o)), o;
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;
1267
1105
  }
1268
- function et(t) {
1106
+ function tt(t) {
1269
1107
  return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
1270
1108
  }
1271
- function mt(t) {
1272
- return !t || "x" in t && "y" in t || ((t = O({}, 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;
1109
+ 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;
1273
1111
  }
1274
- function tt(t, e, n) {
1112
+ function nt(t, e, n) {
1275
1113
  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;
1276
1114
  }
1277
1115
  function Le(t, e, n) {
1278
1116
  var r = n && t.options[n];
1279
- return et(ze(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1117
+ return tt(ze(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1280
1118
  }
1281
1119
  function Ie(t, e) {
1282
1120
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
1283
1121
  return !0;
1284
1122
  }, r = arguments.length > 3 ? arguments[3] : void 0;
1285
- if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = Bt(t)), b.array(t)) return t.forEach((function(l) {
1123
+ if (r = r || {}, x.string(t) && t.search(" ") !== -1 && (t = Bt(t)), x.array(t)) return t.forEach((function(l) {
1286
1124
  return Ie(l, e, n, r);
1287
1125
  })), r;
1288
- if (b.object(t) && (e = t, t = ""), b.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1289
- else if (b.array(e)) for (var o = 0, i = e; o < i.length; o++) {
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++) {
1290
1128
  var a = i[o];
1291
1129
  Ie(t, a, n, r);
1292
1130
  }
1293
- else if (b.object(e)) for (var s in e)
1131
+ else if (x.object(e)) for (var s in e)
1294
1132
  Ie(Bt(s).map((function(l) {
1295
1133
  return "".concat(t).concat(l);
1296
1134
  })), e[s], n, r);
@@ -1302,7 +1140,7 @@ function Uo() {
1302
1140
  var Fe = function(t, e) {
1303
1141
  return Math.sqrt(t * t + e * e);
1304
1142
  }, jn = ["webkit", "moz"];
1305
- function nt(t, e) {
1143
+ function rt(t, e) {
1306
1144
  t.__set || (t.__set = {});
1307
1145
  var n = function(o) {
1308
1146
  if (jn.some((function(i) {
@@ -1317,33 +1155,33 @@ function Uo() {
1317
1155
  for (var r in e) n(r);
1318
1156
  return t;
1319
1157
  }
1320
- function rt(t, e) {
1158
+ function ot(t, e) {
1321
1159
  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;
1322
1160
  }
1323
- function qt(t) {
1161
+ function Wt(t) {
1324
1162
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1325
1163
  }
1326
- function Wt(t) {
1327
- return t instanceof Y.Event || t instanceof Y.Touch;
1164
+ function qt(t) {
1165
+ return t instanceof X.Event || t instanceof X.Touch;
1328
1166
  }
1329
- function ot(t, e, n) {
1167
+ function it(t, e, n) {
1330
1168
  return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
1331
1169
  }
1332
1170
  function Yt(t, e) {
1333
- return e = e || { x: 0, y: 0 }, te.isOperaMobile && Wt(t) ? (ot("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : ot("page", t, e), e;
1171
+ return e = e || { x: 0, y: 0 }, re.isOperaMobile && qt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1334
1172
  }
1335
1173
  function je(t) {
1336
- return b.number(t.pointerId) ? t.pointerId : t.identifier;
1174
+ return x.number(t.pointerId) ? t.pointerId : t.identifier;
1337
1175
  }
1338
1176
  function Hn(t, e, n) {
1339
1177
  var r = e.length > 1 ? $t(e) : e[0];
1340
1178
  Yt(r, t.page), (function(o, i) {
1341
- i = i || {}, te.isOperaMobile && Wt(o) ? ot("screen", o, i) : ot("client", o, i);
1179
+ i = i || {}, re.isOperaMobile && qt(o) ? it("screen", o, i) : it("client", o, i);
1342
1180
  })(r, t.client), t.timeStamp = n;
1343
1181
  }
1344
- function gt(t) {
1182
+ function yt(t) {
1345
1183
  var e = [];
1346
- 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;
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;
1347
1185
  }
1348
1186
  function $t(t) {
1349
1187
  for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
@@ -1353,38 +1191,38 @@ function Uo() {
1353
1191
  for (var i in e) e[i] /= t.length;
1354
1192
  return e;
1355
1193
  }
1356
- function yt(t) {
1194
+ function bt(t) {
1357
1195
  if (!t.length) return null;
1358
- var e = gt(t), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), o = Math.max(e[0].pageX, e[1].pageX), i = Math.max(e[0].pageY, e[1].pageY);
1196
+ var e = yt(t), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), o = Math.max(e[0].pageX, e[1].pageX), i = Math.max(e[0].pageY, e[1].pageY);
1359
1197
  return { x: n, y: r, left: n, top: r, right: o, bottom: i, width: o - n, height: i - r };
1360
1198
  }
1361
- function bt(t, e) {
1362
- var n = e + "X", r = e + "Y", o = gt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
1199
+ function xt(t, e) {
1200
+ var n = e + "X", r = e + "Y", o = yt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
1363
1201
  return Fe(i, a);
1364
1202
  }
1365
- function xt(t, e) {
1366
- var n = e + "X", r = e + "Y", o = gt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
1203
+ function wt(t, e) {
1204
+ var n = e + "X", r = e + "Y", o = yt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
1367
1205
  return 180 * Math.atan2(a, i) / Math.PI;
1368
1206
  }
1369
1207
  function Vt(t) {
1370
- 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 Y.Touch ? "touch" : "mouse";
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";
1371
1209
  }
1372
1210
  function Ut(t) {
1373
- var e = b.func(t.composedPath) ? t.composedPath() : t.path;
1374
- return [$(e ? e[0] : t.target), $(t.currentTarget)];
1211
+ var e = x.func(t.composedPath) ? t.composedPath() : t.path;
1212
+ return [G(e ? e[0] : t.target), G(t.currentTarget)];
1375
1213
  }
1376
- var it = (function() {
1214
+ var at = (function() {
1377
1215
  function t(e) {
1378
1216
  g(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
1379
1217
  }
1380
- return x(t, [{ key: "preventDefault", value: function() {
1218
+ return y(t, [{ key: "preventDefault", value: function() {
1381
1219
  } }, { key: "stopPropagation", value: function() {
1382
1220
  this.propagationStopped = !0;
1383
1221
  } }, { key: "stopImmediatePropagation", value: function() {
1384
1222
  this.immediatePropagationStopped = this.propagationStopped = !0;
1385
1223
  } }]), t;
1386
1224
  })();
1387
- Object.defineProperty(it.prototype, "interaction", { get: function() {
1225
+ Object.defineProperty(at.prototype, "interaction", { get: function() {
1388
1226
  return this._interaction._proxy;
1389
1227
  }, set: function() {
1390
1228
  } });
@@ -1402,15 +1240,15 @@ function Uo() {
1402
1240
  }, Be = function(t, e) {
1403
1241
  return t[He(t, e)];
1404
1242
  }, De = (function(t) {
1405
- S(n, t);
1406
- var e = P(n);
1243
+ M(n, t);
1244
+ var e = A(n);
1407
1245
  function n(r, o, i) {
1408
1246
  var a;
1409
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;
1410
1248
  var s = i === "dragleave" ? r.prev : r.cur, l = s.element, d = s.dropzone;
1411
1249
  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;
1412
1250
  }
1413
- return x(n, [{ key: "reject", value: function() {
1251
+ return y(n, [{ key: "reject", value: function() {
1414
1252
  var r = this, o = this._interaction.dropState;
1415
1253
  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") {
1416
1254
  var i = o.activeDrops, a = He(i, (function(l) {
@@ -1427,22 +1265,22 @@ function Uo() {
1427
1265
  } }, { key: "stopImmediatePropagation", value: function() {
1428
1266
  this.immediatePropagationStopped = this.propagationStopped = !0;
1429
1267
  } }]), n;
1430
- })(it);
1268
+ })(at);
1431
1269
  function Kt(t, e) {
1432
1270
  for (var n = 0, r = t.slice(); n < r.length; n++) {
1433
1271
  var o = r[n], i = o.dropzone, a = o.element;
1434
1272
  e.dropzone = i, e.target = a, i.fire(e), e.propagationStopped = e.immediatePropagationStopped = !1;
1435
1273
  }
1436
1274
  }
1437
- function wt(t, e) {
1275
+ function Et(t, e) {
1438
1276
  for (var n = (function(i, a) {
1439
1277
  for (var s = [], l = 0, d = i.interactables.list; l < d.length; l++) {
1440
1278
  var c = d[l];
1441
1279
  if (c.options.drop.enabled) {
1442
1280
  var f = c.options.drop.accept;
1443
- if (!(b.element(f) && f !== a || b.string(f) && !he(a, f) || b.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var y = 0, T = c.getAllElements(); y < T.length; y++) {
1444
- var C = T[y];
1445
- C !== a && s.push({ dropzone: c, element: C, rect: c.getRect(C) });
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) });
1446
1284
  }
1447
1285
  }
1448
1286
  }
@@ -1455,44 +1293,44 @@ function Uo() {
1455
1293
  }
1456
1294
  function Jt(t, e, n) {
1457
1295
  for (var r = t.dropState, o = t.interactable, i = t.element, a = [], s = 0, l = r.activeDrops; s < l.length; s++) {
1458
- var d = l[s], c = d.dropzone, f = d.element, y = d.rect, T = c.dropCheck(e, n, o, i, f, y);
1459
- a.push(T ? f : null);
1460
- }
1461
- var C = (function(M) {
1462
- for (var I, R, D, q = [], Q = 0; Q < M.length; Q++) {
1463
- var L = M[Q], V = M[I];
1464
- if (L && Q !== I) if (V) {
1465
- var me = E(L), ae = E(V);
1466
- if (me !== L.ownerDocument) if (ae !== L.ownerDocument) if (me !== ae) {
1467
- q = q.length ? q : z(V);
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);
1468
1306
  var ge = void 0;
1469
- if (V instanceof Y.HTMLElement && L instanceof Y.SVGElement && !(L instanceof Y.SVGSVGElement)) {
1470
- if (L === ae) continue;
1471
- ge = L.ownerSVGElement;
1472
- } else ge = L;
1473
- for (var be = z(ge, V.ownerDocument), Se = 0; be[Se] && be[Se] === q[Se]; ) Se++;
1474
- var ht = [be[Se - 1], be[Se], q[Se]];
1475
- if (ht[0]) for (var Ue = ht[0].lastChild; Ue; ) {
1476
- if (Ue === ht[1]) {
1477
- I = Q, q = be;
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;
1478
1316
  break;
1479
1317
  }
1480
- if (Ue === ht[2]) break;
1318
+ if (Ue === vt[2]) break;
1481
1319
  Ue = Ue.previousSibling;
1482
1320
  }
1483
- } else D = V, (parseInt(ne(R = L).getComputedStyle(R).zIndex, 10) || 0) >= (parseInt(ne(D).getComputedStyle(D).zIndex, 10) || 0) && (I = Q);
1484
- else I = Q;
1485
- } else I = Q;
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;
1486
1324
  }
1487
- return I;
1325
+ return O;
1488
1326
  })(a);
1489
- return r.activeDrops[C] || null;
1327
+ return r.activeDrops[k] || null;
1490
1328
  }
1491
- function Et(t, e, n) {
1329
+ function kt(t, e, n) {
1492
1330
  var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
1493
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;
1494
1332
  }
1495
- function kt(t, e) {
1333
+ function Ct(t, e) {
1496
1334
  var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
1497
1335
  e.leave && i.dropzone.fire(e.leave), e.enter && o.dropzone.fire(e.enter), e.move && o.dropzone.fire(e.move), e.drop && o.dropzone.fire(e.drop), e.deactivate && Kt(r, e.deactivate), n.prev.dropzone = o.dropzone, n.prev.element = o.element;
1498
1336
  }
@@ -1500,47 +1338,47 @@ function Uo() {
1500
1338
  var n = t.interaction, r = t.iEvent, o = t.event;
1501
1339
  if (r.type === "dragmove" || r.type === "dragend") {
1502
1340
  var i = n.dropState;
1503
- e.dynamicDrop && (i.activeDrops = wt(e, n.element));
1341
+ e.dynamicDrop && (i.activeDrops = Et(e, n.element));
1504
1342
  var a = r, s = Jt(n, a, o);
1505
- i.rejected = i.rejected && !!s && s.dropzone === i.cur.dropzone && s.element === i.cur.element, i.cur.dropzone = s && s.dropzone, i.cur.element = s && s.element, i.events = Et(n, 0, a);
1343
+ i.rejected = i.rejected && !!s && s.dropzone === i.cur.dropzone && s.element === i.cur.element, i.cur.dropzone = s && s.dropzone, i.cur.element = s && s.element, i.events = kt(n, 0, a);
1506
1344
  }
1507
1345
  }
1508
1346
  var Zt = { id: "actions/drop", install: function(t) {
1509
1347
  var e = t.actions, n = t.interactStatic, r = t.Interactable, o = t.defaults;
1510
1348
  t.usePlugin(ce), r.prototype.dropzone = function(i) {
1511
1349
  return (function(a, s) {
1512
- if (b.object(s)) {
1350
+ if (x.object(s)) {
1513
1351
  if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
1514
- var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, y) {
1515
- return f[/^(enter|leave)/.test(y) ? "drag".concat(y) : /^(activate|deactivate|move)/.test(y) ? "drop".concat(y) : y] = l[y], f;
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;
1516
1354
  }), {}), c = a.options.drop.listeners;
1517
1355
  c && a.off(c), a.on(d), a.options.drop.listeners = d;
1518
1356
  }
1519
- 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;
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;
1520
1358
  }
1521
- return b.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1359
+ return x.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1522
1360
  })(this, i);
1523
1361
  }, r.prototype.dropCheck = function(i, a, s, l, d, c) {
1524
- return (function(f, y, T, C, M, I, R) {
1525
- var D = !1;
1526
- if (!(R = R || f.getRect(I))) return !!f.options.drop.checker && f.options.drop.checker(y, T, D, f, I, C, M);
1527
- var q = f.options.drop.overlap;
1528
- if (q === "pointer") {
1529
- var Q = Le(C, M, "drag"), L = Yt(y);
1530
- L.x += Q.x, L.y += Q.y;
1531
- var V = L.x > R.left && L.x < R.right, me = L.y > R.top && L.y < R.bottom;
1532
- D = V && me;
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;
1533
1371
  }
1534
- var ae = C.getRect(M);
1535
- if (ae && q === "center") {
1372
+ var ae = k.getRect(R);
1373
+ if (ae && U === "center") {
1536
1374
  var ge = ae.left + ae.width / 2, be = ae.top + ae.height / 2;
1537
- D = ge >= R.left && ge <= R.right && be >= R.top && be <= R.bottom;
1375
+ z = ge >= I.left && ge <= I.right && be >= I.top && be <= I.bottom;
1538
1376
  }
1539
- return ae && b.number(q) && (D = Math.max(0, Math.min(R.right, ae.right) - Math.max(R.left, ae.left)) * Math.max(0, Math.min(R.bottom, ae.bottom) - Math.max(R.top, ae.top)) / (ae.width * ae.height) >= q), f.options.drop.checker && (D = f.options.drop.checker(y, T, D, f, I, C, M)), D;
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;
1540
1378
  })(this, i, a, s, l, d, c);
1541
1379
  }, n.dynamicDrop = function(i) {
1542
- return b.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1543
- }, O(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;
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;
1544
1382
  }, listeners: { "interactions:before-action-start": function(t) {
1545
1383
  var e = t.interaction;
1546
1384
  e.prepared.name === "drag" && (e.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
@@ -1548,18 +1386,18 @@ function Uo() {
1548
1386
  var n = t.interaction, r = (t.event, t.iEvent);
1549
1387
  if (n.prepared.name === "drag") {
1550
1388
  var o = n.dropState;
1551
- o.activeDrops = [], o.events = {}, o.activeDrops = wt(e, n.element), o.events = Et(n, 0, r), o.events.activate && (Kt(o.activeDrops, o.events.activate), e.fire("actions/drop:start", { interaction: n, dragEvent: r }));
1389
+ o.activeDrops = [], o.events = {}, o.activeDrops = Et(e, n.element), o.events = kt(n, 0, r), o.events.activate && (Kt(o.activeDrops, o.events.activate), e.fire("actions/drop:start", { interaction: n, dragEvent: r }));
1552
1390
  }
1553
1391
  }, "interactions:action-move": Qt, "interactions:after-action-move": function(t, e) {
1554
1392
  var n = t.interaction, r = t.iEvent;
1555
1393
  if (n.prepared.name === "drag") {
1556
1394
  var o = n.dropState;
1557
- kt(n, o.events), e.fire("actions/drop:move", { interaction: n, dragEvent: r }), o.events = {};
1395
+ Ct(n, o.events), e.fire("actions/drop:move", { interaction: n, dragEvent: r }), o.events = {};
1558
1396
  }
1559
1397
  }, "interactions:action-end": function(t, e) {
1560
1398
  if (t.interaction.prepared.name === "drag") {
1561
1399
  var n = t.interaction, r = t.iEvent;
1562
- Qt(t, e), kt(n, n.dropState.events), e.fire("actions/drop:end", { interaction: n, dragEvent: r });
1400
+ Qt(t, e), Ct(n, n.dropState.events), e.fire("actions/drop:end", { interaction: n, dragEvent: r });
1563
1401
  }
1564
1402
  }, "interactions:stop": function(t) {
1565
1403
  var e = t.interaction;
@@ -1567,29 +1405,29 @@ function Uo() {
1567
1405
  var n = e.dropState;
1568
1406
  n && (n.activeDrops = null, n.events = null, n.cur.dropzone = null, n.cur.element = null, n.prev.dropzone = null, n.prev.element = null, n.rejected = !1);
1569
1407
  }
1570
- } }, getActiveDrops: wt, getDrop: Jt, getDropEvents: Et, fireDropEvents: kt, filterEventType: function(t) {
1408
+ } }, getActiveDrops: Et, getDrop: Jt, getDropEvents: kt, fireDropEvents: Ct, filterEventType: function(t) {
1571
1409
  return t.search("drag") === 0 || t.search("drop") === 0;
1572
1410
  }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Bn = Zt;
1573
- function Ct(t) {
1411
+ function St(t) {
1574
1412
  var e = t.interaction, n = t.iEvent, r = t.phase;
1575
1413
  if (e.prepared.name === "gesture") {
1576
1414
  var o = e.pointers.map((function(d) {
1577
1415
  return d.pointer;
1578
1416
  })), i = r === "start", a = r === "end", s = e.interactable.options.deltaSource;
1579
- if (n.touches = [o[0], o[1]], i) n.distance = bt(o, s), n.box = yt(o), n.scale = 1, n.ds = 0, n.angle = xt(o, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;
1417
+ if (n.touches = [o[0], o[1]], i) n.distance = xt(o, s), n.box = bt(o), n.scale = 1, n.ds = 0, n.angle = wt(o, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;
1580
1418
  else if (a || e.pointers.length < 2) {
1581
1419
  var l = e.prevEvent;
1582
1420
  n.distance = l.distance, n.box = l.box, n.scale = l.scale, n.ds = 0, n.angle = l.angle, n.da = 0;
1583
- } else n.distance = bt(o, s), n.box = yt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = xt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
1584
- 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);
1421
+ } 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);
1585
1423
  }
1586
1424
  }
1587
- var St = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1425
+ var Tt = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1588
1426
  var e = t.actions, n = t.Interactable, r = t.defaults;
1589
1427
  n.prototype.gesturable = function(o) {
1590
- 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;
1591
- }, e.map.gesture = St, e.methodDict.gesture = "gesturable", r.actions.gesture = St.defaults;
1592
- }, listeners: { "interactions:action-start": Ct, "interactions:action-move": Ct, "interactions:action-end": Ct, "interactions:new": function(t) {
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;
1429
+ }, e.map.gesture = Tt, e.methodDict.gesture = "gesturable", r.actions.gesture = Tt.defaults;
1430
+ }, listeners: { "interactions:action-start": St, "interactions:action-move": St, "interactions:action-end": St, "interactions:new": function(t) {
1593
1431
  t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
1594
1432
  }, "auto-start:check": function(t) {
1595
1433
  if (!(t.interaction.pointers.length < 2)) {
@@ -1600,11 +1438,11 @@ function Uo() {
1600
1438
  return "";
1601
1439
  }, filterEventType: function(t) {
1602
1440
  return t.search("gesture") === 0;
1603
- } }, qn = St;
1604
- function Wn(t, e, n, r, o, i, a) {
1441
+ } }, Wn = Tt;
1442
+ function qn(t, e, n, r, o, i, a) {
1605
1443
  if (!e) return !1;
1606
1444
  if (e === !0) {
1607
- var s = b.number(i.width) ? i.width : i.right - i.left, l = b.number(i.height) ? i.height : i.bottom - i.top;
1445
+ var s = x.number(i.width) ? i.width : i.right - i.left, l = x.number(i.height) ? i.height : i.bottom - i.top;
1608
1446
  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") {
1609
1447
  var d = s >= 0 ? i.left : i.right;
1610
1448
  return n.x < d + a;
@@ -1616,7 +1454,7 @@ function Uo() {
1616
1454
  if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
1617
1455
  if (t === "bottom") return n.y > (l >= 0 ? i.bottom : i.top) - a;
1618
1456
  }
1619
- return !!b.element(r) && (b.element(e) ? e === r : j(r, e, o));
1457
+ return !!x.element(r) && (x.element(e) ? e === r : q(r, e, o));
1620
1458
  }
1621
1459
  function en(t) {
1622
1460
  var e = t.iEvent, n = t.interaction;
@@ -1631,7 +1469,7 @@ function Uo() {
1631
1469
  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" };
1632
1470
  })(n), Ce.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(i) {
1633
1471
  return (function(a, s, l) {
1634
- 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;
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;
1635
1473
  })(this, i, t);
1636
1474
  }, e.map.resize = Ce, e.methodDict.resize = "resizable", o.actions.resize = Ce.defaults;
1637
1475
  }, listeners: { "interactions:new": function(t) {
@@ -1641,27 +1479,27 @@ function Uo() {
1641
1479
  var n = e.iEvent, r = e.interaction;
1642
1480
  if (r.prepared.name === "resize" && r.prepared.edges) {
1643
1481
  var o = n, i = r.rect;
1644
- r._rects = { start: O({}, i), corrected: O({}, i), previous: O({}, 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;
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;
1645
1483
  }
1646
1484
  })(t), en(t);
1647
1485
  }, "interactions:action-move": function(t) {
1648
1486
  (function(e) {
1649
1487
  var n = e.iEvent, r = e.interaction;
1650
1488
  if (r.prepared.name === "resize" && r.prepared.edges) {
1651
- 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, y = l.previous;
1652
- if (O(y, c), a) {
1653
- if (O(c, s), i === "reposition") {
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") {
1654
1492
  if (c.top > c.bottom) {
1655
- var T = c.top;
1656
- c.top = c.bottom, c.bottom = T;
1493
+ var S = c.top;
1494
+ c.top = c.bottom, c.bottom = S;
1657
1495
  }
1658
1496
  if (c.left > c.right) {
1659
- var C = c.left;
1660
- c.left = c.right, c.right = C;
1497
+ var k = c.left;
1498
+ c.left = c.right, c.right = k;
1661
1499
  }
1662
1500
  }
1663
1501
  } 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);
1664
- for (var M in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[M] = c[M] - y[M];
1502
+ for (var R in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[R] = c[R] - b[R];
1665
1503
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1666
1504
  }
1667
1505
  })(t), en(t);
@@ -1674,11 +1512,11 @@ function Uo() {
1674
1512
  }, "auto-start:check": function(t) {
1675
1513
  var e = t.interaction, n = t.interactable, r = t.element, o = t.rect, i = t.buttons;
1676
1514
  if (o) {
1677
- var a = O({}, e.coords.cur.page), s = n.options.resize;
1515
+ var a = D({}, e.coords.cur.page), s = n.options.resize;
1678
1516
  if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (i & s.mouseButtons) != 0)) {
1679
- if (b.object(s.edges)) {
1517
+ if (x.object(s.edges)) {
1680
1518
  var l = { left: !1, right: !1, top: !1, bottom: !1 };
1681
- for (var d in l) l[d] = Wn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1519
+ for (var d in l) l[d] = qn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1682
1520
  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 });
1683
1521
  } else {
1684
1522
  var c = s.axis !== "y" && a.x > o.right - Ce.defaultMargin, f = s.axis !== "x" && a.y > o.bottom - Ce.defaultMargin;
@@ -1701,7 +1539,7 @@ function Uo() {
1701
1539
  }, filterEventType: function(t) {
1702
1540
  return t.search("resize") === 0;
1703
1541
  }, defaultMargin: null }, Yn = Ce, $n = { id: "actions", install: function(t) {
1704
- t.usePlugin(qn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1542
+ t.usePlugin(Wn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1705
1543
  } }, tn = 0, Te = { request: function(t) {
1706
1544
  return ke(t);
1707
1545
  }, cancel: function(t) {
@@ -1719,95 +1557,95 @@ function Uo() {
1719
1557
  }, Pe = function(o) {
1720
1558
  return clearTimeout(o);
1721
1559
  });
1722
- } }, H = { 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) {
1723
- H.isScrolling = !0, Te.cancel(H.i), t.autoScroll = H, H.interaction = t, H.prevTime = H.now(), H.i = Te.request(H.scroll);
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);
1724
1562
  }, stop: function() {
1725
- H.isScrolling = !1, H.interaction && (H.interaction.autoScroll = null), Te.cancel(H.i);
1563
+ Y.isScrolling = !1, Y.interaction && (Y.interaction.autoScroll = null), Te.cancel(Y.i);
1726
1564
  }, scroll: function() {
1727
- var t = H.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = H.now(), s = (a - H.prevTime) / 1e3, l = o.speed * s;
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;
1728
1566
  if (l >= 1) {
1729
- var d = { x: H.x * l, y: H.y * l };
1567
+ var d = { x: Y.x * l, y: Y.y * l };
1730
1568
  if (d.x || d.y) {
1731
1569
  var c = rn(i);
1732
- b.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1733
- var f = rn(i), y = { x: f.x - c.x, y: f.y - c.y };
1734
- (y.x || y.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: y, interaction: t, container: 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 });
1735
1573
  }
1736
- H.prevTime = a;
1574
+ Y.prevTime = a;
1737
1575
  }
1738
- H.isScrolling && (Te.cancel(H.i), H.i = Te.request(H.scroll));
1576
+ Y.isScrolling && (Te.cancel(Y.i), Y.i = Te.request(Y.scroll));
1739
1577
  }, check: function(t, e) {
1740
1578
  var n;
1741
1579
  return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
1742
1580
  }, onInteractionMove: function(t) {
1743
1581
  var e = t.interaction, n = t.pointer;
1744
- if (e.interacting() && H.check(e.interactable, e.prepared.name)) if (e.simulation) H.x = H.y = 0;
1582
+ if (e.interacting() && Y.check(e.interactable, e.prepared.name)) if (e.simulation) Y.x = Y.y = 0;
1745
1583
  else {
1746
1584
  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);
1747
- if (b.window(f)) a = n.clientX < H.margin, r = n.clientY < H.margin, o = n.clientX > f.innerWidth - H.margin, i = n.clientY > f.innerHeight - H.margin;
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;
1748
1586
  else {
1749
- var y = xe(f);
1750
- a = n.clientX < y.left + H.margin, r = n.clientY < y.top + H.margin, o = n.clientX > y.right - H.margin, i = n.clientY > y.bottom - H.margin;
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;
1751
1589
  }
1752
- H.x = o ? 1 : a ? -1 : 0, H.y = i ? 1 : r ? -1 : 0, H.isScrolling || (H.margin = c.margin, H.speed = c.speed, H.start(e));
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));
1753
1591
  }
1754
1592
  } };
1755
1593
  function nn(t, e, n) {
1756
- return (b.string(t) ? Ze(t, e, n) : t) || ne(n);
1594
+ return (x.string(t) ? et(t, e, n) : t) || Z(n);
1757
1595
  }
1758
1596
  function rn(t) {
1759
- return b.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1597
+ return x.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1760
1598
  }
1761
1599
  var Vn = { id: "auto-scroll", install: function(t) {
1762
1600
  var e = t.defaults, n = t.actions;
1763
- t.autoScroll = H, H.now = function() {
1601
+ t.autoScroll = Y, Y.now = function() {
1764
1602
  return t.now();
1765
- }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = H.defaults;
1603
+ }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = Y.defaults;
1766
1604
  }, listeners: { "interactions:new": function(t) {
1767
1605
  t.interaction.autoScroll = null;
1768
1606
  }, "interactions:destroy": function(t) {
1769
- t.interaction.autoScroll = null, H.stop(), H.interaction && (H.interaction = null);
1770
- }, "interactions:stop": H.stop, "interactions:action-move": function(t) {
1771
- return H.onInteractionMove(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);
1772
1610
  } } }, Un = Vn;
1773
- function qe(t, e) {
1611
+ function We(t, e) {
1774
1612
  var n = !1;
1775
1613
  return function() {
1776
- return n || (U.console.warn(e), n = !0), t.apply(this, arguments);
1614
+ return n || (L.console.warn(e), n = !0), t.apply(this, arguments);
1777
1615
  };
1778
1616
  }
1779
- function Tt(t, e) {
1617
+ function _t(t, e) {
1780
1618
  return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
1781
1619
  }
1782
1620
  function Xn(t) {
1783
- return b.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1621
+ return x.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1784
1622
  }
1785
1623
  function Gn(t) {
1786
- return b.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1624
+ return x.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1787
1625
  }
1788
1626
  var Kn = { id: "auto-start/interactableMethods", install: function(t) {
1789
1627
  var e = t.Interactable;
1790
1628
  e.prototype.getAction = function(n, r, o, i) {
1791
1629
  var a = (function(s, l, d, c, f) {
1792
- var y = s.getRect(c), T = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], C = { action: null, interactable: s, interaction: d, element: c, rect: y, buttons: T };
1793
- return f.fire("auto-start:check", C), C.action;
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;
1794
1632
  })(this, r, o, i, t);
1795
1633
  return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, i, o) : a;
1796
- }, e.prototype.ignoreFrom = qe((function(n) {
1634
+ }, e.prototype.ignoreFrom = We((function(n) {
1797
1635
  return this._backCompatOption("ignoreFrom", n);
1798
- }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = qe((function(n) {
1636
+ }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = We((function(n) {
1799
1637
  return this._backCompatOption("allowFrom", n);
1800
1638
  }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = Gn, e.prototype.styleCursor = Xn;
1801
1639
  } };
1802
1640
  function on(t, e, n, r, o) {
1803
- return e.testIgnoreAllow(e.options[t.name], n, r) && e.options[t.name].enabled && at(e, n, t, o) ? t : null;
1641
+ return e.testIgnoreAllow(e.options[t.name], n, r) && e.options[t.name].enabled && st(e, n, t, o) ? t : null;
1804
1642
  }
1805
1643
  function Jn(t, e, n, r, o, i, a) {
1806
1644
  for (var s = 0, l = r.length; s < l; s++) {
1807
1645
  var d = r[s], c = o[s], f = d.getAction(e, n, t, c);
1808
1646
  if (f) {
1809
- var y = on(f, d, c, i, a);
1810
- if (y) return { action: y, interactable: d, element: c };
1647
+ var b = on(f, d, c, i, a);
1648
+ if (b) return { action: b, interactable: d, element: c };
1811
1649
  }
1812
1650
  }
1813
1651
  return { action: null, interactable: null, element: null };
@@ -1817,7 +1655,7 @@ function Uo() {
1817
1655
  function l(c) {
1818
1656
  i.push(c), a.push(s);
1819
1657
  }
1820
- for (; b.element(s); ) {
1658
+ for (; x.element(s); ) {
1821
1659
  i = [], a = [], o.interactables.forEachMatch(s, l);
1822
1660
  var d = Jn(t, e, n, i, a, r, o);
1823
1661
  if (d.action && !d.interactable.options[d.action.name].manualStart) return d;
@@ -1827,22 +1665,22 @@ function Uo() {
1827
1665
  }
1828
1666
  function sn(t, e, n) {
1829
1667
  var r = e.action, o = e.interactable, i = e.element;
1830
- r = r || { name: null }, t.interactable = o, t.element = i, Tt(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
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 });
1831
1669
  }
1832
- function at(t, e, n, r) {
1670
+ function st(t, e, n, r) {
1833
1671
  var o = t.options, i = o[n.name].max, a = o[n.name].maxPerElement, s = r.autoStart.maxInteractions, l = 0, d = 0, c = 0;
1834
1672
  if (!(i && a && s)) return !1;
1835
- for (var f = 0, y = r.interactions.list; f < y.length; f++) {
1836
- var T = y[f], C = T.prepared.name;
1837
- if (T.interacting() && (++l >= s || T.interactable === t && ((d += C === n.name ? 1 : 0) >= i || T.element === e && (c++, C === n.name && c >= a))))
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))))
1838
1676
  return !1;
1839
1677
  }
1840
1678
  return s > 0;
1841
1679
  }
1842
1680
  function ln(t, e) {
1843
- return b.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1681
+ return x.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1844
1682
  }
1845
- function _t(t, e, n) {
1683
+ function Mt(t, e, n) {
1846
1684
  var r = n.autoStart.cursorElement;
1847
1685
  r && r !== t && (r.style.cursor = ""), t.ownerDocument.documentElement.style.cursor = e, t.style.cursor = e, n.autoStart.cursorElement = e ? t : null;
1848
1686
  }
@@ -1852,16 +1690,16 @@ function Uo() {
1852
1690
  var i = "";
1853
1691
  if (o.name) {
1854
1692
  var a = n.options[o.name].cursorChecker;
1855
- i = b.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1693
+ i = x.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1856
1694
  }
1857
- _t(t.element, i || "", e);
1858
- } else e.autoStart.cursorElement && _t(e.autoStart.cursorElement, "", e);
1695
+ Mt(t.element, i || "", e);
1696
+ } else e.autoStart.cursorElement && Mt(e.autoStart.cursorElement, "", e);
1859
1697
  }
1860
1698
  var Qn = { id: "auto-start/base", before: ["actions"], install: function(t) {
1861
1699
  var e = t.interactStatic, n = t.defaults;
1862
- t.usePlugin(Kn), n.base.actionChecker = null, n.base.styleCursor = !0, O(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
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) {
1863
1701
  return ln(r, t);
1864
- }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: at, cursorElement: null };
1702
+ }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: st, cursorElement: null };
1865
1703
  }, listeners: { "interactions:down": function(t, e) {
1866
1704
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
1867
1705
  n.interacting() || sn(n, an(n, r, o, i, e), e);
@@ -1874,34 +1712,34 @@ function Uo() {
1874
1712
  if (o.pointerIsDown && !o.interacting() && o.pointerWasMoved && o.prepared.name) {
1875
1713
  r.fire("autoStart:before-start", n);
1876
1714
  var i = o.interactable, a = o.prepared.name;
1877
- a && i && (i.options[a].manualStart || !at(i, o.element, o.prepared, r) ? o.stop() : (o.start(o.prepared, i, o.element), cn(o, r)));
1715
+ a && i && (i.options[a].manualStart || !st(i, o.element, o.prepared, r) ? o.stop() : (o.start(o.prepared, i, o.element), cn(o, r)));
1878
1716
  }
1879
1717
  })(t, e);
1880
1718
  }, "interactions:stop": function(t, e) {
1881
1719
  var n = t.interaction, r = n.interactable;
1882
- r && r.options.styleCursor && _t(n.element, "", e);
1883
- } }, maxInteractions: ln, withinInteractionLimit: at, validateAction: on }, Mt = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
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) {
1884
1722
  var n = t.interaction, r = t.eventTarget, o = t.dx, i = t.dy;
1885
1723
  if (n.prepared.name === "drag") {
1886
1724
  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";
1887
1725
  if (n.prepared.axis = l.lockAxis === "start" ? c[0] : l.lockAxis, c !== "xy" && d !== "xy" && d !== c) {
1888
1726
  n.prepared.name = null;
1889
- for (var f = r, y = function(C) {
1890
- if (C !== n.interactable) {
1891
- var M = n.interactable.options.drag;
1892
- if (!M.manualStart && C.testIgnoreAllow(M, f, r)) {
1893
- var I = C.getAction(n.downPointer, n.downEvent, n, f);
1894
- if (I && I.name === "drag" && (function(R, D) {
1895
- if (!D) return !1;
1896
- var q = D.options.drag.startAxis;
1897
- return R === "xy" || q === "xy" || q === R;
1898
- })(c, C) && Mt.validateAction(I, C, f, r, e)) return C;
1727
+ for (var f = r, b = function(k) {
1728
+ if (k !== n.interactable) {
1729
+ var R = n.interactable.options.drag;
1730
+ if (!R.manualStart && k.testIgnoreAllow(R, f, r)) {
1731
+ var O = k.getAction(n.downPointer, n.downEvent, n, f);
1732
+ if (O && O.name === "drag" && (function(I, z) {
1733
+ if (!z) return !1;
1734
+ var U = z.options.drag.startAxis;
1735
+ return I === "xy" || U === "xy" || U === I;
1736
+ })(c, k) && Rt.validateAction(O, k, f, r, e)) return k;
1899
1737
  }
1900
1738
  }
1901
- }; b.element(f); ) {
1902
- var T = e.interactables.forEachMatch(f, y);
1903
- if (T) {
1904
- n.prepared.name = "drag", n.interactable = T, n.element = f;
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;
1905
1743
  break;
1906
1744
  }
1907
1745
  f = fe(f);
@@ -1909,7 +1747,7 @@ function Uo() {
1909
1747
  }
1910
1748
  }
1911
1749
  } } };
1912
- function Rt(t) {
1750
+ function At(t) {
1913
1751
  var e = t.prepared && t.prepared.name;
1914
1752
  if (!e) return null;
1915
1753
  var n = t.interactable.options;
@@ -1917,11 +1755,11 @@ function Uo() {
1917
1755
  }
1918
1756
  var er = { id: "auto-start/hold", install: function(t) {
1919
1757
  var e = t.defaults;
1920
- t.usePlugin(Mt), e.perAction.hold = 0, e.perAction.delay = 0;
1758
+ t.usePlugin(Rt), e.perAction.hold = 0, e.perAction.delay = 0;
1921
1759
  }, listeners: { "interactions:new": function(t) {
1922
1760
  t.interaction.autoStartHoldTimer = null;
1923
1761
  }, "autoStart:prepared": function(t) {
1924
- var e = t.interaction, n = Rt(e);
1762
+ var e = t.interaction, n = At(e);
1925
1763
  n > 0 && (e.autoStartHoldTimer = setTimeout((function() {
1926
1764
  e.start(e.prepared, e.interactable, e.element);
1927
1765
  }), n));
@@ -1930,11 +1768,11 @@ function Uo() {
1930
1768
  e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);
1931
1769
  }, "autoStart:before-start": function(t) {
1932
1770
  var e = t.interaction;
1933
- Rt(e) > 0 && (e.prepared.name = null);
1934
- } }, getHoldDuration: Rt }, tr = er, nr = { id: "auto-start", install: function(t) {
1935
- t.usePlugin(Mt), t.usePlugin(tr), t.usePlugin(Zn);
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);
1936
1774
  } }, rr = function(t) {
1937
- return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : b.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
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;
1938
1776
  };
1939
1777
  function or(t) {
1940
1778
  var e = t.interaction, n = t.event;
@@ -1947,10 +1785,10 @@ function Uo() {
1947
1785
  var a = r.options.preventDefault;
1948
1786
  if (a !== "never") if (a !== "always") {
1949
1787
  if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
1950
- var s = ne(i.target).document, l = o.getDocOptions(s);
1788
+ var s = Z(i.target).document, l = o.getDocOptions(s);
1951
1789
  if (!l || !l.events || l.events.passive !== !1) return;
1952
1790
  }
1953
- /^(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();
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();
1954
1792
  } else i.preventDefault();
1955
1793
  })(this, t, n);
1956
1794
  }, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
@@ -1962,7 +1800,7 @@ function Uo() {
1962
1800
  }, listeners: ["down", "move", "up", "cancel"].reduce((function(t, e) {
1963
1801
  return t["interactions:".concat(e)] = or, t;
1964
1802
  }), {}) };
1965
- function st(t, e) {
1803
+ function lt(t, e) {
1966
1804
  if (e.phaselessTypes[t]) return !0;
1967
1805
  for (var n in e.map) if (t.indexOf(n) === 0 && t.substr(n.length) in e.phases) return !0;
1968
1806
  return !1;
@@ -1971,27 +1809,27 @@ function Uo() {
1971
1809
  var e = {};
1972
1810
  for (var n in t) {
1973
1811
  var r = t[n];
1974
- b.plainObject(r) ? e[n] = Ne(r) : b.array(r) ? e[n] = Gt(r) : e[n] = r;
1812
+ x.plainObject(r) ? e[n] = Ne(r) : x.array(r) ? e[n] = Gt(r) : e[n] = r;
1975
1813
  }
1976
1814
  return e;
1977
1815
  }
1978
- var At = (function() {
1816
+ var It = (function() {
1979
1817
  function t(e) {
1980
- 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 = lt(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
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 };
1981
1819
  }
1982
- return x(t, [{ key: "start", value: function(e, n) {
1820
+ return y(t, [{ key: "start", value: function(e, n) {
1983
1821
  var r, o, i = e.phase, a = this.interaction, s = (function(d) {
1984
1822
  var c = d.interactable.options[d.prepared.name], f = c.modifiers;
1985
- return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(y) {
1986
- var T = c[y];
1987
- return T && T.enabled && { options: T, methods: T._methods };
1988
- })).filter((function(y) {
1989
- return !!y;
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;
1990
1828
  }));
1991
1829
  })(a);
1992
- this.prepareStates(s), this.startEdges = O({}, a.edges), this.edges = O({}, 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 };
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 };
1993
1831
  var l = this.fillArg({ phase: i, pageCoords: n, preEnd: !1 });
1994
- return this.result = lt(), this.startAll(l), this.result = this.setAll(l);
1832
+ return this.result = ct(), this.startAll(l), this.result = this.setAll(l);
1995
1833
  } }, { key: "fillArg", value: function(e) {
1996
1834
  var n = this.interaction;
1997
1835
  return e.interaction = n, e.interactable = n.interactable, e.element = n.element, e.rect || (e.rect = n.rect), e.edges || (e.edges = this.startEdges), e.startOffset = this.startOffset, e;
@@ -2002,27 +1840,27 @@ function Uo() {
2002
1840
  }
2003
1841
  } }, { key: "setAll", value: function(e) {
2004
1842
  var n = e.phase, r = e.preEnd, o = e.skipModifiers, i = e.rect, a = e.edges;
2005
- e.coords = O({}, e.pageCoords), e.rect = O({}, i), e.edges = O({}, a);
2006
- for (var s = o ? this.states.slice(o) : this.states, l = lt(e.coords, e.rect), d = 0; d < s.length; d++) {
2007
- var c, f = s[d], y = f.options, T = O({}, e.coords), C = null;
2008
- (c = f.methods) != null && c.set && this.shouldDo(y, r, n) && (e.state = f, C = f.methods.set(e), tt(e.edges, e.rect, { x: e.coords.x - T.x, y: e.coords.y - T.y })), l.eventProps.push(C);
1843
+ e.coords = D({}, e.pageCoords), e.rect = D({}, i), e.edges = D({}, a);
1844
+ 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);
2009
1847
  }
2010
- O(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;
2011
- var M = this.result.coords, I = this.result.rect;
2012
- if (M && I) {
2013
- var R = l.rect.left !== I.left || l.rect.right !== I.right || l.rect.top !== I.top || l.rect.bottom !== I.bottom;
2014
- l.changed = R || M.x !== l.coords.x || M.y !== l.coords.y;
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;
2015
1853
  }
2016
1854
  return l;
2017
1855
  } }, { key: "applyToInteraction", value: function(e) {
2018
1856
  var n = this.interaction, r = e.phase, o = n.coords.cur, i = n.coords.start, a = this.result, s = this.startDelta, l = a.delta;
2019
- r === "start" && O(this.startDelta, a.delta);
1857
+ r === "start" && D(this.startDelta, a.delta);
2020
1858
  for (var d = 0, c = [[i, s], [o, l]]; d < c.length; d++) {
2021
- var f = c[d], y = f[0], T = f[1];
2022
- y.page.x += T.x, y.page.y += T.y, y.client.x += T.x, y.client.y += T.y;
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;
2023
1861
  }
2024
- var C = this.result.rectDelta, M = e.rect || n.rect;
2025
- M.left += C.left, M.right += C.right, M.top += C.top, M.bottom += C.bottom, M.width = M.right - M.left, M.height = M.bottom - M.top;
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;
2026
1864
  } }, { key: "setAndApply", value: function(e) {
2027
1865
  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 }));
2028
1866
  if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
@@ -2046,7 +1884,7 @@ function Uo() {
2046
1884
  } }, { key: "stop", value: function(e) {
2047
1885
  var n = e.interaction;
2048
1886
  if (this.states && this.states.length) {
2049
- var r = O({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1887
+ var r = D({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
2050
1888
  this.fillArg(r);
2051
1889
  for (var o = 0, i = this.states; o < i.length; o++) {
2052
1890
  var a = i[o];
@@ -2065,8 +1903,8 @@ function Uo() {
2065
1903
  var n = e.interaction, r = n.coords, o = n.rect, i = n.modification;
2066
1904
  if (i.result) {
2067
1905
  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++) {
2068
- var y = f[c], T = y[0], C = y[1];
2069
- T.page.x -= C.x, T.page.y -= C.y, T.client.x -= C.x, T.client.y -= C.y;
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;
2070
1908
  }
2071
1909
  o.left -= d.left, o.right -= d.right, o.top -= d.top, o.bottom -= d.bottom;
2072
1910
  }
@@ -2075,12 +1913,12 @@ function Uo() {
2075
1913
  } }, { key: "copyFrom", value: function(e) {
2076
1914
  this.startOffset = e.startOffset, this.startDelta = e.startDelta, this.startEdges = e.startEdges, this.edges = e.edges, this.states = e.states.map((function(n) {
2077
1915
  return Ne(n);
2078
- })), this.result = lt(O({}, e.result.coords), O({}, e.result.rect));
1916
+ })), this.result = ct(D({}, e.result.coords), D({}, e.result.rect));
2079
1917
  } }, { key: "destroy", value: function() {
2080
1918
  for (var e in this) this[e] = null;
2081
1919
  } }]), t;
2082
1920
  })();
2083
- function lt(t, e) {
1921
+ function ct(t, e) {
2084
1922
  return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
2085
1923
  }
2086
1924
  function _e(t, e) {
@@ -2096,7 +1934,7 @@ function Uo() {
2096
1934
  };
2097
1935
  return e && typeof e == "string" && (o._defaults = n, o._methods = r), o;
2098
1936
  }
2099
- function We(t) {
1937
+ function qe(t) {
2100
1938
  var e = t.iEvent, n = t.interaction.modification.result;
2101
1939
  n && (e.modifiers = n.eventProps);
2102
1940
  }
@@ -2104,7 +1942,7 @@ function Uo() {
2104
1942
  t.defaults.perAction.modifiers = [];
2105
1943
  }, listeners: { "interactions:new": function(t) {
2106
1944
  var e = t.interaction;
2107
- e.modification = new At(e);
1945
+ e.modification = new It(e);
2108
1946
  }, "interactions:before-action-start": function(t) {
2109
1947
  var e = t.interaction, n = t.interaction.modification;
2110
1948
  n.start(t, e.coords.start.page), e.edges = n.edges, n.applyToInteraction(t);
@@ -2114,22 +1952,22 @@ function Uo() {
2114
1952
  }, "interactions:before-action-end": function(t) {
2115
1953
  var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
2116
1954
  return e.edges = n.startEdges, r;
2117
- }, "interactions:action-start": We, "interactions:action-move": We, "interactions:action-end": We, "interactions:after-action-start": function(t) {
1955
+ }, "interactions:action-start": qe, "interactions:action-move": qe, "interactions:action-end": qe, "interactions:after-action-start": function(t) {
2118
1956
  return t.interaction.modification.restoreInteractionCoords(t);
2119
1957
  }, "interactions:after-action-move": function(t) {
2120
1958
  return t.interaction.modification.restoreInteractionCoords(t);
2121
1959
  }, "interactions:stop": function(t) {
2122
1960
  return t.interaction.modification.stop(t);
2123
- } } }, dn = ir, pn = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, It = (function(t) {
2124
- S(n, t);
2125
- var e = P(n);
1961
+ } } }, 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);
2126
1964
  function n(r, o, i, a, s, l, d) {
2127
1965
  var c;
2128
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;
2129
- var f = r.interactable, y = (f && f.options || pn).deltaSource, T = Le(f, s, i), C = a === "start", M = a === "end", I = C ? B(c) : r.prevEvent, R = C ? r.coords.start : M ? { page: I.page, client: I.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
2130
- return c.page = O({}, R.page), c.client = O({}, R.client), c.rect = O({}, r.rect), c.timeStamp = R.timeStamp, M || (c.page.x -= T.x, c.page.y -= T.y, c.client.x -= T.x, c.client.y -= T.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = C ? r.pointers[r.pointers.length - 1].downTime : I.t0, c.x0 = r.coords.start.page.x - T.x, c.y0 = r.coords.start.page.y - T.y, c.clientX0 = r.coords.start.client.x - T.x, c.clientY0 = r.coords.start.client.y - T.y, c.delta = C || M ? { x: 0, y: 0 } : { x: c[y].x - I[y].x, y: c[y].y - I[y].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = O({}, r.coords.velocity[y]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = M || a === "inertiastart" ? c.getSwipe() : null, c;
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;
2131
1969
  }
2132
- return x(n, [{ key: "getSwipe", value: function() {
1970
+ return y(n, [{ key: "getSwipe", value: function() {
2133
1971
  var r = this._interaction;
2134
1972
  if (r.prevEvent.speed < 600 || this.timeStamp - r.prevEvent.timeStamp > 150) return null;
2135
1973
  var o = 180 * Math.atan2(r.prevEvent.velocityY, r.prevEvent.velocityX) / Math.PI;
@@ -2142,8 +1980,8 @@ function Uo() {
2142
1980
  } }, { key: "stopPropagation", value: function() {
2143
1981
  this.propagationStopped = !0;
2144
1982
  } }]), n;
2145
- })(it);
2146
- Object.defineProperties(It.prototype, { pageX: { get: function() {
1983
+ })(at);
1984
+ Object.defineProperties(Pt.prototype, { pageX: { get: function() {
2147
1985
  return this.page.x;
2148
1986
  }, set: function(t) {
2149
1987
  this.page.x = t;
@@ -2176,7 +2014,7 @@ function Uo() {
2176
2014
  }, set: function(t) {
2177
2015
  this.velocity.y = t;
2178
2016
  } } });
2179
- var ar = x((function t(e, n, r, o, i) {
2017
+ var ar = y((function t(e, n, r, o, i) {
2180
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;
2181
2019
  })), sr = (function(t) {
2182
2020
  return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
@@ -2185,7 +2023,7 @@ function Uo() {
2185
2023
  })({}), lr = 0, cr = (function() {
2186
2024
  function t(e) {
2187
2025
  var n = this, r = e.pointerType, o = e.scopeFire;
2188
- 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 = qe((function(c) {
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) {
2189
2027
  this.move(c);
2190
2028
  }), "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;
2191
2029
  var i = this;
@@ -2204,21 +2042,21 @@ function Uo() {
2204
2042
  for (var d in fn) l(d);
2205
2043
  this._scopeFire("interactions:new", { interaction: this });
2206
2044
  }
2207
- return x(t, [{ key: "pointerMoveTolerance", get: function() {
2045
+ return y(t, [{ key: "pointerMoveTolerance", get: function() {
2208
2046
  return 1;
2209
2047
  } }, { key: "pointerDown", value: function(e, n, r) {
2210
2048
  var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
2211
2049
  this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: o, pointerInfo: i, type: "down", interaction: this });
2212
2050
  } }, { key: "start", value: function(e, n, r) {
2213
- return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (Tt(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? O({}, 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);
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);
2214
2052
  } }, { key: "pointerMove", value: function(e, n, r) {
2215
2053
  this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
2216
2054
  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;
2217
2055
  this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Fe(o, i) > this.pointerMoveTolerance);
2218
2056
  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 };
2219
- 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 && rt(this.coords.prev, this.coords.cur));
2057
+ 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));
2220
2058
  } }, { key: "move", value: function(e) {
2221
- e && e.event || qt(this.coords.delta), (e = O({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(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);
2222
2060
  } }, { key: "pointerUp", value: function(e, n, r, o) {
2223
2061
  var i = this.getPointerIndex(e);
2224
2062
  i === -1 && (i = this.updatePointer(e, n, r, !1));
@@ -2246,7 +2084,7 @@ function Uo() {
2246
2084
  var i, a, s, l = je(e), d = this.getPointerIndex(e), c = this.pointers[d];
2247
2085
  return o = o !== !1 && (o || /(down|start)$/i.test(n.type)), c ? c.pointer = e : (c = new ar(l, e, n, null, null), d = this.pointers.length, this.pointers.push(c)), Hn(this.coords.cur, this.pointers.map((function(f) {
2248
2086
  return f.pointer;
2249
- })), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, nt(this.downPointer, e), this.interacting() || (rt(this.coords.start, this.coords.cur), rt(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: c, pointerIndex: d, interaction: this }), d;
2087
+ })), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, rt(this.downPointer, e), this.interacting() || (ot(this.coords.start, this.coords.cur), ot(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: c, pointerIndex: d, interaction: this }), d;
2250
2088
  } }, { key: "removePointer", value: function(e, n) {
2251
2089
  var r = this.getPointerIndex(e);
2252
2090
  if (r !== -1) {
@@ -2258,13 +2096,13 @@ function Uo() {
2258
2096
  } }, { key: "destroy", value: function() {
2259
2097
  this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
2260
2098
  } }, { key: "_createPreparedEvent", value: function(e, n, r, o) {
2261
- return new It(this, e, this.prepared.name, n, this.element, r, o);
2099
+ return new Pt(this, e, this.prepared.name, n, this.element, r, o);
2262
2100
  } }, { key: "_fireEvent", value: function(e) {
2263
2101
  var n;
2264
2102
  (n = this.interactable) == null || n.fire(e), (!this.prevEvent || e.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = e);
2265
2103
  } }, { key: "_doPhase", value: function(e) {
2266
2104
  var n = e.event, r = e.phase, o = e.preEnd, i = e.type, a = this.rect;
2267
- if (a && r === "move" && (tt(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1) return !1;
2105
+ if (a && r === "move" && (nt(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1) return !1;
2268
2106
  var s = e.iEvent = this._createPreparedEvent(n, r, o, i);
2269
2107
  return this._scopeFire("interactions:action-".concat(r), e), r === "start" && (this.prevEvent = s), this._fireEvent(s), this._scopeFire("interactions:after-action-".concat(r), e), !0;
2270
2108
  } }, { key: "_now", value: function() {
@@ -2279,13 +2117,13 @@ function Uo() {
2279
2117
  return !(!n.offset.pending.x && !n.offset.pending.y);
2280
2118
  })(t)) return !1;
2281
2119
  var e = t.offset.pending;
2282
- return Pt(t.coords.cur, e), Pt(t.coords.delta, e), tt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
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;
2283
2121
  }
2284
2122
  function ur(t) {
2285
2123
  var e = t.x, n = t.y;
2286
2124
  this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
2287
2125
  }
2288
- function Pt(t, e) {
2126
+ function Ot(t, e) {
2289
2127
  var n = t.page, r = t.client, o = e.x, i = e.y;
2290
2128
  n.x += o, n.y += i, r.x += o, r.y += i;
2291
2129
  }
@@ -2296,7 +2134,7 @@ function Uo() {
2296
2134
  t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
2297
2135
  }, "interactions:update-pointer": function(t) {
2298
2136
  return (function(e) {
2299
- e.pointerIsDown && (Pt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2137
+ e.pointerIsDown && (Ot(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2300
2138
  })(t.interaction);
2301
2139
  }, "interactions:before-action-start": hn, "interactions:before-action-move": hn, "interactions:before-action-end": function(t) {
2302
2140
  var e = t.interaction;
@@ -2308,10 +2146,10 @@ function Uo() {
2308
2146
  function t(e) {
2309
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;
2310
2148
  }
2311
- return x(t, [{ key: "start", value: function(e) {
2312
- var n = this.interaction, r = ct(n);
2149
+ return y(t, [{ key: "start", value: function(e) {
2150
+ var n = this.interaction, r = ut(n);
2313
2151
  if (!r || !r.enabled) return !1;
2314
- var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new At(n));
2152
+ var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new It(n));
2315
2153
  if (a.copyFrom(n.modification), this.t0 = n._now(), this.allowResume = r.allowResume, this.v0 = i, this.currentOffset = { x: 0, y: 0 }, this.startCoords = n.coords.cur.page, this.modifierArg = a.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - n.coords.cur.timeStamp < 50 && i > r.minSpeed && i > r.endSpeed) this.startInertia();
2316
2154
  else {
2317
2155
  if (a.result = a.setAll(this.modifierArg), !a.result.changed) return !1;
@@ -2319,7 +2157,7 @@ function Uo() {
2319
2157
  }
2320
2158
  return n.modification.result.rect = null, n.offsetBy(this.targetOffset), n._doPhase({ interaction: n, event: e, phase: "inertiastart" }), n.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), n.modification.result.rect = null, this.active = !0, n.simulation = this, !0;
2321
2159
  } }, { key: "startInertia", value: function() {
2322
- var e = this, n = this.interaction.coords.velocity.client, r = ct(this.interaction), o = r.resistance, i = -Math.log(r.endSpeed / this.v0) / o;
2160
+ var e = this, n = this.interaction.coords.velocity.client, r = ut(this.interaction), o = r.resistance, i = -Math.log(r.endSpeed / this.v0) / o;
2323
2161
  this.targetOffset = { x: (n.x - i) / o, y: (n.y - i) / o }, this.te = i, this.lambda_v0 = o / this.v0, this.one_ve_v0 = 1 - r.endSpeed / this.v0;
2324
2162
  var a = this.modification, s = this.modifierArg;
2325
2163
  s.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, a.result = a.setAll(s), a.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + a.result.delta.x, y: this.targetOffset.y + a.result.delta.y }), this.onNextFrame((function() {
@@ -2336,17 +2174,17 @@ function Uo() {
2336
2174
  n.active && e();
2337
2175
  }));
2338
2176
  } }, { key: "inertiaTick", value: function() {
2339
- var e, n, r, o, i, a, s, l = this, d = this.interaction, c = ct(d).resistance, f = (d._now() - this.t0) / 1e3;
2177
+ var e, n, r, o, i, a, s, l = this, d = this.interaction, c = ut(d).resistance, f = (d._now() - this.t0) / 1e3;
2340
2178
  if (f < this.te) {
2341
- var y, T = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2342
- this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, y = { x: gn(s = T, e, r, i), y: gn(s, n, o, a) }) : y = { x: this.targetOffset.x * T, y: this.targetOffset.y * T };
2343
- var C = { x: y.x - this.currentOffset.x, y: y.y - this.currentOffset.y };
2344
- this.currentOffset.x += C.x, this.currentOffset.y += C.y, d.offsetBy(C), d.move(), this.onNextFrame((function() {
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() {
2345
2183
  return l.inertiaTick();
2346
2184
  }));
2347
2185
  } else d.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
2348
2186
  } }, { key: "smoothEndTick", value: function() {
2349
- var e = this, n = this.interaction, r = n._now() - this.t0, o = ct(n).smoothEndDuration;
2187
+ var e = this, n = this.interaction, r = n._now() - this.t0, o = ut(n).smoothEndDuration;
2350
2188
  if (r < o) {
2351
2189
  var i = { x: yn(r, 0, this.targetOffset.x, o), y: yn(r, 0, this.targetOffset.y, o) }, a = { x: i.x - this.currentOffset.x, y: i.y - this.currentOffset.y };
2352
2190
  this.currentOffset.x += a.x, this.currentOffset.y += a.y, n.offsetBy(a), n.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
@@ -2355,14 +2193,14 @@ function Uo() {
2355
2193
  } else n.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
2356
2194
  } }, { key: "resume", value: function(e) {
2357
2195
  var n = e.pointer, r = e.event, o = e.eventTarget, i = this.interaction;
2358
- i.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), i.updatePointer(n, r, o, !0), i._doPhase({ interaction: i, event: r, phase: "resume" }), rt(i.coords.prev, i.coords.cur), this.stop();
2196
+ i.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), i.updatePointer(n, r, o, !0), i._doPhase({ interaction: i, event: r, phase: "resume" }), ot(i.coords.prev, i.coords.cur), this.stop();
2359
2197
  } }, { key: "end", value: function() {
2360
2198
  this.interaction.move(), this.interaction.end(), this.stop();
2361
2199
  } }, { key: "stop", value: function() {
2362
2200
  this.active = this.smoothEnd = !1, this.interaction.simulation = null, Te.cancel(this.timeout);
2363
2201
  } }]), t;
2364
2202
  })();
2365
- function ct(t) {
2203
+ function ut(t) {
2366
2204
  var e = t.interactable, n = t.prepared;
2367
2205
  return e && e.options && n.name && e.options[n.name].inertia;
2368
2206
  }
@@ -2377,7 +2215,7 @@ function Uo() {
2377
2215
  return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
2378
2216
  }, "interactions:down": function(t) {
2379
2217
  var e = t.interaction, n = t.eventTarget, r = e.inertia;
2380
- if (r.active) for (var o = n; b.element(o); ) {
2218
+ if (r.active) for (var o = n; x.element(o); ) {
2381
2219
  if (o === e.element) {
2382
2220
  r.resume(t);
2383
2221
  break;
@@ -2392,7 +2230,7 @@ function Uo() {
2392
2230
  e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
2393
2231
  }, "interactions:before-action-inertiastart": function(t) {
2394
2232
  return t.interaction.modification.setAndApply(t);
2395
- }, "interactions:action-resume": We, "interactions:action-inertiastart": We, "interactions:after-action-inertiastart": function(t) {
2233
+ }, "interactions:action-resume": qe, "interactions:action-inertiastart": qe, "interactions:after-action-inertiastart": function(t) {
2396
2234
  return t.interaction.modification.restoreInteractionCoords(t);
2397
2235
  }, "interactions:after-action-resume": function(t) {
2398
2236
  return t.interaction.modification.restoreInteractionCoords(t);
@@ -2414,9 +2252,9 @@ function Uo() {
2414
2252
  }
2415
2253
  var xn = (function() {
2416
2254
  function t(e) {
2417
- g(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = O({}, 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 || {});
2418
2256
  }
2419
- return x(t, [{ key: "fire", value: function(e) {
2257
+ return y(t, [{ key: "fire", value: function(e) {
2420
2258
  var n, r = this.global;
2421
2259
  (n = this.types[e.type]) && bn(e, n), !e.propagationStopped && r && (n = r[e.type]) && bn(e, n);
2422
2260
  } }, { key: "on", value: function(e, n) {
@@ -2436,9 +2274,9 @@ function Uo() {
2436
2274
  } }]), t;
2437
2275
  })(), vr = (function() {
2438
2276
  function t(e) {
2439
- g(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, nt(this, e);
2277
+ g(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, rt(this, e);
2440
2278
  }
2441
- return x(t, [{ key: "preventOriginalDefault", value: function() {
2279
+ return y(t, [{ key: "preventOriginalDefault", value: function() {
2442
2280
  this.originalEvent.preventDefault();
2443
2281
  } }, { key: "stopPropagation", value: function() {
2444
2282
  this.originalEvent.stopPropagation();
@@ -2447,93 +2285,93 @@ function Uo() {
2447
2285
  } }]), t;
2448
2286
  })();
2449
2287
  function Ye(t) {
2450
- return b.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2288
+ return x.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2451
2289
  }
2452
- function ut(t, e) {
2290
+ function dt(t, e) {
2453
2291
  return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
2454
2292
  }
2455
2293
  var mr = { id: "events", install: function(t) {
2456
- var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, y, T, C) {
2457
- var M = Ye(C);
2458
- if (!r[y]) {
2459
- r[y] = [];
2460
- for (var I = 0; I < o.length; I++) {
2461
- var R = o[I];
2462
- a(R, y, l), a(R, y, d, !0);
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);
2463
2301
  }
2464
2302
  }
2465
- var D = r[y], q = Be(D, (function(Q) {
2466
- return Q.selector === c && Q.context === f;
2303
+ var z = r[b], U = Be(z, (function(ee) {
2304
+ return ee.selector === c && ee.context === f;
2467
2305
  }));
2468
- q || (q = { selector: c, context: f, listeners: [] }, D.push(q)), q.listeners.push({ func: T, options: M });
2469
- }, removeDelegate: function(c, f, y, T, C) {
2470
- var M, I = Ye(C), R = r[y], D = !1;
2471
- if (R)
2472
- for (M = R.length - 1; M >= 0; M--) {
2473
- var q = R[M];
2474
- if (q.selector === c && q.context === f) {
2475
- for (var Q = q.listeners, L = Q.length - 1; L >= 0; L--) {
2476
- var V = Q[L];
2477
- if (V.func === T && ut(V.options, I)) {
2478
- Q.splice(L, 1), Q.length || (R.splice(M, 1), s(f, y, l), s(f, y, d, !0)), D = !0;
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;
2479
2317
  break;
2480
2318
  }
2481
2319
  }
2482
- if (D) break;
2320
+ if (z) break;
2483
2321
  }
2484
2322
  }
2485
2323
  }, delegateListener: l, delegateUseCapture: d, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2486
- function a(c, f, y, T) {
2324
+ function a(c, f, b, S) {
2487
2325
  if (c.addEventListener) {
2488
- var C = Ye(T), M = Be(n, (function(I) {
2489
- return I.eventTarget === c;
2326
+ var k = Ye(S), R = Be(n, (function(O) {
2327
+ return O.eventTarget === c;
2490
2328
  }));
2491
- M || (M = { eventTarget: c, events: {} }, n.push(M)), M.events[f] || (M.events[f] = []), Be(M.events[f], (function(I) {
2492
- return I.func === y && ut(I.options, C);
2493
- })) || (c.addEventListener(f, y, i.supportsOptions ? C : C.capture), M.events[f].push({ func: y, options: C }));
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 }));
2494
2332
  }
2495
2333
  }
2496
- function s(c, f, y, T) {
2334
+ function s(c, f, b, S) {
2497
2335
  if (c.addEventListener && c.removeEventListener) {
2498
- var C = He(n, (function(me) {
2336
+ var k = He(n, (function(me) {
2499
2337
  return me.eventTarget === c;
2500
- })), M = n[C];
2501
- if (M && M.events) if (f !== "all") {
2502
- var I = !1, R = M.events[f];
2503
- if (R) {
2504
- if (y === "all") {
2505
- for (var D = R.length - 1; D >= 0; D--) {
2506
- var q = R[D];
2507
- s(c, f, q.func, q.options);
2338
+ })), R = n[k];
2339
+ 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);
2508
2346
  }
2509
2347
  return;
2510
2348
  }
2511
- for (var Q = Ye(T), L = 0; L < R.length; L++) {
2512
- var V = R[L];
2513
- if (V.func === y && ut(V.options, Q)) {
2514
- c.removeEventListener(f, y, i.supportsOptions ? Q : Q.capture), R.splice(L, 1), R.length === 0 && (delete M.events[f], I = !0);
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);
2515
2353
  break;
2516
2354
  }
2517
2355
  }
2518
2356
  }
2519
- I && !Object.keys(M.events).length && n.splice(C, 1);
2520
- } else for (f in M.events) M.events.hasOwnProperty(f) && s(c, f, "all");
2357
+ O && !Object.keys(R.events).length && n.splice(k, 1);
2358
+ } else for (f in R.events) R.events.hasOwnProperty(f) && s(c, f, "all");
2521
2359
  }
2522
2360
  }
2523
2361
  function l(c, f) {
2524
- for (var y = Ye(f), T = new vr(c), C = r[c.type], M = Ut(c)[0], I = M; b.element(I); ) {
2525
- for (var R = 0; R < C.length; R++) {
2526
- var D = C[R], q = D.selector, Q = D.context;
2527
- if (he(I, q) && se(Q, M) && se(Q, I)) {
2528
- var L = D.listeners;
2529
- T.currentTarget = I;
2530
- for (var V = 0; V < L.length; V++) {
2531
- var me = L[V];
2532
- ut(me.options, y) && me.func(T);
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);
2533
2371
  }
2534
2372
  }
2535
2373
  }
2536
- I = fe(I);
2374
+ O = fe(O);
2537
2375
  }
2538
2376
  }
2539
2377
  function d(c) {
@@ -2544,9 +2382,9 @@ function Uo() {
2544
2382
  }, get passive() {
2545
2383
  return i.supportsPassive = !0;
2546
2384
  } }), t.events = i, i;
2547
- } }, Ot = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2548
- for (var e = 0, n = Ot.methodOrder; e < n.length; e++) {
2549
- var r = n[e], o = Ot[r](t);
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);
2550
2388
  if (o) return o;
2551
2389
  }
2552
2390
  return null;
@@ -2600,30 +2438,30 @@ function Uo() {
2600
2438
  return n.id === e;
2601
2439
  }));
2602
2440
  }
2603
- var gr = Ot, Dt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2441
+ var gr = Dt, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2604
2442
  function En(t, e) {
2605
2443
  return function(n) {
2606
2444
  var r = e.interactions.list, o = Vt(n), i = Ut(n), a = i[0], s = i[1], l = [];
2607
2445
  if (/^touch/.test(n.type)) {
2608
2446
  e.prevTouchTime = e.now();
2609
2447
  for (var d = 0, c = n.changedTouches; d < c.length; d++) {
2610
- var f = c[d], y = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, T = kn(y);
2611
- l.push([y.pointer, y.eventTarget, y.curEventTarget, T]);
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]);
2612
2450
  }
2613
2451
  } else {
2614
- var C = !1;
2615
- if (!te.supportsPointerEvent && /mouse/.test(n.type)) {
2616
- for (var M = 0; M < r.length && !C; M++) C = r[M].pointerType !== "mouse" && r[M].pointerIsDown;
2617
- C = C || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2452
+ var k = !1;
2453
+ 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;
2618
2456
  }
2619
- if (!C) {
2620
- var I = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, R = kn(I);
2621
- l.push([I.pointer, I.eventTarget, I.curEventTarget, R]);
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]);
2622
2460
  }
2623
2461
  }
2624
- for (var D = 0; D < l.length; D++) {
2625
- var q = l[D], Q = q[0], L = q[1], V = q[2];
2626
- q[3][t](Q, n, L, V);
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);
2627
2465
  }
2628
2466
  };
2629
2467
  }
@@ -2631,7 +2469,7 @@ function Uo() {
2631
2469
  var e = t.pointerType, n = t.scope, r = { interaction: gr.search(t), searchDetails: t };
2632
2470
  return n.fire("interactions:find", r), r.interaction || n.interactions.new({ pointerType: e });
2633
2471
  }
2634
- function Nt(t, e) {
2472
+ function zt(t, e) {
2635
2473
  var n = t.doc, r = t.scope, o = t.options, i = r.interactions.docEvents, a = r.events, s = a[e];
2636
2474
  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);
2637
2475
  for (var d = o && o.events, c = 0; c < i.length; c++) {
@@ -2640,32 +2478,32 @@ function Uo() {
2640
2478
  }
2641
2479
  }
2642
2480
  var yr = { id: "core/interactions", install: function(t) {
2643
- for (var e = {}, n = 0; n < Dt.length; n++) {
2644
- var r = Dt[n];
2481
+ for (var e = {}, n = 0; n < Nt.length; n++) {
2482
+ var r = Nt[n];
2645
2483
  e[r] = En(r, t);
2646
2484
  }
2647
- var o, i = te.pEventTypes;
2485
+ var o, i = re.pEventTypes;
2648
2486
  function a() {
2649
2487
  for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2650
2488
  var d = l[s];
2651
2489
  if (d.pointerIsDown && d.pointerType === "touch" && !d._interacting) for (var c = function() {
2652
- var T = y[f];
2653
- t.documents.some((function(C) {
2654
- return se(C.doc, T.downTarget);
2655
- })) || d.removePointer(T.pointer, T.event);
2656
- }, f = 0, y = d.pointers; f < y.length; f++) c();
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();
2657
2495
  }
2658
2496
  }
2659
- (o = Y.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) {
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) {
2660
2498
  for (var l = 0, d = t.interactions.list; l < d.length; l++)
2661
2499
  d[l].documentBlur(s);
2662
2500
  } }), t.prevTouchTime = 0, t.Interaction = (function(s) {
2663
- S(d, s);
2664
- var l = P(d);
2501
+ M(d, s);
2502
+ var l = A(d);
2665
2503
  function d() {
2666
2504
  return g(this, d), l.apply(this, arguments);
2667
2505
  }
2668
- return x(d, [{ key: "pointerMoveTolerance", get: function() {
2506
+ return y(d, [{ key: "pointerMoveTolerance", get: function() {
2669
2507
  return t.interactions.pointerMoveTolerance;
2670
2508
  }, set: function(c) {
2671
2509
  t.interactions.pointerMoveTolerance = c;
@@ -2680,45 +2518,45 @@ function Uo() {
2680
2518
  return t.interactions.list.push(l), l;
2681
2519
  }, listeners: e, docEvents: o, pointerMoveTolerance: 1 }, t.usePlugin(un);
2682
2520
  }, listeners: { "scope:add-document": function(t) {
2683
- return Nt(t, "add");
2521
+ return zt(t, "add");
2684
2522
  }, "scope:remove-document": function(t) {
2685
- return Nt(t, "remove");
2523
+ return zt(t, "remove");
2686
2524
  }, "interactable:unset": function(t, e) {
2687
2525
  for (var n = t.interactable, r = e.interactions.list.length - 1; r >= 0; r--) {
2688
2526
  var o = e.interactions.list[r];
2689
2527
  o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2690
2528
  }
2691
- } }, onDocSignal: Nt, doOnInteractions: En, methodNames: Dt }, br = yr, Me = (function(t) {
2529
+ } }, onDocSignal: zt, doOnInteractions: En, methodNames: Nt }, br = yr, Me = (function(t) {
2692
2530
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2693
2531
  })(Me || {}), xr = (function() {
2694
2532
  function t(e, n, r, o) {
2695
- 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 = ne(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
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);
2696
2534
  }
2697
- return x(t, [{ key: "_defaults", get: function() {
2535
+ return y(t, [{ key: "_defaults", get: function() {
2698
2536
  return { base: {}, perAction: {}, actions: {} };
2699
2537
  } }, { key: "setOnEvents", value: function(e, n) {
2700
- 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;
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;
2701
2539
  } }, { key: "updatePerActionListeners", value: function(e, n, r) {
2702
2540
  var o, i = this, a = (o = this._actions.map[e]) == null ? void 0 : o.filterEventType, s = function(l) {
2703
- return (a == null || a(l)) && st(l, i._actions);
2541
+ return (a == null || a(l)) && lt(l, i._actions);
2704
2542
  };
2705
- (b.array(n) || b.object(n)) && this._onOff(Me.Off, e, n, void 0, s), (b.array(r) || b.object(r)) && this._onOff(Me.On, e, r, void 0, s);
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);
2706
2544
  } }, { key: "setPerAction", value: function(e, n) {
2707
2545
  var r = this._defaults;
2708
2546
  for (var o in n) {
2709
2547
  var i = o, a = this.options[e], s = n[i];
2710
- i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), b.array(s) ? a[i] = Gt(s) : b.plainObject(s) ? (a[i] = O(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;
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;
2711
2549
  }
2712
2550
  } }, { key: "getRect", value: function(e) {
2713
- return e = e || (b.element(this.target) ? this.target : null), b.string(this.target) && (e = e || this._context.querySelector(this.target)), we(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);
2714
2552
  } }, { key: "rectChecker", value: function(e) {
2715
2553
  var n = this;
2716
- return b.func(e) ? (this.getRect = function(r) {
2717
- var o = O({}, e.apply(n, r));
2554
+ return x.func(e) ? (this.getRect = function(r) {
2555
+ var o = D({}, e.apply(n, r));
2718
2556
  return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
2719
2557
  }, this) : e === null ? (delete this.getRect, this) : this.getRect;
2720
2558
  } }, { key: "_backCompatOption", value: function(e, n) {
2721
- if (Ee(n) || b.object(n)) {
2559
+ if (Ee(n) || x.object(n)) {
2722
2560
  for (var r in this.options[e] = n, this._actions.map) this.options[r][e] = n;
2723
2561
  return this;
2724
2562
  }
@@ -2729,7 +2567,7 @@ function Uo() {
2729
2567
  return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
2730
2568
  } }, { key: "getAllElements", value: function() {
2731
2569
  var e = this.target;
2732
- return b.string(e) ? Array.from(this._context.querySelectorAll(e)) : b.func(e) && e.getAllElements ? e.getAllElements() : b.element(e) ? [e] : [];
2570
+ return x.string(e) ? Array.from(this._context.querySelectorAll(e)) : x.func(e) && e.getAllElements ? e.getAllElements() : x.element(e) ? [e] : [];
2733
2571
  } }, { key: "context", value: function() {
2734
2572
  return this._context;
2735
2573
  } }, { key: "inContext", value: function(e) {
@@ -2737,19 +2575,19 @@ function Uo() {
2737
2575
  } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2738
2576
  return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2739
2577
  } }, { key: "testAllow", value: function(e, n, r) {
2740
- return !e || !!b.element(r) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2578
+ return !e || !!x.element(r) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2741
2579
  } }, { key: "testIgnore", value: function(e, n, r) {
2742
- return !(!e || !b.element(r)) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2580
+ return !(!e || !x.element(r)) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2743
2581
  } }, { key: "fire", value: function(e) {
2744
2582
  return this.events.fire(e), this;
2745
2583
  } }, { key: "_onOff", value: function(e, n, r, o, i) {
2746
- b.object(n) && !b.array(n) && (o = r, r = null);
2584
+ x.object(n) && !x.array(n) && (o = r, r = null);
2747
2585
  var a = Ie(n, r, i);
2748
2586
  for (var s in a) {
2749
- s === "wheel" && (s = te.wheelEvent);
2587
+ s === "wheel" && (s = re.wheelEvent);
2750
2588
  for (var l = 0, d = a[s]; l < d.length; l++) {
2751
2589
  var c = d[l];
2752
- st(s, this._actions) ? this.events[e === Me.On ? "on" : "off"](s, c) : b.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);
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);
2753
2591
  }
2754
2592
  }
2755
2593
  return this;
@@ -2759,14 +2597,14 @@ function Uo() {
2759
2597
  return this._onOff(Me.Off, e, n, r);
2760
2598
  } }, { key: "set", value: function(e) {
2761
2599
  var n = this._defaults;
2762
- for (var r in b.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2600
+ for (var r in x.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2763
2601
  var o = r, i = this._actions.methodDict[o];
2764
- this.options[o] = {}, this.setPerAction(o, O(O({}, n.perAction), n.actions[o])), this[i](e[o]);
2602
+ this.options[o] = {}, this.setPerAction(o, D(D({}, n.perAction), n.actions[o])), this[i](e[o]);
2765
2603
  }
2766
- for (var a in e) a !== "getRect" ? b.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2604
+ for (var a in e) a !== "getRect" ? x.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2767
2605
  return this;
2768
2606
  } }, { key: "unset", value: function() {
2769
- 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--) {
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--) {
2770
2608
  var o = n[r], i = o.selector, a = o.context, s = o.listeners;
2771
2609
  i === this.target && a === this._context && n.splice(r, 1);
2772
2610
  for (var l = s.length - 1; l >= 0; l--) this._scopeEvents.removeDelegate(this.target, this._context, e, s[l][0], s[l][1]);
@@ -2777,104 +2615,104 @@ function Uo() {
2777
2615
  function t(e) {
2778
2616
  var n = this;
2779
2617
  g(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2780
- var o = r.interactable, i = o.target, a = b.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2618
+ var o = r.interactable, i = o.target, a = x.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2781
2619
  return l === o;
2782
2620
  }));
2783
2621
  a.splice(s, 1);
2784
2622
  } });
2785
2623
  }
2786
- return x(t, [{ key: "new", value: function(e, n) {
2787
- n = O(n || {}, { actions: this.scope.actions });
2624
+ return y(t, [{ key: "new", value: function(e, n) {
2625
+ n = D(n || {}, { actions: this.scope.actions });
2788
2626
  var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2789
- 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;
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;
2790
2628
  } }, { key: "getExisting", value: function(e, n) {
2791
- var r = n && n.context || this.scope.document, o = b.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2629
+ var r = n && n.context || this.scope.document, o = x.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2792
2630
  if (i) return Be(i, (function(a) {
2793
2631
  return a._context === r && (o || a.inContext(e));
2794
2632
  }));
2795
2633
  } }, { key: "forEachMatch", value: function(e, n) {
2796
2634
  for (var r = 0, o = this.list; r < o.length; r++) {
2797
2635
  var i = o[r], a = void 0;
2798
- 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;
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;
2799
2637
  }
2800
2638
  } }]), t;
2801
2639
  })(), Er = (function() {
2802
2640
  function t() {
2803
2641
  var e = this;
2804
- g(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = te, this.defaults = Ne(pn), this.Eventable = xn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
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) {
2805
2643
  var o = function i(a, s) {
2806
2644
  var l = r.interactables.getExisting(a, s);
2807
2645
  return l || ((l = r.interactables.new(a, s)).events.global = i.globalEvents), l;
2808
2646
  };
2809
- return o.getPointerAverage = $t, o.getTouchBBox = yt, o.getTouchDistance = bt, o.getTouchAngle = xt, o.getElementRect = we, o.getElementClientRect = xe, o.matchesSelector = he, o.closest = pe, o.globalEvents = {}, o.version = "1.10.27", o.scope = r, o.use = function(i, a) {
2647
+ return o.getPointerAverage = $t, o.getTouchBBox = bt, o.getTouchDistance = xt, o.getTouchAngle = wt, o.getElementRect = we, o.getElementClientRect = xe, o.matchesSelector = he, o.closest = pe, o.globalEvents = {}, o.version = "1.10.27", o.scope = r, o.use = function(i, a) {
2810
2648
  return this.scope.usePlugin(i, a), this;
2811
2649
  }, o.isSet = function(i, a) {
2812
2650
  return !!this.scope.interactables.get(i, a && a.context);
2813
- }, o.on = qe((function(i, a, s) {
2814
- if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2651
+ }, o.on = We((function(i, a, s) {
2652
+ if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2815
2653
  for (var l = 0, d = i; l < d.length; l++) {
2816
2654
  var c = d[l];
2817
2655
  this.on(c, a, s);
2818
2656
  }
2819
2657
  return this;
2820
2658
  }
2821
- if (b.object(i)) {
2659
+ if (x.object(i)) {
2822
2660
  for (var f in i) this.on(f, i[f], a);
2823
2661
  return this;
2824
2662
  }
2825
- return st(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;
2826
- }), "The interact.on() method is being deprecated"), o.off = qe((function(i, a, s) {
2827
- if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2663
+ 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)) {
2828
2666
  for (var l = 0, d = i; l < d.length; l++) {
2829
2667
  var c = d[l];
2830
2668
  this.off(c, a, s);
2831
2669
  }
2832
2670
  return this;
2833
2671
  }
2834
- if (b.object(i)) {
2672
+ if (x.object(i)) {
2835
2673
  for (var f in i) this.off(f, i[f], a);
2836
2674
  return this;
2837
2675
  }
2838
- var y;
2839
- return st(i, this.scope.actions) ? i in this.globalEvents && (y = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(y, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
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;
2840
2678
  }), "The interact.off() method is being deprecated"), o.debug = function() {
2841
2679
  return this.scope;
2842
2680
  }, o.supportsTouch = function() {
2843
- return te.supportsTouch;
2681
+ return re.supportsTouch;
2844
2682
  }, o.supportsPointerEvent = function() {
2845
- return te.supportsPointerEvent;
2683
+ return re.supportsPointerEvent;
2846
2684
  }, o.stop = function() {
2847
2685
  for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
2848
2686
  return this;
2849
2687
  }, o.pointerMoveTolerance = function(i) {
2850
- return b.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2688
+ return x.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2851
2689
  }, o.addDocument = function(i, a) {
2852
2690
  this.scope.addDocument(i, a);
2853
2691
  }, o.removeDocument = function(i) {
2854
2692
  this.scope.removeDocument(i);
2855
2693
  }, o;
2856
- })(this), this.InteractEvent = It, this.Interactable = void 0, this.interactables = new wr(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
2694
+ })(this), this.InteractEvent = Pt, this.Interactable = void 0, this.interactables = new wr(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
2857
2695
  return e.removeDocument(r.target);
2858
2696
  };
2859
2697
  var n = this;
2860
2698
  this.Interactable = (function(r) {
2861
- S(i, r);
2862
- var o = P(i);
2699
+ M(i, r);
2700
+ var o = A(i);
2863
2701
  function i() {
2864
2702
  return g(this, i), o.apply(this, arguments);
2865
2703
  }
2866
- return x(i, [{ key: "_defaults", get: function() {
2704
+ return y(i, [{ key: "_defaults", get: function() {
2867
2705
  return n.defaults;
2868
2706
  } }, { key: "set", value: function(a) {
2869
- return G(_(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2707
+ return j(C(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2870
2708
  } }, { key: "unset", value: function() {
2871
- G(_(i.prototype), "unset", this).call(this);
2709
+ j(C(i.prototype), "unset", this).call(this);
2872
2710
  var a = n.interactables.list.indexOf(this);
2873
2711
  a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2874
2712
  } }]), i;
2875
2713
  })(xr);
2876
2714
  }
2877
- return x(t, [{ key: "addListeners", value: function(e, n) {
2715
+ return y(t, [{ key: "addListeners", value: function(e, n) {
2878
2716
  this.listenerMaps.push({ id: n, map: e });
2879
2717
  } }, { key: "fire", value: function(e, n) {
2880
2718
  for (var r = 0, o = this.listenerMaps; r < o.length; r++) {
@@ -2883,7 +2721,7 @@ function Uo() {
2883
2721
  }
2884
2722
  } }, { key: "init", value: function(e) {
2885
2723
  return this.isInitialized ? this : (function(n, r) {
2886
- return n.isInitialized = !0, b.window(r) && Z(r), Y.init(r), te.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(mr), n;
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;
2887
2725
  })(this, e);
2888
2726
  } }, { key: "pluginIsInstalled", value: function(e) {
2889
2727
  var n = e.id;
@@ -2903,10 +2741,10 @@ function Uo() {
2903
2741
  return this;
2904
2742
  } }, { key: "addDocument", value: function(e, n) {
2905
2743
  if (this.getDocIndex(e) !== -1) return !1;
2906
- var r = ne(e);
2907
- n = n ? O({}, 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 });
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 });
2908
2746
  } }, { key: "removeDocument", value: function(e) {
2909
- var n = this.getDocIndex(e), r = ne(e), o = this.documents[n].options;
2747
+ var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2910
2748
  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 });
2911
2749
  } }, { key: "getDocIndex", value: function(e) {
2912
2750
  for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
@@ -2931,34 +2769,34 @@ function Uo() {
2931
2769
  return o in t || i in t;
2932
2770
  })), n = function(r, o) {
2933
2771
  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++) {
2934
- var y = e[f], T = y[0], C = y[1], M = Math.round((r - d.x) / t[T]), I = Math.round((o - d.y) / t[C]);
2935
- c[T] = Math.max(s.left, Math.min(s.right, M * t[T] + d.x)), c[C] = Math.max(s.top, Math.min(s.bottom, I * t[C] + d.y));
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));
2936
2774
  }
2937
2775
  return c;
2938
2776
  };
2939
2777
  return n.grid = t, n.coordFields = e, n;
2940
2778
  } }), Sr = { id: "snappers", install: function(t) {
2941
2779
  var e = t.interactStatic;
2942
- e.snappers = O(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2780
+ e.snappers = D(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2943
2781
  } }, Tr = Sr, _r = { start: function(t) {
2944
2782
  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;
2945
- a === "preserve" && (a = n.width / n.height), e.startCoords = O({}, o), e.startRect = O({}, n), e.ratio = a, e.equalDelta = d;
2783
+ a === "preserve" && (a = n.width / n.height), e.startCoords = D({}, o), e.startRect = D({}, n), e.ratio = a, e.equalDelta = d;
2946
2784
  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 };
2947
2785
  if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
2948
- var y = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2949
- e.edgeSign = { x: y, y };
2786
+ var b = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2787
+ e.edgeSign = { x: b, y: b };
2950
2788
  } else e.edgeSign = { x: f.left ? -1 : 1, y: f.top ? -1 : 1 };
2951
- if (s !== !1 && O(r, f), c != null && c.length) {
2952
- var T = new At(t.interaction);
2953
- T.copyFrom(t.interaction.modification), T.prepareStates(c), e.subModification = T, T.startAll(u({}, t));
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));
2954
2792
  }
2955
2793
  }, set: function(t) {
2956
- var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = O({}, r), a = e.equalDelta ? Mr : Rr;
2957
- if (O(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2958
- var s = O({}, n);
2959
- tt(o, s, { x: r.x - i.x, y: r.y - i.y });
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);
2797
+ nt(o, s, { x: r.x - i.x, y: r.y - i.y });
2960
2798
  var l = e.subModification.setAll(u(u({}, t), {}, { rect: s, edges: o, pageCoords: r, prevCoords: r, prevRect: s })), d = l.delta;
2961
- return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), O(r, l.coords)), l.eventProps;
2799
+ return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), D(r, l.coords)), l.eventProps;
2962
2800
  }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
2963
2801
  function Mr(t, e, n) {
2964
2802
  var r = t.startCoords, o = t.edgeSign;
@@ -2977,12 +2815,12 @@ function Uo() {
2977
2815
  var Ar = _e(_r, "aspectRatio"), Tn = function() {
2978
2816
  };
2979
2817
  Tn._defaults = {};
2980
- var dt = Tn;
2818
+ var pt = Tn;
2981
2819
  function Oe(t, e, n) {
2982
- return b.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2820
+ return x.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2983
2821
  }
2984
- var pt = { start: function(t) {
2985
- var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = O({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2822
+ 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 || {});
2986
2824
  if (e && s) {
2987
2825
  var d = Oe(a.restriction, o, i);
2988
2826
  if (d) {
@@ -2996,11 +2834,11 @@ function Uo() {
2996
2834
  var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2997
2835
  if (a) {
2998
2836
  var s = (function(l) {
2999
- return !l || "left" in l && "top" in l || ((l = O({}, 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;
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;
3000
2838
  })(a);
3001
2839
  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);
3002
2840
  }
3003
- }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(pt, "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 };
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 };
3004
2842
  function Rn(t, e) {
3005
2843
  for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
3006
2844
  var o = r[n];
@@ -3010,87 +2848,87 @@ function Uo() {
3010
2848
  }
3011
2849
  var $e = { noInner: _n, noOuter: Mn, start: function(t) {
3012
2850
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
3013
- i && (e = et(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 };
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 };
3014
2852
  }, set: function(t) {
3015
2853
  var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
3016
2854
  if (n) {
3017
- var s = O({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
2855
+ var s = D({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
3018
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));
3019
2857
  }
3020
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = O({ get elementRect() {
2858
+ }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = D({ get elementRect() {
3021
2859
  return { top: 0, left: 0, bottom: 1, right: 1 };
3022
2860
  }, set elementRect(t) {
3023
- } }, pt.defaults), Dr = _e({ start: pt.start, set: pt.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, zr = { width: 1 / 0, height: 1 / 0 }, Lr = _e({ start: function(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) {
3024
2862
  return $e.start(t);
3025
2863
  }, set: function(t) {
3026
2864
  var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
3027
2865
  if (o) {
3028
- var a = mt(Oe(i.min, e, t.coords)) || Nr, s = mt(Oe(i.max, e, t.coords)) || zr;
3029
- n.options = { endOnly: i.endOnly, inner: O({}, $e.noInner), outer: O({}, $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;
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;
3030
2868
  }
3031
- }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), zt = { start: function(t) {
3032
- 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(y) {
3033
- var T = y.interaction.element, C = et(ze(y.state.options.origin, null, null, [T])), M = C || Le(y.interactable, T, y.interaction.prepared.name);
3034
- return M;
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);
2872
+ return R;
3035
2873
  })(t) : { x: 0, y: 0 };
3036
2874
  if (l.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
3037
2875
  else {
3038
2876
  var c = ze(l.offset, r, o, [n]);
3039
- (e = et(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
2877
+ (e = tt(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
3040
2878
  }
3041
2879
  var f = l.relativePoints;
3042
- a.offsets = i && f && f.length ? f.map((function(y, T) {
3043
- return { index: T, relativePoint: y, x: s.left - i.width * y.x + e.x, y: s.top - i.height * y.y + e.y };
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 };
3044
2882
  })) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
3045
2883
  }, set: function(t) {
3046
- 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 = O({}, n), l = [];
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 = [];
3047
2885
  o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
3048
- for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], y = s.x - f.x, T = s.y - f.y, C = 0, M = o.targets.length; C < M; C++) {
3049
- var I = o.targets[C], R = void 0;
3050
- (R = b.func(I) ? I(y, T, e._proxy, f, C) : I) && l.push({ x: (b.number(R.x) ? R.x : y) + f.x, y: (b.number(R.y) ? R.y : T) + f.y, range: b.number(R.range) ? R.range : o.range, source: I, index: C, offset: f });
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 });
3051
2889
  }
3052
- for (var D = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, q = 0; q < l.length; q++) {
3053
- var Q = l[q], L = Q.range, V = Q.x - s.x, me = Q.y - s.y, ae = Fe(V, me), ge = ae <= L;
3054
- L === 1 / 0 && D.inRange && D.range !== 1 / 0 && (ge = !1), D.target && !(ge ? D.inRange && L !== 1 / 0 ? ae / L < D.distance / D.range : L === 1 / 0 && D.range !== 1 / 0 || ae < D.distance : !D.inRange && ae < D.distance) || (D.target = Q, D.distance = ae, D.range = L, D.inRange = ge, D.delta.x = V, D.delta.y = me);
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);
3055
2893
  }
3056
- return D.inRange && (n.x = D.target.x, n.y = D.target.y), r.closest = D, D;
3057
- }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(zt, "snap"), ft = { start: function(t) {
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) {
3058
2896
  var e = t.state, n = t.edges, r = e.options;
3059
2897
  if (!n) return null;
3060
- 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;
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;
3061
2899
  }, set: function(t) {
3062
2900
  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 };
3063
- n.options = O({}, o), n.options.targets = [];
2901
+ n.options = D({}, o), n.options.targets = [];
3064
2902
  for (var s = 0, l = o.targets || []; s < l.length; s++) {
3065
2903
  var d = l[s], c = void 0;
3066
- if (c = b.func(d) ? d(a.x, a.y, e) : d) {
3067
- for (var f = 0, y = n.targetFields; f < y.length; f++) {
3068
- var T = y[f], C = T[0], M = T[1];
3069
- if (C in c || M in c) {
3070
- c.x = c[C], c.y = c[M];
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];
3071
2909
  break;
3072
2910
  }
3073
2911
  }
3074
2912
  n.options.targets.push(c);
3075
2913
  }
3076
2914
  }
3077
- var I = zt.set(t);
3078
- return n.options = o, I;
3079
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(ft, "snapSize"), Lt = { aspectRatio: Ar, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: Lr, snapEdges: _e({ start: function(t) {
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) {
3080
2918
  var e = t.edges;
3081
- return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], ft.start(t)) : null;
3082
- }, set: ft.set, defaults: O(Ne(ft.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: dt, avoid: dt, transform: dt, rubberband: dt }, Hr = { id: "modifiers", install: function(t) {
2919
+ 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) {
3083
2921
  var e = t.interactStatic;
3084
- for (var n in t.usePlugin(dn), t.usePlugin(Tr), e.modifiers = Lt, Lt) {
3085
- var r = Lt[n], o = r._defaults, i = r._methods;
2922
+ for (var n in t.usePlugin(dn), t.usePlugin(Tr), e.modifiers = Ft, Ft) {
2923
+ var r = Ft[n], o = r._defaults, i = r._methods;
3086
2924
  o._methods = i, t.defaults.perAction[n] = o;
3087
2925
  }
3088
2926
  } }, Br = Hr, An = (function(t) {
3089
- S(n, t);
3090
- var e = P(n);
2927
+ M(n, t);
2928
+ var e = A(n);
3091
2929
  function n(r, o, i, a, s, l) {
3092
2930
  var d;
3093
- if (g(this, n), nt(B(d = e.call(this, s)), i), i !== o && nt(B(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") {
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") {
3094
2932
  var c = s.getPointerIndex(o);
3095
2933
  d.dt = d.timeStamp - s.pointers[c].downTime;
3096
2934
  var f = d.timeStamp - s.tapTime;
@@ -3098,7 +2936,7 @@ function Uo() {
3098
2936
  } else r === "doubletap" && (d.dt = o.timeStamp - s.tapTime, d.double = !0);
3099
2937
  return d;
3100
2938
  }
3101
- return x(n, [{ key: "_subtractOrigin", value: function(r) {
2939
+ return y(n, [{ key: "_subtractOrigin", value: function(r) {
3102
2940
  var o = r.x, i = r.y;
3103
2941
  return this.pageX -= o, this.pageY -= i, this.clientX -= o, this.clientY -= i, this;
3104
2942
  } }, { key: "_addOrigin", value: function(r) {
@@ -3107,8 +2945,8 @@ function Uo() {
3107
2945
  } }, { key: "preventDefault", value: function() {
3108
2946
  this.originalEvent.preventDefault();
3109
2947
  } }]), n;
3110
- })(it), Ve = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
3111
- t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, O(t.actions.phaselessTypes, Ve.types);
2948
+ })(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);
3112
2950
  }, listeners: { "interactions:new": function(t) {
3113
2951
  var e = t.interaction;
3114
2952
  e.prevTap = null, e.tapTime = 0;
@@ -3117,43 +2955,43 @@ function Uo() {
3117
2955
  !e && n.hold || (n.hold = { duration: 1 / 0, timeout: null });
3118
2956
  }, "interactions:move": function(t, e) {
3119
2957
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
3120
- t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && Ft(t), Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
2958
+ t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
3121
2959
  }, "interactions:down": function(t, e) {
3122
2960
  (function(n, r) {
3123
- 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 }, y = 0; y < c.length; y++) {
3124
- var T = c[y];
3125
- f.node = T, r.fire("pointerEvents:collect-targets", f);
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);
3126
2964
  }
3127
2965
  if (f.targets.length) {
3128
- for (var C = 1 / 0, M = 0, I = f.targets; M < I.length; M++) {
3129
- var R = I[M].eventable.options.holdDuration;
3130
- R < C && (C = R);
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);
3131
2969
  }
3132
- d.duration = C, d.timeout = setTimeout((function() {
2970
+ d.duration = k, d.timeout = setTimeout((function() {
3133
2971
  Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
3134
- }), C);
2972
+ }), k);
3135
2973
  }
3136
2974
  })(t, e), Re(t, e);
3137
2975
  }, "interactions:up": function(t, e) {
3138
- Ft(t), Re(t, e), (function(n, r) {
2976
+ jt(t), Re(t, e), (function(n, r) {
3139
2977
  var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget;
3140
2978
  o.pointerWasMoved || Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "tap" }, r);
3141
2979
  })(t, e);
3142
2980
  }, "interactions:cancel": function(t, e) {
3143
- Ft(t), Re(t, e);
2981
+ jt(t), Re(t, e);
3144
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 } };
3145
2983
  function Re(t, e) {
3146
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());
3147
2985
  e.fire("pointerEvents:new", { pointerEvent: d });
3148
2986
  for (var c = { interaction: n, pointer: r, event: o, eventTarget: i, targets: l, type: a, pointerEvent: d }, f = 0; f < l.length; f++) {
3149
- var y = l[f];
3150
- for (var T in y.props || {}) d[T] = y.props[T];
3151
- var C = Le(y.eventable, y.node);
3152
- if (d._subtractOrigin(C), d.eventable = y.eventable, d.currentTarget = y.node, y.eventable.fire(d), d._addOrigin(C), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
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;
3153
2991
  }
3154
2992
  if (e.fire("pointerEvents:fired", c), a === "tap") {
3155
- var M = d.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
3156
- n.prevTap = M, n.tapTime = M.timeStamp;
2993
+ var R = d.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2994
+ n.prevTap = R, n.tapTime = R.timeStamp;
3157
2995
  }
3158
2996
  return d;
3159
2997
  }
@@ -3161,20 +2999,20 @@ function Uo() {
3161
2999
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = n.getPointerIndex(r), l = n.pointers[s];
3162
3000
  if (a === "tap" && (n.pointerWasMoved || !l || l.downTarget !== i)) return [];
3163
3001
  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++) {
3164
- var y = d[f];
3165
- c.node = y, e.fire("pointerEvents:collect-targets", c);
3002
+ var b = d[f];
3003
+ c.node = b, e.fire("pointerEvents:collect-targets", c);
3166
3004
  }
3167
- return a === "hold" && (c.targets = c.targets.filter((function(T) {
3168
- var C, M;
3169
- return T.eventable.options.holdDuration === ((C = n.pointers[s]) == null || (M = C.hold) == null ? void 0 : M.duration);
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);
3170
3008
  }))), c.targets;
3171
3009
  }
3172
- function Ft(t) {
3010
+ function jt(t) {
3173
3011
  var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
3174
3012
  r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
3175
3013
  }
3176
- var qr = Object.freeze({ __proto__: null, default: Ve });
3177
- function Wr(t) {
3014
+ var Wr = Object.freeze({ __proto__: null, default: Ve });
3015
+ function qr(t) {
3178
3016
  var e = t.interaction;
3179
3017
  e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
3180
3018
  }
@@ -3183,7 +3021,7 @@ function Uo() {
3183
3021
  var e = t.pointerEvents;
3184
3022
  e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
3185
3023
  }, listeners: ["move", "up", "cancel", "endall"].reduce((function(t, e) {
3186
- return t["pointerEvents:".concat(e)] = Wr, t;
3024
+ return t["pointerEvents:".concat(e)] = qr, t;
3187
3025
  }), { "pointerEvents:new": function(t) {
3188
3026
  var e = t.pointerEvent;
3189
3027
  e.type === "hold" && (e.count = (e.count || 0) + 1);
@@ -3198,7 +3036,7 @@ function Uo() {
3198
3036
  } }) }, $r = Yr, Vr = { id: "pointer-events/interactableTargets", install: function(t) {
3199
3037
  var e = t.Interactable;
3200
3038
  e.prototype.pointerEvents = function(r) {
3201
- return O(this.events.options, r), this;
3039
+ return D(this.events.options, r), this;
3202
3040
  };
3203
3041
  var n = e.prototype._backCompatOption;
3204
3042
  e.prototype._backCompatOption = function(r, o) {
@@ -3218,25 +3056,25 @@ function Uo() {
3218
3056
  };
3219
3057
  }, "interactable:set": function(t, e) {
3220
3058
  var n = t.interactable, r = t.options;
3221
- O(n.events.options, e.pointerEvents.defaults), O(n.events.options, r.pointerEvents || {});
3059
+ D(n.events.options, e.pointerEvents.defaults), D(n.events.options, r.pointerEvents || {});
3222
3060
  } } }, Ur = Vr, Xr = { id: "pointer-events", install: function(t) {
3223
- t.usePlugin(qr), t.usePlugin($r), t.usePlugin(Ur);
3061
+ t.usePlugin(Wr), t.usePlugin($r), t.usePlugin(Ur);
3224
3062
  } }, Gr = Xr, Kr = { id: "reflow", install: function(t) {
3225
3063
  var e = t.Interactable;
3226
3064
  t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
3227
3065
  return (function(r, o, i) {
3228
3066
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, d = function() {
3229
- var f = a[c], y = r.getRect(f);
3230
- if (!y) return 1;
3231
- var T, C = Be(i.interactions.list, (function(R) {
3232
- return R.interacting() && R.interactable === r && R.element === f && R.prepared.name === o.name;
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;
3233
3071
  }));
3234
- if (C) C.move(), l && (T = C._reflowPromise || new s((function(R) {
3235
- C._reflowResolve = R;
3072
+ if (k) k.move(), l && (S = k._reflowPromise || new s((function(I) {
3073
+ k._reflowResolve = I;
3236
3074
  })));
3237
3075
  else {
3238
- var M = mt(y), I = /* @__PURE__ */ (function(R) {
3239
- return { coords: R, get page() {
3076
+ var R = gt(b), O = /* @__PURE__ */ (function(I) {
3077
+ return { coords: I, get page() {
3240
3078
  return this.coords.page;
3241
3079
  }, get client() {
3242
3080
  return this.coords.client;
@@ -3262,17 +3100,17 @@ function Uo() {
3262
3100
  return this.coords.buttons;
3263
3101
  }, preventDefault: function() {
3264
3102
  } };
3265
- })({ page: { x: M.x, y: M.y }, client: { x: M.x, y: M.y }, timeStamp: i.now() });
3266
- T = (function(R, D, q, Q, L) {
3267
- var V = R.interactions.new({ pointerType: "reflow" }), me = { interaction: V, event: L, pointer: L, eventTarget: q, phase: "reflow" };
3268
- V.interactable = D, V.element = q, V.prevEvent = L, V.updatePointer(L, L, q, !0), qt(V.coords.delta), Tt(V.prepared, Q), V._doPhase(me);
3269
- var ae = R.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3270
- V._reflowResolve = Se;
3103
+ })({ page: { x: R.x, y: R.y }, client: { x: R.x, y: R.y }, timeStamp: i.now() });
3104
+ S = (function(I, z, U, ee, B) {
3105
+ var K = I.interactions.new({ pointerType: "reflow" }), me = { interaction: K, event: B, pointer: B, eventTarget: U, phase: "reflow" };
3106
+ K.interactable = z, K.element = U, K.prevEvent = B, K.updatePointer(B, B, U, !0), Wt(K.coords.delta), _t(K.prepared, ee), K._doPhase(me);
3107
+ var ae = I.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3108
+ K._reflowResolve = Se;
3271
3109
  })) : void 0;
3272
- return V._reflowPromise = be, V.start(Q, D, q), V._interacting ? (V.move(me), V.end(L)) : (V.stop(), V._reflowResolve()), V.removePointer(L, L), be;
3273
- })(i, r, f, o, I);
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);
3274
3112
  }
3275
- l && l.push(T);
3113
+ l && l.push(S);
3276
3114
  }, c = 0; c < a.length && !d(); c++) ;
3277
3115
  return l && s.all(l).then((function() {
3278
3116
  return r;
@@ -3293,8 +3131,203 @@ function Uo() {
3293
3131
  }));
3294
3132
  })(Je, Je.exports)), Je.exports;
3295
3133
  }
3296
- var Xo = /* @__PURE__ */ Uo();
3297
- const Ht = /* @__PURE__ */ $o(Xo);
3134
+ var Vo = /* @__PURE__ */ $o();
3135
+ const Ze = /* @__PURE__ */ qo(Vo);
3136
+ function Uo(v) {
3137
+ const p = new DOMParser().parseFromString(v, "text/html");
3138
+ return Array.from(p.querySelectorAll("img")).forEach((m) => {
3139
+ if (!p.body.contains(m) || m.closest(".editor-image-wrapper")) return;
3140
+ const w = m.getAttribute("src") || m.src;
3141
+ if (!w) return;
3142
+ const y = document.createElement("img");
3143
+ y.src = w, m.alt && (y.alt = m.alt), m.title && (y.title = m.title), y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3144
+ const _ = m.getAttribute("width") || m.style.width || (m.naturalWidth > 0 ? `${m.naturalWidth}px` : null), M = document.createElement("div");
3145
+ M.className = "editor-image-wrapper", M.style.display = "inline-block", M.style.position = "relative", M.style.maxWidth = "100%", M.style.width = _ && _ !== "0px" ? _.includes("px") ? _ : `${_}px` : "300px", M.style.height = "auto", M.contentEditable = "false", M.style.boxSizing = "border-box", M.style.touchAction = "none", M.style.userSelect = "none", M.appendChild(y);
3146
+ const C = document.createElement("div");
3147
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(M);
3148
+ let T = m;
3149
+ const P = m.closest("figure"), A = m.closest("picture");
3150
+ if (P && p.body.contains(P))
3151
+ T = P;
3152
+ else if (A && p.body.contains(A))
3153
+ T = A;
3154
+ 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()
3158
+ ).length === 1; )
3159
+ T = j, j = j.parentNode;
3160
+ }
3161
+ T && T.parentNode && p.body.contains(T) ? T.parentNode.replaceChild(C, T) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(C, m);
3162
+ }), p.body.innerHTML;
3163
+ }
3164
+ function Xo(v, h) {
3165
+ const p = document.createElement("div");
3166
+ 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
+ const u = document.createElement("style");
3168
+ u.textContent = `
3169
+ .editor::-webkit-scrollbar { display: none; }
3170
+ .editor ul, .editor ol {
3171
+ margin: 0.5em 0;
3172
+ padding-left: 2em;
3173
+ list-style-position: outside;
3174
+ }
3175
+ .editor ul { list-style-type: disc; }
3176
+ .editor ol { list-style-type: decimal; }
3177
+ .editor li {
3178
+ margin: 0.25em 0;
3179
+ display: list-item;
3180
+ }
3181
+ `, document.querySelector("style[data-editor-scrollbar]") || (u.setAttribute("data-editor-scrollbar", "true"), document.head.appendChild(u)), p.innerHTML = "", p.addEventListener("dragover", (w) => {
3182
+ w.preventDefault(), w.stopPropagation();
3183
+ }), p.addEventListener("drop", (w) => {
3184
+ w.preventDefault(), w.stopPropagation();
3185
+ const y = w.clientX, _ = w.clientY;
3186
+ let M = null;
3187
+ if (document.caretRangeFromPoint)
3188
+ M = document.caretRangeFromPoint(y, _);
3189
+ else if (document.caretPositionFromPoint) {
3190
+ const T = document.caretPositionFromPoint(y, _);
3191
+ T && (M = document.createRange(), M.setStart(T.offsetNode, T.offset));
3192
+ }
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)
3206
+ 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);
3213
+ }
3214
+ } catch {
3215
+ p.appendChild($);
3216
+ }
3217
+ else
3218
+ p.appendChild($);
3219
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
3220
+ }, A.readAsDataURL(P);
3221
+ }
3222
+ }
3223
+ }), p.addEventListener("paste", async (w) => {
3224
+ 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);
3247
+ } else
3248
+ p.appendChild(V);
3249
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3250
+ }
3251
+ }, j.readAsDataURL(A);
3252
+ }
3253
+ }
3254
+ return;
3255
+ }
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);
3266
+ } else {
3267
+ const P = document.createElement("div");
3268
+ for (P.innerHTML = C; P.firstChild; )
3269
+ p.appendChild(P.firstChild);
3270
+ }
3271
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3272
+ }), 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));
3286
+ } else
3287
+ window.__selectedImageContainer = null, p.querySelectorAll(
3288
+ ".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%");
3294
+ }), de();
3295
+ }), p.addEventListener("keyup", () => de()), p.addEventListener("mouseup", () => de()), p.addEventListener("focus", () => de()), window.addEventListener("selectionchange", () => {
3296
+ try {
3297
+ const w = window.getSelection();
3298
+ 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();
3304
+ } catch {
3305
+ }
3306
+ });
3307
+ const m = () => {
3308
+ if (!p.firstChild) {
3309
+ p.innerHTML = "<p><br></p>";
3310
+ return;
3311
+ }
3312
+ 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 && _)
3320
+ try {
3321
+ _.removeAllRanges(), _.addRange(M);
3322
+ } catch {
3323
+ }
3324
+ }
3325
+ };
3326
+ let g = null;
3327
+ 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;
3330
+ }
3298
3331
  function On(v) {
3299
3332
  const h = document.createElement("input");
3300
3333
  h.type = "file", h.accept = "image/*", h.onchange = (p) => {
@@ -3304,21 +3337,21 @@ function On(v) {
3304
3337
  m.onload = (g) => {
3305
3338
  const w = document.createElement("img");
3306
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;
3307
- const x = document.createElement("div");
3308
- x.className = "editor-image-wrapper", x.style.display = "inline-block", x.style.position = "relative", x.style.maxWidth = "100%", x.style.width = "auto", x.style.height = "auto", x.contentEditable = "false", x.style.boxSizing = "border-box", x.style.touchAction = "none", x.style.userSelect = "none", x.appendChild(w);
3309
- const k = document.createElement("div");
3310
- k.contentEditable = "true", k.style.margin = "10px 0", k.style.textAlign = "left", k.style.display = "block", k.appendChild(x);
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);
3311
3344
  try {
3312
3345
  Ae();
3313
- const S = window.getSelection();
3314
- if (S && S.rangeCount > 0) {
3315
- S.getRangeAt(0).insertNode(k), S.removeAllRanges();
3316
- const A = document.createRange();
3317
- A.setStartAfter(k), A.collapse(!0), S.addRange(A), de(A);
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);
3318
3351
  } else
3319
- v.appendChild(k), v.focus(), de();
3352
+ v.appendChild(_), v.focus(), de();
3320
3353
  } catch {
3321
- v.appendChild(k), v.focus(), de();
3354
+ v.appendChild(_), v.focus(), de();
3322
3355
  }
3323
3356
  v.dispatchEvent(new Event("input", { bubbles: !0 })), v.focus();
3324
3357
  }, m.readAsDataURL(u);
@@ -3332,13 +3365,13 @@ function Go(v) {
3332
3365
  if (p)
3333
3366
  if (h.classList.contains("resizable")) {
3334
3367
  const u = h.getBoundingClientRect(), m = Math.round(u.width) + "px", g = Math.round(u.height) + "px";
3335
- Ht(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%");
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%");
3336
3369
  const w = h.closest(".editor");
3337
3370
  w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3338
3371
  } else {
3339
3372
  h.classList.add("resizable"), h.style.border = "2px dashed #007bff", h.style.position = "relative", h.style.userSelect = "none";
3340
3373
  const u = h.getBoundingClientRect();
3341
- h.style.width = u.width + "px", h.style.height = u.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), Ht(h).resizable({
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({
3342
3375
  edges: { left: !0, right: !0, bottom: !0, top: !0 },
3343
3376
  listeners: {
3344
3377
  move: (m) => {
@@ -3356,7 +3389,7 @@ function Go(v) {
3356
3389
  }
3357
3390
  },
3358
3391
  modifiers: [
3359
- Ht.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3392
+ Ze.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3360
3393
  ],
3361
3394
  inertia: !0
3362
3395
  });
@@ -3367,10 +3400,10 @@ class Ko {
3367
3400
  toolbar;
3368
3401
  editor;
3369
3402
  constructor() {
3370
- this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Yo(
3403
+ this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Xo(
3371
3404
  () => On(this.editor),
3372
3405
  (p) => Go(p)
3373
- ), this.toolbar = qo(this.container);
3406
+ ), this.toolbar = Wo(this.container);
3374
3407
  const h = this.toolbar.querySelector(
3375
3408
  '[role="button"][title="Insert Image"]'
3376
3409
  );
@@ -3391,36 +3424,36 @@ class Ko {
3391
3424
  return;
3392
3425
  const u = p.parentElement;
3393
3426
  if (u && u.classList.contains("editor-image-wrapper")) {
3394
- const A = p;
3395
- A.style.maxWidth = "100%", A.style.width = "100%", A.style.height = "auto", A.style.cursor = "pointer", A.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");
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");
3396
3429
  return;
3397
3430
  }
3398
3431
  const m = document.createElement("div");
3399
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";
3400
3433
  const g = p;
3401
3434
  g.style.maxWidth = "100%", g.style.width = "100%", g.style.height = "auto", g.style.cursor = "pointer", g.draggable = !1;
3402
- const w = (A) => {
3403
- if (!A) return null;
3404
- const B = String(A).match(/(\d+(?:\.\d+)?)/);
3405
- if (!B) return null;
3406
- const P = Math.round(Number(B[1]));
3407
- return Number.isFinite(P) && P > 0 ? P : null;
3408
- }, x = w(g.getAttribute("width")) ?? w(g.style.width) ?? w(g.getAttribute("style"));
3409
- x ? m.style.width = `${x}px` : g.onload = () => {
3410
- const A = this.editor.clientWidth || 0, B = g.naturalWidth || 0;
3411
- if (B > 0) {
3412
- const P = A > 0 ? Math.min(B, A) : B;
3413
- m.style.width = `${P}px`;
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`;
3414
3447
  }
3415
3448
  };
3416
- const k = document.createElement("p");
3417
- k.style.margin = "10px 0", k.style.textAlign = "left", k.style.display = "block";
3418
- const S = g.closest("figure") ?? g.closest(".se-image-container") ?? g, _ = S.parentNode;
3419
- _ && this.editor.contains(S) && _.contains(S) && (m.appendChild(g), k.appendChild(m), _.replaceChild(k, S));
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));
3420
3453
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3421
3454
  }
3422
3455
  }
3423
- var vt = { exports: {} }, Ge = {};
3456
+ var mt = { exports: {} }, Ge = {};
3424
3457
  var Dn;
3425
3458
  function Jo() {
3426
3459
  if (Dn) return Ge;
@@ -3430,8 +3463,8 @@ function Jo() {
3430
3463
  var w = null;
3431
3464
  if (g !== void 0 && (w = "" + g), m.key !== void 0 && (w = "" + m.key), "key" in m) {
3432
3465
  g = {};
3433
- for (var x in m)
3434
- x !== "key" && (g[x] = m[x]);
3466
+ for (var y in m)
3467
+ y !== "key" && (g[y] = m[y]);
3435
3468
  } else g = m;
3436
3469
  return m = g.ref, {
3437
3470
  $$typeof: v,
@@ -3455,13 +3488,13 @@ function Qo() {
3455
3488
  switch (E) {
3456
3489
  case N:
3457
3490
  return "Fragment";
3458
- case U:
3491
+ case L:
3459
3492
  return "Profiler";
3460
- case J:
3493
+ case $:
3461
3494
  return "StrictMode";
3462
- case re:
3495
+ case te:
3463
3496
  return "Suspense";
3464
- case b:
3497
+ case x:
3465
3498
  return "SuspenseList";
3466
3499
  case le:
3467
3500
  return "Activity";
@@ -3470,21 +3503,21 @@ function Qo() {
3470
3503
  switch (typeof E.tag == "number" && console.error(
3471
3504
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3472
3505
  ), E.$$typeof) {
3473
- case W:
3506
+ case F:
3474
3507
  return "Portal";
3475
- case ne:
3476
- return E.displayName || "Context";
3477
3508
  case Z:
3509
+ return E.displayName || "Context";
3510
+ case V:
3478
3511
  return (E._context.displayName || "Context") + ".Consumer";
3479
3512
  case ie:
3480
- var z = E.render;
3481
- return E = E.displayName, E || (E = z.displayName || z.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3482
- case ee:
3483
- return z = E.displayName || null, z !== null ? z : v(E.type) || "Memo";
3484
- case F:
3485
- z = E._payload, E = E._init;
3513
+ var H = E.render;
3514
+ return E = E.displayName, E || (E = H.displayName || H.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3515
+ 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;
3486
3519
  try {
3487
- return v(E(z));
3520
+ return v(E(H));
3488
3521
  } catch {
3489
3522
  }
3490
3523
  }
@@ -3496,74 +3529,74 @@ function Qo() {
3496
3529
  function p(E) {
3497
3530
  try {
3498
3531
  h(E);
3499
- var z = !1;
3532
+ var H = !1;
3500
3533
  } catch {
3501
- z = !0;
3534
+ H = !0;
3502
3535
  }
3503
- if (z) {
3504
- z = console;
3505
- var j = z.error, $ = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3506
- return j.call(
3507
- z,
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,
3508
3541
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3509
- $
3542
+ G
3510
3543
  ), h(E);
3511
3544
  }
3512
3545
  }
3513
3546
  function u(E) {
3514
3547
  if (E === N) return "<>";
3515
- if (typeof E == "object" && E !== null && E.$$typeof === F)
3548
+ if (typeof E == "object" && E !== null && E.$$typeof === W)
3516
3549
  return "<...>";
3517
3550
  try {
3518
- var z = v(E);
3519
- return z ? "<" + z + ">" : "<...>";
3551
+ var H = v(E);
3552
+ return H ? "<" + H + ">" : "<...>";
3520
3553
  } catch {
3521
3554
  return "<...>";
3522
3555
  }
3523
3556
  }
3524
3557
  function m() {
3525
- var E = X.A;
3558
+ var E = J.A;
3526
3559
  return E === null ? null : E.getOwner();
3527
3560
  }
3528
3561
  function g() {
3529
3562
  return Error("react-stack-top-frame");
3530
3563
  }
3531
3564
  function w(E) {
3532
- if (K.call(E, "key")) {
3533
- var z = Object.getOwnPropertyDescriptor(E, "key").get;
3534
- if (z && z.isReactWarning) return !1;
3565
+ if (Q.call(E, "key")) {
3566
+ var H = Object.getOwnPropertyDescriptor(E, "key").get;
3567
+ if (H && H.isReactWarning) return !1;
3535
3568
  }
3536
3569
  return E.key !== void 0;
3537
3570
  }
3538
- function x(E, z) {
3539
- function j() {
3540
- te || (te = !0, console.error(
3571
+ function y(E, H) {
3572
+ function q() {
3573
+ re || (re = !0, console.error(
3541
3574
  "%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)",
3542
- z
3575
+ H
3543
3576
  ));
3544
3577
  }
3545
- j.isReactWarning = !0, Object.defineProperty(E, "key", {
3546
- get: j,
3578
+ q.isReactWarning = !0, Object.defineProperty(E, "key", {
3579
+ get: q,
3547
3580
  configurable: !0
3548
3581
  });
3549
3582
  }
3550
- function k() {
3583
+ function _() {
3551
3584
  var E = v(this.type);
3552
3585
  return se[E] || (se[E] = !0, console.error(
3553
3586
  "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."
3554
3587
  )), E = this.props.ref, E !== void 0 ? E : null;
3555
3588
  }
3556
- function S(E, z, j, $, xe, we) {
3557
- var ue = j.ref;
3589
+ function M(E, H, q, G, xe, we) {
3590
+ var ue = q.ref;
3558
3591
  return E = {
3559
- $$typeof: G,
3592
+ $$typeof: j,
3560
3593
  type: E,
3561
- key: z,
3562
- props: j,
3563
- _owner: $
3594
+ key: H,
3595
+ props: q,
3596
+ _owner: G
3564
3597
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(E, "ref", {
3565
3598
  enumerable: !1,
3566
- get: k
3599
+ get: _
3567
3600
  }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
3568
3601
  configurable: !1,
3569
3602
  enumerable: !1,
@@ -3586,124 +3619,124 @@ function Qo() {
3586
3619
  value: we
3587
3620
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
3588
3621
  }
3589
- function _(E, z, j, $, xe, we) {
3590
- var ue = z.children;
3622
+ function C(E, H, q, G, xe, we) {
3623
+ var ue = H.children;
3591
3624
  if (ue !== void 0)
3592
- if ($)
3593
- if (Y(ue)) {
3594
- for ($ = 0; $ < ue.length; $++)
3595
- A(ue[$]);
3625
+ if (G)
3626
+ if (X(ue)) {
3627
+ for (G = 0; G < ue.length; G++)
3628
+ T(ue[G]);
3596
3629
  Object.freeze && Object.freeze(ue);
3597
3630
  } else
3598
3631
  console.error(
3599
3632
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3600
3633
  );
3601
- else A(ue);
3602
- if (K.call(z, "key")) {
3634
+ else T(ue);
3635
+ if (Q.call(H, "key")) {
3603
3636
  ue = v(E);
3604
- var Ee = Object.keys(z).filter(function(Ze) {
3605
- return Ze !== "key";
3637
+ var Ee = Object.keys(H).filter(function(et) {
3638
+ return et !== "key";
3606
3639
  });
3607
- $ = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + $] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3640
+ G = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + G] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3608
3641
  `A props object containing a "key" prop is being spread into JSX:
3609
3642
  let props = %s;
3610
3643
  <%s {...props} />
3611
3644
  React keys must be passed directly to JSX without using spread:
3612
3645
  let props = %s;
3613
3646
  <%s key={someKey} {...props} />`,
3614
- $,
3647
+ G,
3615
3648
  ue,
3616
3649
  Ee,
3617
3650
  ue
3618
- ), he[ue + $] = !0);
3619
- }
3620
- if (ue = null, j !== void 0 && (p(j), ue = "" + j), w(z) && (p(z.key), ue = "" + z.key), "key" in z) {
3621
- j = {};
3622
- for (var O in z)
3623
- O !== "key" && (j[O] = z[O]);
3624
- } else j = z;
3625
- return ue && x(
3626
- j,
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,
3627
3660
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
3628
- ), S(
3661
+ ), M(
3629
3662
  E,
3630
3663
  ue,
3631
- j,
3664
+ q,
3632
3665
  m(),
3633
3666
  xe,
3634
3667
  we
3635
3668
  );
3636
3669
  }
3637
- function A(E) {
3638
- B(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === F && (E._payload.status === "fulfilled" ? B(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
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));
3639
3672
  }
3640
- function B(E) {
3641
- return typeof E == "object" && E !== null && E.$$typeof === G;
3673
+ function P(E) {
3674
+ return typeof E == "object" && E !== null && E.$$typeof === j;
3642
3675
  }
3643
- var P = Qr, G = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), J = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), ne = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), re = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), ee = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), X = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, Y = Array.isArray, oe = console.createTask ? console.createTask : function() {
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() {
3644
3677
  return null;
3645
3678
  };
3646
- P = {
3679
+ A = {
3647
3680
  react_stack_bottom_frame: function(E) {
3648
3681
  return E();
3649
3682
  }
3650
3683
  };
3651
- var te, se = {}, pe = P.react_stack_bottom_frame.bind(
3652
- P,
3684
+ var re, se = {}, pe = A.react_stack_bottom_frame.bind(
3685
+ A,
3653
3686
  g
3654
3687
  )(), fe = oe(u(g)), he = {};
3655
- Ke.Fragment = N, Ke.jsx = function(E, z, j) {
3656
- var $ = 1e4 > X.recentlyCreatedOwnerStacks++;
3657
- return _(
3688
+ Ke.Fragment = N, Ke.jsx = function(E, H, q) {
3689
+ var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3690
+ return C(
3658
3691
  E,
3659
- z,
3660
- j,
3692
+ H,
3693
+ q,
3661
3694
  !1,
3662
- $ ? Error("react-stack-top-frame") : pe,
3663
- $ ? oe(u(E)) : fe
3695
+ G ? Error("react-stack-top-frame") : pe,
3696
+ G ? oe(u(E)) : fe
3664
3697
  );
3665
- }, Ke.jsxs = function(E, z, j) {
3666
- var $ = 1e4 > X.recentlyCreatedOwnerStacks++;
3667
- return _(
3698
+ }, Ke.jsxs = function(E, H, q) {
3699
+ var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3700
+ return C(
3668
3701
  E,
3669
- z,
3670
- j,
3702
+ H,
3703
+ q,
3671
3704
  !0,
3672
- $ ? Error("react-stack-top-frame") : pe,
3673
- $ ? oe(u(E)) : fe
3705
+ G ? Error("react-stack-top-frame") : pe,
3706
+ G ? oe(u(E)) : fe
3674
3707
  );
3675
3708
  };
3676
3709
  })()), Ke;
3677
3710
  }
3678
3711
  var zn;
3679
3712
  function Zo() {
3680
- return zn || (zn = 1, process.env.NODE_ENV === "production" ? vt.exports = Jo() : vt.exports = Qo()), vt.exports;
3713
+ return zn || (zn = 1, process.env.NODE_ENV === "production" ? mt.exports = Jo() : mt.exports = Qo()), mt.exports;
3681
3714
  }
3682
3715
  var ei = Zo();
3683
3716
  const ni = Zr(({ onChange: v, initialValue: h }, p) => {
3684
- const u = Xe(null), m = Xe(null), g = Xe(h), w = Xe(v), x = Xe(!1);
3685
- return jt(() => {
3717
+ const u = Xe(null), m = Xe(null), g = Xe(h), w = Xe(v), y = Xe(!1);
3718
+ return Ht(() => {
3686
3719
  w.current = v;
3687
3720
  }, [v]), eo(p, () => ({
3688
- setHTML: (k) => {
3689
- u.current && u.current.setHTML(k);
3721
+ setHTML: (_) => {
3722
+ u.current && u.current.setHTML(_);
3690
3723
  },
3691
3724
  getHTML: () => u.current?.getHTML() || ""
3692
- })), jt(() => {
3725
+ })), Ht(() => {
3693
3726
  if (m.current && !u.current) {
3694
- u.current = new Ko(), m.current.appendChild(u.current.getElement()), h && (u.current.setHTML(h), g.current = h), x.current = !0;
3695
- const k = u.current.getElement(), S = k.querySelector(
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(
3696
3729
  ".editor"
3697
- ), _ = () => {
3698
- const A = u.current?.getHTML() || "";
3699
- w.current?.(A);
3730
+ ), C = () => {
3731
+ const T = u.current?.getHTML() || "";
3732
+ w.current?.(T);
3700
3733
  };
3701
- S ? (S.addEventListener("input", _), S.addEventListener("paste", _)) : (k.addEventListener("input", _), k.addEventListener("paste", _));
3734
+ M ? (M.addEventListener("input", C), M.addEventListener("paste", C)) : (_.addEventListener("input", C), _.addEventListener("paste", C));
3702
3735
  }
3703
- }, []), jt(() => {
3704
- if (x.current && u.current && h !== void 0 && h !== g.current) {
3705
- const k = u.current.getHTML();
3706
- h !== k && (u.current.setHTML(h), g.current = h);
3736
+ }, []), 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);
3707
3740
  }
3708
3741
  }, [h]), /* @__PURE__ */ ei.jsx("div", { ref: m });
3709
3742
  });