@editora/core 1.0.9 → 1.0.11

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 (99) hide show
  1. package/README.md +1 -1
  2. package/dist/{A11yCheckerPlugin.native-58d12bed.mjs → A11yCheckerPlugin.native-BRdGYMju.mjs} +12 -23
  3. package/dist/{AnchorPlugin.native-289a112a.mjs → AnchorPlugin.native-BcYGEtd9.mjs} +102 -112
  4. package/dist/{ApprovalWorkflowPlugin.native-449ce66c.mjs → ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs} +173 -209
  5. package/dist/{BackgroundColorPlugin.native-8aceb5cc.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs} +9 -16
  6. package/dist/BlockquotePlugin.native-57_Xcjl1.mjs +212 -0
  7. package/dist/{BlocksLibraryPlugin.native-1cc51e63.mjs → BlocksLibraryPlugin.native-5sdsXsiE.mjs} +149 -205
  8. package/dist/{BoldPlugin.native-f9d7f8e4.mjs → BoldPlugin.native-CSh_LiIJ.mjs} +11 -7
  9. package/dist/CapitalizationPlugin.native-DLV4oPmB.mjs +159 -0
  10. package/dist/ChecklistPlugin.native-BS-kMz9O.mjs +371 -0
  11. package/dist/{CitationsPlugin.native-169fb1e8.mjs → CitationsPlugin.native-DQgoCd1B.mjs} +196 -261
  12. package/dist/ClearFormattingPlugin.native-DIS6AN2t.mjs +172 -0
  13. package/dist/CodePlugin.native-veDC_kx5.mjs +4600 -0
  14. package/dist/{CodeSamplePlugin.native-6cc0148e.mjs → CodeSamplePlugin.native-CgGoH-X4.mjs} +10 -19
  15. package/dist/{CommentsPlugin.native-03659874.mjs → CommentsPlugin.native-DPSqTkiv.mjs} +28 -55
  16. package/dist/{ConditionalContentPlugin.native-4983143a.mjs → ConditionalContentPlugin.native-CfhY46rU.mjs} +51 -108
  17. package/dist/{ContentRulesPlugin.native-63ed405b.mjs → ContentRulesPlugin.native-vPx5nC73.mjs} +153 -200
  18. package/dist/{DataBindingPlugin.native-427e9d75.mjs → DataBindingPlugin.native-BoXwghTz.mjs} +88 -124
  19. package/dist/DirectionPlugin.native-Bl-QLFzO.mjs +153 -0
  20. package/dist/{DocSchemaPlugin.native-8e41eda0.mjs → DocSchemaPlugin.native-DUSVRHqT.mjs} +112 -166
  21. package/dist/{DocumentManagerPlugin.native-e69895ad.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs} +4 -4
  22. package/dist/EmbedIframePlugin.native-BF_-LjTq.mjs +740 -0
  23. package/dist/{EmojisPlugin.native-65c5ac47.mjs → EmojisPlugin.native-CitxxlWX.mjs} +6 -11
  24. package/dist/{FontFamilyPlugin.native-f9bc255a.mjs → FontFamilyPlugin.native-j8hMTbg4.mjs} +4 -7
  25. package/dist/{FontSizePlugin.native-f5647872.mjs → FontSizePlugin.native-B_jCh7dY.mjs} +10 -19
  26. package/dist/{FootnotePlugin.native-494657b3.mjs → FootnotePlugin.native-D730OGRm.mjs} +39 -77
  27. package/dist/{FullscreenPlugin.native-87ce92e9.mjs → FullscreenPlugin.native-ChXyxeNw.mjs} +1 -1
  28. package/dist/HeadingPlugin.native-DZdvubrQ.mjs +249 -0
  29. package/dist/{HistoryPlugin.native-92ed4be4.mjs → HistoryPlugin.native-D2wl32jV.mjs} +107 -143
  30. package/dist/{IndentPlugin.native-e4ee902b.mjs → IndentPlugin.native-BHixp8sP.mjs} +12 -23
  31. package/dist/{ItalicPlugin.native-7c95cfbc.mjs → ItalicPlugin.native-CmnlwFHB.mjs} +15 -11
  32. package/dist/{LineHeightPlugin.native-5668f78c.mjs → LineHeightPlugin.native-CM7iXdQj.mjs} +10 -19
  33. package/dist/{LinkPlugin.native-6df29111.mjs → LinkPlugin.native-DYCIcdTm.mjs} +5 -9
  34. package/dist/{ListPlugin.native-fe2e115a.mjs → ListPlugin.native-V7EZC1lM.mjs} +5 -9
  35. package/dist/MathPlugin.native-NwWPHVmj.mjs +369 -0
  36. package/dist/{MediaManagerPlugin.native-3cf48a00.mjs → MediaManagerPlugin.native-eOsTJFpw.mjs} +11 -21
  37. package/dist/{MentionPlugin.native-3b1e8c05.mjs → MentionPlugin.native-BMDlOqur.mjs} +45 -89
  38. package/dist/MergeTagPlugin.native-BzRVoD9-.mjs +580 -0
  39. package/dist/{PIIRedactionPlugin.native-7ab10b9f.mjs → PIIRedactionPlugin.native-g7j4jOmm.mjs} +210 -260
  40. package/dist/{PageBreakPlugin.native-1794c5fb.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +16 -31
  41. package/dist/{PreviewPlugin.native-f7b67cc0.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +6 -11
  42. package/dist/{PrintPlugin.native-f6a168c2.mjs → PrintPlugin.native-7qt5v7L5.mjs} +3 -5
  43. package/dist/{SlashCommandsPlugin.native-8d45e511.mjs → SlashCommandsPlugin.native-BiN6ODw5.mjs} +36 -71
  44. package/dist/{SmartPastePlugin.native-a6c5efec.mjs → SmartPastePlugin.native-CZAEHkyt.mjs} +173 -219
  45. package/dist/{SpecialCharactersPlugin.native-7f06d4ba.mjs → SpecialCharactersPlugin.native-DaG4b19I.mjs} +101 -85
  46. package/dist/{SpellCheckPlugin.native-04e20834.mjs → SpellCheckPlugin.native-BZB9AewP.mjs} +21 -41
  47. package/dist/{StrikethroughPlugin.native-905e9501.mjs → StrikethroughPlugin.native-V0TL4F48.mjs} +12 -30
  48. package/dist/{TablePlugin.native-7d5458c1.mjs → TablePlugin.native-DrHX-efe.mjs} +30 -58
  49. package/dist/TemplatePlugin.native-DLjFUaPW.mjs +1150 -0
  50. package/dist/{TextAlignmentPlugin.native-9357b3ed.mjs → TextAlignmentPlugin.native-sM_1s00t.mjs} +6 -11
  51. package/dist/{TextColorPlugin.native-d53ed459.mjs → TextColorPlugin.native-Bwl_bSmc.mjs} +14 -26
  52. package/dist/{TrackChangesPlugin.native-e96da509.mjs → TrackChangesPlugin.native-Bghu2q4a.mjs} +58 -115
  53. package/dist/{TranslationWorkflowPlugin.native-4e711b1e.mjs → TranslationWorkflowPlugin.native-DdF16tgT.mjs} +191 -257
  54. package/dist/{UnderlinePlugin.native-8080c998.mjs → UnderlinePlugin.native-DZzg23rv.mjs} +8 -4
  55. package/dist/{VersionDiffPlugin.native-5bbeff85.mjs → VersionDiffPlugin.native-Bvxgy--t.mjs} +26 -51
  56. package/dist/_commonjsHelpers-DOllISpa.mjs +32 -0
  57. package/dist/{anchoredPopover-5cca53ba.mjs → anchoredPopover-Bxds0VoB.mjs} +1 -1
  58. package/dist/core.css +1 -0
  59. package/dist/documentManager-vQ1VkbUY.mjs +8418 -0
  60. package/dist/{editorContainerHelpers-69585c07.mjs → editorContainerHelpers-C7kdWnS0.mjs} +2 -3
  61. package/dist/editora.min.js +13 -14
  62. package/dist/editora.umd.js +13 -14
  63. package/dist/{html2canvas.esm-c51cb3b9.mjs → html2canvas.esm-AYkPY5LS.mjs} +894 -978
  64. package/dist/index-BslAFzmv.mjs +16544 -0
  65. package/dist/index-CPMGUZfB.js +10 -0
  66. package/dist/{index-7da30697.mjs → index-DBoj6QfW.mjs} +127 -164
  67. package/dist/index.cjs.js +1 -1
  68. package/dist/index.es-BYD2KEo6.mjs +6666 -0
  69. package/dist/index.esm.js +7 -12
  70. package/dist/inlineFormatting-DJ0-NZtx.mjs +97 -0
  71. package/dist/{jspdf.es.min-780c82db.mjs → jspdf.es.min-BJGtOnRT.mjs} +3784 -4808
  72. package/dist/plugin-loader.js +67 -67
  73. package/dist/{purify.es-3bdbcfc5.mjs → purify.es-CKpwg8Tk.mjs} +10 -20
  74. package/dist/webcomponent-core.js +131 -168
  75. package/dist/webcomponent-core.min.css +1 -1
  76. package/dist/webcomponent-core.min.js +147 -65
  77. package/dist/webcomponent.cjs.js +1 -1
  78. package/dist/webcomponent.esm.js +1 -1
  79. package/dist/webcomponent.js +191 -228
  80. package/dist/webcomponent.min.css +1 -1
  81. package/dist/webcomponent.min.js +1248 -1346
  82. package/package.json +1 -1
  83. package/dist/BlockquotePlugin.native-3541c714.mjs +0 -49
  84. package/dist/CapitalizationPlugin.native-42c135dc.mjs +0 -80
  85. package/dist/ChecklistPlugin.native-3b397ee9.mjs +0 -330
  86. package/dist/ClearFormattingPlugin.native-77baa514.mjs +0 -145
  87. package/dist/CodePlugin.native-989cf0aa.mjs +0 -2740
  88. package/dist/DirectionPlugin.native-4e742f42.mjs +0 -139
  89. package/dist/EmbedIframePlugin.native-55209c87.mjs +0 -568
  90. package/dist/HeadingPlugin.native-e38c4a16.mjs +0 -64
  91. package/dist/MathPlugin.native-735bbac2.mjs +0 -296
  92. package/dist/MergeTagPlugin.native-31cf7d48.mjs +0 -584
  93. package/dist/TemplatePlugin.native-580f0f63.mjs +0 -617
  94. package/dist/_commonjsHelpers-69d58be2.mjs +0 -31
  95. package/dist/documentManager-8327fb6e.mjs +0 -9166
  96. package/dist/index-072ef022.js +0 -11
  97. package/dist/index-49d31221.mjs +0 -16860
  98. package/dist/index.es-b47a189f.mjs +0 -5782
  99. package/dist/style.css +0 -1
@@ -1,4 +1,4 @@
1
- const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", ee = "__editoraCommandEditorRoot", te = "rte-approval-workflow-styles", d = "rte-approval-panel", h = "approval", y = "approvalWorkflow", v = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ue = {
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 = {
2
2
  panelTitle: "Approval Workflow",
3
3
  panelAriaLabel: "Approval workflow panel",
4
4
  statusLabel: "Status",
@@ -22,141 +22,126 @@ 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
- }, fe = {
25
+ }, me = {
26
26
  draft: "statusDraftText",
27
27
  review: "statusReviewText",
28
28
  approved: "statusApprovedText"
29
- }, p = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set();
30
- let _ = 0, me = 0, oe = 0, re = 0, R = null, g = null, T = null, L = null, S = null;
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
31
  function c(e) {
32
32
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
33
33
  }
34
- function be(e) {
34
+ function ve(e) {
35
35
  return e.replace(/\u00A0/g, " ").replace(/\s+/g, " ").trim();
36
36
  }
37
- function ne(e) {
37
+ function le(e) {
38
38
  return e === "review" || e === "approved" ? e : "draft";
39
39
  }
40
40
  function z(e = {}) {
41
41
  var t;
42
42
  return {
43
- defaultStatus: ne(e.defaultStatus),
43
+ defaultStatus: le(e.defaultStatus),
44
44
  lockOnApproval: e.lockOnApproval !== !1,
45
45
  maxHistoryEntries: Math.max(10, Math.min(500, Number((t = e.maxHistoryEntries) != null ? t : 120))),
46
46
  requireCommentOnApprove: !!e.requireCommentOnApprove,
47
47
  defaultActor: (e.defaultActor || "system").trim() || "system",
48
48
  labels: {
49
- ...ue,
49
+ ...fe,
50
50
  ...e.labels || {}
51
51
  },
52
- normalizeText: e.normalizeText || be
52
+ normalizeText: e.normalizeText || ve
53
53
  };
54
54
  }
55
- function U(e) {
55
+ function Y(e) {
56
56
  return e.closest(F) || e;
57
57
  }
58
- function B(e) {
59
- if (!e)
60
- return null;
61
- if (e.matches(w))
62
- return e;
58
+ function K(e) {
59
+ if (!e) return null;
60
+ if (e.matches(w)) return e;
63
61
  const t = e.querySelector(w);
64
62
  return t instanceof HTMLElement ? t : null;
65
63
  }
66
- function ve() {
67
- if (typeof window == "undefined")
68
- return null;
69
- const e = window[ee];
70
- if (!(e instanceof HTMLElement))
71
- return null;
72
- window[ee] = null;
73
- const t = B(e);
74
- if (t)
75
- return t;
64
+ function ge() {
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;
76
71
  const o = e.closest(F);
77
72
  if (o) {
78
- const a = B(o);
79
- if (a)
80
- return a;
73
+ const a = K(o);
74
+ if (a) return a;
81
75
  }
82
76
  return null;
83
77
  }
84
- function ge(e) {
78
+ function he(e) {
85
79
  const t = e.closest("[data-editora-editor]");
86
- if (t && B(t) === e)
80
+ if (t && K(t) === e)
87
81
  return t;
88
82
  let o = e;
89
83
  for (; o; ) {
90
- if (o.matches(F) && (o === e || B(o) === e))
84
+ if (o.matches(F) && (o === e || K(o) === e))
91
85
  return o;
92
86
  o = o.parentElement;
93
87
  }
94
- return U(e);
88
+ return Y(e);
95
89
  }
96
90
  function W(e) {
97
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;
98
92
  }
99
- function he(e) {
100
- const t = U(e);
101
- if (W(t))
102
- return !0;
93
+ function xe(e) {
94
+ const t = Y(e);
95
+ if (W(t)) return !0;
103
96
  const o = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
104
97
  return W(o) ? !0 : W(document.documentElement) || W(document.body);
105
98
  }
106
- function K(e, t) {
107
- e.classList.remove("rte-approval-theme-dark"), he(t) && e.classList.add("rte-approval-theme-dark");
99
+ function B(e, t) {
100
+ e.classList.remove("rte-approval-theme-dark"), xe(t) && e.classList.add("rte-approval-theme-dark");
108
101
  }
109
- function le(e) {
102
+ function ie(e) {
110
103
  return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
111
104
  }
112
105
  function x(e, t = !0) {
113
- if (D(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement)
114
- return e.contentElement;
106
+ if (D(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
115
107
  if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
116
108
  const n = e.editorElement;
117
- if (n.matches(w))
118
- return n;
109
+ if (n.matches(w)) return n;
119
110
  const l = n.querySelector(w);
120
- if (l instanceof HTMLElement)
121
- return l;
111
+ if (l instanceof HTMLElement) return l;
122
112
  }
123
- const o = ve();
124
- if (o)
125
- return o;
113
+ const o = ge();
114
+ if (o) return o;
126
115
  const a = window.getSelection();
127
116
  if (a && a.rangeCount > 0) {
128
- const n = le(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
129
- if (l)
130
- return l;
117
+ const n = ie(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
118
+ if (l) return l;
131
119
  }
132
120
  const r = document.activeElement;
133
121
  if (r) {
134
- if (r.matches(w))
135
- return r;
122
+ if (r.matches(w)) return r;
136
123
  const n = r.closest(w);
137
- if (n)
138
- return n;
124
+ if (n) return n;
139
125
  }
140
126
  return g && g.isConnected ? g : (g && !g.isConnected && (g = null), t ? document.querySelector(w) : null);
141
127
  }
142
128
  function D() {
143
129
  Array.from(H).forEach((t) => {
144
130
  var o;
145
- t.isConnected || ((o = k.get(t)) == null || o.remove(), k.delete(t), O.delete(t), p.delete(t), I.delete(t), H.delete(t), g === t && (g = null));
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));
146
132
  });
147
133
  }
148
- function xe(e) {
134
+ function we(e) {
149
135
  return e ? !!(e.closest(`.${d}`) || e.closest(w) || e.closest(F)) : !1;
150
136
  }
151
- function we() {
137
+ function ye() {
152
138
  const e = window.getSelection();
153
- if (!e || e.rangeCount === 0)
154
- return !1;
155
- const t = e.getRangeAt(0).startContainer, o = le(t);
139
+ if (!e || e.rangeCount === 0) return !1;
140
+ const t = e.getRangeAt(0).startContainer, o = ie(t);
156
141
  return !!(o != null && o.closest(w));
157
142
  }
158
143
  function C(e, t, o) {
159
- const a = ge(e);
144
+ const a = he(e);
160
145
  Array.from(
161
146
  a.querySelectorAll(
162
147
  `.rte-toolbar-button[data-command="${t}"], .editora-toolbar-button[data-command="${t}"]`
@@ -165,15 +150,14 @@ function C(e, t, o) {
165
150
  n.classList.toggle("active", o), n.setAttribute("aria-pressed", o ? "true" : "false"), n.setAttribute("data-active", o ? "true" : "false");
166
151
  });
167
152
  }
168
- function ie(e, t, o) {
153
+ function se(e, t, o) {
169
154
  t !== null ? e.setAttribute("contenteditable", t) : e.setAttribute("contenteditable", "true"), o !== null ? e.setAttribute("data-readonly", o) : e.removeAttribute("data-readonly");
170
155
  }
171
- function Y(e) {
156
+ function X(e) {
172
157
  e.dispatchEvent(new Event("input", { bubbles: !0 }));
173
158
  }
174
- function X(e, t) {
175
- if (t === e.innerHTML)
176
- return;
159
+ function J(e, t) {
160
+ if (t === e.innerHTML) return;
177
161
  const o = window.execEditorCommand || window.executeEditorCommand;
178
162
  if (typeof o == "function")
179
163
  try {
@@ -181,13 +165,13 @@ function X(e, t) {
181
165
  } catch (a) {
182
166
  }
183
167
  }
184
- function J() {
185
- return oe += 1, `approval-comment-${Date.now().toString(36)}-${oe.toString(36)}`;
168
+ function Q() {
169
+ return re += 1, `approval-comment-${Date.now().toString(36)}-${re.toString(36)}`;
186
170
  }
187
171
  function ke() {
188
- return re += 1, `approval-signoff-${Date.now().toString(36)}-${re.toString(36)}`;
172
+ return ae += 1, `approval-signoff-${Date.now().toString(36)}-${ae.toString(36)}`;
189
173
  }
190
- function se(e) {
174
+ function pe(e) {
191
175
  return {
192
176
  status: e.status,
193
177
  locked: e.locked,
@@ -196,17 +180,17 @@ function se(e) {
196
180
  updatedAt: e.updatedAt
197
181
  };
198
182
  }
199
- function ye(e, t) {
200
- const o = fe[e];
183
+ function Ae(e, t) {
184
+ const o = me[e];
201
185
  return t.labels[o] || e;
202
186
  }
203
- function pe(e, t, o) {
187
+ function ce(e, t, o) {
204
188
  var a, r;
205
- 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", Z(e)), C(e, "requestApprovalReview", t.status === "review"), C(e, "approveDocument", t.status === "approved"), C(e, "reopenDraft", t.status === "draft"), t.status === "approved" && o.lockOnApproval) {
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) {
206
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;
207
191
  return;
208
192
  }
209
- t.locked = !1, ie(
193
+ t.locked = !1, se(
210
194
  e,
211
195
  (a = t.preApprovalContentEditable) != null ? a : t.originalContentEditable,
212
196
  (r = t.preApprovalReadonly) != null ? r : t.originalReadonly
@@ -224,7 +208,7 @@ function f(e, t) {
224
208
  originalReadonly: e.getAttribute("data-readonly"),
225
209
  preApprovalContentEditable: null,
226
210
  preApprovalReadonly: null
227
- }, I.set(e, o), H.add(e), pe(e, o, t), o);
211
+ }, I.set(e, o), H.add(e), ce(e, o, t), o);
228
212
  }
229
213
  function j(e, t) {
230
214
  return e.length <= t ? e : e.slice(e.length - t);
@@ -233,8 +217,8 @@ function M(e, t) {
233
217
  const o = e.querySelector(".rte-approval-live");
234
218
  o && (o.textContent = t);
235
219
  }
236
- function Ae(e, t) {
237
- const o = se(t);
220
+ function Se(e, t) {
221
+ const o = pe(t);
238
222
  e.__approvalWorkflowState = o, e.dispatchEvent(
239
223
  new CustomEvent("editora:approval-state-changed", {
240
224
  bubbles: !0,
@@ -245,15 +229,13 @@ function Ae(e, t) {
245
229
  );
246
230
  }
247
231
  function q(e) {
248
- const t = k.get(e);
249
- if (!t)
250
- return;
232
+ const t = y.get(e);
233
+ if (!t) return;
251
234
  const o = p.get(e) || R;
252
- if (!o)
253
- return;
235
+ if (!o) return;
254
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");
255
237
  if (r) {
256
- const i = ye(a.status, o);
238
+ const i = Ae(a.status, o);
257
239
  r.textContent = `${o.labels.summaryPrefix}: ${i} | Comments: ${a.comments.length} | Sign-offs: ${a.signoffs.length}${a.locked ? ` | ${o.labels.lockedSuffix}` : ""}`;
258
240
  }
259
241
  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(
@@ -283,41 +265,38 @@ function q(e) {
283
265
  ).join(""));
284
266
  }
285
267
  function G(e, t, o) {
286
- t.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), pe(e, t, o), q(e), Ae(e, t);
268
+ t.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), ce(e, t, o), q(e), Se(e, t);
287
269
  }
288
- function ae(e, t, o, a) {
270
+ function ne(e, t, o, a) {
289
271
  e.comments.push({
290
- id: J(),
272
+ id: Q(),
291
273
  author: o || t.defaultActor,
292
274
  message: a,
293
275
  kind: "system",
294
276
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
295
277
  }), e.comments = j(e.comments, t.maxHistoryEntries);
296
278
  }
297
- function E(e, t, o, a) {
279
+ function $(e, t, o, a) {
298
280
  const r = f(e, o);
299
- if (r.status === t)
300
- return !1;
281
+ if (r.status === t) return !1;
301
282
  const n = e.innerHTML;
302
- return r.status = t, t === "review" ? ae(r, o, a, "Review requested.") : t === "draft" && ae(r, o, a, "Returned to draft."), G(e, r, o), Y(e), X(e, n), !0;
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;
303
284
  }
304
- function ce(e, t, o, a) {
285
+ function de(e, t, o, a) {
305
286
  const r = a.normalizeText(t);
306
- if (!r)
307
- return !1;
287
+ if (!r) return !1;
308
288
  const n = a.normalizeText(o) || a.defaultActor, l = f(e, a), s = e.innerHTML;
309
289
  return l.comments.push({
310
- id: J(),
290
+ id: Q(),
311
291
  author: n,
312
292
  message: r,
313
293
  kind: "comment",
314
294
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
315
- }), l.comments = j(l.comments, a.maxHistoryEntries), G(e, l, a), Y(e), X(e, s), !0;
295
+ }), l.comments = j(l.comments, a.maxHistoryEntries), G(e, l, a), X(e), J(e, s), !0;
316
296
  }
317
- function Q(e, t, o, a) {
297
+ function Z(e, t, o, a) {
318
298
  const r = t.normalizeText(o) || t.defaultActor, n = t.normalizeText(a);
319
- if (t.requireCommentOnApprove && !n)
320
- return !1;
299
+ if (t.requireCommentOnApprove && !n) return !1;
321
300
  const l = f(e, t), s = e.innerHTML;
322
301
  return l.status = "approved", l.signoffs.push({
323
302
  id: ke(),
@@ -325,32 +304,30 @@ function Q(e, t, o, a) {
325
304
  comment: n || void 0,
326
305
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
327
306
  }), l.signoffs = j(l.signoffs, t.maxHistoryEntries), n && (l.comments.push({
328
- id: J(),
307
+ id: Q(),
329
308
  author: r,
330
309
  message: n,
331
310
  kind: "system",
332
311
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
333
- }), l.comments = j(l.comments, t.maxHistoryEntries)), G(e, l, t), Y(e), X(e, s), !0;
312
+ }), l.comments = j(l.comments, t.maxHistoryEntries)), G(e, l, t), X(e), J(e, s), !0;
334
313
  }
335
314
  function N(e, t) {
336
315
  return e.querySelector(`[data-field="${t}"]`);
337
316
  }
338
- function Se(e) {
317
+ function Ee(e) {
339
318
  var a, r;
340
319
  const t = ((a = N(e, "actor")) == null ? void 0 : a.value) || "", o = ((r = N(e, "comment")) == null ? void 0 : r.value) || "";
341
320
  return { actor: t, comment: o };
342
321
  }
343
- function V(e, t) {
344
- if (!t.classList.contains("show"))
345
- return;
346
- const a = U(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));
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));
347
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`;
348
326
  }
349
327
  function $e(e) {
350
- const t = k.get(e);
351
- if (t)
352
- return t;
353
- const o = p.get(e) || R || z(), a = `rte-approval-panel-${me++}`, r = document.createElement("section");
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");
354
331
  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 = `
355
332
  <header class="rte-approval-header">
356
333
  <h2 class="rte-approval-title">${c(o.labels.panelTitle)}</h2>
@@ -406,155 +383,151 @@ function $e(e) {
406
383
  </div>
407
384
  `, r.addEventListener("click", (n) => {
408
385
  const l = n.target;
409
- if (!l)
410
- return;
386
+ if (!l) return;
411
387
  const s = l.closest("[data-action]");
412
- if (!s)
413
- return;
388
+ if (!s) return;
414
389
  const u = s.getAttribute("data-action") || "", m = p.get(e) || R || o;
415
390
  if (p.set(e, m), f(e, m), u === "close") {
416
391
  P(e, !0);
417
392
  return;
418
393
  }
419
- const i = Se(r);
394
+ const i = Ee(r);
420
395
  if (u === "request-review") {
421
- E(e, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
396
+ $(e, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
422
397
  return;
423
398
  }
424
399
  if (u === "reopen-draft") {
425
- E(e, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
400
+ $(e, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
426
401
  return;
427
402
  }
428
403
  if (u === "approve") {
429
- const b = Q(e, m, i.actor, i.comment);
404
+ const b = Z(e, m, i.actor, i.comment);
430
405
  if (!b && m.requireCommentOnApprove) {
431
406
  M(r, m.labels.approveCommentRequiredText);
432
407
  return;
433
408
  }
434
409
  if (b) {
435
- const $ = N(r, "comment");
436
- $ && ($.value = ""), M(r, "Document approved and signed off.");
410
+ const E = N(r, "comment");
411
+ E && (E.value = ""), M(r, "Document approved and signed off.");
437
412
  }
438
413
  return;
439
414
  }
440
415
  if (u === "add-comment") {
441
- if (!ce(e, i.comment, i.actor, m))
442
- return;
443
- const $ = N(r, "comment");
444
- $ && ($.value = ""), M(r, "Comment added.");
416
+ if (!de(e, i.comment, i.actor, m)) return;
417
+ const E = N(r, "comment");
418
+ E && (E.value = ""), M(r, "Comment added.");
445
419
  return;
446
420
  }
447
421
  }), r.addEventListener("keydown", (n) => {
448
422
  n.key === "Escape" && (n.preventDefault(), P(e, !0));
449
- }), K(r, e), document.body.appendChild(r), k.set(e, r), O.set(e, !1), q(e), r;
423
+ }), B(r, e), document.body.appendChild(r), y.set(e, r), O.set(e, !1), q(e), r;
450
424
  }
451
- function Z(e) {
425
+ function ee(e) {
452
426
  return O.get(e) === !0;
453
427
  }
454
428
  function A(e) {
455
429
  D();
456
430
  const t = $e(e);
457
- k.forEach((o, a) => {
431
+ y.forEach((o, a) => {
458
432
  a !== e && P(a, !1);
459
- }), t.classList.add("show"), O.set(e, !0), C(e, "toggleApprovalWorkflowPanel", !0), K(t, e), V(e, t), q(e);
433
+ }), t.classList.add("show"), O.set(e, !0), C(e, "toggleApprovalWorkflowPanel", !0), B(t, e), U(e, t), q(e);
460
434
  }
461
435
  function P(e, t = !1) {
462
- const o = k.get(e);
436
+ const o = y.get(e);
463
437
  o && (o.classList.remove("show"), O.set(e, !1), C(e, "toggleApprovalWorkflowPanel", !1), t && e.focus({ preventScroll: !0 }));
464
438
  }
465
- function de(e, t) {
466
- const o = Z(e);
439
+ function ue(e, t) {
440
+ const o = ee(e);
467
441
  return (typeof t == "boolean" ? t : !o) ? A(e) : P(e), !0;
468
442
  }
469
- function Ee(e) {
470
- const t = e.key.toLowerCase();
471
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "a";
443
+ function V(e) {
444
+ return typeof e.key == "string" ? e.key.toLowerCase() : "";
472
445
  }
473
446
  function Ce(e) {
474
- const t = e.key.toLowerCase();
475
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "r";
447
+ const t = V(e);
448
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "a";
476
449
  }
477
450
  function Te(e) {
478
- const t = e.key.toLowerCase();
479
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "p";
451
+ const t = V(e);
452
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "r";
480
453
  }
481
454
  function Le(e) {
482
- const t = e.key.toLowerCase();
483
- return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "d";
455
+ const t = V(e);
456
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "p";
484
457
  }
485
458
  function Re(e) {
459
+ const t = V(e);
460
+ return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "d";
461
+ }
462
+ function Me(e) {
486
463
  R = e, T || (T = (t) => {
487
464
  D();
488
465
  const o = t.target, a = o == null ? void 0 : o.closest(w);
489
- if (!a)
490
- return;
466
+ if (!a) return;
491
467
  g = a;
492
468
  const r = p.get(a) || e;
493
469
  p.set(a, r), f(a, r);
494
- const n = k.get(a);
495
- n && (K(n, a), V(a, n));
470
+ const n = y.get(a);
471
+ n && (B(n, a), U(a, n));
496
472
  }, document.addEventListener("focusin", T, !0)), L || (L = (t) => {
497
- if (t.defaultPrevented)
498
- return;
499
- const o = Ee(t), a = Ce(t), r = Te(t), n = Le(t), l = t.key === "Escape";
473
+ if (t.defaultPrevented) return;
474
+ const o = Ce(t), a = Te(t), r = Le(t), n = Re(t), l = t.key === "Escape";
500
475
  if (!l && !o && !a && !r && !n)
501
476
  return;
502
477
  D();
503
478
  const s = t.target, u = !!(s != null && s.closest(`.${d} input, .${d} textarea, .${d} select`));
504
- if (!xe(s) && !we())
479
+ if (!we(s) && !ye())
505
480
  return;
506
481
  const i = x(void 0, !1);
507
- if (!i)
508
- return;
482
+ if (!i) return;
509
483
  const b = p.get(i) || R || e;
510
484
  p.set(i, b);
511
- const $ = f(i, b);
512
- if (g = i, l && Z(i)) {
485
+ const E = f(i, b);
486
+ if (g = i, l && ee(i)) {
513
487
  t.preventDefault(), P(i, !0);
514
488
  return;
515
489
  }
516
490
  if (!u) {
517
491
  if (o) {
518
- t.preventDefault(), t.stopPropagation(), de(i);
492
+ t.preventDefault(), t.stopPropagation(), ue(i);
519
493
  return;
520
494
  }
521
495
  if (a) {
522
- t.preventDefault(), t.stopPropagation(), E(i, "review", b, b.defaultActor) && A(i);
496
+ t.preventDefault(), t.stopPropagation(), $(i, "review", b, b.defaultActor) && A(i);
523
497
  return;
524
498
  }
525
499
  if (r) {
526
- t.preventDefault(), t.stopPropagation(), Q(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
500
+ t.preventDefault(), t.stopPropagation(), Z(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
527
501
  return;
528
502
  }
529
- n && (t.preventDefault(), t.stopPropagation(), $.status !== "draft" && E(i, "draft", b, b.defaultActor) && A(i));
503
+ n && (t.preventDefault(), t.stopPropagation(), E.status !== "draft" && $(i, "draft", b, b.defaultActor) && A(i));
530
504
  }
531
505
  }, document.addEventListener("keydown", L, !0)), S || (S = () => {
532
- D(), k.forEach((t, o) => {
533
- !o.isConnected || !t.isConnected || (K(t, o), V(o, t));
506
+ D(), y.forEach((t, o) => {
507
+ !o.isConnected || !t.isConnected || (B(t, o), U(o, t));
534
508
  });
535
509
  }, window.addEventListener("scroll", S, !0), window.addEventListener("resize", S));
536
510
  }
537
- function Me(e) {
511
+ function De(e) {
538
512
  var o, a;
539
513
  const t = I.get(e);
540
- t && (e.classList.remove("rte-approval-locked-editor"), e.removeAttribute("data-approval-status"), e.removeAttribute("data-approval-locked"), ie(
514
+ t && (e.classList.remove("rte-approval-locked-editor"), e.removeAttribute("data-approval-status"), e.removeAttribute("data-approval-locked"), se(
541
515
  e,
542
516
  (o = t.preApprovalContentEditable) != null ? o : t.originalContentEditable,
543
517
  (a = t.preApprovalReadonly) != null ? a : t.originalReadonly
544
518
  ));
545
519
  }
546
- function De() {
547
- 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), k.forEach((e) => e.remove()), k.clear(), H.forEach((e) => Me(e)), H.clear(), R = null, g = null;
548
- }
549
520
  function He() {
550
- if (typeof document == "undefined" || document.getElementById(te))
551
- return;
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;
522
+ }
523
+ function qe() {
524
+ if (typeof document == "undefined" || document.getElementById(oe)) return;
552
525
  const e = document.createElement("style");
553
- e.id = te, e.textContent = `
526
+ e.id = oe, e.textContent = `
554
527
  .rte-toolbar-group-items.${h},
555
528
  .editora-toolbar-group-items.${h},
556
- .rte-toolbar-group-items.${y},
557
- .editora-toolbar-group-items.${y} {
529
+ .rte-toolbar-group-items.${k},
530
+ .editora-toolbar-group-items.${k} {
558
531
  display: flex;
559
532
  border: 1px solid #ccc;
560
533
  border-radius: 3px;
@@ -563,8 +536,8 @@ function He() {
563
536
 
564
537
  .rte-toolbar-group-items.${h} .rte-toolbar-button,
565
538
  .editora-toolbar-group-items.${h} .editora-toolbar-button,
566
- .rte-toolbar-group-items.${y} .rte-toolbar-button,
567
- .editora-toolbar-group-items.${y} .editora-toolbar-button {
539
+ .rte-toolbar-group-items.${k} .rte-toolbar-button,
540
+ .editora-toolbar-group-items.${k} .editora-toolbar-button {
568
541
  border: none;
569
542
  border-radius: 0;
570
543
  border-right: 1px solid #ccc;
@@ -586,22 +559,22 @@ function He() {
586
559
 
587
560
  .rte-toolbar-group-items.${h} .rte-toolbar-item:last-child .rte-toolbar-button,
588
561
  .editora-toolbar-group-items.${h} .editora-toolbar-item:last-child .editora-toolbar-button,
589
- .rte-toolbar-group-items.${y} .rte-toolbar-item:last-child .rte-toolbar-button,
590
- .editora-toolbar-group-items.${y} .editora-toolbar-item:last-child .editora-toolbar-button {
562
+ .rte-toolbar-group-items.${k} .rte-toolbar-item:last-child .rte-toolbar-button,
563
+ .editora-toolbar-group-items.${k} .editora-toolbar-item:last-child .editora-toolbar-button {
591
564
  border-right: none;
592
565
  }
593
566
 
594
567
  ${v} .rte-toolbar-group-items.${h},
595
568
  ${v} .editora-toolbar-group-items.${h},
596
- ${v} .rte-toolbar-group-items.${y},
597
- ${v} .editora-toolbar-group-items.${y},
569
+ ${v} .rte-toolbar-group-items.${k},
570
+ ${v} .editora-toolbar-group-items.${k},
598
571
  .${d}.rte-approval-theme-dark {
599
572
  border-color: #566275;
600
573
  }
601
574
  ${v} .rte-toolbar-group-items.${h} .rte-toolbar-button svg,
602
575
  ${v} .editora-toolbar-group-items.${h} .editora-toolbar-button svg,
603
- ${v} .rte-toolbar-group-items.${y} .rte-toolbar-button svg,
604
- ${v} .editora-toolbar-group-items.${y} .editora-toolbar-button svg
576
+ ${v} .rte-toolbar-group-items.${k} .rte-toolbar-button svg,
577
+ ${v} .editora-toolbar-group-items.${k} .editora-toolbar-button svg
605
578
  {
606
579
  fill: none;
607
580
  }
@@ -943,9 +916,9 @@ function He() {
943
916
  }
944
917
  `, document.head.appendChild(e);
945
918
  }
946
- const qe = (e = {}) => {
919
+ const Pe = (e = {}) => {
947
920
  const t = z(e);
948
- return He(), {
921
+ return qe(), {
949
922
  name: "approvalWorkflow",
950
923
  toolbar: [
951
924
  {
@@ -988,67 +961,59 @@ const qe = (e = {}) => {
988
961
  commands: {
989
962
  approvalWorkflow: (o, a) => {
990
963
  const r = x(a);
991
- if (!r)
992
- return !1;
964
+ if (!r) return !1;
993
965
  const n = p.get(r) || t;
994
966
  return p.set(r, n), f(r, n), g = r, A(r), q(r), !0;
995
967
  },
996
968
  toggleApprovalWorkflowPanel: (o, a) => {
997
969
  const r = x(a);
998
- if (!r)
999
- return !1;
970
+ if (!r) return !1;
1000
971
  const n = p.get(r) || t;
1001
- return p.set(r, n), f(r, n), g = r, de(r, typeof o == "boolean" ? o : void 0);
972
+ return p.set(r, n), f(r, n), g = r, ue(r, typeof o == "boolean" ? o : void 0);
1002
973
  },
1003
974
  requestApprovalReview: (o, a) => {
1004
975
  const r = x(a);
1005
- if (!r)
1006
- return !1;
976
+ if (!r) return !1;
1007
977
  const n = p.get(r) || t;
1008
978
  p.set(r, n), f(r, n);
1009
- const l = E(r, "review", n, n.defaultActor);
979
+ const l = $(r, "review", n, n.defaultActor);
1010
980
  return A(r), l;
1011
981
  },
1012
982
  approveDocument: (o, a) => {
1013
983
  const r = x(a);
1014
- if (!r)
1015
- return !1;
984
+ if (!r) return !1;
1016
985
  const n = p.get(r) || t;
1017
986
  p.set(r, n), f(r, n);
1018
- const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u = Q(r, n, l, s);
987
+ 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);
1019
988
  return u && A(r), u;
1020
989
  },
1021
990
  reopenDraft: (o, a) => {
1022
991
  const r = x(a);
1023
- if (!r)
1024
- return !1;
992
+ if (!r) return !1;
1025
993
  const n = p.get(r) || t;
1026
994
  p.set(r, n), f(r, n);
1027
- const l = E(r, "draft", n, n.defaultActor);
995
+ const l = $(r, "draft", n, n.defaultActor);
1028
996
  return l && A(r), l;
1029
997
  },
1030
998
  addApprovalComment: (o, a) => {
1031
999
  const r = x(a);
1032
- if (!r)
1033
- return !1;
1000
+ if (!r) return !1;
1034
1001
  const n = p.get(r) || t;
1035
1002
  p.set(r, n), f(r, n);
1036
- const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = ce(r, s, l, 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);
1037
1004
  return u && A(r), u;
1038
1005
  },
1039
1006
  setApprovalStatus: (o, a) => {
1040
1007
  const r = x(a);
1041
- if (!r || !o)
1042
- return !1;
1043
- const n = ne(o), l = p.get(r) || t;
1008
+ if (!r || !o) return !1;
1009
+ const n = le(o), l = p.get(r) || t;
1044
1010
  p.set(r, l), f(r, l);
1045
- const s = E(r, n, l, l.defaultActor);
1011
+ const s = $(r, n, l, l.defaultActor);
1046
1012
  return s && A(r), s;
1047
1013
  },
1048
1014
  setApprovalWorkflowOptions: (o, a) => {
1049
1015
  const r = x(a);
1050
- if (!r || !o || typeof o != "object")
1051
- return !1;
1016
+ if (!r || !o || typeof o != "object") return !1;
1052
1017
  const n = p.get(r) || t, l = z({
1053
1018
  ...n,
1054
1019
  ...o,
@@ -1064,11 +1029,10 @@ const qe = (e = {}) => {
1064
1029
  },
1065
1030
  getApprovalWorkflowState: (o, a) => {
1066
1031
  const r = x(a);
1067
- if (!r)
1068
- return !1;
1032
+ if (!r) return !1;
1069
1033
  const n = p.get(r) || t;
1070
1034
  p.set(r, n);
1071
- const l = f(r, n), s = se(l);
1035
+ const l = f(r, n), s = pe(l);
1072
1036
  if (typeof o == "function")
1073
1037
  try {
1074
1038
  o(s);
@@ -1097,7 +1061,7 @@ const qe = (e = {}) => {
1097
1061
  init: function(a) {
1098
1062
  _ += 1;
1099
1063
  const r = this && typeof this.__pluginConfig == "object" ? z({ ...t, ...this.__pluginConfig }) : t;
1100
- Re(r);
1064
+ Me(r);
1101
1065
  const n = x(
1102
1066
  a != null && a.editorElement ? { editorElement: a.editorElement } : void 0,
1103
1067
  !1
@@ -1105,11 +1069,11 @@ const qe = (e = {}) => {
1105
1069
  n && (p.set(n, r), f(n, r), g = n, q(n));
1106
1070
  },
1107
1071
  destroy: () => {
1108
- _ = Math.max(0, _ - 1), !(_ > 0) && De();
1072
+ _ = Math.max(0, _ - 1), !(_ > 0) && He();
1109
1073
  }
1110
1074
  };
1111
1075
  };
1112
1076
  export {
1113
- qe as ApprovalWorkflowPlugin
1077
+ Pe as ApprovalWorkflowPlugin
1114
1078
  };
1115
- //# sourceMappingURL=ApprovalWorkflowPlugin.native-449ce66c.mjs.map
1079
+ //# sourceMappingURL=ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs.map