@univerjs/docs-thread-comment-ui 0.5.0 → 0.5.1-nightly.202411301606

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.
package/lib/es/index.js CHANGED
@@ -1,26 +1,26 @@
1
- var be = Object.defineProperty;
2
- var xe = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var Z = (e, t, r) => xe(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Inject as p, Disposable as j, CommandType as E, ICommandService as M, CustomDecorationType as Q, sequenceExecute as ne, UniverInstanceType as S, SHEET_EDITOR_UNITS as ye, useDependency as U, IUniverInstanceService as B, Injector as re, useObservable as q, UserManagerService as De, BuildTextUtils as Te, DependentOn as Re, Plugin as Pe, IConfigService as Ue } from "@univerjs/core";
5
- import { IRenderManagerService as F, DocumentEditArea as ee } from "@univerjs/engine-render";
6
- import { ThreadCommentPanelService as R, SetActiveCommentOperation as oe, ThreadCommentPanel as Ee, UniverThreadCommentUIPlugin as we } from "@univerjs/thread-comment-ui";
7
- import { DocSelectionManagerService as L, DocSkeletonManagerService as Ne, RichTextEditingMutation as ie, SetTextSelectionsOperation as Ae, DocInterceptorService as $e, DOC_INTERCEPTOR_POINT as Ve } from "@univerjs/docs";
8
- import { addCustomDecorationBySelectionFactory as je, deleteCustomDecorationFactory as Be, DocSelectionRenderService as Fe, DocBackScrollRenderController as Le, DocRenderController as He } from "@univerjs/docs-ui";
9
- import { IThreadCommentDataSourceService as We, AddCommentMutation as Ke, getDT as Ge, ThreadCommentModel as se } from "@univerjs/thread-comment";
10
- import { ISidebarService as H, MenuItemType as de, getMenuHiddenObservable as ce, RibbonStartGroup as Ze, ContextMenuPosition as qe, ContextMenuGroup as ze, ComponentManager as Je, IMenuManagerService as Ye } from "@univerjs/ui";
11
- import { BehaviorSubject as Qe, Observable as ae, debounceTime as me } from "rxjs";
12
- import Xe, { useMemo as z, useState as ke, useEffect as et, forwardRef as le, useRef as tt, createElement as ue } from "react";
13
- const nt = "DOC_THREAD_COMMENT_UI_PLUGIN", I = "default_doc", rt = "docs-thread-comment-ui.config", ot = {};
14
- var it = Object.defineProperty, st = Object.getOwnPropertyDescriptor, dt = (e, t, r, n) => {
15
- for (var o = n > 1 ? void 0 : n ? st(t, r) : t, i = e.length - 1, s; i >= 0; i--)
1
+ var xe = Object.defineProperty;
2
+ var De = (e, t, r) => t in e ? xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var K = (e, t, r) => De(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { Inject as p, Disposable as B, CommandType as w, ICommandService as M, CustomDecorationType as X, sequenceExecute as ie, UniverInstanceType as S, SHEET_EDITOR_UNITS as Re, useDependency as U, IUniverInstanceService as F, Injector as se, useObservable as G, UserManagerService as ye, BuildTextUtils as Te, DependentOn as Pe, Plugin as Ue, IConfigService as Ee } from "@univerjs/core";
5
+ import { IRenderManagerService as L, DocumentEditArea as te } from "@univerjs/engine-render";
6
+ import { ThreadCommentPanelService as T, SetActiveCommentOperation as de, ThreadCommentPanel as we, UniverThreadCommentUIPlugin as Ne } from "@univerjs/thread-comment-ui";
7
+ import { DocSelectionManagerService as H, DocSkeletonManagerService as Ae, RichTextEditingMutation as ce, SetTextSelectionsOperation as $e, DocInterceptorService as Ve, DOC_INTERCEPTOR_POINT as je } from "@univerjs/docs";
8
+ import { addCustomDecorationBySelectionFactory as Be, deleteCustomDecorationFactory as Fe, DocSelectionRenderService as Le, DocBackScrollRenderController as He, DocRenderController as We } from "@univerjs/docs-ui";
9
+ import { IThreadCommentDataSourceService as qe, AddCommentMutation as Je, getDT as Ke, ThreadCommentModel as ae } from "@univerjs/thread-comment";
10
+ import { ISidebarService as W, MenuItemType as me, getMenuHiddenObservable as le, RibbonStartGroup as Ge, ContextMenuPosition as Ze, ContextMenuGroup as ze, ComponentManager as Ye, IMenuManagerService as Qe } from "@univerjs/ui";
11
+ import { BehaviorSubject as Xe, Observable as ue, debounceTime as fe } from "rxjs";
12
+ import ke, { useMemo as Z, useState as et, useEffect as tt, forwardRef as he, useRef as nt, createElement as Ce } from "react";
13
+ const rt = "DOC_THREAD_COMMENT_UI_PLUGIN", I = "default_doc", ot = "docs-thread-comment-ui.config", it = {};
14
+ var st = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, ct = (e, t, r, n) => {
15
+ for (var o = n > 1 ? void 0 : n ? dt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
16
16
  (s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
17
- return n && o && it(t, r, o), o;
18
- }, te = (e, t) => (r, n) => t(r, n, e);
19
- let D = class extends j {
17
+ return n && o && st(t, r, o), o;
18
+ }, ne = (e, t) => (r, n) => t(r, n, e);
19
+ let R = class extends B {
20
20
  constructor(t, r) {
21
21
  super();
22
- Z(this, "_addingComment$", new Qe(void 0));
23
- Z(this, "addingComment$", this._addingComment$.asObservable());
22
+ K(this, "_addingComment$", new Xe(void 0));
23
+ K(this, "addingComment$", this._addingComment$.asObservable());
24
24
  this._sidebarService = t, this._threadCommentPanelService = r, this.disposeWithMe(() => {
25
25
  this._addingComment$.complete();
26
26
  });
@@ -35,11 +35,11 @@ let D = class extends j {
35
35
  this._addingComment$.next(void 0);
36
36
  }
37
37
  };
38
- D = dt([
39
- te(0, H),
40
- te(1, p(R))
41
- ], D);
42
- var fe = { exports: {} }, W = {};
38
+ R = ct([
39
+ ne(0, W),
40
+ ne(1, p(T))
41
+ ], R);
42
+ var z = { exports: {} }, E = {};
43
43
  /**
44
44
  * @license React
45
45
  * react-jsx-runtime.production.min.js
@@ -49,82 +49,88 @@ var fe = { exports: {} }, W = {};
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
51
  */
52
- var ct = Xe, at = Symbol.for("react.element"), mt = Symbol.for("react.fragment"), lt = Object.prototype.hasOwnProperty, ut = ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, ft = { key: !0, ref: !0, __self: !0, __source: !0 };
53
- function he(e, t, r) {
54
- var n, o = {}, i = null, s = null;
55
- r !== void 0 && (i = "" + r), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (s = t.ref);
56
- for (n in t) lt.call(t, n) && !ft.hasOwnProperty(n) && (o[n] = t[n]);
57
- if (e && e.defaultProps) for (n in t = e.defaultProps, t) o[n] === void 0 && (o[n] = t[n]);
58
- return { $$typeof: at, type: e, key: i, ref: s, props: o, _owner: ut.current };
52
+ var re;
53
+ function at() {
54
+ if (re) return E;
55
+ re = 1;
56
+ var e = ke, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
57
+ function s(d, a, u) {
58
+ var c, h = {}, C = null, _ = null;
59
+ u !== void 0 && (C = "" + u), a.key !== void 0 && (C = "" + a.key), a.ref !== void 0 && (_ = a.ref);
60
+ for (c in a) n.call(a, c) && !i.hasOwnProperty(c) && (h[c] = a[c]);
61
+ if (d && d.defaultProps) for (c in a = d.defaultProps, a) h[c] === void 0 && (h[c] = a[c]);
62
+ return { $$typeof: t, type: d, key: C, ref: _, props: h, _owner: o.current };
63
+ }
64
+ return E.Fragment = r, E.jsx = s, E.jsxs = s, E;
65
+ }
66
+ var oe;
67
+ function mt() {
68
+ return oe || (oe = 1, z.exports = at()), z.exports;
59
69
  }
60
- W.Fragment = mt;
61
- W.jsx = he;
62
- W.jsxs = he;
63
- fe.exports = W;
64
- var ht = fe.exports;
65
- const Ce = {
70
+ var lt = mt();
71
+ const _e = {
66
72
  id: "docs.command.add-comment",
67
- type: E.COMMAND,
73
+ type: w.COMMAND,
68
74
  async handler(e, t) {
69
75
  if (!t)
70
76
  return !1;
71
- const { comment: r, unitId: n } = t, i = await e.get(We).addComment(r), s = e.get(M), d = je(
77
+ const { comment: r, unitId: n } = t, i = await e.get(qe).addComment(r), s = e.get(M), d = Be(
72
78
  e,
73
79
  {
74
80
  id: i.threadId,
75
- type: Q.COMMENT
81
+ type: X.COMMENT
76
82
  }
77
83
  );
78
84
  if (d) {
79
- const l = {
80
- id: Ke.id,
85
+ const a = {
86
+ id: Je.id,
81
87
  params: {
82
88
  unitId: n,
83
89
  subUnitId: I,
84
90
  comment: i
85
91
  }
86
- }, f = {
87
- id: oe.id,
92
+ }, u = {
93
+ id: de.id,
88
94
  params: {
89
95
  unitId: n,
90
96
  subUnitId: I,
91
97
  commentId: i.id
92
98
  }
93
99
  };
94
- return (await ne([l, d, f], s)).result;
100
+ return (await ie([a, d, u], s)).result;
95
101
  }
96
102
  return !1;
97
103
  }
98
104
  }, ve = {
99
105
  id: "docs.command.delete-comment",
100
- type: E.COMMAND,
106
+ type: w.COMMAND,
101
107
  async handler(e, t) {
102
108
  if (!t)
103
109
  return !1;
104
- const { commentId: r, unitId: n } = t, o = e.get(M), i = Be(e, {
110
+ const { commentId: r, unitId: n } = t, o = e.get(M), i = Fe(e, {
105
111
  id: r,
106
112
  unitId: n
107
113
  });
108
- return i ? (await ne([i], o)).result : !1;
114
+ return i ? (await ie([i], o)).result : !1;
109
115
  }
110
- }, _e = (e) => {
111
- const t = e.get(F), r = e.get(L), n = t.getCurrent(), o = n == null ? void 0 : n.with(Ne).getSkeleton(), i = o == null ? void 0 : o.getViewModel().getEditArea();
112
- if (i === ee.FOOTER || i === ee.HEADER)
116
+ }, pe = (e) => {
117
+ const t = e.get(L), r = e.get(H), n = t.getCurrent(), o = n == null ? void 0 : n.with(Ae).getSkeleton(), i = o == null ? void 0 : o.getViewModel().getEditArea();
118
+ if (i === te.FOOTER || i === te.HEADER)
113
119
  return !0;
114
120
  const s = r.getActiveTextRange();
115
121
  return !!(s == null || s.collapsed);
116
122
  };
117
- function Ct(e) {
123
+ function ut(e) {
118
124
  return {
119
- id: K.id,
120
- type: de.BUTTON,
125
+ id: q.id,
126
+ type: me.BUTTON,
121
127
  icon: "CommentSingle",
122
128
  title: "threadCommentUI.panel.addComment",
123
129
  tooltip: "threadCommentUI.panel.addComment",
124
- hidden$: ce(e, S.UNIVER_DOC, void 0, ye),
125
- disabled$: new ae(function(t) {
126
- const n = e.get(L).textSelection$.pipe(me(16)).subscribe(() => {
127
- t.next(_e(e));
130
+ hidden$: le(e, S.UNIVER_DOC, void 0, Re),
131
+ disabled$: new ue(function(t) {
132
+ const n = e.get(H).textSelection$.pipe(fe(16)).subscribe(() => {
133
+ t.next(pe(e));
128
134
  });
129
135
  return () => {
130
136
  n.unsubscribe();
@@ -132,37 +138,37 @@ function Ct(e) {
132
138
  })
133
139
  };
134
140
  }
135
- function vt(e) {
141
+ function ft(e) {
136
142
  return {
137
- id: k.id,
138
- type: de.BUTTON,
143
+ id: ee.id,
144
+ type: me.BUTTON,
139
145
  icon: "CommentSingle",
140
146
  title: "threadCommentUI.panel.addComment",
141
147
  tooltip: "threadCommentUI.panel.addComment",
142
- hidden$: ce(e, S.UNIVER_DOC)
148
+ hidden$: le(e, S.UNIVER_DOC)
143
149
  };
144
150
  }
145
- const T = () => {
146
- const e = U(B), t = U(re), r = z(() => e.getCurrentTypeOfUnit$(S.UNIVER_DOC), [e]), n = q(r), o = z(() => new ae((a) => a.next(I)), []), i = U(L), s = z(
147
- () => i.textSelection$.pipe(me(16)),
151
+ const y = () => {
152
+ const e = U(F), t = U(se), r = Z(() => e.getCurrentTypeOfUnit$(S.UNIVER_DOC), [e]), n = G(r), o = Z(() => new ue((m) => m.next(I)), []), i = U(H), s = Z(
153
+ () => i.textSelection$.pipe(fe(16)),
148
154
  [i.textSelection$]
149
155
  );
150
- q(s);
151
- const d = U(M), l = U(D), f = q(l.addingComment$), [c, C] = ke([]);
152
- if (et(() => {
156
+ G(s);
157
+ const d = U(M), a = U(R), u = G(a.addingComment$), [c, h] = et([]);
158
+ if (tt(() => {
153
159
  var b;
154
- const a = /* @__PURE__ */ new Set(), m = n == null ? void 0 : n.getCustomDecorations();
155
- C((b = m == null ? void 0 : m.map((u) => u.id).filter((u) => {
156
- const O = a.has(u);
157
- return a.add(u), !O;
160
+ const m = /* @__PURE__ */ new Set(), l = n == null ? void 0 : n.getCustomDecorations();
161
+ h((b = l == null ? void 0 : l.map((f) => f.id).filter((f) => {
162
+ const O = m.has(f);
163
+ return m.add(f), !O;
158
164
  })) != null ? b : []);
159
- const g = d.onCommandExecuted((u) => {
165
+ const g = d.onCommandExecuted((f) => {
160
166
  var O;
161
- if (u.id === ie.id) {
162
- const P = /* @__PURE__ */ new Set(), G = n == null ? void 0 : n.getCustomDecorations();
163
- C((O = G == null ? void 0 : G.map((w) => w.id).filter((w) => {
164
- const Me = P.has(w);
165
- return P.add(w), !Me;
167
+ if (f.id === ce.id) {
168
+ const P = /* @__PURE__ */ new Set(), J = n == null ? void 0 : n.getCustomDecorations();
169
+ h((O = J == null ? void 0 : J.map((N) => N.id).filter((N) => {
170
+ const be = P.has(N);
171
+ return P.add(N), !be;
166
172
  })) != null ? O : []);
167
173
  }
168
174
  });
@@ -171,37 +177,37 @@ const T = () => {
171
177
  };
172
178
  }, [d, n]), !n)
173
179
  return null;
174
- const v = _e(t), h = n.getUnitId();
175
- return /* @__PURE__ */ ht.jsx(
176
- Ee,
180
+ const C = pe(t), _ = n.getUnitId();
181
+ return /* @__PURE__ */ lt.jsx(
182
+ we,
177
183
  {
178
- unitId: h,
184
+ unitId: _,
179
185
  subUnitId$: o,
180
186
  type: S.UNIVER_DOC,
181
187
  onAdd: () => {
182
- d.executeCommand(K.id);
188
+ d.executeCommand(q.id);
183
189
  },
184
190
  getSubUnitName: () => "",
185
- disableAdd: v,
186
- tempComment: f,
187
- onAddComment: (a) => {
188
- if (!a.parentId) {
189
- const m = {
190
- unitId: h,
191
- range: f,
192
- comment: a
191
+ disableAdd: C,
192
+ tempComment: u,
193
+ onAddComment: (m) => {
194
+ if (!m.parentId) {
195
+ const l = {
196
+ unitId: _,
197
+ range: u,
198
+ comment: m
193
199
  };
194
- return d.executeCommand(Ce.id, m), l.endAdd(), !1;
200
+ return d.executeCommand(_e.id, l), a.endAdd(), !1;
195
201
  }
196
202
  return !0;
197
203
  },
198
- onDeleteComment: (a) => {
199
- if (!a.parentId) {
200
- const m = {
201
- unitId: h,
202
- commentId: a.id
204
+ onDeleteComment: (m) => {
205
+ if (!m.parentId) {
206
+ const l = {
207
+ unitId: _,
208
+ commentId: m.id
203
209
  };
204
- return d.executeCommand(ve.id, m), !1;
210
+ return d.executeCommand(ve.id, l), !1;
205
211
  }
206
212
  return !0;
207
213
  },
@@ -209,51 +215,51 @@ const T = () => {
209
215
  }
210
216
  );
211
217
  };
212
- T.componentKey = "univer.doc.thread-comment-panel";
213
- const N = {
218
+ y.componentKey = "univer.doc.thread-comment-panel";
219
+ const A = {
214
220
  id: "docs.operation.show-comment-panel",
215
- type: E.OPERATION,
221
+ type: w.OPERATION,
216
222
  handler(e, t) {
217
223
  var o;
218
- const r = e.get(R), n = e.get(H);
219
- return (!r.panelVisible || ((o = n.options.children) == null ? void 0 : o.label) !== T.componentKey) && (n.open({
224
+ const r = e.get(T), n = e.get(W);
225
+ return (!r.panelVisible || ((o = n.options.children) == null ? void 0 : o.label) !== y.componentKey) && (n.open({
220
226
  header: { title: "threadCommentUI.panel.title" },
221
- children: { label: T.componentKey },
227
+ children: { label: y.componentKey },
222
228
  width: 320,
223
229
  onClose: () => r.setPanelVisible(!1)
224
230
  }), r.setPanelVisible(!0)), t && r.setActiveComment(t == null ? void 0 : t.activeComment), !0;
225
231
  }
226
- }, k = {
232
+ }, ee = {
227
233
  id: "docs.operation.toggle-comment-panel",
228
- type: E.OPERATION,
234
+ type: w.OPERATION,
229
235
  handler(e) {
230
236
  var n;
231
- const t = e.get(R), r = e.get(H);
232
- return !t.panelVisible || ((n = r.options.children) == null ? void 0 : n.label) !== T.componentKey ? (r.open({
237
+ const t = e.get(T), r = e.get(W);
238
+ return !t.panelVisible || ((n = r.options.children) == null ? void 0 : n.label) !== y.componentKey ? (r.open({
233
239
  header: { title: "threadCommentUI.panel.title" },
234
- children: { label: T.componentKey },
240
+ children: { label: y.componentKey },
235
241
  width: 320,
236
242
  onClose: () => t.setPanelVisible(!1)
237
243
  }), t.setPanelVisible(!0)) : (r.close(), t.setPanelVisible(!1), t.setActiveComment(null)), !0;
238
244
  }
239
- }, K = {
245
+ }, q = {
240
246
  id: "docs.operation.start-add-comment",
241
- type: E.OPERATION,
247
+ type: w.OPERATION,
242
248
  handler(e) {
243
- var u, O, P;
244
- const t = e.get(R), n = e.get(B).getCurrentUnitForType(S.UNIVER_DOC), o = e.get(L), i = e.get(F), s = e.get(De), d = e.get(D), l = e.get(M), f = e.get(H), c = o.getActiveTextRange();
249
+ var f, O, P;
250
+ const t = e.get(T), n = e.get(F).getCurrentUnitForType(S.UNIVER_DOC), o = e.get(H), i = e.get(L), s = e.get(ye), d = e.get(R), a = e.get(M), u = e.get(W), c = o.getActiveTextRange();
245
251
  if (!n || !c)
246
252
  return !1;
247
- const C = (u = i.getRenderById(n.getUnitId())) == null ? void 0 : u.with(Fe);
253
+ const h = (f = i.getRenderById(n.getUnitId())) == null ? void 0 : f.with(Le);
248
254
  if (c.collapsed)
249
- return t.panelVisible ? (t.setPanelVisible(!1), f.close()) : l.executeCommand(N.id), !0;
250
- l.executeCommand(N.id);
251
- const v = n.getUnitId(), h = ((P = (O = n.getBody()) == null ? void 0 : O.dataStream) != null ? P : "").slice(c.startOffset, c.endOffset), a = Te.transform.getPlainText(h), m = I, g = "", b = {
252
- unitId: v,
253
- subUnitId: m,
255
+ return t.panelVisible ? (t.setPanelVisible(!1), u.close()) : a.executeCommand(A.id), !0;
256
+ a.executeCommand(A.id);
257
+ const C = n.getUnitId(), _ = ((P = (O = n.getBody()) == null ? void 0 : O.dataStream) != null ? P : "").slice(c.startOffset, c.endOffset), m = Te.transform.getPlainText(_), l = I, g = "", b = {
258
+ unitId: C,
259
+ subUnitId: l,
254
260
  id: g,
255
- ref: a,
256
- dT: Ge(),
261
+ ref: m,
262
+ dT: Ke(),
257
263
  personId: s.getCurrentUser().userID,
258
264
  text: {
259
265
  dataStream: `\r
@@ -264,19 +270,19 @@ const N = {
264
270
  collapsed: !0,
265
271
  threadId: g
266
272
  };
267
- return C == null || C.blurEditor(), d.startAdd(b), t.setActiveComment({
268
- unitId: v,
269
- subUnitId: m,
273
+ return h == null || h.blurEditor(), d.startAdd(b), t.setActiveComment({
274
+ unitId: C,
275
+ subUnitId: l,
270
276
  commentId: g
271
277
  }), !0;
272
278
  }
273
279
  };
274
- var _t = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, gt = (e, t, r, n) => {
275
- for (var o = n > 1 ? void 0 : n ? pt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
280
+ var ht = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, _t = (e, t, r, n) => {
281
+ for (var o = n > 1 ? void 0 : n ? Ct(t, r) : t, i = e.length - 1, s; i >= 0; i--)
276
282
  (s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
277
- return n && o && _t(t, r, o), o;
283
+ return n && o && ht(t, r, o), o;
278
284
  }, x = (e, t) => (r, n) => t(r, n, e);
279
- let A = class extends j {
285
+ let $ = class extends B {
280
286
  constructor(e, t, r, n, o, i) {
281
287
  super(), this._threadCommentPanelService = e, this._univerInstanceService = t, this._commandService = r, this._docThreadCommentService = n, this._renderManagerService = o, this._threadCommentModel = i, this._initSelectionChange(), this._initActiveCommandChange();
282
288
  }
@@ -285,20 +291,20 @@ let A = class extends j {
285
291
  this.disposeWithMe(
286
292
  this._commandService.onCommandExecuted((t) => {
287
293
  var r, n, o, i;
288
- if (t.id === Ae.id) {
289
- const s = t.params, { unitId: d, ranges: l } = s, f = this._univerInstanceService.getUnit(d, S.UNIVER_DOC), c = l[0];
294
+ if (t.id === $e.id) {
295
+ const s = t.params, { unitId: d, ranges: a } = s, u = this._univerInstanceService.getUnit(d, S.UNIVER_DOC), c = a[0];
290
296
  if ((e == null ? void 0 : e.startOffset) === (c == null ? void 0 : c.startOffset) && (e == null ? void 0 : e.endOffset) === (c == null ? void 0 : c.endOffset))
291
297
  return;
292
- if (e = c, c && f) {
293
- const { startOffset: C, endOffset: v, collapsed: h } = c;
294
- let a;
295
- if (h ? a = (n = (r = f.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((m) => m.startIndex <= C && m.endIndex >= v - 1) : a = (i = (o = f.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.find((m) => m.startIndex <= C && m.endIndex >= v - 1), a) {
296
- const m = this._threadCommentModel.getComment(d, I, a.id);
297
- m && !m.resolved && this._commandService.executeCommand(N.id, {
298
+ if (e = c, c && u) {
299
+ const { startOffset: h, endOffset: C, collapsed: _ } = c;
300
+ let m;
301
+ if (_ ? m = (n = (r = u.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((l) => l.startIndex <= h && l.endIndex >= C - 1) : m = (i = (o = u.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.find((l) => l.startIndex <= h && l.endIndex >= C - 1), m) {
302
+ const l = this._threadCommentModel.getComment(d, I, m.id);
303
+ l && !l.resolved && this._commandService.executeCommand(A.id, {
298
304
  activeComment: {
299
305
  unitId: d,
300
306
  subUnitId: I,
301
- commentId: a.id
307
+ commentId: m.id
302
308
  }
303
309
  });
304
310
  return;
@@ -306,7 +312,7 @@ let A = class extends j {
306
312
  }
307
313
  if (!this._threadCommentPanelService.activeCommentId)
308
314
  return;
309
- this._commandService.executeCommand(oe.id);
315
+ this._commandService.executeCommand(de.id);
310
316
  }
311
317
  })
312
318
  );
@@ -317,7 +323,7 @@ let A = class extends j {
317
323
  if (e) {
318
324
  const i = this._univerInstanceService.getUnit(e.unitId);
319
325
  if (i) {
320
- const s = (t = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : t.with(Le), d = (n = (r = i.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((l) => l.id === e.commentId);
326
+ const s = (t = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : t.with(He), d = (n = (r = i.getBody()) == null ? void 0 : r.customDecorations) == null ? void 0 : n.find((a) => a.id === e.commentId);
321
327
  d && s && s.scrollToRange({
322
328
  startOffset: d.startIndex,
323
329
  endOffset: d.endIndex,
@@ -329,40 +335,40 @@ let A = class extends j {
329
335
  }));
330
336
  }
331
337
  };
332
- A = gt([
333
- x(0, p(R)),
334
- x(1, B),
338
+ $ = _t([
339
+ x(0, p(T)),
340
+ x(1, F),
335
341
  x(2, M),
336
- x(3, p(D)),
337
- x(4, F),
338
- x(5, p(se))
339
- ], A);
340
- var _ = function() {
341
- return _ = Object.assign || function(e) {
342
+ x(3, p(R)),
343
+ x(4, L),
344
+ x(5, p(ae))
345
+ ], $);
346
+ var v = function() {
347
+ return v = Object.assign || function(e) {
342
348
  for (var t, r = 1, n = arguments.length; r < n; r++) {
343
349
  t = arguments[r];
344
350
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
345
351
  }
346
352
  return e;
347
- }, _.apply(this, arguments);
348
- }, It = function(e, t) {
353
+ }, v.apply(this, arguments);
354
+ }, vt = function(e, t) {
349
355
  var r = {};
350
356
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
351
357
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
352
358
  for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
353
359
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
354
360
  return r;
355
- }, pe = le(function(e, t) {
356
- var r = e.icon, n = e.id, o = e.className, i = e.extend, s = It(e, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), l = tt("_".concat(Mt()));
357
- return ge(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, _({ ref: t, className: d }, s), i);
361
+ }, ge = he(function(e, t) {
362
+ var r = e.icon, n = e.id, o = e.className, i = e.extend, s = vt(e, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), a = nt("_".concat(It()));
363
+ return Ie(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, v({ ref: t, className: d }, s), i);
358
364
  });
359
- function ge(e, t, r, n, o) {
360
- return ue(e.tag, _(_({ key: t }, St(e, r, o)), n), (Ot(e, r).children || []).map(function(i, s) {
361
- return ge(i, "".concat(t, "-").concat(e.tag, "-").concat(s), r, void 0, o);
365
+ function Ie(e, t, r, n, o) {
366
+ return Ce(e.tag, v(v({ key: t }, pt(e, r, o)), n), (gt(e, r).children || []).map(function(i, s) {
367
+ return Ie(i, "".concat(t, "-").concat(e.tag, "-").concat(s), r, void 0, o);
362
368
  }));
363
369
  }
364
- function St(e, t, r) {
365
- var n = _({}, e.attrs);
370
+ function pt(e, t, r) {
371
+ var n = v({}, e.attrs);
366
372
  r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
367
373
  var o = t.defIds;
368
374
  return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
@@ -370,80 +376,80 @@ function St(e, t, r) {
370
376
  typeof d == "string" && (n[s] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
371
377
  })), n;
372
378
  }
373
- function Ot(e, t) {
379
+ function gt(e, t) {
374
380
  var r, n = t.defIds;
375
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? _(_({}, e), { children: e.children.map(function(o) {
376
- return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? _(_({}, o), { attrs: _(_({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
381
+ return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? v(v({}, e), { children: e.children.map(function(o) {
382
+ return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? v(v({}, o), { attrs: v(v({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
377
383
  }) }) : e;
378
384
  }
379
- function Mt() {
385
+ function It() {
380
386
  return Math.random().toString(36).substring(2, 8);
381
387
  }
382
- pe.displayName = "UniverIcon";
383
- var bt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ie = le(function(e, t) {
384
- return ue(pe, Object.assign({}, e, {
388
+ ge.displayName = "UniverIcon";
389
+ var St = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Se = he(function(e, t) {
390
+ return Ce(ge, Object.assign({}, e, {
385
391
  id: "comment-single",
386
392
  ref: t,
387
- icon: bt
393
+ icon: St
388
394
  }));
389
395
  });
390
- Ie.displayName = "CommentSingle";
391
- const xt = {
392
- [Ze.OTHERS]: {
393
- [k.id]: {
396
+ Se.displayName = "CommentSingle";
397
+ const Ot = {
398
+ [Ge.OTHERS]: {
399
+ [ee.id]: {
394
400
  order: 1,
395
- menuItemFactory: vt
401
+ menuItemFactory: ft
396
402
  }
397
403
  },
398
- [qe.MAIN_AREA]: {
404
+ [Ze.MAIN_AREA]: {
399
405
  [ze.DATA]: {
400
- [K.id]: {
406
+ [q.id]: {
401
407
  order: 1,
402
- menuItemFactory: Ct
408
+ menuItemFactory: ut
403
409
  }
404
410
  }
405
411
  }
406
412
  };
407
- var yt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, Tt = (e, t, r, n) => {
408
- for (var o = n > 1 ? void 0 : n ? Dt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
413
+ var Mt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, xt = (e, t, r, n) => {
414
+ for (var o = n > 1 ? void 0 : n ? bt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
409
415
  (s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
410
- return n && o && yt(t, r, o), o;
411
- }, J = (e, t) => (r, n) => t(r, n, e);
412
- let $ = class extends j {
416
+ return n && o && Mt(t, r, o), o;
417
+ }, Y = (e, t) => (r, n) => t(r, n, e);
418
+ let V = class extends B {
413
419
  constructor(e, t, r) {
414
420
  super(), this._commandService = e, this._menuManagerService = t, this._componentManager = r, this._initCommands(), this._initMenus(), this._initComponents();
415
421
  }
416
422
  _initCommands() {
417
423
  [
418
- Ce,
424
+ _e,
419
425
  ve,
420
- N,
421
- K,
422
- k
426
+ A,
427
+ q,
428
+ ee
423
429
  ].forEach((e) => {
424
430
  this.disposeWithMe(this._commandService.registerCommand(e));
425
431
  });
426
432
  }
427
433
  _initMenus() {
428
- this._menuManagerService.mergeMenu(xt);
434
+ this._menuManagerService.mergeMenu(Ot);
429
435
  }
430
436
  _initComponents() {
431
- [T].forEach((e) => {
437
+ [y].forEach((e) => {
432
438
  this.disposeWithMe(this._componentManager.register(e.componentKey, e));
433
- }), this.disposeWithMe(this._componentManager.register("CommentSingle", Ie));
439
+ }), this.disposeWithMe(this._componentManager.register("CommentSingle", Se));
434
440
  }
435
441
  };
436
- $ = Tt([
437
- J(0, M),
438
- J(1, Ye),
439
- J(2, p(Je))
440
- ], $);
441
- var Rt = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, Ut = (e, t, r, n) => {
442
- for (var o = n > 1 ? void 0 : n ? Pt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
442
+ V = xt([
443
+ Y(0, M),
444
+ Y(1, Qe),
445
+ Y(2, p(Ye))
446
+ ], V);
447
+ var Dt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, yt = (e, t, r, n) => {
448
+ for (var o = n > 1 ? void 0 : n ? Rt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
443
449
  (s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
444
- return n && o && Rt(t, r, o), o;
445
- }, y = (e, t) => (r, n) => t(r, n, e);
446
- let X = class extends j {
450
+ return n && o && Dt(t, r, o), o;
451
+ }, D = (e, t) => (r, n) => t(r, n, e);
452
+ let k = class extends B {
447
453
  constructor(e, t, r, n, o, i, s) {
448
454
  super(), this._context = e, this._docInterceptorService = t, this._threadCommentPanelService = r, this._docRenderController = n, this._univerInstanceService = o, this._threadCommentModel = i, this._commandService = s, this._interceptorViewModel(), this._initReRender(), this._initSyncComments();
449
455
  }
@@ -461,20 +467,20 @@ let X = class extends j {
461
467
  }));
462
468
  }
463
469
  _interceptorViewModel() {
464
- this._docInterceptorService.intercept(Ve.CUSTOM_DECORATION, {
470
+ this._docInterceptorService.intercept(je.CUSTOM_DECORATION, {
465
471
  handler: (e, t, r) => {
466
472
  if (!e)
467
473
  return r(e);
468
- const { unitId: n, index: o, customDecorations: i } = t, s = this._threadCommentPanelService.activeCommentId, { commentId: d, unitId: l } = s || {}, f = i.find((h) => h.id === d), c = this._threadCommentModel.getComment(n, I, e.id);
474
+ const { unitId: n, index: o, customDecorations: i } = t, s = this._threadCommentPanelService.activeCommentId, { commentId: d, unitId: a } = s || {}, u = i.find((_) => _.id === d), c = this._threadCommentModel.getComment(n, I, e.id);
469
475
  if (!c)
470
476
  return r({
471
477
  ...e,
472
478
  show: !1
473
479
  });
474
- const C = f && o >= f.startIndex && o <= f.endIndex, v = l === n && e.id === d;
480
+ const h = u && o >= u.startIndex && o <= u.endIndex, C = a === n && e.id === d;
475
481
  return r({
476
482
  ...e,
477
- active: v || C,
483
+ active: C || h,
478
484
  show: !c.resolved
479
485
  });
480
486
  }
@@ -482,80 +488,80 @@ let X = class extends j {
482
488
  }
483
489
  _initSyncComments() {
484
490
  var o, i, s;
485
- const e = this._context.unit.getUnitId(), t = I, r = (s = (i = (o = this._context.unit.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.filter((d) => d.type === Q.COMMENT).map((d) => d.id)) != null ? s : [];
491
+ const e = this._context.unit.getUnitId(), t = I, r = (s = (i = (o = this._context.unit.getBody()) == null ? void 0 : o.customDecorations) == null ? void 0 : i.filter((d) => d.type === X.COMMENT).map((d) => d.id)) != null ? s : [];
486
492
  r.forEach((d) => {
487
493
  this._threadCommentModel.getComment(e, t, d) || this._threadCommentModel.addComment(e, t, { id: d, threadId: d, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
488
494
  }), r.length && this._threadCommentModel.syncThreadComments(this._context.unit.getUnitId(), I, r);
489
495
  let n = r.sort();
490
496
  this.disposeWithMe(this._commandService.onCommandExecuted((d) => {
491
- var l, f, c;
492
- if (d.id === ie.id) {
497
+ var a, u, c;
498
+ if (d.id === ce.id) {
493
499
  if (d.params.unitId !== this._context.unit.getUnitId())
494
500
  return;
495
- const v = (c = (f = (l = this._context.unit.getBody()) == null ? void 0 : l.customDecorations) == null ? void 0 : f.filter((a) => a.type === Q.COMMENT).map((a) => a.id)) != null ? c : [], h = v.sort();
496
- if (JSON.stringify(n) !== JSON.stringify(h)) {
497
- const a = new Set(n), m = new Set(h), g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
498
- v.forEach((u) => {
499
- a.has(u) || g.add(u);
500
- }), n.forEach((u) => {
501
- m.has(u) || b.add(u);
502
- }), n = h, g.forEach((u) => {
503
- this._threadCommentModel.getComment(e, t, u) || this._threadCommentModel.addComment(e, t, { id: u, threadId: u, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
501
+ const C = (c = (u = (a = this._context.unit.getBody()) == null ? void 0 : a.customDecorations) == null ? void 0 : u.filter((m) => m.type === X.COMMENT).map((m) => m.id)) != null ? c : [], _ = C.sort();
502
+ if (JSON.stringify(n) !== JSON.stringify(_)) {
503
+ const m = new Set(n), l = new Set(_), g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
504
+ C.forEach((f) => {
505
+ m.has(f) || g.add(f);
506
+ }), n.forEach((f) => {
507
+ l.has(f) || b.add(f);
508
+ }), n = _, g.forEach((f) => {
509
+ this._threadCommentModel.getComment(e, t, f) || this._threadCommentModel.addComment(e, t, { id: f, threadId: f, ref: "", dT: "", personId: "", text: { dataStream: "" }, unitId: e, subUnitId: t });
504
510
  }), this._threadCommentModel.syncThreadComments(e, t, [...g]);
505
511
  }
506
512
  }
507
513
  }));
508
514
  }
509
515
  };
510
- X = Ut([
511
- y(1, p($e)),
512
- y(2, p(R)),
513
- y(3, p(He)),
514
- y(4, B),
515
- y(5, p(se)),
516
- y(6, M)
517
- ], X);
518
- var Se = Object.defineProperty, Et = Object.getOwnPropertyDescriptor, wt = (e, t, r) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Nt = (e, t, r, n) => {
519
- for (var o = n > 1 ? void 0 : n ? Et(t, r) : t, i = e.length - 1, s; i >= 0; i--)
516
+ k = yt([
517
+ D(1, p(Ve)),
518
+ D(2, p(T)),
519
+ D(3, p(We)),
520
+ D(4, F),
521
+ D(5, p(ae)),
522
+ D(6, M)
523
+ ], k);
524
+ var Oe = Object.defineProperty, Tt = Object.getOwnPropertyDescriptor, Pt = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ut = (e, t, r, n) => {
525
+ for (var o = n > 1 ? void 0 : n ? Tt(t, r) : t, i = e.length - 1, s; i >= 0; i--)
520
526
  (s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
521
- return n && o && Se(t, r, o), o;
522
- }, Y = (e, t) => (r, n) => t(r, n, e), Oe = (e, t, r) => wt(e, typeof t != "symbol" ? t + "" : t, r);
523
- let V = class extends Pe {
524
- constructor(e = ot, t, r, n) {
527
+ return n && o && Oe(t, r, o), o;
528
+ }, Q = (e, t) => (r, n) => t(r, n, e), Me = (e, t, r) => Pt(e, typeof t != "symbol" ? t + "" : t, r);
529
+ let j = class extends Ue {
530
+ constructor(e = it, t, r, n) {
525
531
  super(), this._config = e, this._injector = t, this._renderManagerSrv = r, this._configService = n;
526
532
  const { menu: o, ...i } = this._config;
527
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(rt, i);
533
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(ot, i);
528
534
  }
529
535
  onStarting() {
530
536
  [
537
+ [V],
531
538
  [$],
532
- [A],
533
- [D]
539
+ [R]
534
540
  ].forEach((e) => {
535
541
  this._injector.add(e);
536
542
  });
537
543
  }
538
544
  onRendered() {
539
- this._initRenderModule(), this._injector.get(A), this._injector.get($);
545
+ this._initRenderModule(), this._injector.get($), this._injector.get(V);
540
546
  }
541
547
  _initRenderModule() {
542
- [X].forEach((e) => {
548
+ [k].forEach((e) => {
543
549
  this._renderManagerSrv.registerRenderModule(S.UNIVER_DOC, e);
544
550
  });
545
551
  }
546
552
  };
547
- Oe(V, "pluginName", nt);
548
- Oe(V, "type", S.UNIVER_DOC);
549
- V = Nt([
550
- Re(we),
551
- Y(1, p(re)),
552
- Y(2, F),
553
- Y(3, Ue)
554
- ], V);
553
+ Me(j, "pluginName", rt);
554
+ Me(j, "type", S.UNIVER_DOC);
555
+ j = Ut([
556
+ Pe(Ne),
557
+ Q(1, p(se)),
558
+ Q(2, L),
559
+ Q(3, Ee)
560
+ ], j);
555
561
  export {
556
- Ce as AddDocCommentComment,
562
+ _e as AddDocCommentComment,
557
563
  ve as DeleteDocCommentComment,
558
- N as ShowCommentPanelOperation,
559
- K as StartAddCommentOperation,
560
- V as UniverDocsThreadCommentUIPlugin
564
+ A as ShowCommentPanelOperation,
565
+ q as StartAddCommentOperation,
566
+ j as UniverDocsThreadCommentUIPlugin
561
567
  };