@editora/core 1.0.14 → 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 (73) 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-veDC_kx5.mjs → CodePlugin.native-BH-K4xmW.mjs} +1049 -917
  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-C2cs_1w4.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/{documentManager-vQ1VkbUY.mjs → documentManager-BcBIv5P-.mjs} +3 -3
  44. package/dist/editora.min.js +26 -24
  45. package/dist/editora.umd.js +26 -24
  46. package/dist/escapeHtml-CX8RelZ1.mjs +7 -0
  47. package/dist/historyHelpers-B0-4mq1E.mjs +15 -0
  48. package/dist/index-B1_vtXRz.mjs +3910 -0
  49. package/dist/index-C6BoNR2t.js +12 -0
  50. package/dist/{index-BslAFzmv.mjs → index-CavM-mEM.mjs} +6391 -6203
  51. package/dist/index.cjs.js +3 -3
  52. package/dist/{index.es-BYD2KEo6.mjs → index.es-BK-4TPv8.mjs} +1562 -1546
  53. package/dist/index.esm.js +17 -14
  54. package/dist/{jspdf.es.min-BJGtOnRT.mjs → jspdf.es.min-BsnKYYHL.mjs} +4 -3
  55. package/dist/plugin-loader.js +53 -52
  56. package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-DhWKBjsL.mjs} +3 -3
  57. package/dist/webcomponent-core.js +2039 -473
  58. package/dist/webcomponent-core.min.css +1 -1
  59. package/dist/webcomponent-core.min.js +100 -70
  60. package/dist/webcomponent.cjs.js +1 -1
  61. package/dist/webcomponent.esm.js +1 -1
  62. package/dist/webcomponent.js +2208 -641
  63. package/dist/webcomponent.min.css +1 -1
  64. package/dist/webcomponent.min.js +1575 -1209
  65. package/index.d.ts +32 -0
  66. package/package.json +10 -3
  67. package/dist/CodeSamplePlugin.native-CgGoH-X4.mjs +0 -384
  68. package/dist/LinkPlugin.native-DYCIcdTm.mjs +0 -283
  69. package/dist/SpellCheckPlugin.native-BZB9AewP.mjs +0 -1039
  70. package/dist/TablePlugin.native-DrHX-efe.mjs +0 -495
  71. package/dist/anchoredPopover-Bxds0VoB.mjs +0 -110
  72. package/dist/index-B9MPiUAR.mjs +0 -2341
  73. package/dist/index-BLm1MtzH.js +0 -10
@@ -1,4 +1,4 @@
1
- const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", te = "__editoraCommandEditorRoot", oe = "rte-approval-workflow-styles", d = "rte-approval-panel", h = "approval", k = "approvalWorkflow", v = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', fe = {
1
+ const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", et = "__editoraCommandEditorRoot", ot = "rte-approval-workflow-styles", d = "rte-approval-panel", h = "approval", k = "approvalWorkflow", v = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ft = {
2
2
  panelTitle: "Approval Workflow",
3
3
  panelAriaLabel: "Approval workflow panel",
4
4
  statusLabel: "Status",
@@ -22,99 +22,99 @@ const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-edi
22
22
  lockedSuffix: "Locked",
23
23
  shortcutText: "Shortcuts: Ctrl/Cmd+Alt+Shift+A/R/P/D",
24
24
  approveCommentRequiredText: "Approval comment is required."
25
- }, me = {
25
+ }, mt = {
26
26
  draft: "statusDraftText",
27
27
  review: "statusReviewText",
28
28
  approved: "statusApprovedText"
29
29
  }, p = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set();
