@editora/core 1.0.15 → 1.0.16

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 (68) hide show
  1. package/dist/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-DIKuCeFw.mjs} +82 -79
  2. package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-DXZdK3zr.mjs} +72 -71
  3. package/dist/{ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs → ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs} +239 -238
  4. package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-H3XyYD7_.mjs} +2 -2
  5. package/dist/{BlocksLibraryPlugin.native-5sdsXsiE.mjs → BlocksLibraryPlugin.native-CownM6Rk.mjs} +140 -116
  6. package/dist/{CapitalizationPlugin.native-DLV4oPmB.mjs → CapitalizationPlugin.native-C-HRbXGh.mjs} +10 -5
  7. package/dist/{ChecklistPlugin.native-BS-kMz9O.mjs → ChecklistPlugin.native-NVrBUkaL.mjs} +141 -103
  8. package/dist/{CitationsPlugin.native-DQgoCd1B.mjs → CitationsPlugin.native-C_7wWQ-k.mjs} +441 -422
  9. package/dist/{ClearFormattingPlugin.native-B6ro3a1h.mjs → ClearFormattingPlugin.native-Pp0O-SBf.mjs} +24 -23
  10. package/dist/{CodePlugin.native-knhM8NNo.mjs → CodePlugin.native-BH-K4xmW.mjs} +474 -342
  11. package/dist/CodePlugin.native-hNgfXlfS.mjs +4767 -0
  12. package/dist/CodeSamplePlugin.native-svbAFWh_.mjs +501 -0
  13. package/dist/CollaborationPlugin.native-oSybCGPW.mjs +7468 -0
  14. package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-CLip9wAO.mjs} +233 -185
  15. package/dist/{ConditionalContentPlugin.native-CfhY46rU.mjs → ConditionalContentPlugin.native-Bf7XgRSW.mjs} +401 -351
  16. package/dist/{DataBindingPlugin.native-BoXwghTz.mjs → DataBindingPlugin.native-B7lpI_0c.mjs} +29 -28
  17. package/dist/{DocumentManagerPlugin.native-D1YHQ2NN.mjs → DocumentManagerPlugin.native-iFip6s4Q.mjs} +94 -45
  18. package/dist/{EmbedIframePlugin.native-BF_-LjTq.mjs → EmbedIframePlugin.native-BfZ_HGlV.mjs} +231 -186
  19. package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-D92aaOKi.mjs} +288 -76
  20. package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-M3cNQ0KA.mjs} +57 -50
  21. package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-DsLrH8eq.mjs} +41 -34
  22. package/dist/{FormatPainterPlugin.native-CsMrKfFU.mjs → FormatPainterPlugin.native-BhjzsiVq.mjs} +3 -2
  23. package/dist/{HistoryPlugin.native-D2wl32jV.mjs → HistoryPlugin.native-DPvhks6h.mjs} +36 -32
  24. package/dist/LinkPlugin.native-BsQXYsK6.mjs +352 -0
  25. package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-Bt0LANbO.mjs} +68 -35
  26. package/dist/{MathPlugin.native-NwWPHVmj.mjs → MathPlugin.native-Byo3WL0f.mjs} +211 -115
  27. package/dist/{MediaManagerPlugin.native-eOsTJFpw.mjs → MediaManagerPlugin.native-BT1NZIJS.mjs} +139 -134
  28. package/dist/{MentionPlugin.native-BMDlOqur.mjs → MentionPlugin.native-S_lwGZQO.mjs} +23 -18
  29. package/dist/{MergeTagPlugin.native-BzRVoD9-.mjs → MergeTagPlugin.native-7-6F3S1Y.mjs} +44 -43
  30. package/dist/{PreviewPlugin.native-WuIwOAOR.mjs → PreviewPlugin.native-CiR51jql.mjs} +31 -28
  31. package/dist/{SlashCommandsPlugin.native-BiN6ODw5.mjs → SlashCommandsPlugin.native-BDIIwGNs.mjs} +90 -79
  32. package/dist/{SmartPastePlugin.native-CZAEHkyt.mjs → SmartPastePlugin.native-BATLCds5.mjs} +89 -85
  33. package/dist/{SpecialCharactersPlugin.native-DaG4b19I.mjs → SpecialCharactersPlugin.native-CdZoc1GB.mjs} +73 -26
  34. package/dist/SpellCheckPlugin.native-Bef2oTLB.mjs +10935 -0
  35. package/dist/TablePlugin.native-BjIxYZ2X.mjs +772 -0
  36. package/dist/{TemplatePlugin.native-DLjFUaPW.mjs → TemplatePlugin.native-D6n5RUnC.mjs} +288 -262
  37. package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-KMZ2uzlq.mjs} +2 -2
  38. package/dist/{TranslationWorkflowPlugin.native-DdF16tgT.mjs → TranslationWorkflowPlugin.native-CZtG--06.mjs} +67 -65
  39. package/dist/{VersionDiffPlugin.native-Bvxgy--t.mjs → VersionDiffPlugin.native-Ca1fMWUJ.mjs} +42 -42
  40. package/dist/anchoredPopover-DJFD2oAP.mjs +116 -0
  41. package/dist/core.css +1 -1
  42. package/dist/dialogHelpers-DBf7WqYH.mjs +40 -0
  43. package/dist/editora.min.js +26 -24
  44. package/dist/editora.umd.js +26 -24
  45. package/dist/escapeHtml-CX8RelZ1.mjs +7 -0
  46. package/dist/historyHelpers-B0-4mq1E.mjs +15 -0
  47. package/dist/index-B1_vtXRz.mjs +3910 -0
  48. package/dist/index-C6BoNR2t.js +12 -0
  49. package/dist/index.cjs.js +3 -3
  50. package/dist/index.esm.js +17 -14
  51. package/dist/plugin-loader.js +53 -52
  52. package/dist/webcomponent-core.js +2039 -473
  53. package/dist/webcomponent-core.min.css +1 -1
  54. package/dist/webcomponent-core.min.js +96 -66
  55. package/dist/webcomponent.cjs.js +1 -1
  56. package/dist/webcomponent.esm.js +1 -1
  57. package/dist/webcomponent.js +2208 -641
  58. package/dist/webcomponent.min.css +1 -1
  59. package/dist/webcomponent.min.js +1564 -1198
  60. package/index.d.ts +32 -0
  61. package/package.json +10 -3
  62. package/dist/CodeSamplePlugin.native-CgGoH-X4.mjs +0 -384
  63. package/dist/LinkPlugin.native-DYCIcdTm.mjs +0 -283
  64. package/dist/SpellCheckPlugin.native-BZB9AewP.mjs +0 -1039
  65. package/dist/TablePlugin.native-DrHX-efe.mjs +0 -495
  66. package/dist/anchoredPopover-Bxds0VoB.mjs +0 -110
  67. package/dist/index-BLm1MtzH.js +0 -10
  68. package/dist/index-Cd9jEuZP.mjs +0 -2341
