@univerjs/docs-quick-insert-ui 0.10.12 → 0.10.13

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/index.js CHANGED
@@ -1,46 +1,46 @@
1
- var je = Object.defineProperty;
2
- var Ae = (t, e, r) => e in t ? je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var _ = (t, e, r) => Ae(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { CommandType as D, ICommandService as H, RANGE_DIRECTION as Be, LocaleService as le, generateRandomId as We, DisposableCollection as qe, toDisposable as Ze, Direction as W, Inject as f, IUniverInstanceService as he, Disposable as J, UniverInstanceType as K, DeleteDirection as Ve, DependentOn as Fe, Injector as Ge, IConfigService as ze, Plugin as Ye, merge as Je } from "@univerjs/core";
5
- import { DocSelectionManagerService as fe, DocSkeletonManagerService as Xe, RichTextEditingMutation as et } from "@univerjs/docs";
6
- import { CutContentCommand as tt, DocCanvasPopManagerService as ye, DocEventManagerService as Pe, OrderListCommand as nt, BulletListCommand as rt, HorizontalLineCommand as it, DocCreateTableOperation as ot, InsertCommand as st, IMEInputCommand as ct, DeleteCommand as at, MoveCursorOperation as dt, DeleteLeftCommand as ut } from "@univerjs/docs-ui";
7
- import { useDependency as I, KeyCode as M, ComponentManager as xe, IShortcutService as Oe, useObservable as T, ILayoutService as pt, useEvent as lt, UniverUIPlugin as ht } from "@univerjs/ui";
8
- import { IRenderManagerService as ve } from "@univerjs/engine-render";
9
- import { map as be, distinctUntilChanged as ft, tap as L, combineLatest as ge, BehaviorSubject as A, of as vt } from "rxjs";
10
- import { jsx as h, jsxs as _e } from "react/jsx-runtime";
11
- import { Menu as gt, clsx as se, scrollbarClassName as mt, MenuItemGroup as _t, MenuItem as Ct, Tooltip as It, borderClassName as St } from "@univerjs/design";
12
- import { useMemo as ce, useState as Ce, useRef as B, useEffect as j, forwardRef as X, createElement as ee } from "react";
13
- import { InsertDocImageCommand as yt, UniverDocsDrawingUIPlugin as Pt } from "@univerjs/docs-drawing-ui";
14
- import { UniverDocsDrawingPlugin as xt } from "@univerjs/docs-drawing";
15
- import { UniverDrawingPlugin as Ot } from "@univerjs/drawing";
16
- import { UniverDrawingUIPlugin as bt } from "@univerjs/drawing-ui";
17
- const Me = {
1
+ var Le = Object.defineProperty;
2
+ var Ae = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var C = (t, e, n) => Ae(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CommandType as k, ICommandService as Q, RANGE_DIRECTION as je, LocaleService as ue, generateRandomId as Be, DisposableCollection as We, toDisposable as qe, Direction as B, Inject as f, IUniverInstanceService as pe, Disposable as Y, UniverInstanceType as H, DeleteDirection as Ze, DependentOn as Ve, Injector as Fe, IConfigService as Ge, Plugin as ze, merge as Ye } from "@univerjs/core";
5
+ import { DocSelectionManagerService as le, DocSkeletonManagerService as Je, RichTextEditingMutation as Xe } from "@univerjs/docs";
6
+ import { CutContentCommand as et, DocCanvasPopManagerService as Se, DocEventManagerService as Pe, OrderListCommand as tt, BulletListCommand as nt, HorizontalLineCommand as it, DocCreateTableOperation as rt, InsertCommand as st, IMEInputCommand as ot, DeleteCommand as ct, MoveCursorOperation as at, DeleteLeftCommand as dt } from "@univerjs/docs-ui";
7
+ import { useDependency as _, KeyCode as O, ComponentManager as ye, IShortcutService as xe, useObservable as T, ILayoutService as ut, useEvent as pt, UniverUIPlugin as lt } from "@univerjs/ui";
8
+ import { IRenderManagerService as he } from "@univerjs/engine-render";
9
+ import { map as Me, distinctUntilChanged as ht, tap as K, combineLatest as fe, BehaviorSubject as A, of as ft } from "rxjs";
10
+ import { jsx as h, jsxs as ve } from "react/jsx-runtime";
11
+ import { Menu as gt, clsx as re, scrollbarClassName as mt, MenuItemGroup as vt, MenuItem as Ct, Tooltip as _t, borderClassName as It } from "@univerjs/design";
12
+ import { useMemo as se, useState as Ce, useRef as j, useEffect as L, createElement as J, forwardRef as ge } from "react";
13
+ import { InsertDocImageCommand as St, UniverDocsDrawingUIPlugin as Pt } from "@univerjs/docs-drawing-ui";
14
+ import { UniverDocsDrawingPlugin as yt } from "@univerjs/docs-drawing";
15
+ import { UniverDrawingPlugin as xt } from "@univerjs/drawing";
16
+ import { UniverDrawingUIPlugin as Mt } from "@univerjs/drawing-ui";
17
+ const Oe = {
18
18
  id: "doc.command.delete-search-key",
19
- type: D.COMMAND,
19
+ type: k.COMMAND,
20
20
  handler: (t, e) => {
21
- const r = t.get(H), { start: n, end: i } = e;
22
- return r.syncExecuteCommand(tt.id, {
21
+ const n = t.get(Q), { start: i, end: r } = e;
22
+ return n.syncExecuteCommand(et.id, {
23
23
  segmentId: "",
24
24
  textRanges: [{
25
- startOffset: n,
26
- endOffset: n,
25
+ startOffset: i,
26
+ endOffset: i,
27
27
  collapsed: !0
28
28
  }],
29
29
  selections: [{
30
- startOffset: n,
31
- endOffset: i,
30
+ startOffset: i,
31
+ endOffset: r,
32
32
  collapsed: !1,
33
- direction: Be.FORWARD
33
+ direction: je.FORWARD
34
34
  }]
35
35
  });
36
36
  }
37
- }, Mt = "docs.quick.insert.keyword-input-placeholder", q = () => {
38
- const t = I(le);
37
+ }, Ot = "docs.quick.insert.keyword-input-placeholder", W = () => {
38
+ const t = _(ue);
39
39
  return /* @__PURE__ */ h("div", { className: "univer-translate-y-1.5 univer-text-sm univer-text-gray-500", children: t.t("docQuickInsert.keywordInputPlaceholder") });
40
40
  };
41
- q.componentKey = Mt;
42
- const wt = "docs.quick.insert.placeholder", Z = () => {
43
- const t = I(le);
41
+ W.componentKey = Ot;
42
+ const bt = "docs.quick.insert.placeholder", q = () => {
43
+ const t = _(ue);
44
44
  return /* @__PURE__ */ h(
45
45
  "div",
46
46
  {
@@ -49,220 +49,220 @@ const wt = "docs.quick.insert.placeholder", Z = () => {
49
49
  }
50
50
  );
51
51
  };
52
- Z.componentKey = wt;
53
- function ae(t, e) {
54
- return t.map((r) => ({ ...r })).filter((r) => {
55
- if ("children" in r)
56
- return r.children = ae(r.children, e), r.children.length > 0;
57
- const n = r.keywords;
58
- return n ? n.some((i) => i.includes(e)) : r.title.toLowerCase().includes(e);
52
+ q.componentKey = bt;
53
+ function oe(t, e) {
54
+ return t.map((n) => ({ ...n })).filter((n) => {
55
+ if ("children" in n)
56
+ return n.children = oe(n.children, e), n.children.length > 0;
57
+ const i = n.keywords;
58
+ return i ? i.some((r) => r.includes(e)) : n.title.toLowerCase().includes(e);
59
59
  });
60
60
  }
61
- function we(t, e) {
62
- return t.map((r) => {
63
- const n = { ...r };
64
- return "children" in n && (n.children = we(n.children, e)), n.title = e.t(n.title), "keywords" in n && (n.keywords = n.keywords.concat(n.title).map((i) => i.toLowerCase())), n;
61
+ function be(t, e) {
62
+ return t.map((n) => {
63
+ const i = { ...n };
64
+ return "children" in i && (i.children = be(i.children, e)), i.title = e.t(i.title), "keywords" in i && (i.keywords = i.keywords.concat(i.title).map((r) => r.toLowerCase())), i;
65
65
  });
66
66
  }
67
- const kt = [M.ARROW_UP, M.ARROW_DOWN, M.ENTER], V = () => {
68
- const t = I(le), e = I(S), r = I(xe), n = I(Oe), i = I(H), o = ce(() => We(), []), [c, u] = Ce(0), s = B(null), a = B(0);
67
+ const wt = [O.ARROW_UP, O.ARROW_DOWN, O.ENTER], Z = () => {
68
+ const t = _(ue), e = _(I), n = _(ye), i = _(xe), r = _(Q), s = se(() => Be(), []), [c, l] = Ce(0), o = j(null), a = j(0);
69
69
  a.current = 0;
70
- const d = T(e.filterKeyword$, ""), p = T(e.editPopup$), v = T(p == null ? void 0 : p.popup.menus$, []), y = ce(() => we(v, t), [v]), [w, P] = Ce(() => ae(y, d.toLowerCase()));
71
- j(() => {
72
- const g = requestIdleCallback(() => {
73
- P(ae(y, d.toLowerCase()));
70
+ const d = T(e.filterKeyword$, ""), u = T(e.editPopup$), g = T(u == null ? void 0 : u.popup.menus$, []), S = se(() => be(g, t), [g]), [b, P] = Ce(() => oe(S, d.toLowerCase()));
71
+ L(() => {
72
+ const m = requestIdleCallback(() => {
73
+ P(oe(S, d.toLowerCase()));
74
74
  });
75
75
  return () => {
76
- cancelIdleCallback(g);
76
+ cancelIdleCallback(m);
77
77
  };
78
- }, [y, d]);
79
- const x = (g) => {
80
- e.emitMenuSelected(g), i.executeCommand(Q.id);
78
+ }, [S, d]);
79
+ const y = (m) => {
80
+ e.emitMenuSelected(m), r.executeCommand(U.id);
81
81
  };
82
- j(() => {
83
- const g = new qe();
84
- n.getAllShortcuts().filter((l) => l.binding && kt.includes(l.binding)).forEach((l) => {
85
- const b = l.preconditions;
86
- l.preconditions = () => !1, g.add(Ze(() => {
87
- l.preconditions = b;
82
+ L(() => {
83
+ const m = new We();
84
+ i.getAllShortcuts().filter((p) => p.binding && wt.includes(p.binding)).forEach((p) => {
85
+ const M = p.preconditions;
86
+ p.preconditions = () => !1, m.add(qe(() => {
87
+ p.preconditions = M;
88
88
  }));
89
89
  });
90
- const O = {
91
- id: `quick.insert.popup.enter.${o}`,
92
- type: D.OPERATION,
90
+ const x = {
91
+ id: `quick.insert.popup.enter.${s}`,
92
+ type: k.OPERATION,
93
93
  handler: () => {
94
- const l = s.current;
95
- l && x(l);
94
+ const p = o.current;
95
+ p && y(p);
96
96
  }
97
- }, N = {
98
- id: `quick.insert.popup.move.cursor.up.${o}`,
99
- type: D.OPERATION,
97
+ }, D = {
98
+ id: `quick.insert.popup.move.cursor.up.${s}`,
99
+ type: k.OPERATION,
100
100
  handler: () => {
101
- u((l) => {
102
- const b = l - 1;
103
- return b >= 0 ? b : a.current - 1;
101
+ l((p) => {
102
+ const M = p - 1;
103
+ return M >= 0 ? M : a.current - 1;
104
104
  });
105
105
  }
106
106
  }, R = {
107
- id: `quick.insert.popup.move.cursor.down.${o}`,
108
- type: D.OPERATION,
107
+ id: `quick.insert.popup.move.cursor.down.${s}`,
108
+ type: k.OPERATION,
109
109
  handler: () => {
110
- u((l) => {
111
- const b = l + 1;
112
- return b <= a.current - 1 ? b : 0;
110
+ l((p) => {
111
+ const M = p + 1;
112
+ return M <= a.current - 1 ? M : 0;
113
113
  });
114
114
  }
115
115
  };
116
- return g.add(i.registerCommand(N)), g.add(i.registerCommand(R)), g.add(i.registerCommand(O)), g.add(n.registerShortcut({
116
+ return m.add(r.registerCommand(D)), m.add(r.registerCommand(R)), m.add(r.registerCommand(x)), m.add(i.registerShortcut({
117
117
  priority: 1e3,
118
- id: N.id,
119
- binding: M.ARROW_UP,
118
+ id: D.id,
119
+ binding: O.ARROW_UP,
120
120
  preconditions: () => !0,
121
121
  staticParameters: {
122
- direction: W.UP
122
+ direction: B.UP
123
123
  }
124
- })), g.add(n.registerShortcut({
124
+ })), m.add(i.registerShortcut({
125
125
  priority: 1e3,
126
126
  id: R.id,
127
- binding: M.ARROW_DOWN,
127
+ binding: O.ARROW_DOWN,
128
128
  preconditions: () => !0,
129
129
  staticParameters: {
130
- direction: W.DOWN
130
+ direction: B.DOWN
131
131
  }
132
- })), g.add(n.registerShortcut({
132
+ })), m.add(i.registerShortcut({
133
133
  priority: 1e3,
134
- id: O.id,
135
- binding: M.ENTER,
134
+ id: x.id,
135
+ binding: O.ENTER,
136
136
  preconditions: () => !0
137
137
  })), () => {
138
- g.dispose();
138
+ m.dispose();
139
139
  };
140
- }, []), j(() => {
141
- u(0);
142
- }, [w]);
143
- const k = B(/* @__PURE__ */ new Map());
144
- j(() => () => {
145
- k.current.clear();
140
+ }, []), L(() => {
141
+ l(0);
142
+ }, [b]);
143
+ const w = j(/* @__PURE__ */ new Map());
144
+ L(() => () => {
145
+ w.current.clear();
146
146
  }, []);
147
- function $(g) {
148
- return g.map((m) => {
149
- const ne = m.icon, O = ne ? r.get(ne) : null;
150
- if ("children" in m)
147
+ function $(m) {
148
+ return m.map((v) => {
149
+ const ee = v.icon, x = ee ? n.get(ee) : null;
150
+ if ("children" in v)
151
151
  return /* @__PURE__ */ h(
152
- _t,
152
+ vt,
153
153
  {
154
- title: /* @__PURE__ */ _e(
154
+ title: /* @__PURE__ */ ve(
155
155
  "div",
156
156
  {
157
157
  className: "univer-mb-2 univer-flex univer-items-center univer-text-xs univer-text-gray-400",
158
158
  children: [
159
- O && /* @__PURE__ */ h("span", { className: "univer-mr-2 univer-inline-flex univer-text-base", children: /* @__PURE__ */ h(O, {}) }),
160
- /* @__PURE__ */ h("span", { children: m.title })
159
+ x && /* @__PURE__ */ h("span", { className: "univer-mr-2 univer-inline-flex univer-text-base", children: /* @__PURE__ */ h(x, {}) }),
160
+ /* @__PURE__ */ h("span", { children: v.title })
161
161
  ]
162
162
  }
163
163
  ),
164
- children: $(m.children)
164
+ children: $(v.children)
165
165
  },
166
- m.id
166
+ v.id
167
167
  );
168
- const N = a.current, R = c === N;
168
+ const D = a.current, R = c === D;
169
169
  if (R) {
170
- s.current = m;
171
- const l = k.current.get(m.id);
172
- l == null || l.scrollIntoView({
170
+ o.current = v;
171
+ const p = w.current.get(v.id);
172
+ p == null || p.scrollIntoView({
173
173
  block: "nearest"
174
174
  });
175
175
  }
176
176
  return a.current++, /* @__PURE__ */ h(
177
177
  Ct,
178
178
  {
179
- ref: (l) => {
180
- l && k.current.set(m.id, l);
179
+ ref: (p) => {
180
+ p && w.current.set(v.id, p);
181
181
  },
182
- onMouseEnter: () => u(N),
183
- onMouseLeave: () => u(Number.NaN),
184
- className: se("univer-w-[calc(220px-var(--padding-base)*2)] univer-text-sm", {
182
+ onMouseEnter: () => l(D),
183
+ onMouseLeave: () => l(Number.NaN),
184
+ className: re("univer-w-[calc(220px-var(--padding-base)*2)] univer-text-sm", {
185
185
  "hover:univer-bg-transparent": !R,
186
186
  "univer-bg-gray-100 dark:!univer-bg-gray-500": R
187
187
  }),
188
188
  onClick: () => {
189
- x(m);
189
+ y(v);
190
190
  },
191
- children: /* @__PURE__ */ _e(
191
+ children: /* @__PURE__ */ ve(
192
192
  "div",
193
193
  {
194
194
  className: "univer-flex univer-w-full univer-items-center univer-px-1",
195
195
  children: [
196
- O && /* @__PURE__ */ h("span", { className: "univer-mr-2 univer-inline-flex univer-text-base", children: /* @__PURE__ */ h(O, {}) }),
197
- /* @__PURE__ */ h(It, { showIfEllipsis: !0, title: m.title, placement: "right", children: /* @__PURE__ */ h("span", { className: "univer-truncate", children: m.title }) })
196
+ x && /* @__PURE__ */ h("span", { className: "univer-mr-2 univer-inline-flex univer-text-base", children: /* @__PURE__ */ h(x, {}) }),
197
+ /* @__PURE__ */ h(_t, { showIfEllipsis: !0, title: v.title, placement: "right", children: /* @__PURE__ */ h("span", { className: "univer-truncate", children: v.title }) })
198
198
  ]
199
199
  }
200
200
  )
201
201
  },
202
- m.id
202
+ v.id
203
203
  );
204
204
  });
205
205
  }
206
- const Le = w.length > 0, me = (p == null ? void 0 : p.popup.Placeholder) || r.get(Z.componentKey);
207
- return /* @__PURE__ */ h("div", { className: "univer-mt-2", children: Le ? /* @__PURE__ */ h(
206
+ const Ke = b.length > 0, me = (u == null ? void 0 : u.popup.Placeholder) || n.get(q.componentKey);
207
+ return /* @__PURE__ */ h("div", { className: "univer-mt-2", children: Ke ? /* @__PURE__ */ h(
208
208
  gt,
209
209
  {
210
- wrapperClass: se("univer-max-h-[360px] univer-w-[220px] univer-overflow-y-auto univer-overflow-x-hidden", mt),
211
- children: $(w)
210
+ wrapperClass: re("univer-max-h-[360px] univer-w-[220px] univer-overflow-y-auto univer-overflow-x-hidden", mt),
211
+ children: $(b)
212
212
  }
213
213
  ) : me && /* @__PURE__ */ h(me, {}) });
214
214
  };
215
- V.componentKey = "docs.quick.insert.popup";
216
- var Rt = Object.getOwnPropertyDescriptor, Dt = (t, e, r, n) => {
217
- for (var i = n > 1 ? void 0 : n ? Rt(e, r) : e, o = t.length - 1, c; o >= 0; o--)
218
- (c = t[o]) && (i = c(i) || i);
219
- return i;
220
- }, E = (t, e) => (r, n) => e(r, n, t);
221
- const Ie = {
215
+ Z.componentKey = "docs.quick.insert.popup";
216
+ var Rt = Object.getOwnPropertyDescriptor, kt = (t, e, n, i) => {
217
+ for (var r = i > 1 ? void 0 : i ? Rt(e, n) : e, s = t.length - 1, c; s >= 0; s--)
218
+ (c = t[s]) && (r = c(r) || r);
219
+ return r;
220
+ }, N = (t, e) => (n, i) => e(n, i, t);
221
+ const _e = {
222
222
  dispose: () => {
223
223
  }
224
224
  };
225
- let S = class extends J {
226
- constructor(e, r, n, i, o) {
225
+ let I = class extends Y {
226
+ constructor(e, n, i, r, s) {
227
227
  super();
228
- _(this, "_popups", /* @__PURE__ */ new Set());
229
- _(this, "_editPopup$", new A(void 0));
230
- _(this, "editPopup$", this._editPopup$.asObservable());
231
- _(this, "_isComposing$", new A(!1));
232
- _(this, "isComposing$", this._isComposing$.asObservable());
233
- _(this, "_inputOffset$", new A({ start: 0, end: 0 }));
234
- _(this, "inputOffset$", this._inputOffset$.asObservable());
235
- _(this, "filterKeyword$");
236
- _(this, "_menuSelectedCallbacks", /* @__PURE__ */ new Set());
237
- _(this, "_inputPlaceholderRenderRoot", null);
238
- this._docCanvasPopupManagerService = e, this._univerInstanceService = r, this._commandService = n, this._renderManagerService = i, this._docSelectionManagerService = o, this.disposeWithMe(this._editPopup$);
239
- const c = (s, a) => {
240
- var d, p;
241
- return (p = (d = this._univerInstanceService.getCurrentUnitOfType(K.UNIVER_DOC)) == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(s, a);
228
+ C(this, "_popups", /* @__PURE__ */ new Set());
229
+ C(this, "_editPopup$", new A(void 0));
230
+ C(this, "editPopup$", this._editPopup$.asObservable());
231
+ C(this, "_isComposing$", new A(!1));
232
+ C(this, "isComposing$", this._isComposing$.asObservable());
233
+ C(this, "_inputOffset$", new A({ start: 0, end: 0 }));
234
+ C(this, "inputOffset$", this._inputOffset$.asObservable());
235
+ C(this, "filterKeyword$");
236
+ C(this, "_menuSelectedCallbacks", /* @__PURE__ */ new Set());
237
+ C(this, "_inputPlaceholderRenderRoot", null);
238
+ this._docCanvasPopupManagerService = e, this._univerInstanceService = n, this._commandService = i, this._renderManagerService = r, this._docSelectionManagerService = s, this.disposeWithMe(this._editPopup$);
239
+ const c = (o, a) => {
240
+ var d, u;
241
+ return (u = (d = this._univerInstanceService.getCurrentUnitOfType(H.UNIVER_DOC)) == null ? void 0 : d.getBody()) == null ? void 0 : u.dataStream.slice(o, a);
242
242
  };
243
- let u = "";
243
+ let l = "";
244
244
  this.filterKeyword$ = this._inputOffset$.pipe(
245
- be((s) => {
245
+ Me((o) => {
246
246
  var d;
247
- const a = c(s.start, s.end);
247
+ const a = c(o.start, o.end);
248
248
  return (d = a == null ? void 0 : a.slice(1)) != null ? d : "";
249
249
  }),
250
- ft(),
251
- L((s) => {
252
- u = s;
250
+ ht(),
251
+ K((o) => {
252
+ l = o;
253
253
  })
254
- ), this.disposeWithMe(ge([
255
- this.filterKeyword$.pipe(L((s) => {
256
- var a, d, p;
257
- s.length > 0 ? (d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose() : (p = this._inputPlaceholderRenderRoot) == null || p.mount();
254
+ ), this.disposeWithMe(fe([
255
+ this.filterKeyword$.pipe(K((o) => {
256
+ var a, d, u;
257
+ o.length > 0 ? (d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose() : (u = this._inputPlaceholderRenderRoot) == null || u.mount();
258
258
  })),
259
- this.isComposing$.pipe(L((s) => {
260
- var a, d, p;
261
- s ? (d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose() : u.length <= 0 && ((p = this._inputPlaceholderRenderRoot) == null || p.mount());
259
+ this.isComposing$.pipe(K((o) => {
260
+ var a, d, u;
261
+ o ? (d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose() : l.length <= 0 && ((u = this._inputPlaceholderRenderRoot) == null || u.mount());
262
262
  })),
263
- this.editPopup$.pipe(L((s) => {
263
+ this.editPopup$.pipe(K((o) => {
264
264
  var a, d;
265
- s || ((d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose(), this._inputPlaceholderRenderRoot = null);
265
+ o || ((d = (a = this._inputPlaceholderRenderRoot) == null ? void 0 : a.unmount) == null || d.dispose(), this._inputPlaceholderRenderRoot = null);
266
266
  }))
267
267
  ]).subscribe());
268
268
  }
@@ -285,11 +285,11 @@ let S = class extends J {
285
285
  this._inputOffset$.next(e);
286
286
  }
287
287
  getDocEventManagerService(e) {
288
- var r;
289
- return (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.with(Pe);
288
+ var n;
289
+ return (n = this._renderManagerService.getRenderById(e)) == null ? void 0 : n.with(Pe);
290
290
  }
291
291
  resolvePopup(e) {
292
- return Array.from(this._popups).find((r) => r.keyword === e);
292
+ return Array.from(this._popups).find((n) => n.keyword === e);
293
293
  }
294
294
  registerPopup(e) {
295
295
  return this._popups.add(e), () => {
@@ -303,58 +303,58 @@ let S = class extends J {
303
303
  if (this.isMounted)
304
304
  return;
305
305
  this.isMounted = !0;
306
- const n = e();
306
+ const i = e();
307
307
  this.unmount = {
308
308
  dispose: () => {
309
- n.dispose(), this.isMounted = !1;
309
+ i.dispose(), this.isMounted = !1;
310
310
  }
311
311
  };
312
312
  }
313
313
  };
314
314
  }
315
315
  showPopup(e) {
316
- var d, p;
317
- const { popup: r, index: n, unitId: i } = e;
316
+ var d, u;
317
+ const { popup: n, index: i, unitId: r } = e;
318
318
  this.closePopup();
319
- const o = this._univerInstanceService.getUnit(i), c = (p = (d = o == null ? void 0 : o.getBody()) == null ? void 0 : d.paragraphs) == null ? void 0 : p.find((v) => v.startIndex > n);
319
+ const s = this._univerInstanceService.getUnit(r), c = (u = (d = s == null ? void 0 : s.getBody()) == null ? void 0 : d.paragraphs) == null ? void 0 : u.find((g) => g.startIndex > i);
320
320
  if (!c)
321
321
  return;
322
- const u = this.getDocEventManagerService(i), s = u == null ? void 0 : u.findParagraphBoundByIndex(c.startIndex);
323
- if (!s)
322
+ const l = this.getDocEventManagerService(r), o = l == null ? void 0 : l.findParagraphBoundByIndex(c.startIndex);
323
+ if (!o)
324
324
  return;
325
325
  this._inputPlaceholderRenderRoot = this._createInputPlaceholderRenderRoot(() => {
326
326
  var $;
327
- const v = ($ = this._renderManagerService.getRenderById(i)) == null ? void 0 : $.with(Xe), y = this._docSelectionManagerService.getActiveTextRange();
328
- if (!v || !y)
329
- return Ie;
330
- const P = v.getSkeleton().findNodeByCharIndex(y.startOffset, y.segmentId, y.segmentPage);
327
+ const g = ($ = this._renderManagerService.getRenderById(r)) == null ? void 0 : $.with(Je), S = this._docSelectionManagerService.getActiveTextRange();
328
+ if (!g || !S)
329
+ return _e;
330
+ const P = g.getSkeleton().findNodeByCharIndex(S.startOffset, S.segmentId, S.segmentPage);
331
331
  if (!((P == null ? void 0 : P.content) === "\r"))
332
- return Ie;
333
- const k = this._docCanvasPopupManagerService.attachPopupToRange(
334
- { startOffset: n + 1, endOffset: n + 1, collapsed: !1 },
332
+ return _e;
333
+ const w = this._docCanvasPopupManagerService.attachPopupToRange(
334
+ { startOffset: i + 1, endOffset: i + 1, collapsed: !1 },
335
335
  {
336
- componentKey: q.componentKey,
336
+ componentKey: W.componentKey,
337
337
  onClickOutside: () => {
338
- k.dispose();
338
+ w.dispose();
339
339
  },
340
340
  direction: "horizontal"
341
341
  },
342
- i
342
+ r
343
343
  );
344
- return k;
344
+ return w;
345
345
  }), this._inputPlaceholderRenderRoot.mount();
346
346
  const a = this._docCanvasPopupManagerService.attachPopupToRect(
347
- s.firstLine,
347
+ o.firstLine,
348
348
  {
349
- componentKey: V.componentKey,
349
+ componentKey: Z.componentKey,
350
350
  onClickOutside: () => {
351
351
  this.closePopup();
352
352
  },
353
353
  direction: "bottom"
354
354
  },
355
- i
355
+ r
356
356
  );
357
- this._editPopup$.next({ disposable: a, popup: r, anchor: n, unitId: i });
357
+ this._editPopup$.next({ disposable: a, popup: n, anchor: i, unitId: r });
358
358
  }
359
359
  closePopup() {
360
360
  this.editPopup && (this.editPopup.disposable.dispose(), this._editPopup$.next(null));
@@ -365,62 +365,62 @@ let S = class extends J {
365
365
  };
366
366
  }
367
367
  emitMenuSelected(e) {
368
- const { start: r, end: n } = this.inputOffset;
369
- this._commandService.syncExecuteCommand(Me.id, {
370
- start: r,
371
- end: n
368
+ const { start: n, end: i } = this.inputOffset;
369
+ this._commandService.syncExecuteCommand(Oe.id, {
370
+ start: n,
371
+ end: i
372
372
  }), setTimeout(() => {
373
- this._menuSelectedCallbacks.forEach((i) => i(e));
373
+ this._menuSelectedCallbacks.forEach((r) => r(e));
374
374
  }, 0);
375
375
  }
376
376
  };
377
- S = Dt([
378
- E(0, f(ye)),
379
- E(1, f(he)),
380
- E(2, f(H)),
381
- E(3, f(ve)),
382
- E(4, f(fe))
383
- ], S);
384
- const ke = {
385
- type: D.OPERATION,
377
+ I = kt([
378
+ N(0, f(Se)),
379
+ N(1, f(pe)),
380
+ N(2, f(Q)),
381
+ N(3, f(he)),
382
+ N(4, f(le))
383
+ ], I);
384
+ const we = {
385
+ type: k.OPERATION,
386
386
  id: "doc.operation.show-quick-insert-popup",
387
387
  handler(t, e) {
388
- const r = t.get(S);
389
- return e ? (r.showPopup(e), !0) : !1;
388
+ const n = t.get(I);
389
+ return e ? (n.showPopup(e), !0) : !1;
390
390
  }
391
- }, Q = {
392
- type: D.OPERATION,
391
+ }, U = {
392
+ type: k.OPERATION,
393
393
  id: "doc.operation.close-quick-insert-popup",
394
394
  handler(t) {
395
- return t.get(S).closePopup(), !0;
395
+ return t.get(I).closePopup(), !0;
396
396
  }
397
397
  }, Re = {
398
398
  id: "quick-insert.text.menu",
399
399
  title: "docQuickInsert.menu.text",
400
400
  icon: "TextIcon",
401
401
  keywords: ["text"]
402
- }, De = {
403
- id: nt.id,
402
+ }, ke = {
403
+ id: tt.id,
404
404
  title: "docQuickInsert.menu.numberedList",
405
405
  icon: "OrderIcon",
406
406
  keywords: ["numbered", "list", "ordered"]
407
407
  }, $e = {
408
- id: rt.id,
408
+ id: nt.id,
409
409
  title: "docQuickInsert.menu.bulletedList",
410
410
  icon: "UnorderIcon",
411
411
  keywords: ["bulleted", "list", "unordered"]
412
- }, Ne = {
412
+ }, De = {
413
413
  id: it.id,
414
414
  title: "docQuickInsert.menu.divider",
415
415
  icon: "DividerIcon",
416
416
  keywords: ["divider", "line", "separate"]
417
- }, Ee = {
418
- id: ot.id,
417
+ }, Ne = {
418
+ id: rt.id,
419
419
  title: "docQuickInsert.menu.table",
420
420
  icon: "GridIcon",
421
421
  keywords: ["table", "grid", "spreadsheet"]
422
- }, Ue = {
423
- id: yt.id,
422
+ }, Ee = {
423
+ id: St.id,
424
424
  title: "docQuickInsert.menu.image",
425
425
  icon: "AdditionAndSubtractionIcon",
426
426
  keywords: ["image", "picture", "photo"]
@@ -430,30 +430,30 @@ const ke = {
430
430
  id: "quick.insert.group.basic",
431
431
  children: [
432
432
  Re,
433
- De,
433
+ ke,
434
434
  $e,
435
+ De,
435
436
  Ne,
436
- Ee,
437
- Ue
437
+ Ee
438
438
  ]
439
439
  }
440
- ], Nt = /* @__PURE__ */ new Set([
441
- De.id,
440
+ ], Dt = /* @__PURE__ */ new Set([
441
+ ke.id,
442
442
  $e.id,
443
+ De.id,
443
444
  Ne.id,
444
- Ee.id,
445
- Ue.id
445
+ Ee.id
446
446
  ]);
447
- var Et = Object.getOwnPropertyDescriptor, Ut = (t, e, r, n) => {
448
- for (var i = n > 1 ? void 0 : n ? Et(e, r) : e, o = t.length - 1, c; o >= 0; o--)
449
- (c = t[o]) && (i = c(i) || i);
450
- return i;
451
- }, U = (t, e) => (r, n) => e(r, n, t);
452
- let F = class extends J {
453
- constructor(t, e, r, n, i) {
454
- super(), this._commandService = t, this._textSelectionManagerService = e, this._docQuickInsertPopupService = r, this._shortcutService = n, this._univerInstanceService = i, this.disposeWithMe(this._shortcutService.registerShortcut({
455
- id: Q.id,
456
- binding: M.ESC,
447
+ var Nt = Object.getOwnPropertyDescriptor, Et = (t, e, n, i) => {
448
+ for (var r = i > 1 ? void 0 : i ? Nt(e, n) : e, s = t.length - 1, c; s >= 0; s--)
449
+ (c = t[s]) && (r = c(r) || r);
450
+ return r;
451
+ }, E = (t, e) => (n, i) => e(n, i, t);
452
+ let V = class extends Y {
453
+ constructor(t, e, n, i, r) {
454
+ super(), this._commandService = t, this._textSelectionManagerService = e, this._docQuickInsertPopupService = n, this._shortcutService = i, this._univerInstanceService = r, this.disposeWithMe(this._shortcutService.registerShortcut({
455
+ id: U.id,
456
+ binding: O.ESC,
457
457
  preconditions: () => !!this._docQuickInsertPopupService.editPopup,
458
458
  priority: 1e3
459
459
  })), this._initTrigger(), this._initMenuHandler();
@@ -463,59 +463,59 @@ let F = class extends J {
463
463
  this.disposeWithMe(
464
464
  // eslint-disable-next-line complexity, max-lines-per-function
465
465
  this._commandService.onCommandExecuted((t) => {
466
- var o, c, u;
467
- const { _docQuickInsertPopupService: e, _textSelectionManagerService: r, _commandService: n } = this, i = this._univerInstanceService.getCurrentUnitOfType(K.UNIVER_DOC);
468
- if (!(i != null && i.getDisabled())) {
466
+ var s, c, l;
467
+ const { _docQuickInsertPopupService: e, _textSelectionManagerService: n, _commandService: i } = this, r = this._univerInstanceService.getCurrentUnitOfType(H.UNIVER_DOC);
468
+ if (!(r != null && r.getDisabled())) {
469
469
  if (t.id === st.id) {
470
- const s = t.params;
470
+ const o = t.params;
471
471
  if (e.editPopup) {
472
472
  e.setInputOffset({
473
473
  start: e.inputOffset.start,
474
- end: s.range.endOffset + 1
474
+ end: o.range.endOffset + 1
475
475
  });
476
476
  return;
477
477
  }
478
- const a = r.getActiveTextRange();
478
+ const a = n.getActiveTextRange();
479
479
  if (!a)
480
480
  return;
481
- const d = e.resolvePopup(s.body.dataStream);
482
- if (!d || !(d.preconditions ? d.preconditions(s) : !0))
481
+ const d = e.resolvePopup(o.body.dataStream);
482
+ if (!d || !(d.preconditions ? d.preconditions(o) : !0))
483
483
  return;
484
484
  e.setInputOffset({ start: a.startOffset - 1, end: a.startOffset }), setTimeout(() => {
485
- n.executeCommand(ke.id, {
485
+ i.executeCommand(we.id, {
486
486
  index: a.startOffset - 1,
487
- unitId: s.unitId,
487
+ unitId: o.unitId,
488
488
  popup: d
489
489
  });
490
490
  }, 100);
491
491
  }
492
- if (t.id === ct.id) {
493
- const s = t.params;
494
- !e.isComposing && s.isCompositionStart && e.setIsComposing(!0), e.isComposing && s.isCompositionEnd && e.setIsComposing(!1);
492
+ if (t.id === ot.id) {
493
+ const o = t.params;
494
+ !e.isComposing && o.isCompositionStart && e.setIsComposing(!0), e.isComposing && o.isCompositionEnd && e.setIsComposing(!1);
495
495
  }
496
- if (t.id === et.id) {
497
- const s = t.params;
498
- if (s.isCompositionEnd) {
499
- const a = (c = (o = s.textRanges) == null ? void 0 : o[0]) == null ? void 0 : c.endOffset;
496
+ if (t.id === Xe.id) {
497
+ const o = t.params;
498
+ if (o.isCompositionEnd) {
499
+ const a = (c = (s = o.textRanges) == null ? void 0 : s[0]) == null ? void 0 : c.endOffset;
500
500
  a && e.setInputOffset({ start: e.inputOffset.start, end: a });
501
501
  }
502
502
  }
503
- if (t.id === at.id) {
504
- const s = t.params;
505
- if (e.editPopup && s.direction === Ve.LEFT) {
506
- const a = (u = s.len) != null ? u : 0;
507
- e.setInputOffset({ start: e.inputOffset.start, end: s.range.endOffset - a });
503
+ if (t.id === ct.id) {
504
+ const o = t.params;
505
+ if (e.editPopup && o.direction === Ze.LEFT) {
506
+ const a = (l = o.len) != null ? l : 0;
507
+ e.setInputOffset({ start: e.inputOffset.start, end: o.range.endOffset - a });
508
508
  }
509
509
  }
510
- if (t.id === dt.id) {
511
- const s = t.params;
512
- (s.direction === W.LEFT || s.direction === W.RIGHT) && e.editPopup && n.executeCommand(Q.id);
510
+ if (t.id === at.id) {
511
+ const o = t.params;
512
+ (o.direction === B.LEFT || o.direction === B.RIGHT) && e.editPopup && i.executeCommand(U.id);
513
513
  }
514
- if (t.id === ut.id) {
515
- const s = r.getActiveTextRange();
516
- if (!e.editPopup || !s)
514
+ if (t.id === dt.id) {
515
+ const o = n.getActiveTextRange();
516
+ if (!e.editPopup || !o)
517
517
  return;
518
- s.endOffset <= e.editPopup.anchor && n.executeCommand(Q.id);
518
+ o.endOffset <= e.editPopup.anchor && i.executeCommand(U.id);
519
519
  }
520
520
  }
521
521
  })
@@ -523,120 +523,249 @@ let F = class extends J {
523
523
  }
524
524
  _initMenuHandler() {
525
525
  this.disposeWithMe(this._docQuickInsertPopupService.onMenuSelected((t) => {
526
- t.id !== Re.id && Nt.has(t.id) && this._commandService.executeCommand(t.id);
526
+ t.id !== Re.id && Dt.has(t.id) && this._commandService.executeCommand(t.id);
527
527
  }));
528
528
  }
529
529
  };
530
- F = Ut([
531
- U(0, H),
532
- U(1, f(fe)),
533
- U(2, f(S)),
534
- U(3, f(Oe)),
535
- U(4, f(he))
536
- ], F);
537
- var C = function() {
538
- return C = Object.assign || function(t) {
539
- for (var e, r = 1, n = arguments.length; r < n; r++) {
540
- e = arguments[r];
541
- for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
542
- }
543
- return t;
544
- }, C.apply(this, arguments);
545
- }, Tt = function(t, e) {
546
- var r = {};
547
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
548
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
549
- for (var i = 0, n = Object.getOwnPropertySymbols(t); i < n.length; i++)
550
- e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[i]) && (r[n[i]] = t[n[i]]);
551
- return r;
552
- }, te = X(function(t, e) {
553
- var r = t.icon, n = t.id, i = t.className, o = t.extend, c = Tt(t, ["icon", "id", "className", "extend"]), u = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = B("_".concat(Kt()));
554
- return Te(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, C({ ref: e, className: u }, c), o);
555
- });
556
- function Te(t, e, r, n, i) {
557
- return ee(t.tag, C(C({ key: e }, Qt(t, r, i)), n), (Ht(t, r).children || []).map(function(o, c) {
558
- return Te(o, "".concat(e, "-").concat(t.tag, "-").concat(c), r, void 0, i);
559
- }));
530
+ V = Et([
531
+ E(0, Q),
532
+ E(1, f(le)),
533
+ E(2, f(I)),
534
+ E(3, f(xe)),
535
+ E(4, f(pe))
536
+ ], V);
537
+ function X({ ref: t, ...e }) {
538
+ const { icon: n, id: i, className: r, extend: s, ...c } = e, l = `univerjs-icon univerjs-icon-${i} ${r || ""}`.trim(), o = j(`_${Qt()}`);
539
+ return Te(n, `${i}`, {
540
+ defIds: n.defIds,
541
+ idSuffix: o.current
542
+ }, {
543
+ ref: t,
544
+ className: l,
545
+ ...c
546
+ }, s);
547
+ }
548
+ function Te(t, e, n, i, r) {
549
+ return J(t.tag, {
550
+ key: e,
551
+ ...Tt(t, n, r),
552
+ ...i
553
+ }, (Ut(t, n).children || []).map((s, c) => Te(s, `${e}-${t.tag}-${c}`, n, void 0, r)));
560
554
  }
561
- function Qt(t, e, r) {
562
- var n = C({}, t.attrs);
563
- r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), t.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(o) {
564
- var c = o[0], u = o[1];
565
- c === "mask" && typeof u == "string" && (n[c] = u.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
555
+ function Tt(t, e, n) {
556
+ const i = { ...t.attrs };
557
+ n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(([s, c]) => {
558
+ s === "mask" && typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
566
559
  });
567
- var i = e.defIds;
568
- return !i || i.length === 0 || (t.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(o) {
569
- var c = o[0], u = o[1];
570
- typeof u == "string" && (n[c] = u.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
571
- })), n;
560
+ const { defIds: r } = e;
561
+ return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(([s, c]) => {
562
+ typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
563
+ })), i;
572
564
  }
573
- function Ht(t, e) {
574
- var r, n = e.defIds;
575
- return !n || n.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? C(C({}, t), { children: t.children.map(function(i) {
576
- return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? C(C({}, i), { attrs: C(C({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
577
- }) }) : t;
565
+ function Ut(t, e) {
566
+ var i;
567
+ const { defIds: n } = e;
568
+ return !n || n.length === 0 ? t : t.tag === "defs" && ((i = t.children) != null && i.length) ? {
569
+ ...t,
570
+ children: t.children.map((r) => typeof r.attrs.id == "string" && n && n.includes(r.attrs.id) ? {
571
+ ...r,
572
+ attrs: {
573
+ ...r.attrs,
574
+ id: r.attrs.id + e.idSuffix
575
+ }
576
+ } : r)
577
+ } : t;
578
578
  }
579
- function Kt() {
579
+ function Qt() {
580
580
  return Math.random().toString(36).substring(2, 8);
581
581
  }
582
- te.displayName = "UniverIcon";
583
- var Lt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.01953 3.13985C1.01953 2.77258 1.31726 2.47485 1.68453 2.47485H2.73713C3.1044 2.47485 3.40213 2.77258 3.40213 3.13985C3.40213 3.50712 3.1044 3.80485 2.73713 3.80485H1.68453C1.31726 3.80485 1.01953 3.50712 1.01953 3.13985Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.17734 3.13985C4.17734 2.77258 4.47507 2.47485 4.84234 2.47485H6.94754C7.31481 2.47485 7.61254 2.77258 7.61254 3.13985C7.61254 3.50712 7.31481 3.80485 6.94754 3.80485H4.84234C4.47507 3.80485 4.17734 3.50712 4.17734 3.13985Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.38775 3.13985C8.38775 2.77258 8.68548 2.47485 9.05275 2.47485H11.158C11.5252 2.47485 11.823 2.77258 11.823 3.13985C11.823 3.50712 11.5252 3.80485 11.158 3.80485H9.05275C8.68548 3.80485 8.38775 3.50712 8.38775 3.13985Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.5982 3.13985C12.5982 2.77258 12.8959 2.47485 13.2632 2.47485H14.3158C14.683 2.47485 14.9808 2.77258 14.9808 3.13985C14.9808 3.50712 14.683 3.80485 14.3158 3.80485H13.2632C12.8959 3.80485 12.5982 3.50712 12.5982 3.13985Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.01953 7.99972C1.01953 7.63245 1.31726 7.33472 1.68453 7.33472H14.3158C14.683 7.33472 14.9808 7.63245 14.9808 7.99972C14.9808 8.36699 14.683 8.66472 14.3158 8.66472H1.68453C1.31726 8.66472 1.01953 8.36699 1.01953 7.99972Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.68453 12.1951C1.31726 12.1951 1.01953 12.4928 1.01953 12.8601C1.01953 13.2273 1.31726 13.5251 1.68453 13.5251H2.73713C3.1044 13.5251 3.40213 13.2273 3.40213 12.8601C3.40213 12.4928 3.1044 12.1951 2.73713 12.1951H1.68453Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.84234 12.1951C4.47507 12.1951 4.17734 12.4928 4.17734 12.8601C4.17734 13.2273 4.47507 13.5251 4.84234 13.5251H6.94754C7.31481 13.5251 7.61254 13.2273 7.61254 12.8601C7.61254 12.4928 7.31481 12.1951 6.94754 12.1951H4.84234Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M9.05275 12.1951C8.68548 12.1951 8.38775 12.4928 8.38775 12.8601C8.38775 13.2273 8.68548 13.5251 9.05275 13.5251H11.158C11.5252 13.5251 11.823 13.2273 11.823 12.8601C11.823 12.4928 11.5252 12.1951 11.158 12.1951H9.05275Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M13.2632 12.1951C12.8959 12.1951 12.5982 12.4928 12.5982 12.8601C12.5982 13.2273 12.8959 13.5251 13.2632 13.5251H14.3158C14.683 13.5251 14.9808 13.2273 14.9808 12.8601C14.9808 12.4928 14.683 12.1951 14.3158 12.1951H13.2632Z" } }] }, de = X(function(t, e) {
584
- return ee(te, Object.assign({}, t, {
582
+ X.displayName = "UniverIcon";
583
+ const Ht = {
584
+ tag: "svg",
585
+ attrs: {
586
+ xmlns: "http://www.w3.org/2000/svg",
587
+ fill: "none",
588
+ viewBox: "0 0 16 16",
589
+ width: "1em",
590
+ height: "1em"
591
+ },
592
+ children: [
593
+ {
594
+ tag: "path",
595
+ attrs: {
596
+ fill: "currentColor",
597
+ d: "M1.01953 3.13985C1.01953 2.77258 1.31726 2.47485 1.68453 2.47485H2.73713C3.1044 2.47485 3.40213 2.77258 3.40213 3.13985C3.40213 3.50712 3.1044 3.80485 2.73713 3.80485H1.68453C1.31726 3.80485 1.01953 3.50712 1.01953 3.13985Z"
598
+ }
599
+ },
600
+ {
601
+ tag: "path",
602
+ attrs: {
603
+ fill: "currentColor",
604
+ d: "M4.17734 3.13985C4.17734 2.77258 4.47507 2.47485 4.84234 2.47485H6.94754C7.31481 2.47485 7.61254 2.77258 7.61254 3.13985C7.61254 3.50712 7.31481 3.80485 6.94754 3.80485H4.84234C4.47507 3.80485 4.17734 3.50712 4.17734 3.13985Z"
605
+ }
606
+ },
607
+ {
608
+ tag: "path",
609
+ attrs: {
610
+ fill: "currentColor",
611
+ d: "M8.38775 3.13985C8.38775 2.77258 8.68548 2.47485 9.05275 2.47485H11.158C11.5252 2.47485 11.823 2.77258 11.823 3.13985C11.823 3.50712 11.5252 3.80485 11.158 3.80485H9.05275C8.68548 3.80485 8.38775 3.50712 8.38775 3.13985Z"
612
+ }
613
+ },
614
+ {
615
+ tag: "path",
616
+ attrs: {
617
+ fill: "currentColor",
618
+ d: "M12.5982 3.13985C12.5982 2.77258 12.8959 2.47485 13.2632 2.47485H14.3158C14.683 2.47485 14.9808 2.77258 14.9808 3.13985C14.9808 3.50712 14.683 3.80485 14.3158 3.80485H13.2632C12.8959 3.80485 12.5982 3.50712 12.5982 3.13985Z"
619
+ }
620
+ },
621
+ {
622
+ tag: "path",
623
+ attrs: {
624
+ fill: "currentColor",
625
+ d: "M1.01953 7.99972C1.01953 7.63245 1.31726 7.33472 1.68453 7.33472H14.3158C14.683 7.33472 14.9808 7.63245 14.9808 7.99972C14.9808 8.36699 14.683 8.66472 14.3158 8.66472H1.68453C1.31726 8.66472 1.01953 8.36699 1.01953 7.99972Z"
626
+ }
627
+ },
628
+ {
629
+ tag: "path",
630
+ attrs: {
631
+ fill: "currentColor",
632
+ d: "M1.68453 12.1951C1.31726 12.1951 1.01953 12.4928 1.01953 12.8601C1.01953 13.2273 1.31726 13.5251 1.68453 13.5251H2.73713C3.1044 13.5251 3.40213 13.2273 3.40213 12.8601C3.40213 12.4928 3.1044 12.1951 2.73713 12.1951H1.68453Z"
633
+ }
634
+ },
635
+ {
636
+ tag: "path",
637
+ attrs: {
638
+ fill: "currentColor",
639
+ d: "M4.84234 12.1951C4.47507 12.1951 4.17734 12.4928 4.17734 12.8601C4.17734 13.2273 4.47507 13.5251 4.84234 13.5251H6.94754C7.31481 13.5251 7.61254 13.2273 7.61254 12.8601C7.61254 12.4928 7.31481 12.1951 6.94754 12.1951H4.84234Z"
640
+ }
641
+ },
642
+ {
643
+ tag: "path",
644
+ attrs: {
645
+ fill: "currentColor",
646
+ d: "M9.05275 12.1951C8.68548 12.1951 8.38775 12.4928 8.38775 12.8601C8.38775 13.2273 8.68548 13.5251 9.05275 13.5251H11.158C11.5252 13.5251 11.823 13.2273 11.823 12.8601C11.823 12.4928 11.5252 12.1951 11.158 12.1951H9.05275Z"
647
+ }
648
+ },
649
+ {
650
+ tag: "path",
651
+ attrs: {
652
+ fill: "currentColor",
653
+ d: "M13.2632 12.1951C12.8959 12.1951 12.5982 12.4928 12.5982 12.8601C12.5982 13.2273 12.8959 13.5251 13.2632 13.5251H14.3158C14.683 13.5251 14.9808 13.2273 14.9808 12.8601C14.9808 12.4928 14.683 12.1951 14.3158 12.1951H13.2632Z"
654
+ }
655
+ }
656
+ ]
657
+ }, ce = ge(function(e, n) {
658
+ return J(X, Object.assign({}, e, {
585
659
  id: "divider-icon",
586
- ref: e,
587
- icon: Lt
660
+ ref: n,
661
+ icon: Ht
588
662
  }));
589
663
  });
590
- de.displayName = "DividerIcon";
591
- var jt = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Qe = X(function(t, e) {
592
- return ee(te, Object.assign({}, t, {
664
+ ce.displayName = "DividerIcon";
665
+ const Kt = {
666
+ tag: "svg",
667
+ attrs: {
668
+ xmlns: "http://www.w3.org/2000/svg",
669
+ fill: "none",
670
+ viewBox: "0 0 16 16",
671
+ width: "1em",
672
+ height: "1em"
673
+ },
674
+ children: [{
675
+ tag: "path",
676
+ attrs: {
677
+ fill: "currentColor",
678
+ d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"
679
+ }
680
+ }]
681
+ }, Ue = ge(function(e, n) {
682
+ return J(X, Object.assign({}, e, {
593
683
  id: "increase-icon",
594
- ref: e,
595
- icon: jt
684
+ ref: n,
685
+ icon: Kt
596
686
  }));
597
687
  });
598
- Qe.displayName = "IncreaseIcon";
599
- var At = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-icon_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-icon_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-icon_clip0_1293_26"] }, ue = X(function(t, e) {
600
- return ee(te, Object.assign({}, t, {
688
+ Ue.displayName = "IncreaseIcon";
689
+ const Lt = {
690
+ tag: "svg",
691
+ attrs: {
692
+ xmlns: "http://www.w3.org/2000/svg",
693
+ fill: "none",
694
+ viewBox: "0 0 17 16",
695
+ width: "1em",
696
+ height: "1em"
697
+ },
698
+ children: [{
699
+ tag: "g",
700
+ attrs: {
701
+ fill: "currentColor",
702
+ clipPath: "url(#text-icon_clip0_1293_26)"
703
+ },
704
+ children: [{
705
+ tag: "path",
706
+ attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" }
707
+ }, {
708
+ tag: "path",
709
+ attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" }
710
+ }]
711
+ }, {
712
+ tag: "defs",
713
+ attrs: {},
714
+ children: [{
715
+ tag: "clipPath",
716
+ attrs: { id: "text-icon_clip0_1293_26" },
717
+ children: [{
718
+ tag: "path",
719
+ attrs: {
720
+ fill: "white",
721
+ d: "M0 0H16V16H0z",
722
+ transform: "translate(.9)"
723
+ }
724
+ }]
725
+ }]
726
+ }],
727
+ defIds: ["text-icon_clip0_1293_26"]
728
+ }, ae = ge(function(e, n) {
729
+ return J(X, Object.assign({}, e, {
601
730
  id: "text-icon",
602
- ref: e,
603
- icon: At
731
+ ref: n,
732
+ icon: Lt
604
733
  }));
605
734
  });
606
- ue.displayName = "TextIcon";
607
- const He = "doc.quick-insert.button";
608
- var Bt = Object.getOwnPropertyDescriptor, Wt = (t, e, r, n) => {
609
- for (var i = n > 1 ? void 0 : n ? Bt(e, r) : e, o = t.length - 1, c; o >= 0; o--)
610
- (c = t[o]) && (i = c(i) || i);
611
- return i;
612
- }, re = (t, e) => (r, n) => e(r, n, t);
613
- let G = class extends J {
614
- constructor(e, r, n, i) {
735
+ ae.displayName = "TextIcon";
736
+ const Qe = "doc.quick-insert.button";
737
+ var At = Object.getOwnPropertyDescriptor, jt = (t, e, n, i) => {
738
+ for (var r = i > 1 ? void 0 : i ? At(e, n) : e, s = t.length - 1, c; s >= 0; s--)
739
+ (c = t[s]) && (r = c(r) || r);
740
+ return r;
741
+ }, te = (t, e) => (n, i) => e(n, i, t);
742
+ let F = class extends Y {
743
+ constructor(e, n, i, r) {
615
744
  super();
616
- _(this, "_popup$", new A(null));
617
- _(this, "popup$", this._popup$.asObservable());
618
- this._context = e, this._docEventManagerService = r, this._docQuickInsertPopupService = n, this._docCanvasPopManagerService = i, this._init();
745
+ C(this, "_popup$", new A(null));
746
+ C(this, "popup$", this._popup$.asObservable());
747
+ this._context = e, this._docEventManagerService = n, this._docQuickInsertPopupService = i, this._docCanvasPopManagerService = r, this._init();
619
748
  }
620
749
  get popup() {
621
750
  return this._popup$.value;
622
751
  }
623
752
  _init() {
624
- this.disposeWithMe(ge([this._docEventManagerService.hoverParagraphLeftRealTime$, this._docEventManagerService.hoverParagraphRealTime$]).subscribe(([e, r]) => {
625
- var o;
626
- const n = e != null ? e : r, i = this._context.unit.getDisabled();
627
- if (!n || i) {
753
+ this.disposeWithMe(fe([this._docEventManagerService.hoverParagraphLeftRealTime$, this._docEventManagerService.hoverParagraphRealTime$]).subscribe(([e, n]) => {
754
+ var s;
755
+ const i = e != null ? e : n, r = this._context.unit.getDisabled();
756
+ if (!i || r) {
628
757
  this._hideMenu(!0);
629
758
  return;
630
759
  }
631
- if (n.paragraphStart === n.paragraphEnd) {
632
- if (this._docQuickInsertPopupService.editPopup || n.startIndex === ((o = this.popup) == null ? void 0 : o.startIndex)) return;
760
+ if (i.paragraphStart === i.paragraphEnd) {
761
+ if (this._docQuickInsertPopupService.editPopup || i.startIndex === ((s = this.popup) == null ? void 0 : s.startIndex)) return;
633
762
  this._hideMenu(!0);
634
- const c = this._docCanvasPopManagerService.attachPopupToRect(n.firstLine, {
635
- componentKey: He,
763
+ const c = this._docCanvasPopManagerService.attachPopupToRect(i.firstLine, {
764
+ componentKey: Qe,
636
765
  direction: "left-center"
637
766
  }, this._context.unit.getUnitId());
638
767
  this._popup$.next({
639
- startIndex: n.startIndex,
768
+ startIndex: i.startIndex,
640
769
  disposable: c
641
770
  });
642
771
  } else
@@ -647,38 +776,38 @@ let G = class extends J {
647
776
  this._docQuickInsertPopupService.editPopup || this.popup && (e || this.popup.disposable.canDispose()) && (this.popup.disposable.dispose(), this._popup$.next(null));
648
777
  }
649
778
  };
650
- G = Wt([
651
- re(1, f(Pe)),
652
- re(2, f(S)),
653
- re(3, f(ye))
654
- ], G);
655
- const pe = ({ className: t = "" }) => {
656
- const e = I(S), r = I(he), n = I(ve), i = T(ce(() => r.getCurrentTypeOfUnit$(K.UNIVER_DOC), [r])), o = i && n.getRenderById(i.getUnitId()), c = o == null ? void 0 : o.with(G), u = I(pt), s = I(fe), a = T(e.editPopup$), d = lt((p) => {
779
+ F = jt([
780
+ te(1, f(Pe)),
781
+ te(2, f(I)),
782
+ te(3, f(Se))
783
+ ], F);
784
+ const de = ({ className: t = "" }) => {
785
+ const e = _(I), n = _(pe), i = _(he), r = T(se(() => n.getCurrentTypeOfUnit$(H.UNIVER_DOC), [n])), s = r && i.getRenderById(r.getUnitId()), c = s == null ? void 0 : s.with(F), l = _(ut), o = _(le), a = T(e.editPopup$), d = pt((u) => {
657
786
  var P;
658
- const v = c == null ? void 0 : c.popup;
659
- if (!v)
787
+ const g = c == null ? void 0 : c.popup;
788
+ if (!g)
660
789
  return;
661
- const y = e.popups, w = {
790
+ const S = e.popups, b = {
662
791
  keyword: "",
663
- menus$: ge(y.map((x) => x.menus$)).pipe(
664
- be((x) => x.flat())
792
+ menus$: fe(S.map((y) => y.menus$)).pipe(
793
+ Me((y) => y.flat())
665
794
  )
666
795
  };
667
- s.replaceDocRanges([{
668
- startOffset: v.startIndex,
669
- endOffset: v.startIndex
670
- }]), e.setInputOffset({ start: v.startIndex - 1, end: v.startIndex - 1 }), e.showPopup({
671
- popup: w,
672
- index: v.startIndex - 1,
673
- unitId: (P = i == null ? void 0 : i.getUnitId()) != null ? P : ""
796
+ o.replaceDocRanges([{
797
+ startOffset: g.startIndex,
798
+ endOffset: g.startIndex
799
+ }]), e.setInputOffset({ start: g.startIndex - 1, end: g.startIndex - 1 }), e.showPopup({
800
+ popup: b,
801
+ index: g.startIndex - 1,
802
+ unitId: (P = r == null ? void 0 : r.getUnitId()) != null ? P : ""
674
803
  }), setTimeout(() => {
675
- u.focus();
804
+ l.focus();
676
805
  });
677
806
  });
678
807
  return /* @__PURE__ */ h(
679
808
  "div",
680
809
  {
681
- className: se("univer-mr-1 univer-flex univer-cursor-pointer univer-items-center univer-gap-2.5 univer-rounded-full univer-p-1.5 univer-shadow-sm hover:univer-bg-gray-100 dark:!univer-text-gray-200 dark:hover:!univer-bg-gray-700", St, {
810
+ className: re("univer-mr-1 univer-flex univer-cursor-pointer univer-items-center univer-gap-2.5 univer-rounded-full univer-p-1.5 univer-shadow-sm hover:univer-bg-gray-100 dark:!univer-text-gray-200 dark:hover:!univer-bg-gray-700", It, {
682
811
  "univer-bg-gray-100 dark:!univer-bg-gray-700": a,
683
812
  "univer-bg-white dark:!univer-bg-gray-900": !a
684
813
  }, t),
@@ -686,7 +815,7 @@ const pe = ({ className: t = "" }) => {
686
815
  tabIndex: 0,
687
816
  onClick: d,
688
817
  children: /* @__PURE__ */ h(
689
- Qe,
818
+ Ue,
690
819
  {
691
820
  className: "univer-text-gray-800 dark:!univer-text-gray-200"
692
821
  }
@@ -694,43 +823,43 @@ const pe = ({ className: t = "" }) => {
694
823
  }
695
824
  );
696
825
  };
697
- pe.componentKey = He;
698
- var qt = Object.getOwnPropertyDescriptor, Zt = (t, e, r, n) => {
699
- for (var i = n > 1 ? void 0 : n ? qt(e, r) : e, o = t.length - 1, c; o >= 0; o--)
700
- (c = t[o]) && (i = c(i) || i);
701
- return i;
702
- }, ie = (t, e) => (r, n) => e(r, n, t);
703
- let z = class extends J {
704
- constructor(t, e, r) {
705
- super(), this._commandService = t, this._docQuickInsertPopupService = e, this._componentManager = r, this._initCommands(), this._initComponents(), this._initMenus();
826
+ de.componentKey = Qe;
827
+ var Bt = Object.getOwnPropertyDescriptor, Wt = (t, e, n, i) => {
828
+ for (var r = i > 1 ? void 0 : i ? Bt(e, n) : e, s = t.length - 1, c; s >= 0; s--)
829
+ (c = t[s]) && (r = c(r) || r);
830
+ return r;
831
+ }, ne = (t, e) => (n, i) => e(n, i, t);
832
+ let G = class extends Y {
833
+ constructor(t, e, n) {
834
+ super(), this._commandService = t, this._docQuickInsertPopupService = e, this._componentManager = n, this._initCommands(), this._initComponents(), this._initMenus();
706
835
  }
707
836
  _initCommands() {
708
837
  [
709
- Me,
710
- ke,
711
- Q
838
+ Oe,
839
+ we,
840
+ U
712
841
  ].forEach((t) => {
713
842
  this.disposeWithMe(this._commandService.registerCommand(t));
714
843
  });
715
844
  }
716
845
  _initComponents() {
717
846
  [
718
- [V.componentKey, V],
719
- [q.componentKey, q],
720
847
  [Z.componentKey, Z],
721
- [de.displayName, de],
722
- [ue.displayName, ue],
723
- [pe.componentKey, pe]
724
- ].forEach(([e, r]) => {
725
- e && this.disposeWithMe(this._componentManager.register(e, r));
848
+ [W.componentKey, W],
849
+ [q.componentKey, q],
850
+ [ce.displayName, ce],
851
+ [ae.displayName, ae],
852
+ [de.componentKey, de]
853
+ ].forEach(([e, n]) => {
854
+ e && this.disposeWithMe(this._componentManager.register(e, n));
726
855
  }), [
727
856
  {
728
857
  keyword: "/",
729
- menus$: vt($t),
858
+ menus$: ft($t),
730
859
  // only show when the cursor is at the beginning of a line
731
860
  preconditions: (e) => {
732
- var r;
733
- return ((r = e.range.startNodePosition) == null ? void 0 : r.glyph) === 0;
861
+ var n;
862
+ return ((n = e.range.startNodePosition) == null ? void 0 : n.glyph) === 0;
734
863
  }
735
864
  }
736
865
  ].forEach((e) => {
@@ -740,56 +869,56 @@ let z = class extends J {
740
869
  _initMenus() {
741
870
  }
742
871
  };
743
- z = Zt([
744
- ie(0, H),
745
- ie(1, f(S)),
746
- ie(2, f(xe))
747
- ], z);
748
- const Vt = "docs-quick-insert-ui.config", Se = {};
749
- var Ft = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, zt = (t, e, r) => e in t ? Ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Yt = (t, e, r, n) => {
750
- for (var i = n > 1 ? void 0 : n ? Gt(e, r) : e, o = t.length - 1, c; o >= 0; o--)
751
- (c = t[o]) && (i = c(i) || i);
752
- return i;
753
- }, oe = (t, e) => (r, n) => e(r, n, t), Ke = (t, e, r) => zt(t, typeof e != "symbol" ? e + "" : e, r);
754
- const Jt = "DOC_QUICK_INSERT_UI_PLUGIN";
755
- let Y = class extends Ye {
756
- constructor(t = Se, e, r, n) {
757
- super(), this._config = t, this._injector = e, this._renderManagerSrv = r, this._configService = n;
758
- const { menu: i, ...o } = Je(
872
+ G = Wt([
873
+ ne(0, Q),
874
+ ne(1, f(I)),
875
+ ne(2, f(ye))
876
+ ], G);
877
+ const qt = "docs-quick-insert-ui.config", Ie = {};
878
+ var Zt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, Ft = (t, e, n) => e in t ? Zt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Gt = (t, e, n, i) => {
879
+ for (var r = i > 1 ? void 0 : i ? Vt(e, n) : e, s = t.length - 1, c; s >= 0; s--)
880
+ (c = t[s]) && (r = c(r) || r);
881
+ return r;
882
+ }, ie = (t, e) => (n, i) => e(n, i, t), He = (t, e, n) => Ft(t, typeof e != "symbol" ? e + "" : e, n);
883
+ const zt = "DOC_QUICK_INSERT_UI_PLUGIN";
884
+ let z = class extends ze {
885
+ constructor(t = Ie, e, n, i) {
886
+ super(), this._config = t, this._injector = e, this._renderManagerSrv = n, this._configService = i;
887
+ const { menu: r, ...s } = Ye(
759
888
  {},
760
- Se,
889
+ Ie,
761
890
  this._config
762
891
  );
763
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Vt, o);
892
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(qt, s);
764
893
  }
765
894
  onStarting() {
766
895
  [
767
- [z],
768
- [F],
769
- [S]
770
- ].forEach((e) => this._injector.add(e)), this._injector.get(z);
896
+ [G],
897
+ [V],
898
+ [I]
899
+ ].forEach((e) => this._injector.add(e)), this._injector.get(G);
771
900
  }
772
901
  onRendered() {
773
- this._injector.get(F), this._injector.get(S), [
774
- [G]
902
+ this._injector.get(V), this._injector.get(I), [
903
+ [F]
775
904
  ].forEach((t) => {
776
- this._renderManagerSrv.registerRenderModule(K.UNIVER_DOC, t);
905
+ this._renderManagerSrv.registerRenderModule(H.UNIVER_DOC, t);
777
906
  });
778
907
  }
779
908
  };
780
- Ke(Y, "type", K.UNIVER_DOC);
781
- Ke(Y, "pluginName", Jt);
782
- Y = Yt([
783
- Fe(bt, Ot, Pt, xt, ht),
784
- oe(1, f(Ge)),
785
- oe(2, f(ve)),
786
- oe(3, ze)
787
- ], Y);
909
+ He(z, "type", H.UNIVER_DOC);
910
+ He(z, "pluginName", zt);
911
+ z = Gt([
912
+ Ve(Mt, xt, Pt, yt, lt),
913
+ ie(1, f(Fe)),
914
+ ie(2, f(he)),
915
+ ie(3, Ge)
916
+ ], z);
788
917
  export {
789
- S as DocQuickInsertPopupService,
790
- F as DocQuickInsertTriggerController,
791
- z as DocQuickInsertUIController,
792
- Mt as KeywordInputPlaceholderComponentKey,
793
- wt as QuickInsertPlaceholderComponentKey,
794
- Y as UniverDocsQuickInsertUIPlugin
918
+ I as DocQuickInsertPopupService,
919
+ V as DocQuickInsertTriggerController,
920
+ G as DocQuickInsertUIController,
921
+ Ot as KeywordInputPlaceholderComponentKey,
922
+ bt as QuickInsertPlaceholderComponentKey,
923
+ z as UniverDocsQuickInsertUIPlugin
795
924
  };