30
- let _ = 0, be = 0, re = 0, ae = 0, R = null, g = null, T = null, L = null, S = null;
31
- function c(e) {
32
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
30
+ let _ = 0, bt = 0, rt = 0, at = 0, R = null, g = null, T = null, L = null, S = null;
31
+ function c(t) {
32
+ return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
33
33
  }
34
- function ve(e) {
35
- return e.replace(/\u00A0/g, " ").replace(/\s+/g, " ").trim();
34
+ function vt(t) {
35
+ return t.replace(/\u00A0/g, " ").replace(/\s+/g, " ").trim();
36
36
  }
37
- function le(e) {
38
- return e === "review" || e === "approved" ? e : "draft";
37
+ function lt(t) {
38
+ return t === "review" || t === "approved" ? t : "draft";
39
39
  }
40
- function z(e = {}) {
41
- var t;
40
+ function z(t = {}) {
41
+ var e;
42
42
  return {
43
- defaultStatus: le(e.defaultStatus),
44
- lockOnApproval: e.lockOnApproval !== !1,
45
- maxHistoryEntries: Math.max(10, Math.min(500, Number((t = e.maxHistoryEntries) != null ? t : 120))),
46
- requireCommentOnApprove: !!e.requireCommentOnApprove,
47
- defaultActor: (e.defaultActor || "system").trim() || "system",
43
+ defaultStatus: lt(t.defaultStatus),
44
+ lockOnApproval: t.lockOnApproval !== !1,
45
+ maxHistoryEntries: Math.max(10, Math.min(500, Number((e = t.maxHistoryEntries) != null ? e : 120))),
46
+ requireCommentOnApprove: !!t.requireCommentOnApprove,
47
+ defaultActor: (t.defaultActor || "system").trim() || "system",
48
48
  labels: {
49
- ...fe,
50
- ...e.labels || {}
49
+ ...ft,
50
+ ...t.labels || {}
51
51
  },
52
- normalizeText: e.normalizeText || ve
52
+ normalizeText: t.normalizeText || vt
53
53
  };
54
54
  }
55
- function Y(e) {
56
- return e.closest(F) || e;
55
+ function Y(t) {
56
+ return t.closest(F) || t;
57
57
  }
58
- function K(e) {
59
- if (!e) return null;
60
- if (e.matches(w)) return e;
61
- const t = e.querySelector(w);
62
- return t instanceof HTMLElement ? t : null;
58
+ function K(t) {
59
+ if (!t) return null;
60
+ if (t.matches(w)) return t;
61
+ const e = t.querySelector(w);
62
+ return e instanceof HTMLElement ? e : null;
63
63
  }
64
- function ge() {
64
+ function gt() {
65
65
  if (typeof window == "undefined") return null;
66
- const e = window[te];
67
- if (!(e instanceof HTMLElement)) return null;
68
- window[te] = null;
69
- const t = K(e);
70
- if (t) return t;
71
- const o = e.closest(F);
66
+ const t = window[et];
67
+ if (!(t instanceof HTMLElement)) return null;
68
+ window[et] = null;
69
+ const e = K(t);
70
+ if (e) return e;
71
+ const o = t.closest(F);
72
72
  if (o) {
73
73
  const a = K(o);
74
74
  if (a) return a;
75
75
  }
76
76
  return null;
77
77
  }
78
- function he(e) {
79
- const t = e.closest("[data-editora-editor]");
80
- if (t && K(t) === e)
81
- return t;
82
- let o = e;
78
+ function ht(t) {
79
+ const e = t.closest("[data-editora-editor]");
80
+ if (e && K(e) === t)
81
+ return e;
82
+ let o = t;
83
83
  for (; o; ) {
84
- if (o.matches(F) && (o === e || K(o) === e))
84
+ if (o.matches(F) && (o === t || K(o) === t))
85
85
  return o;
86
86
  o = o.parentElement;
87
87
  }
88
- return Y(e);
88
+ return Y(t);
89
89
  }
90
- function W(e) {
91
- return e ? (e.getAttribute("data-theme") || e.getAttribute("theme") || "").toLowerCase() === "dark" ? !0 : e.classList.contains("dark") || e.classList.contains("editora-theme-dark") || e.classList.contains("rte-theme-dark") : !1;
90
+ function W(t) {
91
+ return t ? (t.getAttribute("data-theme") || t.getAttribute("theme") || "").toLowerCase() === "dark" ? !0 : t.classList.contains("dark") || t.classList.contains("editora-theme-dark") || t.classList.contains("rte-theme-dark") : !1;
92
92
  }
93
- function xe(e) {
94
- const t = Y(e);
95
- if (W(t)) return !0;
96
- const o = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
93
+ function xt(t) {
94
+ const e = Y(t);
95
+ if (W(e)) return !0;
96
+ const o = e.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
97
97
  return W(o) ? !0 : W(document.documentElement) || W(document.body);
98
98
  }
99
- function B(e, t) {
100
- e.classList.remove("rte-approval-theme-dark"), xe(t) && e.classList.add("rte-approval-theme-dark");
99
+ function B(t, e) {
100
+ t.classList.remove("rte-approval-theme-dark"), xt(e) && t.classList.add("rte-approval-theme-dark");
101
101
  }
102
- function ie(e) {
103
- return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
102
+ function it(t) {
103
+ return t ? t.nodeType === Node.ELEMENT_NODE ? t : t.parentElement : null;
104
104
  }
105
- function x(e, t = !0) {
106
- if (D(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
107
- if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
108
- const n = e.editorElement;
105
+ function x(t, e = !0) {
106
+ if (D(), (t == null ? void 0 : t.contentElement) instanceof HTMLElement) return t.contentElement;
107
+ if ((t == null ? void 0 : t.editorElement) instanceof HTMLElement) {
108
+ const n = t.editorElement;
109
109
  if (n.matches(w)) return n;
110
110
  const l = n.querySelector(w);
111
111
  if (l instanceof HTMLElement) return l;
112
112
  }
113
- const o = ge();
113
+ const o = gt();
114
114
  if (o) return o;
115
115
  const a = window.getSelection();
116
116
  if (a && a.rangeCount > 0) {
117
- const n = ie(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
117
+ const n = it(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
118
118
  if (l) return l;
119
119
  }
120
120
  const r = document.activeElement;
@@ -123,103 +123,104 @@ function x(e, t = !0) {
123
123
  const n = r.closest(w);
124
124
  if (n) return n;
125
125
  }
126
- return g && g.isConnected ? g : (g && !g.isConnected && (g = null), t ? document.querySelector(w) : null);
126
+ return g && g.isConnected ? g : (g && !g.isConnected && (g = null), e ? document.querySelector(w) : null);
127
127
  }
128
128
  function D() {
129
- Array.from(H).forEach((t) => {
129
+ Array.from(H).forEach((e) => {
130
130
  var o;
131
- t.isConnected || ((o = y.get(t)) == null || o.remove(), y.delete(t), O.delete(t), p.delete(t), I.delete(t), H.delete(t), g === t && (g = null));
131
+ e.isConnected || ((o = y.get(e)) == null || o.remove(), y.delete(e), O.delete(e), p.delete(e), I.delete(e), H.delete(e), g === e && (g = null));
132
132
  });
133
133
  }
134
- function we(e) {
135
- return e ? !!(e.closest(`.${d}`) || e.closest(w) || e.closest(F)) : !1;
134
+ function wt(t) {
135
+ return t ? !!(t.closest(`.${d}`) || t.closest(w) || t.closest(F)) : !1;
136
136
  }
137
- function ye() {
138
- const e = window.getSelection();
139
- if (!e || e.rangeCount === 0) return !1;
140
- const t = e.getRangeAt(0).startContainer, o = ie(t);
137
+ function yt() {
138
+ const t = window.getSelection();
139
+ if (!t || t.rangeCount === 0) return !1;
140
+ const e = t.getRangeAt(0).startContainer, o = it(e);
141
141
  return !!(o != null && o.closest(w));
142
142
  }
143
- function C(e, t, o) {
144
- const a = he(e);
143
+ function C(t, e, o) {
144
+ const a = ht(t);
145
145
  Array.from(
146
146
  a.querySelectorAll(
147
- `.rte-toolbar-button[data-command="${t}"], .editora-toolbar-button[data-command="${t}"]`
147
+ `.rte-toolbar-button[data-command="${e}"], .editora-toolbar-button[data-command="${e}"]`
148
148
  )
149
149
  ).forEach((n) => {
150
150
  n.classList.toggle("active", o), n.setAttribute("aria-pressed", o ? "true" : "false"), n.setAttribute("data-active", o ? "true" : "false");
151
151
  });
152
152
  }
153
- function se(e, t, o) {
154
- t !== null ? e.setAttribute("contenteditable", t) : e.setAttribute("contenteditable", "true"), o !== null ? e.setAttribute("data-readonly", o) : e.removeAttribute("data-readonly");
153
+ function st(t, e, o) {
154
+ e !== null ? t.setAttribute("contenteditable", e) : t.setAttribute("contenteditable", "true"), o !== null ? t.setAttribute("data-readonly", o) : t.removeAttribute("data-readonly");
155
155
  }
156
- function X(e) {
157
- e.dispatchEvent(new Event("input", { bubbles: !0 }));
156
+ function X(t) {
157
+ t.dispatchEvent(new Event("input", { bubbles: !0 }));
158
158
  }
159
- function J(e, t) {
160
- if (t === e.innerHTML) return;
159
+ function J(t, e) {
160
+ if (e === t.innerHTML) return;
161
161
  const o = window.execEditorCommand || window.executeEditorCommand;
162
162
  if (typeof o == "function")
163
163
  try {
164
- o("recordDomTransaction", e, t, e.innerHTML);
164
+ o("recordDomTransaction", t, e, t.innerHTML);
165
165
  } catch (a) {
166
166
  }
167
167
  }
168
168
  function Q() {
169
- return re += 1, `approval-comment-${Date.now().toString(36)}-${re.toString(36)}`;
169
+ return rt += 1, `approval-comment-${Date.now().toString(36)}-${rt.toString(36)}`;
170
170
  }
171
- function ke() {
172
- return ae += 1, `approval-signoff-${Date.now().toString(36)}-${ae.toString(36)}`;
171
+ function kt() {
172
+ return at += 1, `approval-signoff-${Date.now().toString(36)}-${at.toString(36)}`;
173
173
  }
174
- function pe(e) {
174
+ function pt(t) {
175
175
  return {
176
- status: e.status,
177
- locked: e.locked,
178
- comments: e.comments.map((t) => ({ ...t })),
179
- signoffs: e.signoffs.map((t) => ({ ...t })),
180
- updatedAt: e.updatedAt
176
+ status: t.status,
177
+ locked: t.locked,
178
+ comments: t.comments.map((e) => ({ ...e })),
179
+ signoffs: t.signoffs.map((e) => ({ ...e })),
180
+ updatedAt: t.updatedAt
181
181
  };
182
182
  }
183
- function Ae(e, t) {
184
- const o = me[e];
185
- return t.labels[o] || e;
183
+ function At(t, e) {
184
+ const o = mt[t];
185
+ return e.labels[o] || t;
186
186
  }
187
- function ce(e, t, o) {
188
- var a, r;
189
- if (e.setAttribute("data-approval-status", t.status), e.setAttribute("data-approval-locked", t.locked ? "true" : "false"), e.classList.toggle("rte-approval-locked-editor", t.locked), C(e, "toggleApprovalWorkflowPanel", ee(e)), C(e, "requestApprovalReview", t.status === "review"), C(e, "approveDocument", t.status === "approved"), C(e, "reopenDraft", t.status === "draft"), t.status === "approved" && o.lockOnApproval) {
190
- t.locked || (t.preApprovalContentEditable = e.getAttribute("contenteditable"), t.preApprovalReadonly = e.getAttribute("data-readonly")), e.setAttribute("contenteditable", "false"), e.setAttribute("data-readonly", "true"), t.locked = !0;
187
+ function ct(t, e, o) {
188
+ var n, l;
189
+ const a = e.locked, r = e.status === "approved" && o.lockOnApproval;
190
+ if (t.setAttribute("data-approval-status", e.status), t.setAttribute("data-approval-locked", r ? "true" : "false"), t.classList.toggle("rte-approval-locked-editor", r), C(t, "toggleApprovalWorkflowPanel", tt(t)), C(t, "requestApprovalReview", e.status === "review"), C(t, "approveDocument", e.status === "approved"), C(t, "reopenDraft", e.status === "draft"), r) {
191
+ a || (e.preApprovalContentEditable = t.getAttribute("contenteditable"), e.preApprovalReadonly = t.getAttribute("data-readonly")), t.setAttribute("contenteditable", "false"), t.setAttribute("data-readonly", "true"), e.locked = !0;
191
192
  return;
192
193
  }
193
- t.locked = !1, se(
194
- e,
195
- (a = t.preApprovalContentEditable) != null ? a : t.originalContentEditable,
196
- (r = t.preApprovalReadonly) != null ? r : t.originalReadonly
197
- ), t.preApprovalContentEditable = null, t.preApprovalReadonly = null;
194
+ e.locked = !1, st(
195
+ t,
196
+ (n = e.preApprovalContentEditable) != null ? n : e.originalContentEditable,
197
+ (l = e.preApprovalReadonly) != null ? l : e.originalReadonly
198
+ ), e.preApprovalContentEditable = null, e.preApprovalReadonly = null;
198
199
  }
199
- function f(e, t) {
200
- let o = I.get(e);
200
+ function f(t, e) {
201
+ let o = I.get(t);
201
202
  return o || (o = {
202
- status: t.defaultStatus,
203
+ status: e.defaultStatus,
203
204
  locked: !1,
204
205
  comments: [],
205
206
  signoffs: [],
206
207
  updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
207
- originalContentEditable: e.getAttribute("contenteditable"),
208
- originalReadonly: e.getAttribute("data-readonly"),
208
+ originalContentEditable: t.getAttribute("contenteditable"),
209
+ originalReadonly: t.getAttribute("data-readonly"),
209
210
  preApprovalContentEditable: null,
210
211
  preApprovalReadonly: null
211
- }, I.set(e, o), H.add(e), ce(e, o, t), o);
212
+ }, I.set(t, o), H.add(t), ct(t, o, e), o);
212
213
  }
213
- function j(e, t) {
214
- return e.length <= t ? e : e.slice(e.length - t);
214
+ function j(t, e) {
215
+ return t.length <= e ? t : t.slice(t.length - e);
215
216
  }
216
- function M(e, t) {
217
- const o = e.querySelector(".rte-approval-live");
218
- o && (o.textContent = t);
217
+ function M(t, e) {
218
+ const o = t.querySelector(".rte-approval-live");
219
+ o && (o.textContent = e);
219
220
  }
220
- function Se(e, t) {
221
- const o = pe(t);
222
- e.__approvalWorkflowState = o, e.dispatchEvent(
221
+ function St(t, e) {
222
+ const o = pt(e);
223
+ t.__approvalWorkflowState = o, t.dispatchEvent(
223
224
  new CustomEvent("editora:approval-state-changed", {
224
225
  bubbles: !0,
225
226
  detail: {
@@ -228,14 +229,14 @@ function Se(e, t) {
228
229
  })
229
230
  );
230
231
  }
231
- function q(e) {
232
- const t = y.get(e);
233
- if (!t) return;
234
- const o = p.get(e) || R;
232
+ function q(t) {
233
+ const e = y.get(t);
234
+ if (!e) return;
235
+ const o = p.get(t) || R;
235
236
  if (!o) return;
236
- const a = f(e, o), r = t.querySelector(".rte-approval-summary"), n = t.querySelector('[data-action="request-review"]'), l = t.querySelector('[data-action="approve"]'), s = t.querySelector('[data-action="reopen-draft"]'), u = t.querySelector(".rte-approval-comments-list"), m = t.querySelector(".rte-approval-signoffs-list");
237
+ const a = f(t, o), r = e.querySelector(".rte-approval-summary"), n = e.querySelector('[data-action="request-review"]'), l = e.querySelector('[data-action="approve"]'), s = e.querySelector('[data-action="reopen-draft"]'), u = e.querySelector(".rte-approval-comments-list"), m = e.querySelector(".rte-approval-signoffs-list");
237
238
  if (r) {
238
- const i = Ae(a.status, o);
239
+ const i = At(a.status, o);
239
240
  r.textContent = `${o.labels.summaryPrefix}: ${i} | Comments: ${a.comments.length} | Sign-offs: ${a.signoffs.length}${a.locked ? ` | ${o.labels.lockedSuffix}` : ""}`;
240
241
  }
241
242
  n && (n.disabled = a.status !== "draft"), l && (l.disabled = a.status === "approved"), s && (s.disabled = a.status === "draft"), u && (a.comments.length === 0 ? u.innerHTML = `<li class="rte-approval-empty">${c(o.labels.noCommentsText)}</li>` : u.innerHTML = a.comments.slice().reverse().map(
@@ -264,70 +265,70 @@ function q(e) {
264
265
  `
265
266
  ).join(""));
266
267
  }
267
- function G(e, t, o) {
268
- t.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), ce(e, t, o), q(e), Se(e, t);
268
+ function G(t, e, o) {
269
+ e.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), ct(t, e, o), q(t), St(t, e);
269
270
  }
270
- function ne(e, t, o, a) {
271
- e.comments.push({
271
+ function nt(t, e, o, a) {
272
+ t.comments.push({
272
273
  id: Q(),
273
- author: o || t.defaultActor,
274
+ author: o || e.defaultActor,
274
275
  message: a,
275
276
  kind: "system",
276
277
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
277
- }), e.comments = j(e.comments, t.maxHistoryEntries);
278
+ }), t.comments = j(t.comments, e.maxHistoryEntries);
278
279
  }
279
- function $(e, t, o, a) {
280
- const r = f(e, o);
281
- if (r.status === t) return !1;
282
- const n = e.innerHTML;
283
- return r.status = t, t === "review" ? ne(r, o, a, "Review requested.") : t === "draft" && ne(r, o, a, "Returned to draft."), G(e, r, o), X(e), J(e, n), !0;
280
+ function $(t, e, o, a) {
281
+ const r = f(t, o);
282
+ if (r.status === e) return !1;
283
+ const n = t.innerHTML;
284
+ return r.status = e, e === "review" ? nt(r, o, a, "Review requested.") : e === "draft" && nt(r, o, a, "Returned to draft."), G(t, r, o), X(t), J(t, n), !0;
284
285
  }
285
- function de(e, t, o, a) {
286
- const r = a.normalizeText(t);
286
+ function dt(t, e, o, a) {
287
+ const r = a.normalizeText(e);
287
288
  if (!r) return !1;
288
- const n = a.normalizeText(o) || a.defaultActor, l = f(e, a), s = e.innerHTML;
289
+ const n = a.normalizeText(o) || a.defaultActor, l = f(t, a), s = t.innerHTML;
289
290
  return l.comments.push({
290
291
  id: Q(),
291
292
  author: n,
292
293
  message: r,
293
294
  kind: "comment",
294
295
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
295
- }), l.comments = j(l.comments, a.maxHistoryEntries), G(e, l, a), X(e), J(e, s), !0;
296
+ }), l.comments = j(l.comments, a.maxHistoryEntries), G(t, l, a), X(t), J(t, s), !0;
296
297
  }
297
- function Z(e, t, o, a) {
298
- const r = t.normalizeText(o) || t.defaultActor, n = t.normalizeText(a);
299
- if (t.requireCommentOnApprove && !n) return !1;
300
- const l = f(e, t), s = e.innerHTML;
298
+ function Z(t, e, o, a) {
299
+ const r = e.normalizeText(o) || e.defaultActor, n = e.normalizeText(a);
300
+ if (e.requireCommentOnApprove && !n) return !1;
301
+ const l = f(t, e), s = t.innerHTML;
301
302
  return l.status = "approved", l.signoffs.push({
302
- id: ke(),
303
+ id: kt(),
303
304
  author: r,
304
305
  comment: n || void 0,
305
306
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
306
- }), l.signoffs = j(l.signoffs, t.maxHistoryEntries), n && (l.comments.push({
307
+ }), l.signoffs = j(l.signoffs, e.maxHistoryEntries), n && (l.comments.push({
307
308
  id: Q(),
308
309
  author: r,
309
310
  message: n,
310
311
  kind: "system",
311
312
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
312
- }), l.comments = j(l.comments, t.maxHistoryEntries)), G(e, l, t), X(e), J(e, s), !0;
313
+ }), l.comments = j(l.comments, e.maxHistoryEntries)), G(t, l, e), X(t), J(t, s), !0;
313
314
  }
314
- function N(e, t) {
315
- return e.querySelector(`[data-field="${t}"]`);
315
+ function N(t, e) {
316
+ return t.querySelector(`[data-field="${e}"]`);
316
317
  }
317
- function Ee(e) {
318
+ function Et(t) {
318
319
  var a, r;
319
- const t = ((a = N(e, "actor")) == null ? void 0 : a.value) || "", o = ((r = N(e, "comment")) == null ? void 0 : r.value) || "";
320
- return { actor: t, comment: o };
320
+ const e = ((a = N(t, "actor")) == null ? void 0 : a.value) || "", o = ((r = N(t, "comment")) == null ? void 0 : r.value) || "";
321
+ return { actor: e, comment: o };
321
322
  }
322
- function U(e, t) {
323
- if (!t.classList.contains("show")) return;
324
- const a = Y(e).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 420), n = Math.max(10, window.innerWidth - r - 10), l = Math.min(Math.max(10, a.right - r), n), s = Math.max(10, Math.min(window.innerHeight - 10 - 280, a.top + 12));
325
- t.style.width = `${r}px`, t.style.left = `${l}px`, t.style.top = `${s}px`, t.style.maxHeight = `${Math.max(280, window.innerHeight - 24)}px`;
323
+ function U(t, e) {
324
+ if (!e.classList.contains("show")) return;
325
+ const a = Y(t).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 420), n = Math.max(10, window.innerWidth - r - 10), l = Math.min(Math.max(10, a.right - r), n), s = Math.max(10, Math.min(window.innerHeight - 10 - 280, a.top + 12));
326
+ e.style.width = `${r}px`, e.style.left = `${l}px`, e.style.top = `${s}px`, e.style.maxHeight = `${Math.max(280, window.innerHeight - 24)}px`;
326
327
  }
327
- function $e(e) {
328
- const t = y.get(e);
329
- if (t) return t;
330
- const o = p.get(e) || R || z(), a = `rte-approval-panel-${be++}`, r = document.createElement("section");
328
+ function $t(t) {
329
+ const e = y.get(t);
330
+ if (e) return e;
331
+ const o = p.get(t) || R || z(), a = `rte-approval-panel-${bt++}`, r = document.createElement("section");
331
332
  return r.className = d, r.id = a, r.setAttribute("role", "dialog"), r.setAttribute("aria-modal", "false"), r.setAttribute("aria-label", o.labels.panelAriaLabel), r.setAttribute("tabindex", "-1"), r.innerHTML = `
332
333
  <header class="rte-approval-header">
333
334
  <h2 class="rte-approval-title">${c(o.labels.panelTitle)}</h2>
@@ -386,22 +387,22 @@ function $e(e) {
386
387
  if (!l) return;
387
388
  const s = l.closest("[data-action]");
388
389
  if (!s) return;
389
- const u = s.getAttribute("data-action") || "", m = p.get(e) || R || o;
390
- if (p.set(e, m), f(e, m), u === "close") {
391
- P(e, !0);
390
+ const u = s.getAttribute("data-action") || "", m = p.get(t) || R || o;
391
+ if (p.set(t, m), f(t, m), u === "close") {
392
+ P(t, !0);
392
393
  return;
393
394
  }
394
- const i = Ee(r);
395
+ const i = Et(r);
395
396
  if (u === "request-review") {
396
- $(e, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
397
+ $(t, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
397
398
  return;
398
399
  }
399
400
  if (u === "reopen-draft") {
400
- $(e, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
401
+ $(t, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
401
402
  return;
402
403
  }
403
404
  if (u === "approve") {
404
- const b = Z(e, m, i.actor, i.comment);
405
+ const b = Z(t, m, i.actor, i.comment);
405
406
  if (!b && m.requireCommentOnApprove) {
406
407
  M(r, m.labels.approveCommentRequiredText);
407
408
  return;
@@ -413,117 +414,117 @@ function $e(e) {
413
414
  return;
414
415
  }
415
416
  if (u === "add-comment") {
416
- if (!de(e, i.comment, i.actor, m)) return;
417
+ if (!dt(t, i.comment, i.actor, m)) return;
417
418
  const E = N(r, "comment");
418
419
  E && (E.value = ""), M(r, "Comment added.");
419
420
  return;
420
421
  }
421
422
  }), r.addEventListener("keydown", (n) => {
422
- n.key === "Escape" && (n.preventDefault(), P(e, !0));
423
- }), B(r, e), document.body.appendChild(r), y.set(e, r), O.set(e, !1), q(e), r;
423
+ n.key === "Escape" && (n.preventDefault(), P(t, !0));
424
+ }), B(r, t), document.body.appendChild(r), y.set(t, r), O.set(t, !1), q(t), r;
424
425
  }
425
- function ee(e) {
426
- return O.get(e) === !0;
426
+ function tt(t) {
427
+ return O.get(t) === !0;
427
428
  }
428
- function A(e) {
429
+ function A(t) {
429
430
  D();
430
- const t = $e(e);
431
+ const e = $t(t);
431
432
  y.forEach((o, a) => {
432
- a !== e && P(a, !1);
433
- }), t.classList.add("show"), O.set(e, !0), C(e, "toggleApprovalWorkflowPanel", !0), B(t, e), U(e, t), q(e);
433
+ a !== t && P(a, !1);
434
+ }), e.classList.add("show"), O.set(t, !0), C(t, "toggleApprovalWorkflowPanel", !0), B(e, t), U(t, e), q(t);
434
435
  }
435
- function P(e, t = !1) {
436
- const o = y.get(e);
437
- o && (o.classList.remove("show"), O.set(e, !1), C(e, "toggleApprovalWorkflowPanel", !1), t && e.focus({ preventScroll: !0 }));
436
+ function P(t, e = !1) {
437
+ const o = y.get(t);
438
+ o && (o.classList.remove("show"), O.set(t, !1), C(t, "toggleApprovalWorkflowPanel", !1), e && t.focus({ preventScroll: !0 }));
438
439
  }
439
- function ue(e, t) {
440
- const o = ee(e);
441
- return (typeof t == "boolean" ? t : !o) ? A(e) : P(e), !0;
440
+ function ut(t, e) {
441
+ const o = tt(t);
442
+ return (typeof e == "boolean" ? e : !o) ? A(t) : P(t), !0;
442
443
  }
443
- function V(e) {
444
- return typeof e.key == "string" ? e.key.toLowerCase() : "";
444
+ function V(t) {
445
+ return typeof t.key == "string" ? t.key.toLowerCase() : "";
445
446
  }
446
- function Ce(e) {
447
- const t = V(e);
448
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "a";
447
+ function Ct(t) {
448
+ const e = V(t);
449
+ return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "a";
449
450
  }
450
- function Te(e) {
451
- const t = V(e);
452
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "r";
451
+ function Tt(t) {
452
+ const e = V(t);
453
+ return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "r";
453
454
  }
454
- function Le(e) {
455
- const t = V(e);
456
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "p";
455
+ function Lt(t) {
456
+ const e = V(t);
457
+ return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "p";
457
458
  }
458
- function Re(e) {
459
- const t = V(e);
460
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "d";
459
+ function Rt(t) {
460
+ const e = V(t);
461
+ return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "d";
461
462
  }
462
- function Me(e) {
463
- R = e, T || (T = (t) => {
463
+ function Mt(t) {
464
+ R = t, T || (T = (e) => {
464
465
  D();
465
- const o = t.target, a = o == null ? void 0 : o.closest(w);
466
+ const o = e.target, a = o == null ? void 0 : o.closest(w);
466
467
  if (!a) return;
467
468
  g = a;
468
- const r = p.get(a) || e;
469
+ const r = p.get(a) || t;
469
470
  p.set(a, r), f(a, r);
470
471
  const n = y.get(a);
471
472
  n && (B(n, a), U(a, n));
472
- }, document.addEventListener("focusin", T, !0)), L || (L = (t) => {
473
- if (t.defaultPrevented) return;
474
- const o = Ce(t), a = Te(t), r = Le(t), n = Re(t), l = t.key === "Escape";
473
+ }, document.addEventListener("focusin", T, !0)), L || (L = (e) => {
474
+ if (e.defaultPrevented) return;
475
+ const o = Ct(e), a = Tt(e), r = Lt(e), n = Rt(e), l = e.key === "Escape";
475
476
  if (!l && !o && !a && !r && !n)
476
477
  return;
477
478
  D();
478
- const s = t.target, u = !!(s != null && s.closest(`.${d} input, .${d} textarea, .${d} select`));
479
- if (!we(s) && !ye())
479
+ const s = e.target, u = !!(s != null && s.closest(`.${d} input, .${d} textarea, .${d} select`));
480
+ if (!wt(s) && !yt())
480
481
  return;
481
482
  const i = x(void 0, !1);
482
483
  if (!i) return;
483
- const b = p.get(i) || R || e;
484
+ const b = p.get(i) || R || t;
484
485
  p.set(i, b);
485
486
  const E = f(i, b);
486
- if (g = i, l && ee(i)) {
487
- t.preventDefault(), P(i, !0);
487
+ if (g = i, l && tt(i)) {
488
+ e.preventDefault(), P(i, !0);
488
489
  return;
489
490
  }
490
491
  if (!u) {
491
492
  if (o) {
492
- t.preventDefault(), t.stopPropagation(), ue(i);
493
+ e.preventDefault(), e.stopPropagation(), ut(i);
493
494
  return;
494
495
  }
495
496
  if (a) {
496
- t.preventDefault(), t.stopPropagation(), $(i, "review", b, b.defaultActor) && A(i);
497
+ e.preventDefault(), e.stopPropagation(), $(i, "review", b, b.defaultActor) && A(i);
497
498
  return;
498
499
  }
499
500
  if (r) {
500
- t.preventDefault(), t.stopPropagation(), Z(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
501
+ e.preventDefault(), e.stopPropagation(), Z(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
501
502
  return;
502
503
  }
503
- n && (t.preventDefault(), t.stopPropagation(), E.status !== "draft" && $(i, "draft", b, b.defaultActor) && A(i));
504
+ n && (e.preventDefault(), e.stopPropagation(), E.status !== "draft" && $(i, "draft", b, b.defaultActor) && A(i));
504
505
  }
505
506
  }, document.addEventListener("keydown", L, !0)), S || (S = () => {
506
- D(), y.forEach((t, o) => {
507
- !o.isConnected || !t.isConnected || (B(t, o), U(o, t));
507
+ D(), y.forEach((e, o) => {
508
+ !o.isConnected || !e.isConnected || (B(e, o), U(o, e));
508
509
  });
509
510
  }, window.addEventListener("scroll", S, !0), window.addEventListener("resize", S));
510
511
  }
511
- function De(e) {
512
+ function Dt(t) {
512
513
  var o, a;
513
- const t = I.get(e);
514
- t && (e.classList.remove("rte-approval-locked-editor"), e.removeAttribute("data-approval-status"), e.removeAttribute("data-approval-locked"), se(
515
- e,
516
- (o = t.preApprovalContentEditable) != null ? o : t.originalContentEditable,
517
- (a = t.preApprovalReadonly) != null ? a : t.originalReadonly
514
+ const e = I.get(t);
515
+ e && (t.classList.remove("rte-approval-locked-editor"), t.removeAttribute("data-approval-status"), t.removeAttribute("data-approval-locked"), st(
516
+ t,
517
+ (o = e.preApprovalContentEditable) != null ? o : e.originalContentEditable,
518
+ (a = e.preApprovalReadonly) != null ? a : e.originalReadonly
518
519
  ));
519
520
  }
520
- function He() {
521
- T && (document.removeEventListener("focusin", T, !0), T = null), L && (document.removeEventListener("keydown", L, !0), L = null), S && (window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), S = null), y.forEach((e) => e.remove()), y.clear(), H.forEach((e) => De(e)), H.clear(), R = null, g = null;
521
+ function Ht() {
522
+ T && (document.removeEventListener("focusin", T, !0), T = null), L && (document.removeEventListener("keydown", L, !0), L = null), S && (window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), S = null), y.forEach((t) => t.remove()), y.clear(), H.forEach((t) => Dt(t)), H.clear(), R = null, g = null;
522
523
  }
523
- function qe() {
524
- if (typeof document == "undefined" || document.getElementById(oe)) return;
525
- const e = document.createElement("style");
526
- e.id = oe, e.textContent = `
524
+ function qt() {
525
+ if (typeof document == "undefined" || document.getElementById(ot)) return;
526
+ const t = document.createElement("style");
527
+ t.id = ot, t.textContent = `
527
528
  .rte-toolbar-group-items.${h},
528
529
  .editora-toolbar-group-items.${h},
529
530
  .rte-toolbar-group-items.${k},
@@ -914,11 +915,11 @@ function qe() {
914
915
  max-height: calc(100vh - 20px);
915
916
  }
916
917
  }
917
- `, document.head.appendChild(e);
918
+ `, document.head.appendChild(t);
918
919
  }
919
- const Pe = (e = {}) => {
920
- const t = z(e);
921
- return qe(), {
920
+ const Pt = (t = {}) => {
921
+ const e = z(t);
922
+ return qt(), {
922
923
  name: "approvalWorkflow",
923
924
  toolbar: [
924
925
  {
@@ -962,19 +963,19 @@ const Pe = (e = {}) => {
962
963
  approvalWorkflow: (o, a) => {
963
964
  const r = x(a);
964
965
  if (!r) return !1;
965
- const n = p.get(r) || t;
966
+ const n = p.get(r) || e;
966
967
  return p.set(r, n), f(r, n), g = r, A(r), q(r), !0;
967
968
  },
968
969
  toggleApprovalWorkflowPanel: (o, a) => {
969
970
  const r = x(a);
970
971
  if (!r) return !1;
971
- const n = p.get(r) || t;
972
- return p.set(r, n), f(r, n), g = r, ue(r, typeof o == "boolean" ? o : void 0);
972
+ const n = p.get(r) || e;
973
+ return p.set(r, n), f(r, n), g = r, ut(r, typeof o == "boolean" ? o : void 0);
973
974
  },
974
975
  requestApprovalReview: (o, a) => {
975
976
  const r = x(a);
976
977
  if (!r) return !1;
977
- const n = p.get(r) || t;
978
+ const n = p.get(r) || e;
978
979
  p.set(r, n), f(r, n);
979
980
  const l = $(r, "review", n, n.defaultActor);
980
981
  return A(r), l;
@@ -982,7 +983,7 @@ const Pe = (e = {}) => {
982
983
  approveDocument: (o, a) => {
983
984
  const r = x(a);
984
985
  if (!r) return !1;
985
- const n = p.get(r) || t;
986
+ const n = p.get(r) || e;
986
987
  p.set(r, n), f(r, n);
987
988
  const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u = Z(r, n, l, s);
988
989
  return u && A(r), u;
@@ -990,7 +991,7 @@ const Pe = (e = {}) => {
990
991
  reopenDraft: (o, a) => {
991
992
  const r = x(a);
992
993
  if (!r) return !1;
993
- const n = p.get(r) || t;
994
+ const n = p.get(r) || e;
994
995
  p.set(r, n), f(r, n);
995
996
  const l = $(r, "draft", n, n.defaultActor);
996
997
  return l && A(r), l;
@@ -998,15 +999,15 @@ const Pe = (e = {}) => {
998
999
  addApprovalComment: (o, a) => {
999
1000
  const r = x(a);
1000
1001
  if (!r) return !1;
1001
- const n = p.get(r) || t;
1002
+ const n = p.get(r) || e;
1002
1003
  p.set(r, n), f(r, n);
1003
- const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = de(r, s, l, n);
1004
+ const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = dt(r, s, l, n);
1004
1005
  return u && A(r), u;
1005
1006
  },
1006
1007
  setApprovalStatus: (o, a) => {
1007
1008
  const r = x(a);
1008
1009
  if (!r || !o) return !1;
1009
- const n = le(o), l = p.get(r) || t;
1010
+ const n = lt(o), l = p.get(r) || e;
1010
1011
  p.set(r, l), f(r, l);
1011
1012
  const s = $(r, n, l, l.defaultActor);
1012
1013
  return s && A(r), s;
@@ -1014,7 +1015,7 @@ const Pe = (e = {}) => {
1014
1015
  setApprovalWorkflowOptions: (o, a) => {
1015
1016
  const r = x(a);
1016
1017
  if (!r || !o || typeof o != "object") return !1;
1017
- const n = p.get(r) || t, l = z({
1018
+ const n = p.get(r) || e, l = z({
1018
1019
  ...n,
1019
1020
  ...o,
1020
1021
  labels: {
@@ -1030,9 +1031,9 @@ const Pe = (e = {}) => {
1030
1031
  getApprovalWorkflowState: (o, a) => {
1031
1032
  const r = x(a);
1032
1033
  if (!r) return !1;
1033
- const n = p.get(r) || t;
1034
+ const n = p.get(r) || e;
1034
1035
  p.set(r, n);
1035
- const l = f(r, n), s = pe(l);
1036
+ const l = f(r, n), s = pt(l);
1036
1037
  if (typeof o == "function")
1037
1038
  try {
1038
1039
  o(s);
@@ -1060,8 +1061,8 @@ const Pe = (e = {}) => {
1060
1061
  },
1061
1062
  init: function(a) {
1062
1063
  _ += 1;
1063
- const r = this && typeof this.__pluginConfig == "object" ? z({ ...t, ...this.__pluginConfig }) : t;
1064
- Me(r);
1064
+ const r = this && typeof this.__pluginConfig == "object" ? z({ ...e, ...this.__pluginConfig }) : e;
1065
+ Mt(r);
1065
1066
  const n = x(
1066
1067
  a != null && a.editorElement ? { editorElement: a.editorElement } : void 0,
1067
1068
  !1
@@ -1069,11 +1070,11 @@ const Pe = (e = {}) => {
1069
1070
  n && (p.set(n, r), f(n, r), g = n, q(n));
1070
1071
  },
1071
1072
  destroy: () => {
1072
- _ = Math.max(0, _ - 1), !(_ > 0) && He();
1073
+ _ = Math.max(0, _ - 1), !(_ > 0) && Ht();
1073
1074
  }
1074
1075
  };
1075
1076
  };
1076
1077
  export {
1077
- Pe as ApprovalWorkflowPlugin
1078
+ Pt as ApprovalWorkflowPlugin
1078
1079
  };
1079
- //# sourceMappingURL=ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs.map
1080
+ //# sourceMappingURL=ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs.map