@editora/core 1.0.28 → 1.0.30

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.
@@ -72,16 +72,16 @@ class Co {
72
72
  return this.loadedPlugins.has(t);
73
73
  }
74
74
  }
75
- class Kt {
75
+ class qt {
76
76
  constructor(t, e, o) {
77
77
  this.doc = t, this.selection = e, this.schema = o;
78
78
  }
79
79
  static create(t, e) {
80
80
  const o = e || t.node("doc", {}, [t.node("paragraph")]);
81
- return new Kt(o, { anchor: 0, head: 0 }, t);
81
+ return new qt(o, { anchor: 0, head: 0 }, t);
82
82
  }
83
83
  apply(t, e) {
84
- return new Kt(t, e || this.selection, this.schema);
84
+ return new qt(t, e || this.selection, this.schema);
85
85
  }
86
86
  }
87
87
  class ln {
@@ -233,7 +233,7 @@ class un {
233
233
  constructor(t = {}) {
234
234
  this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new cn(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
235
235
  const e = this.pluginManager.buildSchema();
236
- this.state = Kt.create(e), this.commandRegistry = new dn(this.pluginManager.getCommands());
236
+ this.state = qt.create(e), this.commandRegistry = new dn(this.pluginManager.getCommands());
237
237
  }
238
238
  /**
239
239
  * Execute a command
@@ -407,58 +407,58 @@ class pn {
407
407
  codeBlock: "insertCodeBlock"
408
408
  };
409
409
  return o.forEach((c) => {
410
- const f = [];
410
+ const p = [];
411
411
  c.split(/\s+/).filter(Boolean).forEach((g) => {
412
412
  if (g === "direction") {
413
- const w = r.get("setDirectionLTR"), v = r.get("setDirectionRTL");
414
- w && f.push({
413
+ const E = r.get("setDirectionLTR"), k = r.get("setDirectionRTL");
414
+ E && p.push({
415
415
  id: "directionLTR",
416
- label: w.label,
417
- command: w.command,
418
- icon: w.icon,
419
- type: w.type || "button",
420
- options: w.options
421
- }), v && f.push({
416
+ label: E.label,
417
+ command: E.command,
418
+ icon: E.icon,
419
+ type: E.type || "button",
420
+ options: E.options
421
+ }), k && p.push({
422
422
  id: "directionRTL",
423
- label: v.label,
424
- command: v.command,
425
- icon: v.icon,
426
- type: v.type || "button",
427
- options: v.options
423
+ label: k.label,
424
+ command: k.command,
425
+ icon: k.icon,
426
+ type: k.type || "button",
427
+ options: k.options
428
428
  });
429
429
  return;
430
430
  }
431
431
  if (g === "comments") {
432
- const w = r.get("addComment"), v = r.get("toggleComments");
433
- w && f.push({
432
+ const E = r.get("addComment"), k = r.get("toggleComments");
433
+ E && p.push({
434
434
  id: "addComment",
435
- label: w.label,
436
- command: w.command,
437
- icon: w.icon,
438
- type: w.type || "button",
439
- options: w.options
440
- }), v && f.push({
435
+ label: E.label,
436
+ command: E.command,
437
+ icon: E.icon,
438
+ type: E.type || "button",
439
+ options: E.options
440
+ }), k && p.push({
441
441
  id: "toggleComments",
442
- label: v.label,
443
- command: v.command,
444
- icon: v.icon,
445
- type: v.type || "button",
446
- options: v.options
442
+ label: k.label,
443
+ command: k.command,
444
+ icon: k.icon,
445
+ type: k.type || "button",
446
+ options: k.options
447
447
  });
448
448
  return;
449
449
  }
450
- const T = l[g] || g;
451
- let k = r.get(T);
452
- k || (k = r.get(g)), k && f.push({
450
+ const w = l[g] || g;
451
+ let T = r.get(w);
452
+ T || (T = r.get(g)), T && p.push({
453
453
  id: g,
454
- label: k.label,
455
- command: k.command,
456
- icon: k.icon,
457
- type: k.type === "separator" ? "separator" : k.type || "button",
458
- options: k.options,
459
- items: k.items
454
+ label: T.label,
455
+ command: T.command,
456
+ icon: T.icon,
457
+ type: T.type === "separator" ? "separator" : T.type || "button",
458
+ options: T.options,
459
+ items: T.items
460
460
  });
461
- }), f.length > 0 && e.push(f);
461
+ }), p.length > 0 && e.push(p);
462
462
  }), e;
463
463
  }
464
464
  /**
@@ -477,20 +477,21 @@ class pn {
477
477
  const o = this.config.items || this.getDefaultToolbarString(), i = this.parseToolbarString(o);
478
478
  i.forEach((r, l) => {
479
479
  const c = document.createElement("div");
480
- if (c.className = "editora-toolbar-group", r.forEach((f) => {
481
- this.appendToolbarButton(c, f);
480
+ if (c.className = "editora-toolbar-group", r.forEach((p) => {
481
+ this.appendToolbarButton(c, p);
482
482
  const m = c.lastElementChild;
483
483
  m instanceof HTMLElement && (this.overflowUnits.push(m), this.overflowUnitHomes.set(m, c));
484
484
  }), e.appendChild(c), l < i.length - 1) {
485
- const f = document.createElement("div");
486
- f.className = "editora-toolbar-separator", e.appendChild(f);
485
+ const p = document.createElement("div");
486
+ p.className = "editora-toolbar-separator", e.appendChild(p);
487
487
  }
488
488
  }), t.appendChild(e), this.setupOverflow(t);
489
489
  }
490
490
  /** Measures top-level items in `itemsContainer` and moves whatever doesn't
491
491
  * fit into a collapsible "more options" row, re-measuring on resize. */
492
492
  setupOverflow(t) {
493
- if (!this.itemsContainer || typeof ResizeObserver == "undefined") return;
493
+ const e = this.itemsContainer;
494
+ if (!e || typeof ResizeObserver == "undefined") return;
494
495
  const o = document.createElement("button");
495
496
  o.type = "button", o.className = "editora-toolbar-more-button", o.title = "Show more options", o.setAttribute("aria-label", "More toolbar options"), o.textContent = "☰", o.style.display = "none", o.addEventListener("click", (c) => {
496
497
  c.preventDefault(), this.setExpandedOpen(!this.expandedOpen);
@@ -500,23 +501,25 @@ class pn {
500
501
  const r = () => {
501
502
  const c = this.overflowUnits;
502
503
  if (c.length === 0) return;
503
- c.forEach((O) => {
504
- var N;
505
- O.parentElement === i && ((N = this.overflowUnitHomes.get(O)) == null || N.appendChild(O));
504
+ c.forEach((H) => {
505
+ var D;
506
+ H.parentElement === i && ((D = this.overflowUnitHomes.get(H)) == null || D.appendChild(H));
506
507
  });
507
- const f = t.clientWidth, m = 16, g = 40, T = 4, k = Math.max(0, f - m - g - T);
508
- let w = 0, v = 0;
509
- for (const O of c) {
510
- const N = O.getBoundingClientRect().width + T;
511
- if (w + N <= k)
512
- w += N, v++;
513
- else
514
- break;
515
- }
516
- v = Math.max(1, Math.min(v, c.length));
517
- const Y = v < c.length;
518
- o.style.display = Y ? "" : "none", o.classList.toggle("active", Y && this.expandedOpen), !Y && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((O, N) => {
519
- N >= v && i.appendChild(O);
508
+ const p = t.clientWidth, m = 16, g = 40, w = 4, T = Math.max(0, p - m), E = Math.max(0, T - g - w), k = getComputedStyle(t).direction === "rtl", et = e.getBoundingClientRect(), $ = (H) => {
509
+ const D = H.getBoundingClientRect();
510
+ return k ? et.right - D.left : D.right - et.left;
511
+ };
512
+ let z = 0;
513
+ if ($(c[c.length - 1]) <= T)
514
+ z = c.length;
515
+ else
516
+ for (const H of c)
517
+ if ($(H) <= E) z++;
518
+ else break;
519
+ z = Math.max(1, Math.min(z, c.length));
520
+ const st = z < c.length;
521
+ o.style.display = st ? "" : "none", o.classList.toggle("active", st && this.expandedOpen), !st && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((H, D) => {
522
+ D >= z && i.appendChild(H);
520
523
  });
521
524
  }, l = () => {
522
525
  this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(r);
@@ -611,33 +614,33 @@ class pn {
611
614
  e.setAttribute("aria-expanded", l() ? "true" : "false");
612
615
  });
613
616
  c.observe(o, { attributes: !0, attributeFilter: ["style"] });
614
- const f = t._cleanupDropdown;
617
+ const p = t._cleanupDropdown;
615
618
  t._cleanupDropdown = () => {
616
- c.disconnect(), f == null || f();
619
+ c.disconnect(), p == null || p();
617
620
  }, e.addEventListener("click", (m) => {
618
621
  var g;
619
622
  m.detail === 0 && l() && ((g = r()[0]) == null || g.focus());
620
623
  }), e.addEventListener("keydown", (m) => {
621
- var T;
624
+ var w;
622
625
  if (m.key !== "ArrowDown" && m.key !== "ArrowUp") return;
623
626
  m.preventDefault(), l() || e.click();
624
627
  const g = r();
625
- (T = m.key === "ArrowUp" ? g[g.length - 1] : g[0]) == null || T.focus();
628
+ (w = m.key === "ArrowUp" ? g[g.length - 1] : g[0]) == null || w.focus();
626
629
  }), o.addEventListener("keydown", (m) => {
627
630
  const g = r();
628
631
  if (g.length === 0) return;
629
- const T = g.indexOf(document.activeElement), k = (w) => {
630
- m.preventDefault(), g[(w + g.length) % g.length].focus();
632
+ const w = g.indexOf(document.activeElement), T = (E) => {
633
+ m.preventDefault(), g[(E + g.length) % g.length].focus();
631
634
  };
632
635
  switch (m.key) {
633
636
  case "ArrowDown":
634
- return k(T + 1);
637
+ return T(w + 1);
635
638
  case "ArrowUp":
636
- return k(T < 0 ? g.length - 1 : T - 1);
639
+ return T(w < 0 ? g.length - 1 : w - 1);
637
640
  case "Home":
638
- return k(0);
641
+ return T(0);
639
642
  case "End":
640
- return k(g.length - 1);
643
+ return T(g.length - 1);
641
644
  case "Escape":
642
645
  m.preventDefault(), m.stopPropagation(), o.style.display = "none", e.focus();
643
646
  return;
@@ -657,14 +660,14 @@ class pn {
657
660
  o.className = "editora-toolbar-button editora-toolbar-dropdown-trigger", o.type = "button", o.textContent = t.label;
658
661
  const i = document.createElement("div");
659
662
  i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
660
- const f = document.createElement("button");
661
- f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
663
+ const p = document.createElement("button");
664
+ p.className = "editora-toolbar-dropdown-item", p.type = "button", p.textContent = c.label, p.setAttribute("data-value", c.value), p.addEventListener("click", (m) => {
662
665
  m.preventDefault(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
663
- }), i.appendChild(f);
666
+ }), i.appendChild(p);
664
667
  }), o.addEventListener("click", (c) => {
665
668
  c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
666
- const f = i.style.display === "block";
667
- i.style.display = f ? "none" : "block";
669
+ const p = i.style.display === "block";
670
+ i.style.display = p ? "none" : "block";
668
671
  });
669
672
  const r = (c) => {
670
673
  e.contains(c.target) || (i.style.display = "none");
@@ -692,17 +695,17 @@ class pn {
692
695
  o.textContent = t.label;
693
696
  const i = document.createElement("div");
694
697
  i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
695
- const f = document.createElement("button");
696
- f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
698
+ const p = document.createElement("button");
699
+ p.className = "editora-toolbar-dropdown-item", p.type = "button", p.textContent = c.label, p.setAttribute("data-value", c.value), p.addEventListener("click", (m) => {
697
700
  m.preventDefault(), m.stopPropagation(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
698
- }), i.appendChild(f);
701
+ }), i.appendChild(p);
699
702
  }), o.addEventListener("click", (c) => {
700
703
  var m;
701
704
  c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
702
- const f = (m = this.container) == null ? void 0 : m.querySelectorAll(
705
+ const p = (m = this.container) == null ? void 0 : m.querySelectorAll(
703
706
  ".editora-toolbar-dropdown-menu"
704
707
  );
705
- f == null || f.forEach((g) => {
708
+ p == null || p.forEach((g) => {
706
709
  g !== i && (g.style.display = "none");
707
710
  }), i.style.display = i.style.display === "none" ? "block" : "none";
708
711
  });
@@ -826,14 +829,14 @@ class hn {
826
829
  }), o.forEach((r, l) => {
827
830
  const c = document.createElement("span");
828
831
  if (c.className = "editora-statusbar-item", c.textContent = r, t.appendChild(c), l < o.length - 1) {
829
- const f = document.createElement("span");
830
- f.className = "editora-statusbar-separator", f.textContent = "|", t.appendChild(f);
832
+ const p = document.createElement("span");
833
+ p.className = "editora-statusbar-separator", p.textContent = "|", t.appendChild(p);
831
834
  }
832
835
  }), i.forEach((r, l) => {
833
836
  const c = document.createElement("span");
834
837
  if (c.className = "editora-statusbar-item", c.textContent = r, e.appendChild(c), l < i.length - 1) {
835
- const f = document.createElement("span");
836
- f.className = "editora-statusbar-separator", f.textContent = "|", e.appendChild(f);
838
+ const p = document.createElement("span");
839
+ p.className = "editora-statusbar-separator", p.textContent = "|", e.appendChild(p);
837
840
  }
838
841
  }), this.container.appendChild(t), this.container.appendChild(e);
839
842
  }
@@ -886,7 +889,7 @@ function yn(a) {
886
889
  const t = a.trim() ? a.trim().split(/\s+/).length : 0, e = a.length;
887
890
  return { words: t, chars: e };
888
891
  }
889
- function En(a, t) {
892
+ function vn(a, t) {
890
893
  const e = a.toString();
891
894
  return {
892
895
  startLine: t.line,
@@ -898,7 +901,7 @@ function En(a, t) {
898
901
  selectedWords: e.trim().split(/\s+/).filter(Boolean).length
899
902
  };
900
903
  }
901
- class vn {
904
+ class En {
902
905
  constructor(t) {
903
906
  this.shortcuts = /* @__PURE__ */ new Map(), this.enabled = !0, this.isMac = typeof navigator != "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0, (t == null ? void 0 : t.enabled) === !1 && (this.enabled = !1), this.registerDefaultShortcuts(), t != null && t.shortcuts && t.shortcuts.forEach((e) => this.registerShortcut(e)), t != null && t.customShortcuts && Object.values(t.customShortcuts).forEach((e) => {
904
907
  this.registerShortcut(e);
@@ -1244,14 +1247,14 @@ function wn(a) {
1244
1247
  function Tn(a, t) {
1245
1248
  var e = a == null ? null : typeof Symbol != "undefined" && a[Symbol.iterator] || a["@@iterator"];
1246
1249
  if (e != null) {
1247
- var o, i, r, l, c = [], f = !0, m = !1;
1250
+ var o, i, r, l, c = [], p = !0, m = !1;
1248
1251
  try {
1249
- if (r = (e = e.call(a)).next, t !== 0) for (; !(f = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); f = !0) ;
1252
+ if (r = (e = e.call(a)).next, t !== 0) for (; !(p = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); p = !0) ;
1250
1253
  } catch (g) {
1251
1254
  m = !0, i = g;
1252
1255
  } finally {
1253
1256
  try {
1254
- if (!f && e.return != null && (l = e.return(), Object(l) !== l)) return;
1257
+ if (!p && e.return != null && (l = e.return(), Object(l) !== l)) return;
1255
1258
  } finally {
1256
1259
  if (m) throw i;
1257
1260
  }
@@ -1274,38 +1277,38 @@ function An(a, t) {
1274
1277
  }
1275
1278
  }
1276
1279
  const So = Object.entries, ao = Object.setPrototypeOf, Cn = Object.isFrozen, Sn = Object.getPrototypeOf, _n = Object.getOwnPropertyDescriptor;
1277
- let M = Object.freeze, I = Object.seal, gt = Object.create, _o = typeof Reflect != "undefined" && Reflect, we = _o.apply, Te = _o.construct;
1280
+ let M = Object.freeze, I = Object.seal, yt = Object.create, _o = typeof Reflect != "undefined" && Reflect, Te = _o.apply, ke = _o.construct;
1278
1281
  M || (M = function(t) {
1279
1282
  return t;
1280
1283
  });
1281
1284
  I || (I = function(t) {
1282
1285
  return t;
1283
1286
  });
1284
- we || (we = function(t, e) {
1287
+ Te || (Te = function(t, e) {
1285
1288
  for (var o = arguments.length, i = new Array(o > 2 ? o - 2 : 0), r = 2; r < o; r++) i[r - 2] = arguments[r];
1286
1289
  return t.apply(e, i);
1287
1290
  });
1288
- Te || (Te = function(t) {
1291
+ ke || (ke = function(t) {
1289
1292
  for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
1290
1293
  return new t(...o);
1291
1294
  });
1292
- const rt = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), kt = L(Array.prototype.push), Mn = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), fe = L(String.prototype.toString), lo = L(String.prototype.match), xt = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), Dn = L(Number.prototype.toString), On = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), At = L(Object.prototype.toString), D = L(RegExp.prototype.test), Z = Rn(TypeError);
1295
+ const at = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), At = L(Array.prototype.push), Mn = L(Array.prototype.splice), vt = Array.isArray, Mt = L(String.prototype.toLowerCase), he = L(String.prototype.toString), lo = L(String.prototype.match), Ct = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), On = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), P = L(Object.prototype.hasOwnProperty), St = L(Object.prototype.toString), O = L(RegExp.prototype.test), J = Rn(TypeError);
1293
1296
  function L(a) {
1294
1297
  return function(t) {
1295
1298
  t instanceof RegExp && (t.lastIndex = 0);
1296
1299
  for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
1297
- return we(a, t, o);
1300
+ return Te(a, t, o);
1298
1301
  };
1299
1302
  }
1300
1303
  function Rn(a) {
1301
1304
  return function() {
1302
1305
  for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++) e[o] = arguments[o];
1303
- return Te(a, e);
1306
+ return ke(a, e);
1304
1307
  };
1305
1308
  }
1306
- function E(a, t) {
1307
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
1308
- if (ao && ao(a, null), !bt(t)) return a;
1309
+ function v(a, t) {
1310
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Mt;
1311
+ if (ao && ao(a, null), !vt(t)) return a;
1309
1312
  let o = t.length;
1310
1313
  for (; o--; ) {
1311
1314
  let i = t[o];
@@ -1318,15 +1321,15 @@ function E(a, t) {
1318
1321
  return a;
1319
1322
  }
1320
1323
  function Nn(a) {
1321
- for (let t = 0; t < a.length; t++) z(a, t) || (a[t] = null);
1324
+ for (let t = 0; t < a.length; t++) P(a, t) || (a[t] = null);
1322
1325
  return a;
1323
1326
  }
1324
- function F(a) {
1325
- const t = gt(null);
1327
+ function U(a) {
1328
+ const t = yt(null);
1326
1329
  for (const o of So(a)) {
1327
1330
  var e = xn(o, 2);
1328
1331
  const i = e[0], r = e[1];
1329
- z(a, i) && (bt(r) ? t[i] = Nn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = F(r) : t[i] = r);
1332
+ P(a, i) && (vt(r) ? t[i] = Nn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = U(r) : t[i] = r);
1330
1333
  }
1331
1334
  return t;
1332
1335
  }
@@ -1335,30 +1338,30 @@ function Pn(a) {
1335
1338
  case "string":
1336
1339
  return a;
1337
1340
  case "number":
1338
- return Dn(a);
1339
- case "boolean":
1340
1341
  return On(a);
1342
+ case "boolean":
1343
+ return Dn(a);
1341
1344
  case "bigint":
1342
1345
  return uo ? uo(a) : "0";
1343
1346
  case "symbol":
1344
1347
  return po ? po(a) : "Symbol()";
1345
1348
  case "undefined":
1346
- return At(a);
1349
+ return St(a);
1347
1350
  case "function":
1348
1351
  case "object": {
1349
- if (a === null) return At(a);
1350
- const t = a, e = j(t, "toString");
1352
+ if (a === null) return St(a);
1353
+ const t = a, e = W(t, "toString");
1351
1354
  if (typeof e == "function") {
1352
1355
  const o = e(t);
1353
- return typeof o == "string" ? o : At(o);
1356
+ return typeof o == "string" ? o : St(o);
1354
1357
  }
1355
- return At(a);
1358
+ return St(a);
1356
1359
  }
1357
1360
  default:
1358
- return At(a);
1361
+ return St(a);
1359
1362
  }
1360
1363
  }
1361
- function j(a, t) {
1364
+ function W(a, t) {
1362
1365
  for (; a !== null; ) {
1363
1366
  const o = _n(a, t);
1364
1367
  if (o) {
@@ -1374,7 +1377,7 @@ function j(a, t) {
1374
1377
  }
1375
1378
  function zn(a) {
1376
1379
  try {
1377
- return D(a, ""), !0;
1380
+ return O(a, ""), !0;
1378
1381
  } catch (t) {
1379
1382
  return !1;
1380
1383
  }
@@ -1499,7 +1502,7 @@ const fo = M([
1499
1502
  "var",
1500
1503
  "video",
1501
1504
  "wbr"
1502
- ]), he = M([
1505
+ ]), me = M([
1503
1506
  "svg",
1504
1507
  "a",
1505
1508
  "altglyph",
@@ -1547,7 +1550,7 @@ const fo = M([
1547
1550
  "tspan",
1548
1551
  "view",
1549
1552
  "vkern"
1550
- ]), me = M([
1553
+ ]), ge = M([
1551
1554
  "feBlend",
1552
1555
  "feColorMatrix",
1553
1556
  "feComponentTransfer",
@@ -1596,7 +1599,7 @@ const fo = M([
1596
1599
  "solidcolor",
1597
1600
  "unknown",
1598
1601
  "use"
1599
- ]), ge = M([
1602
+ ]), be = M([
1600
1603
  "math",
1601
1604
  "menclose",
1602
1605
  "merror",
@@ -1762,7 +1765,7 @@ const fo = M([
1762
1765
  "width",
1763
1766
  "wrap",
1764
1767
  "xmlns"
1765
- ]), be = M([
1768
+ ]), ye = M([
1766
1769
  "accent-height",
1767
1770
  "accumulate",
1768
1771
  "additive",
@@ -2010,13 +2013,13 @@ const fo = M([
2010
2013
  "voffset",
2011
2014
  "width",
2012
2015
  "xmlns"
2013
- ]), Wt = M([
2016
+ ]), Gt = M([
2014
2017
  "xlink:href",
2015
2018
  "xml:id",
2016
2019
  "xlink:title",
2017
2020
  "xml:space",
2018
2021
  "xmlns:xlink"
2019
- ]), Fn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yn = I(/^html$/i), qn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), Eo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), B = {
2022
+ ]), Fn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yn = I(/^html$/i), qn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), vo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), F = {
2020
2023
  element: 1,
2021
2024
  attribute: 2,
2022
2025
  text: 3,
@@ -2038,9 +2041,9 @@ const fo = M([
2038
2041
  "noframes",
2039
2042
  "plaintext",
2040
2043
  "noscript"
2041
- ], Zn = M(E({}, Lo)), Jn = (function() {
2044
+ ], Zn = M(v({}, Lo)), Jn = (function() {
2042
2045
  const a = {};
2043
- return rt(Lo, (t) => {
2046
+ return at(Lo, (t) => {
2044
2047
  a[t] = I(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
2045
2048
  }), M(a);
2046
2049
  })(), Qn = function() {
@@ -2063,7 +2066,7 @@ const fo = M([
2063
2066
  } catch (l) {
2064
2067
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
2065
2068
  }
2066
- }, vo = function() {
2069
+ }, Eo = function() {
2067
2070
  return {
2068
2071
  afterSanitizeAttributes: [],
2069
2072
  afterSanitizeElements: [],
@@ -2075,70 +2078,70 @@ const fo = M([
2075
2078
  uponSanitizeElement: [],
2076
2079
  uponSanitizeShadowNode: []
2077
2080
  };
2078
- }, J = function(t, e, o, i) {
2079
- return z(t, e) && bt(t[e]) ? E(i.base ? F(i.base) : {}, t[e], i.transform) : o;
2080
- }, ye = function(t, e, o) {
2081
- const i = z(t, e) ? t[e] : void 0;
2082
- return i && typeof i == "object" ? F(i) : o();
2081
+ }, Q = function(t, e, o, i) {
2082
+ return P(t, e) && vt(t[e]) ? v(i.base ? U(i.base) : {}, t[e], i.transform) : o;
2083
+ }, ve = function(t, e, o) {
2084
+ const i = P(t, e) ? t[e] : void 0;
2085
+ return i && typeof i == "object" ? U(i) : o();
2083
2086
  };
2084
2087
  function Mo() {
2085
2088
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qn();
2086
2089
  const t = (u) => Mo(u);
2087
- if (t.version = "3.4.16", t.removed = [], !a || !a.document || a.document.nodeType !== B.document || !a.Element)
2090
+ if (t.version = "3.4.16", t.removed = [], !a || !a.document || a.document.nodeType !== F.document || !a.Element)
2088
2091
  return t.isSupported = !1, t;
2089
2092
  let e = a.document;
2090
2093
  const o = e, i = o.currentScript;
2091
2094
  a.DocumentFragment;
2092
- const r = a.HTMLTemplateElement, l = a.Node, c = a.Element, f = a.NodeFilter;
2095
+ const r = a.HTMLTemplateElement, l = a.Node, c = a.Element, p = a.NodeFilter;
2093
2096
  a.NamedNodeMap === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
2094
- const m = a.DOMParser, g = a.trustedTypes, T = c.prototype, k = j(T, "cloneNode"), w = j(T, "remove"), v = j(T, "removeAttributeNode"), Y = j(T, "nextSibling"), O = j(T, "childNodes"), N = j(T, "parentNode"), Ce = j(T, "shadowRoot"), qt = j(T, "attributes"), tt = l && l.prototype ? j(l.prototype, "nodeType") : null, at = l && l.prototype ? j(l.prototype, "nodeName") : null, Lt = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(n) {
2095
- return tt ? tt(n) : n.nodeType;
2096
- }, Vt = function(n) {
2097
- return at ? at(n) : n.nodeName;
2097
+ const m = a.DOMParser, g = a.trustedTypes, w = c.prototype, T = W(w, "cloneNode"), E = W(w, "remove"), k = W(w, "removeAttributeNode"), et = W(w, "nextSibling"), $ = W(w, "childNodes"), z = W(w, "parentNode"), st = W(w, "shadowRoot"), H = W(w, "attributes"), D = l && l.prototype ? W(l.prototype, "nodeType") : null, lt = l && l.prototype ? W(l.prototype, "nodeName") : null, It = l && l.prototype ? W(l.prototype, "ownerDocument") : null, Et = function(n) {
2098
+ return D ? D(n) : n.nodeType;
2099
+ }, Xt = function(n) {
2100
+ return lt ? lt(n) : n.nodeName;
2098
2101
  };
2099
2102
  if (typeof r == "function") {
2100
2103
  const u = e.createElement("template");
2101
2104
  u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
2102
2105
  }
2103
- let P, et = "", Xt, Se = !1, Et = 0;
2106
+ let N, ot = "", Zt, Se = !1, wt = 0;
2104
2107
  const _e = function() {
2105
- if (Et > 0) throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
2106
- }, st = function(n) {
2107
- _e(), Et++;
2108
+ if (wt > 0) throw J('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
2109
+ }, ct = function(n) {
2110
+ _e(), wt++;
2108
2111
  try {
2109
- return P.createHTML(n);
2112
+ return N.createHTML(n);
2110
2113
  } finally {
2111
- Et--;
2114
+ wt--;
2112
2115
  }
2113
- }, Oo = function(n) {
2114
- _e(), Et++;
2116
+ }, Do = function(n) {
2117
+ _e(), wt++;
2115
2118
  try {
2116
- return P.createScriptURL(n);
2119
+ return N.createScriptURL(n);
2117
2120
  } finally {
2118
- Et--;
2121
+ wt--;
2119
2122
  }
2120
2123
  }, Ro = function() {
2121
- return Se || (Xt = ti(g, i), Se = !0), Xt;
2122
- }, Mt = e, Zt = Mt.implementation, Le = Mt.createNodeIterator, No = Mt.createDocumentFragment, Po = Mt.getElementsByTagName, zo = o.importNode;
2123
- let x = vo();
2124
- t.isSupported = typeof So == "function" && typeof N == "function" && Zt && Zt.createHTMLDocument !== void 0;
2124
+ return Se || (Zt = ti(g, i), Se = !0), Zt;
2125
+ }, Ot = e, Jt = Ot.implementation, Le = Ot.createNodeIterator, No = Ot.createDocumentFragment, Po = Ot.getElementsByTagName, zo = o.importNode;
2126
+ let x = Eo();
2127
+ t.isSupported = typeof So == "function" && typeof z == "function" && Jt && Jt.createHTMLDocument !== void 0;
2125
2128
  const Ho = Fn, Bo = Un, Fo = jn, Uo = Wn, jo = $n, Wo = Gn, Me = Kn, $o = qn;
2126
2129
  let Ie = bo, A = null;
2127
- const Jt = E({}, [
2130
+ const Qt = v({}, [
2128
2131
  ...fo,
2129
- ...he,
2130
2132
  ...me,
2131
2133
  ...ge,
2134
+ ...be,
2132
2135
  ...ho
2133
2136
  ]);
2134
2137
  let C = null;
2135
- const Qt = E({}, [
2138
+ const te = v({}, [
2136
2139
  ...mo,
2137
- ...be,
2140
+ ...ye,
2138
2141
  ...go,
2139
- ...Wt
2142
+ ...Gt
2140
2143
  ]);
2141
- let W = Object.seal(gt(null, {
2144
+ let G = Object.seal(yt(null, {
2142
2145
  tagNameCheck: {
2143
2146
  writable: !0,
2144
2147
  configurable: !1,
@@ -2157,8 +2160,8 @@ function Mo() {
2157
2160
  enumerable: !0,
2158
2161
  value: !1
2159
2162
  }
2160
- })), vt = null, De = null;
2161
- const q = Object.seal(gt(null, {
2163
+ })), Tt = null, Oe = null;
2164
+ const V = Object.seal(yt(null, {
2162
2165
  tagCheck: {
2163
2166
  writable: !0,
2164
2167
  configurable: !1,
@@ -2172,10 +2175,10 @@ function Mo() {
2172
2175
  value: null
2173
2176
  }
2174
2177
  }));
2175
- let Oe = !0, te = !0, Re = !1, Ne = !0, V = !1, ot = !0, nt = !1, ee = !1, It = null, Dt = null, oe = !1, lt = !1, Ot = !1, Rt = !1, Pe = !0, ze = !1;
2178
+ let De = !0, ee = !0, Re = !1, Ne = !0, X = !1, nt = !0, it = !1, oe = !1, Dt = null, Rt = null, ne = !1, dt = !1, Nt = !1, Pt = !1, Pe = !0, ze = !1;
2176
2179
  const He = "user-content-";
2177
- let ne = !0, ie = !1, ct = {}, dt = null;
2178
- const Be = E({}, [
2180
+ let ie = !0, re = !1, ut = {}, pt = null;
2181
+ const Be = v({}, [
2179
2182
  "annotation-xml",
2180
2183
  "audio",
2181
2184
  "colgroup",
@@ -2204,7 +2207,7 @@ function Mo() {
2204
2207
  "xmp"
2205
2208
  ]);
2206
2209
  let Fe = null;
2207
- const Ue = E({}, [
2210
+ const Ue = v({}, [
2208
2211
  "audio",
2209
2212
  "video",
2210
2213
  "img",
@@ -2213,7 +2216,7 @@ function Mo() {
2213
2216
  "track"
2214
2217
  ]);
2215
2218
  let je = null;
2216
- const We = E({}, [
2219
+ const We = v({}, [
2217
2220
  "alt",
2218
2221
  "class",
2219
2222
  "for",
@@ -2228,294 +2231,294 @@ function Mo() {
2228
2231
  "value",
2229
2232
  "style",
2230
2233
  "xmlns"
2231
- ]), Nt = "http://www.w3.org/1998/Math/MathML", Pt = "http://www.w3.org/2000/svg", $ = "http://www.w3.org/1999/xhtml";
2232
- let ut = $, re = !1, ae = null;
2233
- const Go = E({}, [
2234
- Nt,
2235
- Pt,
2236
- $
2237
- ], fe), $e = M([
2234
+ ]), zt = "http://www.w3.org/1998/Math/MathML", Ht = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml";
2235
+ let ft = K, ae = !1, se = null;
2236
+ const Go = v({}, [
2237
+ zt,
2238
+ Ht,
2239
+ K
2240
+ ], he), $e = M([
2238
2241
  "mi",
2239
2242
  "mo",
2240
2243
  "mn",
2241
2244
  "ms",
2242
2245
  "mtext"
2243
2246
  ]);
2244
- let se = E({}, $e);
2247
+ let le = v({}, $e);
2245
2248
  const Ge = M(["annotation-xml"]);
2246
- let le = E({}, Ge);
2247
- const Ko = E({}, [
2249
+ let ce = v({}, Ge);
2250
+ const Ko = v({}, [
2248
2251
  "title",
2249
2252
  "style",
2250
2253
  "font",
2251
2254
  "a",
2252
2255
  "script"
2253
2256
  ]);
2254
- let wt = null;
2257
+ let kt = null;
2255
2258
  const Yo = ["application/xhtml+xml", "text/html"], qo = "text/html";
2256
- let _ = null, pt = null;
2259
+ let _ = null, ht = null;
2257
2260
  const Vo = e.createElement("form"), Ke = function(n) {
2258
2261
  return n instanceof RegExp || n instanceof Function;
2259
- }, ce = function() {
2262
+ }, de = function() {
2260
2263
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2261
- if (pt && pt === n) return;
2262
- (!n || typeof n != "object") && (n = {}), n = F(n), wt = Yo.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? qo : n.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? fe : _t, A = J(n, "ALLOWED_TAGS", Jt, { transform: _ }), C = J(n, "ALLOWED_ATTR", Qt, { transform: _ }), ae = J(n, "ALLOWED_NAMESPACES", Go, { transform: fe }), je = J(n, "ADD_URI_SAFE_ATTR", We, {
2264
+ if (ht && ht === n) return;
2265
+ (!n || typeof n != "object") && (n = {}), n = U(n), kt = Yo.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? qo : n.PARSER_MEDIA_TYPE, _ = kt === "application/xhtml+xml" ? he : Mt, A = Q(n, "ALLOWED_TAGS", Qt, { transform: _ }), C = Q(n, "ALLOWED_ATTR", te, { transform: _ }), se = Q(n, "ALLOWED_NAMESPACES", Go, { transform: he }), je = Q(n, "ADD_URI_SAFE_ATTR", We, {
2263
2266
  transform: _,
2264
2267
  base: We
2265
- }), Fe = J(n, "ADD_DATA_URI_TAGS", Ue, {
2268
+ }), Fe = Q(n, "ADD_DATA_URI_TAGS", Ue, {
2266
2269
  transform: _,
2267
2270
  base: Ue
2268
- }), dt = J(n, "FORBID_CONTENTS", Be, { transform: _ }), vt = J(n, "FORBID_TAGS", F({}), { transform: _ }), De = J(n, "FORBID_ATTR", F({}), { transform: _ }), ct = z(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? F(n.USE_PROFILES) : n.USE_PROFILES : !1, Oe = n.ALLOW_ARIA_ATTR !== !1, te = n.ALLOW_DATA_ATTR !== !1, Re = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = n.SAFE_FOR_TEMPLATES || !1, ot = n.SAFE_FOR_XML !== !1, nt = n.WHOLE_DOCUMENT || !1, lt = n.RETURN_DOM || !1, Ot = n.RETURN_DOM_FRAGMENT || !1, Rt = n.RETURN_TRUSTED_TYPE || !1, oe = n.FORCE_BODY || !1, Pe = n.SANITIZE_DOM !== !1, ze = n.SANITIZE_NAMED_PROPS || !1, ne = n.KEEP_CONTENT !== !1, ie = n.IN_PLACE || !1, Ie = zn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : bo, ut = typeof n.NAMESPACE == "string" ? n.NAMESPACE : $, se = ye(n, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, $e)), le = ye(n, "HTML_INTEGRATION_POINTS", () => E({}, Ge));
2269
- const s = ye(n, "CUSTOM_ELEMENT_HANDLING", () => gt(null));
2270
- if (W = gt(null), z(s, "tagNameCheck") && Ke(s.tagNameCheck) && (W.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (W.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(W), V && (te = !1), Ot && (lt = !0), ct && (A = E({}, ho), C = gt(null), ct.html === !0 && (E(A, fo), E(C, mo)), ct.svg === !0 && (E(A, he), E(C, be), E(C, Wt)), ct.svgFilters === !0 && (E(A, me), E(C, be), E(C, Wt)), ct.mathMl === !0 && (E(A, ge), E(C, go), E(C, Wt))), q.tagCheck = null, q.attributeCheck = null, z(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? q.tagCheck = n.ADD_TAGS : bt(n.ADD_TAGS) && (A === Jt && (A = F(A)), E(A, n.ADD_TAGS, _))), z(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? q.attributeCheck = n.ADD_ATTR : bt(n.ADD_ATTR) && (C === Qt && (C = F(C)), E(C, n.ADD_ATTR, _))), z(n, "ADD_FORBID_CONTENTS") && bt(n.ADD_FORBID_CONTENTS) && (dt === Be && (dt = F(dt)), E(dt, n.ADD_FORBID_CONTENTS, _)), ne && (A["#text"] = !0), nt && E(A, [
2271
+ }), pt = Q(n, "FORBID_CONTENTS", Be, { transform: _ }), Tt = Q(n, "FORBID_TAGS", U({}), { transform: _ }), Oe = Q(n, "FORBID_ATTR", U({}), { transform: _ }), ut = P(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? U(n.USE_PROFILES) : n.USE_PROFILES : !1, De = n.ALLOW_ARIA_ATTR !== !1, ee = n.ALLOW_DATA_ATTR !== !1, Re = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = n.SAFE_FOR_TEMPLATES || !1, nt = n.SAFE_FOR_XML !== !1, it = n.WHOLE_DOCUMENT || !1, dt = n.RETURN_DOM || !1, Nt = n.RETURN_DOM_FRAGMENT || !1, Pt = n.RETURN_TRUSTED_TYPE || !1, ne = n.FORCE_BODY || !1, Pe = n.SANITIZE_DOM !== !1, ze = n.SANITIZE_NAMED_PROPS || !1, ie = n.KEEP_CONTENT !== !1, re = n.IN_PLACE || !1, Ie = zn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : bo, ft = typeof n.NAMESPACE == "string" ? n.NAMESPACE : K, le = ve(n, "MATHML_TEXT_INTEGRATION_POINTS", () => v({}, $e)), ce = ve(n, "HTML_INTEGRATION_POINTS", () => v({}, Ge));
2272
+ const s = ve(n, "CUSTOM_ELEMENT_HANDLING", () => yt(null));
2273
+ if (G = yt(null), P(s, "tagNameCheck") && Ke(s.tagNameCheck) && (G.tagNameCheck = s.tagNameCheck), P(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (G.attributeNameCheck = s.attributeNameCheck), P(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(G), X && (ee = !1), Nt && (dt = !0), ut && (A = v({}, ho), C = yt(null), ut.html === !0 && (v(A, fo), v(C, mo)), ut.svg === !0 && (v(A, me), v(C, ye), v(C, Gt)), ut.svgFilters === !0 && (v(A, ge), v(C, ye), v(C, Gt)), ut.mathMl === !0 && (v(A, be), v(C, go), v(C, Gt))), V.tagCheck = null, V.attributeCheck = null, P(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? V.tagCheck = n.ADD_TAGS : vt(n.ADD_TAGS) && (A === Qt && (A = U(A)), v(A, n.ADD_TAGS, _))), P(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? V.attributeCheck = n.ADD_ATTR : vt(n.ADD_ATTR) && (C === te && (C = U(C)), v(C, n.ADD_ATTR, _))), P(n, "ADD_FORBID_CONTENTS") && vt(n.ADD_FORBID_CONTENTS) && (pt === Be && (pt = U(pt)), v(pt, n.ADD_FORBID_CONTENTS, _)), ie && (A["#text"] = !0), it && v(A, [
2271
2274
  "html",
2272
2275
  "head",
2273
2276
  "body"
2274
- ]), A.table && (E(A, ["tbody"]), delete vt.tbody), n.TRUSTED_TYPES_POLICY) {
2275
- if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2276
- if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2277
- const d = P;
2278
- P = n.TRUSTED_TYPES_POLICY;
2277
+ ]), A.table && (v(A, ["tbody"]), delete Tt.tbody), n.TRUSTED_TYPES_POLICY) {
2278
+ if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2279
+ if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2280
+ const d = N;
2281
+ N = n.TRUSTED_TYPES_POLICY;
2279
2282
  try {
2280
- et = st("");
2281
- } catch (p) {
2282
- throw P = d, p;
2283
+ ot = ct("");
2284
+ } catch (f) {
2285
+ throw N = d, f;
2283
2286
  }
2284
- } else n.TRUSTED_TYPES_POLICY === null ? (P = void 0, et = "") : (P === void 0 && (P = Ro()), P && typeof et == "string" && (et = st("")));
2285
- M && M(n), pt = n;
2286
- }, Ye = E({}, [
2287
- ...he,
2287
+ } else n.TRUSTED_TYPES_POLICY === null ? (N = void 0, ot = "") : (N === void 0 && (N = Ro()), N && typeof ot == "string" && (ot = ct("")));
2288
+ M && M(n), ht = n;
2289
+ }, Ye = v({}, [
2288
2290
  ...me,
2291
+ ...ge,
2289
2292
  ...Hn
2290
- ]), qe = E({}, [...ge, ...Bn]), Xo = function(n, s, d) {
2291
- return s.namespaceURI === $ ? n === "svg" : s.namespaceURI === Nt ? n === "svg" && (d === "annotation-xml" || se[d]) : !!Ye[n];
2293
+ ]), qe = v({}, [...be, ...Bn]), Xo = function(n, s, d) {
2294
+ return s.namespaceURI === K ? n === "svg" : s.namespaceURI === zt ? n === "svg" && (d === "annotation-xml" || le[d]) : !!Ye[n];
2292
2295
  }, Zo = function(n, s, d) {
2293
- return s.namespaceURI === $ ? n === "math" : s.namespaceURI === Pt ? n === "math" && le[d] : !!qe[n];
2296
+ return s.namespaceURI === K ? n === "math" : s.namespaceURI === Ht ? n === "math" && ce[d] : !!qe[n];
2294
2297
  }, Jo = function(n, s, d) {
2295
- return s.namespaceURI === Pt && !le[d] || s.namespaceURI === Nt && !se[d] ? !1 : !qe[n] && (Ko[n] || !Ye[n]);
2298
+ return s.namespaceURI === Ht && !ce[d] || s.namespaceURI === zt && !le[d] ? !1 : !qe[n] && (Ko[n] || !Ye[n]);
2296
2299
  }, Qo = function(n) {
2297
- let s = N(n);
2300
+ let s = z(n);
2298
2301
  (!s || !s.tagName) && (s = {
2299
- namespaceURI: ut,
2302
+ namespaceURI: ft,
2300
2303
  tagName: "template"
2301
2304
  });
2302
- const d = _t(n.tagName), p = _t(s.tagName);
2303
- return ae[n.namespaceURI] ? n.namespaceURI === Pt ? Xo(d, s, p) : n.namespaceURI === Nt ? Zo(d, s, p) : n.namespaceURI === $ ? Jo(d, s, p) : !!(wt === "application/xhtml+xml" && ae[n.namespaceURI]) : !1;
2304
- }, X = function(n) {
2305
- kt(t.removed, { element: n });
2305
+ const d = Mt(n.tagName), f = Mt(s.tagName);
2306
+ return se[n.namespaceURI] ? n.namespaceURI === Ht ? Xo(d, s, f) : n.namespaceURI === zt ? Zo(d, s, f) : n.namespaceURI === K ? Jo(d, s, f) : !!(kt === "application/xhtml+xml" && se[n.namespaceURI]) : !1;
2307
+ }, Z = function(n) {
2308
+ At(t.removed, { element: n });
2306
2309
  try {
2307
- N(n).removeChild(n);
2310
+ z(n).removeChild(n);
2308
2311
  } catch (s) {
2309
- if (w(n), !N(n)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2312
+ if (E(n), !z(n)) throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2310
2313
  }
2311
2314
  }, Ve = function(n, s, d) {
2312
2315
  try {
2313
- v(n, s);
2314
- } catch (p) {
2316
+ k(n, s);
2317
+ } catch (f) {
2315
2318
  try {
2316
2319
  n.removeAttribute(d);
2317
2320
  } catch (h) {
2318
2321
  }
2319
2322
  }
2320
- }, zt = function(n) {
2321
- Ht(n);
2322
- const s = O(n);
2323
+ }, Bt = function(n) {
2324
+ Ft(n);
2325
+ const s = $(n);
2323
2326
  if (s) {
2324
- const p = [];
2325
- rt(s, (h) => {
2326
- kt(p, h);
2327
- }), rt(p, (h) => {
2327
+ const f = [];
2328
+ at(s, (h) => {
2329
+ At(f, h);
2330
+ }), at(f, (h) => {
2328
2331
  try {
2329
- w(h);
2332
+ E(h);
2330
2333
  } catch (b) {
2331
2334
  }
2332
2335
  });
2333
2336
  }
2334
- const d = qt(n);
2335
- if (d) for (let p = d.length - 1; p >= 0; --p) {
2336
- const h = d[p], b = h && h.name;
2337
+ const d = H(n);
2338
+ if (d) for (let f = d.length - 1; f >= 0; --f) {
2339
+ const h = d[f], b = h && h.name;
2337
2340
  typeof b == "string" && Ve(n, h, b);
2338
2341
  }
2339
- }, it = function(n, s, d) {
2342
+ }, rt = function(n, s, d) {
2340
2343
  if (!d) try {
2341
2344
  d = s.getAttributeNode(n);
2342
- } catch (p) {
2345
+ } catch (f) {
2343
2346
  d = null;
2344
2347
  }
2345
- kt(t.removed, {
2348
+ At(t.removed, {
2346
2349
  attribute: d || null,
2347
2350
  from: s
2348
2351
  });
2349
2352
  try {
2350
- d ? v(s, d) : s.removeAttribute(n);
2351
- } catch (p) {
2353
+ d ? k(s, d) : s.removeAttribute(n);
2354
+ } catch (f) {
2352
2355
  try {
2353
2356
  s.removeAttribute(n);
2354
2357
  } catch (h) {
2355
2358
  }
2356
2359
  }
2357
2360
  if (n === "is")
2358
- if (lt || Ot) try {
2359
- X(s);
2360
- } catch (p) {
2361
+ if (dt || Nt) try {
2362
+ Z(s);
2363
+ } catch (f) {
2361
2364
  }
2362
2365
  else try {
2363
2366
  s.setAttribute(n, "");
2364
- } catch (p) {
2367
+ } catch (f) {
2365
2368
  }
2366
2369
  }, tn = function(n) {
2367
- const s = qt(n);
2370
+ const s = H(n);
2368
2371
  if (s)
2369
2372
  for (let d = s.length - 1; d >= 0; --d) {
2370
- const p = s[d], h = p && p.name;
2371
- typeof h != "string" || C[_(h)] || Ve(n, p, h);
2373
+ const f = s[d], h = f && f.name;
2374
+ typeof h != "string" || C[_(h)] || Ve(n, f, h);
2372
2375
  }
2373
- }, Ht = function(n) {
2376
+ }, Ft = function(n) {
2374
2377
  const s = [n];
2375
2378
  for (; s.length > 0; ) {
2376
2379
  const d = s.pop();
2377
- yt(d) === B.element && tn(d);
2378
- const p = O(d);
2379
- if (p) for (let h = p.length - 1; h >= 0; --h) s.push(p[h]);
2380
+ Et(d) === F.element && tn(d);
2381
+ const f = $(d);
2382
+ if (f) for (let h = f.length - 1; h >= 0; --h) s.push(f[h]);
2380
2383
  }
2381
2384
  }, Xe = function(n, s) {
2382
- return ot ? n === "patchsrc" ? !0 : n === "for" && s !== "label" && s !== "output" : !1;
2385
+ return nt ? n === "patchsrc" ? !0 : n === "for" && s !== "label" && s !== "output" : !1;
2383
2386
  }, en = function(n) {
2384
- if (!ot) return;
2387
+ if (!nt) return;
2385
2388
  const s = [n];
2386
2389
  for (; s.length > 0; ) {
2387
- const d = s.pop(), p = yt(d);
2388
- if (p === B.processingInstruction || p === B.comment && D(Eo, d.data)) {
2390
+ const d = s.pop(), f = Et(d);
2391
+ if (f === F.processingInstruction || f === F.comment && O(vo, d.data)) {
2389
2392
  try {
2390
- w(d);
2393
+ E(d);
2391
2394
  } catch (b) {
2392
2395
  }
2393
2396
  continue;
2394
2397
  }
2395
- if (p === B.element) {
2396
- const b = d, y = _(Vt(d));
2398
+ if (f === F.element) {
2399
+ const b = d, y = _(Xt(d));
2397
2400
  try {
2398
2401
  b.hasAttribute && b.hasAttribute("patchsrc") && b.removeAttribute("patchsrc"), b.hasAttribute && b.hasAttribute("for") && Xe("for", y) && b.removeAttribute("for");
2399
2402
  } catch (S) {
2400
2403
  }
2401
2404
  }
2402
- const h = O(d);
2405
+ const h = $(d);
2403
2406
  if (h) for (let b = h.length - 1; b >= 0; --b) s.push(h[b]);
2404
2407
  }
2405
2408
  }, Ze = function(n) {
2406
2409
  let s = null, d = null;
2407
- if (oe) n = "<remove></remove>" + n;
2410
+ if (ne) n = "<remove></remove>" + n;
2408
2411
  else {
2409
2412
  const b = lo(n, /^[\r\n\t ]+/);
2410
2413
  d = b && b[0];
2411
2414
  }
2412
- wt === "application/xhtml+xml" && ut === $ && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
2413
- const p = P ? st(n) : n;
2414
- if (ut === $) try {
2415
- s = new m().parseFromString(p, wt);
2415
+ kt === "application/xhtml+xml" && ft === K && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
2416
+ const f = N ? ct(n) : n;
2417
+ if (ft === K) try {
2418
+ s = new m().parseFromString(f, kt);
2416
2419
  } catch (b) {
2417
2420
  }
2418
2421
  if (!s || !s.documentElement) {
2419
- s = Zt.createDocument(ut, "template", null);
2422
+ s = Jt.createDocument(ft, "template", null);
2420
2423
  try {
2421
- s.documentElement.innerHTML = re ? et : p;
2424
+ s.documentElement.innerHTML = ae ? ot : f;
2422
2425
  } catch (b) {
2423
2426
  }
2424
2427
  }
2425
2428
  const h = s.body || s.documentElement;
2426
- return n && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ut === $ ? Po.call(s, nt ? "html" : "body")[0] : nt ? s.documentElement : h;
2429
+ return n && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ft === K ? Po.call(s, it ? "html" : "body")[0] : it ? s.documentElement : h;
2427
2430
  }, Je = function(n) {
2428
- const s = Lt ? Lt(n) : n.ownerDocument;
2429
- return Le.call(s || n, n, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
2430
- }, Bt = function(n) {
2431
- return n = xt(n, Ho, " "), n = xt(n, Bo, " "), n = xt(n, Fo, " "), n;
2432
- }, de = function(n) {
2431
+ const s = It ? It(n) : n.ownerDocument;
2432
+ return Le.call(s || n, n, p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION, null);
2433
+ }, Ut = function(n) {
2434
+ return n = Ct(n, Ho, " "), n = Ct(n, Bo, " "), n = Ct(n, Fo, " "), n;
2435
+ }, ue = function(n) {
2433
2436
  var s;
2434
2437
  n.normalize();
2435
- const d = Lt ? Lt(n) : n.ownerDocument, p = Le.call(d || n, n, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
2436
- let h = p.nextNode();
2438
+ const d = It ? It(n) : n.ownerDocument, f = Le.call(d || n, n, p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION, null);
2439
+ let h = f.nextNode();
2437
2440
  for (; h; )
2438
- h.data = Bt(h.data), h = p.nextNode();
2441
+ h.data = Ut(h.data), h = f.nextNode();
2439
2442
  const b = (s = n.querySelectorAll) === null || s === void 0 ? void 0 : s.call(n, "template");
2440
- b && rt(b, (y) => {
2441
- ft(y.content) && de(y.content);
2443
+ b && at(b, (y) => {
2444
+ mt(y.content) && ue(y.content);
2442
2445
  });
2443
- }, Ft = function(n) {
2444
- const s = at ? at(n) : null;
2445
- return typeof s != "string" || _(s) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || n.attributes !== qt(n) || typeof n.removeAttribute != "function" || typeof n.removeAttributeNode != "function" || typeof n.getAttributeNode != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || n.nodeType !== tt(n) || n.childNodes !== O(n);
2446
- }, ft = function(n) {
2447
- if (!tt || typeof n != "object" || n === null) return !1;
2446
+ }, jt = function(n) {
2447
+ const s = lt ? lt(n) : null;
2448
+ return typeof s != "string" || _(s) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || n.attributes !== H(n) || typeof n.removeAttribute != "function" || typeof n.removeAttributeNode != "function" || typeof n.getAttributeNode != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || n.nodeType !== D(n) || n.childNodes !== $(n);
2449
+ }, mt = function(n) {
2450
+ if (!D || typeof n != "object" || n === null) return !1;
2448
2451
  try {
2449
- return tt(n) === B.documentFragment;
2452
+ return D(n) === F.documentFragment;
2450
2453
  } catch (s) {
2451
2454
  return !1;
2452
2455
  }
2453
- }, Tt = function(n) {
2454
- if (!tt || typeof n != "object" || n === null) return !1;
2456
+ }, xt = function(n) {
2457
+ if (!D || typeof n != "object" || n === null) return !1;
2455
2458
  try {
2456
- return typeof tt(n) == "number";
2459
+ return typeof D(n) == "number";
2457
2460
  } catch (s) {
2458
2461
  return !1;
2459
2462
  }
2460
2463
  };
2461
- function G(u, n, s) {
2462
- u.length !== 0 && rt(u, (d) => {
2463
- d.call(t, n, s, pt);
2464
+ function Y(u, n, s) {
2465
+ u.length !== 0 && at(u, (d) => {
2466
+ d.call(t, n, s, ht);
2464
2467
  });
2465
2468
  }
2466
2469
  const on = function(n, s) {
2467
- return !!(ot && n.hasChildNodes() && !Tt(n.firstElementChild) && D(yo, n.textContent) && D(yo, n.innerHTML) || ot && n.namespaceURI === $ && Zn[s] && (Tt(n.firstElementChild) || typeof n.textContent == "string" && D(Jn[s], n.textContent)) || n.nodeType === B.processingInstruction || ot && n.nodeType === B.comment && D(Eo, n.data));
2468
- }, Ut = function(n, s) {
2469
- if (n instanceof RegExp) return D(n, s);
2470
+ return !!(nt && n.hasChildNodes() && !xt(n.firstElementChild) && O(yo, n.textContent) && O(yo, n.innerHTML) || nt && n.namespaceURI === K && Zn[s] && (xt(n.firstElementChild) || typeof n.textContent == "string" && O(Jn[s], n.textContent)) || n.nodeType === F.processingInstruction || nt && n.nodeType === F.comment && O(vo, n.data));
2471
+ }, Wt = function(n, s) {
2472
+ if (n instanceof RegExp) return O(n, s);
2470
2473
  if (n instanceof Function) {
2471
- for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) p[h - 2] = arguments[h];
2472
- return !!n(s, ...p);
2474
+ for (var d = arguments.length, f = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) f[h - 2] = arguments[h];
2475
+ return !!n(s, ...f);
2473
2476
  }
2474
2477
  return !1;
2475
2478
  }, nn = function(n, s, d) {
2476
- if (!vt[s] && oo(s) && Ut(W.tagNameCheck, s)) return !1;
2477
- if (ne && !dt[s]) {
2478
- const p = N(n), h = O(n);
2479
- if (h && p) {
2479
+ if (!Tt[s] && oo(s) && Wt(G.tagNameCheck, s)) return !1;
2480
+ if (ie && !pt[s]) {
2481
+ const f = z(n), h = $(n);
2482
+ if (h && f) {
2480
2483
  const b = h.length;
2481
2484
  for (let y = b - 1; y >= 0; --y) {
2482
- const S = n === d ? k(h[y], !0) : h[y];
2483
- p.insertBefore(S, Y(n));
2485
+ const S = n === d ? T(h[y], !0) : h[y];
2486
+ f.insertBefore(S, et(n));
2484
2487
  }
2485
2488
  }
2486
2489
  }
2487
- return X(n), !0;
2488
- }, Qe = function(n, s, d, p) {
2489
- return n.length === 0 ? s : s === d || s === p ? F(s) : s;
2490
- }, ht = function(n, s) {
2491
- return n === s || N(n) !== null ? !1 : (ie && Ht(n), !0);
2490
+ return Z(n), !0;
2491
+ }, Qe = function(n, s, d, f) {
2492
+ return n.length === 0 ? s : s === d || s === f ? U(s) : s;
2493
+ }, gt = function(n, s) {
2494
+ return n === s || z(n) !== null ? !1 : (re && Ft(n), !0);
2492
2495
  }, to = function(n, s) {
2493
- if (G(x.beforeSanitizeElements, n, null), ht(n, s)) return !0;
2494
- if (Ft(n))
2495
- return X(n), !0;
2496
- const d = _(Vt(n));
2497
- if (A = Qe(x.uponSanitizeElement, A, Jt, It), G(x.uponSanitizeElement, n, {
2496
+ if (Y(x.beforeSanitizeElements, n, null), gt(n, s)) return !0;
2497
+ if (jt(n))
2498
+ return Z(n), !0;
2499
+ const d = _(Xt(n));
2500
+ if (A = Qe(x.uponSanitizeElement, A, Qt, Dt), Y(x.uponSanitizeElement, n, {
2498
2501
  tagName: d,
2499
2502
  allowedTags: A
2500
- }), ht(n, s)) return !0;
2503
+ }), gt(n, s)) return !0;
2501
2504
  if (on(n, d))
2502
- return X(n), !0;
2503
- if (vt[d] || !(q.tagCheck instanceof Function && q.tagCheck(d)) && !A[d]) {
2504
- const p = nn(n, d, s);
2505
- return p === !1 && (G(x.afterSanitizeElements, n, null), ht(n, s)) ? !0 : p;
2506
- }
2507
- if (yt(n) === B.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && D(Vn, n.innerHTML))
2508
- return X(n), !0;
2509
- if (V && n.nodeType === B.text) {
2510
- const p = Bt(n.textContent);
2511
- n.textContent !== p && (kt(t.removed, { element: n.cloneNode() }), n.textContent = p);
2512
- }
2513
- return G(x.afterSanitizeElements, n, null), ht(n, s);
2505
+ return Z(n), !0;
2506
+ if (Tt[d] || !(V.tagCheck instanceof Function && V.tagCheck(d)) && !A[d]) {
2507
+ const f = nn(n, d, s);
2508
+ return f === !1 && (Y(x.afterSanitizeElements, n, null), gt(n, s)) ? !0 : f;
2509
+ }
2510
+ if (Et(n) === F.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && O(Vn, n.innerHTML))
2511
+ return Z(n), !0;
2512
+ if (X && n.nodeType === F.text) {
2513
+ const f = Ut(n.textContent);
2514
+ n.textContent !== f && (At(t.removed, { element: n.cloneNode() }), n.textContent = f);
2515
+ }
2516
+ return Y(x.afterSanitizeElements, n, null), gt(n, s);
2514
2517
  }, eo = function(n, s, d) {
2515
- if (De[s] || Xe(s, n) || Pe && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
2516
- const p = C[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, n);
2517
- return te && D(Uo, s) || Oe && D(jo, s) ? !0 : p ? je[s] || D(Ie, xt(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && n !== "script" && co(d, "data:") === 0 && Fe[n] || Re && !D(Wo, xt(d, Me, "")) ? !0 : !d : oo(n) && Ut(W.tagNameCheck, n) && Ut(W.attributeNameCheck, s, n) || s === "is" && W.allowCustomizedBuiltInElements && Ut(W.tagNameCheck, d);
2518
- }, rn = E({}, [
2518
+ if (Oe[s] || Xe(s, n) || Pe && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
2519
+ const f = C[s] || V.attributeCheck instanceof Function && V.attributeCheck(s, n);
2520
+ return ee && O(Uo, s) || De && O(jo, s) ? !0 : f ? je[s] || O(Ie, Ct(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && n !== "script" && co(d, "data:") === 0 && Fe[n] || Re && !O(Wo, Ct(d, Me, "")) ? !0 : !d : oo(n) && Wt(G.tagNameCheck, n) && Wt(G.attributeNameCheck, s, n) || s === "is" && G.allowCustomizedBuiltInElements && Wt(G.tagNameCheck, d);
2521
+ }, rn = v({}, [
2519
2522
  "annotation-xml",
2520
2523
  "color-profile",
2521
2524
  "font-face",
@@ -2525,27 +2528,27 @@ function Mo() {
2525
2528
  "font-face-uri",
2526
2529
  "missing-glyph"
2527
2530
  ]), oo = function(n) {
2528
- return !rn[_t(n)] && D($o, n);
2529
- }, an = function(n, s, d, p) {
2530
- if (P && typeof g == "object" && typeof g.getAttributeType == "function" && !d) switch (g.getAttributeType(n, s)) {
2531
+ return !rn[Mt(n)] && O($o, n);
2532
+ }, an = function(n, s, d, f) {
2533
+ if (N && typeof g == "object" && typeof g.getAttributeType == "function" && !d) switch (g.getAttributeType(n, s)) {
2531
2534
  case "TrustedHTML":
2532
- return st(p);
2535
+ return ct(f);
2533
2536
  case "TrustedScriptURL":
2534
- return Oo(p);
2537
+ return Do(f);
2535
2538
  }
2536
- return p;
2537
- }, sn = function(n, s, d, p) {
2539
+ return f;
2540
+ }, sn = function(n, s, d, f) {
2538
2541
  try {
2539
- return d ? n.setAttributeNS(d, s, p) : n.setAttribute(s, p), Ft(n) ? (X(n), !1) : !0;
2542
+ return d ? n.setAttributeNS(d, s, f) : n.setAttribute(s, f), jt(n) ? (Z(n), !1) : !0;
2540
2543
  } catch (h) {
2541
- return it(s, n), !1;
2544
+ return rt(s, n), !1;
2542
2545
  }
2543
2546
  }, no = function(n, s) {
2544
- if (G(x.beforeSanitizeAttributes, n, null), ht(n, s)) return;
2547
+ if (Y(x.beforeSanitizeAttributes, n, null), gt(n, s)) return;
2545
2548
  const d = n.attributes;
2546
- if (!d || Ft(n)) return;
2547
- C = Qe(x.uponSanitizeAttribute, C, Qt, Dt);
2548
- const p = {
2549
+ if (!d || jt(n)) return;
2550
+ C = Qe(x.uponSanitizeAttribute, C, te, Rt);
2551
+ const f = {
2549
2552
  attrName: "",
2550
2553
  attrValue: "",
2551
2554
  keepAttr: !0,
@@ -2555,43 +2558,43 @@ function Mo() {
2555
2558
  let h = d.length;
2556
2559
  const b = _(n.nodeName);
2557
2560
  for (; h--; ) {
2558
- const y = d[h], S = y.name, U = y.namespaceURI, H = y.value, mt = _(S), pe = H;
2559
- let R = S === "value" ? pe : In(pe), io = !1;
2560
- if (p.attrName = mt, p.attrValue = R, p.keepAttr = !0, p.forceKeepAttr = void 0, G(x.uponSanitizeAttribute, n, p), R = p.attrValue, ze && (mt === "id" || mt === "name") && co(R, He) !== 0 && (it(S, n, y), R = He + R, io = !0), ot && D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
2561
- it(S, n, y);
2561
+ const y = d[h], S = y.name, j = y.namespaceURI, B = y.value, bt = _(S), fe = B;
2562
+ let R = S === "value" ? fe : In(fe), io = !1;
2563
+ if (f.attrName = bt, f.attrValue = R, f.keepAttr = !0, f.forceKeepAttr = void 0, Y(x.uponSanitizeAttribute, n, f), R = f.attrValue, ze && (bt === "id" || bt === "name") && co(R, He) !== 0 && (rt(S, n, y), R = He + R, io = !0), nt && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
2564
+ rt(S, n, y);
2562
2565
  continue;
2563
2566
  }
2564
- if (mt === "attributename" && lo(R, "href")) {
2565
- it(S, n, y);
2567
+ if (bt === "attributename" && lo(R, "href")) {
2568
+ rt(S, n, y);
2566
2569
  continue;
2567
2570
  }
2568
- if (!p.forceKeepAttr) {
2569
- if (!p.keepAttr) {
2570
- it(S, n, y);
2571
+ if (!f.forceKeepAttr) {
2572
+ if (!f.keepAttr) {
2573
+ rt(S, n, y);
2571
2574
  continue;
2572
2575
  }
2573
- if (!Ne && D(Xn, R)) {
2574
- it(S, n, y);
2576
+ if (!Ne && O(Xn, R)) {
2577
+ rt(S, n, y);
2575
2578
  continue;
2576
2579
  }
2577
- if (V && (R = Bt(R)), !eo(b, mt, R)) {
2578
- it(S, n, y);
2580
+ if (X && (R = Ut(R)), !eo(b, bt, R)) {
2581
+ rt(S, n, y);
2579
2582
  continue;
2580
2583
  }
2581
- R = an(b, mt, U, R), R !== pe && sn(n, S, U, R) && io && so(t.removed);
2584
+ R = an(b, bt, j, R), R !== fe && sn(n, S, j, R) && io && so(t.removed);
2582
2585
  }
2583
2586
  }
2584
- G(x.afterSanitizeAttributes, n, null), ht(n, s);
2585
- }, jt = function(n) {
2587
+ Y(x.afterSanitizeAttributes, n, null), gt(n, s);
2588
+ }, $t = function(n) {
2586
2589
  let s = null;
2587
2590
  const d = Je(n);
2588
- for (G(x.beforeSanitizeShadowDOM, n, null); s = d.nextNode(); )
2589
- if (G(x.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), ft(s.content) && jt(s.content), yt(s) === B.element) {
2590
- const p = Ce(s);
2591
- ft(p) && (ue(p), jt(p));
2591
+ for (Y(x.beforeSanitizeShadowDOM, n, null); s = d.nextNode(); )
2592
+ if (Y(x.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), mt(s.content) && $t(s.content), Et(s) === F.element) {
2593
+ const f = st(s);
2594
+ mt(f) && (pe(f), $t(f));
2592
2595
  }
2593
- G(x.afterSanitizeShadowDOM, n, null);
2594
- }, ue = function(n) {
2596
+ Y(x.afterSanitizeShadowDOM, n, null);
2597
+ }, pe = function(n) {
2595
2598
  const s = [{
2596
2599
  node: n,
2597
2600
  shadow: null
@@ -2599,27 +2602,27 @@ function Mo() {
2599
2602
  for (; s.length > 0; ) {
2600
2603
  const d = s.pop();
2601
2604
  if (d.shadow) {
2602
- jt(d.shadow);
2605
+ $t(d.shadow);
2603
2606
  continue;
2604
2607
  }
2605
- const p = d.node, h = yt(p) === B.element, b = O(p);
2608
+ const f = d.node, h = Et(f) === F.element, b = $(f);
2606
2609
  if (b) for (let y = b.length - 1; y >= 0; --y) s.push({
2607
2610
  node: b[y],
2608
2611
  shadow: null
2609
2612
  });
2610
2613
  if (h) {
2611
- const y = at ? at(p) : null;
2614
+ const y = lt ? lt(f) : null;
2612
2615
  if (typeof y == "string" && _(y) === "template") {
2613
- const S = p.content;
2614
- ft(S) && s.push({
2616
+ const S = f.content;
2617
+ mt(S) && s.push({
2615
2618
  node: S,
2616
2619
  shadow: null
2617
2620
  });
2618
2621
  }
2619
2622
  }
2620
2623
  if (h) {
2621
- const y = Ce(p);
2622
- ft(y) && s.push({
2624
+ const y = st(f);
2625
+ mt(y) && s.push({
2623
2626
  node: null,
2624
2627
  shadow: y
2625
2628
  }, {
@@ -2630,73 +2633,73 @@ function Mo() {
2630
2633
  }
2631
2634
  };
2632
2635
  return t.sanitize = function(u) {
2633
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, p = null, h = null;
2634
- if (re = !u, re && (u = "<!-->"), typeof u != "string" && !Tt(u) && (u = Pn(u), typeof u != "string"))
2635
- throw Z("dirty is not a string, aborting");
2636
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, f = null, h = null;
2637
+ if (ae = !u, ae && (u = "<!-->"), typeof u != "string" && !xt(u) && (u = Pn(u), typeof u != "string"))
2638
+ throw J("dirty is not a string, aborting");
2636
2639
  if (!t.isSupported) return u;
2637
- ee ? (A = It, C = Dt) : ce(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (A = F(A)), x.uponSanitizeAttribute.length > 0 && (C = F(C)), t.removed = [];
2638
- const b = ie && typeof u != "string" && Tt(u);
2640
+ oe ? (A = Dt, C = Rt) : de(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (A = U(A)), x.uponSanitizeAttribute.length > 0 && (C = U(C)), t.removed = [];
2641
+ const b = re && typeof u != "string" && xt(u);
2639
2642
  if (b) {
2640
2643
  en(u);
2641
- const U = Vt(u);
2642
- if (typeof U == "string") {
2643
- const H = _(U);
2644
- if (!A[H] || vt[H])
2645
- throw zt(u), Z("root node is forbidden and cannot be sanitized in-place");
2644
+ const j = Xt(u);
2645
+ if (typeof j == "string") {
2646
+ const B = _(j);
2647
+ if (!A[B] || Tt[B])
2648
+ throw Bt(u), J("root node is forbidden and cannot be sanitized in-place");
2646
2649
  }
2647
- if (Ft(u))
2648
- throw zt(u), Z("root node is clobbered and cannot be sanitized in-place");
2650
+ if (jt(u))
2651
+ throw Bt(u), J("root node is clobbered and cannot be sanitized in-place");
2649
2652
  try {
2650
- ue(u);
2651
- } catch (H) {
2652
- throw zt(u), H;
2653
+ pe(u);
2654
+ } catch (B) {
2655
+ throw Bt(u), B;
2653
2656
  }
2654
- } else if (Tt(u))
2655
- s = Ze("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === B.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), ue(s);
2657
+ } else if (xt(u))
2658
+ s = Ze("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === F.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), pe(s);
2656
2659
  else {
2657
- if (!lt && !V && !nt && u.indexOf("<") === -1) return P && Rt ? st(u) : u;
2658
- if (s = Ze(u), !s) return lt ? null : Rt ? et : "";
2660
+ if (!dt && !X && !it && u.indexOf("<") === -1) return N && Pt ? ct(u) : u;
2661
+ if (s = Ze(u), !s) return dt ? null : Pt ? ot : "";
2659
2662
  }
2660
- s && oe && X(s.firstChild);
2663
+ s && ne && Z(s.firstChild);
2661
2664
  const y = b ? u : s;
2662
2665
  try {
2663
- const U = Je(y);
2664
- for (; p = U.nextNode(); )
2665
- to(p, y), no(p, y), ft(p.content) && jt(p.content);
2666
- } catch (U) {
2667
- throw b && (zt(u), rt(t.removed, (H) => {
2668
- H.element && Ht(H.element);
2669
- })), U;
2666
+ const j = Je(y);
2667
+ for (; f = j.nextNode(); )
2668
+ to(f, y), no(f, y), mt(f.content) && $t(f.content);
2669
+ } catch (j) {
2670
+ throw b && (Bt(u), at(t.removed, (B) => {
2671
+ B.element && Ft(B.element);
2672
+ })), j;
2670
2673
  }
2671
2674
  if (b) {
2672
- let U = !1;
2673
- if (rt(t.removed, (H) => {
2674
- H.element && (H.element === u && (U = !0), Ht(H.element));
2675
- }), U) throw Z("a node selected for removal could not be safely returned; refusing to sanitize in place");
2676
- return V && de(u), u;
2677
- }
2678
- if (lt) {
2679
- if (V && de(s), Ot)
2675
+ let j = !1;
2676
+ if (at(t.removed, (B) => {
2677
+ B.element && (B.element === u && (j = !0), Ft(B.element));
2678
+ }), j) throw J("a node selected for removal could not be safely returned; refusing to sanitize in place");
2679
+ return X && ue(u), u;
2680
+ }
2681
+ if (dt) {
2682
+ if (X && ue(s), Nt)
2680
2683
  for (h = No.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
2681
2684
  else h = s;
2682
2685
  return (C.shadowroot || C.shadowrootmode) && (h = zo.call(o, h, !0)), h;
2683
2686
  }
2684
- let S = nt ? s.outerHTML : s.innerHTML;
2685
- return nt && A["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && D(Yn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
2686
- ` + S), V && (S = Bt(S)), P && Rt ? st(S) : S;
2687
+ let S = it ? s.outerHTML : s.innerHTML;
2688
+ return it && A["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && O(Yn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
2689
+ ` + S), X && (S = Ut(S)), N && Pt ? ct(S) : S;
2687
2690
  }, t.setConfig = function() {
2688
2691
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2689
- ce(u), ee = !0, It = A, Dt = C;
2692
+ de(u), oe = !0, Dt = A, Rt = C;
2690
2693
  }, t.clearConfig = function() {
2691
- pt = null, ee = !1, It = null, Dt = null, P = Xt, et = "";
2694
+ ht = null, oe = !1, Dt = null, Rt = null, N = Zt, ot = "";
2692
2695
  }, t.isValidAttribute = function(u, n, s) {
2693
- pt || ce({});
2694
- const d = _(u), p = _(n);
2695
- return eo(d, p, s);
2696
+ ht || de({});
2697
+ const d = _(u), f = _(n);
2698
+ return eo(d, f, s);
2696
2699
  }, t.addHook = function(u, n) {
2697
- typeof n == "function" && z(x, u) && kt(x[u], n);
2700
+ typeof n == "function" && P(x, u) && At(x[u], n);
2698
2701
  }, t.removeHook = function(u, n) {
2699
- if (z(x, u)) {
2702
+ if (P(x, u)) {
2700
2703
  if (n !== void 0) {
2701
2704
  const s = Ln(x[u], n);
2702
2705
  return s === -1 ? void 0 : Mn(x[u], s, 1)[0];
@@ -2704,12 +2707,12 @@ function Mo() {
2704
2707
  return so(x[u]);
2705
2708
  }
2706
2709
  }, t.removeHooks = function(u) {
2707
- z(x, u) && (x[u] = []);
2710
+ P(x, u) && (x[u] = []);
2708
2711
  }, t.removeAllHooks = function() {
2709
- x = vo();
2712
+ x = Eo();
2710
2713
  }, t;
2711
2714
  }
2712
- var $t = Mo();
2715
+ var Kt = Mo();
2713
2716
  const ei = [
2714
2717
  "p",
2715
2718
  "br",
@@ -2789,29 +2792,29 @@ function ii(a) {
2789
2792
  function Io(a, t, e, o) {
2790
2793
  if ((t == null ? void 0 : t.sanitize) === !1)
2791
2794
  return a;
2792
- const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : oi, f = /* @__PURE__ */ new Set();
2793
- for (const T of Object.values(c))
2794
- for (const k of T) f.add(k);
2795
+ const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : oi, p = /* @__PURE__ */ new Set();
2796
+ for (const w of Object.values(c))
2797
+ for (const T of w) p.add(T);
2795
2798
  const m = {
2796
2799
  ALLOWED_TAGS: r,
2797
- ALLOWED_ATTR: Array.from(f)
2800
+ ALLOWED_ATTR: Array.from(p)
2798
2801
  };
2799
2802
  if (!o)
2800
- return $t.sanitize(a, m);
2803
+ return Kt.sanitize(a, m);
2801
2804
  const g = r.includes("iframe");
2802
- $t.addHook(
2805
+ Kt.addHook(
2803
2806
  "uponSanitizeElement",
2804
- (T, k) => {
2805
- var v;
2806
- if (k.tagName !== "iframe") return;
2807
- const w = T;
2808
- k.allowedTags.iframe = g || ((v = w.getAttribute) == null ? void 0 : v.call(w, ni)) === "true" && ii(w.getAttribute("src"));
2807
+ (w, T) => {
2808
+ var k;
2809
+ if (T.tagName !== "iframe") return;
2810
+ const E = w;
2811
+ T.allowedTags.iframe = g || ((k = E.getAttribute) == null ? void 0 : k.call(E, ni)) === "true" && ii(E.getAttribute("src"));
2809
2812
  }
2810
2813
  );
2811
2814
  try {
2812
- return $t.sanitize(a, m);
2815
+ return Kt.sanitize(a, m);
2813
2816
  } finally {
2814
- $t.removeHook("uponSanitizeElement");
2817
+ Kt.removeHook("uponSanitizeElement");
2815
2818
  }
2816
2819
  }
2817
2820
  function ri(a, t, e, o) {
@@ -2824,7 +2827,7 @@ function wo(a, t, e, o) {
2824
2827
  return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? a : Io(a, t, o, !0);
2825
2828
  }
2826
2829
  const si = ".resize-handle, .table-resize-handle, [data-rte-media-pending]", li = /resize-handle|data-rte-media-pending|rte-media/;
2827
- function Do(a) {
2830
+ function Oo(a) {
2828
2831
  if (!a || !li.test(a)) return a;
2829
2832
  const t = document.createElement("template");
2830
2833
  t.innerHTML = a;
@@ -2842,10 +2845,10 @@ function Do(a) {
2842
2845
  i && (i.removeAttribute("contenteditable"), !((r = i.textContent) != null && r.trim()) && !i.querySelector("img, video, a") && i.remove());
2843
2846
  }), t.innerHTML;
2844
2847
  }
2845
- function Ct(a) {
2846
- return a ? Do(a.innerHTML) : "";
2848
+ function _t(a) {
2849
+ return a ? Oo(a.innerHTML) : "";
2847
2850
  }
2848
- const Yt = class Yt {
2851
+ const Vt = class Vt {
2849
2852
  /**
2850
2853
  * Resolve configuration from multiple sources with priority
2851
2854
  */
@@ -3037,7 +3040,7 @@ const Yt = class Yt {
3037
3040
  return e;
3038
3041
  }
3039
3042
  };
3040
- Yt.EDITOR_DEFAULTS = {
3043
+ Vt.EDITOR_DEFAULTS = {
3041
3044
  height: 400,
3042
3045
  width: "100%",
3043
3046
  readonly: !1,
@@ -3086,7 +3089,7 @@ Yt.EDITOR_DEFAULTS = {
3086
3089
  sanitizeOnInput: !0
3087
3090
  },
3088
3091
  statusbar: !1
3089
- }, Yt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
3092
+ }, Vt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
3090
3093
  "readonly",
3091
3094
  "disabled",
3092
3095
  "autofocus",
@@ -3106,86 +3109,86 @@ Yt.EDITOR_DEFAULTS = {
3106
3109
  "security-sanitize-on-paste",
3107
3110
  "security-sanitize-on-input"
3108
3111
  ]);
3109
- let ke = Yt;
3110
- const ci = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor}.editora-theme-dark .editora-toolbar-button svg:not([fill=none i]),.editora-theme-dark .editora-toolbar-icon svg:not([fill=none i]){fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-items-container{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden}.editora-toolbar-more-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:0;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-size:16px}.editora-toolbar-more-button:hover{background:#e0e0e0}.editora-toolbar-more-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-more-button{background:var(--editora-dark-content);border-color:var(--editora-dark-border);color:var(--editora-dark-text)}.editora-theme-dark .editora-toolbar-more-button:hover,.editora-theme-dark .editora-toolbar-more-button.active{background:#3a4554;border-color:#607088}.editora-toolbar-expanded-row{display:none;flex-wrap:wrap;align-items:center;gap:4px;width:100%;padding:8px;border-top:1px solid #ddd;background:#f5f5f5}.editora-toolbar-expanded-row.show{display:flex}.editora-theme-dark .editora-toolbar-expanded-row{border-top-color:var(--editora-dark-border);background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%)}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}';
3111
- let Gt;
3112
- const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", To = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", pi = "Rich text editor", xe = /* @__PURE__ */ new Set();
3113
- let Q = null, xo = !1, Ee = null, ve = null;
3112
+ let xe = Vt;
3113
+ const ci = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor}.editora-theme-dark .editora-toolbar-button svg:not([fill=none i]),.editora-theme-dark .editora-toolbar-icon svg:not([fill=none i]){fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-items-container{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden}.editora-toolbar-more-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:0;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-size:16px}.editora-toolbar-more-button:hover{background:#e0e0e0}.editora-toolbar-more-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-more-button{background:var(--editora-dark-content);border-color:var(--editora-dark-border);color:var(--editora-dark-text)}.editora-theme-dark .editora-toolbar-more-button:hover,.editora-theme-dark .editora-toolbar-more-button.active{background:#3a4554;border-color:#607088}.editora-toolbar-expanded-row{display:none;flex-wrap:wrap;align-items:center;gap:4px;width:100%;padding:8px;border-top:1px solid #ddd;background:#f5f5f5}.editora-toolbar-expanded-row.show{display:flex}.editora-theme-dark .editora-toolbar-expanded-row{border-top-color:var(--editora-dark-border);background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%)}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}editora-editor[data-loading]{display:block;position:relative;min-height:160px;border:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px);background:var(--ui-color-surface, #fff)}editora-editor[data-loading]:before{content:"";position:absolute;inset:0 0 auto;height:46px;border-bottom:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px) var(--ui-radius, 4px) 0 0;background:linear-gradient(90deg,var(--ui-color-surface-alt, #f5f5f5) 0%,color-mix(in srgb,var(--ui-color-surface-alt, #f5f5f5) 70%,var(--ui-color-border, #ddd)) 50%,var(--ui-color-surface-alt, #f5f5f5) 100%);background-size:220% 100%;animation:editora-loading-shimmer 1.2s linear infinite}editora-editor[data-loading]:after{content:"Loading editor…";position:absolute;top:62px;left:16px;font:14px/1.4 var(--ui-font-family, system-ui, sans-serif);color:var(--ui-color-muted, #6b7280)}editora-editor[data-loading]>*{visibility:hidden}@keyframes editora-loading-shimmer{to{background-position:-220% 0}}@media(prefers-reduced-motion:reduce){editora-editor[data-loading]:before{animation:none}}';
3114
+ let Yt;
3115
+ const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", To = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", pi = "Rich text editor", fi = /* @__PURE__ */ new Set(["collaboration"]), Ae = /* @__PURE__ */ new Set();
3116
+ let tt = null, xo = !1, Ee = null, we = null;
3114
3117
  function Ao(a) {
3115
3118
  if (!(a instanceof HTMLElement)) return !1;
3116
3119
  const t = a;
3117
3120
  return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
3118
3121
  }
3119
- function fi(a) {
3122
+ function hi(a) {
3120
3123
  return a ? a.nodeType === Node.ELEMENT_NODE ? a : a.parentElement : null;
3121
3124
  }
3122
- function St(a) {
3125
+ function Lt(a) {
3123
3126
  if (!a) return null;
3124
3127
  if (Ao(a))
3125
3128
  return a;
3126
3129
  const t = a.matches(To) ? a : a.closest(To);
3127
3130
  return !t || !Ao(t) ? null : t;
3128
3131
  }
3129
- function hi() {
3132
+ function mi() {
3130
3133
  var i;
3131
3134
  if (typeof window == "undefined") return null;
3132
3135
  const a = window[di];
3133
3136
  if (a instanceof HTMLElement) {
3134
- const r = St(a);
3137
+ const r = Lt(a);
3135
3138
  if (r) return r;
3136
3139
  const l = a.matches(ko) ? a : a.querySelector(ko);
3137
3140
  if (l) {
3138
- const c = St(l);
3141
+ const c = Lt(l);
3139
3142
  if (c) return c;
3140
3143
  }
3141
3144
  }
3142
3145
  const t = window[ui];
3143
3146
  if (t instanceof HTMLElement) {
3144
- const r = St(t);
3147
+ const r = Lt(t);
3145
3148
  if (r) return r;
3146
3149
  }
3147
3150
  const e = document.activeElement;
3148
3151
  if (e) {
3149
- const r = St(e);
3152
+ const r = Lt(e);
3150
3153
  if (r) return r;
3151
3154
  }
3152
3155
  const o = (i = window.getSelection) == null ? void 0 : i.call(window);
3153
3156
  if (o && o.rangeCount > 0) {
3154
- const r = St(fi(o.getRangeAt(0).startContainer));
3157
+ const r = Lt(hi(o.getRangeAt(0).startContainer));
3155
3158
  if (r) return r;
3156
3159
  }
3157
- if (Q && Q.isConnected)
3158
- return Q;
3159
- for (const r of xe)
3160
+ if (tt && tt.isConnected)
3161
+ return tt;
3162
+ for (const r of Ae)
3160
3163
  if (r.isConnected) return r;
3161
3164
  return null;
3162
3165
  }
3163
- function mi() {
3166
+ function gi() {
3164
3167
  if (typeof window == "undefined" || xo) return;
3165
- Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, ve = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3168
+ Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, we = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3166
3169
  const a = (t, ...e) => {
3167
- const o = hi();
3168
- return o ? o.execCommand(t, ...e) : Ee ? Ee(t, ...e) : ve ? ve(t, ...e) : !1;
3170
+ const o = mi();
3171
+ return o ? o.execCommand(t, ...e) : Ee ? Ee(t, ...e) : we ? we(t, ...e) : !1;
3169
3172
  };
3170
3173
  window.executeEditorCommand = a, window.execEditorCommand = a, xo = !0;
3171
3174
  }
3172
- function gi() {
3175
+ function bi() {
3173
3176
  const a = "editora-webcomponent-styles";
3174
3177
  if (!document.getElementById(a)) {
3175
3178
  const t = document.createElement("style");
3176
3179
  t.id = a, t.textContent = ci, document.head.appendChild(t);
3177
3180
  }
3178
3181
  }
3179
- function bi() {
3180
- if (!Gt) {
3181
- const a = K.__globalPluginLoader;
3182
- a ? Gt = a : Gt = new Co();
3182
+ function yi() {
3183
+ if (!Yt) {
3184
+ const a = q.__globalPluginLoader;
3185
+ a ? Yt = a : Yt = new Co();
3183
3186
  }
3184
- return Gt;
3187
+ return Yt;
3185
3188
  }
3186
- class K extends HTMLElement {
3189
+ class q extends HTMLElement {
3187
3190
  constructor() {
3188
- if (super(), this.pluginLoader = bi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new vn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, gi(), !this.hasAttribute("data-initial-content")) {
3191
+ if (super(), this.pluginLoader = yi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new En(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, bi(), !this.hasAttribute("data-initial-content")) {
3189
3192
  const t = this.innerHTML.trim();
3190
3193
  t && this.setAttribute("data-initial-content", t);
3191
3194
  }
@@ -3252,13 +3255,13 @@ class K extends HTMLElement {
3252
3255
  * Wait for the global plugin loader to be available
3253
3256
  */
3254
3257
  async waitForPluginLoader() {
3255
- if (K.__globalPluginLoader) {
3256
- this.pluginLoader = K.__globalPluginLoader;
3258
+ if (q.__globalPluginLoader) {
3259
+ this.pluginLoader = q.__globalPluginLoader;
3257
3260
  return;
3258
3261
  }
3259
3262
  return new Promise((t) => {
3260
3263
  const e = () => {
3261
- K.__globalPluginLoader ? (this.pluginLoader = K.__globalPluginLoader, t()) : setTimeout(e, 0);
3264
+ q.__globalPluginLoader ? (this.pluginLoader = q.__globalPluginLoader, t()) : setTimeout(e, 0);
3262
3265
  };
3263
3266
  e();
3264
3267
  });
@@ -3288,7 +3291,7 @@ class K extends HTMLElement {
3288
3291
  var r;
3289
3292
  if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
3290
3293
  const t = ++this.buildGeneration;
3291
- this.setAttribute("data-editora-editor", "true"), xe.add(this), Q || (Q = this), mi(), this.config.height && (this.style.height = typeof this.config.height == "number" ? `${this.config.height}px` : this.config.height), this.config.width && (this.style.width = typeof this.config.width == "number" ? `${this.config.width}px` : this.config.width), this.classList.add("editora-editor"), this.config.theme && this.classList.add(`editora-theme-${this.config.theme}`);
3294
+ this.setAttribute("data-editora-editor", "true"), Ae.add(this), tt || (tt = this), gi(), this.config.height && (this.style.height = typeof this.config.height == "number" ? `${this.config.height}px` : this.config.height), this.config.width && (this.style.width = typeof this.config.width == "number" ? `${this.config.width}px` : this.config.width), this.classList.add("editora-editor"), this.config.theme && this.classList.add(`editora-theme-${this.config.theme}`), this.setAttribute("data-loading", "true"), this.setAttribute("aria-busy", "true");
3292
3295
  const e = await this.loadPlugins();
3293
3296
  if (t !== this.buildGeneration || !this.isConnected) return;
3294
3297
  if (this.loadedPlugins = e, e.forEach((l) => {
@@ -3311,7 +3314,7 @@ class K extends HTMLElement {
3311
3314
  content: i,
3312
3315
  plugins: e,
3313
3316
  readonly: this.config.readonly
3314
- }), this.createUI(e, i), this.setupEventListeners(), this.startAutosave(), this.isInitialized = !0, this.dispatchEvent(new CustomEvent("editor-ready", {
3317
+ }), this.createUI(e, i), this.setupEventListeners(), this.startAutosave(), this.isInitialized = !0, this.removeAttribute("data-loading"), this.removeAttribute("aria-busy"), this.dispatchEvent(new CustomEvent("editor-ready", {
3315
3318
  detail: { api: this.getAPI() },
3316
3319
  bubbles: !0
3317
3320
  }));
@@ -3354,8 +3357,10 @@ class K extends HTMLElement {
3354
3357
  } else {
3355
3358
  const r = this.pluginLoader.getRegisteredPluginNames();
3356
3359
  for (const l of r) {
3357
- const c = await this.pluginLoader.load(l, this.getPluginLoadConfig(l));
3358
- c && t.push(c);
3360
+ const c = this.getPluginLoadConfig(l);
3361
+ if (fi.has(l) && !c) continue;
3362
+ const p = await this.pluginLoader.load(l, c);
3363
+ p && t.push(p);
3359
3364
  }
3360
3365
  }
3361
3366
  return t;
@@ -3610,7 +3615,7 @@ class K extends HTMLElement {
3610
3615
  this.stopAutosave();
3611
3616
  const t = this.getAutosaveConfig();
3612
3617
  !t.enabled || !this.contentElement || (this.autosaveTimer = setInterval(() => {
3613
- this.persistAutosave(Ct(this.contentElement));
3618
+ this.persistAutosave(_t(this.contentElement));
3614
3619
  }, t.intervalMs));
3615
3620
  }
3616
3621
  insertHTMLAtSelection(t) {
@@ -3646,10 +3651,10 @@ class K extends HTMLElement {
3646
3651
  var c;
3647
3652
  if (this.contentElement) {
3648
3653
  this.contentElement.focus();
3649
- const f = window.getSelection();
3650
- if (!f || f.rangeCount === 0 || !this.contentElement.contains(f.anchorNode)) {
3654
+ const p = window.getSelection();
3655
+ if (!p || p.rangeCount === 0 || !this.contentElement.contains(p.anchorNode)) {
3651
3656
  const m = document.createRange(), g = this.contentElement.lastChild || this.contentElement;
3652
- g.nodeType === Node.TEXT_NODE ? m.setStart(g, ((c = g.textContent) == null ? void 0 : c.length) || 0) : g.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(g), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), f == null || f.removeAllRanges(), f == null || f.addRange(m);
3657
+ g.nodeType === Node.TEXT_NODE ? m.setStart(g, ((c = g.textContent) == null ? void 0 : c.length) || 0) : g.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(g), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), p == null || p.removeAllRanges(), p == null || p.addRange(m);
3653
3658
  }
3654
3659
  }
3655
3660
  return this.executeCommand(r, l);
@@ -3663,8 +3668,8 @@ class K extends HTMLElement {
3663
3668
  const r = document.createElement("div");
3664
3669
  r.innerHTML = e.trim(), !Array.from(r.childNodes).some((c) => {
3665
3670
  if (c.nodeType === Node.ELEMENT_NODE) {
3666
- const f = c.tagName;
3667
- return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(f);
3671
+ const p = c.tagName;
3672
+ return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(p);
3668
3673
  }
3669
3674
  return !1;
3670
3675
  }) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
@@ -3704,41 +3709,41 @@ class K extends HTMLElement {
3704
3709
  selectionCollapsed: (r = (i = window.getSelection()) == null ? void 0 : i.isCollapsed) != null ? r : !0
3705
3710
  });
3706
3711
  }), this.contentElement.addEventListener("input", (o) => {
3707
- var k;
3712
+ var T;
3708
3713
  if (!this.contentElement) return;
3709
3714
  let i = this.contentElement.innerHTML;
3710
- const r = (k = o == null ? void 0 : o.detail) == null ? void 0 : k.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
3711
- if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3712
- const w = wo(i, c, f, r);
3713
- if (w !== i) {
3714
- const v = window.getSelection(), Y = v && v.rangeCount > 0 ? v.getRangeAt(0) : null;
3715
- if (this.contentElement.innerHTML = w, Y && v)
3715
+ const r = (T = o == null ? void 0 : o.detail) == null ? void 0 : T.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
3716
+ if (this.lastBeforeInputType = null, p.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3717
+ const E = wo(i, c, p, r);
3718
+ if (E !== i) {
3719
+ const k = window.getSelection(), et = k && k.rangeCount > 0 ? k.getRangeAt(0) : null;
3720
+ if (this.contentElement.innerHTML = E, et && k)
3716
3721
  try {
3717
- v.removeAllRanges(), v.addRange(Y);
3718
- } catch (O) {
3722
+ k.removeAllRanges(), k.addRange(et);
3723
+ } catch ($) {
3719
3724
  }
3720
- i = w;
3725
+ i = E;
3721
3726
  }
3722
3727
  }
3723
3728
  this.recordInputHistory(i), this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
3724
- const T = () => {
3729
+ const w = () => {
3725
3730
  this.dispatchEvent(new CustomEvent("content-change", {
3726
- detail: { html: Do(i) },
3731
+ detail: { html: Oo(i) },
3727
3732
  bubbles: !0
3728
3733
  }));
3729
3734
  };
3730
- l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(T, l.debounceInputMs) : T(), this.updateStatusBar();
3735
+ l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(w, l.debounceInputMs) : w(), this.updateStatusBar();
3731
3736
  }), this.contentElement.addEventListener("contextmenu", (o) => {
3732
3737
  const i = this.config.contextMenu;
3733
3738
  (i === !1 || typeof i == "object" && i !== null && i.enabled === !1) && o.preventDefault();
3734
3739
  }), this.contentElement.addEventListener("paste", (o) => {
3735
- var g, T;
3740
+ var g, w;
3736
3741
  if (o.__editoraSmartPasteHandled === !0 || o.defaultPrevented)
3737
3742
  return;
3738
3743
  o.preventDefault();
3739
3744
  const i = this.config.paste || {};
3740
3745
  let r = ((g = o.clipboardData) == null ? void 0 : g.getData("text/html")) || "";
3741
- const l = ((T = o.clipboardData) == null ? void 0 : T.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3746
+ const l = ((w = o.clipboardData) == null ? void 0 : w.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3742
3747
  if ((i.clean || !i.keepFormatting) && l) {
3743
3748
  document.execCommand("insertText", !1, l);
3744
3749
  return;
@@ -3748,15 +3753,15 @@ class K extends HTMLElement {
3748
3753
  return;
3749
3754
  }
3750
3755
  if (r) {
3751
- f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (r = ai(r, c, f)), this.insertHTMLAtSelection(r);
3756
+ p.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (r = ai(r, c, p)), this.insertHTMLAtSelection(r);
3752
3757
  return;
3753
3758
  }
3754
3759
  l && document.execCommand("insertText", !1, l);
3755
3760
  }), this.contentElement.addEventListener("focus", () => {
3756
- Q = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
3761
+ tt = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
3757
3762
  }), this.contentElement.addEventListener("blur", () => {
3758
3763
  this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.dispatchEvent(new CustomEvent("content-change", {
3759
- detail: { html: Ct(this.contentElement) },
3764
+ detail: { html: _t(this.contentElement) },
3760
3765
  bubbles: !0
3761
3766
  })), this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
3762
3767
  }), this.contentElement.addEventListener("keydown", (o) => {
@@ -3838,14 +3843,14 @@ class K extends HTMLElement {
3838
3843
  if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
3839
3844
  return;
3840
3845
  const o = this.contentElement.textContent || "", { words: i, chars: r } = yn(o), l = bn(this.contentElement);
3841
- let c, f;
3846
+ let c, p;
3842
3847
  const m = this.getSelectionRangeInEditor();
3843
- m && (c = mn(this.contentElement, m), m.collapsed || (f = En(m, c), c = void 0)), this.statusBar.update({
3848
+ m && (c = mn(this.contentElement, m), m.collapsed || (p = vn(m, c), c = void 0)), this.statusBar.update({
3844
3849
  wordCount: i,
3845
3850
  charCount: r,
3846
3851
  lineCount: l,
3847
3852
  cursorPosition: c,
3848
- selectionInfo: f
3853
+ selectionInfo: p
3849
3854
  });
3850
3855
  }
3851
3856
  /**
@@ -3933,7 +3938,7 @@ class K extends HTMLElement {
3933
3938
  const o = this.attributes[e];
3934
3939
  t[o.name] = o.value;
3935
3940
  }
3936
- return ke.resolve({
3941
+ return xe.resolve({
3937
3942
  jsConfig: this.jsConfig,
3938
3943
  attributes: t
3939
3944
  });
@@ -3943,7 +3948,7 @@ class K extends HTMLElement {
3943
3948
  */
3944
3949
  getAPI() {
3945
3950
  return {
3946
- getContent: () => Ct(this.contentElement),
3951
+ getContent: () => _t(this.contentElement),
3947
3952
  setContent: (t) => {
3948
3953
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
3949
3954
  },
@@ -3971,11 +3976,11 @@ class K extends HTMLElement {
3971
3976
  */
3972
3977
  destroy() {
3973
3978
  var t, e, o, i;
3974
- this.buildGeneration += 1, this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = Ct(this.contentElement), this.persistAutosave(this.preservedContent)), this.stopAutosave(), this.selectionChangeHandler && (document.removeEventListener("selectionchange", this.selectionChangeHandler), this.selectionChangeHandler = void 0), (t = this.engine) == null || t.destroy(), (e = this.toolbar) == null || e.destroy(), (o = this.floatingToolbar) == null || o.destroy(), (i = this.statusBar) == null || i.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.isInitialized = !1, xe.delete(this), Q === this && (Q = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3979
+ this.buildGeneration += 1, this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = _t(this.contentElement), this.persistAutosave(this.preservedContent)), this.stopAutosave(), this.selectionChangeHandler && (document.removeEventListener("selectionchange", this.selectionChangeHandler), this.selectionChangeHandler = void 0), (t = this.engine) == null || t.destroy(), (e = this.toolbar) == null || e.destroy(), (o = this.floatingToolbar) == null || o.destroy(), (i = this.statusBar) == null || i.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.isInitialized = !1, Ae.delete(this), tt === this && (tt = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3975
3980
  }
3976
3981
  // Public API methods
3977
3982
  getContent() {
3978
- return Ct(this.contentElement);
3983
+ return _t(this.contentElement);
3979
3984
  }
3980
3985
  setContent(t) {
3981
3986
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
@@ -3992,9 +3997,9 @@ class K extends HTMLElement {
3992
3997
  (t = this.contentElement) == null || t.blur();
3993
3998
  }
3994
3999
  }
3995
- const Ae = new Co();
3996
- K.__globalPluginLoader = Ae;
3997
- const yi = {
4000
+ const Ce = new Co();
4001
+ q.__globalPluginLoader = Ce;
4002
+ const vi = {
3998
4003
  // Core editing plugins (always loaded)
3999
4004
  bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((a) => a.BoldPlugin()),
4000
4005
  italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((a) => a.ItalicPlugin()),
@@ -4008,18 +4013,18 @@ const yi = {
4008
4013
  history: () => import("./HistoryPlugin.native-C8GyxsgC.mjs").then((a) => a.HistoryPlugin())
4009
4014
  };
4010
4015
  async function Ei() {
4011
- return Object.entries(yi).forEach(([a, t]) => {
4012
- Ae.register(a, t);
4013
- }), Ae;
4016
+ return Object.entries(vi).forEach(([a, t]) => {
4017
+ Ce.register(a, t);
4018
+ }), Ce;
4014
4019
  }
4015
4020
  typeof window != "undefined" && Ei().then((a) => {
4016
- K.__globalPluginLoader = a, customElements.get("editora-editor") || customElements.define("editora-editor", K);
4021
+ q.__globalPluginLoader = a, customElements.get("editora-editor") || customElements.define("editora-editor", q);
4017
4022
  const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
4018
4023
  t.forEach((o) => {
4019
4024
  const i = o.innerHTML.trim();
4020
4025
  i && (e.push(i), o.setAttribute("data-initial-content", i), o.innerHTML = "");
4021
4026
  }), t.forEach((o, i) => {
4022
- o instanceof K && !o.isInitialized && e[i] && o.setAttribute("content", e[i]);
4027
+ o instanceof q && !o.isInitialized && e[i] && o.setAttribute("content", e[i]);
4023
4028
  });
4024
4029
  });
4025
4030
  export {