@editora/core 1.0.19 → 1.0.21

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.
Files changed (28) hide show
  1. package/dist/{A11yCheckerPlugin.native-DIKuCeFw.mjs → A11yCheckerPlugin.native-qW_njhLY.mjs} +2 -2
  2. package/dist/{AnchorPlugin.native-DXZdK3zr.mjs → AnchorPlugin.native-Drmxhy98.mjs} +37 -37
  3. package/dist/{BlockquotePlugin.native-57_Xcjl1.mjs → BlockquotePlugin.native-D8jjGd0c.mjs} +19 -19
  4. package/dist/{CapitalizationPlugin.native-C-HRbXGh.mjs → CapitalizationPlugin.native-Mh-kUy-x.mjs} +17 -17
  5. package/dist/{ChecklistPlugin.native-NVrBUkaL.mjs → ChecklistPlugin.native-DLedNLsb.mjs} +31 -31
  6. package/dist/{CodePlugin.native-BcVqm5MS.mjs → CodePlugin.native-AoJ_idGz.mjs} +5 -5
  7. package/dist/{CodePlugin.native-Rgxx2Igx.mjs → CodePlugin.native-CEgR1DWC.mjs} +5 -5
  8. package/dist/{CollaborationPlugin.native-oSybCGPW.mjs → CollaborationPlugin.native-Bl3R9CRI.mjs} +1406 -1295
  9. package/dist/{CommentsPlugin.native-CLip9wAO.mjs → CommentsPlugin.native-DncTHiEe.mjs} +2 -2
  10. package/dist/{DirectionPlugin.native-Bl-QLFzO.mjs → DirectionPlugin.native-B-Zj-EAt.mjs} +33 -33
  11. package/dist/{FontFamilyPlugin.native-M3cNQ0KA.mjs → FontFamilyPlugin.native-DLq9x046.mjs} +32 -32
  12. package/dist/{PreviewPlugin.native-Dyht8mGi.mjs → PreviewPlugin.native-Dv5OsffK.mjs} +4 -4
  13. package/dist/{SpellCheckPlugin.native-Bef2oTLB.mjs → SpellCheckPlugin.native-BGm2qPfn.mjs} +20 -20
  14. package/dist/{TemplatePlugin.native-BDV2eik2.mjs → TemplatePlugin.native-Dwk8TgxI.mjs} +32 -32
  15. package/dist/editora.min.js +3 -3
  16. package/dist/editora.umd.js +5 -5
  17. package/dist/{index-DeUjxpKd.mjs → index-6i4_TH66.mjs} +136 -133
  18. package/dist/{index-CclXYzUB.js → index-Ct3Aik7_.js} +3 -3
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.esm.js +2 -2
  21. package/dist/plugin-loader.js +11 -11
  22. package/dist/webcomponent-core.js +154 -151
  23. package/dist/webcomponent-core.min.js +19 -19
  24. package/dist/webcomponent.cjs.js +1 -1
  25. package/dist/webcomponent.esm.js +1 -1
  26. package/dist/webcomponent.js +34 -31
  27. package/dist/webcomponent.min.js +212 -212
  28. package/package.json +1 -1
@@ -21,7 +21,7 @@ class ln {
21
21
  return { type: "text", text: t, marks: e };
22
22
  }
23
23
  }