@@ -1,4 +1,4 @@
1
- class P {
1
+ class xo {
2
2
  constructor() {
3
3
  this.loadedPlugins = /* @__PURE__ */ new Map(), this.pluginRegistry = /* @__PURE__ */ new Map();
4
4
  }
@@ -14,10 +14,10 @@ class P {
14
14
  async load(t, e) {
15
15
  if (this.loadedPlugins.has(t))
16
16
  return this.loadedPlugins.get(t);
17
- const o = this.pluginRegistry.get(t);
18
- if (!o)
17
+ const n = this.pluginRegistry.get(t);
18
+ if (!n)
19
19
  return console.warn(`Plugin not found: ${t}`), null;
20
- const r = await o();
20
+ const r = await n();
21
21
  return e && this.applyPluginConfig(r, e), this.loadedPlugins.set(t, r), r;
22
22
  }
23
23
  /**
@@ -32,8 +32,8 @@ class P {
32
32
  * Parse plugin string "lists link image media"
33
33
  */
34
34
  async parsePluginString(t, e) {
35
- const o = t.split(/\s+/).filter(Boolean);
36
- return this.loadMultiple(o, e);
35
+ const n = t.split(/\s+/).filter(Boolean);
36
+ return this.loadMultiple(n, e);
37
37
  }
38
38
  /**
39
39
  * Apply configuration to plugin
@@ -72,54 +72,54 @@ class P {
72
72
  return this.loadedPlugins.has(t);
73
73
  }
74
74
  }
75
- class v {
76
- constructor(t, e, o) {
77
- this.doc = t, this.selection = e, this.schema = o;
75
+ class Gt {
76
+ constructor(t, e, n) {
77
+ this.doc = t, this.selection = e, this.schema = n;
78
78
  }
79
79
  static create(t, e) {
80
- const o = e || t.node("doc", {}, [t.node("paragraph")]);
81
- return new v(o, { anchor: 0, head: 0 }, t);
80
+ const n = e || t.node("doc", {}, [t.node("paragraph")]);
81
+ return new Gt(n, { anchor: 0, head: 0 }, t);
82
82
  }
83
83
  apply(t, e) {
84
- return new v(t, e || this.selection, this.schema);
84
+ return new Gt(t, e || this.selection, this.schema);
85
85
  }
86
86
  }
87
- class B {
87
+ class rn {
88
88
  constructor(t, e) {
89
89
  this.nodes = new Map(Object.entries(t)), this.marks = new Map(Object.entries(e));
90
90
  }
91
- node(t, e, o) {
92
- return { type: t, attrs: e, content: o };
91
+ node(t, e, n) {
92
+ return { type: t, attrs: e, content: n };
93
93
  }
94
94
  text(t, e) {
95
95
  return { type: "text", text: t, marks: e };
96
96
  }
97
97
  }
98
- class N {
98
+ class an {
99
99
  constructor() {
100
100
  this.plugins = [], this.pluginConfigs = /* @__PURE__ */ new Map();
101
101
  }
102
102
  register(t, e) {
103
103
  this.plugins.push(t), e && this.pluginConfigs.set(t.name, e);
104
- const o = this.pluginConfigs.get(t.name) || t.config;
104
+ const n = this.pluginConfigs.get(t.name) || t.config;
105
105
  if (t.initialize)
106
106
  try {
107
- t.initialize(o);
107
+ t.initialize(n);
108
108
  } catch (r) {
109
109
  console.error(`Failed to initialize plugin "${t.name}":`, r);
110
110
  }
111
111
  if (t.init && t.init !== t.initialize)
112
112
  try {
113
- t.init(o);
113
+ t.init(n);
114
114
  } catch (r) {
115
115
  console.error(`Failed to run init hook for plugin "${t.name}":`, r);
116
116
  }
117
117
  }
118
118
  unregister(t) {
119
- const e = this.plugins.findIndex((o) => o.name === t);
119
+ const e = this.plugins.findIndex((n) => n.name === t);
120
120
  if (e > -1) {
121
- const o = this.plugins[e];
122
- o.destroy && o.destroy(), this.plugins.splice(e, 1), this.pluginConfigs.delete(t);
121
+ const n = this.plugins[e];
122
+ n.destroy && n.destroy(), this.plugins.splice(e, 1), this.pluginConfigs.delete(t);
123
123
  }
124
124
  }
125
125
  getPlugin(t) {
@@ -130,9 +130,9 @@ class N {
130
130
  }
131
131
  buildSchema() {
132
132
  const t = {}, e = {};
133
- return this.plugins.forEach((o) => {
134
- o.nodes && Object.assign(t, o.nodes), o.marks && Object.assign(e, o.marks);
135
- }), new B(t, e);
133
+ return this.plugins.forEach((n) => {
134
+ n.nodes && Object.assign(t, n.nodes), n.marks && Object.assign(e, n.marks);
135
+ }), new rn(t, e);
136
136
  }
137
137
  getCommands() {
138
138
  const t = {};
@@ -146,36 +146,36 @@ class N {
146
146
  /**
147
147
  * Execute plugin command with mode awareness
148
148
  */
149
- async executePluginCommand(t, e, ...o) {
149
+ async executePluginCommand(t, e, ...n) {
150
150
  const r = this.getPlugin(t);
151
151
  if (!r)
152
152
  throw new Error(`Plugin not found: ${t}`);
153
- const n = this.getPluginConfig(t) || r.config || {}, a = n.mode || "local";
153
+ const a = this.getPluginConfig(t) || r.config || {}, l = a.mode || "local";
154
154
  try {
155
- switch (a) {
155
+ switch (l) {
156
156
  case "local":
157
- return r.executeLocal ? r.executeLocal(e, ...o) : null;
157
+ return r.executeLocal ? r.executeLocal(e, ...n) : null;
158
158
  case "api":
159
159
  if (!r.executeAPI)
160
160
  throw new Error(`Plugin ${t} does not support API mode`);
161
- return await r.executeAPI(e, ...o);
161
+ return await r.executeAPI(e, ...n);
162
162
  case "hybrid":
163
163
  if (r.executeHybrid)
164
- return await r.executeHybrid(e, ...o);
164
+ return await r.executeHybrid(e, ...n);
165
165
  try {
166
166
  if (r.executeAPI)
167
- return await r.executeAPI(e, ...o);
168
- } catch (s) {
169
- if (console.warn(`API execution failed for ${t}, falling back to local`, s), r.executeLocal && n.fallbackToLocal !== !1)
170
- return r.executeLocal(e, ...o);
171
- throw s;
167
+ return await r.executeAPI(e, ...n);
168
+ } catch (c) {
169
+ if (console.warn(`API execution failed for ${t}, falling back to local`, c), r.executeLocal && a.fallbackToLocal !== !1)
170
+ return r.executeLocal(e, ...n);
171
+ throw c;
172
172
  }
173
173
  break;
174
174
  default:
175
- throw new Error(`Unknown plugin mode: ${a}`);
175
+ throw new Error(`Unknown plugin mode: ${l}`);
176
176
  }
177
- } catch (s) {
178
- throw console.error(`Error executing command ${e} on plugin ${t}:`, s), s;
177
+ } catch (c) {
178
+ throw console.error(`Error executing command ${e} on plugin ${t}:`, c), c;
179
179
  }
180
180
  }
181
181
  /**
@@ -186,10 +186,10 @@ class N {
186
186
  await Promise.all(t), this.plugins = [], this.pluginConfigs.clear();
187
187
  }
188
188
  }
189
- class O {
189
+ class sn {
190
190
  constructor(t = {}) {
191
- this.commands = /* @__PURE__ */ new Map(), Object.entries(t).forEach(([e, o]) => {
192
- this.register(e, o);
191
+ this.commands = /* @__PURE__ */ new Map(), Object.entries(t).forEach(([e, n]) => {
192
+ this.register(e, n);
193
193
  });
194
194
  }
195
195
  /**
@@ -229,11 +229,11 @@ class O {
229
229
  this.commands.clear();
230
230
  }
231
231
  }
232
- class R {
232
+ class ln {
233
233
  constructor(t = {}) {
234
- this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new N(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
234
+ this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new an(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((n) => this.pluginManager.register(n));
235
235
  const e = this.pluginManager.buildSchema();
236
- this.state = v.create(e), this.commandRegistry = new O(this.pluginManager.getCommands());
236
+ this.state = Gt.create(e), this.commandRegistry = new sn(this.pluginManager.getCommands());
237
237
  }
238
238
  /**
239
239
  * Execute a command
@@ -243,14 +243,14 @@ class R {
243
243
  return console.warn("Cannot execute commands in readonly mode"), !1;
244
244
  if (this.isDestroyed)
245
245
  return console.warn("Cannot execute commands on destroyed editor"), !1;
246
- const o = this.commandRegistry.get(t);
247
- if (!o)
246
+ const n = this.commandRegistry.get(t);
247
+ if (!n)
248
248
  return console.warn(`Command not found: ${t}`), !1;
249
249
  let r;
250
- return e.length === 0 ? r = o(this.state) : e.length === 1 ? r = o(this.state, e[0]) : r = o(this.state, ...e), r instanceof Promise ? (r.then((n) => {
251
- n && typeof n == "object" && "doc" in n && "selection" in n && (this.setState(n), this.emit("change", this.state));
252
- }).catch((n) => {
253
- console.error(`Async command failed: ${t}`, n);
250
+ return e.length === 0 ? r = n(this.state) : e.length === 1 ? r = n(this.state, e[0]) : r = n(this.state, ...e), r instanceof Promise ? (r.then((a) => {
251
+ a && typeof a == "object" && "doc" in a && "selection" in a && (this.setState(a), this.emit("change", this.state));
252
+ }).catch((a) => {
253
+ console.error(`Async command failed: ${t}`, a);
254
254
  }), !0) : r && typeof r == "object" && "doc" in r && "selection" in r ? (this.setState(r), this.emit("change", this.state), !0) : r !== !1 && r != null;
255
255
  }
256
256
  /**
@@ -282,10 +282,10 @@ class R {
282
282
  */
283
283
  on(t, e) {
284
284
  return this.listeners.has(t) || this.listeners.set(t, []), this.listeners.get(t).push(e), () => {
285
- const o = this.listeners.get(t);
286
- if (o) {
287
- const r = o.indexOf(e);
288
- r > -1 && o.splice(r, 1);
285
+ const n = this.listeners.get(t);
286
+ if (n) {
287
+ const r = n.indexOf(e);
288
+ r > -1 && n.splice(r, 1);
289
289
  }
290
290
  };
291
291
  }
@@ -293,12 +293,12 @@ class R {
293
293
  * Emit event
294
294
  */
295
295
  emit(t, ...e) {
296
- const o = this.listeners.get(t);
297
- o && o.forEach((r) => {
296
+ const n = this.listeners.get(t);
297
+ n && n.forEach((r) => {
298
298
  try {
299
299
  r(...e);
300
- } catch (n) {
301
- console.error(`Error in ${t} handler:`, n);
300
+ } catch (a) {
301
+ console.error(`Error in ${t} handler:`, a);
302
302
  }
303
303
  });
304
304
  }
@@ -315,15 +315,19 @@ class R {
315
315
  return this.isDestroyed;
316
316
  }
317
317
  }
318
- class z {
319
- // PluginLoader instance to get all registered plugins
318
+ class cn {
319
+ constructor(t, e, n) {
320
+ this.overflowUnits = [], this.overflowUnitHomes = /* @__PURE__ */ new WeakMap(), this.expandedOpen = !1, this.onDocumentPointerDownForOverflow = (r) => {
321
+ var l, c;
322
+ if (!this.expandedOpen) return;
323
+ const a = r.target;
324
+ a && ((l = this.moreButton) != null && l.contains(a) || (c = this.expandedRow) != null && c.contains(a)) || this.setExpandedOpen(!1);
325
+ }, this.config = t, this.plugins = e, this.pluginLoader = n;
326
+ }
320
327
  setLastCommandTrigger(t, e) {
321
328
  if (typeof window == "undefined" || !t) return;
322
- const o = e || t.getAttribute("data-command") || void 0;
323
- o && (window.__editoraLastCommandButton = t, window.__editoraLastCommand = o);
324
- }
325
- constructor(t, e, o) {
326
- this.config = t, this.plugins = e, this.pluginLoader = o;
329
+ const n = e || t.getAttribute("data-command") || void 0;
330
+ n && (window.__editoraLastCommandButton = t, window.__editoraLastCommand = n);
327
331
  }
328
332
  /**
329
333
  * Set command handler for toolbar buttons
@@ -335,11 +339,11 @@ class z {
335
339
  * Parse toolbar string into button groups
336
340
  */
337
341
  parseToolbarString(t) {
338
- const e = [], o = t.split("|").map((s) => s.trim()), r = this.getAvailableToolbarItems(), n = /* @__PURE__ */ new Map();
339
- r.forEach((s) => {
340
- s.command && n.set(s.command, s), s.type === "group" && s.label && n.set(s.label, s);
342
+ const e = [], n = t.split("|").map((c) => c.trim()), r = this.getAvailableToolbarItems(), a = /* @__PURE__ */ new Map();
343
+ r.forEach((c) => {
344
+ c.command && a.set(c.command, c), c.type === "group" && c.label && a.set(c.label, c);
341
345
  });
342
- const a = {
346
+ const l = {
343
347
  bold: "toggleBold",
344
348
  italic: "toggleItalic",
345
349
  underline: "toggleUnderline",
@@ -401,59 +405,59 @@ class z {
401
405
  insertVideo: "insertVideo",
402
406
  codeBlock: "insertCodeBlock"
403
407
  };
404
- return o.forEach((s) => {
405
- const l = [];
406
- s.split(/\s+/).filter(Boolean).forEach((d) => {
407
- if (d === "direction") {
408
- const u = n.get("setDirectionLTR"), f = n.get("setDirectionRTL");
409
- u && l.push({
408
+ return n.forEach((c) => {
409
+ const f = [];
410
+ c.split(/\s+/).filter(Boolean).forEach((b) => {
411
+ if (b === "direction") {
412
+ const k = a.get("setDirectionLTR"), E = a.get("setDirectionRTL");
413
+ k && f.push({
410
414
  id: "directionLTR",
411
- label: u.label,
412
- command: u.command,
413
- icon: u.icon,
414
- type: u.type || "button",
415
- options: u.options
416
- }), f && l.push({
415
+ label: k.label,
416
+ command: k.command,
417
+ icon: k.icon,
418
+ type: k.type || "button",
419
+ options: k.options
420
+ }), E && f.push({
417
421
  id: "directionRTL",
418
- label: f.label,
419
- command: f.command,
420
- icon: f.icon,
421
- type: f.type || "button",
422
- options: f.options
422
+ label: E.label,
423
+ command: E.command,
424
+ icon: E.icon,
425
+ type: E.type || "button",
426
+ options: E.options
423
427
  });
424
428
  return;
425
429
  }
426
- if (d === "comments") {
427
- const u = n.get("addComment"), f = n.get("toggleComments");
428
- u && l.push({
430
+ if (b === "comments") {
431
+ const k = a.get("addComment"), E = a.get("toggleComments");
432
+ k && f.push({
429
433
  id: "addComment",
430
- label: u.label,
431
- command: u.command,
432
- icon: u.icon,
433
- type: u.type || "button",
434
- options: u.options
435
- }), f && l.push({
434
+ label: k.label,
435
+ command: k.command,
436
+ icon: k.icon,
437
+ type: k.type || "button",
438
+ options: k.options
439
+ }), E && f.push({
436
440
  id: "toggleComments",
437
- label: f.label,
438
- command: f.command,
439
- icon: f.icon,
440
- type: f.type || "button",
441
- options: f.options
441
+ label: E.label,
442
+ command: E.command,
443
+ icon: E.icon,
444
+ type: E.type || "button",
445
+ options: E.options
442
446
  });
443
447
  return;
444
448
  }
445
- const h = a[d] || d;
446
- let p = n.get(h);
447
- p || (p = n.get(d)), p && l.push({
448
- id: d,
449
- label: p.label,
450
- command: p.command,
451
- icon: p.icon,
452
- type: p.type === "separator" ? "separator" : p.type || "button",
453
- options: p.options,
454
- items: p.items
449
+ const w = l[b] || b;
450
+ let _ = a.get(w);
451
+ _ || (_ = a.get(b)), _ && f.push({
452
+ id: b,
453
+ label: _.label,
454
+ command: _.command,
455
+ icon: _.icon,
456
+ type: _.type === "separator" ? "separator" : _.type || "button",
457
+ options: _.options,
458
+ items: _.items
455
459
  });
456
- }), l.length > 0 && e.push(l);
460
+ }), f.length > 0 && e.push(f);
457
461
  }), e;
458
462
  }
459
463
  /**
@@ -467,47 +471,91 @@ class z {
467
471
  */
468
472
  render(t) {
469
473
  this.container = t, t.innerHTML = "", t.className = "editora-toolbar", this.config.sticky && t.classList.add("editora-toolbar-sticky"), this.config.position && t.classList.add(`editora-toolbar-${this.config.position}`);
470
- const e = this.config.items || this.getDefaultToolbarString(), o = this.parseToolbarString(e);
471
- o.forEach((r, n) => {
472
- const a = document.createElement("div");
473
- if (a.className = "editora-toolbar-group", r.forEach((s) => {
474
- this.appendToolbarButton(a, s);
475
- }), t.appendChild(a), n < o.length - 1) {
476
- const s = document.createElement("div");
477
- s.className = "editora-toolbar-separator", t.appendChild(s);
474
+ const e = document.createElement("div");
475
+ e.className = "editora-toolbar-items-container", this.itemsContainer = e, this.overflowUnits = [];
476
+ const n = this.config.items || this.getDefaultToolbarString(), r = this.parseToolbarString(n);
477
+ r.forEach((a, l) => {
478
+ const c = document.createElement("div");
479
+ if (c.className = "editora-toolbar-group", a.forEach((f) => {
480
+ this.appendToolbarButton(c, f);
481
+ const m = c.lastElementChild;
482
+ m instanceof HTMLElement && (this.overflowUnits.push(m), this.overflowUnitHomes.set(m, c));
483
+ }), e.appendChild(c), l < r.length - 1) {
484
+ const f = document.createElement("div");
485
+ f.className = "editora-toolbar-separator", e.appendChild(f);
478
486
  }
479
- });
487
+ }), t.appendChild(e), this.setupOverflow(t);
488
+ }
489
+ /** Measures top-level items in `itemsContainer` and moves whatever doesn't
490
+ * fit into a collapsible "more options" row, re-measuring on resize. */
491
+ setupOverflow(t) {
492
+ if (!this.itemsContainer || typeof ResizeObserver == "undefined") return;
493
+ const n = document.createElement("button");
494
+ n.type = "button", n.className = "editora-toolbar-more-button", n.title = "Show more options", n.setAttribute("aria-label", "More toolbar options"), n.textContent = "☰", n.style.display = "none", n.addEventListener("click", (c) => {
495
+ c.preventDefault(), this.setExpandedOpen(!this.expandedOpen);
496
+ }), this.moreButton = n, t.appendChild(n);
497
+ const r = document.createElement("div");
498
+ r.className = "editora-toolbar-expanded-row", this.expandedRow = r, t.appendChild(r), document.addEventListener("mousedown", this.onDocumentPointerDownForOverflow, !0);
499
+ const a = () => {
500
+ const c = this.overflowUnits;
501
+ if (c.length === 0) return;
502
+ c.forEach((D) => {
503
+ var R;
504
+ D.parentElement === r && ((R = this.overflowUnitHomes.get(D)) == null || R.appendChild(D));
505
+ });
506
+ const f = t.clientWidth, m = 16, b = 40, w = 4, _ = Math.max(0, f - m - b - w);
507
+ let k = 0, E = 0;
508
+ for (const D of c) {
509
+ const R = D.getBoundingClientRect().width + w;
510
+ if (k + R <= _)
511
+ k += R, E++;
512
+ else
513
+ break;
514
+ }
515
+ E = Math.max(1, Math.min(E, c.length));
516
+ const Y = E < c.length;
517
+ n.style.display = Y ? "" : "none", n.classList.toggle("active", Y && this.expandedOpen), !Y && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((D, R) => {
518
+ R >= E && r.appendChild(D);
519
+ });
520
+ }, l = () => {
521
+ this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(a);
522
+ };
523
+ this.resizeObserver = new ResizeObserver(() => l()), this.resizeObserver.observe(t), l();
524
+ }
525
+ setExpandedOpen(t) {
526
+ var e, n;
527
+ this.expandedOpen = t, (e = this.expandedRow) == null || e.classList.toggle("show", t), (n = this.moreButton) == null || n.classList.toggle("active", t);
480
528
  }
481
529
  /**
482
530
  * Append a toolbar button or group to a parent element
483
531
  */
484
532
  appendToolbarButton(t, e) {
485
533
  if (e.type === "separator") {
486
- const o = document.createElement("div");
487
- o.className = "editora-toolbar-separator", t.appendChild(o);
534
+ const n = document.createElement("div");
535
+ n.className = "editora-toolbar-separator", t.appendChild(n);
488
536
  } else if (e.type === "dropdown") {
489
- const o = this.createDropdown(e);
490
- t.appendChild(o);
537
+ const n = this.createDropdown(e);
538
+ t.appendChild(n);
491
539
  } else if (e.type === "inline-menu") {
492
- const o = this.createInlineMenu(e);
493
- t.appendChild(o);
540
+ const n = this.createInlineMenu(e);
541
+ t.appendChild(n);
494
542
  } else if (e.type === "group" && e.items && e.items.length) {
495
- const o = this.createGroupButton(e);
496
- t.appendChild(o);
543
+ const n = this.createGroupButton(e);
544
+ t.appendChild(n);
497
545
  } else if (e.type === "input") {
498
- const o = this.createInput(e);
499
- t.appendChild(o);
546
+ const n = this.createInput(e);
547
+ t.appendChild(n);
500
548
  } else {
501
- const o = this.createButton(e);
502
- t.appendChild(o);
549
+ const n = this.createButton(e);
550
+ t.appendChild(n);
503
551
  }
504
552
  }
505
553
  /**
506
554
  * Create a toolbar button element
507
555
  */
508
556
  createGroupButton(t) {
509
- const e = document.createElement("div"), o = t.label.toLowerCase().replace(/\s+/g, "-");
510
- if (e.className = `editora-toolbar-group-button ${o}`, e.title = t.label, t.icon)
557
+ const e = document.createElement("div"), n = t.label.toLowerCase().replace(/\s+/g, "-");
558
+ if (e.className = `editora-toolbar-group-button ${n}`, e.title = t.label, t.icon)
511
559
  if (t.icon.startsWith("<svg") && t.icon.endsWith("</svg>")) {
512
560
  const r = document.createElement("span");
513
561
  r.className = "editora-toolbar-icon", r.innerHTML = t.icon, e.appendChild(r);
@@ -515,8 +563,8 @@ class z {
515
563
  e.innerHTML = t.icon;
516
564
  if (t.items && t.items.length) {
517
565
  const r = document.createElement("div");
518
- r.className = `editora-toolbar-group-items ${o}`, t.items.forEach((n) => {
519
- this.appendToolbarButton(r, n);
566
+ r.className = `editora-toolbar-group-items ${n}`, t.items.forEach((a) => {
567
+ this.appendToolbarButton(r, a);
520
568
  }), e.appendChild(r);
521
569
  }
522
570
  return e;
@@ -526,8 +574,8 @@ class z {
526
574
  */
527
575
  createInput(t) {
528
576
  const e = document.createElement("input");
529
- 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) => {
530
- o.preventDefault(), this.setLastCommandTrigger(e, t.command), this.commandHandler && t.command && this.commandHandler(t.command);
577
+ 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", (n) => {
578
+ n.preventDefault(), this.setLastCommandTrigger(e, t.command), this.commandHandler && t.command && this.commandHandler(t.command);
531
579
  }), e;
532
580
  }
533
581
  /**
@@ -537,14 +585,14 @@ class z {
537
585
  const e = document.createElement("button");
538
586
  if (e.className = "editora-toolbar-button", e.type = "button", e.title = t.label, t.command && e.setAttribute("data-command", t.command), t.icon)
539
587
  if (t.icon.startsWith("<svg") && t.icon.endsWith("</svg>")) {
540
- const o = document.createElement("span");
541
- o.className = "editora-toolbar-icon", o.innerHTML = t.icon, e.appendChild(o);
588
+ const n = document.createElement("span");
589
+ n.className = "editora-toolbar-icon", n.innerHTML = t.icon, e.appendChild(n);
542
590
  } else
543
591
  e.innerHTML = t.icon;
544
592
  else
545
593
  e.textContent = t.label;
546
- return t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (o) => {
547
- o.preventDefault(), this.commandHandler && t.command && this.commandHandler(t.command);
594
+ return t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (n) => {
595
+ n.preventDefault(), this.commandHandler && t.command && this.commandHandler(t.command);
548
596
  }), e;
549
597
  }
550
598
  /**
@@ -553,27 +601,27 @@ class z {
553
601
  createDropdown(t) {
554
602
  const e = document.createElement("div");
555
603
  e.className = "editora-toolbar-dropdown";
556
- const o = document.createElement("button");
557
- o.className = "editora-toolbar-button editora-toolbar-dropdown-trigger", o.type = "button", o.textContent = t.label;
604
+ const n = document.createElement("button");
605
+ n.className = "editora-toolbar-button editora-toolbar-dropdown-trigger", n.type = "button", n.textContent = t.label;
558
606
  const r = document.createElement("div");
559
- r.className = "editora-toolbar-dropdown-menu", r.style.display = "none", t.options && t.options.forEach((s) => {
560
- const l = document.createElement("button");
561
- l.className = "editora-toolbar-dropdown-item", l.type = "button", l.textContent = s.label, l.setAttribute("data-value", s.value), l.addEventListener("click", (c) => {
562
- c.preventDefault(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, s.value), r.style.display = "none";
563
- }), r.appendChild(l);
564
- }), o.addEventListener("click", (s) => {
565
- s.preventDefault(), s.stopPropagation(), this.setLastCommandTrigger(o, t.command);
566
- const l = r.style.display === "block";
567
- r.style.display = l ? "none" : "block";
607
+ r.className = "editora-toolbar-dropdown-menu", r.style.display = "none", t.options && t.options.forEach((c) => {
608
+ const f = document.createElement("button");
609
+ f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
610
+ m.preventDefault(), this.setLastCommandTrigger(n, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), r.style.display = "none";
611
+ }), r.appendChild(f);
612
+ }), n.addEventListener("click", (c) => {
613
+ c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(n, t.command);
614
+ const f = r.style.display === "block";
615
+ r.style.display = f ? "none" : "block";
568
616
  });
569
- const n = (s) => {
570
- e.contains(s.target) || (r.style.display = "none");
571
- }, a = (s) => {
572
- s.key === "Escape" && (r.style.display = "none");
617
+ const a = (c) => {
618
+ e.contains(c.target) || (r.style.display = "none");
619
+ }, l = (c) => {
620
+ c.key === "Escape" && (r.style.display = "none");
573
621
  };
574
- return document.addEventListener("mousedown", n, !0), document.addEventListener("keydown", a), e._cleanupDropdown = () => {
575
- document.removeEventListener("mousedown", n, !0), document.removeEventListener("keydown", a);
576
- }, e.appendChild(o), e.appendChild(r), e;
622
+ return document.addEventListener("mousedown", a, !0), document.addEventListener("keydown", l), e._cleanupDropdown = () => {
623
+ document.removeEventListener("mousedown", a, !0), document.removeEventListener("keydown", l);
624
+ }, e.appendChild(n), e.appendChild(r), e;
577
625
  }
578
626
  /**
579
627
  * Create an inline menu element (like dropdown but triggered by button click)
@@ -581,39 +629,39 @@ class z {
581
629
  createInlineMenu(t) {
582
630
  const e = document.createElement("div");
583
631
  e.className = "editora-toolbar-dropdown editora-toolbar-inline-menu";
584
- const o = document.createElement("button");
585
- if (o.className = "editora-toolbar-button", o.type = "button", o.title = t.label, t.icon)
632
+ const n = document.createElement("button");
633
+ if (n.className = "editora-toolbar-button", n.type = "button", n.title = t.label, t.icon)
586
634
  if (t.icon.startsWith("<svg") && t.icon.endsWith("</svg>")) {
587
- const s = document.createElement("span");
588
- s.className = "editora-toolbar-icon", s.innerHTML = t.icon, o.appendChild(s);
635
+ const c = document.createElement("span");
636
+ c.className = "editora-toolbar-icon", c.innerHTML = t.icon, n.appendChild(c);
589
637
  } else
590
- o.innerHTML = t.icon;
638
+ n.innerHTML = t.icon;
591
639
  else
592
- o.textContent = t.label;
640
+ n.textContent = t.label;
593
641
  const r = document.createElement("div");
594
- r.className = "editora-toolbar-dropdown-menu", r.style.display = "none", t.options && t.options.forEach((s) => {
595
- const l = document.createElement("button");
596
- l.className = "editora-toolbar-dropdown-item", l.type = "button", l.textContent = s.label, l.setAttribute("data-value", s.value), l.addEventListener("click", (c) => {
597
- c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, s.value), r.style.display = "none";
598
- }), r.appendChild(l);
599
- }), o.addEventListener("click", (s) => {
600
- var c;
601
- s.preventDefault(), s.stopPropagation(), this.setLastCommandTrigger(o, t.command);
602
- const l = (c = this.container) == null ? void 0 : c.querySelectorAll(
642
+ r.className = "editora-toolbar-dropdown-menu", r.style.display = "none", t.options && t.options.forEach((c) => {
643
+ const f = document.createElement("button");
644
+ f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
645
+ m.preventDefault(), m.stopPropagation(), this.setLastCommandTrigger(n, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), r.style.display = "none";
646
+ }), r.appendChild(f);
647
+ }), n.addEventListener("click", (c) => {
648
+ var m;
649
+ c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(n, t.command);
650
+ const f = (m = this.container) == null ? void 0 : m.querySelectorAll(
603
651
  ".editora-toolbar-dropdown-menu"
604
652
  );
605
- l == null || l.forEach((d) => {
606
- d !== r && (d.style.display = "none");
653
+ f == null || f.forEach((b) => {
654
+ b !== r && (b.style.display = "none");
607
655
  }), r.style.display = r.style.display === "none" ? "block" : "none";
608
656
  });
609
- const n = (s) => {
610
- e.contains(s.target) || (r.style.display = "none");
611
- }, a = (s) => {
612
- s.key === "Escape" && (r.style.display = "none");
657
+ const a = (c) => {
658
+ e.contains(c.target) || (r.style.display = "none");
659
+ }, l = (c) => {
660
+ c.key === "Escape" && (r.style.display = "none");
613
661
  };
614
- return document.addEventListener("mousedown", n, !0), document.addEventListener("keydown", a), e._cleanupDropdown = () => {
615
- document.removeEventListener("mousedown", n, !0), document.removeEventListener("keydown", a);
616
- }, e.appendChild(o), e.appendChild(r), e;
662
+ return document.addEventListener("mousedown", a, !0), document.addEventListener("keydown", l), e._cleanupDropdown = () => {
663
+ document.removeEventListener("mousedown", a, !0), document.removeEventListener("keydown", l);
664
+ }, e.appendChild(n), e.appendChild(r), e;
617
665
  }
618
666
  /**
619
667
  * Get default toolbar string if none provided
@@ -626,22 +674,23 @@ class z {
626
674
  */
627
675
  updateButtonState(t, e) {
628
676
  if (!this.container) return;
629
- const o = this.container.querySelector(
677
+ const n = this.container.querySelector(
630
678
  `[data-command="${t}"]`
631
679
  );
632
- o && (e.active !== void 0 && o.classList.toggle("active", e.active), e.disabled !== void 0 && (o.disabled = e.disabled));
680
+ n && (e.active !== void 0 && n.classList.toggle("active", e.active), e.disabled !== void 0 && (n.disabled = e.disabled));
633
681
  }
634
682
  /**
635
683
  * Destroy toolbar
636
684
  */
637
685
  destroy() {
638
- this.container && (this.container.querySelectorAll(".editora-toolbar-dropdown").forEach((e) => {
639
- const o = e._cleanupDropdown;
640
- o && o();
641
- }), this.container.innerHTML = ""), this.commandHandler = void 0;
686
+ var t;
687
+ this.container && (this.container.querySelectorAll(".editora-toolbar-dropdown").forEach((n) => {
688
+ const r = n._cleanupDropdown;
689
+ r && r();
690
+ }), this.container.innerHTML = ""), (t = this.resizeObserver) == null || t.disconnect(), this.resizeObserver = void 0, this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), document.removeEventListener("mousedown", this.onDocumentPointerDownForOverflow, !0), this.itemsContainer = void 0, this.moreButton = void 0, this.expandedRow = void 0, this.commandHandler = void 0;
642
691
  }
643
692
  }
644
- class H {
693
+ class dn {
645
694
  constructor(t) {
646
695
  this.visible = !1, this.config = t;
647
696
  }
@@ -683,7 +732,7 @@ class H {
683
732
  this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0, this.visible = !1;
684
733
  }
685
734
  }
686
- class j {
735
+ class un {
687
736
  constructor(t = {}) {
688
737
  this.statusInfo = {}, this.config = t;
689
738
  }
@@ -710,29 +759,29 @@ class j {
710
759
  t.className = "editora-statusbar-left";
711
760
  const e = document.createElement("div");
712
761
  e.className = "editora-statusbar-right";
713
- const o = [];
762
+ const n = [];
714
763
  if (this.statusInfo.selectionInfo) {
715
- const n = this.statusInfo.selectionInfo;
716
- n.startLine === n.endLine && n.startColumn === n.endColumn ? o.push(`Ln ${n.startLine}, Col ${n.startColumn}`) : (n.startLine === n.endLine ? o.push(`Ln ${n.startLine}, Col ${n.startColumn}-${n.endColumn}`) : o.push(`Ln ${n.startLine}:${n.startColumn} - ${n.endLine}:${n.endColumn}`), o.push(`${n.selectedChars} chars selected`));
764
+ const a = this.statusInfo.selectionInfo;
765
+ a.startLine === a.endLine && a.startColumn === a.endColumn ? n.push(`Ln ${a.startLine}, Col ${a.startColumn}`) : (a.startLine === a.endLine ? n.push(`Ln ${a.startLine}, Col ${a.startColumn}-${a.endColumn}`) : n.push(`Ln ${a.startLine}:${a.startColumn} - ${a.endLine}:${a.endColumn}`), n.push(`${a.selectedChars} chars selected`));
717
766
  } else if (this.statusInfo.cursorPosition) {
718
- const n = this.statusInfo.cursorPosition;
719
- o.push(`Ln ${n.line}, Col ${n.column}`);
767
+ const a = this.statusInfo.cursorPosition;
768
+ n.push(`Ln ${a.line}, Col ${a.column}`);
720
769
  }
721
- this.statusInfo.language && o.push(this.statusInfo.language);
770
+ this.statusInfo.language && n.push(this.statusInfo.language);
722
771
  const r = [];
723
- this.statusInfo.wordCount !== void 0 && r.push(`${this.statusInfo.wordCount} words`), this.statusInfo.charCount !== void 0 && r.push(`${this.statusInfo.charCount} chars`), this.statusInfo.lineCount !== void 0 && r.push(`${this.statusInfo.lineCount} lines`), this.statusInfo.custom && Object.entries(this.statusInfo.custom).forEach(([n, a]) => {
724
- r.push(`${n}: ${a}`);
725
- }), o.forEach((n, a) => {
726
- const s = document.createElement("span");
727
- if (s.className = "editora-statusbar-item", s.textContent = n, t.appendChild(s), a < o.length - 1) {
728
- const l = document.createElement("span");
729
- l.className = "editora-statusbar-separator", l.textContent = "|", t.appendChild(l);
772
+ this.statusInfo.wordCount !== void 0 && r.push(`${this.statusInfo.wordCount} words`), this.statusInfo.charCount !== void 0 && r.push(`${this.statusInfo.charCount} chars`), this.statusInfo.lineCount !== void 0 && r.push(`${this.statusInfo.lineCount} lines`), this.statusInfo.custom && Object.entries(this.statusInfo.custom).forEach(([a, l]) => {
773
+ r.push(`${a}: ${l}`);
774
+ }), n.forEach((a, l) => {
775
+ const c = document.createElement("span");
776
+ if (c.className = "editora-statusbar-item", c.textContent = a, t.appendChild(c), l < n.length - 1) {
777
+ const f = document.createElement("span");
778
+ f.className = "editora-statusbar-separator", f.textContent = "|", t.appendChild(f);
730
779
  }
731
- }), r.forEach((n, a) => {
732
- const s = document.createElement("span");
733
- if (s.className = "editora-statusbar-item", s.textContent = n, e.appendChild(s), a < r.length - 1) {
734
- const l = document.createElement("span");
735
- l.className = "editora-statusbar-separator", l.textContent = "|", e.appendChild(l);
780
+ }), r.forEach((a, l) => {
781
+ const c = document.createElement("span");
782
+ if (c.className = "editora-statusbar-item", c.textContent = a, e.appendChild(c), l < r.length - 1) {
783
+ const f = document.createElement("span");
784
+ f.className = "editora-statusbar-separator", f.textContent = "|", e.appendChild(f);
736
785
  }
737
786
  }), this.container.appendChild(t), this.container.appendChild(e);
738
787
  }
@@ -743,50 +792,50 @@ class j {
743
792
  this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0;
744
793
  }
745
794
  }
746
- function F(i, t) {
747
- const e = i.textContent || "", o = $(i, t.startContainer, t.startOffset), n = e.substring(0, o).split(`
748
- `), a = n.length, s = n[n.length - 1].length + 1;
749
- return { line: a, column: s };
795
+ function pn(o, t) {
796
+ const e = o.textContent || "", n = fn(o, t.startContainer, t.startOffset), a = e.substring(0, n).split(`
797
+ `), l = a.length, c = a[a.length - 1].length + 1;
798
+ return { line: l, column: c };
750
799
  }
751
- function $(i, t, e) {
752
- var a;
753
- let o = 0;
800
+ function fn(o, t, e) {
801
+ var l;
802
+ let n = 0;
754
803
  const r = document.createTreeWalker(
755
- i,
804
+ o,
756
805
  NodeFilter.SHOW_TEXT,
757
806
  null
758
807
  );
759
- let n = r.firstChild();
760
- for (; n; ) {
761
- if (n === t) {
762
- o += e;
808
+ let a = r.firstChild();
809
+ for (; a; ) {
810
+ if (a === t) {
811
+ n += e;
763
812
  break;
764
- } else n.nodeType === Node.TEXT_NODE && (o += ((a = n.textContent) == null ? void 0 : a.length) || 0);
765
- n = r.nextNode();
813
+ } else a.nodeType === Node.TEXT_NODE && (n += ((l = a.textContent) == null ? void 0 : l.length) || 0);
814
+ a = r.nextNode();
766
815
  }
767
- return o;
816
+ return n;
768
817
  }
769
- function W(i) {
770
- var o, r;
771
- const t = i.querySelectorAll("div, p, br, h1, h2, h3, h4, h5, h6, blockquote, li, pre");
818
+ function hn(o) {
819
+ var n, r;
820
+ const t = o.querySelectorAll("div, p, br, h1, h2, h3, h4, h5, h6, blockquote, li, pre");
772
821
  let e = 1;
773
822
  if (t.length > 0) {
774
823
  e = t.length;
775
- const n = t[t.length - 1];
776
- (n.tagName === "BR" || ((o = n.innerHTML) == null ? void 0 : o.trim()) === "" || ((r = n.textContent) == null ? void 0 : r.trim()) === "") && e++;
824
+ const a = t[t.length - 1];
825
+ (a.tagName === "BR" || ((n = a.innerHTML) == null ? void 0 : n.trim()) === "" || ((r = a.textContent) == null ? void 0 : r.trim()) === "") && e++;
777
826
  } else {
778
- const a = (i.textContent || "").split(`
827
+ const l = (o.textContent || "").split(`
779
828
  `).length;
780
- e = Math.max(1, a);
829
+ e = Math.max(1, l);
781
830
  }
782
831
  return e;
783
832
  }
784
- function _(i) {
785
- const t = i.trim() ? i.trim().split(/\s+/).length : 0, e = i.length;
833
+ function mn(o) {
834
+ const t = o.trim() ? o.trim().split(/\s+/).length : 0, e = o.length;
786
835
  return { words: t, chars: e };
787
836
  }
788
- function U(i, t) {
789
- const e = i.toString();
837
+ function gn(o, t) {
838
+ const e = o.toString();
790
839
  return {
791
840
  startLine: t.line,
792
841
  startColumn: t.column,
@@ -797,7 +846,7 @@ function U(i, t) {
797
846
  selectedWords: e.trim().split(/\s+/).filter(Boolean).length
798
847
  };
799
848
  }
800
- class K {
849
+ class bn {
801
850
  constructor(t) {
802
851
  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) => {
803
852
  this.registerShortcut(e);
@@ -1084,7 +1133,7 @@ class K {
1084
1133
  }
1085
1134
  handleKeyDown(t, e) {
1086
1135
  if (!this.enabled) return !1;
1087
- const o = this.getEventKey(t), r = this.shortcuts.get(o);
1136
+ const n = this.getEventKey(t), r = this.shortcuts.get(n);
1088
1137
  return r ? (r.preventDefault !== !1 && (t.preventDefault(), t.stopPropagation()), e(r.command, r.params), !0) : !1;
1089
1138
  }
1090
1139
  enable() {
@@ -1105,34 +1154,1511 @@ class K {
1105
1154
  getShortcutDescription(t) {
1106
1155
  const e = [];
1107
1156
  this.isMac ? (t.meta && e.push("⌘"), t.ctrl && e.push("⌃"), t.alt && e.push("⌥"), t.shift && e.push("⇧")) : (t.ctrl && e.push("Ctrl"), t.alt && e.push("Alt"), t.shift && e.push("Shift"));
1108
- const o = t.key.length === 1 ? t.key.toUpperCase() : t.key;
1109
- return e.push(o), e.join("+");
1157
+ const n = t.key.length === 1 ? t.key.toUpperCase() : t.key;
1158
+ return e.push(n), e.join("+");
1110
1159
  }
1111
1160
  getShortcutsHelp() {
1112
1161
  const t = this.getAllShortcuts(), e = /* @__PURE__ */ new Map();
1113
1162
  t.forEach((r) => {
1114
- const n = this.getShortcutCategory(r.command);
1115
- e.has(n) || e.set(n, []), e.get(n).push(r);
1163
+ const a = this.getShortcutCategory(r.command);
1164
+ e.has(a) || e.set(a, []), e.get(a).push(r);
1116
1165
  });
1117
- let o = `# Keyboard Shortcuts
1166
+ let n = `# Keyboard Shortcuts
1118
1167
 
1119
1168
  `;
1120
- return e.forEach((r, n) => {
1121
- o += `## ${n}
1169
+ return e.forEach((r, a) => {
1170
+ n += `## ${a}
1122
1171
 
1123
- `, r.forEach((a) => {
1124
- const s = this.getShortcutDescription(a);
1125
- o += `- **${s}**: ${a.description || a.command}
1172
+ `, r.forEach((l) => {
1173
+ const c = this.getShortcutDescription(l);
1174
+ n += `- **${c}**: ${l.description || l.command}
1126
1175
  `;
1127
- }), o += `
1176
+ }), n += `
1128
1177
  `;
1129
- }), o;
1178
+ }), n;
1130
1179
  }
1131
1180
  getShortcutCategory(t) {
1132
1181
  return t.includes("toggle") && (t.includes("Bold") || t.includes("Italic") || t.includes("Underline") || t.includes("Strike") || t.includes("Code") || t.includes("Super") || t.includes("Sub")) ? "Text Formatting" : t.includes("Heading") || t.includes("Paragraph") ? "Block Formatting" : t.includes("List") || t.includes("Checklist") ? "Lists" : t.includes("Alignment") || t.includes("Indent") ? "Alignment & Indentation" : t.includes("undo") || t.includes("redo") ? "History" : t.includes("insert") ? "Insert" : t.includes("find") || t.includes("replace") ? "Find & Replace" : t.includes("Accessibility") || t.includes("spell") ? "Tools" : "Other";
1133
1182
  }
1134
1183
  }
1135
- const q = [
1184
+ function io(o, t) {
1185
+ (t == null || t > o.length) && (t = o.length);
1186
+ for (var e = 0, n = Array(t); e < t; e++) n[e] = o[e];
1187
+ return n;
1188
+ }
1189
+ function yn(o) {
1190
+ if (Array.isArray(o)) return o;
1191
+ }
1192
+ function vn(o, t) {
1193
+ var e = o == null ? null : typeof Symbol != "undefined" && o[Symbol.iterator] || o["@@iterator"];
1194
+ if (e != null) {
1195
+ var n, r, a, l, c = [], f = !0, m = !1;
1196
+ try {
1197
+ if (a = (e = e.call(o)).next, t !== 0) for (; !(f = (n = a.call(e)).done) && (c.push(n.value), c.length !== t); f = !0) ;
1198
+ } catch (b) {
1199
+ m = !0, r = b;
1200
+ } finally {
1201
+ try {
1202
+ if (!f && e.return != null && (l = e.return(), Object(l) !== l)) return;
1203
+ } finally {
1204
+ if (m) throw r;
1205
+ }
1206
+ }
1207
+ return c;
1208
+ }
1209
+ }
1210
+ function En() {
1211
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1212
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1213
+ }
1214
+ function wn(o, t) {
1215
+ return yn(o) || vn(o, t) || kn(o, t) || En();
1216
+ }
1217
+ function kn(o, t) {
1218
+ if (o) {
1219
+ if (typeof o == "string") return io(o, t);
1220
+ var e = {}.toString.call(o).slice(8, -1);
1221
+ return e === "Object" && o.constructor && (e = o.constructor.name), e === "Map" || e === "Set" ? Array.from(o) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? io(o, t) : void 0;
1222
+ }
1223
+ }
1224
+ const Co = Object.entries, ro = Object.setPrototypeOf, Tn = Object.isFrozen, xn = Object.getPrototypeOf, Cn = Object.getOwnPropertyDescriptor;
1225
+ let M = Object.freeze, P = Object.seal, gt = Object.create, Ao = typeof Reflect != "undefined" && Reflect, we = Ao.apply, ke = Ao.construct;
1226
+ M || (M = function(t) {
1227
+ return t;
1228
+ });
1229
+ P || (P = function(t) {
1230
+ return t;
1231
+ });
1232
+ we || (we = function(t, e) {
1233
+ for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++) r[a - 2] = arguments[a];
1234
+ return t.apply(e, r);
1235
+ });
1236
+ ke || (ke = function(t) {
1237
+ for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r];
1238
+ return new t(...n);
1239
+ });
1240
+ const rt = L(Array.prototype.forEach), An = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), Tt = L(Array.prototype.push), Sn = L(Array.prototype.splice), bt = Array.isArray, St = L(String.prototype.toLowerCase), fe = L(String.prototype.toString), so = L(String.prototype.match), xt = L(String.prototype.replace), lo = L(String.prototype.indexOf), _n = L(String.prototype.trim), Ln = L(Number.prototype.toString), Mn = 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), I = L(RegExp.prototype.test), Z = Pn(TypeError);
1241
+ function L(o) {
1242
+ return function(t) {
1243
+ t instanceof RegExp && (t.lastIndex = 0);
1244
+ for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r];
1245
+ return we(o, t, n);
1246
+ };
1247
+ }
1248
+ function Pn(o) {
1249
+ return function() {
1250
+ for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
1251
+ return ke(o, e);
1252
+ };
1253
+ }
1254
+ function v(o, t) {
1255
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : St;
1256
+ if (ro && ro(o, null), !bt(t)) return o;
1257
+ let n = t.length;
1258
+ for (; n--; ) {
1259
+ let r = t[n];
1260
+ if (typeof r == "string") {
1261
+ const a = e(r);
1262
+ a !== r && (Tn(t) || (t[n] = a), r = a);
1263
+ }
1264
+ o[r] = !0;
1265
+ }
1266
+ return o;
1267
+ }
1268
+ function In(o) {
1269
+ for (let t = 0; t < o.length; t++) z(o, t) || (o[t] = null);
1270
+ return o;
1271
+ }
1272
+ function H(o) {
1273
+ const t = gt(null);
1274
+ for (const n of Co(o)) {
1275
+ var e = wn(n, 2);
1276
+ const r = e[0], a = e[1];
1277
+ z(o, r) && (bt(a) ? t[r] = In(a) : a && typeof a == "object" && a.constructor === Object ? t[r] = H(a) : t[r] = a);
1278
+ }
1279
+ return t;
1280
+ }
1281
+ function Dn(o) {
1282
+ switch (typeof o) {
1283
+ case "string":
1284
+ return o;
1285
+ case "number":
1286
+ return Ln(o);
1287
+ case "boolean":
1288
+ return Mn(o);
1289
+ case "bigint":
1290
+ return co ? co(o) : "0";
1291
+ case "symbol":
1292
+ return uo ? uo(o) : "Symbol()";
1293
+ case "undefined":
1294
+ return Ct(o);
1295
+ case "function":
1296
+ case "object": {
1297
+ if (o === null) return Ct(o);
1298
+ const t = o, e = j(t, "toString");
1299
+ if (typeof e == "function") {
1300
+ const n = e(t);
1301
+ return typeof n == "string" ? n : Ct(n);
1302
+ }
1303
+ return Ct(o);
1304
+ }
1305
+ default:
1306
+ return Ct(o);
1307
+ }
1308
+ }
1309
+ function j(o, t) {
1310
+ for (; o !== null; ) {
1311
+ const n = Cn(o, t);
1312
+ if (n) {
1313
+ if (n.get) return L(n.get);
1314
+ if (typeof n.value == "function") return L(n.value);
1315
+ }
1316
+ o = xn(o);
1317
+ }
1318
+ function e() {
1319
+ return null;
1320
+ }
1321
+ return e;
1322
+ }
1323
+ function On(o) {
1324
+ try {
1325
+ return I(o, ""), !0;
1326
+ } catch (t) {
1327
+ return !1;
1328
+ }
1329
+ }
1330
+ const po = M([
1331
+ "a",
1332
+ "abbr",
1333
+ "acronym",
1334
+ "address",
1335
+ "area",
1336
+ "article",
1337
+ "aside",
1338
+ "audio",
1339
+ "b",
1340
+ "bdi",
1341
+ "bdo",
1342
+ "big",
1343
+ "blink",
1344
+ "blockquote",
1345
+ "body",
1346
+ "br",
1347
+ "button",
1348
+ "canvas",
1349
+ "caption",
1350
+ "center",
1351
+ "cite",
1352
+ "code",
1353
+ "col",
1354
+ "colgroup",
1355
+ "content",
1356
+ "data",
1357
+ "datalist",
1358
+ "dd",
1359
+ "decorator",
1360
+ "del",
1361
+ "details",
1362
+ "dfn",
1363
+ "dialog",
1364
+ "dir",
1365
+ "div",
1366
+ "dl",
1367
+ "dt",
1368
+ "element",
1369
+ "em",
1370
+ "fieldset",
1371
+ "figcaption",
1372
+ "figure",
1373
+ "font",
1374
+ "footer",
1375
+ "form",
1376
+ "h1",
1377
+ "h2",
1378
+ "h3",
1379
+ "h4",
1380
+ "h5",
1381
+ "h6",
1382
+ "head",
1383
+ "header",
1384
+ "hgroup",
1385
+ "hr",
1386
+ "html",
1387
+ "i",
1388
+ "img",
1389
+ "input",
1390
+ "ins",
1391
+ "kbd",
1392
+ "label",
1393
+ "legend",
1394
+ "li",
1395
+ "main",
1396
+ "map",
1397
+ "mark",
1398
+ "marquee",
1399
+ "menu",
1400
+ "menuitem",
1401
+ "meter",
1402
+ "nav",
1403
+ "nobr",
1404
+ "ol",
1405
+ "optgroup",
1406
+ "option",
1407
+ "output",
1408
+ "p",
1409
+ "picture",
1410
+ "pre",
1411
+ "progress",
1412
+ "q",
1413
+ "rp",
1414
+ "rt",
1415
+ "ruby",
1416
+ "s",
1417
+ "samp",
1418
+ "search",
1419
+ "section",
1420
+ "select",
1421
+ "shadow",
1422
+ "slot",
1423
+ "small",
1424
+ "source",
1425
+ "spacer",
1426
+ "span",
1427
+ "strike",
1428
+ "strong",
1429
+ "style",
1430
+ "sub",
1431
+ "summary",
1432
+ "sup",
1433
+ "table",
1434
+ "tbody",
1435
+ "td",
1436
+ "template",
1437
+ "textarea",
1438
+ "tfoot",
1439
+ "th",
1440
+ "thead",
1441
+ "time",
1442
+ "tr",
1443
+ "track",
1444
+ "tt",
1445
+ "u",
1446
+ "ul",
1447
+ "var",
1448
+ "video",
1449
+ "wbr"
1450
+ ]), he = M([
1451
+ "svg",
1452
+ "a",
1453
+ "altglyph",
1454
+ "altglyphdef",
1455
+ "altglyphitem",
1456
+ "animatecolor",
1457
+ "animatemotion",
1458
+ "animatetransform",
1459
+ "circle",
1460
+ "clippath",
1461
+ "defs",
1462
+ "desc",
1463
+ "ellipse",
1464
+ "enterkeyhint",
1465
+ "exportparts",
1466
+ "filter",
1467
+ "font",
1468
+ "g",
1469
+ "glyph",
1470
+ "glyphref",
1471
+ "hkern",
1472
+ "image",
1473
+ "inputmode",
1474
+ "line",
1475
+ "lineargradient",
1476
+ "marker",
1477
+ "mask",
1478
+ "metadata",
1479
+ "mpath",
1480
+ "part",
1481
+ "path",
1482
+ "pattern",
1483
+ "polygon",
1484
+ "polyline",
1485
+ "radialgradient",
1486
+ "rect",
1487
+ "stop",
1488
+ "style",
1489
+ "switch",
1490
+ "symbol",
1491
+ "text",
1492
+ "textpath",
1493
+ "title",
1494
+ "tref",
1495
+ "tspan",
1496
+ "view",
1497
+ "vkern"
1498
+ ]), me = M([
1499
+ "feBlend",
1500
+ "feColorMatrix",
1501
+ "feComponentTransfer",
1502
+ "feComposite",
1503
+ "feConvolveMatrix",
1504
+ "feDiffuseLighting",
1505
+ "feDisplacementMap",
1506
+ "feDistantLight",
1507
+ "feDropShadow",
1508
+ "feFlood",
1509
+ "feFuncA",
1510
+ "feFuncB",
1511
+ "feFuncG",
1512
+ "feFuncR",
1513
+ "feGaussianBlur",
1514
+ "feImage",
1515
+ "feMerge",
1516
+ "feMergeNode",
1517
+ "feMorphology",
1518
+ "feOffset",
1519
+ "fePointLight",
1520
+ "feSpecularLighting",
1521
+ "feSpotLight",
1522
+ "feTile",
1523
+ "feTurbulence"
1524
+ ]), Rn = M([
1525
+ "animate",
1526
+ "color-profile",
1527
+ "cursor",
1528
+ "discard",
1529
+ "font-face",
1530
+ "font-face-format",
1531
+ "font-face-name",
1532
+ "font-face-src",
1533
+ "font-face-uri",
1534
+ "foreignobject",
1535
+ "hatch",
1536
+ "hatchpath",
1537
+ "mesh",
1538
+ "meshgradient",
1539
+ "meshpatch",
1540
+ "meshrow",
1541
+ "missing-glyph",
1542
+ "script",
1543
+ "set",
1544
+ "solidcolor",
1545
+ "unknown",
1546
+ "use"
1547
+ ]), ge = M([
1548
+ "math",
1549
+ "menclose",
1550
+ "merror",
1551
+ "mfenced",
1552
+ "mfrac",
1553
+ "mglyph",
1554
+ "mi",
1555
+ "mlabeledtr",
1556
+ "mmultiscripts",
1557
+ "mn",
1558
+ "mo",
1559
+ "mover",
1560
+ "mpadded",
1561
+ "mphantom",
1562
+ "mroot",
1563
+ "mrow",
1564
+ "ms",
1565
+ "mspace",
1566
+ "msqrt",
1567
+ "mstyle",
1568
+ "msub",
1569
+ "msup",
1570
+ "msubsup",
1571
+ "mtable",
1572
+ "mtd",
1573
+ "mtext",
1574
+ "mtr",
1575
+ "munder",
1576
+ "munderover",
1577
+ "mprescripts"
1578
+ ]), Nn = M([
1579
+ "maction",
1580
+ "maligngroup",
1581
+ "malignmark",
1582
+ "mlongdiv",
1583
+ "mscarries",
1584
+ "mscarry",
1585
+ "msgroup",
1586
+ "mstack",
1587
+ "msline",
1588
+ "msrow",
1589
+ "semantics",
1590
+ "annotation",
1591
+ "annotation-xml",
1592
+ "mprescripts",
1593
+ "none"
1594
+ ]), fo = M(["#text"]), ho = M([
1595
+ "accept",
1596
+ "action",
1597
+ "align",
1598
+ "alt",
1599
+ "autocapitalize",
1600
+ "autocomplete",
1601
+ "autopictureinpicture",
1602
+ "autoplay",
1603
+ "background",
1604
+ "bgcolor",
1605
+ "border",
1606
+ "capture",
1607
+ "cellpadding",
1608
+ "cellspacing",
1609
+ "checked",
1610
+ "cite",
1611
+ "class",
1612
+ "clear",
1613
+ "color",
1614
+ "cols",
1615
+ "colspan",
1616
+ "command",
1617
+ "commandfor",
1618
+ "controls",
1619
+ "controlslist",
1620
+ "coords",
1621
+ "crossorigin",
1622
+ "datetime",
1623
+ "decoding",
1624
+ "default",
1625
+ "dir",
1626
+ "disabled",
1627
+ "disablepictureinpicture",
1628
+ "disableremoteplayback",
1629
+ "download",
1630
+ "draggable",
1631
+ "enctype",
1632
+ "enterkeyhint",
1633
+ "exportparts",
1634
+ "face",
1635
+ "for",
1636
+ "headers",
1637
+ "height",
1638
+ "hidden",
1639
+ "high",
1640
+ "href",
1641
+ "hreflang",
1642
+ "id",
1643
+ "inert",
1644
+ "inputmode",
1645
+ "integrity",
1646
+ "ismap",
1647
+ "kind",
1648
+ "label",
1649
+ "lang",
1650
+ "list",
1651
+ "loading",
1652
+ "loop",
1653
+ "low",
1654
+ "max",
1655
+ "maxlength",
1656
+ "media",
1657
+ "method",
1658
+ "min",
1659
+ "minlength",
1660
+ "multiple",
1661
+ "muted",
1662
+ "name",
1663
+ "nonce",
1664
+ "noshade",
1665
+ "novalidate",
1666
+ "nowrap",
1667
+ "open",
1668
+ "optimum",
1669
+ "part",
1670
+ "pattern",
1671
+ "placeholder",
1672
+ "playsinline",
1673
+ "popover",
1674
+ "popovertarget",
1675
+ "popovertargetaction",
1676
+ "poster",
1677
+ "preload",
1678
+ "pubdate",
1679
+ "radiogroup",
1680
+ "readonly",
1681
+ "rel",
1682
+ "required",
1683
+ "rev",
1684
+ "reversed",
1685
+ "role",
1686
+ "rows",
1687
+ "rowspan",
1688
+ "spellcheck",
1689
+ "scope",
1690
+ "selected",
1691
+ "shape",
1692
+ "size",
1693
+ "sizes",
1694
+ "slot",
1695
+ "span",
1696
+ "srclang",
1697
+ "start",
1698
+ "src",
1699
+ "srcset",
1700
+ "step",
1701
+ "style",
1702
+ "summary",
1703
+ "tabindex",
1704
+ "title",
1705
+ "translate",
1706
+ "type",
1707
+ "usemap",
1708
+ "valign",
1709
+ "value",
1710
+ "width",
1711
+ "wrap",
1712
+ "xmlns"
1713
+ ]), be = M([
1714
+ "accent-height",
1715
+ "accumulate",
1716
+ "additive",
1717
+ "alignment-baseline",
1718
+ "amplitude",
1719
+ "ascent",
1720
+ "attributename",
1721
+ "attributetype",
1722
+ "azimuth",
1723
+ "basefrequency",
1724
+ "baseline-shift",
1725
+ "begin",
1726
+ "bias",
1727
+ "by",
1728
+ "class",
1729
+ "clip",
1730
+ "clippathunits",
1731
+ "clip-path",
1732
+ "clip-rule",
1733
+ "color",
1734
+ "color-interpolation",
1735
+ "color-interpolation-filters",
1736
+ "color-profile",
1737
+ "color-rendering",
1738
+ "cx",
1739
+ "cy",
1740
+ "d",
1741
+ "dx",
1742
+ "dy",
1743
+ "diffuseconstant",
1744
+ "direction",
1745
+ "display",
1746
+ "divisor",
1747
+ "dominant-baseline",
1748
+ "dur",
1749
+ "edgemode",
1750
+ "elevation",
1751
+ "end",
1752
+ "exponent",
1753
+ "fill",
1754
+ "fill-opacity",
1755
+ "fill-rule",
1756
+ "filter",
1757
+ "filterunits",
1758
+ "flood-color",
1759
+ "flood-opacity",
1760
+ "font-family",
1761
+ "font-size",
1762
+ "font-size-adjust",
1763
+ "font-stretch",
1764
+ "font-style",
1765
+ "font-variant",
1766
+ "font-weight",
1767
+ "fx",
1768
+ "fy",
1769
+ "g1",
1770
+ "g2",
1771
+ "glyph-name",
1772
+ "glyphref",
1773
+ "gradientunits",
1774
+ "gradienttransform",
1775
+ "height",
1776
+ "href",
1777
+ "id",
1778
+ "image-rendering",
1779
+ "in",
1780
+ "in2",
1781
+ "intercept",
1782
+ "k",
1783
+ "k1",
1784
+ "k2",
1785
+ "k3",
1786
+ "k4",
1787
+ "kerning",
1788
+ "keypoints",
1789
+ "keysplines",
1790
+ "keytimes",
1791
+ "lang",
1792
+ "lengthadjust",
1793
+ "letter-spacing",
1794
+ "kernelmatrix",
1795
+ "kernelunitlength",
1796
+ "lighting-color",
1797
+ "local",
1798
+ "marker-end",
1799
+ "marker-mid",
1800
+ "marker-start",
1801
+ "markerheight",
1802
+ "markerunits",
1803
+ "markerwidth",
1804
+ "maskcontentunits",
1805
+ "maskunits",
1806
+ "max",
1807
+ "mask",
1808
+ "mask-type",
1809
+ "media",
1810
+ "method",
1811
+ "mode",
1812
+ "min",
1813
+ "name",
1814
+ "numoctaves",
1815
+ "offset",
1816
+ "operator",
1817
+ "opacity",
1818
+ "order",
1819
+ "orient",
1820
+ "orientation",
1821
+ "origin",
1822
+ "overflow",
1823
+ "paint-order",
1824
+ "path",
1825
+ "pathlength",
1826
+ "patterncontentunits",
1827
+ "patterntransform",
1828
+ "patternunits",
1829
+ "pointer-events",
1830
+ "points",
1831
+ "preservealpha",
1832
+ "preserveaspectratio",
1833
+ "primitiveunits",
1834
+ "r",
1835
+ "rx",
1836
+ "ry",
1837
+ "radius",
1838
+ "refx",
1839
+ "refy",
1840
+ "repeatcount",
1841
+ "repeatdur",
1842
+ "restart",
1843
+ "result",
1844
+ "rotate",
1845
+ "scale",
1846
+ "seed",
1847
+ "shape-rendering",
1848
+ "slope",
1849
+ "specularconstant",
1850
+ "specularexponent",
1851
+ "spreadmethod",
1852
+ "startoffset",
1853
+ "stddeviation",
1854
+ "stitchtiles",
1855
+ "stop-color",
1856
+ "stop-opacity",
1857
+ "stroke-dasharray",
1858
+ "stroke-dashoffset",
1859
+ "stroke-linecap",
1860
+ "stroke-linejoin",
1861
+ "stroke-miterlimit",
1862
+ "stroke-opacity",
1863
+ "stroke",
1864
+ "stroke-width",
1865
+ "style",
1866
+ "surfacescale",
1867
+ "systemlanguage",
1868
+ "tabindex",
1869
+ "tablevalues",
1870
+ "targetx",
1871
+ "targety",
1872
+ "transform",
1873
+ "transform-origin",
1874
+ "text-anchor",
1875
+ "text-decoration",
1876
+ "text-orientation",
1877
+ "text-rendering",
1878
+ "textlength",
1879
+ "type",
1880
+ "u1",
1881
+ "u2",
1882
+ "unicode",
1883
+ "values",
1884
+ "vector-effect",
1885
+ "viewbox",
1886
+ "visibility",
1887
+ "version",
1888
+ "vert-adv-y",
1889
+ "vert-origin-x",
1890
+ "vert-origin-y",
1891
+ "width",
1892
+ "word-spacing",
1893
+ "wrap",
1894
+ "writing-mode",
1895
+ "xchannelselector",
1896
+ "ychannelselector",
1897
+ "x",
1898
+ "x1",
1899
+ "x2",
1900
+ "xmlns",
1901
+ "y",
1902
+ "y1",
1903
+ "y2",
1904
+ "z",
1905
+ "zoomandpan"
1906
+ ]), mo = M([
1907
+ "accent",
1908
+ "accentunder",
1909
+ "align",
1910
+ "bevelled",
1911
+ "close",
1912
+ "columnalign",
1913
+ "columnlines",
1914
+ "columnspacing",
1915
+ "columnspan",
1916
+ "denomalign",
1917
+ "depth",
1918
+ "dir",
1919
+ "display",
1920
+ "displaystyle",
1921
+ "encoding",
1922
+ "fence",
1923
+ "frame",
1924
+ "height",
1925
+ "href",
1926
+ "id",
1927
+ "largeop",
1928
+ "length",
1929
+ "linethickness",
1930
+ "lquote",
1931
+ "lspace",
1932
+ "mathbackground",
1933
+ "mathcolor",
1934
+ "mathsize",
1935
+ "mathvariant",
1936
+ "maxsize",
1937
+ "minsize",
1938
+ "movablelimits",
1939
+ "notation",
1940
+ "numalign",
1941
+ "open",
1942
+ "rowalign",
1943
+ "rowlines",
1944
+ "rowspacing",
1945
+ "rowspan",
1946
+ "rspace",
1947
+ "rquote",
1948
+ "scriptlevel",
1949
+ "scriptminsize",
1950
+ "scriptsizemultiplier",
1951
+ "selection",
1952
+ "separator",
1953
+ "separators",
1954
+ "stretchy",
1955
+ "subscriptshift",
1956
+ "supscriptshift",
1957
+ "symmetric",
1958
+ "voffset",
1959
+ "width",
1960
+ "xmlns"
1961
+ ]), jt = M([
1962
+ "xlink:href",
1963
+ "xml:id",
1964
+ "xlink:title",
1965
+ "xml:space",
1966
+ "xmlns:xlink"
1967
+ ]), zn = P(/{{[\w\W]*|^[\w\W]*}}/g), Bn = P(/<%[\w\W]*|^[\w\W]*%>/g), Fn = P(/\${[\w\W]*/g), Hn = P(/^data-[\-\w.\u00B7-\uFFFF]+$/), Un = P(/^aria-[\-\w]+$/), go = P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), jn = P(/^(?:\w+script|data):/i), Wn = P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), $n = P(/^html$/i), Gn = P(/^[a-z][.\w]*(-[.\w]+)+$/i), bo = P(/<[/\w!]/g), yo = P(/<[/\w]/g), Kn = P(/<\/no(script|embed|frames)/i), Yn = P(/\/>/i), F = {
1968
+ element: 1,
1969
+ attribute: 2,
1970
+ text: 3,
1971
+ cdataSection: 4,
1972
+ entityReference: 5,
1973
+ entityNode: 6,
1974
+ processingInstruction: 7,
1975
+ comment: 8,
1976
+ document: 9,
1977
+ documentType: 10,
1978
+ documentFragment: 11,
1979
+ notation: 12
1980
+ }, So = [
1981
+ "style",
1982
+ "script",
1983
+ "xmp",
1984
+ "iframe",
1985
+ "noembed",
1986
+ "noframes",
1987
+ "plaintext",
1988
+ "noscript"
1989
+ ], qn = M(v({}, So)), Vn = (function() {
1990
+ const o = {};
1991
+ return rt(So, (t) => {
1992
+ o[t] = P(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
1993
+ }), M(o);
1994
+ })(), Xn = function() {
1995
+ return typeof window == "undefined" ? null : window;
1996
+ }, Zn = function(t, e) {
1997
+ if (typeof t != "object" || typeof t.createPolicy != "function") return null;
1998
+ let n = null;
1999
+ const r = "data-tt-policy-suffix";
2000
+ e && e.hasAttribute(r) && (n = e.getAttribute(r));
2001
+ const a = "dompurify" + (n ? "#" + n : "");
2002
+ try {
2003
+ return t.createPolicy(a, {
2004
+ createHTML(l) {
2005
+ return l;
2006
+ },
2007
+ createScriptURL(l) {
2008
+ return l;
2009
+ }
2010
+ });
2011
+ } catch (l) {
2012
+ return console.warn("TrustedTypes policy " + a + " could not be created."), null;
2013
+ }
2014
+ }, vo = function() {
2015
+ return {
2016
+ afterSanitizeAttributes: [],
2017
+ afterSanitizeElements: [],
2018
+ afterSanitizeShadowDOM: [],
2019
+ beforeSanitizeAttributes: [],
2020
+ beforeSanitizeElements: [],
2021
+ beforeSanitizeShadowDOM: [],
2022
+ uponSanitizeAttribute: [],
2023
+ uponSanitizeElement: [],
2024
+ uponSanitizeShadowNode: []
2025
+ };
2026
+ }, J = function(t, e, n, r) {
2027
+ return z(t, e) && bt(t[e]) ? v(r.base ? H(r.base) : {}, t[e], r.transform) : n;
2028
+ }, ye = function(t, e, n) {
2029
+ const r = z(t, e) ? t[e] : void 0;
2030
+ return r && typeof r == "object" ? H(r) : n();
2031
+ };
2032
+ function _o() {
2033
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Xn();
2034
+ const t = (u) => _o(u);
2035
+ if (t.version = "3.4.16", t.removed = [], !o || !o.document || o.document.nodeType !== F.document || !o.Element)
2036
+ return t.isSupported = !1, t;
2037
+ let e = o.document;
2038
+ const n = e, r = n.currentScript;
2039
+ o.DocumentFragment;
2040
+ const a = o.HTMLTemplateElement, l = o.Node, c = o.Element, f = o.NodeFilter;
2041
+ o.NamedNodeMap === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
2042
+ const m = o.DOMParser, b = o.trustedTypes, w = c.prototype, _ = j(w, "cloneNode"), k = j(w, "remove"), E = j(w, "removeAttributeNode"), Y = j(w, "nextSibling"), D = j(w, "childNodes"), R = j(w, "parentNode"), Ce = j(w, "shadowRoot"), qt = j(w, "attributes"), tt = l && l.prototype ? j(l.prototype, "nodeType") : null, at = l && l.prototype ? j(l.prototype, "nodeName") : null, _t = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(i) {
2043
+ return tt ? tt(i) : i.nodeType;
2044
+ }, Vt = function(i) {
2045
+ return at ? at(i) : i.nodeName;
2046
+ };
2047
+ if (typeof a == "function") {
2048
+ const u = e.createElement("template");
2049
+ u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
2050
+ }
2051
+ let N, et = "", Xt, Ae = !1, vt = 0;
2052
+ const Se = function() {
2053
+ if (vt > 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.');
2054
+ }, st = function(i) {
2055
+ Se(), vt++;
2056
+ try {
2057
+ return N.createHTML(i);
2058
+ } finally {
2059
+ vt--;
2060
+ }
2061
+ }, Mo = function(i) {
2062
+ Se(), vt++;
2063
+ try {
2064
+ return N.createScriptURL(i);
2065
+ } finally {
2066
+ vt--;
2067
+ }
2068
+ }, Po = function() {
2069
+ return Ae || (Xt = Zn(b, r), Ae = !0), Xt;
2070
+ }, Lt = e, Zt = Lt.implementation, _e = Lt.createNodeIterator, Io = Lt.createDocumentFragment, Do = Lt.getElementsByTagName, Oo = n.importNode;
2071
+ let T = vo();
2072
+ t.isSupported = typeof Co == "function" && typeof R == "function" && Zt && Zt.createHTMLDocument !== void 0;
2073
+ const Ro = zn, No = Bn, zo = Fn, Bo = Hn, Fo = Un, Ho = jn, Le = Wn, Uo = Gn;
2074
+ let Me = go, x = null;
2075
+ const Jt = v({}, [
2076
+ ...po,
2077
+ ...he,
2078
+ ...me,
2079
+ ...ge,
2080
+ ...fo
2081
+ ]);
2082
+ let C = null;
2083
+ const Qt = v({}, [
2084
+ ...ho,
2085
+ ...be,
2086
+ ...mo,
2087
+ ...jt
2088
+ ]);
2089
+ let $ = Object.seal(gt(null, {
2090
+ tagNameCheck: {
2091
+ writable: !0,
2092
+ configurable: !1,
2093
+ enumerable: !0,
2094
+ value: null
2095
+ },
2096
+ attributeNameCheck: {
2097
+ writable: !0,
2098
+ configurable: !1,
2099
+ enumerable: !0,
2100
+ value: null
2101
+ },
2102
+ allowCustomizedBuiltInElements: {
2103
+ writable: !0,
2104
+ configurable: !1,
2105
+ enumerable: !0,
2106
+ value: !1
2107
+ }
2108
+ })), Et = null, Pe = null;
2109
+ const q = Object.seal(gt(null, {
2110
+ tagCheck: {
2111
+ writable: !0,
2112
+ configurable: !1,
2113
+ enumerable: !0,
2114
+ value: null
2115
+ },
2116
+ attributeCheck: {
2117
+ writable: !0,
2118
+ configurable: !1,
2119
+ enumerable: !0,
2120
+ value: null
2121
+ }
2122
+ }));
2123
+ let Ie = !0, te = !0, De = !1, Oe = !0, V = !1, ot = !0, nt = !1, ee = !1, Mt = null, Pt = null, oe = !1, lt = !1, It = !1, Dt = !1, Re = !0, Ne = !1;
2124
+ const ze = "user-content-";
2125
+ let ne = !0, ie = !1, ct = {}, dt = null;
2126
+ const Be = v({}, [
2127
+ "annotation-xml",
2128
+ "audio",
2129
+ "colgroup",
2130
+ "desc",
2131
+ "foreignobject",
2132
+ "head",
2133
+ "iframe",
2134
+ "math",
2135
+ "mi",
2136
+ "mn",
2137
+ "mo",
2138
+ "ms",
2139
+ "mtext",
2140
+ "noembed",
2141
+ "noframes",
2142
+ "noscript",
2143
+ "plaintext",
2144
+ "script",
2145
+ "selectedcontent",
2146
+ "style",
2147
+ "svg",
2148
+ "template",
2149
+ "thead",
2150
+ "title",
2151
+ "video",
2152
+ "xmp"
2153
+ ]);
2154
+ let Fe = null;
2155
+ const He = v({}, [
2156
+ "audio",
2157
+ "video",
2158
+ "img",
2159
+ "source",
2160
+ "image",
2161
+ "track"
2162
+ ]);
2163
+ let Ue = null;
2164
+ const je = v({}, [
2165
+ "alt",
2166
+ "class",
2167
+ "for",
2168
+ "id",
2169
+ "label",
2170
+ "name",
2171
+ "pattern",
2172
+ "placeholder",
2173
+ "role",
2174
+ "summary",
2175
+ "title",
2176
+ "value",
2177
+ "style",
2178
+ "xmlns"
2179
+ ]), Ot = "http://www.w3.org/1998/Math/MathML", Rt = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml";
2180
+ let ut = G, re = !1, ae = null;
2181
+ const jo = v({}, [
2182
+ Ot,
2183
+ Rt,
2184
+ G
2185
+ ], fe), We = M([
2186
+ "mi",
2187
+ "mo",
2188
+ "mn",
2189
+ "ms",
2190
+ "mtext"
2191
+ ]);
2192
+ let se = v({}, We);
2193
+ const $e = M(["annotation-xml"]);
2194
+ let le = v({}, $e);
2195
+ const Wo = v({}, [
2196
+ "title",
2197
+ "style",
2198
+ "font",
2199
+ "a",
2200
+ "script"
2201
+ ]);
2202
+ let wt = null;
2203
+ const $o = ["application/xhtml+xml", "text/html"], Go = "text/html";
2204
+ let S = null, pt = null;
2205
+ const Ko = e.createElement("form"), Ge = function(i) {
2206
+ return i instanceof RegExp || i instanceof Function;
2207
+ }, ce = function() {
2208
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2209
+ if (pt && pt === i) return;
2210
+ (!i || typeof i != "object") && (i = {}), i = H(i), wt = $o.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Go : i.PARSER_MEDIA_TYPE, S = wt === "application/xhtml+xml" ? fe : St, x = J(i, "ALLOWED_TAGS", Jt, { transform: S }), C = J(i, "ALLOWED_ATTR", Qt, { transform: S }), ae = J(i, "ALLOWED_NAMESPACES", jo, { transform: fe }), Ue = J(i, "ADD_URI_SAFE_ATTR", je, {
2211
+ transform: S,
2212
+ base: je
2213
+ }), Fe = J(i, "ADD_DATA_URI_TAGS", He, {
2214
+ transform: S,
2215
+ base: He
2216
+ }), dt = J(i, "FORBID_CONTENTS", Be, { transform: S }), Et = J(i, "FORBID_TAGS", H({}), { transform: S }), Pe = J(i, "FORBID_ATTR", H({}), { transform: S }), ct = z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? H(i.USE_PROFILES) : i.USE_PROFILES : !1, Ie = i.ALLOW_ARIA_ATTR !== !1, te = i.ALLOW_DATA_ATTR !== !1, De = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = i.SAFE_FOR_TEMPLATES || !1, ot = i.SAFE_FOR_XML !== !1, nt = i.WHOLE_DOCUMENT || !1, lt = i.RETURN_DOM || !1, It = i.RETURN_DOM_FRAGMENT || !1, Dt = i.RETURN_TRUSTED_TYPE || !1, oe = i.FORCE_BODY || !1, Re = i.SANITIZE_DOM !== !1, Ne = i.SANITIZE_NAMED_PROPS || !1, ne = i.KEEP_CONTENT !== !1, ie = i.IN_PLACE || !1, Me = On(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : go, ut = typeof i.NAMESPACE == "string" ? i.NAMESPACE : G, se = ye(i, "MATHML_TEXT_INTEGRATION_POINTS", () => v({}, We)), le = ye(i, "HTML_INTEGRATION_POINTS", () => v({}, $e));
2217
+ const s = ye(i, "CUSTOM_ELEMENT_HANDLING", () => gt(null));
2218
+ if ($ = gt(null), z(s, "tagNameCheck") && Ge(s.tagNameCheck) && ($.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ge(s.attributeNameCheck) && ($.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), P($), V && (te = !1), It && (lt = !0), ct && (x = v({}, fo), C = gt(null), ct.html === !0 && (v(x, po), v(C, ho)), ct.svg === !0 && (v(x, he), v(C, be), v(C, jt)), ct.svgFilters === !0 && (v(x, me), v(C, be), v(C, jt)), ct.mathMl === !0 && (v(x, ge), v(C, mo), v(C, jt))), q.tagCheck = null, q.attributeCheck = null, z(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? q.tagCheck = i.ADD_TAGS : bt(i.ADD_TAGS) && (x === Jt && (x = H(x)), v(x, i.ADD_TAGS, S))), z(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? q.attributeCheck = i.ADD_ATTR : bt(i.ADD_ATTR) && (C === Qt && (C = H(C)), v(C, i.ADD_ATTR, S))), z(i, "ADD_FORBID_CONTENTS") && bt(i.ADD_FORBID_CONTENTS) && (dt === Be && (dt = H(dt)), v(dt, i.ADD_FORBID_CONTENTS, S)), ne && (x["#text"] = !0), nt && v(x, [
2219
+ "html",
2220
+ "head",
2221
+ "body"
2222
+ ]), x.table && (v(x, ["tbody"]), delete Et.tbody), i.TRUSTED_TYPES_POLICY) {
2223
+ if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2224
+ if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2225
+ const d = N;
2226
+ N = i.TRUSTED_TYPES_POLICY;
2227
+ try {
2228
+ et = st("");
2229
+ } catch (p) {
2230
+ throw N = d, p;
2231
+ }
2232
+ } else i.TRUSTED_TYPES_POLICY === null ? (N = void 0, et = "") : (N === void 0 && (N = Po()), N && typeof et == "string" && (et = st("")));
2233
+ M && M(i), pt = i;
2234
+ }, Ke = v({}, [
2235
+ ...he,
2236
+ ...me,
2237
+ ...Rn
2238
+ ]), Ye = v({}, [...ge, ...Nn]), Yo = function(i, s, d) {
2239
+ return s.namespaceURI === G ? i === "svg" : s.namespaceURI === Ot ? i === "svg" && (d === "annotation-xml" || se[d]) : !!Ke[i];
2240
+ }, qo = function(i, s, d) {
2241
+ return s.namespaceURI === G ? i === "math" : s.namespaceURI === Rt ? i === "math" && le[d] : !!Ye[i];
2242
+ }, Vo = function(i, s, d) {
2243
+ return s.namespaceURI === Rt && !le[d] || s.namespaceURI === Ot && !se[d] ? !1 : !Ye[i] && (Wo[i] || !Ke[i]);
2244
+ }, Xo = function(i) {
2245
+ let s = R(i);
2246
+ (!s || !s.tagName) && (s = {
2247
+ namespaceURI: ut,
2248
+ tagName: "template"
2249
+ });
2250
+ const d = St(i.tagName), p = St(s.tagName);
2251
+ return ae[i.namespaceURI] ? i.namespaceURI === Rt ? Yo(d, s, p) : i.namespaceURI === Ot ? qo(d, s, p) : i.namespaceURI === G ? Vo(d, s, p) : !!(wt === "application/xhtml+xml" && ae[i.namespaceURI]) : !1;
2252
+ }, X = function(i) {
2253
+ Tt(t.removed, { element: i });
2254
+ try {
2255
+ R(i).removeChild(i);
2256
+ } catch (s) {
2257
+ if (k(i), !R(i)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2258
+ }
2259
+ }, qe = function(i, s, d) {
2260
+ try {
2261
+ E(i, s);
2262
+ } catch (p) {
2263
+ try {
2264
+ i.removeAttribute(d);
2265
+ } catch (h) {
2266
+ }
2267
+ }
2268
+ }, Nt = function(i) {
2269
+ zt(i);
2270
+ const s = D(i);
2271
+ if (s) {
2272
+ const p = [];
2273
+ rt(s, (h) => {
2274
+ Tt(p, h);
2275
+ }), rt(p, (h) => {
2276
+ try {
2277
+ k(h);
2278
+ } catch (g) {
2279
+ }
2280
+ });
2281
+ }
2282
+ const d = qt(i);
2283
+ if (d) for (let p = d.length - 1; p >= 0; --p) {
2284
+ const h = d[p], g = h && h.name;
2285
+ typeof g == "string" && qe(i, h, g);
2286
+ }
2287
+ }, it = function(i, s, d) {
2288
+ if (!d) try {
2289
+ d = s.getAttributeNode(i);
2290
+ } catch (p) {
2291
+ d = null;
2292
+ }
2293
+ Tt(t.removed, {
2294
+ attribute: d || null,
2295
+ from: s
2296
+ });
2297
+ try {
2298
+ d ? E(s, d) : s.removeAttribute(i);
2299
+ } catch (p) {
2300
+ try {
2301
+ s.removeAttribute(i);
2302
+ } catch (h) {
2303
+ }
2304
+ }
2305
+ if (i === "is")
2306
+ if (lt || It) try {
2307
+ X(s);
2308
+ } catch (p) {
2309
+ }
2310
+ else try {
2311
+ s.setAttribute(i, "");
2312
+ } catch (p) {
2313
+ }
2314
+ }, Zo = function(i) {
2315
+ const s = qt(i);
2316
+ if (s)
2317
+ for (let d = s.length - 1; d >= 0; --d) {
2318
+ const p = s[d], h = p && p.name;
2319
+ typeof h != "string" || C[S(h)] || qe(i, p, h);
2320
+ }
2321
+ }, zt = function(i) {
2322
+ const s = [i];
2323
+ for (; s.length > 0; ) {
2324
+ const d = s.pop();
2325
+ yt(d) === F.element && Zo(d);
2326
+ const p = D(d);
2327
+ if (p) for (let h = p.length - 1; h >= 0; --h) s.push(p[h]);
2328
+ }
2329
+ }, Ve = function(i, s) {
2330
+ return ot ? i === "patchsrc" ? !0 : i === "for" && s !== "label" && s !== "output" : !1;
2331
+ }, Jo = function(i) {
2332
+ if (!ot) return;
2333
+ const s = [i];
2334
+ for (; s.length > 0; ) {
2335
+ const d = s.pop(), p = yt(d);
2336
+ if (p === F.processingInstruction || p === F.comment && I(yo, d.data)) {
2337
+ try {
2338
+ k(d);
2339
+ } catch (g) {
2340
+ }
2341
+ continue;
2342
+ }
2343
+ if (p === F.element) {
2344
+ const g = d, y = S(Vt(d));
2345
+ try {
2346
+ g.hasAttribute && g.hasAttribute("patchsrc") && g.removeAttribute("patchsrc"), g.hasAttribute && g.hasAttribute("for") && Ve("for", y) && g.removeAttribute("for");
2347
+ } catch (A) {
2348
+ }
2349
+ }
2350
+ const h = D(d);
2351
+ if (h) for (let g = h.length - 1; g >= 0; --g) s.push(h[g]);
2352
+ }
2353
+ }, Xe = function(i) {
2354
+ let s = null, d = null;
2355
+ if (oe) i = "<remove></remove>" + i;
2356
+ else {
2357
+ const g = so(i, /^[\r\n\t ]+/);
2358
+ d = g && g[0];
2359
+ }
2360
+ wt === "application/xhtml+xml" && ut === G && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
2361
+ const p = N ? st(i) : i;
2362
+ if (ut === G) try {
2363
+ s = new m().parseFromString(p, wt);
2364
+ } catch (g) {
2365
+ }
2366
+ if (!s || !s.documentElement) {
2367
+ s = Zt.createDocument(ut, "template", null);
2368
+ try {
2369
+ s.documentElement.innerHTML = re ? et : p;
2370
+ } catch (g) {
2371
+ }
2372
+ }
2373
+ const h = s.body || s.documentElement;
2374
+ return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ut === G ? Do.call(s, nt ? "html" : "body")[0] : nt ? s.documentElement : h;
2375
+ }, Ze = function(i) {
2376
+ const s = _t ? _t(i) : i.ownerDocument;
2377
+ return _e.call(s || i, i, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
2378
+ }, Bt = function(i) {
2379
+ return i = xt(i, Ro, " "), i = xt(i, No, " "), i = xt(i, zo, " "), i;
2380
+ }, de = function(i) {
2381
+ var s;
2382
+ i.normalize();
2383
+ const d = _t ? _t(i) : i.ownerDocument, p = _e.call(d || i, i, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
2384
+ let h = p.nextNode();
2385
+ for (; h; )
2386
+ h.data = Bt(h.data), h = p.nextNode();
2387
+ const g = (s = i.querySelectorAll) === null || s === void 0 ? void 0 : s.call(i, "template");
2388
+ g && rt(g, (y) => {
2389
+ ft(y.content) && de(y.content);
2390
+ });
2391
+ }, Ft = function(i) {
2392
+ const s = at ? at(i) : null;
2393
+ return typeof s != "string" || S(s) !== "form" ? !1 : typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || i.attributes !== qt(i) || typeof i.removeAttribute != "function" || typeof i.removeAttributeNode != "function" || typeof i.getAttributeNode != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function" || i.nodeType !== tt(i) || i.childNodes !== D(i);
2394
+ }, ft = function(i) {
2395
+ if (!tt || typeof i != "object" || i === null) return !1;
2396
+ try {
2397
+ return tt(i) === F.documentFragment;
2398
+ } catch (s) {
2399
+ return !1;
2400
+ }
2401
+ }, kt = function(i) {
2402
+ if (!tt || typeof i != "object" || i === null) return !1;
2403
+ try {
2404
+ return typeof tt(i) == "number";
2405
+ } catch (s) {
2406
+ return !1;
2407
+ }
2408
+ };
2409
+ function K(u, i, s) {
2410
+ u.length !== 0 && rt(u, (d) => {
2411
+ d.call(t, i, s, pt);
2412
+ });
2413
+ }
2414
+ const Qo = function(i, s) {
2415
+ return !!(ot && i.hasChildNodes() && !kt(i.firstElementChild) && I(bo, i.textContent) && I(bo, i.innerHTML) || ot && i.namespaceURI === G && qn[s] && (kt(i.firstElementChild) || typeof i.textContent == "string" && I(Vn[s], i.textContent)) || i.nodeType === F.processingInstruction || ot && i.nodeType === F.comment && I(yo, i.data));
2416
+ }, Ht = function(i, s) {
2417
+ if (i instanceof RegExp) return I(i, s);
2418
+ if (i instanceof Function) {
2419
+ for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) p[h - 2] = arguments[h];
2420
+ return !!i(s, ...p);
2421
+ }
2422
+ return !1;
2423
+ }, tn = function(i, s, d) {
2424
+ if (!Et[s] && eo(s) && Ht($.tagNameCheck, s)) return !1;
2425
+ if (ne && !dt[s]) {
2426
+ const p = R(i), h = D(i);
2427
+ if (h && p) {
2428
+ const g = h.length;
2429
+ for (let y = g - 1; y >= 0; --y) {
2430
+ const A = i === d ? _(h[y], !0) : h[y];
2431
+ p.insertBefore(A, Y(i));
2432
+ }
2433
+ }
2434
+ }
2435
+ return X(i), !0;
2436
+ }, Je = function(i, s, d, p) {
2437
+ return i.length === 0 ? s : s === d || s === p ? H(s) : s;
2438
+ }, ht = function(i, s) {
2439
+ return i === s || R(i) !== null ? !1 : (ie && zt(i), !0);
2440
+ }, Qe = function(i, s) {
2441
+ if (K(T.beforeSanitizeElements, i, null), ht(i, s)) return !0;
2442
+ if (Ft(i))
2443
+ return X(i), !0;
2444
+ const d = S(Vt(i));
2445
+ if (x = Je(T.uponSanitizeElement, x, Jt, Mt), K(T.uponSanitizeElement, i, {
2446
+ tagName: d,
2447
+ allowedTags: x
2448
+ }), ht(i, s)) return !0;
2449
+ if (Qo(i, d))
2450
+ return X(i), !0;
2451
+ if (Et[d] || !(q.tagCheck instanceof Function && q.tagCheck(d)) && !x[d]) {
2452
+ const p = tn(i, d, s);
2453
+ return p === !1 && (K(T.afterSanitizeElements, i, null), ht(i, s)) ? !0 : p;
2454
+ }
2455
+ if (yt(i) === F.element && !Xo(i) || (d === "noscript" || d === "noembed" || d === "noframes") && I(Kn, i.innerHTML))
2456
+ return X(i), !0;
2457
+ if (V && i.nodeType === F.text) {
2458
+ const p = Bt(i.textContent);
2459
+ i.textContent !== p && (Tt(t.removed, { element: i.cloneNode() }), i.textContent = p);
2460
+ }
2461
+ return K(T.afterSanitizeElements, i, null), ht(i, s);
2462
+ }, to = function(i, s, d) {
2463
+ if (Pe[s] || Ve(s, i) || Re && (s === "id" || s === "name") && (d in e || d in Ko)) return !1;
2464
+ const p = C[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, i);
2465
+ return te && I(Bo, s) || Ie && I(Fo, s) ? !0 : p ? Ue[s] || I(Me, xt(d, Le, "")) || (s === "src" || s === "xlink:href" || s === "href") && i !== "script" && lo(d, "data:") === 0 && Fe[i] || De && !I(Ho, xt(d, Le, "")) ? !0 : !d : eo(i) && Ht($.tagNameCheck, i) && Ht($.attributeNameCheck, s, i) || s === "is" && $.allowCustomizedBuiltInElements && Ht($.tagNameCheck, d);
2466
+ }, en = v({}, [
2467
+ "annotation-xml",
2468
+ "color-profile",
2469
+ "font-face",
2470
+ "font-face-format",
2471
+ "font-face-name",
2472
+ "font-face-src",
2473
+ "font-face-uri",
2474
+ "missing-glyph"
2475
+ ]), eo = function(i) {
2476
+ return !en[St(i)] && I(Uo, i);
2477
+ }, on = function(i, s, d, p) {
2478
+ if (N && typeof b == "object" && typeof b.getAttributeType == "function" && !d) switch (b.getAttributeType(i, s)) {
2479
+ case "TrustedHTML":
2480
+ return st(p);
2481
+ case "TrustedScriptURL":
2482
+ return Mo(p);
2483
+ }
2484
+ return p;
2485
+ }, nn = function(i, s, d, p) {
2486
+ try {
2487
+ return d ? i.setAttributeNS(d, s, p) : i.setAttribute(s, p), Ft(i) ? (X(i), !1) : !0;
2488
+ } catch (h) {
2489
+ return it(s, i), !1;
2490
+ }
2491
+ }, oo = function(i, s) {
2492
+ if (K(T.beforeSanitizeAttributes, i, null), ht(i, s)) return;
2493
+ const d = i.attributes;
2494
+ if (!d || Ft(i)) return;
2495
+ C = Je(T.uponSanitizeAttribute, C, Qt, Pt);
2496
+ const p = {
2497
+ attrName: "",
2498
+ attrValue: "",
2499
+ keepAttr: !0,
2500
+ allowedAttributes: C,
2501
+ forceKeepAttr: void 0
2502
+ };
2503
+ let h = d.length;
2504
+ const g = S(i.nodeName);
2505
+ for (; h--; ) {
2506
+ const y = d[h], A = y.name, U = y.namespaceURI, B = y.value, mt = S(A), pe = B;
2507
+ let O = A === "value" ? pe : _n(pe), no = !1;
2508
+ if (p.attrName = mt, p.attrValue = O, p.keepAttr = !0, p.forceKeepAttr = void 0, K(T.uponSanitizeAttribute, i, p), O = p.attrValue, Ne && (mt === "id" || mt === "name") && lo(O, ze) !== 0 && (it(A, i, y), O = ze + O, no = !0), ot && I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
2509
+ it(A, i, y);
2510
+ continue;
2511
+ }
2512
+ if (mt === "attributename" && so(O, "href")) {
2513
+ it(A, i, y);
2514
+ continue;
2515
+ }
2516
+ if (!p.forceKeepAttr) {
2517
+ if (!p.keepAttr) {
2518
+ it(A, i, y);
2519
+ continue;
2520
+ }
2521
+ if (!Oe && I(Yn, O)) {
2522
+ it(A, i, y);
2523
+ continue;
2524
+ }
2525
+ if (V && (O = Bt(O)), !to(g, mt, O)) {
2526
+ it(A, i, y);
2527
+ continue;
2528
+ }
2529
+ O = on(g, mt, U, O), O !== pe && nn(i, A, U, O) && no && ao(t.removed);
2530
+ }
2531
+ }
2532
+ K(T.afterSanitizeAttributes, i, null), ht(i, s);
2533
+ }, Ut = function(i) {
2534
+ let s = null;
2535
+ const d = Ze(i);
2536
+ for (K(T.beforeSanitizeShadowDOM, i, null); s = d.nextNode(); )
2537
+ if (K(T.uponSanitizeShadowNode, s, null), Qe(s, i), oo(s, i), ft(s.content) && Ut(s.content), yt(s) === F.element) {
2538
+ const p = Ce(s);
2539
+ ft(p) && (ue(p), Ut(p));
2540
+ }
2541
+ K(T.afterSanitizeShadowDOM, i, null);
2542
+ }, ue = function(i) {
2543
+ const s = [{
2544
+ node: i,
2545
+ shadow: null
2546
+ }];
2547
+ for (; s.length > 0; ) {
2548
+ const d = s.pop();
2549
+ if (d.shadow) {
2550
+ Ut(d.shadow);
2551
+ continue;
2552
+ }
2553
+ const p = d.node, h = yt(p) === F.element, g = D(p);
2554
+ if (g) for (let y = g.length - 1; y >= 0; --y) s.push({
2555
+ node: g[y],
2556
+ shadow: null
2557
+ });
2558
+ if (h) {
2559
+ const y = at ? at(p) : null;
2560
+ if (typeof y == "string" && S(y) === "template") {
2561
+ const A = p.content;
2562
+ ft(A) && s.push({
2563
+ node: A,
2564
+ shadow: null
2565
+ });
2566
+ }
2567
+ }
2568
+ if (h) {
2569
+ const y = Ce(p);
2570
+ ft(y) && s.push({
2571
+ node: null,
2572
+ shadow: y
2573
+ }, {
2574
+ node: y,
2575
+ shadow: null
2576
+ });
2577
+ }
2578
+ }
2579
+ };
2580
+ return t.sanitize = function(u) {
2581
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, p = null, h = null;
2582
+ if (re = !u, re && (u = "<!-->"), typeof u != "string" && !kt(u) && (u = Dn(u), typeof u != "string"))
2583
+ throw Z("dirty is not a string, aborting");
2584
+ if (!t.isSupported) return u;
2585
+ ee ? (x = Mt, C = Pt) : ce(i), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (x = H(x)), T.uponSanitizeAttribute.length > 0 && (C = H(C)), t.removed = [];
2586
+ const g = ie && typeof u != "string" && kt(u);
2587
+ if (g) {
2588
+ Jo(u);
2589
+ const U = Vt(u);
2590
+ if (typeof U == "string") {
2591
+ const B = S(U);
2592
+ if (!x[B] || Et[B])
2593
+ throw Nt(u), Z("root node is forbidden and cannot be sanitized in-place");
2594
+ }
2595
+ if (Ft(u))
2596
+ throw Nt(u), Z("root node is clobbered and cannot be sanitized in-place");
2597
+ try {
2598
+ ue(u);
2599
+ } catch (B) {
2600
+ throw Nt(u), B;
2601
+ }
2602
+ } else if (kt(u))
2603
+ s = Xe("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === F.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), ue(s);
2604
+ else {
2605
+ if (!lt && !V && !nt && u.indexOf("<") === -1) return N && Dt ? st(u) : u;
2606
+ if (s = Xe(u), !s) return lt ? null : Dt ? et : "";
2607
+ }
2608
+ s && oe && X(s.firstChild);
2609
+ const y = g ? u : s;
2610
+ try {
2611
+ const U = Ze(y);
2612
+ for (; p = U.nextNode(); )
2613
+ Qe(p, y), oo(p, y), ft(p.content) && Ut(p.content);
2614
+ } catch (U) {
2615
+ throw g && (Nt(u), rt(t.removed, (B) => {
2616
+ B.element && zt(B.element);
2617
+ })), U;
2618
+ }
2619
+ if (g) {
2620
+ let U = !1;
2621
+ if (rt(t.removed, (B) => {
2622
+ B.element && (B.element === u && (U = !0), zt(B.element));
2623
+ }), U) throw Z("a node selected for removal could not be safely returned; refusing to sanitize in place");
2624
+ return V && de(u), u;
2625
+ }
2626
+ if (lt) {
2627
+ if (V && de(s), It)
2628
+ for (h = Io.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
2629
+ else h = s;
2630
+ return (C.shadowroot || C.shadowrootmode) && (h = Oo.call(n, h, !0)), h;
2631
+ }
2632
+ let A = nt ? s.outerHTML : s.innerHTML;
2633
+ return nt && x["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && I($n, s.ownerDocument.doctype.name) && (A = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
2634
+ ` + A), V && (A = Bt(A)), N && Dt ? st(A) : A;
2635
+ }, t.setConfig = function() {
2636
+ let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2637
+ ce(u), ee = !0, Mt = x, Pt = C;
2638
+ }, t.clearConfig = function() {
2639
+ pt = null, ee = !1, Mt = null, Pt = null, N = Xt, et = "";
2640
+ }, t.isValidAttribute = function(u, i, s) {
2641
+ pt || ce({});
2642
+ const d = S(u), p = S(i);
2643
+ return to(d, p, s);
2644
+ }, t.addHook = function(u, i) {
2645
+ typeof i == "function" && z(T, u) && Tt(T[u], i);
2646
+ }, t.removeHook = function(u, i) {
2647
+ if (z(T, u)) {
2648
+ if (i !== void 0) {
2649
+ const s = An(T[u], i);
2650
+ return s === -1 ? void 0 : Sn(T[u], s, 1)[0];
2651
+ }
2652
+ return ao(T[u]);
2653
+ }
2654
+ }, t.removeHooks = function(u) {
2655
+ z(T, u) && (T[u] = []);
2656
+ }, t.removeAllHooks = function() {
2657
+ T = vo();
2658
+ }, t;
2659
+ }
2660
+ var Wt = _o();
2661
+ const Jn = [
1136
2662
  "p",
1137
2663
  "br",
1138
2664
  "strong",
@@ -1156,7 +2682,6 @@ const q = [
1156
2682
  "img",
1157
2683
  "video",
1158
2684
  "audio",
1159
- "iframe",
1160
2685
  "table",
1161
2686
  "thead",
1162
2687
  "tbody",
@@ -1172,70 +2697,81 @@ const q = [
1172
2697
  "sup",
1173
2698
  "sub",
1174
2699
  "hr"
1175
- ], V = {
2700
+ // 'iframe' is deliberately not in the default allowlist. Arbitrary pasted
2701
+ // or typed content should not be able to silently embed an iframe - that's
2702
+ // a real vector (e.g. pasting from a compromised page). The editor's
2703
+ // embed-iframe plugin inserts iframes through its own explicit,
2704
+ // user-initiated dialog, a different trust boundary that never calls
2705
+ // through this sanitizer. A consumer that genuinely wants iframes in
2706
+ // pasted/typed content can still opt in via a custom allowedTags list.
2707
+ ], Qn = {
1176
2708
  "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck", "dir", "lang"],
1177
2709
  a: ["href", "target", "rel", "title"],
1178
2710
  img: ["src", "alt", "width", "height", "loading"],
1179
2711
  video: ["src", "controls", "width", "height", "autoplay", "loop", "muted"],
1180
2712
  audio: ["src", "controls", "autoplay", "loop", "muted"],
1181
- iframe: ["src", "width", "height", "name", "title", "longdesc", "allow", "allowfullscreen", "frameborder", "scrolling", "loading", "referrerpolicy"],
1182
2713
  table: ["border", "cellpadding", "cellspacing"],
1183
2714
  td: ["colspan", "rowspan", "align", "valign"],
1184
- th: ["colspan", "rowspan", "align", "valign"]
1185
- };
1186
- function I(i, t, e) {
1187
- if ((t == null ? void 0 : t.sanitize) === !1)
1188
- return i;
1189
- const o = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : q, n = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : V, a = document.createElement("div");
1190
- return a.innerHTML = i, D(a, o, n), a.innerHTML;
1191
- }
1192
- function D(i, t, e) {
1193
- const o = Array.from(i.childNodes);
1194
- for (const r of o)
1195
- if (r.nodeType === Node.ELEMENT_NODE) {
1196
- const n = r, a = n.tagName.toLowerCase();
1197
- if (!t.includes(a)) {
1198
- for (; n.firstChild; )
1199
- i.insertBefore(n.firstChild, n);
1200
- i.removeChild(n);
1201
- continue;
1202
- }
1203
- G(n, e), D(n, t, e);
1204
- } else r.nodeType !== Node.TEXT_NODE && i.removeChild(r);
2715
+ th: ["colspan", "rowspan", "align", "valign"],
2716
+ // 'iframe' itself is still excluded from DEFAULT_ALLOWED_TAGS above, so this
2717
+ // entry is inert for ordinary input/paste - it only takes effect for the
2718
+ // embed-iframe plugin's trust-marked insertions (see sanitizeInputHTML's
2719
+ // additionalAllowedTags), restoring the attributes that make an inserted
2720
+ // iframe actually usable (src, sizing, fullscreen, scrolling/border).
2721
+ iframe: ["src", "width", "height", "name", "title", "frameborder", "scrolling", "allowfullscreen", "longdesc", "allow"]
2722
+ }, ti = "data-editora-embed";
2723
+ function ei(o) {
2724
+ if (!o || /\s/.test(o.trim())) return !1;
2725
+ try {
2726
+ const t = new URL(o.trim());
2727
+ return (t.protocol === "https:" || t.protocol === "http:") && t.hostname.length > 0;
2728
+ } catch (t) {
2729
+ return !1;
2730
+ }
1205
2731
  }
1206
- function G(i, t) {
1207
- const e = i.tagName.toLowerCase(), o = Array.from(i.attributes), r = t[e] || [], n = t["*"] || [], a = [...r, ...n];
1208
- for (const s of o) {
1209
- const l = s.name.toLowerCase();
1210
- let c = !1;
1211
- a.includes(l) && (c = !0);
1212
- for (const d of a)
1213
- if (d.endsWith("*")) {
1214
- const h = d.slice(0, -1);
1215
- if (l.startsWith(h)) {
1216
- c = !0;
1217
- break;
1218
- }
1219
- }
1220
- (l.startsWith("on") || l === "javascript:" || l === "href" && s.value.trim().toLowerCase().startsWith("javascript:") || l === "src" && s.value.trim().toLowerCase().startsWith("javascript:")) && (c = !1), l === "dir" && !["ltr", "rtl", "auto"].includes(s.value.trim().toLowerCase()) && (c = !1), c || i.removeAttribute(s.name);
2732
+ function Lo(o, t, e, n) {
2733
+ if ((t == null ? void 0 : t.sanitize) === !1)
2734
+ return o;
2735
+ const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : Jn, a = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...r, ...e])) : r, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : Qn, f = /* @__PURE__ */ new Set();
2736
+ for (const b of Object.values(c))
2737
+ for (const w of b) f.add(w);
2738
+ const m = {
2739
+ ALLOWED_TAGS: a,
2740
+ ALLOWED_ATTR: Array.from(f)
2741
+ };
2742
+ if (!n)
2743
+ return Wt.sanitize(o, m);
2744
+ Wt.addHook(
2745
+ "uponSanitizeElement",
2746
+ (b, w) => {
2747
+ var _;
2748
+ w.tagName === "iframe" && ((_ = b.getAttribute) == null ? void 0 : _.call(b, ti)) === "true" && ei(b.getAttribute("src")) && (w.allowedTags.iframe = !0);
2749
+ }
2750
+ );
2751
+ try {
2752
+ return Wt.sanitize(o, m);
2753
+ } finally {
2754
+ Wt.removeHook("uponSanitizeElement");
1221
2755
  }
1222
- i.hasAttribute("href") && (i.getAttribute("href") || "").trim().toLowerCase().startsWith("javascript:") && i.removeAttribute("href"), i.hasAttribute("src") && (i.getAttribute("src") || "").trim().toLowerCase().startsWith("javascript:") && i.removeAttribute("src");
1223
2756
  }
1224
- function X(i, t, e) {
1225
- return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? i : I(i, t);
2757
+ function oi(o, t, e, n) {
2758
+ return Lo(o, t, n, !1);
1226
2759
  }
1227
- function Y(i, t, e) {
1228
- return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? i : I(i, t);
2760
+ function ni(o, t, e) {
2761
+ return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? o : oi(o, t);
1229
2762
  }
1230
- const S = class S {
2763
+ function ii(o, t, e, n) {
2764
+ return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? o : Lo(o, t, n, !0);
2765
+ }
2766
+ const Yt = class Yt {
1231
2767
  /**
1232
2768
  * Resolve configuration from multiple sources with priority
1233
2769
  */
1234
2770
  static resolve(t) {
1235
2771
  const e = {};
1236
2772
  if (Object.assign(e, this.EDITOR_DEFAULTS), t.pluginDefaults && Object.assign(e, t.pluginDefaults), t.attributes) {
1237
- const o = this.parseAttributes(t.attributes);
1238
- Object.assign(e, o);
2773
+ const n = this.parseAttributes(t.attributes);
2774
+ Object.assign(e, n);
1239
2775
  }
1240
2776
  return t.jsConfig && Object.assign(e, t.jsConfig), this.normalizeConfig(e);
1241
2777
  }
@@ -1245,14 +2781,14 @@ const S = class S {
1245
2781
  static normalizeConfig(t) {
1246
2782
  const e = { ...t };
1247
2783
  if (e.toolbarFloating !== void 0 || e.toolbarSticky !== void 0) {
1248
- const a = typeof e.toolbar == "object" && e.toolbar ? { ...e.toolbar } : typeof e.toolbar == "string" ? { items: e.toolbar } : {};
1249
- e.toolbarFloating !== void 0 && (a.floating = !!e.toolbarFloating), e.toolbarSticky !== void 0 && (a.sticky = !!e.toolbarSticky), e.toolbar = a;
2784
+ const l = typeof e.toolbar == "object" && e.toolbar ? { ...e.toolbar } : typeof e.toolbar == "string" ? { items: e.toolbar } : {};
2785
+ e.toolbarFloating !== void 0 && (l.floating = !!e.toolbarFloating), e.toolbarSticky !== void 0 && (l.sticky = !!e.toolbarSticky), e.toolbar = l;
1250
2786
  }
1251
2787
  if (e.toolbarItems !== void 0 && typeof e.toolbar == "object" && e.toolbar && (e.toolbar.items = e.toolbarItems), e.autosaveEnabled !== void 0 || e.autosaveIntervalMs !== void 0 || e.autosaveStorageKey !== void 0 || e.autosaveProvider !== void 0 || e.autosaveApiUrl !== void 0) {
1252
- const a = typeof e.autosave == "object" && e.autosave ? { ...e.autosave } : {};
1253
- e.autosaveEnabled !== void 0 && (a.enabled = !!e.autosaveEnabled), e.autosaveIntervalMs !== void 0 && (a.intervalMs = Number(e.autosaveIntervalMs)), e.autosaveStorageKey !== void 0 && (a.storageKey = e.autosaveStorageKey), e.autosaveProvider !== void 0 && (a.provider = e.autosaveProvider), e.autosaveApiUrl !== void 0 && (a.apiUrl = e.autosaveApiUrl), e.autosave = a;
2788
+ const l = typeof e.autosave == "object" && e.autosave ? { ...e.autosave } : {};
2789
+ e.autosaveEnabled !== void 0 && (l.enabled = !!e.autosaveEnabled), e.autosaveIntervalMs !== void 0 && (l.intervalMs = Number(e.autosaveIntervalMs)), e.autosaveStorageKey !== void 0 && (l.storageKey = e.autosaveStorageKey), e.autosaveProvider !== void 0 && (l.provider = e.autosaveProvider), e.autosaveApiUrl !== void 0 && (l.apiUrl = e.autosaveApiUrl), e.autosave = l;
1254
2790
  }
1255
- const o = {
2791
+ const n = {
1256
2792
  enabled: !1,
1257
2793
  intervalMs: 3e4,
1258
2794
  storageKey: "rte-autosave",
@@ -1261,20 +2797,20 @@ const S = class S {
1261
2797
  };
1262
2798
  if (typeof e.autosave == "boolean")
1263
2799
  e.autosave = {
1264
- ...o,
2800
+ ...n,
1265
2801
  enabled: e.autosave
1266
2802
  };
1267
2803
  else if (typeof e.autosave == "object" && e.autosave) {
1268
- const a = {
1269
- ...o,
2804
+ const l = {
2805
+ ...n,
1270
2806
  ...e.autosave
1271
2807
  };
1272
- a.intervalMs === void 0 && a.interval !== void 0 && (a.intervalMs = Number(a.interval)), a.enabled === void 0 && (a.enabled = !0), (!Number.isFinite(a.intervalMs) || a.intervalMs <= 0) && (a.intervalMs = o.intervalMs), e.autosave = a;
2808
+ l.intervalMs === void 0 && l.interval !== void 0 && (l.intervalMs = Number(l.interval)), l.enabled === void 0 && (l.enabled = !0), (!Number.isFinite(l.intervalMs) || l.intervalMs <= 0) && (l.intervalMs = n.intervalMs), e.autosave = l;
1273
2809
  } else
1274
- e.autosave = o;
2810
+ e.autosave = n;
1275
2811
  if (e.languageLocale !== void 0 || e.languageDirection !== void 0) {
1276
- const a = typeof e.language == "object" && e.language ? { ...e.language } : {};
1277
- e.languageLocale !== void 0 && (a.locale = e.languageLocale), e.languageDirection !== void 0 && (a.direction = e.languageDirection), e.language = a;
2812
+ const l = typeof e.language == "object" && e.language ? { ...e.language } : {};
2813
+ e.languageLocale !== void 0 && (l.locale = e.languageLocale), e.languageDirection !== void 0 && (l.direction = e.languageDirection), e.language = l;
1278
2814
  }
1279
2815
  const r = { locale: "en", direction: "ltr" };
1280
2816
  if (typeof e.language == "string" ? e.language = {
@@ -1284,27 +2820,27 @@ const S = class S {
1284
2820
  ...r,
1285
2821
  ...e.language
1286
2822
  } : e.language = r, e.spellcheckEnabled !== void 0 || e.spellcheckProvider !== void 0 || e.spellcheckApiUrl !== void 0) {
1287
- const a = typeof e.spellcheck == "object" && e.spellcheck ? { ...e.spellcheck } : {};
1288
- e.spellcheckEnabled !== void 0 && (a.enabled = !!e.spellcheckEnabled), e.spellcheckProvider !== void 0 && (a.provider = e.spellcheckProvider), e.spellcheckApiUrl !== void 0 && (a.apiUrl = e.spellcheckApiUrl), e.spellcheck = a;
2823
+ const l = typeof e.spellcheck == "object" && e.spellcheck ? { ...e.spellcheck } : {};
2824
+ e.spellcheckEnabled !== void 0 && (l.enabled = !!e.spellcheckEnabled), e.spellcheckProvider !== void 0 && (l.provider = e.spellcheckProvider), e.spellcheckApiUrl !== void 0 && (l.apiUrl = e.spellcheckApiUrl), e.spellcheck = l;
1289
2825
  }
1290
- const n = {
2826
+ const a = {
1291
2827
  enabled: !1,
1292
2828
  provider: "browser",
1293
2829
  apiUrl: ""
1294
2830
  };
1295
2831
  if (typeof e.spellcheck == "boolean")
1296
2832
  e.spellcheck = {
1297
- ...n,
2833
+ ...a,
1298
2834
  enabled: e.spellcheck
1299
2835
  };
1300
2836
  else if (typeof e.spellcheck == "object" && e.spellcheck) {
1301
- const a = {
1302
- ...n,
2837
+ const l = {
2838
+ ...a,
1303
2839
  ...e.spellcheck
1304
2840
  };
1305
- !a.provider && a.mode && (a.provider = a.mode === "local" ? "browser" : "api"), a.enabled === void 0 && (a.enabled = !!(a.mode || a.provider || a.apiUrl)), e.spellcheck = a;
2841
+ !l.provider && l.mode && (l.provider = l.mode === "local" ? "browser" : "api"), l.enabled === void 0 && (l.enabled = !!(l.mode || l.provider || l.apiUrl)), e.spellcheck = l;
1306
2842
  } else
1307
- e.spellcheck = n;
2843
+ e.spellcheck = a;
1308
2844
  return e.contextMenuEnabled !== void 0 && (e.contextMenu = {
1309
2845
  enabled: !!e.contextMenuEnabled
1310
2846
  }), typeof e.contextMenu == "boolean" ? e.contextMenu = { enabled: e.contextMenu } : typeof e.contextMenu == "object" && e.contextMenu ? e.contextMenu = {
@@ -1364,9 +2900,9 @@ const S = class S {
1364
2900
  */
1365
2901
  static parseAttributes(t) {
1366
2902
  const e = {};
1367
- for (const [o, r] of Object.entries(t)) {
1368
- const n = this.kebabToCamel(o);
1369
- e[n] = this.parseAttributeValue(r);
2903
+ for (const [n, r] of Object.entries(t)) {
2904
+ const a = this.kebabToCamel(n);
2905
+ e[a] = this.BOOLEAN_ATTRIBUTES.has(n) && (r === "" || r === n) ? !0 : this.parseAttributeValue(r);
1370
2906
  }
1371
2907
  return e;
1372
2908
  }
@@ -1390,7 +2926,7 @@ const S = class S {
1390
2926
  * Convert kebab-case to camelCase
1391
2927
  */
1392
2928
  static kebabToCamel(t) {
1393
- return t.replace(/-([a-z])/g, (e, o) => o.toUpperCase());
2929
+ return t.replace(/-([a-z])/g, (e, n) => n.toUpperCase());
1394
2930
  }
1395
2931
  /**
1396
2932
  * Validate configuration
@@ -1413,13 +2949,13 @@ const S = class S {
1413
2949
  */
1414
2950
  static merge(...t) {
1415
2951
  const e = {};
1416
- for (const o of t)
1417
- for (const [r, n] of Object.entries(o))
1418
- n != null && (typeof n == "object" && !Array.isArray(n) && e[r] ? e[r] = this.merge(e[r], n) : e[r] = n);
2952
+ for (const n of t)
2953
+ for (const [r, a] of Object.entries(n))
2954
+ a != null && (typeof a == "object" && !Array.isArray(a) && e[r] ? e[r] = this.merge(e[r], a) : e[r] = a);
1419
2955
  return e;
1420
2956
  }
1421
2957
  };
1422
- S.EDITOR_DEFAULTS = {
2958
+ Yt.EDITOR_DEFAULTS = {
1423
2959
  height: 400,
1424
2960
  width: "100%",
1425
2961
  readonly: !1,
@@ -1468,87 +3004,106 @@ S.EDITOR_DEFAULTS = {
1468
3004
  sanitizeOnInput: !0
1469
3005
  },
1470
3006
  statusbar: !1
1471
- };
1472
- let x = S;
1473
- const J = '.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;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-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}}';
1474
- let y;
1475
- const Q = "__editoraCommandEditorRoot", Z = "__editoraLastCommandButton", A = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", T = ".rte-content, .editora-content", E = /* @__PURE__ */ new Set();
1476
- let g = null, L = !1, w = null, C = null;
1477
- function M(i) {
1478
- if (!(i instanceof HTMLElement)) return !1;
1479
- const t = i;
3007
+ }, Yt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
3008
+ "readonly",
3009
+ "disabled",
3010
+ "autofocus",
3011
+ "statusbar",
3012
+ "toolbar-floating",
3013
+ "toolbar-sticky",
3014
+ "autosave-enabled",
3015
+ "accessibility-enable-aria",
3016
+ "accessibility-keyboard-navigation",
3017
+ "accessibility-checker",
3018
+ "performance-viewport-only-scan",
3019
+ "spellcheck-enabled",
3020
+ "context-menu-enabled",
3021
+ "paste-clean",
3022
+ "paste-keep-formatting",
3023
+ "paste-convert-word",
3024
+ "security-sanitize-on-paste",
3025
+ "security-sanitize-on-input"
3026
+ ]);
3027
+ let Te = Yt;
3028
+ const ri = '.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}}';
3029
+ let $t;
3030
+ const ai = "__editoraCommandEditorRoot", si = "__editoraLastCommandButton", Eo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", wo = ".rte-content, .editora-content", xe = /* @__PURE__ */ new Set();
3031
+ let Q = null, ko = !1, ve = null, Ee = null;
3032
+ function To(o) {
3033
+ if (!(o instanceof HTMLElement)) return !1;
3034
+ const t = o;
1480
3035
  return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
1481
3036
  }
1482
- function tt(i) {
1483
- return i ? i.nodeType === Node.ELEMENT_NODE ? i : i.parentElement : null;
3037
+ function li(o) {
3038
+ return o ? o.nodeType === Node.ELEMENT_NODE ? o : o.parentElement : null;
1484
3039
  }
1485
- function b(i) {
1486
- if (!i) return null;
1487
- if (M(i))
1488
- return i;
1489
- const t = i.matches(A) ? i : i.closest(A);
1490
- return !t || !M(t) ? null : t;
3040
+ function At(o) {
3041
+ if (!o) return null;
3042
+ if (To(o))
3043
+ return o;
3044
+ const t = o.matches(Eo) ? o : o.closest(Eo);
3045
+ return !t || !To(t) ? null : t;
1491
3046
  }
1492
- function et() {
3047
+ function ci() {
1493
3048
  var r;
1494
3049
  if (typeof window == "undefined") return null;
1495
- const i = window[Q];
1496
- if (i instanceof HTMLElement) {
1497
- const n = b(i);
1498
- if (n) return n;
1499
- const a = i.matches(T) ? i : i.querySelector(T);
1500
- if (a) {
1501
- const s = b(a);
1502
- if (s) return s;
3050
+ const o = window[ai];
3051
+ if (o instanceof HTMLElement) {
3052
+ const a = At(o);
3053
+ if (a) return a;
3054
+ const l = o.matches(wo) ? o : o.querySelector(wo);
3055
+ if (l) {
3056
+ const c = At(l);
3057
+ if (c) return c;
1503
3058
  }
1504
3059
  }
1505
- const t = window[Z];
3060
+ const t = window[si];
1506
3061
  if (t instanceof HTMLElement) {
1507
- const n = b(t);
1508
- if (n) return n;
3062
+ const a = At(t);
3063
+ if (a) return a;
1509
3064
  }
1510
3065
  const e = document.activeElement;
1511
3066
  if (e) {
1512
- const n = b(e);
1513
- if (n) return n;
1514
- }
1515
- const o = (r = window.getSelection) == null ? void 0 : r.call(window);
1516
- if (o && o.rangeCount > 0) {
1517
- const n = b(tt(o.getRangeAt(0).startContainer));
1518
- if (n) return n;
1519
- }
1520
- if (g && g.isConnected)
1521
- return g;
1522
- for (const n of E)
1523
- if (n.isConnected) return n;
3067
+ const a = At(e);
3068
+ if (a) return a;
3069
+ }
3070
+ const n = (r = window.getSelection) == null ? void 0 : r.call(window);
3071
+ if (n && n.rangeCount > 0) {
3072
+ const a = At(li(n.getRangeAt(0).startContainer));
3073
+ if (a) return a;
3074
+ }
3075
+ if (Q && Q.isConnected)
3076
+ return Q;
3077
+ for (const a of xe)
3078
+ if (a.isConnected) return a;
1524
3079
  return null;
1525
3080
  }
1526
- function ot() {
1527
- if (typeof window == "undefined" || L) return;
1528
- w = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, C = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
1529
- const i = (t, ...e) => {
1530
- const o = et();
1531
- return o ? o.execCommand(t, ...e) : w ? w(t, ...e) : C ? C(t, ...e) : !1;
3081
+ function di() {
3082
+ if (typeof window == "undefined" || ko) return;
3083
+ ve = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, Ee = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3084
+ const o = (t, ...e) => {
3085
+ const n = ci();
3086
+ return n ? n.execCommand(t, ...e) : ve ? ve(t, ...e) : Ee ? Ee(t, ...e) : !1;
1532
3087
  };
1533
- window.executeEditorCommand = i, window.execEditorCommand = i, L = !0;
3088
+ window.executeEditorCommand = o, window.execEditorCommand = o, ko = !0;
1534
3089
  }
1535
- function it() {
1536
- const i = "editora-webcomponent-styles";
1537
- if (!document.getElementById(i)) {
3090
+ function ui() {
3091
+ const o = "editora-webcomponent-styles";
3092
+ if (!document.getElementById(o)) {
1538
3093
  const t = document.createElement("style");
1539
- t.id = i, t.textContent = J, document.head.appendChild(t);
3094
+ t.id = o, t.textContent = ri, document.head.appendChild(t);
1540
3095
  }
1541
3096
  }
1542
- function nt() {
1543
- if (!y) {
1544
- const i = m.__globalPluginLoader;
1545
- i ? y = i : y = new P();
3097
+ function pi() {
3098
+ if (!$t) {
3099
+ const o = W.__globalPluginLoader;
3100
+ o ? $t = o : $t = new xo();
1546
3101
  }
1547
- return y;
3102
+ return $t;
1548
3103
  }
1549
- class m extends HTMLElement {
3104
+ class W extends HTMLElement {
1550
3105
  constructor() {
1551
- if (super(), this.pluginLoader = nt(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new K(), this.lastAutosavedContent = "", this.loadedPlugins = [], this.lastBeforeInputType = null, it(), !this.hasAttribute("data-initial-content")) {
3106
+ if (super(), this.pluginLoader = pi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new bn(), this.lastAutosavedContent = "", this.loadedPlugins = [], this.lastBeforeInputType = null, ui(), !this.hasAttribute("data-initial-content")) {
1552
3107
  const t = this.innerHTML.trim();
1553
3108
  t && this.setAttribute("data-initial-content", t);
1554
3109
  }
@@ -1614,13 +3169,13 @@ class m extends HTMLElement {
1614
3169
  * Wait for the global plugin loader to be available
1615
3170
  */
1616
3171
  async waitForPluginLoader() {
1617
- if (m.__globalPluginLoader) {
1618
- this.pluginLoader = m.__globalPluginLoader;
3172
+ if (W.__globalPluginLoader) {
3173
+ this.pluginLoader = W.__globalPluginLoader;
1619
3174
  return;
1620
3175
  }
1621
3176
  return new Promise((t) => {
1622
3177
  const e = () => {
1623
- m.__globalPluginLoader ? (this.pluginLoader = m.__globalPluginLoader, t()) : setTimeout(e, 0);
3178
+ W.__globalPluginLoader ? (this.pluginLoader = W.__globalPluginLoader, t()) : setTimeout(e, 0);
1624
3179
  };
1625
3180
  e();
1626
3181
  });
@@ -1634,8 +3189,8 @@ class m extends HTMLElement {
1634
3189
  /**
1635
3190
  * Called when an observed attribute changes
1636
3191
  */
1637
- attributeChangedCallback(t, e, o) {
1638
- e !== o && (this.config = this.resolveConfig(), this.handleAttributeChange(t, o));
3192
+ attributeChangedCallback(t, e, n) {
3193
+ e !== n && (this.config = this.resolveConfig(), this.handleAttributeChange(t, n));
1639
3194
  }
1640
3195
  /**
1641
3196
  * Set configuration via JavaScript API
@@ -1647,20 +3202,23 @@ class m extends HTMLElement {
1647
3202
  * Initialize the editor
1648
3203
  */
1649
3204
  async initialize() {
1650
- var o;
3205
+ var n;
1651
3206
  if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
1652
- this.setAttribute("data-editora-editor", "true"), E.add(this), g || (g = this), ot(), 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}`);
3207
+ this.setAttribute("data-editora-editor", "true"), xe.add(this), Q || (Q = this), di(), 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}`);
1653
3208
  const t = await this.loadPlugins();
1654
- this.loadedPlugins = t, t.forEach((r) => {
3209
+ if (this.loadedPlugins = t, t.forEach((r) => {
1655
3210
  if (r.init && typeof r.init == "function")
1656
3211
  try {
1657
3212
  r.init({ editorElement: this });
1658
- } catch (n) {
1659
- console.error(`[RichTextEditor] Error initializing plugin ${r.name}:`, n);
3213
+ } catch (a) {
3214
+ console.error(`[RichTextEditor] Error initializing plugin ${r.name}:`, a);
1660
3215
  }
1661
- });
1662
- const e = (o = this.restoreAutosavedContent()) != null ? o : this.getAttribute("data-initial-content") || "";
1663
- this.engine = new R({
3216
+ }), !this.hasAttribute("data-initial-content") && !this.contentElement) {
3217
+ const r = this.innerHTML.trim();
3218
+ r && this.setAttribute("data-initial-content", r);
3219
+ }
3220
+ const e = (n = this.restoreAutosavedContent()) != null ? n : this.getAttribute("data-initial-content") || "";
3221
+ this.engine = new ln({
1664
3222
  content: e,
1665
3223
  plugins: t,
1666
3224
  readonly: this.config.readonly
@@ -1676,7 +3234,7 @@ class m extends HTMLElement {
1676
3234
  if (this.config.content)
1677
3235
  return this.config.content;
1678
3236
  const t = this.querySelector("[slot]");
1679
- return t ? t.innerHTML : this.hasChildNodes() ? Array.from(this.childNodes).map((o) => o.nodeType === Node.TEXT_NODE ? o.textContent : o.nodeType === Node.ELEMENT_NODE ? o.outerHTML : "").join("").trim() : "";
3237
+ return t ? t.innerHTML : this.hasChildNodes() ? Array.from(this.childNodes).map((n) => n.nodeType === Node.TEXT_NODE ? n.textContent : n.nodeType === Node.ELEMENT_NODE ? n.outerHTML : "").join("").trim() : "";
1680
3238
  }
1681
3239
  /**
1682
3240
  * Load plugins based on configuration
@@ -1686,29 +3244,29 @@ class m extends HTMLElement {
1686
3244
  const t = [], e = this.config.plugins && (typeof this.config.plugins == "string" && this.config.plugins.length > 0 || Array.isArray(this.config.plugins) && this.config.plugins.length > 0), r = this.getAccessibilityConfig().checker === !0;
1687
3245
  if (e) {
1688
3246
  if (typeof this.config.plugins == "string") {
1689
- const n = this.config.plugins.split(/\s+/).filter(Boolean);
1690
- r && !n.includes("a11yChecker") && n.push("a11yChecker");
1691
- for (const a of n) {
1692
- const s = await this.pluginLoader.load(a, this.getPluginLoadConfig(a));
1693
- s && t.push(s);
3247
+ const a = this.config.plugins.split(/\s+/).filter(Boolean);
3248
+ r && !a.includes("a11yChecker") && a.push("a11yChecker");
3249
+ for (const l of a) {
3250
+ const c = await this.pluginLoader.load(l, this.getPluginLoadConfig(l));
3251
+ c && t.push(c);
1694
3252
  }
1695
3253
  } else if (Array.isArray(this.config.plugins)) {
1696
- for (const n of this.config.plugins)
1697
- if (typeof n == "string") {
1698
- const a = await this.pluginLoader.load(n, this.getPluginLoadConfig(n));
1699
- a && t.push(a);
3254
+ for (const a of this.config.plugins)
3255
+ if (typeof a == "string") {
3256
+ const l = await this.pluginLoader.load(a, this.getPluginLoadConfig(a));
3257
+ l && t.push(l);
1700
3258
  } else
1701
- t.push(n);
1702
- if (r && !t.some((n) => (n == null ? void 0 : n.name) === "a11yChecker")) {
1703
- const n = await this.pluginLoader.load("a11yChecker", this.getPluginLoadConfig("a11yChecker"));
1704
- n && t.push(n);
3259
+ t.push(a);
3260
+ if (r && !t.some((a) => (a == null ? void 0 : a.name) === "a11yChecker")) {
3261
+ const a = await this.pluginLoader.load("a11yChecker", this.getPluginLoadConfig("a11yChecker"));
3262
+ a && t.push(a);
1705
3263
  }
1706
3264
  }
1707
3265
  } else {
1708
- const n = this.pluginLoader.getRegisteredPluginNames();
1709
- for (const a of n) {
1710
- const s = await this.pluginLoader.load(a, this.getPluginLoadConfig(a));
1711
- s && t.push(s);
3266
+ const a = this.pluginLoader.getRegisteredPluginNames();
3267
+ for (const l of a) {
3268
+ const c = await this.pluginLoader.load(l, this.getPluginLoadConfig(l));
3269
+ c && t.push(c);
1712
3270
  }
1713
3271
  }
1714
3272
  return t;
@@ -1720,9 +3278,9 @@ class m extends HTMLElement {
1720
3278
  const e = this.config.toolbar;
1721
3279
  if (typeof e == "string") return e;
1722
3280
  if (!e || typeof e != "object") return;
1723
- const o = e.items;
1724
- if (typeof o == "string") return o;
1725
- if (Array.isArray(o)) return o.join(" ");
3281
+ const n = e.items;
3282
+ if (typeof n == "string") return n;
3283
+ if (Array.isArray(n)) return n.join(" ");
1726
3284
  }
1727
3285
  isToolbarStickyEnabled() {
1728
3286
  const t = this.config.toolbar;
@@ -1772,9 +3330,9 @@ class m extends HTMLElement {
1772
3330
  viewportOnlyScan: t
1773
3331
  };
1774
3332
  if (t && typeof t == "object") {
1775
- const o = Number((e = t.debounceInputMs) != null ? e : 100);
3333
+ const n = Number((e = t.debounceInputMs) != null ? e : 100);
1776
3334
  return {
1777
- debounceInputMs: Number.isFinite(o) && o >= 0 ? o : 100,
3335
+ debounceInputMs: Number.isFinite(n) && n >= 0 ? n : 100,
1778
3336
  viewportOnlyScan: t.viewportOnlyScan !== !1
1779
3337
  };
1780
3338
  }
@@ -1827,32 +3385,32 @@ class m extends HTMLElement {
1827
3385
  this.contentElement.spellcheck = e, this.contentElement.setAttribute("spellcheck", e ? "true" : "false");
1828
3386
  }
1829
3387
  executeCommand(t, ...e) {
1830
- var n;
3388
+ var a;
1831
3389
  typeof window != "undefined" && (window.__editoraCommandEditorRoot = this);
1832
- const o = {
3390
+ const n = {
1833
3391
  editorElement: this,
1834
3392
  contentElement: this.contentElement,
1835
3393
  toolbarElement: this.toolbarElement
1836
- }, r = this.loadedPlugins.find((a) => a.commands && a.commands[t]);
3394
+ }, r = this.loadedPlugins.find((l) => l.commands && l.commands[t]);
1837
3395
  if (r && r.commands) {
1838
- const a = r.commands[t];
1839
- if (typeof a == "function")
3396
+ const l = r.commands[t];
3397
+ if (typeof l == "function")
1840
3398
  try {
1841
- return t === "toggleFullscreen" ? a(this, o) : a(...e, o), !0;
1842
- } catch (s) {
1843
- return console.error(`[RichTextEditor] Error executing native command ${t}:`, s), !1;
3399
+ return t === "toggleFullscreen" ? l(this, n) : l(...e, n), !0;
3400
+ } catch (c) {
3401
+ return console.error(`[RichTextEditor] Error executing native command ${t}:`, c), !1;
1844
3402
  }
1845
3403
  }
1846
- return ((n = this.engine) == null ? void 0 : n.execCommand(t, ...e)) || !1;
3404
+ return ((a = this.engine) == null ? void 0 : a.execCommand(t, ...e)) || !1;
1847
3405
  }
1848
3406
  getPluginLoadConfig(t) {
1849
3407
  const e = this.config.pluginConfig;
1850
3408
  if (e && typeof e == "object") {
1851
- const n = e[t];
1852
- if (n && typeof n == "object")
1853
- return n;
3409
+ const a = e[t];
3410
+ if (a && typeof a == "object")
3411
+ return a;
1854
3412
  }
1855
- const o = {
3413
+ const n = {
1856
3414
  spellCheck: ["spellcheck", "spellCheck"],
1857
3415
  trackChanges: ["trackchanges", "track-changes", "trackChanges"],
1858
3416
  versionDiff: ["versiondiff", "version-diff", "versionDiff"],
@@ -1872,12 +3430,12 @@ class m extends HTMLElement {
1872
3430
  }, r = [
1873
3431
  t,
1874
3432
  t.toLowerCase(),
1875
- ...o[t] || []
3433
+ ...n[t] || []
1876
3434
  ];
1877
- for (const n of r) {
1878
- const a = this.config[n];
1879
- if (a && typeof a == "object" && !Array.isArray(a))
1880
- return a;
3435
+ for (const a of r) {
3436
+ const l = this.config[a];
3437
+ if (l && typeof l == "object" && !Array.isArray(l))
3438
+ return l;
1881
3439
  }
1882
3440
  }
1883
3441
  getContentSanitizeConfig() {
@@ -1889,7 +3447,7 @@ class m extends HTMLElement {
1889
3447
  return t && typeof t == "object" ? t : { sanitizeOnPaste: !0, sanitizeOnInput: !0 };
1890
3448
  }
1891
3449
  getAutosaveConfig() {
1892
- var e, o;
3450
+ var e, n;
1893
3451
  const t = this.config.autosave;
1894
3452
  if (typeof t == "boolean")
1895
3453
  return {
@@ -1899,7 +3457,7 @@ class m extends HTMLElement {
1899
3457
  provider: "localStorage"
1900
3458
  };
1901
3459
  if (t && typeof t == "object") {
1902
- const r = Number((o = (e = t.intervalMs) != null ? e : t.interval) != null ? o : 3e4);
3460
+ const r = Number((n = (e = t.intervalMs) != null ? e : t.interval) != null ? n : 3e4);
1903
3461
  return {
1904
3462
  enabled: !!t.enabled,
1905
3463
  intervalMs: Number.isFinite(r) && r > 0 ? r : 3e4,
@@ -1921,8 +3479,8 @@ class m extends HTMLElement {
1921
3479
  if (this.lastAutosavedContent = t, e.provider === "localStorage") {
1922
3480
  try {
1923
3481
  localStorage.setItem(e.storageKey, t), localStorage.setItem(`${e.storageKey}-timestamp`, Date.now().toString());
1924
- } catch (o) {
1925
- console.error("[RichTextEditor] Failed to save autosave content to localStorage:", o);
3482
+ } catch (n) {
3483
+ console.error("[RichTextEditor] Failed to save autosave content to localStorage:", n);
1926
3484
  }
1927
3485
  return;
1928
3486
  }
@@ -1930,8 +3488,8 @@ class m extends HTMLElement {
1930
3488
  method: "POST",
1931
3489
  headers: { "Content-Type": "application/json" },
1932
3490
  body: JSON.stringify({ content: t, timestamp: Date.now() })
1933
- }).catch((o) => {
1934
- console.error("[RichTextEditor] Failed to save autosave content to API:", o);
3491
+ }).catch((n) => {
3492
+ console.error("[RichTextEditor] Failed to save autosave content to API:", n);
1935
3493
  });
1936
3494
  }
1937
3495
  }
@@ -1962,14 +3520,14 @@ class m extends HTMLElement {
1962
3520
  if (!this.contentElement) return;
1963
3521
  const e = window.getSelection();
1964
3522
  if (e && e.rangeCount > 0) {
1965
- const o = e.getRangeAt(0);
1966
- o.deleteContents();
3523
+ const n = e.getRangeAt(0);
3524
+ n.deleteContents();
1967
3525
  const r = document.createElement("div");
1968
3526
  r.innerHTML = t;
1969
- const n = document.createDocumentFragment();
3527
+ const a = document.createDocumentFragment();
1970
3528
  for (; r.firstChild; )
1971
- n.appendChild(r.firstChild);
1972
- o.insertNode(n), o.collapse(!1), e.removeAllRanges(), e.addRange(o);
3529
+ a.appendChild(r.firstChild);
3530
+ n.insertNode(a), n.collapse(!1), e.removeAllRanges(), e.addRange(n);
1973
3531
  } else
1974
3532
  this.contentElement.focus(), document.execCommand("insertHTML", !1, t);
1975
3533
  }
@@ -1977,8 +3535,8 @@ class m extends HTMLElement {
1977
3535
  * Create UI elements
1978
3536
  */
1979
3537
  createUI(t, e) {
1980
- const o = this.querySelector('[slot="toolbar"]'), r = this.querySelector('[slot="statusbar"]');
1981
- this.innerHTML = "", this.config.toolbar !== !1 && !o ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new z(
3538
+ const n = this.querySelector('[slot="toolbar"]'), r = this.querySelector('[slot="statusbar"]');
3539
+ this.innerHTML = "", this.config.toolbar !== !1 && !n ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new cn(
1982
3540
  {
1983
3541
  items: this.resolveToolbarItems(),
1984
3542
  sticky: this.isToolbarStickyEnabled(),
@@ -1987,37 +3545,37 @@ class m extends HTMLElement {
1987
3545
  t,
1988
3546
  this.pluginLoader
1989
3547
  // Pass plugin loader to get all registered plugins
1990
- ), this.toolbar.setCommandHandler((n, a) => {
1991
- var s;
3548
+ ), this.toolbar.setCommandHandler((a, l) => {
3549
+ var c;
1992
3550
  if (this.contentElement) {
1993
3551
  this.contentElement.focus();
1994
- const l = window.getSelection();
1995
- if (!l || l.rangeCount === 0 || !this.contentElement.contains(l.anchorNode)) {
1996
- const c = document.createRange(), d = this.contentElement.lastChild || this.contentElement;
1997
- d.nodeType === Node.TEXT_NODE ? c.setStart(d, ((s = d.textContent) == null ? void 0 : s.length) || 0) : d.nodeType === Node.ELEMENT_NODE ? (c.selectNodeContents(d), c.collapse(!1)) : c.setStart(this.contentElement, 0), c.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(c);
3552
+ const f = window.getSelection();
3553
+ if (!f || f.rangeCount === 0 || !this.contentElement.contains(f.anchorNode)) {
3554
+ const m = document.createRange(), b = this.contentElement.lastChild || this.contentElement;
3555
+ b.nodeType === Node.TEXT_NODE ? m.setStart(b, ((c = b.textContent) == null ? void 0 : c.length) || 0) : b.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(b), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), f == null || f.removeAllRanges(), f == null || f.addRange(m);
1998
3556
  }
1999
3557
  }
2000
- return this.executeCommand(n, a);
2001
- }), this.toolbar.render(this.toolbarElement)) : o && this.appendChild(o), this.contentElement = document.createElement("div"), this.contentElement.className = "editora-content rte-content", this.contentElement.contentEditable = this.config.readonly ? "false" : "true", this.applyLanguageSettings(), this.applyAccessibilitySettings(), this.applySpellcheckSettings(), this.config.placeholder && this.contentElement.setAttribute("data-placeholder", this.config.placeholder);
3558
+ return this.executeCommand(a, l);
3559
+ }), this.toolbar.render(this.toolbarElement)) : n && this.appendChild(n), this.contentElement = document.createElement("div"), this.contentElement.className = "editora-content rte-content", this.contentElement.contentEditable = this.config.readonly ? "false" : "true", this.applyLanguageSettings(), this.applyAccessibilitySettings(), this.applySpellcheckSettings(), this.config.placeholder && this.contentElement.setAttribute("data-placeholder", this.config.placeholder);
2002
3560
  try {
2003
3561
  document.execCommand("defaultParagraphSeparator", !1, "p");
2004
- } catch (n) {
2005
- console.warn("defaultParagraphSeparator not supported:", n);
3562
+ } catch (a) {
3563
+ console.warn("defaultParagraphSeparator not supported:", a);
2006
3564
  }
2007
3565
  if (e) {
2008
- const n = document.createElement("div");
2009
- n.innerHTML = e.trim(), !Array.from(n.childNodes).some((s) => {
2010
- if (s.nodeType === Node.ELEMENT_NODE) {
2011
- const l = s.tagName;
2012
- return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(l);
3566
+ const a = document.createElement("div");
3567
+ a.innerHTML = e.trim(), !Array.from(a.childNodes).some((c) => {
3568
+ if (c.nodeType === Node.ELEMENT_NODE) {
3569
+ const f = c.tagName;
3570
+ return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(f);
2013
3571
  }
2014
3572
  return !1;
2015
3573
  }) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
2016
3574
  } else
2017
3575
  this.config.placeholder ? this.contentElement.innerHTML = "" : this.contentElement.innerHTML = "<p><br></p>";
2018
- this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new H({ enabled: !0 }), this.floatingToolbar.create(this)), r ? this.appendChild(r) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new j({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.config.autofocus && setTimeout(() => {
2019
- var n;
2020
- return (n = this.contentElement) == null ? void 0 : n.focus();
3576
+ this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new dn({ enabled: !0 }), this.floatingToolbar.create(this)), r ? this.appendChild(r) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new un({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.config.autofocus && setTimeout(() => {
3577
+ var a;
3578
+ return (a = this.contentElement) == null ? void 0 : a.focus();
2021
3579
  }, 0);
2022
3580
  }
2023
3581
  /**
@@ -2026,71 +3584,72 @@ class m extends HTMLElement {
2026
3584
  setupEventListeners() {
2027
3585
  if (!this.contentElement || !this.engine) return;
2028
3586
  const t = this.keyboardShortcutManager;
2029
- this.contentElement.addEventListener("beforeinput", (o) => {
2030
- this.lastBeforeInputType = o.inputType || null;
2031
- }), this.contentElement.addEventListener("input", () => {
3587
+ this.contentElement.addEventListener("beforeinput", (n) => {
3588
+ this.lastBeforeInputType = n.inputType || null;
3589
+ }), this.contentElement.addEventListener("input", (n) => {
3590
+ var _;
2032
3591
  if (!this.contentElement) return;
2033
- let o = this.contentElement.innerHTML;
2034
- const r = this.getPerformanceConfig(), n = this.getContentSanitizeConfig(), a = this.getSecurityConfig(), s = this.lastBeforeInputType;
2035
- if (this.lastBeforeInputType = null, a.sanitizeOnInput !== !1 && n.sanitize !== !1 && !s) {
2036
- const d = Y(o, n, a);
2037
- if (d !== o) {
2038
- const h = window.getSelection(), p = h && h.rangeCount > 0 ? h.getRangeAt(0) : null;
2039
- if (this.contentElement.innerHTML = d, p && h)
3592
+ let r = this.contentElement.innerHTML;
3593
+ const a = (_ = n == null ? void 0 : n.detail) == null ? void 0 : _.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
3594
+ if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3595
+ const k = ii(r, c, f, a);
3596
+ if (k !== r) {
3597
+ const E = window.getSelection(), Y = E && E.rangeCount > 0 ? E.getRangeAt(0) : null;
3598
+ if (this.contentElement.innerHTML = k, Y && E)
2040
3599
  try {
2041
- h.removeAllRanges(), h.addRange(p);
2042
- } catch (u) {
3600
+ E.removeAllRanges(), E.addRange(Y);
3601
+ } catch (D) {
2043
3602
  }
2044
- o = d;
3603
+ r = k;
2045
3604
  }
2046
3605
  }
2047
3606
  this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
2048
- const c = () => {
3607
+ const w = () => {
2049
3608
  this.dispatchEvent(new CustomEvent("content-change", {
2050
- detail: { html: o },
3609
+ detail: { html: r },
2051
3610
  bubbles: !0
2052
3611
  }));
2053
3612
  };
2054
- r.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(c, r.debounceInputMs) : c(), this.updateStatusBar();
2055
- }), this.contentElement.addEventListener("contextmenu", (o) => {
3613
+ l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(w, l.debounceInputMs) : w(), this.updateStatusBar();
3614
+ }), this.contentElement.addEventListener("contextmenu", (n) => {
2056
3615
  const r = this.config.contextMenu;
2057
- (r === !1 || typeof r == "object" && r !== null && r.enabled === !1) && o.preventDefault();
2058
- }), this.contentElement.addEventListener("paste", (o) => {
2059
- var d, h;
2060
- if (o.__editoraSmartPasteHandled === !0 || o.defaultPrevented)
3616
+ (r === !1 || typeof r == "object" && r !== null && r.enabled === !1) && n.preventDefault();
3617
+ }), this.contentElement.addEventListener("paste", (n) => {
3618
+ var b, w;
3619
+ if (n.__editoraSmartPasteHandled === !0 || n.defaultPrevented)
2061
3620
  return;
2062
- o.preventDefault();
3621
+ n.preventDefault();
2063
3622
  const r = this.config.paste || {};
2064
- let n = ((d = o.clipboardData) == null ? void 0 : d.getData("text/html")) || "";
2065
- const a = ((h = o.clipboardData) == null ? void 0 : h.getData("text/plain")) || "", s = this.getContentSanitizeConfig(), l = this.getSecurityConfig(), c = !!n && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(n);
2066
- if ((r.clean || !r.keepFormatting) && a) {
2067
- document.execCommand("insertText", !1, a);
3623
+ let a = ((b = n.clipboardData) == null ? void 0 : b.getData("text/html")) || "";
3624
+ const l = ((w = n.clipboardData) == null ? void 0 : w.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!a && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(a);
3625
+ if ((r.clean || !r.keepFormatting) && l) {
3626
+ document.execCommand("insertText", !1, l);
2068
3627
  return;
2069
3628
  }
2070
- if (r.convertWord === !1 && c && a) {
2071
- document.execCommand("insertText", !1, a);
3629
+ if (r.convertWord === !1 && m && l) {
3630
+ document.execCommand("insertText", !1, l);
2072
3631
  return;
2073
3632
  }
2074
- if (n) {
2075
- l.sanitizeOnPaste !== !1 && s.sanitize !== !1 && (n = X(n, s, l)), this.insertHTMLAtSelection(n);
3633
+ if (a) {
3634
+ f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (a = ni(a, c, f)), this.insertHTMLAtSelection(a);
2076
3635
  return;
2077
3636
  }
2078
- a && document.execCommand("insertText", !1, a);
3637
+ l && document.execCommand("insertText", !1, l);
2079
3638
  }), this.contentElement.addEventListener("focus", () => {
2080
- g = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
3639
+ Q = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
2081
3640
  }), this.contentElement.addEventListener("blur", () => {
2082
3641
  this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.dispatchEvent(new CustomEvent("content-change", {
2083
3642
  detail: { html: this.contentElement.innerHTML },
2084
3643
  bubbles: !0
2085
3644
  })), this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
2086
- }), this.contentElement.addEventListener("keydown", (o) => {
2087
- this.getAccessibilityConfig().keyboardNavigation && t.handleKeyDown(o, (n, a) => {
2088
- this.executeCommand(n, a);
3645
+ }), this.contentElement.addEventListener("keydown", (n) => {
3646
+ this.getAccessibilityConfig().keyboardNavigation && t.handleKeyDown(n, (a, l) => {
3647
+ this.executeCommand(a, l);
2089
3648
  });
2090
3649
  });
2091
3650
  const e = () => {
2092
- const o = this.getSelectionRangeInEditor(), r = document.activeElement, n = !!r && !!this.contentElement && (r === this.contentElement || this.contentElement.contains(r));
2093
- this.getPerformanceConfig().viewportOnlyScan && !this.isEditorInViewport() && !n || !o && !n || (this.updateFloatingToolbar(), this.updateStatusBar());
3651
+ const n = this.getSelectionRangeInEditor(), r = document.activeElement, a = !!r && !!this.contentElement && (r === this.contentElement || this.contentElement.contains(r));
3652
+ this.getPerformanceConfig().viewportOnlyScan && !this.isEditorInViewport() && !a || !n && !a || (this.updateFloatingToolbar(), this.updateStatusBar());
2094
3653
  };
2095
3654
  this.selectionChangeHandler = e, document.addEventListener("selectionchange", this.selectionChangeHandler);
2096
3655
  }
@@ -2099,8 +3658,8 @@ class m extends HTMLElement {
2099
3658
  const t = window.getSelection();
2100
3659
  if (!t || t.rangeCount === 0)
2101
3660
  return null;
2102
- const e = t.getRangeAt(0), o = e.commonAncestorContainer;
2103
- return this.contentElement.contains(o) ? e : null;
3661
+ const e = t.getRangeAt(0), n = e.commonAncestorContainer;
3662
+ return this.contentElement.contains(n) ? e : null;
2104
3663
  }
2105
3664
  isSelectionBackward(t) {
2106
3665
  if (!t.anchorNode || !t.focusNode) return !1;
@@ -2112,20 +3671,20 @@ class m extends HTMLElement {
2112
3671
  }
2113
3672
  }
2114
3673
  getSelectionAnchorRect(t, e) {
2115
- const o = Array.from(e.getClientRects()).filter((n) => n.width > 0 || n.height > 0);
2116
- return o.length === 0 ? e.getBoundingClientRect() : this.isSelectionBackward(t) ? o[0] : o[o.length - 1];
3674
+ const n = Array.from(e.getClientRects()).filter((a) => a.width > 0 || a.height > 0);
3675
+ return n.length === 0 ? e.getBoundingClientRect() : this.isSelectionBackward(t) ? n[0] : n[n.length - 1];
2117
3676
  }
2118
3677
  /**
2119
3678
  * Update floating toolbar position
2120
3679
  */
2121
3680
  updateFloatingToolbar() {
2122
3681
  if (!this.floatingToolbar || !this.contentElement) return;
2123
- if (this.config.readonly || this.contentElement.contentEditable === "false" || this.contentElement.getAttribute("data-readonly") === "true" || this.getAttribute("readonly") === "true" || this.getAttribute("data-readonly") === "true") {
3682
+ if (this.config.readonly || this.contentElement.contentEditable === "false" || this.contentElement.getAttribute("data-readonly") === "true" || this.isReadonlyAttribute(this.getAttribute("readonly")) || this.getAttribute("data-readonly") === "true") {
2124
3683
  this.floatingToolbar.hide();
2125
3684
  return;
2126
3685
  }
2127
- const e = this.getPerformanceConfig(), o = document.activeElement === this.contentElement || !!this.contentElement && this.contentElement.contains(document.activeElement);
2128
- if (e.viewportOnlyScan && !this.isEditorInViewport() && !o) {
3686
+ const e = this.getPerformanceConfig(), n = document.activeElement === this.contentElement || !!this.contentElement && this.contentElement.contains(document.activeElement);
3687
+ if (e.viewportOnlyScan && !this.isEditorInViewport() && !n) {
2129
3688
  this.floatingToolbar.hide();
2130
3689
  return;
2131
3690
  }
@@ -2138,17 +3697,17 @@ class m extends HTMLElement {
2138
3697
  this.floatingToolbar.hide();
2139
3698
  return;
2140
3699
  }
2141
- const n = window.getSelection();
2142
- if (!n) {
3700
+ const a = window.getSelection();
3701
+ if (!a) {
2143
3702
  this.floatingToolbar.hide();
2144
3703
  return;
2145
3704
  }
2146
- const a = this.getSelectionAnchorRect(n, r);
2147
- if (!a) {
3705
+ const l = this.getSelectionAnchorRect(a, r);
3706
+ if (!l) {
2148
3707
  this.floatingToolbar.hide();
2149
3708
  return;
2150
3709
  }
2151
- this.floatingToolbar.show(a.left, a.top - 40);
3710
+ this.floatingToolbar.show(l.left, l.top - 40);
2152
3711
  }
2153
3712
  /**
2154
3713
  * Update status bar with selection and cursor information
@@ -2161,28 +3720,35 @@ class m extends HTMLElement {
2161
3720
  const t = this.getPerformanceConfig(), e = document.activeElement === this.contentElement || this.contentElement.contains(document.activeElement);
2162
3721
  if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
2163
3722
  return;
2164
- const o = this.contentElement.textContent || "", { words: r, chars: n } = _(o), a = W(this.contentElement);
2165
- let s, l;
2166
- const c = this.getSelectionRangeInEditor();
2167
- c && (s = F(this.contentElement, c), c.collapsed || (l = U(c, s), s = void 0)), this.statusBar.update({
3723
+ const n = this.contentElement.textContent || "", { words: r, chars: a } = mn(n), l = hn(this.contentElement);
3724
+ let c, f;
3725
+ const m = this.getSelectionRangeInEditor();
3726
+ m && (c = pn(this.contentElement, m), m.collapsed || (f = gn(m, c), c = void 0)), this.statusBar.update({
2168
3727
  wordCount: r,
2169
- charCount: n,
2170
- lineCount: a,
2171
- cursorPosition: s,
2172
- selectionInfo: l
3728
+ charCount: a,
3729
+ lineCount: l,
3730
+ cursorPosition: c,
3731
+ selectionInfo: f
2173
3732
  });
2174
3733
  }
3734
+ /**
3735
+ * `<editora-editor readonly>` and `readonly="true"` both lock the editor; only
3736
+ * removing the attribute or `readonly="false"` unlocks it.
3737
+ */
3738
+ isReadonlyAttribute(t) {
3739
+ return t !== null && t !== "false";
3740
+ }
2175
3741
  /**
2176
3742
  * Handle attribute changes
2177
3743
  */
2178
3744
  handleAttributeChange(t, e) {
2179
3745
  switch (t) {
2180
3746
  case "readonly":
2181
- this.contentElement && (this.contentElement.contentEditable = e === "true" ? "false" : "true", this.applyAccessibilitySettings()), this.engine && this.engine.setReadonly(e === "true");
3747
+ this.contentElement && (this.contentElement.contentEditable = this.isReadonlyAttribute(e) ? "false" : "true", this.applyAccessibilitySettings()), this.engine && this.engine.setReadonly(this.isReadonlyAttribute(e));
2182
3748
  break;
2183
3749
  case "theme":
2184
- this.classList.forEach((o) => {
2185
- o.startsWith("editora-theme-") && this.classList.remove(o);
3750
+ this.classList.forEach((n) => {
3751
+ n.startsWith("editora-theme-") && this.classList.remove(n);
2186
3752
  }), e && this.classList.add(`editora-theme-${e}`);
2187
3753
  break;
2188
3754
  case "placeholder":
@@ -2233,8 +3799,8 @@ class m extends HTMLElement {
2233
3799
  case "plugins":
2234
3800
  case "statusbar":
2235
3801
  this.isConnected && (this.destroy(), this.waitForPluginLoader().then(() => {
2236
- this.initialize().catch((o) => {
2237
- console.error("[RichTextEditor] Error during attribute change re-initialization:", o);
3802
+ this.initialize().catch((n) => {
3803
+ console.error("[RichTextEditor] Error during attribute change re-initialization:", n);
2238
3804
  });
2239
3805
  }));
2240
3806
  break;
@@ -2246,10 +3812,10 @@ class m extends HTMLElement {
2246
3812
  resolveConfig() {
2247
3813
  const t = {};
2248
3814
  for (let e = 0; e < this.attributes.length; e++) {
2249
- const o = this.attributes[e];
2250
- t[o.name] = o.value;
3815
+ const n = this.attributes[e];
3816
+ t[n.name] = n.value;
2251
3817
  }
2252
- return x.resolve({
3818
+ return Te.resolve({
2253
3819
  jsConfig: this.jsConfig,
2254
3820
  attributes: t
2255
3821
  });
@@ -2289,8 +3855,8 @@ class m extends HTMLElement {
2289
3855
  * Destroy the editor
2290
3856
  */
2291
3857
  destroy() {
2292
- var t, e, o, r;
2293
- this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.persistAutosave(this.contentElement.innerHTML || ""), 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(), (r = this.statusBar) == null || r.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.isInitialized = !1, E.delete(this), g === this && (g = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3858
+ var t, e, n, r;
3859
+ this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.persistAutosave(this.contentElement.innerHTML || ""), 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(), (n = this.floatingToolbar) == null || n.destroy(), (r = this.statusBar) == null || r.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 }));
2294
3860
  }
2295
3861
  // Public API methods
2296
3862
  getContent() {
@@ -2312,120 +3878,121 @@ class m extends HTMLElement {
2312
3878
  (t = this.contentElement) == null || t.blur();
2313
3879
  }
2314
3880
  }
2315
- const k = new P();
2316
- m.__globalPluginLoader = k;
2317
- const rt = {
3881
+ const Kt = new xo();
3882
+ W.__globalPluginLoader = Kt;
3883
+ const fi = {
2318
3884
  // Core editing plugins (always loaded)
2319
- bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((i) => i.BoldPlugin()),
2320
- italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((i) => i.ItalicPlugin()),
2321
- underline: () => import("./UnderlinePlugin.native-DZzg23rv.mjs").then((i) => i.UnderlinePlugin()),
2322
- strikethrough: () => import("./StrikethroughPlugin.native-V0TL4F48.mjs").then((i) => i.StrikethroughPlugin()),
2323
- clearFormatting: () => import("./ClearFormattingPlugin.native-B6ro3a1h.mjs").then((i) => i.ClearFormattingPlugin()),
2324
- heading: () => import("./HeadingPlugin.native-DZdvubrQ.mjs").then((i) => i.HeadingPlugin()),
2325
- blockquote: () => import("./BlockquotePlugin.native-57_Xcjl1.mjs").then((i) => i.BlockquotePlugin()),
2326
- code: () => import("./CodePlugin.native-knhM8NNo.mjs").then((i) => i.CodePlugin()),
2327
- codeSample: () => import("./CodeSamplePlugin.native-CgGoH-X4.mjs").then((i) => i.CodeSamplePlugin()),
2328
- list: () => import("./ListPlugin.native-V7EZC1lM.mjs").then((i) => i.ListPlugin()),
2329
- checklist: () => import("./ChecklistPlugin.native-BS-kMz9O.mjs").then((i) => i.ChecklistPlugin()),
2330
- textAlignment: () => import("./TextAlignmentPlugin.native-sM_1s00t.mjs").then((i) => i.TextAlignmentPlugin()),
2331
- indent: () => import("./IndentPlugin.native-BHixp8sP.mjs").then((i) => i.IndentPlugin()),
2332
- direction: () => import("./DirectionPlugin.native-Bl-QLFzO.mjs").then((i) => i.DirectionPlugin()),
2333
- textColor: () => import("./TextColorPlugin.native-Bwl_bSmc.mjs").then((i) => i.TextColorPlugin()),
2334
- backgroundColor: () => import("./BackgroundColorPlugin.native-50iAT9xU.mjs").then((i) => i.BackgroundColorPlugin()),
2335
- fontSize: () => import("./FontSizePlugin.native-B_jCh7dY.mjs").then((i) => i.FontSizePlugin()),
2336
- fontFamily: () => import("./FontFamilyPlugin.native-j8hMTbg4.mjs").then((i) => i.FontFamilyPlugin()),
2337
- formatPainter: () => import("./FormatPainterPlugin.native-CsMrKfFU.mjs").then((i) => i.FormatPainterPlugin()),
2338
- "format-painter": () => import("./FormatPainterPlugin.native-CsMrKfFU.mjs").then((i) => i.FormatPainterPlugin()),
2339
- formatpainter: () => import("./FormatPainterPlugin.native-CsMrKfFU.mjs").then((i) => i.FormatPainterPlugin()),
2340
- lineHeight: () => import("./LineHeightPlugin.native-CM7iXdQj.mjs").then((i) => i.LineHeightPlugin()),
2341
- capitalization: () => import("./CapitalizationPlugin.native-DLV4oPmB.mjs").then((i) => i.CapitalizationPlugin()),
2342
- history: () => import("./HistoryPlugin.native-D2wl32jV.mjs").then((i) => i.HistoryPlugin()),
3885
+ bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((o) => o.BoldPlugin()),
3886
+ italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((o) => o.ItalicPlugin()),
3887
+ underline: () => import("./UnderlinePlugin.native-DZzg23rv.mjs").then((o) => o.UnderlinePlugin()),
3888
+ strikethrough: () => import("./StrikethroughPlugin.native-V0TL4F48.mjs").then((o) => o.StrikethroughPlugin()),
3889
+ clearFormatting: () => import("./ClearFormattingPlugin.native-Pp0O-SBf.mjs").then((o) => o.ClearFormattingPlugin()),
3890
+ heading: () => import("./HeadingPlugin.native-DZdvubrQ.mjs").then((o) => o.HeadingPlugin()),
3891
+ blockquote: () => import("./BlockquotePlugin.native-57_Xcjl1.mjs").then((o) => o.BlockquotePlugin()),
3892
+ code: () => import("./CodePlugin.native-BH-K4xmW.mjs").then((o) => o.CodePlugin()),
3893
+ codeSample: () => import("./CodeSamplePlugin.native-svbAFWh_.mjs").then((o) => o.CodeSamplePlugin()),
3894
+ list: () => import("./ListPlugin.native-Bt0LANbO.mjs").then((o) => o.ListPlugin()),
3895
+ checklist: () => import("./ChecklistPlugin.native-NVrBUkaL.mjs").then((o) => o.ChecklistPlugin()),
3896
+ textAlignment: () => import("./TextAlignmentPlugin.native-sM_1s00t.mjs").then((o) => o.TextAlignmentPlugin()),
3897
+ indent: () => import("./IndentPlugin.native-BHixp8sP.mjs").then((o) => o.IndentPlugin()),
3898
+ direction: () => import("./DirectionPlugin.native-Bl-QLFzO.mjs").then((o) => o.DirectionPlugin()),
3899
+ textColor: () => import("./TextColorPlugin.native-KMZ2uzlq.mjs").then((o) => o.TextColorPlugin()),
3900
+ backgroundColor: () => import("./BackgroundColorPlugin.native-H3XyYD7_.mjs").then((o) => o.BackgroundColorPlugin()),
3901
+ fontSize: () => import("./FontSizePlugin.native-DsLrH8eq.mjs").then((o) => o.FontSizePlugin()),
3902
+ fontFamily: () => import("./FontFamilyPlugin.native-M3cNQ0KA.mjs").then((o) => o.FontFamilyPlugin()),
3903
+ formatPainter: () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3904
+ "format-painter": () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3905
+ formatpainter: () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3906
+ lineHeight: () => import("./LineHeightPlugin.native-CM7iXdQj.mjs").then((o) => o.LineHeightPlugin()),
3907
+ capitalization: () => import("./CapitalizationPlugin.native-C-HRbXGh.mjs").then((o) => o.CapitalizationPlugin()),
3908
+ history: () => import("./HistoryPlugin.native-DPvhks6h.mjs").then((o) => o.HistoryPlugin()),
2343
3909
  // Advanced plugins (lazy loaded)
2344
- link: () => import("./LinkPlugin.native-DYCIcdTm.mjs").then((i) => i.LinkPlugin()),
2345
- table: () => import("./TablePlugin.native-DrHX-efe.mjs").then((i) => i.TablePlugin()),
2346
- trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((i) => i.TrackChangesPlugin()),
2347
- versionDiff: () => import("./VersionDiffPlugin.native-Bvxgy--t.mjs").then((i) => i.VersionDiffPlugin()),
2348
- "version-diff": () => import("./VersionDiffPlugin.native-Bvxgy--t.mjs").then((i) => i.VersionDiffPlugin()),
2349
- versiondiff: () => import("./VersionDiffPlugin.native-Bvxgy--t.mjs").then((i) => i.VersionDiffPlugin()),
2350
- conditionalContent: () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((i) => i.ConditionalContentPlugin()),
2351
- "conditional-content": () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((i) => i.ConditionalContentPlugin()),
2352
- conditionalcontent: () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((i) => i.ConditionalContentPlugin()),
2353
- dataBinding: () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((i) => i.DataBindingPlugin()),
2354
- "data-binding": () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((i) => i.DataBindingPlugin()),
2355
- databinding: () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((i) => i.DataBindingPlugin()),
2356
- docSchema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((i) => i.DocSchemaPlugin()),
2357
- "doc-schema": () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((i) => i.DocSchemaPlugin()),
2358
- docschema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((i) => i.DocSchemaPlugin()),
2359
- translationWorkflow: () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((i) => i.TranslationWorkflowPlugin()),
2360
- "translation-workflow": () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((i) => i.TranslationWorkflowPlugin()),
2361
- translationworkflow: () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((i) => i.TranslationWorkflowPlugin()),
2362
- contentRules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((i) => i.ContentRulesPlugin()),
2363
- "content-rules": () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((i) => i.ContentRulesPlugin()),
2364
- contentrules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((i) => i.ContentRulesPlugin()),
2365
- citations: () => import("./CitationsPlugin.native-DQgoCd1B.mjs").then((i) => i.CitationsPlugin()),
2366
- citation: () => import("./CitationsPlugin.native-DQgoCd1B.mjs").then((i) => i.CitationsPlugin()),
2367
- approvalWorkflow: () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((i) => i.ApprovalWorkflowPlugin()),
2368
- "approval-workflow": () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((i) => i.ApprovalWorkflowPlugin()),
2369
- approvalworkflow: () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((i) => i.ApprovalWorkflowPlugin()),
2370
- piiRedaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((i) => i.PIIRedactionPlugin()),
2371
- "pii-redaction": () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((i) => i.PIIRedactionPlugin()),
2372
- piiredaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((i) => i.PIIRedactionPlugin()),
2373
- smartPaste: () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((i) => i.SmartPastePlugin()),
2374
- "smart-paste": () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((i) => i.SmartPastePlugin()),
2375
- smartpaste: () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((i) => i.SmartPastePlugin()),
2376
- blocksLibrary: () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((i) => i.BlocksLibraryPlugin()),
2377
- "blocks-library": () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((i) => i.BlocksLibraryPlugin()),
2378
- blockslibrary: () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((i) => i.BlocksLibraryPlugin()),
2379
- mentions: () => import("./MentionPlugin.native-BMDlOqur.mjs").then((i) => i.MentionPlugin()),
2380
- mention: () => import("./MentionPlugin.native-BMDlOqur.mjs").then((i) => i.MentionPlugin()),
2381
- anchor: () => import("./AnchorPlugin.native-BcYGEtd9.mjs").then((i) => i.AnchorPlugin()),
2382
- embedIframe: () => import("./EmbedIframePlugin.native-BF_-LjTq.mjs").then((i) => i.EmbedIframePlugin()),
2383
- math: () => import("./MathPlugin.native-NwWPHVmj.mjs").then((i) => i.MathPlugin()),
2384
- image: () => import("./MediaManagerPlugin.native-eOsTJFpw.mjs").then((i) => i.MediaManagerPlugin()),
2385
- mergeTag: () => import("./MergeTagPlugin.native-BzRVoD9-.mjs").then((i) => i.MergeTagPlugin()),
2386
- pageBreak: () => import("./PageBreakPlugin.native-DijGuHJZ.mjs").then((i) => i.PageBreakPlugin()),
2387
- print: () => import("./PrintPlugin.native-7qt5v7L5.mjs").then((i) => i.PrintPlugin()),
2388
- preview: () => import("./PreviewPlugin.native-WuIwOAOR.mjs").then((i) => i.PreviewPlugin()),
2389
- specialCharacters: () => import("./SpecialCharactersPlugin.native-DaG4b19I.mjs").then((i) => i.SpecialCharactersPlugin()),
2390
- slashCommands: () => import("./SlashCommandsPlugin.native-BiN6ODw5.mjs").then((i) => i.SlashCommandsPlugin()),
2391
- "slash-commands": () => import("./SlashCommandsPlugin.native-BiN6ODw5.mjs").then((i) => i.SlashCommandsPlugin()),
2392
- spellCheck: () => import("./SpellCheckPlugin.native-BZB9AewP.mjs").then((i) => i.SpellCheckPlugin()),
2393
- emojis: () => import("./EmojisPlugin.native-CitxxlWX.mjs").then((i) => i.EmojisPlugin()),
2394
- a11yChecker: () => import("./A11yCheckerPlugin.native-BRdGYMju.mjs").then((i) => i.A11yCheckerPlugin()),
2395
- comments: () => import("./CommentsPlugin.native-DPSqTkiv.mjs").then((i) => i.CommentsPlugin()),
2396
- "document-manager": () => import("./DocumentManagerPlugin.native-D1YHQ2NN.mjs").then((i) => i.DocumentManagerPlugin()),
2397
- fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((i) => i.FullscreenPlugin()),
2398
- template: () => import("./TemplatePlugin.native-DLjFUaPW.mjs").then((i) => i.TemplatePlugin()),
2399
- footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((i) => i.FootnotePlugin())
3910
+ link: () => import("./LinkPlugin.native-BsQXYsK6.mjs").then((o) => o.LinkPlugin()),
3911
+ table: () => import("./TablePlugin.native-BjIxYZ2X.mjs").then((o) => o.TablePlugin()),
3912
+ trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((o) => o.TrackChangesPlugin()),
3913
+ versionDiff: () => import("./VersionDiffPlugin.native-Ca1fMWUJ.mjs").then((o) => o.VersionDiffPlugin()),
3914
+ "version-diff": () => import("./VersionDiffPlugin.native-Ca1fMWUJ.mjs").then((o) => o.VersionDiffPlugin()),
3915
+ versiondiff: () => import("./VersionDiffPlugin.native-Ca1fMWUJ.mjs").then((o) => o.VersionDiffPlugin()),
3916
+ conditionalContent: () => import("./ConditionalContentPlugin.native-Bf7XgRSW.mjs").then((o) => o.ConditionalContentPlugin()),
3917
+ "conditional-content": () => import("./ConditionalContentPlugin.native-Bf7XgRSW.mjs").then((o) => o.ConditionalContentPlugin()),
3918
+ conditionalcontent: () => import("./ConditionalContentPlugin.native-Bf7XgRSW.mjs").then((o) => o.ConditionalContentPlugin()),
3919
+ dataBinding: () => import("./DataBindingPlugin.native-B7lpI_0c.mjs").then((o) => o.DataBindingPlugin()),
3920
+ "data-binding": () => import("./DataBindingPlugin.native-B7lpI_0c.mjs").then((o) => o.DataBindingPlugin()),
3921
+ databinding: () => import("./DataBindingPlugin.native-B7lpI_0c.mjs").then((o) => o.DataBindingPlugin()),
3922
+ docSchema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((o) => o.DocSchemaPlugin()),
3923
+ "doc-schema": () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((o) => o.DocSchemaPlugin()),
3924
+ docschema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((o) => o.DocSchemaPlugin()),
3925
+ translationWorkflow: () => import("./TranslationWorkflowPlugin.native-CZtG--06.mjs").then((o) => o.TranslationWorkflowPlugin()),
3926
+ "translation-workflow": () => import("./TranslationWorkflowPlugin.native-CZtG--06.mjs").then((o) => o.TranslationWorkflowPlugin()),
3927
+ translationworkflow: () => import("./TranslationWorkflowPlugin.native-CZtG--06.mjs").then((o) => o.TranslationWorkflowPlugin()),
3928
+ contentRules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((o) => o.ContentRulesPlugin()),
3929
+ "content-rules": () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((o) => o.ContentRulesPlugin()),
3930
+ contentrules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((o) => o.ContentRulesPlugin()),
3931
+ citations: () => import("./CitationsPlugin.native-C_7wWQ-k.mjs").then((o) => o.CitationsPlugin()),
3932
+ citation: () => import("./CitationsPlugin.native-C_7wWQ-k.mjs").then((o) => o.CitationsPlugin()),
3933
+ approvalWorkflow: () => import("./ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs").then((o) => o.ApprovalWorkflowPlugin()),
3934
+ "approval-workflow": () => import("./ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs").then((o) => o.ApprovalWorkflowPlugin()),
3935
+ approvalworkflow: () => import("./ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs").then((o) => o.ApprovalWorkflowPlugin()),
3936
+ piiRedaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((o) => o.PIIRedactionPlugin()),
3937
+ "pii-redaction": () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((o) => o.PIIRedactionPlugin()),
3938
+ piiredaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((o) => o.PIIRedactionPlugin()),
3939
+ smartPaste: () => import("./SmartPastePlugin.native-BATLCds5.mjs").then((o) => o.SmartPastePlugin()),
3940
+ "smart-paste": () => import("./SmartPastePlugin.native-BATLCds5.mjs").then((o) => o.SmartPastePlugin()),
3941
+ smartpaste: () => import("./SmartPastePlugin.native-BATLCds5.mjs").then((o) => o.SmartPastePlugin()),
3942
+ blocksLibrary: () => import("./BlocksLibraryPlugin.native-CownM6Rk.mjs").then((o) => o.BlocksLibraryPlugin()),
3943
+ "blocks-library": () => import("./BlocksLibraryPlugin.native-CownM6Rk.mjs").then((o) => o.BlocksLibraryPlugin()),
3944
+ blockslibrary: () => import("./BlocksLibraryPlugin.native-CownM6Rk.mjs").then((o) => o.BlocksLibraryPlugin()),
3945
+ mentions: () => import("./MentionPlugin.native-S_lwGZQO.mjs").then((o) => o.MentionPlugin()),
3946
+ mention: () => import("./MentionPlugin.native-S_lwGZQO.mjs").then((o) => o.MentionPlugin()),
3947
+ anchor: () => import("./AnchorPlugin.native-DXZdK3zr.mjs").then((o) => o.AnchorPlugin()),
3948
+ embedIframe: () => import("./EmbedIframePlugin.native-BfZ_HGlV.mjs").then((o) => o.EmbedIframePlugin()),
3949
+ math: () => import("./MathPlugin.native-Byo3WL0f.mjs").then((o) => o.MathPlugin()),
3950
+ image: () => import("./MediaManagerPlugin.native-BT1NZIJS.mjs").then((o) => o.MediaManagerPlugin()),
3951
+ mergeTag: () => import("./MergeTagPlugin.native-7-6F3S1Y.mjs").then((o) => o.MergeTagPlugin()),
3952
+ pageBreak: () => import("./PageBreakPlugin.native-DijGuHJZ.mjs").then((o) => o.PageBreakPlugin()),
3953
+ print: () => import("./PrintPlugin.native-7qt5v7L5.mjs").then((o) => o.PrintPlugin()),
3954
+ preview: () => import("./PreviewPlugin.native-CiR51jql.mjs").then((o) => o.PreviewPlugin()),
3955
+ specialCharacters: () => import("./SpecialCharactersPlugin.native-CdZoc1GB.mjs").then((o) => o.SpecialCharactersPlugin()),
3956
+ slashCommands: () => import("./SlashCommandsPlugin.native-BDIIwGNs.mjs").then((o) => o.SlashCommandsPlugin()),
3957
+ "slash-commands": () => import("./SlashCommandsPlugin.native-BDIIwGNs.mjs").then((o) => o.SlashCommandsPlugin()),
3958
+ spellCheck: () => import("./SpellCheckPlugin.native-Bef2oTLB.mjs").then((o) => o.SpellCheckPlugin()),
3959
+ emojis: () => import("./EmojisPlugin.native-D92aaOKi.mjs").then((o) => o.EmojisPlugin()),
3960
+ a11yChecker: () => import("./A11yCheckerPlugin.native-DIKuCeFw.mjs").then((o) => o.A11yCheckerPlugin()),
3961
+ comments: () => import("./CommentsPlugin.native-CLip9wAO.mjs").then((o) => o.CommentsPlugin()),
3962
+ collaboration: () => import("./CollaborationPlugin.native-oSybCGPW.mjs").then((o) => o.CollaborationPlugin()),
3963
+ "document-manager": () => import("./DocumentManagerPlugin.native-iFip6s4Q.mjs").then((o) => o.DocumentManagerPlugin()),
3964
+ fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((o) => o.FullscreenPlugin()),
3965
+ template: () => import("./TemplatePlugin.native-D6n5RUnC.mjs").then((o) => o.TemplatePlugin()),
3966
+ footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((o) => o.FootnotePlugin())
2400
3967
  };
2401
- async function at() {
2402
- return Object.entries(rt).forEach(([i, t]) => {
2403
- k.register(i, t);
2404
- }), k;
3968
+ async function hi() {
3969
+ return Object.entries(fi).forEach(([o, t]) => {
3970
+ Kt.register(o, t);
3971
+ }), Kt;
2405
3972
  }
2406
- typeof window != "undefined" && at().then((i) => {
2407
- m.__globalPluginLoader = i, customElements.get("editora-editor") || customElements.define("editora-editor", m);
3973
+ typeof window != "undefined" && hi().then((o) => {
3974
+ W.__globalPluginLoader = o, customElements.get("editora-editor") || customElements.define("editora-editor", W);
2408
3975
  const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
2409
- t.forEach((n) => {
2410
- const a = n.innerHTML.trim();
2411
- e.push(a), a && n.setAttribute("data-initial-content", a);
3976
+ t.forEach((a) => {
3977
+ const l = a.innerHTML.trim();
3978
+ e.push(l), l && a.setAttribute("data-initial-content", l);
2412
3979
  });
2413
- const o = document.querySelectorAll("editora-editor");
2414
- Array.from(o).filter((n) => !n.hasAttribute("data-initial-content")).forEach((n) => {
2415
- const a = Array.from(o).indexOf(n);
2416
- e[a] && n.setAttribute("data-initial-content", e[a]);
3980
+ const n = document.querySelectorAll("editora-editor");
3981
+ Array.from(n).filter((a) => !a.hasAttribute("data-initial-content")).forEach((a) => {
3982
+ const l = Array.from(n).indexOf(a);
3983
+ e[l] && a.setAttribute("data-initial-content", e[l]);
2417
3984
  }), window.Editora = {
2418
3985
  version: "1.0.0",
2419
- plugins: k.getRegisteredPluginNames(),
2420
- WebComponent: m,
2421
- init: async (n, a) => {
2422
- const s = document.querySelector(n);
2423
- return s instanceof m ? (a && await s.setConfig(a), s.getAPI()) : null;
3986
+ plugins: Kt.getRegisteredPluginNames(),
3987
+ WebComponent: W,
3988
+ init: async (a, l) => {
3989
+ const c = document.querySelector(a);
3990
+ return c instanceof W ? (l && await c.setConfig(l), c.getAPI()) : null;
2424
3991
  }
2425
3992
  };
2426
3993
  });
2427
3994
  export {
2428
- m as RichTextEditorElement,
2429
- at as initWebComponent
3995
+ W as RichTextEditorElement,
3996
+ hi as initWebComponent
2430
3997
  };
2431
3998
  //# sourceMappingURL=webcomponent.js.map