24
- class Co {
24
+ class Ao {
25
25
  constructor() {
26
26
  this.plugins = [], this.pluginConfigs = /* @__PURE__ */ new Map();
27
27
  }
@@ -112,8 +112,8 @@ class Co {
112
112
  await Promise.all(t), this.plugins = [], this.pluginConfigs.clear();
113
113
  }
114
114
  }
115
- function gi() {
116
- return new Co();
115
+ function bi() {
116
+ return new Ao();
117
117
  }
118
118
  class cn {
119
119
  constructor(t) {
@@ -495,7 +495,7 @@ class dn {
495
495
  }
496
496
  class un {
497
497
  constructor(t = {}) {
498
- this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new Co(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
498
+ this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new Ao(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
499
499
  const e = this.pluginManager.buildSchema();
500
500
  this.state = Kt.create(e), this.commandRegistry = new dn(this.pluginManager.getCommands());
501
501
  }
@@ -671,9 +671,9 @@ class fn {
671
671
  };
672
672
  return o.forEach((c) => {
673
673
  const p = [];
674
- c.split(/\s+/).filter(Boolean).forEach((E) => {
675
- if (E === "direction") {
676
- const w = r.get("setDirectionLTR"), v = r.get("setDirectionRTL");
674
+ c.split(/\s+/).filter(Boolean).forEach((v) => {
675
+ if (v === "direction") {
676
+ const w = r.get("setDirectionLTR"), E = r.get("setDirectionRTL");
677
677
  w && p.push({
678
678
  id: "directionLTR",
679
679
  label: w.label,
@@ -681,18 +681,18 @@ class fn {
681
681
  icon: w.icon,
682
682
  type: w.type || "button",
683
683
  options: w.options
684
- }), v && p.push({
684
+ }), E && p.push({
685
685
  id: "directionRTL",
686
- label: v.label,
687
- command: v.command,
688
- icon: v.icon,
689
- type: v.type || "button",
690
- options: v.options
686
+ label: E.label,
687
+ command: E.command,
688
+ icon: E.icon,
689
+ type: E.type || "button",
690
+ options: E.options
691
691
  });
692
692
  return;
693
693
  }
694
- if (E === "comments") {
695
- const w = r.get("addComment"), v = r.get("toggleComments");
694
+ if (v === "comments") {
695
+ const w = r.get("addComment"), E = r.get("toggleComments");
696
696
  w && p.push({
697
697
  id: "addComment",
698
698
  label: w.label,
@@ -700,26 +700,26 @@ class fn {
700
700
  icon: w.icon,
701
701
  type: w.type || "button",
702
702
  options: w.options
703
- }), v && p.push({
703
+ }), E && p.push({
704
704
  id: "toggleComments",
705
- label: v.label,
706
- command: v.command,
707
- icon: v.icon,
708
- type: v.type || "button",
709
- options: v.options
705
+ label: E.label,
706
+ command: E.command,
707
+ icon: E.icon,
708
+ type: E.type || "button",
709
+ options: E.options
710
710
  });
711
711
  return;
712
712
  }
713
- const C = l[E] || E;
714
- let A = r.get(C);
715
- A || (A = r.get(E)), A && p.push({
716
- id: E,
717
- label: A.label,
718
- command: A.command,
719
- icon: A.icon,
720
- type: A.type === "separator" ? "separator" : A.type || "button",
721
- options: A.options,
722
- items: A.items
713
+ const A = l[v] || v;
714
+ let C = r.get(A);
715
+ C || (C = r.get(v)), C && p.push({
716
+ id: v,
717
+ label: C.label,
718
+ command: C.command,
719
+ icon: C.icon,
720
+ type: C.type === "separator" ? "separator" : C.type || "button",
721
+ options: C.options,
722
+ items: C.items
723
723
  });
724
724
  }), p.length > 0 && e.push(p);
725
725
  }), e;
@@ -767,19 +767,19 @@ class fn {
767
767
  var N;
768
768
  D.parentElement === i && ((N = this.overflowUnitHomes.get(D)) == null || N.appendChild(D));
769
769
  });
770
- const p = t.clientWidth, m = 16, E = 40, C = 4, A = Math.max(0, p - m - E - C);
771
- let w = 0, v = 0;
770
+ const p = t.clientWidth, m = 16, v = 40, A = 4, C = Math.max(0, p - m - v - A);
771
+ let w = 0, E = 0;
772
772
  for (const D of c) {
773
- const N = D.getBoundingClientRect().width + C;
774
- if (w + N <= A)
775
- w += N, v++;
773
+ const N = D.getBoundingClientRect().width + A;
774
+ if (w + N <= C)
775
+ w += N, E++;
776
776
  else
777
777
  break;
778
778
  }
779
- v = Math.max(1, Math.min(v, c.length));
780
- const K = v < c.length;
779
+ E = Math.max(1, Math.min(E, c.length));
780
+ const K = E < c.length;
781
781
  o.style.display = K ? "" : "none", o.classList.toggle("active", K && this.expandedOpen), !K && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((D, N) => {
782
- N >= v && i.appendChild(D);
782
+ N >= E && i.appendChild(D);
783
783
  });
784
784
  }, l = () => {
785
785
  this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(r);
@@ -838,7 +838,7 @@ class fn {
838
838
  */
839
839
  createInput(t) {
840
840
  const e = document.createElement("input");
841
- return e.className = `editora-toolbar-input ${t.label.toLowerCase().replace(/\s+/g, "-")}`, e.type = "text", e.title = t.label, e.placeholder = t.placeholder || "", t.command && e.setAttribute("data-command", t.command), t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (o) => {
841
+ return e.className = `editora-toolbar-input ${t.label.toLowerCase().replace(/\s+/g, "-")}`, e.type = "text", e.title = t.label, e.setAttribute("aria-label", t.label), e.placeholder = t.placeholder || "", t.command && e.setAttribute("data-command", t.command), t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (o) => {
842
842
  o.preventDefault(), this.setLastCommandTrigger(e, t.command), this.commandHandler && t.command && this.commandHandler(t.command);
843
843
  }), e;
844
844
  }
@@ -914,8 +914,8 @@ class fn {
914
914
  const p = (m = this.container) == null ? void 0 : m.querySelectorAll(
915
915
  ".editora-toolbar-dropdown-menu"
916
916
  );
917
- p == null || p.forEach((E) => {
918
- E !== i && (E.style.display = "none");
917
+ p == null || p.forEach((v) => {
918
+ v !== i && (v.style.display = "none");
919
919
  }), i.style.display = i.style.display === "none" ? "block" : "none";
920
920
  });
921
921
  const r = (c) => {
@@ -1098,7 +1098,7 @@ function yn(s) {
1098
1098
  const t = s.trim() ? s.trim().split(/\s+/).length : 0, e = s.length;
1099
1099
  return { words: t, chars: e };
1100
1100
  }
1101
- function vn(s, t) {
1101
+ function En(s, t) {
1102
1102
  const e = s.toString();
1103
1103
  return {
1104
1104
  startLine: t.line,
@@ -1115,7 +1115,7 @@ function io(s, t) {
1115
1115
  for (var e = 0, o = Array(t); e < t; e++) o[e] = s[e];
1116
1116
  return o;
1117
1117
  }
1118
- function En(s) {
1118
+ function vn(s) {
1119
1119
  if (Array.isArray(s)) return s;
1120
1120
  }
1121
1121
  function wn(s, t) {
@@ -1124,8 +1124,8 @@ function wn(s, t) {
1124
1124
  var o, i, r, l, c = [], p = !0, m = !1;
1125
1125
  try {
1126
1126
  if (r = (e = e.call(s)).next, t !== 0) for (; !(p = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); p = !0) ;
1127
- } catch (E) {
1128
- m = !0, i = E;
1127
+ } catch (v) {
1128
+ m = !0, i = v;
1129
1129
  } finally {
1130
1130
  try {
1131
1131
  if (!p && e.return != null && (l = e.return(), Object(l) !== l)) return;
@@ -1141,7 +1141,7 @@ function Tn() {
1141
1141
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1142
1142
  }
1143
1143
  function kn(s, t) {
1144
- return En(s) || wn(s, t) || xn(s, t) || Tn();
1144
+ return vn(s) || wn(s, t) || xn(s, t) || Tn();
1145
1145
  }
1146
1146
  function xn(s, t) {
1147
1147
  if (s) {
@@ -1150,7 +1150,7 @@ function xn(s, t) {
1150
1150
  return e === "Object" && s.constructor && (e = s.constructor.name), e === "Map" || e === "Set" ? Array.from(s) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? io(s, t) : void 0;
1151
1151
  }
1152
1152
  }
1153
- const Ao = Object.entries, ro = Object.setPrototypeOf, Cn = Object.isFrozen, An = Object.getPrototypeOf, Sn = Object.getOwnPropertyDescriptor;
1153
+ const Co = Object.entries, ro = Object.setPrototypeOf, An = Object.isFrozen, Cn = Object.getPrototypeOf, Sn = Object.getOwnPropertyDescriptor;
1154
1154
  let M = Object.freeze, I = Object.seal, mt = Object.create, So = typeof Reflect != "undefined" && Reflect, we = So.apply, Te = So.construct;
1155
1155
  M || (M = function(t) {
1156
1156
  return t;
@@ -1166,7 +1166,7 @@ Te || (Te = function(t) {
1166
1166
  for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
1167
1167
  return new t(...o);
1168
1168
  });
1169
- const it = L(Array.prototype.forEach), _n = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), kt = L(Array.prototype.push), Ln = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), pe = L(String.prototype.toString), so = L(String.prototype.match), xt = L(String.prototype.replace), lo = L(String.prototype.indexOf), Mn = L(String.prototype.trim), In = L(Number.prototype.toString), On = L(Boolean.prototype.toString), co = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), uo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), Ct = L(Object.prototype.toString), O = L(RegExp.prototype.test), X = Dn(TypeError);
1169
+ const it = L(Array.prototype.forEach), _n = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), kt = L(Array.prototype.push), Ln = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), pe = L(String.prototype.toString), so = L(String.prototype.match), xt = L(String.prototype.replace), lo = L(String.prototype.indexOf), Mn = L(String.prototype.trim), In = L(Number.prototype.toString), On = L(Boolean.prototype.toString), co = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), uo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), At = L(Object.prototype.toString), O = L(RegExp.prototype.test), X = Dn(TypeError);
1170
1170
  function L(s) {
1171
1171
  return function(t) {
1172
1172
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1188,7 +1188,7 @@ function y(s, t) {
1188
1188
  let i = t[o];
1189
1189
  if (typeof i == "string") {
1190
1190
  const r = e(i);
1191
- r !== i && (Cn(t) || (t[o] = r), i = r);
1191
+ r !== i && (An(t) || (t[o] = r), i = r);
1192
1192
  }
1193
1193
  s[i] = !0;
1194
1194
  }
@@ -1200,7 +1200,7 @@ function Rn(s) {
1200
1200
  }
1201
1201
  function H(s) {
1202
1202
  const t = mt(null);
1203
- for (const o of Ao(s)) {
1203
+ for (const o of Co(s)) {
1204
1204
  var e = kn(o, 2);
1205
1205
  const i = e[0], r = e[1];
1206
1206
  z(s, i) && (bt(r) ? t[i] = Rn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = H(r) : t[i] = r);
@@ -1220,19 +1220,19 @@ function Nn(s) {
1220
1220
  case "symbol":
1221
1221
  return uo ? uo(s) : "Symbol()";
1222
1222
  case "undefined":
1223
- return Ct(s);
1223
+ return At(s);
1224
1224
  case "function":
1225
1225
  case "object": {
1226
- if (s === null) return Ct(s);
1226
+ if (s === null) return At(s);
1227
1227
  const t = s, e = j(t, "toString");
1228
1228
  if (typeof e == "function") {
1229
1229
  const o = e(t);
1230
- return typeof o == "string" ? o : Ct(o);
1230
+ return typeof o == "string" ? o : At(o);
1231
1231
  }
1232
- return Ct(s);
1232
+ return At(s);
1233
1233
  }
1234
1234
  default:
1235
- return Ct(s);
1235
+ return At(s);
1236
1236
  }
1237
1237
  }
1238
1238
  function j(s, t) {
@@ -1242,7 +1242,7 @@ function j(s, t) {
1242
1242
  if (o.get) return L(o.get);
1243
1243
  if (typeof o.value == "function") return L(o.value);
1244
1244
  }
1245
- s = An(s);
1245
+ s = Cn(s);
1246
1246
  }
1247
1247
  function e() {
1248
1248
  return null;
@@ -1940,7 +1940,7 @@ const fo = M([
1940
1940
  } catch (l) {
1941
1941
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
1942
1942
  }
1943
- }, vo = function() {
1943
+ }, Eo = function() {
1944
1944
  return {
1945
1945
  afterSanitizeAttributes: [],
1946
1946
  afterSanitizeElements: [],
@@ -1968,7 +1968,7 @@ function Lo() {
1968
1968
  s.DocumentFragment;
1969
1969
  const r = s.HTMLTemplateElement, l = s.Node, c = s.Element, p = s.NodeFilter;
1970
1970
  s.NamedNodeMap === void 0 && (s.NamedNodeMap || s.MozNamedAttrMap), s.HTMLFormElement;
1971
- const m = s.DOMParser, E = s.trustedTypes, C = c.prototype, A = j(C, "cloneNode"), w = j(C, "remove"), v = j(C, "removeAttributeNode"), K = j(C, "nextSibling"), D = j(C, "childNodes"), N = j(C, "parentNode"), Ce = j(C, "shadowRoot"), qt = j(C, "attributes"), Q = l && l.prototype ? j(l.prototype, "nodeType") : null, rt = l && l.prototype ? j(l.prototype, "nodeName") : null, Lt = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(n) {
1971
+ const m = s.DOMParser, v = s.trustedTypes, A = c.prototype, C = j(A, "cloneNode"), w = j(A, "remove"), E = j(A, "removeAttributeNode"), K = j(A, "nextSibling"), D = j(A, "childNodes"), N = j(A, "parentNode"), Ae = j(A, "shadowRoot"), qt = j(A, "attributes"), Q = l && l.prototype ? j(l.prototype, "nodeType") : null, rt = l && l.prototype ? j(l.prototype, "nodeName") : null, Lt = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(n) {
1972
1972
  return Q ? Q(n) : n.nodeType;
1973
1973
  }, Vt = function(n) {
1974
1974
  return rt ? rt(n) : n.nodeName;
@@ -1977,28 +1977,28 @@ function Lo() {
1977
1977
  const u = e.createElement("template");
1978
1978
  u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
1979
1979
  }
1980
- let P, tt = "", Xt, Ae = !1, vt = 0;
1980
+ let P, tt = "", Xt, Ce = !1, Et = 0;
1981
1981
  const Se = function() {
1982
- if (vt > 0) throw X('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.');
1982
+ if (Et > 0) throw X('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.');
1983
1983
  }, at = function(n) {
1984
- Se(), vt++;
1984
+ Se(), Et++;
1985
1985
  try {
1986
1986
  return P.createHTML(n);
1987
1987
  } finally {
1988
- vt--;
1988
+ Et--;
1989
1989
  }
1990
1990
  }, Do = function(n) {
1991
- Se(), vt++;
1991
+ Se(), Et++;
1992
1992
  try {
1993
1993
  return P.createScriptURL(n);
1994
1994
  } finally {
1995
- vt--;
1995
+ Et--;
1996
1996
  }
1997
1997
  }, Ro = function() {
1998
- return Ae || (Xt = Qn(E, i), Ae = !0), Xt;
1998
+ return Ce || (Xt = Qn(v, i), Ce = !0), Xt;
1999
1999
  }, Mt = e, Zt = Mt.implementation, _e = Mt.createNodeIterator, No = Mt.createDocumentFragment, Po = Mt.getElementsByTagName, zo = o.importNode;
2000
- let T = vo();
2001
- t.isSupported = typeof Ao == "function" && typeof N == "function" && Zt && Zt.createHTMLDocument !== void 0;
2000
+ let T = Eo();
2001
+ t.isSupported = typeof Co == "function" && typeof N == "function" && Zt && Zt.createHTMLDocument !== void 0;
2002
2002
  const Bo = Fn, Fo = Hn, Ho = Un, Uo = jn, jo = Wn, Wo = $n, Le = Gn, $o = Yn;
2003
2003
  let Me = go, k = null;
2004
2004
  const Jt = y({}, [
@@ -2034,7 +2034,7 @@ function Lo() {
2034
2034
  enumerable: !0,
2035
2035
  value: !1
2036
2036
  }
2037
- })), Et = null, Ie = null;
2037
+ })), vt = null, Ie = null;
2038
2038
  const Y = Object.seal(mt(null, {
2039
2039
  tagCheck: {
2040
2040
  writable: !0,
@@ -2142,13 +2142,13 @@ function Lo() {
2142
2142
  }), Fe = Z(n, "ADD_DATA_URI_TAGS", He, {
2143
2143
  transform: _,
2144
2144
  base: He
2145
- }), ct = Z(n, "FORBID_CONTENTS", Be, { transform: _ }), Et = Z(n, "FORBID_TAGS", H({}), { transform: _ }), Ie = Z(n, "FORBID_ATTR", H({}), { transform: _ }), lt = z(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? H(n.USE_PROFILES) : n.USE_PROFILES : !1, Oe = n.ALLOW_ARIA_ATTR !== !1, te = n.ALLOW_DATA_ATTR !== !1, De = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = n.SAFE_FOR_TEMPLATES || !1, et = n.SAFE_FOR_XML !== !1, ot = n.WHOLE_DOCUMENT || !1, st = n.RETURN_DOM || !1, Dt = n.RETURN_DOM_FRAGMENT || !1, Rt = n.RETURN_TRUSTED_TYPE || !1, oe = n.FORCE_BODY || !1, Ne = n.SANITIZE_DOM !== !1, Pe = n.SANITIZE_NAMED_PROPS || !1, ne = n.KEEP_CONTENT !== !1, ie = n.IN_PLACE || !1, Me = Pn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : go, dt = typeof n.NAMESPACE == "string" ? n.NAMESPACE : $, se = ye(n, "MATHML_TEXT_INTEGRATION_POINTS", () => y({}, We)), le = ye(n, "HTML_INTEGRATION_POINTS", () => y({}, $e));
2145
+ }), ct = Z(n, "FORBID_CONTENTS", Be, { transform: _ }), vt = Z(n, "FORBID_TAGS", H({}), { transform: _ }), Ie = Z(n, "FORBID_ATTR", H({}), { transform: _ }), lt = z(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? H(n.USE_PROFILES) : n.USE_PROFILES : !1, Oe = n.ALLOW_ARIA_ATTR !== !1, te = n.ALLOW_DATA_ATTR !== !1, De = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = n.SAFE_FOR_TEMPLATES || !1, et = n.SAFE_FOR_XML !== !1, ot = n.WHOLE_DOCUMENT || !1, st = n.RETURN_DOM || !1, Dt = n.RETURN_DOM_FRAGMENT || !1, Rt = n.RETURN_TRUSTED_TYPE || !1, oe = n.FORCE_BODY || !1, Ne = n.SANITIZE_DOM !== !1, Pe = n.SANITIZE_NAMED_PROPS || !1, ne = n.KEEP_CONTENT !== !1, ie = n.IN_PLACE || !1, Me = Pn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : go, dt = typeof n.NAMESPACE == "string" ? n.NAMESPACE : $, se = ye(n, "MATHML_TEXT_INTEGRATION_POINTS", () => y({}, We)), le = ye(n, "HTML_INTEGRATION_POINTS", () => y({}, $e));
2146
2146
  const a = ye(n, "CUSTOM_ELEMENT_HANDLING", () => mt(null));
2147
2147
  if (W = mt(null), z(a, "tagNameCheck") && Ge(a.tagNameCheck) && (W.tagNameCheck = a.tagNameCheck), z(a, "attributeNameCheck") && Ge(a.attributeNameCheck) && (W.attributeNameCheck = a.attributeNameCheck), z(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), I(W), q && (te = !1), Dt && (st = !0), lt && (k = y({}, po), x = mt(null), lt.html === !0 && (y(k, fo), y(x, ho)), lt.svg === !0 && (y(k, he), y(x, be), y(x, Wt)), lt.svgFilters === !0 && (y(k, me), y(x, be), y(x, Wt)), lt.mathMl === !0 && (y(k, ge), y(x, mo), y(x, Wt))), Y.tagCheck = null, Y.attributeCheck = null, z(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? Y.tagCheck = n.ADD_TAGS : bt(n.ADD_TAGS) && (k === Jt && (k = H(k)), y(k, n.ADD_TAGS, _))), z(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? Y.attributeCheck = n.ADD_ATTR : bt(n.ADD_ATTR) && (x === Qt && (x = H(x)), y(x, n.ADD_ATTR, _))), z(n, "ADD_FORBID_CONTENTS") && bt(n.ADD_FORBID_CONTENTS) && (ct === Be && (ct = H(ct)), y(ct, n.ADD_FORBID_CONTENTS, _)), ne && (k["#text"] = !0), ot && y(k, [
2148
2148
  "html",
2149
2149
  "head",
2150
2150
  "body"
2151
- ]), k.table && (y(k, ["tbody"]), delete Et.tbody), n.TRUSTED_TYPES_POLICY) {
2151
+ ]), k.table && (y(k, ["tbody"]), delete vt.tbody), n.TRUSTED_TYPES_POLICY) {
2152
2152
  if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function") throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2153
2153
  if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2154
2154
  const d = P;
@@ -2187,7 +2187,7 @@ function Lo() {
2187
2187
  }
2188
2188
  }, qe = function(n, a, d) {
2189
2189
  try {
2190
- v(n, a);
2190
+ E(n, a);
2191
2191
  } catch (f) {
2192
2192
  try {
2193
2193
  n.removeAttribute(d);
@@ -2224,7 +2224,7 @@ function Lo() {
2224
2224
  from: a
2225
2225
  });
2226
2226
  try {
2227
- d ? v(a, d) : a.removeAttribute(n);
2227
+ d ? E(a, d) : a.removeAttribute(n);
2228
2228
  } catch (f) {
2229
2229
  try {
2230
2230
  a.removeAttribute(n);
@@ -2350,13 +2350,13 @@ function Lo() {
2350
2350
  }
2351
2351
  return !1;
2352
2352
  }, nn = function(n, a, d) {
2353
- if (!Et[a] && eo(a) && Ut(W.tagNameCheck, a)) return !1;
2353
+ if (!vt[a] && eo(a) && Ut(W.tagNameCheck, a)) return !1;
2354
2354
  if (ne && !ct[a]) {
2355
2355
  const f = N(n), h = D(n);
2356
2356
  if (h && f) {
2357
2357
  const g = h.length;
2358
2358
  for (let b = g - 1; b >= 0; --b) {
2359
- const S = n === d ? A(h[b], !0) : h[b];
2359
+ const S = n === d ? C(h[b], !0) : h[b];
2360
2360
  f.insertBefore(S, K(n));
2361
2361
  }
2362
2362
  }
@@ -2377,7 +2377,7 @@ function Lo() {
2377
2377
  }), pt(n, a)) return !0;
2378
2378
  if (on(n, d))
2379
2379
  return V(n), !0;
2380
- if (Et[d] || !(Y.tagCheck instanceof Function && Y.tagCheck(d)) && !k[d]) {
2380
+ if (vt[d] || !(Y.tagCheck instanceof Function && Y.tagCheck(d)) && !k[d]) {
2381
2381
  const f = nn(n, d, a);
2382
2382
  return f === !1 && (G(T.afterSanitizeElements, n, null), pt(n, a)) ? !0 : f;
2383
2383
  }
@@ -2404,7 +2404,7 @@ function Lo() {
2404
2404
  ]), eo = function(n) {
2405
2405
  return !rn[_t(n)] && O($o, n);
2406
2406
  }, an = function(n, a, d, f) {
2407
- if (P && typeof E == "object" && typeof E.getAttributeType == "function" && !d) switch (E.getAttributeType(n, a)) {
2407
+ if (P && typeof v == "object" && typeof v.getAttributeType == "function" && !d) switch (v.getAttributeType(n, a)) {
2408
2408
  case "TrustedHTML":
2409
2409
  return at(f);
2410
2410
  case "TrustedScriptURL":
@@ -2464,7 +2464,7 @@ function Lo() {
2464
2464
  const d = Ze(n);
2465
2465
  for (G(T.beforeSanitizeShadowDOM, n, null); a = d.nextNode(); )
2466
2466
  if (G(T.uponSanitizeShadowNode, a, null), Qe(a, n), oo(a, n), ft(a.content) && jt(a.content), yt(a) === F.element) {
2467
- const f = Ce(a);
2467
+ const f = Ae(a);
2468
2468
  ft(f) && (ue(f), jt(f));
2469
2469
  }
2470
2470
  G(T.afterSanitizeShadowDOM, n, null);
@@ -2495,7 +2495,7 @@ function Lo() {
2495
2495
  }
2496
2496
  }
2497
2497
  if (h) {
2498
- const b = Ce(f);
2498
+ const b = Ae(f);
2499
2499
  ft(b) && a.push({
2500
2500
  node: null,
2501
2501
  shadow: b
@@ -2518,7 +2518,7 @@ function Lo() {
2518
2518
  const U = Vt(u);
2519
2519
  if (typeof U == "string") {
2520
2520
  const B = _(U);
2521
- if (!k[B] || Et[B])
2521
+ if (!k[B] || vt[B])
2522
2522
  throw zt(u), X("root node is forbidden and cannot be sanitized in-place");
2523
2523
  }
2524
2524
  if (Ht(u))
@@ -2583,7 +2583,7 @@ function Lo() {
2583
2583
  }, t.removeHooks = function(u) {
2584
2584
  z(T, u) && (T[u] = []);
2585
2585
  }, t.removeAllHooks = function() {
2586
- T = vo();
2586
+ T = Eo();
2587
2587
  }, t;
2588
2588
  }
2589
2589
  var $t = Lo();
@@ -2662,22 +2662,22 @@ function Mo(s, t, e, o) {
2662
2662
  if ((t == null ? void 0 : t.sanitize) === !1)
2663
2663
  return s;
2664
2664
  const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ti, 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 : ei, p = /* @__PURE__ */ new Set();
2665
- for (const C of Object.values(c))
2666
- for (const A of C) p.add(A);
2665
+ for (const A of Object.values(c))
2666
+ for (const C of A) p.add(C);
2667
2667
  const m = {
2668
2668
  ALLOWED_TAGS: r,
2669
2669
  ALLOWED_ATTR: Array.from(p)
2670
2670
  };
2671
2671
  if (!o)
2672
2672
  return $t.sanitize(s, m);
2673
- const E = r.includes("iframe");
2673
+ const v = r.includes("iframe");
2674
2674
  $t.addHook(
2675
2675
  "uponSanitizeElement",
2676
- (C, A) => {
2677
- var v;
2678
- if (A.tagName !== "iframe") return;
2679
- const w = C;
2680
- A.allowedTags.iframe = E || ((v = w.getAttribute) == null ? void 0 : v.call(w, oi)) === "true" && ni(w.getAttribute("src"));
2676
+ (A, C) => {
2677
+ var E;
2678
+ if (C.tagName !== "iframe") return;
2679
+ const w = A;
2680
+ C.allowedTags.iframe = v || ((E = w.getAttribute) == null ? void 0 : E.call(w, oi)) === "true" && ni(w.getAttribute("src"));
2681
2681
  }
2682
2682
  );
2683
2683
  try {
@@ -2692,7 +2692,7 @@ function ii(s, t, e, o) {
2692
2692
  function ri(s, t, e) {
2693
2693
  return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? s : ii(s, t);
2694
2694
  }
2695
- function Eo(s, t, e, o) {
2695
+ function vo(s, t, e, o) {
2696
2696
  return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? s : Mo(s, t, o, !0);
2697
2697
  }
2698
2698
  const ai = ".resize-handle, .table-resize-handle", si = /resize-handle/;
@@ -2709,7 +2709,7 @@ function Io(s) {
2709
2709
  o.style.position === "relative" && (o.style.removeProperty("position"), (i = o.getAttribute("style")) != null && i.trim() || o.removeAttribute("style"));
2710
2710
  }), t.innerHTML;
2711
2711
  }
2712
- function At(s) {
2712
+ function Ct(s) {
2713
2713
  return s ? Io(s.innerHTML) : "";
2714
2714
  }
2715
2715
  const Yt = class Yt {
@@ -3050,14 +3050,14 @@ class li {
3050
3050
  }
3051
3051
  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}}';
3052
3052
  let Gt;
3053
- const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", wo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", xe = /* @__PURE__ */ new Set();
3054
- let J = null, ko = !1, ve = null, Ee = null;
3053
+ const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", wo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", fi = "Rich text editor", xe = /* @__PURE__ */ new Set();
3054
+ let J = null, ko = !1, Ee = null, ve = null;
3055
3055
  function xo(s) {
3056
3056
  if (!(s instanceof HTMLElement)) return !1;
3057
3057
  const t = s;
3058
3058
  return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
3059
3059
  }
3060
- function fi(s) {
3060
+ function pi(s) {
3061
3061
  return s ? s.nodeType === Node.ELEMENT_NODE ? s : s.parentElement : null;
3062
3062
  }
3063
3063
  function St(s) {
@@ -3067,7 +3067,7 @@ function St(s) {
3067
3067
  const t = s.matches(wo) ? s : s.closest(wo);
3068
3068
  return !t || !xo(t) ? null : t;
3069
3069
  }
3070
- function pi() {
3070
+ function hi() {
3071
3071
  var i;
3072
3072
  if (typeof window == "undefined") return null;
3073
3073
  const s = window[di];
@@ -3092,7 +3092,7 @@ function pi() {
3092
3092
  }
3093
3093
  const o = (i = window.getSelection) == null ? void 0 : i.call(window);
3094
3094
  if (o && o.rangeCount > 0) {
3095
- const r = St(fi(o.getRangeAt(0).startContainer));
3095
+ const r = St(pi(o.getRangeAt(0).startContainer));
3096
3096
  if (r) return r;
3097
3097
  }
3098
3098
  if (J && J.isConnected)
@@ -3101,16 +3101,16 @@ function pi() {
3101
3101
  if (r.isConnected) return r;
3102
3102
  return null;
3103
3103
  }
3104
- function hi() {
3104
+ function mi() {
3105
3105
  if (typeof window == "undefined" || ko) return;
3106
- ve = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, Ee = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3106
+ Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, ve = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3107
3107
  const s = (t, ...e) => {
3108
- const o = pi();
3109
- return o ? o.execCommand(t, ...e) : ve ? ve(t, ...e) : Ee ? Ee(t, ...e) : !1;
3108
+ const o = hi();
3109
+ return o ? o.execCommand(t, ...e) : Ee ? Ee(t, ...e) : ve ? ve(t, ...e) : !1;
3110
3110
  };
3111
3111
  window.executeEditorCommand = s, window.execEditorCommand = s, ko = !0;
3112
3112
  }
3113
- function mi() {
3113
+ function gi() {
3114
3114
  const s = "editora-webcomponent-styles";
3115
3115
  if (!document.getElementById(s)) {
3116
3116
  const t = document.createElement("style");
@@ -3124,7 +3124,7 @@ function Oo() {
3124
3124
  }
3125
3125
  return Gt;
3126
3126
  }
3127
- function bi(s) {
3127
+ function yi(s) {
3128
3128
  const t = Oo();
3129
3129
  Object.entries(s).forEach(([e, o]) => {
3130
3130
  t.register(e, o);
@@ -3132,7 +3132,7 @@ function bi(s) {
3132
3132
  }
3133
3133
  class gt extends HTMLElement {
3134
3134
  constructor() {
3135
- if (super(), this.pluginLoader = Oo(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new cn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, mi(), !this.hasAttribute("data-initial-content")) {
3135
+ if (super(), this.pluginLoader = Oo(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new cn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, gi(), !this.hasAttribute("data-initial-content")) {
3136
3136
  const t = this.innerHTML.trim();
3137
3137
  t && this.setAttribute("data-initial-content", t);
3138
3138
  }
@@ -3152,6 +3152,7 @@ class gt extends HTMLElement {
3152
3152
  "disabled",
3153
3153
  "theme",
3154
3154
  "placeholder",
3155
+ "aria-label",
3155
3156
  "autofocus",
3156
3157
  "autosave",
3157
3158
  "autosave-enabled",
@@ -3233,7 +3234,7 @@ class gt extends HTMLElement {
3233
3234
  async initialize() {
3234
3235
  var i;
3235
3236
  if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
3236
- this.setAttribute("data-editora-editor", "true"), xe.add(this), J || (J = this), hi(), 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}`);
3237
+ this.setAttribute("data-editora-editor", "true"), xe.add(this), J || (J = 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}`);
3237
3238
  const t = await this.loadPlugins();
3238
3239
  if (this.loadedPlugins = t, t.forEach((r) => {
3239
3240
  if (r.init && typeof r.init == "function")
@@ -3380,12 +3381,13 @@ class gt extends HTMLElement {
3380
3381
  return t.bottom >= 0 && t.top <= window.innerHeight;
3381
3382
  }
3382
3383
  applyAccessibilitySettings() {
3384
+ var e;
3383
3385
  if (!this.contentElement) return;
3384
3386
  const t = this.getAccessibilityConfig();
3385
3387
  if (t.enableARIA) {
3386
3388
  this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute("aria-disabled", this.config.readonly ? "true" : "false");
3387
- const e = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3388
- e ? this.contentElement.setAttribute("aria-label", e) : this.contentElement.removeAttribute("aria-label");
3389
+ const o = (e = this.getAttribute("aria-label")) == null ? void 0 : e.trim(), i = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3390
+ this.contentElement.setAttribute("aria-label", o || i || fi);
3389
3391
  } else
3390
3392
  this.contentElement.removeAttribute("role"), this.contentElement.removeAttribute("aria-multiline"), this.contentElement.removeAttribute("aria-disabled"), this.contentElement.removeAttribute("aria-label");
3391
3393
  this.contentElement.tabIndex = t.keyboardNavigation ? 0 : -1;
@@ -3485,7 +3487,7 @@ class gt extends HTMLElement {
3485
3487
  * editable DOM: sanitizing only after the first edit leaves the page exposed until then.
3486
3488
  */
3487
3489
  sanitizeLoadedContent(t) {
3488
- return Eo(t, this.getContentSanitizeConfig(), this.getSecurityConfig());
3490
+ return vo(t, this.getContentSanitizeConfig(), this.getSecurityConfig());
3489
3491
  }
3490
3492
  getAutosaveConfig() {
3491
3493
  var e, o;
@@ -3553,7 +3555,7 @@ class gt extends HTMLElement {
3553
3555
  this.stopAutosave();
3554
3556
  const t = this.getAutosaveConfig();
3555
3557
  !t.enabled || !this.contentElement || (this.autosaveTimer = setInterval(() => {
3556
- this.persistAutosave(At(this.contentElement));
3558
+ this.persistAutosave(Ct(this.contentElement));
3557
3559
  }, t.intervalMs));
3558
3560
  }
3559
3561
  insertHTMLAtSelection(t) {
@@ -3591,8 +3593,8 @@ class gt extends HTMLElement {
3591
3593
  this.contentElement.focus();
3592
3594
  const p = window.getSelection();
3593
3595
  if (!p || p.rangeCount === 0 || !this.contentElement.contains(p.anchorNode)) {
3594
- const m = document.createRange(), E = this.contentElement.lastChild || this.contentElement;
3595
- E.nodeType === Node.TEXT_NODE ? m.setStart(E, ((c = E.textContent) == null ? void 0 : c.length) || 0) : E.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(E), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), p == null || p.removeAllRanges(), p == null || p.addRange(m);
3596
+ const m = document.createRange(), v = this.contentElement.lastChild || this.contentElement;
3597
+ v.nodeType === Node.TEXT_NODE ? m.setStart(v, ((c = v.textContent) == null ? void 0 : c.length) || 0) : v.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(v), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), p == null || p.removeAllRanges(), p == null || p.addRange(m);
3596
3598
  }
3597
3599
  }
3598
3600
  return this.executeCommand(r, l);
@@ -3627,41 +3629,41 @@ class gt extends HTMLElement {
3627
3629
  this.contentElement.addEventListener("beforeinput", (o) => {
3628
3630
  this.lastBeforeInputType = o.inputType || null;
3629
3631
  }), this.contentElement.addEventListener("input", (o) => {
3630
- var A;
3632
+ var C;
3631
3633
  if (!this.contentElement) return;
3632
3634
  let i = this.contentElement.innerHTML;
3633
- const r = (A = o == null ? void 0 : o.detail) == null ? void 0 : A.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
3635
+ const r = (C = o == null ? void 0 : o.detail) == null ? void 0 : C.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
3634
3636
  if (this.lastBeforeInputType = null, p.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3635
- const w = Eo(i, c, p, r);
3637
+ const w = vo(i, c, p, r);
3636
3638
  if (w !== i) {
3637
- const v = window.getSelection(), K = v && v.rangeCount > 0 ? v.getRangeAt(0) : null;
3638
- if (this.contentElement.innerHTML = w, K && v)
3639
+ const E = window.getSelection(), K = E && E.rangeCount > 0 ? E.getRangeAt(0) : null;
3640
+ if (this.contentElement.innerHTML = w, K && E)
3639
3641
  try {
3640
- v.removeAllRanges(), v.addRange(K);
3642
+ E.removeAllRanges(), E.addRange(K);
3641
3643
  } catch (D) {
3642
3644
  }
3643
3645
  i = w;
3644
3646
  }
3645
3647
  }
3646
3648
  this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
3647
- const C = () => {
3649
+ const A = () => {
3648
3650
  this.dispatchEvent(new CustomEvent("content-change", {
3649
3651
  detail: { html: Io(i) },
3650
3652
  bubbles: !0
3651
3653
  }));
3652
3654
  };
3653
- l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(C, l.debounceInputMs) : C(), this.updateStatusBar();
3655
+ l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(A, l.debounceInputMs) : A(), this.updateStatusBar();
3654
3656
  }), this.contentElement.addEventListener("contextmenu", (o) => {
3655
3657
  const i = this.config.contextMenu;
3656
3658
  (i === !1 || typeof i == "object" && i !== null && i.enabled === !1) && o.preventDefault();
3657
3659
  }), this.contentElement.addEventListener("paste", (o) => {
3658
- var E, C;
3660
+ var v, A;
3659
3661
  if (o.__editoraSmartPasteHandled === !0 || o.defaultPrevented)
3660
3662
  return;
3661
3663
  o.preventDefault();
3662
3664
  const i = this.config.paste || {};
3663
- let r = ((E = o.clipboardData) == null ? void 0 : E.getData("text/html")) || "";
3664
- const l = ((C = o.clipboardData) == null ? void 0 : C.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3665
+ let r = ((v = o.clipboardData) == null ? void 0 : v.getData("text/html")) || "";
3666
+ const l = ((A = o.clipboardData) == null ? void 0 : A.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3665
3667
  if ((i.clean || !i.keepFormatting) && l) {
3666
3668
  document.execCommand("insertText", !1, l);
3667
3669
  return;
@@ -3679,7 +3681,7 @@ class gt extends HTMLElement {
3679
3681
  J = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
3680
3682
  }), this.contentElement.addEventListener("blur", () => {
3681
3683
  this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.dispatchEvent(new CustomEvent("content-change", {
3682
- detail: { html: At(this.contentElement) },
3684
+ detail: { html: Ct(this.contentElement) },
3683
3685
  bubbles: !0
3684
3686
  })), this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
3685
3687
  }), this.contentElement.addEventListener("keydown", (o) => {
@@ -3763,7 +3765,7 @@ class gt extends HTMLElement {
3763
3765
  const o = this.contentElement.textContent || "", { words: i, chars: r } = yn(o), l = bn(this.contentElement);
3764
3766
  let c, p;
3765
3767
  const m = this.getSelectionRangeInEditor();
3766
- m && (c = mn(this.contentElement, m), m.collapsed || (p = vn(m, c), c = void 0)), this.statusBar.update({
3768
+ m && (c = mn(this.contentElement, m), m.collapsed || (p = En(m, c), c = void 0)), this.statusBar.update({
3767
3769
  wordCount: i,
3768
3770
  charCount: r,
3769
3771
  lineCount: l,
@@ -3794,6 +3796,7 @@ class gt extends HTMLElement {
3794
3796
  case "placeholder":
3795
3797
  this.contentElement && (this.contentElement.setAttribute("data-placeholder", e), this.applyAccessibilitySettings());
3796
3798
  break;
3799
+ case "aria-label":
3797
3800
  case "accessibility":
3798
3801
  case "accessibility-enable-aria":
3799
3802
  case "accessibility-keyboard-navigation":
@@ -3865,7 +3868,7 @@ class gt extends HTMLElement {
3865
3868
  */
3866
3869
  getAPI() {
3867
3870
  return {
3868
- getContent: () => At(this.contentElement),
3871
+ getContent: () => Ct(this.contentElement),
3869
3872
  setContent: (t) => {
3870
3873
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
3871
3874
  },
@@ -3893,11 +3896,11 @@ class gt extends HTMLElement {
3893
3896
  */
3894
3897
  destroy() {
3895
3898
  var t, e, o, i;
3896
- this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = At(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), J === this && (J = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3899
+ 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), J === this && (J = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3897
3900
  }
3898
3901
  // Public API methods
3899
3902
  getContent() {
3900
- return At(this.contentElement);
3903
+ return Ct(this.contentElement);
3901
3904
  }
3902
3905
  setContent(t) {
3903
3906
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
@@ -3919,7 +3922,7 @@ export {
3919
3922
  Kt as E,
3920
3923
  pn as F,
3921
3924
  cn as K,
3922
- Co as P,
3925
+ Ao as P,
3923
3926
  gt as R,
3924
3927
  ln as S,
3925
3928
  fn as T,
@@ -3929,15 +3932,15 @@ export {
3929
3932
  hn as d,
3930
3933
  yn as e,
3931
3934
  bn as f,
3932
- gi as g,
3933
- At as h,
3935
+ bi as g,
3936
+ Ct as h,
3934
3937
  mn as i,
3935
- vn as j,
3938
+ En as j,
3936
3939
  gn as k,
3937
- Eo as l,
3940
+ vo as l,
3938
3941
  ri as m,
3939
3942
  Io as n,
3940
- bi as o,
3943
+ yi as o,
3941
3944
  ii as s
3942
3945
  };
3943
- //# sourceMappingURL=index-DeUjxpKd.mjs.map
3946
+ //# sourceMappingURL=index-6i4_TH66.mjs.map