@univerjs/sheets-hyper-link-ui 0.6.1 → 0.6.2

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,215 +1,215 @@
1
- var Qn = Object.defineProperty;
2
- var er = (e, t, n) => t in e ? Qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var V = (e, t, n) => er(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Tools as Ie, IUniverInstanceService as Y, ICommandService as ie, Inject as R, LocaleService as ct, IConfigService as In, UniverInstanceType as b, isValidRange as yn, RANGE_TYPE as rn, Rectangle as Ee, Injector as lt, Disposable as z, Range as En, ObjectMatrix as tr, IContextService as Rn, ThemeService as nr, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as rr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as N, DisposableCollection as ir, FOCUSING_SHEET as Ct, generateRandomId as or, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ye, DataValidationType as It, CommandType as ut, FOCUSING_FX_BAR_EDITOR as sr, IPermissionService as ar, InterceptorEffectEnum as cr, DependentOn as lr, Plugin as ur, merge as dr } from "@univerjs/core";
5
- import { SheetHyperLinkType as S, ERROR_RANGE as pr, HyperLinkModel as dt, RemoveHyperLinkMutation as He, AddHyperLinkMutation as xe, SheetsHyperLinkParserService as wt, UpdateRichHyperLinkCommand as hr, UpdateHyperLinkCommand as gr, AddRichHyperLinkCommand as mr, AddHyperLinkCommand as fr, CancelRichHyperLinkCommand as vr, CancelHyperLinkCommand as _r, UniverSheetsHyperLinkPlugin as Sr } from "@univerjs/sheets-hyper-link";
6
- import { ScrollToRangeOperation as Ln, ISheetClipboardService as Cr, virtualizeDiscreteRanges as Rt, COPY_TYPE as Ir, rangeToDiscreteRange as yr, PREDEFINED_HOOK_NAME as Be, getRepeatRange as Er, IEditorBridgeService as re, IMarkSelectionService as Rr, SheetCanvasPopManagerService as Lr, getEditingCustomRangePosition as Pr, getCustomRangePosition as kr, whenSheetEditorFocused as br, getCurrentRangeDisable$ as wr, IAutoFillService as Or, APPLY_TYPE as Oe, getAutoFillRepeatRange as Tr, HoverManagerService as Nr, HoverRenderController as Mr, SheetSkeletonManagerService as sn } from "@univerjs/sheets-ui";
7
- import { MessageType as Ne, FormLayout as ve, Input as an, Select as yt, Button as cn, Tooltip as Ve } from "@univerjs/design";
8
- import { IDefinedNamesService as Pn, deserializeRangeWithSheet as je, serializeRangeWithSheet as Ur, serializeRangeToRefString as Hr, serializeRange as xr } from "@univerjs/engine-formula";
9
- import { SetSelectionsOperation as kn, SetWorksheetActiveOperation as bn, SheetsSelectionsService as Ot, getSheetCommandTarget as wn, RangeProtectionPermissionEditPoint as Tt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as On, WorksheetInsertHyperlinkPermission as Mt, WorkbookEditablePermission as Ut, SheetPermissionCheckController as Tn, RangeProtectionPermissionViewPoint as Dr, WorksheetViewPermission as Ar, WorkbookViewPermission as $r, WorkbookCopyPermission as Br, WorksheetCopyPermission as Vr, ClearSelectionContentCommand as Fr, ClearSelectionAllCommand as jr, ClearSelectionFormatCommand as Wr, SheetInterceptorService as Zr, INTERCEPTOR_POINT as Gr } from "@univerjs/sheets";
10
- import { IMessageService as Nn, useDependency as E, useObservable as Kr, IZenZoneService as pt, useEvent as Yr, KeyCode as Lt, MenuItemType as Mn, MetaKeys as zr, getMenuHiddenObservable as ht, ContextMenuPosition as Xr, ContextMenuGroup as qr, RibbonStartGroup as Jr, ComponentManager as Qr, IMenuManagerService as ei, IShortcutService as ti } from "@univerjs/ui";
11
- import { DocSelectionRenderService as Un, DocBackScrollRenderController as ni, DocCanvasPopManagerService as ri, calcDocRangePositions as ii, DocEventManagerService as ln, UniverDocsUIPlugin as oi } from "@univerjs/docs-ui";
12
- import { IRenderManagerService as Ae } from "@univerjs/engine-render";
13
- import { Subject as si, BehaviorSubject as ai, of as Me, map as le, filter as un, switchMap as ue, combineLatest as ci, distinctUntilChanged as li, debounceTime as We, Observable as ui } from "rxjs";
14
- import { DocSelectionManagerService as De } from "@univerjs/docs";
15
- import { jsxs as Ce, jsx as f, Fragment as di } from "react/jsx-runtime";
16
- import { RangeSelector as pi } from "@univerjs/sheets-formula-ui";
17
- import { useState as J, useMemo as dn, useRef as Pt, useCallback as hi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
18
- import { SheetDataValidationModel as pn } from "@univerjs/sheets-data-validation";
19
- function Ke(e) {
20
- return Ie.isLegalUrl(e);
1
+ var Jn = Object.defineProperty;
2
+ var Qn = (t, e, n) => e in t ? Jn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var $ = (t, e, n) => Qn(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { Tools as Ce, IUniverInstanceService as Y, ICommandService as re, Inject as y, LocaleService as lt, IConfigService as yn, UniverInstanceType as w, isValidRange as En, RANGE_TYPE as an, Rectangle as ye, Injector as ut, Disposable as z, Range as Rn, ObjectMatrix as er, IContextService as tr, ThemeService as nr, DataStreamTreeTokenType as cn, CustomRangeType as Ke, BuildTextUtils as _e, ColorKit as rr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as N, DisposableCollection as ir, FOCUSING_SHEET as Ct, generateRandomId as or, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ie, DataValidationType as It, CommandType as dt, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as sr, IPermissionService as ar, InterceptorEffectEnum as cr, DependentOn as lr, Plugin as ur, merge as dr } from "@univerjs/core";
5
+ import { SetSelectionsOperation as Ln, SetWorksheetActiveOperation as Pn, rangeToDiscreteRange as pr, SheetsSelectionsService as wt, getSheetCommandTarget as Tt, RangeProtectionPermissionEditPoint as Ot, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as kn, WorksheetInsertHyperlinkPermission as Mt, WorkbookEditablePermission as Ut, SheetPermissionCheckController as bn, RangeProtectionPermissionViewPoint as hr, WorksheetViewPermission as gr, WorkbookViewPermission as mr, WorkbookCopyPermission as vr, WorksheetCopyPermission as fr, ClearSelectionContentCommand as _r, ClearSelectionAllCommand as Sr, ClearSelectionFormatCommand as Cr, SheetInterceptorService as Ir, INTERCEPTOR_POINT as yr } from "@univerjs/sheets";
6
+ import { SheetHyperLinkType as C, ERROR_RANGE as Er, HyperLinkModel as pt, RemoveHyperLinkMutation as Me, AddHyperLinkMutation as Ue, SheetsHyperLinkParserService as Ht, UpdateRichHyperLinkCommand as Rr, UpdateHyperLinkCommand as Lr, AddRichHyperLinkCommand as Pr, AddHyperLinkCommand as kr, CancelRichHyperLinkCommand as br, CancelHyperLinkCommand as wr, UniverSheetsHyperLinkPlugin as Tr } from "@univerjs/sheets-hyper-link";
7
+ import { ScrollToRangeOperation as wn, ISheetClipboardService as Or, virtualizeDiscreteRanges as Lt, COPY_TYPE as Nr, PREDEFINED_HOOK_NAME as Be, getRepeatRange as Mr, IEditorBridgeService as ne, IMarkSelectionService as Ur, SheetCanvasPopManagerService as Hr, getEditingCustomRangePosition as xr, getCustomRangePosition as Dr, whenSheetEditorFocused as Vr, getCurrentRangeDisable$ as Ar, IAutoFillService as $r, APPLY_TYPE as we, getAutoFillRepeatRange as Br, HoverManagerService as Fr, HoverRenderController as Wr, SheetSkeletonManagerService as ln } from "@univerjs/sheets-ui";
8
+ import { MessageType as Oe, FormLayout as ve, Input as un, Select as yt, Button as dn, clsx as pn, Tooltip as Fe } from "@univerjs/design";
9
+ import { IDefinedNamesService as Tn, deserializeRangeWithSheet as je, serializeRangeWithSheet as jr, serializeRangeToRefString as Zr, serializeRange as Gr } from "@univerjs/engine-formula";
10
+ import { IMessageService as On, useDependency as I, useObservable as Kr, IZenZoneService as ht, useEvent as Yr, KeyCode as Pt, MenuItemType as Nn, MetaKeys as zr, getMenuHiddenObservable as gt, ContextMenuPosition as Xr, ContextMenuGroup as qr, RibbonStartGroup as Jr, ComponentManager as Qr, IMenuManagerService as ei, IShortcutService as ti } from "@univerjs/ui";
11
+ import { DocSelectionRenderService as Mn, DocBackScrollRenderController as ni, DocCanvasPopManagerService as ri, calcDocRangePositions as ii, DocEventManagerService as hn, UniverDocsUIPlugin as oi } from "@univerjs/docs-ui";
12
+ import { IRenderManagerService as De } from "@univerjs/engine-render";
13
+ import { Subject as si, BehaviorSubject as ai, of as ae, map as xt, switchMap as He, combineLatest as ci, debounceTime as Ze, Observable as li } from "rxjs";
14
+ import { DocSelectionManagerService as xe } from "@univerjs/docs";
15
+ import { jsxs as Se, jsx as v, Fragment as ui } from "react/jsx-runtime";
16
+ import { RangeSelector as di } from "@univerjs/sheets-formula-ui";
17
+ import { useState as G, useMemo as Et, useRef as Un, useCallback as pi, useEffect as te, forwardRef as ue, createElement as de } from "react";
18
+ import { SheetDataValidationModel as gn } from "@univerjs/sheets-data-validation";
19
+ function Ye(t) {
20
+ return Ce.isLegalUrl(t);
21
21
  }
22
- function gi(e) {
23
- return /^[a-zA-Z]+:\/\//.test(e);
22
+ function hi(t) {
23
+ return /^[a-zA-Z]+:\/\//.test(t);
24
24
  }
25
- function mi(e) {
26
- return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(e);
25
+ function gi(t) {
26
+ return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
27
27
  }
28
- function fi(e) {
29
- if (Ke(e)) {
30
- const t = gi(e) ? e : mi(e) ? `mailto://${e}` : `http://${e}`;
28
+ function mi(t) {
29
+ if (Ye(t)) {
30
+ const e = hi(t) ? t : gi(t) ? `mailto://${t}` : `http://${t}`;
31
31
  let n;
32
32
  try {
33
- n = new URL(t);
33
+ n = new URL(e);
34
34
  } catch {
35
- return e;
35
+ return t;
36
36
  }
37
- return n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search ? n.hash : t;
37
+ return n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search ? n.hash : e;
38
38
  }
39
- return e;
39
+ return t;
40
40
  }
41
- const Hn = "sheets-hyper-link-ui.config", hn = {};
42
- var vi = Object.getOwnPropertyDescriptor, _i = (e, t, n, r) => {
43
- for (var i = r > 1 ? void 0 : r ? vi(t, n) : t, s = e.length - 1, o; s >= 0; s--)
44
- (o = e[s]) && (i = o(i) || i);
45
- return i;
46
- }, _e = (e, t) => (n, r) => t(n, r, e);
47
- function Si(e, t) {
48
- const n = t.getMergeData(), r = t.getMaxColumns() - 1, i = t.getMaxRows() - 1;
49
- if (r < e.endColumn && (e.endColumn = r), i < e.endRow && (e.endRow = i), e.rangeType === rn.COLUMN || rn.ROW)
50
- return e;
51
- const s = [];
52
- return n.forEach((o) => {
53
- Ee.intersects(e, o) && s.push(o);
54
- }), Ee.realUnion(e, ...s);
41
+ const Hn = "sheets-hyper-link-ui.config", mn = {};
42
+ var vi = Object.getOwnPropertyDescriptor, fi = (t, e, n, i) => {
43
+ for (var r = i > 1 ? void 0 : i ? vi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
44
+ (s = t[o]) && (r = s(r) || r);
45
+ return r;
46
+ }, fe = (t, e) => (n, i) => e(n, i, t);
47
+ function _i(t, e) {
48
+ const n = e.getMergeData(), i = e.getMaxColumns() - 1, r = e.getMaxRows() - 1;
49
+ if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === an.COLUMN || an.ROW)
50
+ return t;
51
+ const o = [];
52
+ return n.forEach((s) => {
53
+ ye.intersects(t, s) && o.push(s);
54
+ }), ye.realUnion(t, ...o);
55
55
  }
56
- let pe = class {
57
- constructor(e, t, n, r, i, s) {
58
- this._univerInstanceService = e, this._commandService = t, this._definedNamesService = n, this._messageService = r, this._localeService = i, this._configService = s;
59
- }
60
- navigate(e) {
61
- switch (e.type) {
62
- case S.URL:
63
- this.navigateToOtherWebsite(e.url);
56
+ let le = class {
57
+ constructor(t, e, n, i, r, o) {
58
+ this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService = o;
59
+ }
60
+ navigate(t) {
61
+ switch (t.type) {
62
+ case C.URL:
63
+ this.navigateToOtherWebsite(t.url);
64
64
  break;
65
65
  default:
66
- this._navigateToUniver(e.searchObj);
66
+ this._navigateToUniver(t.searchObj);
67
67
  }
68
68
  }
69
- _navigateToUniver(e) {
70
- const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(b.UNIVER_SHEET);
71
- if (!i)
69
+ _navigateToUniver(t) {
70
+ const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
71
+ if (!r)
72
72
  return;
73
- const s = i.getUnitId();
74
- if (r) {
75
- const o = this._definedNamesService.getValueById(s, r);
76
- if (!o)
73
+ const o = r.getUnitId();
74
+ if (i) {
75
+ const s = this._definedNamesService.getValueById(o, i);
76
+ if (!s)
77
77
  return;
78
- const { formulaOrRefString: c } = o, u = this._definedNamesService.getWorksheetByRef(s, c);
78
+ const { formulaOrRefString: c } = s, u = this._definedNamesService.getWorksheetByRef(o, c);
79
79
  if (!u) {
80
80
  this._messageService.show({
81
81
  content: this._localeService.t("hyperLink.message.refError"),
82
- type: Ne.Error
82
+ type: Oe.Error
83
83
  });
84
84
  return;
85
85
  }
86
86
  if (u.isSheetHidden()) {
87
87
  this._messageService.show({
88
88
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
89
- type: Ne.Error
89
+ type: Oe.Error
90
90
  });
91
91
  return;
92
92
  }
93
- this.navigateToDefineName(s, r);
93
+ this.navigateToDefineName(o, i);
94
94
  }
95
- if (t) {
95
+ if (e) {
96
96
  if (n) {
97
- const o = je(n);
98
- yn(o.range) && n !== pr && this.navigateToRange(s, t, o.range);
97
+ const s = je(n);
98
+ En(s.range) && n !== Er && this.navigateToRange(o, e, s.range);
99
99
  return;
100
100
  }
101
- this.navigateToSheetById(s, t);
101
+ this.navigateToSheetById(o, e);
102
102
  }
103
103
  }
104
- async navigateToRange(e, t, n, r) {
105
- const i = await this.navigateToSheetById(e, t);
106
- if (i) {
107
- const s = Si(n, i);
104
+ async navigateToRange(t, e, n, i) {
105
+ const r = await this.navigateToSheetById(t, e);
106
+ if (r) {
107
+ const o = _i(n, r);
108
108
  await this._commandService.executeCommand(
109
- kn.id,
109
+ Ln.id,
110
110
  {
111
- unitId: e,
112
- subUnitId: t,
111
+ unitId: t,
112
+ subUnitId: e,
113
113
  selections: [{
114
- range: s,
114
+ range: o,
115
115
  primary: null
116
116
  }]
117
117
  }
118
- ), await this._commandService.executeCommand(Ln.id, {
119
- range: s,
120
- forceTop: r
118
+ ), await this._commandService.executeCommand(wn.id, {
119
+ range: o,
120
+ forceTop: i
121
121
  });
122
122
  }
123
123
  }
124
- async navigateToSheetById(e, t) {
125
- const n = this._univerInstanceService.getUnit(e, b.UNIVER_SHEET);
124
+ async navigateToSheetById(t, e) {
125
+ const n = this._univerInstanceService.getUnit(t, w.UNIVER_SHEET);
126
126
  if (!n)
127
127
  return !1;
128
- const r = n.getActiveSheet();
129
- if (!r)
128
+ const i = n.getActiveSheet();
129
+ if (!i)
130
130
  return !1;
131
- if (r.getSheetId() === t)
132
- return r;
133
- const i = n.getSheetBySheetId(t);
134
- return i ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
131
+ if (i.getSheetId() === e)
132
+ return i;
133
+ const r = n.getSheetBySheetId(e);
134
+ return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
135
135
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
136
- type: Ne.Error
137
- }), !1) : await this._commandService.executeCommand(bn.id, { unitId: e, subUnitId: t }) ? i : !1 : (this._messageService.show({
136
+ type: Oe.Error
137
+ }), !1) : await this._commandService.executeCommand(Pn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
138
138
  content: this._localeService.t("hyperLink.message.noSheet"),
139
- type: Ne.Error
139
+ type: Oe.Error
140
140
  }), !1);
141
141
  }
142
- async navigateToDefineName(e, t) {
143
- return this._definedNamesService.focusRange(e, t), !0;
142
+ async navigateToDefineName(t, e) {
143
+ return this._definedNamesService.focusRange(t, e), !0;
144
144
  }
145
- async navigateToOtherWebsite(e) {
145
+ async navigateToOtherWebsite(t) {
146
146
  var n;
147
- const t = this._configService.getConfig(Hn);
148
- if ((n = t == null ? void 0 : t.urlHandler) != null && n.navigateToOtherWebsite)
149
- return t.urlHandler.navigateToOtherWebsite(e);
150
- window.open(e, "_blank", "noopener noreferrer");
147
+ const e = this._configService.getConfig(Hn);
148
+ if ((n = e == null ? void 0 : e.urlHandler) != null && n.navigateToOtherWebsite)
149
+ return e.urlHandler.navigateToOtherWebsite(t);
150
+ window.open(t, "_blank", "noopener noreferrer");
151
151
  }
152
152
  };
153
- pe = _i([
154
- _e(0, Y),
155
- _e(1, ie),
156
- _e(2, Pn),
157
- _e(3, Nn),
158
- _e(4, R(ct)),
159
- _e(5, In)
160
- ], pe);
161
- const Ht = "SHEET_HYPER_LINK_UI_PLUGIN";
162
- var Ci = Object.getOwnPropertyDescriptor, Ii = (e, t, n, r) => {
163
- for (var i = r > 1 ? void 0 : r ? Ci(t, n) : t, s = e.length - 1, o; s >= 0; s--)
164
- (o = e[s]) && (i = o(i) || i);
165
- return i;
166
- }, Fe = (e, t) => (n, r) => t(n, r, e);
167
- let Ye = class extends z {
168
- constructor(t, n, r, i) {
153
+ le = fi([
154
+ fe(0, Y),
155
+ fe(1, re),
156
+ fe(2, Tn),
157
+ fe(3, On),
158
+ fe(4, y(lt)),
159
+ fe(5, yn)
160
+ ], le);
161
+ const Dt = "SHEET_HYPER_LINK_UI_PLUGIN";
162
+ var Si = Object.getOwnPropertyDescriptor, Ci = (t, e, n, i) => {
163
+ for (var r = i > 1 ? void 0 : i ? Si(e, n) : e, o = t.length - 1, s; o >= 0; o--)
164
+ (s = t[o]) && (r = s(r) || r);
165
+ return r;
166
+ }, We = (t, e) => (n, i) => e(n, i, t);
167
+ let ze = class extends z {
168
+ constructor(e, n, i, r) {
169
169
  super();
170
- V(this, "_plainTextFilter", /* @__PURE__ */ new Set());
171
- V(this, "_copyInfo");
172
- this._sheetClipboardService = t, this._hyperLinkModel = n, this._injector = r, this._resolverService = i, this._initCopyPaste(), this.disposeWithMe(() => {
170
+ $(this, "_plainTextFilter", /* @__PURE__ */ new Set());
171
+ $(this, "_copyInfo");
172
+ this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste(), this.disposeWithMe(() => {
173
173
  this._plainTextFilter.clear();
174
174
  });
175
175
  }
176
- registerPlainTextFilter(t) {
177
- this._plainTextFilter.add(t);
176
+ registerPlainTextFilter(e) {
177
+ this._plainTextFilter.add(e);
178
178
  }
179
- removePlainTextFilter(t) {
180
- this._plainTextFilter.delete(t);
179
+ removePlainTextFilter(e) {
180
+ this._plainTextFilter.delete(e);
181
181
  }
182
182
  /* If return false the process of paste text will be stop */
183
- _filterPlainText(t) {
184
- return Array.from(this._plainTextFilter).every((n) => n(t));
183
+ _filterPlainText(e) {
184
+ return Array.from(this._plainTextFilter).every((n) => n(e));
185
185
  }
186
186
  _initCopyPaste() {
187
187
  this._sheetClipboardService.addClipboardHook({
188
- id: Ht,
189
- onBeforeCopy: (t, n, r) => this._collect(t, n, r),
190
- onPasteCells: (t, n, r, i) => {
191
- const { copyType: s = Ir.COPY, pasteType: o } = i, { range: c } = t || {}, { range: u, unitId: p, subUnitId: l } = n;
192
- return this._generateMutations(u, { copyType: s, pasteType: o, copyRange: c, unitId: p, subUnitId: l });
188
+ id: Dt,
189
+ onBeforeCopy: (e, n, i) => this._collect(e, n, i),
190
+ onPasteCells: (e, n, i, r) => {
191
+ const { copyType: o = Nr.COPY, pasteType: s } = r, { range: c } = e || {}, { range: u, unitId: p, subUnitId: l } = n;
192
+ return this._generateMutations(u, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: l });
193
193
  },
194
- onPastePlainText: (t, n) => {
195
- const r = this._filterPlainText(n);
196
- if (Ke(n) && r) {
197
- const { range: i, unitId: s, subUnitId: o } = t, { ranges: [c], mapFunc: u } = Rt([i]), p = [], l = [];
198
- return En.foreach(c, (g, d) => {
199
- const { row: _, col: C } = u(g, d), v = this._hyperLinkModel.getHyperLinkByLocation(s, o, _, C);
200
- v && p.push({
201
- id: He.id,
194
+ onPastePlainText: (e, n) => {
195
+ const i = this._filterPlainText(n);
196
+ if (Ye(n) && i) {
197
+ const { range: r, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: u } = Lt([r]), p = [], l = [];
198
+ return Rn.foreach(c, (g, d) => {
199
+ const { row: _, col: S } = u(g, d), f = this._hyperLinkModel.getHyperLinkByLocation(o, s, _, S);
200
+ f && p.push({
201
+ id: Me.id,
202
202
  params: {
203
- unitId: s,
204
- subUnitId: o,
205
- id: v.id
203
+ unitId: o,
204
+ subUnitId: s,
205
+ id: f.id
206
206
  }
207
- }), v && l.push({
208
- id: xe.id,
207
+ }), f && l.push({
208
+ id: Ue.id,
209
209
  params: {
210
- unitId: s,
211
- subUnitId: o,
212
- link: v
210
+ unitId: o,
211
+ subUnitId: s,
212
+ link: f
213
213
  }
214
214
  });
215
215
  }), { redos: p, undos: l };
@@ -219,27 +219,27 @@ let Ye = class extends z {
219
219
  priority: 99
220
220
  });
221
221
  }
222
- _collect(t, n, r) {
223
- const i = new tr();
222
+ _collect(e, n, i) {
223
+ const r = new er();
224
224
  this._copyInfo = {
225
- unitId: t,
225
+ unitId: e,
226
226
  subUnitId: n,
227
- matrix: i
227
+ matrix: r
228
228
  };
229
- const s = this._injector.invoke((u) => yr(r, u, t, n));
230
- if (!s)
229
+ const o = this._injector.invoke((u) => pr(i, u, e, n));
230
+ if (!o)
231
231
  return;
232
- const { rows: o, cols: c } = s;
233
- o.forEach((u, p) => {
232
+ const { rows: s, cols: c } = o;
233
+ s.forEach((u, p) => {
234
234
  c.forEach((l, g) => {
235
235
  var _;
236
- const d = this._hyperLinkModel.getHyperLinkByLocation(t, n, u, l);
237
- i.setValue(p, g, (_ = d == null ? void 0 : d.id) != null ? _ : "");
236
+ const d = this._hyperLinkModel.getHyperLinkByLocation(e, n, u, l);
237
+ r.setValue(p, g, (_ = d == null ? void 0 : d.id) != null ? _ : "");
238
238
  });
239
239
  });
240
240
  }
241
241
  // eslint-disable-next-line max-lines-per-function
242
- _generateMutations(t, n) {
242
+ _generateMutations(e, n) {
243
243
  if (!this._copyInfo)
244
244
  return { redos: [], undos: [] };
245
245
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
@@ -251,47 +251,47 @@ let Ye = class extends z {
251
251
  Be.SPECIAL_PASTE_FORMULA
252
252
  ].includes(n.pasteType))
253
253
  return { redos: [], undos: [] };
254
- const { unitId: i, subUnitId: s } = this._copyInfo, o = [], c = [], { ranges: [u, p], mapFunc: l } = Rt([n.copyRange, t]);
255
- return Er(u, p, !0).forEach(({ startRange: d }) => {
254
+ const { unitId: r, subUnitId: o } = this._copyInfo, s = [], c = [], { ranges: [u, p], mapFunc: l } = Lt([n.copyRange, e]);
255
+ return Mr(u, p, !0).forEach(({ startRange: d }) => {
256
256
  var _;
257
- (_ = this._copyInfo) == null || _.matrix.forValue((C, v, w) => {
258
- const a = Ee.getPositionRange(
257
+ (_ = this._copyInfo) == null || _.matrix.forValue((S, f, k) => {
258
+ const a = ye.getPositionRange(
259
259
  {
260
- startRow: C,
261
- endRow: C,
262
- startColumn: v,
263
- endColumn: v
260
+ startRow: S,
261
+ endRow: S,
262
+ startColumn: f,
263
+ endColumn: f
264
264
  },
265
265
  d
266
- ), k = this._hyperLinkModel.getHyperLink(i, s, w), { row: U, col: O } = l(a.startRow, a.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, U, O), $ = Ie.generateRandomId();
267
- L && o.push({
268
- id: He.id,
266
+ ), b = this._hyperLinkModel.getHyperLink(r, o, k), { row: U, col: T } = l(a.startRow, a.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, U, T), A = Ce.generateRandomId();
267
+ L && s.push({
268
+ id: Me.id,
269
269
  params: {
270
270
  unitId: n.unitId,
271
271
  subUnitId: n.subUnitId,
272
272
  id: L.id
273
273
  }
274
- }), k && (o.push({
275
- id: xe.id,
274
+ }), b && (s.push({
275
+ id: Ue.id,
276
276
  params: {
277
277
  unitId: n.unitId,
278
278
  subUnitId: n.subUnitId,
279
279
  link: {
280
- ...k,
281
- id: $,
280
+ ...b,
281
+ id: A,
282
282
  row: U,
283
- column: O
283
+ column: T
284
284
  }
285
285
  }
286
286
  }), c.push({
287
- id: He.id,
287
+ id: Me.id,
288
288
  params: {
289
289
  unitId: n.unitId,
290
290
  subUnitId: n.subUnitId,
291
- id: $
291
+ id: A
292
292
  }
293
293
  })), L && c.push({
294
- id: xe.id,
294
+ id: Ue.id,
295
295
  params: {
296
296
  unitId: n.unitId,
297
297
  subUnitId: n.subUnitId,
@@ -299,29 +299,29 @@ let Ye = class extends z {
299
299
  }
300
300
  });
301
301
  });
302
- }), { redos: o, undos: c };
302
+ }), { redos: s, undos: c };
303
303
  }
304
304
  };
305
- Ye = Ii([
306
- Fe(0, Cr),
307
- Fe(1, R(dt)),
308
- Fe(2, R(lt)),
309
- Fe(3, R(pe))
310
- ], Ye);
311
- var m = /* @__PURE__ */ ((e) => (e.EDITING = "editing", e.VIEWING = "viewing", e.ZEN_EDITOR = "zen_mode", e))(m || {});
305
+ ze = Ci([
306
+ We(0, Or),
307
+ We(1, y(pt)),
308
+ We(2, y(ut)),
309
+ We(3, y(le))
310
+ ], ze);
311
+ var m = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(m || {});
312
312
  class xn extends z {
313
313
  constructor() {
314
314
  super(...arguments);
315
- V(this, "_customHyperLinks", /* @__PURE__ */ new Map());
315
+ $(this, "_customHyperLinks", /* @__PURE__ */ new Map());
316
316
  }
317
317
  isBuiltInLinkType(n) {
318
- return n !== S.URL;
318
+ return n !== C.URL;
319
319
  }
320
320
  getOptions() {
321
321
  return Array.from(this._customHyperLinks.values()).map(({ option: n }) => n);
322
322
  }
323
323
  findCustomHyperLink(n) {
324
- return Array.from(this._customHyperLinks.values()).find((i) => i.match(n));
324
+ return Array.from(this._customHyperLinks.values()).find((r) => r.match(n));
325
325
  }
326
326
  registerCustomHyperLink(n) {
327
327
  this._customHyperLinks.set(n.type, n);
@@ -330,88 +330,88 @@ class xn extends z {
330
330
  return this._customHyperLinks.get(n);
331
331
  }
332
332
  removeCustomHyperLink(n) {
333
- const { _customHyperLinks: r } = this;
334
- r.delete(n);
333
+ const { _customHyperLinks: i } = this;
334
+ i.delete(n);
335
335
  }
336
336
  dispose() {
337
337
  super.dispose(), this._customHyperLinks.clear();
338
338
  }
339
339
  }
340
- const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
341
- cellLinkEdit: yi,
342
- cellLinkEditButtons: Ei
343
- }, ze = () => {
344
- var Ft;
345
- const [e, t] = J(""), [n, r] = J(!1), [i, s] = J(""), [o, c] = J(!0), [u, p] = J(S.URL), [l, g] = J(""), d = E(ct), _ = E(Pn), C = E(re), v = E(Y), w = E(K), a = Kr(w.currentEditing$), k = E(wt), U = E(pe), O = E(ie), L = E(xn), $ = dn(() => L.getOptions(), [L]), D = E(pt), X = E(Ae), Re = E(Rr), $e = E(De), oe = E(Rn), Le = E(nr), Pe = E(De), ke = Pt({}), se = dn(() => {
340
+ const Ii = "univer-cell-link-edit", yi = "univer-cell-link-edit-buttons", vn = {
341
+ cellLinkEdit: Ii,
342
+ cellLinkEditButtons: yi
343
+ }, Xe = () => {
344
+ var Zt;
345
+ const [t, e] = G(""), [n, i] = G(!1), [r, o] = G(""), [s, c] = G(!0), [u, p] = G(C.URL), [l, g] = G(""), d = I(lt), _ = I(Tn), S = I(ne), f = I(Y), k = I(K), a = Kr(k.currentEditing$), b = I(Ht), U = I(le), T = I(re), L = I(xn), A = Et(() => L.getOptions(), [L]), D = I(ht), X = I(De), Ee = I(Ur), Ve = I(xe), ie = I(tr), Re = I(nr), Le = I(xe), [Pe, Ae] = G(!1), he = I(wt), Gn = Et(() => he.getCurrentSelections(), []), $e = Et(() => {
346
346
  if (!L.isBuiltInLinkType(u))
347
347
  return L.getCustomHyperLink(u);
348
- }, [L, u]), [B, Kn] = J(!1), [be, gt] = J(!1), x = Pt(!1), F = v.getCurrentUnitForType(b.UNIVER_SHEET), Yn = (F == null ? void 0 : F.getActiveSheet().getSheetId()) || "", Q = hi((h) => {
349
- s(h.replaceAll(on.CUSTOM_RANGE_START, "").replaceAll(on.CUSTOM_RANGE_END, ""));
350
- }, [s]);
351
- ne(() => {
352
- var h, y, I, P, M, j, jt, Wt, Zt, Gt, Kt, Yt, zt, Xt, qt, Jt, Qt;
348
+ }, [L, u]), [ge, Kn] = G(!1), [ke, Wt] = G(!1), x = Un(!1), B = f.getCurrentUnitForType(w.UNIVER_SHEET), Yn = (B == null ? void 0 : B.getActiveSheet().getSheetId()) || "", J = pi((h) => {
349
+ o(h.replaceAll(cn.CUSTOM_RANGE_START, "").replaceAll(cn.CUSTOM_RANGE_END, ""));
350
+ }, [o]);
351
+ te(() => {
352
+ var h, E, R, P, M, F, Gt, Kt, Yt, zt, Xt, qt, Jt, Qt, en, tn, nn;
353
353
  if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
354
- const { customRange: ae, row: _t, col: St } = a;
354
+ const { customRange: oe, row: _t, col: St } = a;
355
355
  let { label: q } = a;
356
356
  typeof q == "number" && (q = `${q}`);
357
357
  let W;
358
- if (ae)
358
+ if (oe)
359
359
  W = {
360
- id: (h = ae == null ? void 0 : ae.rangeId) != null ? h : "",
360
+ id: (h = oe == null ? void 0 : oe.rangeId) != null ? h : "",
361
361
  display: q != null ? q : "",
362
- payload: (I = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? I : "",
362
+ payload: (R = (E = oe == null ? void 0 : oe.properties) == null ? void 0 : E.url) != null ? R : "",
363
363
  row: _t,
364
364
  column: St
365
365
  };
366
366
  else if (a.type === m.VIEWING) {
367
- const T = v.getUnit(a.unitId), te = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), H = te == null ? void 0 : te.getCellRaw(a.row, a.col), fe = (j = (M = (P = H == null ? void 0 : H.p) == null ? void 0 : P.body) == null ? void 0 : M.customRanges) == null ? void 0 : j.find((tn) => {
368
- var nn;
369
- return tn.rangeType === Ge.HYPERLINK && ((nn = tn.properties) == null ? void 0 : nn.url);
370
- }), we = H == null ? void 0 : H.v;
371
- H && (!Se.transform.isEmptyDocument((Wt = (jt = H.p) == null ? void 0 : jt.body) == null ? void 0 : Wt.dataStream) || Ie.isDefine(we)) && c(!1), W = {
367
+ const O = f.getUnit(a.unitId), ee = O == null ? void 0 : O.getSheetBySheetId(a.subUnitId), H = ee == null ? void 0 : ee.getCellRaw(a.row, a.col), me = (F = (M = (P = H == null ? void 0 : H.p) == null ? void 0 : P.body) == null ? void 0 : M.customRanges) == null ? void 0 : F.find((on) => {
368
+ var sn;
369
+ return on.rangeType === Ke.HYPERLINK && ((sn = on.properties) == null ? void 0 : sn.url);
370
+ }), be = H == null ? void 0 : H.v;
371
+ H && (!_e.transform.isEmptyDocument((Kt = (Gt = H.p) == null ? void 0 : Gt.body) == null ? void 0 : Kt.dataStream) || Ce.isDefine(be)) && c(!1), W = {
372
372
  id: "",
373
373
  display: "",
374
- payload: (Gt = (Zt = fe == null ? void 0 : fe.properties) == null ? void 0 : Zt.url) != null ? Gt : "",
374
+ payload: (zt = (Yt = me == null ? void 0 : me.properties) == null ? void 0 : Yt.url) != null ? zt : "",
375
375
  row: _t,
376
376
  column: St
377
377
  };
378
378
  } else {
379
- const T = v.getCurrentUnitForType(b.UNIVER_DOC), te = $e.getActiveTextRange(), H = T == null ? void 0 : T.getBody(), fe = te && H ? te : null, we = fe && ((Yt = Se.customRange.getCustomRangesInterestsWithSelection(fe, (Kt = H == null ? void 0 : H.customRanges) != null ? Kt : [])) == null ? void 0 : Yt[0]);
379
+ const O = f.getCurrentUnitForType(w.UNIVER_DOC), ee = Ve.getActiveTextRange(), H = O == null ? void 0 : O.getBody(), me = ee && H ? ee : null, be = me && ((qt = _e.customRange.getCustomRangesInterestsWithSelection(me, (Xt = H == null ? void 0 : H.customRanges) != null ? Xt : [])) == null ? void 0 : qt[0]);
380
380
  c(!1), W = {
381
381
  id: "",
382
382
  display: q != null ? q : "",
383
- payload: (Xt = (zt = we == null ? void 0 : we.properties) == null ? void 0 : zt.url) != null ? Xt : "",
383
+ payload: (Qt = (Jt = be == null ? void 0 : be.properties) == null ? void 0 : Jt.url) != null ? Qt : "",
384
384
  row: _t,
385
385
  column: St
386
386
  };
387
387
  }
388
- t(W.id);
389
- const en = L.findCustomHyperLink(W);
390
- if (en) {
391
- const T = en.convert(W);
392
- p(T.type), g(T.payload), Q(T.display);
388
+ e(W.id);
389
+ const rn = L.findCustomHyperLink(W);
390
+ if (rn) {
391
+ const O = rn.convert(W);
392
+ p(O.type), g(O.payload), J(O.display);
393
393
  return;
394
394
  }
395
- Q(W.display);
396
- const ee = k.parseHyperLink(W.payload);
397
- switch (p(ee.type === S.INVALID ? S.RANGE : ee.type), ee.type) {
398
- case S.URL: {
399
- g(ee.url), ee.url === W.display && (x.current = !0);
395
+ J(W.display);
396
+ const Q = b.parseHyperLink(W.payload);
397
+ switch (p(Q.type === C.INVALID ? C.RANGE : Q.type), Q.type) {
398
+ case C.URL: {
399
+ g(Q.url), Q.url === W.display && (x.current = !0);
400
400
  break;
401
401
  }
402
- case S.RANGE: {
403
- const T = ee.searchObj, te = T.gid && (Qt = (Jt = (qt = v.getUnit(a.unitId)) == null ? void 0 : qt.getSheetBySheetId(T.gid)) == null ? void 0 : Jt.getName()) != null ? Qt : "", H = Ur(te, je(T.range).range);
402
+ case C.RANGE: {
403
+ const O = Q.searchObj, ee = O.gid && (nn = (tn = (en = f.getUnit(a.unitId)) == null ? void 0 : en.getSheetBySheetId(O.gid)) == null ? void 0 : tn.getName()) != null ? nn : "", H = jr(ee, je(O.range).range);
404
404
  g(H), H === W.display && (x.current = !0);
405
405
  break;
406
406
  }
407
- case S.SHEET: {
408
- const T = ee.searchObj;
409
- g(T.gid);
407
+ case C.SHEET: {
408
+ const O = Q.searchObj;
409
+ g(O.gid);
410
410
  break;
411
411
  }
412
- case S.DEFINE_NAME: {
413
- const T = ee.searchObj;
414
- g(T.rangeid);
412
+ case C.DEFINE_NAME: {
413
+ const O = Q.searchObj;
414
+ g(O.rangeid);
415
415
  break;
416
416
  }
417
417
  default:
@@ -419,11 +419,11 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
419
419
  break;
420
420
  }
421
421
  }
422
- }, [a, U, L, $e, v]), ne(() => {
422
+ }, [a, U, L, Ve, f]), te(() => {
423
423
  let h = null;
424
- if (a && !a.customRangeId && a.type === m.VIEWING && Ie.isDefine(a.row) && Ie.isDefine(a.col)) {
425
- const y = v.getUnit(a.unitId, b.UNIVER_SHEET), I = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = I == null ? void 0 : I.getMergedCell(a.row, a.col), M = new rr(Le.getCurrentTheme().hyacinth500).toRgb();
426
- h = Re.addShape(
424
+ if (a && !a.customRangeId && a.type === m.VIEWING && Ce.isDefine(a.row) && Ce.isDefine(a.col)) {
425
+ const E = f.getUnit(a.unitId, w.UNIVER_SHEET), R = E == null ? void 0 : E.getSheetBySheetId(a.subUnitId), P = R == null ? void 0 : R.getMergedCell(a.row, a.col), M = new rr(Re.getCurrentTheme().hyacinth500).toRgb();
426
+ h = Ee.addShape(
427
427
  {
428
428
  range: P != null ? P : {
429
429
  startColumn: a.col,
@@ -445,114 +445,114 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
445
445
  );
446
446
  }
447
447
  return () => {
448
- h && Re.removeShape(h);
448
+ h && Ee.removeShape(h);
449
449
  };
450
- }, [a, Re, Le, v]), ne(() => {
451
- gt(u === S.RANGE);
452
- }, [u]), ne(() => {
453
- const h = (a == null ? void 0 : a.type) === m.ZEN_EDITOR ? X.getRenderById(N) : X.getRenderById(C.getCurrentEditorId()), y = new ir();
450
+ }, [a, Ee, Re, f]), te(() => {
451
+ Wt(u === C.RANGE);
452
+ }, [u]), te(() => {
453
+ const h = (a == null ? void 0 : a.type) === m.ZEN_EDITOR ? X.getRenderById(N) : X.getRenderById(S.getCurrentEditorId()), E = new ir();
454
454
  if (h) {
455
- const I = h.with(Un);
456
- I.setReserveRangesStatus(!0), y.add(() => {
457
- I.setReserveRangesStatus(!1);
455
+ const R = h.with(Mn);
456
+ R.setReserveRangesStatus(!0), E.add(() => {
457
+ R.setReserveRangesStatus(!1);
458
458
  });
459
459
  }
460
460
  return () => {
461
- C.disableForceKeepVisible(), y.dispose();
461
+ S.disableForceKeepVisible(), E.dispose();
462
462
  };
463
- }, [a == null ? void 0 : a.type, C, X]), ne(() => (w.setIsKeepVisible(be), () => {
464
- w.setIsKeepVisible(!1);
465
- }), [be, w]), ne(() => () => {
466
- D.temporaryHidden && (D.show(), oe.setContextValue(Ct, !1));
467
- }, [oe, D]), ne(() => {
468
- if (be)
469
- return C.enableForceKeepVisible(), () => {
470
- C.disableForceKeepVisible();
463
+ }, [a == null ? void 0 : a.type, S, X]), te(() => (ke && k.setIsKeepVisible(ke), k.setIsKeepVisible(Pe), () => {
464
+ k.setIsKeepVisible(!1);
465
+ }), [ke, Pe, k]), te(() => () => {
466
+ D.temporaryHidden && (D.show(), ie.setContextValue(Ct, !1));
467
+ }, [ie, D]), te(() => {
468
+ if (ke)
469
+ return S.enableForceKeepVisible(), () => {
470
+ S.disableForceKeepVisible();
471
471
  };
472
- }, [be, C]);
472
+ }, [ke, S]);
473
473
  const zn = [
474
474
  {
475
475
  label: d.t("hyperLink.form.link"),
476
- value: S.URL
476
+ value: C.URL
477
477
  },
478
478
  {
479
479
  label: d.t("hyperLink.form.range"),
480
- value: S.RANGE
480
+ value: C.RANGE
481
481
  },
482
482
  {
483
483
  label: d.t("hyperLink.form.worksheet"),
484
- value: S.SHEET
484
+ value: C.SHEET
485
485
  },
486
486
  {
487
487
  label: d.t("hyperLink.form.definedName"),
488
- value: S.DEFINE_NAME
488
+ value: C.DEFINE_NAME
489
489
  },
490
- ...$
490
+ ...A
491
491
  ];
492
- if (!F)
492
+ if (!B)
493
493
  return;
494
- const Xn = F.getHiddenWorksheets(), mt = F.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => Xn.indexOf(h.value) === -1), ft = Object.values((Ft = _.getDefinedNameMap(F.getUnitId())) != null ? Ft : {}).map((h) => ({
494
+ const Xn = B.getHiddenWorksheets(), mt = B.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => Xn.indexOf(h.value) === -1), vt = Object.values((Zt = _.getDefinedNameMap(B.getUnitId())) != null ? Zt : {}).map((h) => ({
495
495
  label: h.name,
496
496
  value: h.id
497
- })), Vt = (h, y) => {
498
- if (h === S.URL)
499
- return fi(y);
500
- if (h === S.RANGE) {
501
- const I = je(y), P = F.getSheetBySheetName(I.sheetName);
497
+ })), jt = (h, E) => {
498
+ if (h === C.URL)
499
+ return mi(E);
500
+ if (h === C.RANGE) {
501
+ const R = je(E), P = B.getSheetBySheetName(R.sheetName);
502
502
  if (P)
503
- return `#gid=${P.getSheetId()}&range=${xr(I.range)}`;
503
+ return `#gid=${P.getSheetId()}&range=${Gr(R.range)}`;
504
504
  }
505
- return `#${h}=${y}`;
505
+ return `#${h}=${E}`;
506
506
  }, qn = Yr((h) => {
507
507
  var M;
508
- const I = h.split(",").map(je)[0];
509
- if (!I || !yn(I.range))
508
+ const R = h.split(",").map(je)[0];
509
+ if (!R || !En(R.range))
510
510
  return;
511
- I.sheetName || (I.sheetName = ((M = F.getActiveSheet()) == null ? void 0 : M.getName()) || "");
512
- const P = Hr(I);
513
- g(P), P && (x.current || !i) && (Q(P), x.current = !0);
514
- }), vt = async () => {
515
- if (o && !i || !l || u === S.URL && !Ke(l)) {
511
+ R.sheetName || (R.sheetName = ((M = B.getActiveSheet()) == null ? void 0 : M.getName()) || "");
512
+ const P = Zr(R);
513
+ g(P), P && (x.current || !r) && (J(P), x.current = !0);
514
+ }), ft = async () => {
515
+ if (s && !r || !l || u === C.URL && !Ye(l)) {
516
516
  Kn(!0);
517
517
  return;
518
518
  }
519
519
  if (a)
520
- if (e) {
521
- const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? hr.id : gr.id;
522
- await O.executeCommand(h, {
523
- id: e,
520
+ if (t) {
521
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? Rr.id : Lr.id;
522
+ await T.executeCommand(h, {
523
+ id: t,
524
524
  unitId: a.unitId,
525
525
  subUnitId: a.subUnitId,
526
526
  payload: {
527
- display: o ? i : "",
528
- payload: Vt(u, l)
527
+ display: s ? r : "",
528
+ payload: jt(u, l)
529
529
  },
530
530
  row: a.row,
531
531
  column: a.col,
532
- documentId: a.type === m.ZEN_EDITOR ? N : C.getCurrentEditorId()
532
+ documentId: a.type === m.ZEN_EDITOR ? N : S.getCurrentEditorId()
533
533
  });
534
534
  } else {
535
- const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? mr.id : fr.id;
536
- await O.executeCommand(h, {
535
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? Pr.id : kr.id;
536
+ await T.executeCommand(h, {
537
537
  unitId: a.unitId,
538
538
  subUnitId: a.subUnitId,
539
539
  link: {
540
540
  id: or(),
541
541
  row: a.row,
542
542
  column: a.col,
543
- payload: Vt(u, l),
544
- display: o ? i : ""
543
+ payload: jt(u, l),
544
+ display: s ? r : ""
545
545
  },
546
- documentId: a.type === m.ZEN_EDITOR ? N : C.getCurrentEditorId()
546
+ documentId: a.type === m.ZEN_EDITOR ? N : S.getCurrentEditorId()
547
547
  });
548
548
  }
549
549
  if ((a == null ? void 0 : a.type) === m.VIEWING) {
550
- await O.executeCommand(bn.id, {
550
+ await T.executeCommand(Pn.id, {
551
551
  unitId: a.unitId,
552
552
  subUnitId: a.subUnitId
553
553
  });
554
554
  const h = 1;
555
- await O.executeCommand(Ln.id, {
555
+ await T.executeCommand(wn.id, {
556
556
  range: {
557
557
  startRow: Math.max(a.row - h, 0),
558
558
  endRow: a.row + h,
@@ -561,37 +561,31 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
561
561
  }
562
562
  });
563
563
  }
564
- O.executeCommand(qe.id);
565
- }, Jn = (h) => {
566
- var I;
567
- if (u !== S.RANGE)
568
- return;
569
- const y = (I = ke.current) == null ? void 0 : I.handleOutClick;
570
- y && y(h, () => gt(!1));
564
+ T.executeCommand(Je.id);
571
565
  };
572
- return a ? /* @__PURE__ */ Ce("div", { className: gn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: Jn, children: [
573
- o ? /* @__PURE__ */ f(
566
+ return a ? /* @__PURE__ */ Se("div", { className: vn.cellLinkEdit, style: { display: n ? "none" : "block" }, children: [
567
+ s ? /* @__PURE__ */ v(
574
568
  ve,
575
569
  {
576
570
  label: d.t("hyperLink.form.label"),
577
- error: B && !i ? d.t("hyperLink.form.inputError") : "",
578
- children: /* @__PURE__ */ f(
579
- an,
571
+ error: ge && !r ? d.t("hyperLink.form.inputError") : "",
572
+ children: /* @__PURE__ */ v(
573
+ un,
580
574
  {
581
- value: i,
575
+ value: r,
582
576
  onChange: (h) => {
583
- Q(h), x.current = !1;
577
+ J(h), x.current = !1;
584
578
  },
585
579
  placeholder: d.t("hyperLink.form.labelPlaceholder"),
586
580
  autoFocus: !0,
587
581
  onKeyDown: (h) => {
588
- h.keyCode === Lt.ENTER && vt();
582
+ h.keyCode === Pt.ENTER && ft();
589
583
  }
590
584
  }
591
585
  )
592
586
  }
593
587
  ) : null,
594
- /* @__PURE__ */ f(ve, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ f(
588
+ /* @__PURE__ */ v(ve, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ v(
595
589
  yt,
596
590
  {
597
591
  options: zn,
@@ -601,58 +595,57 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
601
595
  }
602
596
  }
603
597
  ) }),
604
- u === S.URL && /* @__PURE__ */ f(
598
+ u === C.URL && /* @__PURE__ */ v(
605
599
  ve,
606
600
  {
607
- error: B ? l ? Ke(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
608
- children: /* @__PURE__ */ f(
609
- an,
601
+ error: ge ? l ? Ye(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
602
+ children: /* @__PURE__ */ v(
603
+ un,
610
604
  {
611
605
  value: l,
612
606
  onChange: (h) => {
613
- g(h), h && (x.current || !i || i === l) && (Q(h), x.current = !0);
607
+ g(h), h && (x.current || !r || r === l) && (J(h), x.current = !0);
614
608
  },
615
609
  placeholder: d.t("hyperLink.form.linkPlaceholder"),
616
610
  autoFocus: !0,
617
611
  onKeyDown: (h) => {
618
- h.keyCode === Lt.ENTER && vt();
612
+ h.keyCode === Pt.ENTER && ft();
619
613
  }
620
614
  }
621
615
  )
622
616
  }
623
617
  ),
624
- u === S.RANGE && /* @__PURE__ */ f(ve, { error: B && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ f(
625
- pi,
618
+ u === C.RANGE && /* @__PURE__ */ v(ve, { error: ge && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ v(
619
+ di,
626
620
  {
627
- unitId: F.getUnitId(),
621
+ unitId: B.getUnitId(),
628
622
  subUnitId: Yn,
629
- isOnlyOneRange: !0,
630
- isSupportAcrossSheet: !0,
631
- initValue: l,
632
- onChange: qn,
633
- isFocus: be,
634
- onFocus: () => gt(!0),
635
- actions: ke.current,
623
+ maxRangeCount: 1,
624
+ supportAcrossSheet: !0,
625
+ initialValue: l,
626
+ resetRange: Gn,
627
+ onChange: (h, E) => qn(E),
636
628
  onRangeSelectorDialogVisibleChange: async (h) => {
637
- var y, I;
638
- if (h)
639
- a.type === m.ZEN_EDITOR && (D.hide(), oe.setContextValue(Ct, !0)), a.type !== m.VIEWING && C.enableForceKeepVisible(), r(!0);
629
+ var E, R;
630
+ if (Ae(h), h)
631
+ a.type === m.ZEN_EDITOR && (D.hide(), ie.setContextValue(Ct, !0)), a.type !== m.VIEWING && S.enableForceKeepVisible(), i(!0);
640
632
  else {
641
633
  if (await U.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === m.ZEN_EDITOR) {
642
- await O.executeCommand(kn.id, {
634
+ await T.executeCommand(Ln.id, {
643
635
  unitId: a.unitId,
644
636
  subUnitId: a.subUnitId,
645
637
  selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
646
- }), D.show(), oe.setContextValue(Ct, !1);
647
- const P = (y = X.getRenderById(N)) == null ? void 0 : y.with(ni), M = (I = Pe.getTextRanges({ unitId: N, subUnitId: N })) == null ? void 0 : I[0];
648
- P && M && (P.scrollToRange(M), Pe.refreshSelection({ unitId: N, subUnitId: N }));
638
+ }), D.show(), ie.setContextValue(Ct, !1);
639
+ const P = (E = X.getRenderById(N)) == null ? void 0 : E.with(ni), M = (R = Le.getTextRanges({ unitId: N, subUnitId: N })) == null ? void 0 : R[0];
640
+ P && M && (P.scrollToRange(M), Le.refreshSelection({ unitId: N, subUnitId: N }));
649
641
  }
650
- C.disableForceKeepVisible(), r(!1);
642
+ S.disableForceKeepVisible(), i(!1);
651
643
  }
652
- }
644
+ },
645
+ onFocusChange: (h) => Wt(h)
653
646
  }
654
647
  ) }),
655
- u === S.SHEET && /* @__PURE__ */ f(ve, { error: B && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f(
648
+ u === C.SHEET && /* @__PURE__ */ v(ve, { error: ge && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ v(
656
649
  yt,
657
650
  {
658
651
  options: mt,
@@ -660,55 +653,55 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
660
653
  onChange: (h) => {
661
654
  var P, M;
662
655
  g(h);
663
- const y = (P = mt.find((j) => j.value === h)) == null ? void 0 : P.label, I = (M = mt.find((j) => j.value === l)) == null ? void 0 : M.label;
664
- y && (x.current || !i || i === I) && (Q(y), x.current = !0);
656
+ const E = (P = mt.find((F) => F.value === h)) == null ? void 0 : P.label, R = (M = mt.find((F) => F.value === l)) == null ? void 0 : M.label;
657
+ E && (x.current || !r || r === R) && (J(E), x.current = !0);
665
658
  }
666
659
  }
667
660
  ) }),
668
- u === S.DEFINE_NAME && /* @__PURE__ */ f(ve, { error: B && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f(
661
+ u === C.DEFINE_NAME && /* @__PURE__ */ v(ve, { error: ge && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ v(
669
662
  yt,
670
663
  {
671
- options: ft,
664
+ options: vt,
672
665
  value: l,
673
666
  onChange: (h) => {
674
667
  var P, M;
675
668
  g(h);
676
- const y = (P = ft.find((j) => j.value === h)) == null ? void 0 : P.label, I = (M = ft.find((j) => j.value === l)) == null ? void 0 : M.label;
677
- y && (x.current || !i || i === I) && (Q(y), x.current = !0);
669
+ const E = (P = vt.find((F) => F.value === h)) == null ? void 0 : P.label, R = (M = vt.find((F) => F.value === l)) == null ? void 0 : M.label;
670
+ E && (x.current || !r || r === R) && (J(E), x.current = !0);
678
671
  }
679
672
  }
680
673
  ) }),
681
- (se == null ? void 0 : se.Form) && /* @__PURE__ */ f(
682
- se.Form,
674
+ ($e == null ? void 0 : $e.Form) && /* @__PURE__ */ v(
675
+ $e.Form,
683
676
  {
684
- linkId: e,
677
+ linkId: t,
685
678
  payload: l,
686
- display: i,
687
- showError: B,
679
+ display: r,
680
+ showError: ge,
688
681
  setByPayload: x,
689
682
  setDisplay: (h) => {
690
- Q(h), x.current = !0;
683
+ J(h), x.current = !0;
691
684
  },
692
685
  setPayload: g
693
686
  }
694
687
  ),
695
- /* @__PURE__ */ Ce("div", { className: gn.cellLinkEditButtons, children: [
696
- /* @__PURE__ */ f(
697
- cn,
688
+ /* @__PURE__ */ Se("div", { className: vn.cellLinkEditButtons, children: [
689
+ /* @__PURE__ */ v(
690
+ dn,
698
691
  {
699
692
  onClick: () => {
700
- a && U.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), O.executeCommand(qe.id);
693
+ a && U.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), T.executeCommand(Je.id);
701
694
  },
702
695
  children: d.t("hyperLink.form.cancel")
703
696
  }
704
697
  ),
705
- /* @__PURE__ */ f(
706
- cn,
698
+ /* @__PURE__ */ v(
699
+ dn,
707
700
  {
708
701
  type: "primary",
709
702
  style: { marginLeft: 8 },
710
703
  onClick: async () => {
711
- vt();
704
+ ft();
712
705
  },
713
706
  children: d.t("hyperLink.form.ok")
714
707
  }
@@ -716,249 +709,236 @@ const yi = "univer-cell-link-edit", Ei = "univer-cell-link-edit-buttons", gn = {
716
709
  ] })
717
710
  ] }) : null;
718
711
  };
719
- ze.componentKey = "univer.sheet.cell-link-edit";
720
- var A = function() {
721
- return A = Object.assign || function(e) {
722
- for (var t, n = 1, r = arguments.length; n < r; n++) {
723
- t = arguments[n];
724
- for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
712
+ Xe.componentKey = "univer.sheet.cell-link-edit";
713
+ var V = function() {
714
+ return V = Object.assign || function(t) {
715
+ for (var e, n = 1, i = arguments.length; n < i; n++) {
716
+ e = arguments[n];
717
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
725
718
  }
726
- return e;
727
- }, A.apply(this, arguments);
728
- }, Ri = function(e, t) {
719
+ return t;
720
+ }, V.apply(this, arguments);
721
+ }, Ei = function(t, e) {
729
722
  var n = {};
730
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
731
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
732
- for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
733
- t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
723
+ for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
724
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
725
+ for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
726
+ e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
734
727
  return n;
735
- }, me = he(function(e, t) {
736
- var n = e.icon, r = e.id, i = e.className, s = e.extend, o = Ri(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), u = Pt("_".concat(ki()));
737
- return Dn(n, "".concat(r), { defIds: n.defIds, idSuffix: u.current }, A({ ref: t, className: c }, o), s);
728
+ }, pe = ue(function(t, e) {
729
+ var n = t.icon, i = t.id, r = t.className, o = t.extend, s = Ei(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), u = Un("_".concat(Pi()));
730
+ return Dn(n, "".concat(i), { defIds: n.defIds, idSuffix: u.current }, V({ ref: e, className: c }, s), o);
738
731
  });
739
- function Dn(e, t, n, r, i) {
740
- return ge(e.tag, A(A({ key: t }, Li(e, n, i)), r), (Pi(e, n).children || []).map(function(s, o) {
741
- return Dn(s, "".concat(t, "-").concat(e.tag, "-").concat(o), n, void 0, i);
732
+ function Dn(t, e, n, i, r) {
733
+ return de(t.tag, V(V({ key: e }, Ri(t, n, r)), i), (Li(t, n).children || []).map(function(o, s) {
734
+ return Dn(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, r);
742
735
  }));
743
736
  }
744
- function Li(e, t, n) {
745
- var r = A({}, e.attrs);
746
- n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(function(s) {
747
- var o = s[0], c = s[1];
748
- o === "mask" && typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
737
+ function Ri(t, e, n) {
738
+ var i = V({}, t.attrs);
739
+ 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(function(o) {
740
+ var s = o[0], c = o[1];
741
+ s === "mask" && typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
749
742
  });
750
- var i = t.defIds;
751
- return !i || i.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(function(s) {
752
- var o = s[0], c = s[1];
753
- typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
754
- })), r;
743
+ var r = e.defIds;
744
+ return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(o) {
745
+ var s = o[0], c = o[1];
746
+ typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
747
+ })), i;
755
748
  }
756
- function Pi(e, t) {
757
- var n, r = t.defIds;
758
- return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? A(A({}, e), { children: e.children.map(function(i) {
759
- return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? A(A({}, i), { attrs: A(A({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
760
- }) }) : e;
749
+ function Li(t, e) {
750
+ var n, i = e.defIds;
751
+ return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? V(V({}, t), { children: t.children.map(function(r) {
752
+ return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? V(V({}, r), { attrs: V(V({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
753
+ }) }) : t;
761
754
  }
762
- function ki() {
755
+ function Pi() {
763
756
  return Math.random().toString(36).substring(2, 8);
764
757
  }
765
- me.displayName = "UniverIcon";
766
- var bi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ze = he(function(e, t) {
767
- return ge(me, Object.assign({}, e, {
758
+ pe.displayName = "UniverIcon";
759
+ var ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ge = ue(function(t, e) {
760
+ return de(pe, Object.assign({}, t, {
768
761
  id: "all-border-single",
769
- ref: t,
770
- icon: bi
762
+ ref: e,
763
+ icon: ki
771
764
  }));
772
765
  });
773
- Ze.displayName = "AllBorderSingle";
774
- var wi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.1302 12.4251C4.25802 13.7417 5.36779 14.7708 6.71792 14.7708H11.7179C13.1539 14.7708 14.3179 13.6067 14.3179 12.1708V6.1708C14.3179 4.78586 13.2351 3.65383 11.8698 3.57517C11.742 2.25858 10.6323 1.22949 9.28213 1.22949H4.28213C2.84619 1.22949 1.68213 2.39355 1.68213 3.82949V9.82949C1.68213 11.2144 2.76497 12.3465 4.1302 12.4251ZM10.6583 3.5708H6.71792C5.28198 3.5708 4.11792 4.73486 4.11792 6.1708V11.22C3.4221 11.1387 2.88213 10.5471 2.88213 9.82949V3.82949C2.88213 3.05629 3.50893 2.42949 4.28213 2.42949H9.28213C9.96695 2.42949 10.5369 2.92119 10.6583 3.5708ZM13.1179 6.1708C13.1179 5.3976 12.4911 4.7708 11.7179 4.7708H6.71792C5.94472 4.7708 5.31792 5.3976 5.31792 6.1708V12.1708C5.31792 12.944 5.94472 13.5708 6.71792 13.5708H11.7179C12.4911 13.5708 13.1179 12.944 13.1179 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, An = he(function(e, t) {
775
- return ge(me, Object.assign({}, e, {
766
+ Ge.displayName = "AllBorderSingle";
767
+ var bi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.1302 12.4251C4.25802 13.7417 5.36779 14.7708 6.71792 14.7708H11.7179C13.1539 14.7708 14.3179 13.6067 14.3179 12.1708V6.1708C14.3179 4.78586 13.2351 3.65383 11.8698 3.57517C11.742 2.25858 10.6323 1.22949 9.28213 1.22949H4.28213C2.84619 1.22949 1.68213 2.39355 1.68213 3.82949V9.82949C1.68213 11.2144 2.76497 12.3465 4.1302 12.4251ZM10.6583 3.5708H6.71792C5.28198 3.5708 4.11792 4.73486 4.11792 6.1708V11.22C3.4221 11.1387 2.88213 10.5471 2.88213 9.82949V3.82949C2.88213 3.05629 3.50893 2.42949 4.28213 2.42949H9.28213C9.96695 2.42949 10.5369 2.92119 10.6583 3.5708ZM13.1179 6.1708C13.1179 5.3976 12.4911 4.7708 11.7179 4.7708H6.71792C5.94472 4.7708 5.31792 5.3976 5.31792 6.1708V12.1708C5.31792 12.944 5.94472 13.5708 6.71792 13.5708H11.7179C12.4911 13.5708 13.1179 12.944 13.1179 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vn = ue(function(t, e) {
768
+ return de(pe, Object.assign({}, t, {
776
769
  id: "copy-single",
777
- ref: t,
778
- icon: wi
770
+ ref: e,
771
+ icon: bi
779
772
  }));
780
773
  });
781
- An.displayName = "CopySingle";
782
- var Oi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, xt = he(function(e, t) {
783
- return ge(me, Object.assign({}, e, {
774
+ Vn.displayName = "CopySingle";
775
+ var wi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, Vt = ue(function(t, e) {
776
+ return de(pe, Object.assign({}, t, {
784
777
  id: "link-single",
785
- ref: t,
786
- icon: Oi
778
+ ref: e,
779
+ icon: wi
787
780
  }));
788
781
  });
789
- xt.displayName = "LinkSingle";
790
- var Ti = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, $n = he(function(e, t) {
791
- return ge(me, Object.assign({}, e, {
782
+ Vt.displayName = "LinkSingle";
783
+ var Ti = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, An = ue(function(t, e) {
784
+ return de(pe, Object.assign({}, t, {
792
785
  id: "unlink-single",
793
- ref: t,
786
+ ref: e,
794
787
  icon: Ti
795
788
  }));
796
789
  });
797
- $n.displayName = "UnlinkSingle";
798
- var Ni = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, Bn = he(function(e, t) {
799
- return ge(me, Object.assign({}, e, {
790
+ An.displayName = "UnlinkSingle";
791
+ var Oi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, $n = ue(function(t, e) {
792
+ return de(pe, Object.assign({}, t, {
800
793
  id: "write-single",
801
- ref: t,
802
- icon: Ni
794
+ ref: e,
795
+ icon: Oi
803
796
  }));
804
797
  });
805
- Bn.displayName = "WriteSingle";
806
- var Mi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.4538 1.12549C2.70051 1.12549 2.08984 1.73615 2.08984 2.48945V13.5104C2.08984 14.2637 2.70051 14.8744 3.4538 14.8744H12.5468C13.3001 14.8744 13.9108 14.2637 13.9108 13.5104V5.0992L10.0094 1.12549H3.4538Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M10.0078 1.12549L13.9107 5.09842H10.6745C10.3063 5.09842 10.0078 4.79994 10.0078 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.80941 10.2949L6.37701 12.403C6.2632 12.5705 6.03516 12.614 5.86766 12.5002C5.70017 12.3864 5.65664 12.1584 5.77045 11.9909L7.36611 9.64252L5.94103 7.54519C5.82722 7.37769 5.87074 7.14964 6.03824 7.03583C6.20573 6.92202 6.43378 6.96555 6.54759 7.13304L7.80941 8.9901L9.07123 7.13304C9.18504 6.96555 9.41309 6.92202 9.58059 7.03583C9.74808 7.14964 9.7916 7.37769 9.67779 7.54519L8.25271 9.64252L9.84837 11.9909C9.96218 12.1584 9.91866 12.3864 9.75116 12.5002C9.58366 12.614 9.35562 12.5705 9.24181 12.403L7.80941 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vn = he(function(e, t) {
807
- return ge(me, Object.assign({}, e, {
798
+ $n.displayName = "WriteSingle";
799
+ var Ni = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.4538 1.12549C2.70051 1.12549 2.08984 1.73615 2.08984 2.48945V13.5104C2.08984 14.2637 2.70051 14.8744 3.4538 14.8744H12.5468C13.3001 14.8744 13.9108 14.2637 13.9108 13.5104V5.0992L10.0094 1.12549H3.4538Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M10.0078 1.12549L13.9107 5.09842H10.6745C10.3063 5.09842 10.0078 4.79994 10.0078 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.80941 10.2949L6.37701 12.403C6.2632 12.5705 6.03516 12.614 5.86766 12.5002C5.70017 12.3864 5.65664 12.1584 5.77045 11.9909L7.36611 9.64252L5.94103 7.54519C5.82722 7.37769 5.87074 7.14964 6.03824 7.03583C6.20573 6.92202 6.43378 6.96555 6.54759 7.13304L7.80941 8.9901L9.07123 7.13304C9.18504 6.96555 9.41309 6.92202 9.58059 7.03583C9.74808 7.14964 9.7916 7.37769 9.67779 7.54519L8.25271 9.64252L9.84837 11.9909C9.96218 12.1584 9.91866 12.3864 9.75116 12.5002C9.58366 12.614 9.35562 12.5705 9.24181 12.403L7.80941 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Bn = ue(function(t, e) {
800
+ return de(pe, Object.assign({}, t, {
808
801
  id: "xlsx",
809
- ref: t,
810
- icon: Mi
802
+ ref: e,
803
+ icon: Ni
811
804
  }));
812
805
  });
813
- Vn.displayName = "Xlsx";
814
- function Fn(e) {
815
- var t, n, r = "";
816
- if (typeof e == "string" || typeof e == "number") r += e;
817
- else if (typeof e == "object") if (Array.isArray(e)) {
818
- var i = e.length;
819
- for (t = 0; t < i; t++) e[t] && (n = Fn(e[t])) && (r && (r += " "), r += n);
820
- } else for (n in e) e[n] && (r && (r += " "), r += n);
821
- return r;
822
- }
823
- function mn() {
824
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Fn(e)) && (r && (r += " "), r += t);
825
- return r;
826
- }
827
- const Ui = "univer-cell-link", Hi = "univer-cell-link-type", xi = "univer-cell-link-content", Di = "univer-cell-link-content-error", Ai = "univer-cell-link-url", $i = "univer-cell-link-operations", Bi = "univer-cell-link-operation", Vi = "univer-cell-link-operation-error", Z = {
828
- cellLink: Ui,
829
- cellLinkType: Hi,
830
- cellLinkContent: xi,
831
- cellLinkContentError: Di,
832
- cellLinkUrl: Ai,
833
- cellLinkOperations: $i,
834
- cellLinkOperation: Bi,
835
- cellLinkOperationError: Vi
836
- }, Fi = {
837
- [S.URL]: /* @__PURE__ */ f(xt, {}),
838
- [S.SHEET]: /* @__PURE__ */ f(Vn, {}),
839
- [S.RANGE]: /* @__PURE__ */ f(Ze, {}),
840
- [S.DEFINE_NAME]: /* @__PURE__ */ f(Ze, {}),
841
- [S.INVALID]: /* @__PURE__ */ f(Ze, {})
842
- }, fn = (e) => {
843
- var U, O;
844
- const t = E(K), n = E(ie), r = E(Nn), i = E(ct), s = E(pe), o = E(re), c = E(wt), u = E(pt), { customRange: p, row: l, col: g, unitId: d, subUnitId: _, editPermission: C, copyPermission: v, type: w } = e;
806
+ Bn.displayName = "Xlsx";
807
+ const Mi = "univer-cell-link", Ui = "univer-cell-link-type", Hi = "univer-cell-link-content", xi = "univer-cell-link-content-error", Di = "univer-cell-link-url", Vi = "univer-cell-link-operations", Ai = "univer-cell-link-operation", $i = "univer-cell-link-operation-error", j = {
808
+ cellLink: Mi,
809
+ cellLinkType: Ui,
810
+ cellLinkContent: Hi,
811
+ cellLinkContentError: xi,
812
+ cellLinkUrl: Di,
813
+ cellLinkOperations: Vi,
814
+ cellLinkOperation: Ai,
815
+ cellLinkOperationError: $i
816
+ }, Bi = {
817
+ [C.URL]: /* @__PURE__ */ v(Vt, {}),
818
+ [C.SHEET]: /* @__PURE__ */ v(Bn, {}),
819
+ [C.RANGE]: /* @__PURE__ */ v(Ge, {}),
820
+ [C.DEFINE_NAME]: /* @__PURE__ */ v(Ge, {}),
821
+ [C.INVALID]: /* @__PURE__ */ v(Ge, {})
822
+ }, fn = (t) => {
823
+ var U, T;
824
+ const e = I(K), n = I(re), i = I(On), r = I(lt), o = I(le), s = I(ne), c = I(Ht), u = I(ht), { customRange: p, row: l, col: g, unitId: d, subUnitId: _, editPermission: S, copyPermission: f, type: k } = t;
845
825
  if (!((U = p == null ? void 0 : p.properties) != null && U.url))
846
826
  return null;
847
- const a = c.parseHyperLink((O = p.properties.url) != null ? O : ""), k = a.type === S.INVALID;
848
- return /* @__PURE__ */ Ce("div", { className: Z.cellLink, onClick: () => t.hideCurrentPopup(), children: [
849
- /* @__PURE__ */ Ce(
827
+ const a = c.parseHyperLink((T = p.properties.url) != null ? T : ""), b = a.type === C.INVALID;
828
+ return /* @__PURE__ */ Se("div", { className: j.cellLink, onClick: () => e.hideCurrentPopup(), children: [
829
+ /* @__PURE__ */ Se(
850
830
  "div",
851
831
  {
852
- className: mn(Z.cellLinkContent, { [Z.cellLinkContentError]: k }),
832
+ className: pn(j.cellLinkContent, { [j.cellLinkContentError]: b }),
853
833
  onClick: () => {
854
- u.visible || k || s.navigate(a);
834
+ u.visible || b || o.navigate(a);
855
835
  },
856
836
  children: [
857
- /* @__PURE__ */ f("div", { className: Z.cellLinkType, children: Fi[a.type] }),
858
- /* @__PURE__ */ f(Ve, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ f("span", { className: Z.cellLinkUrl, children: a.name }) })
837
+ /* @__PURE__ */ v("div", { className: j.cellLinkType, children: Bi[a.type] }),
838
+ /* @__PURE__ */ v(Fe, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ v("span", { className: j.cellLinkUrl, children: a.name }) })
859
839
  ]
860
840
  }
861
841
  ),
862
- /* @__PURE__ */ Ce("div", { className: Z.cellLinkOperations, children: [
863
- v && /* @__PURE__ */ f(
842
+ /* @__PURE__ */ Se("div", { className: j.cellLinkOperations, children: [
843
+ f && /* @__PURE__ */ v(
864
844
  "div",
865
845
  {
866
- className: mn(Z.cellLinkOperation, { [Z.cellLinkOperationError]: k }),
846
+ className: pn(j.cellLinkOperation, { [j.cellLinkOperationError]: b }),
867
847
  onClick: () => {
868
- if (!k) {
869
- if (a.type !== S.URL) {
848
+ if (!b) {
849
+ if (a.type !== C.URL) {
870
850
  const L = new URL(window.location.href);
871
851
  L.hash = a.url.slice(1), navigator.clipboard.writeText(L.href);
872
852
  } else
873
853
  navigator.clipboard.writeText(a.url);
874
- r.show({
875
- content: i.t("hyperLink.message.coped"),
876
- type: Ne.Info
854
+ i.show({
855
+ content: r.t("hyperLink.message.coped"),
856
+ type: Oe.Info
877
857
  });
878
858
  }
879
859
  },
880
- children: /* @__PURE__ */ f(Ve, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ f(An, {}) })
860
+ children: /* @__PURE__ */ v(Fe, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ v(Vn, {}) })
881
861
  }
882
862
  ),
883
- C && /* @__PURE__ */ Ce(di, { children: [
884
- /* @__PURE__ */ f(
863
+ S && /* @__PURE__ */ Se(ui, { children: [
864
+ /* @__PURE__ */ v(
885
865
  "div",
886
866
  {
887
- className: Z.cellLinkOperation,
867
+ className: j.cellLinkOperation,
888
868
  onClick: () => {
889
- n.executeCommand(At.id, {
869
+ n.executeCommand($t.id, {
890
870
  unitId: d,
891
871
  subUnitId: _,
892
872
  row: l,
893
873
  col: g,
894
874
  customRangeId: p.rangeId,
895
- type: w
875
+ type: k
896
876
  });
897
877
  },
898
- children: /* @__PURE__ */ f(Ve, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ f(Bn, {}) })
878
+ children: /* @__PURE__ */ v(Fe, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ v($n, {}) })
899
879
  }
900
880
  ),
901
- /* @__PURE__ */ f(
881
+ /* @__PURE__ */ v(
902
882
  "div",
903
883
  {
904
- className: Z.cellLinkOperation,
884
+ className: j.cellLinkOperation,
905
885
  onClick: () => {
906
- const L = w === m.EDITING || w === m.ZEN_EDITOR ? vr.id : _r.id;
886
+ const L = k === m.EDITING || k === m.ZEN_EDITOR ? br.id : wr.id;
907
887
  n.syncExecuteCommand(L, {
908
888
  unitId: d,
909
889
  subUnitId: _,
910
890
  id: p.rangeId,
911
891
  row: l,
912
892
  column: g,
913
- documentId: w === m.ZEN_EDITOR ? N : o.getCurrentEditorId()
914
- }) && t.hideCurrentPopup(void 0, !0);
893
+ documentId: k === m.ZEN_EDITOR ? N : s.getCurrentEditorId()
894
+ }) && e.hideCurrentPopup(void 0, !0);
915
895
  },
916
- children: /* @__PURE__ */ f(Ve, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ f($n, {}) })
896
+ children: /* @__PURE__ */ v(Fe, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ v(An, {}) })
917
897
  }
918
898
  )
919
899
  ] })
920
900
  ] })
921
901
  ] });
922
- }, Xe = () => {
923
- var i, s;
924
- const e = E(K), [t, n] = J(null), r = E(Y);
925
- if (ne(() => {
926
- n(e.currentPopup);
927
- const o = e.currentPopup$.subscribe((c) => {
902
+ }, qe = () => {
903
+ var r, o;
904
+ const t = I(K), [e, n] = G(null), i = I(Y);
905
+ if (te(() => {
906
+ n(t.currentPopup);
907
+ const s = t.currentPopup$.subscribe((c) => {
928
908
  n(c);
929
909
  });
930
910
  return () => {
931
- o.unsubscribe();
911
+ s.unsubscribe();
932
912
  };
933
- }, [e.currentPopup, e.currentPopup$]), !t)
913
+ }, [t.currentPopup, t.currentPopup$]), !e)
934
914
  return null;
935
- if (t.showAll) {
936
- const o = r.getUnit(t.unitId, b.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(t.subUnitId), u = c == null ? void 0 : c.getCell(t.row, t.col), p = (s = (i = u == null ? void 0 : u.p) == null ? void 0 : i.body) == null ? void 0 : s.customRanges;
937
- return p != null && p.length ? /* @__PURE__ */ f("div", { children: p.map((l) => /* @__PURE__ */ f(fn, { ...t, customRange: l }, l.rangeId)) }) : null;
915
+ if (e.showAll) {
916
+ const s = i.getUnit(e.unitId, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), u = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (r = u == null ? void 0 : u.p) == null ? void 0 : r.body) == null ? void 0 : o.customRanges;
917
+ return p != null && p.length ? /* @__PURE__ */ v("div", { children: p.map((l) => /* @__PURE__ */ v(fn, { ...e, customRange: l }, l.rangeId)) }) : null;
938
918
  }
939
- return /* @__PURE__ */ f(fn, { ...t });
919
+ return /* @__PURE__ */ v(fn, { ...e });
940
920
  };
941
- Xe.componentKey = "univer.sheet.cell-link-popup";
942
- var ji = Object.getOwnPropertyDescriptor, Wi = (e, t, n, r) => {
943
- for (var i = r > 1 ? void 0 : r ? ji(t, n) : t, s = e.length - 1, o; s >= 0; s--)
944
- (o = e[s]) && (i = o(i) || i);
945
- return i;
946
- }, ce = (e, t) => (n, r) => t(n, r, e);
947
- const vn = (e, t) => {
948
- var n, r;
949
- return e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col && ((n = e.customRange) == null ? void 0 : n.rangeId) === ((r = t.customRange) == null ? void 0 : r.rangeId) && e.type === t.type;
921
+ qe.componentKey = "univer.sheet.cell-link-popup";
922
+ var Fi = Object.getOwnPropertyDescriptor, Wi = (t, e, n, i) => {
923
+ for (var r = i > 1 ? void 0 : i ? Fi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
924
+ (s = t[o]) && (r = s(r) || r);
925
+ return r;
926
+ }, se = (t, e) => (n, i) => e(n, i, t);
927
+ const _n = (t, e) => {
928
+ var n, i;
929
+ return t.unitId === e.unitId && t.subUnitId === e.subUnitId && t.row === e.row && t.col === e.col && ((n = t.customRange) == null ? void 0 : n.rangeId) === ((i = e.customRange) == null ? void 0 : i.rangeId) && t.type === e.type;
950
930
  };
951
931
  let K = class extends z {
952
- constructor(t, n, r, i, s, o, c) {
932
+ constructor(e, n, i, r, o, s, c) {
953
933
  super();
954
- V(this, "_currentPopup", null);
955
- V(this, "_currentPopup$", new si());
956
- V(this, "currentPopup$", this._currentPopup$.asObservable());
957
- V(this, "_currentEditingPopup", null);
958
- V(this, "_currentEditing$", new ai(null));
959
- V(this, "currentEditing$", this._currentEditing$.asObservable());
960
- V(this, "_isKeepVisible", !1);
961
- this._sheetCanvasPopManagerService = t, this._injector = n, this._univerInstanceService = r, this._editorBridgeService = i, this._textSelectionManagerService = s, this._docCanvasPopManagerService = o, this._zenZoneService = c, this.disposeWithMe(() => {
934
+ $(this, "_currentPopup", null);
935
+ $(this, "_currentPopup$", new si());
936
+ $(this, "currentPopup$", this._currentPopup$.asObservable());
937
+ $(this, "_currentEditingPopup", null);
938
+ $(this, "_currentEditing$", new ai(null));
939
+ $(this, "currentEditing$", this._currentEditing$.asObservable());
940
+ $(this, "_isKeepVisible", !1);
941
+ this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService = o, this._docCanvasPopManagerService = s, this._zenZoneService = c, this.disposeWithMe(() => {
962
942
  this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
963
943
  });
964
944
  }
@@ -968,38 +948,38 @@ let K = class extends z {
968
948
  get currentEditing() {
969
949
  return this._currentEditing$.getValue();
970
950
  }
971
- setIsKeepVisible(t) {
972
- this._isKeepVisible = t;
951
+ setIsKeepVisible(e) {
952
+ this._isKeepVisible = e;
973
953
  }
974
954
  getIsKeepVisible() {
975
955
  return this._isKeepVisible;
976
956
  }
977
- showPopup(t) {
978
- if (this._currentPopup && vn(t, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), t.type !== m.ZEN_EDITOR && this._zenZoneService.visible))
957
+ showPopup(e) {
958
+ if (this._currentPopup && _n(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== m.ZEN_EDITOR && this._zenZoneService.visible))
979
959
  return;
980
960
  const n = this._currentEditing$.getValue();
981
- if (n && vn(t, n))
961
+ if (n && _n(e, n))
982
962
  return;
983
- const { unitId: r, subUnitId: i, row: s, col: o, customRangeRect: c, customRange: u } = t;
963
+ const { unitId: i, subUnitId: r, row: o, col: s, customRangeRect: c, customRange: u } = e;
984
964
  let p;
985
965
  const l = {
986
- componentKey: Xe.componentKey,
966
+ componentKey: qe.componentKey,
987
967
  direction: "bottom",
988
968
  onClickOutside: () => {
989
969
  this.hideCurrentPopup();
990
970
  },
991
971
  onClick: () => {
992
- this.hideCurrentPopup(t.type, !0);
972
+ this.hideCurrentPopup(e.type, !0);
993
973
  }
994
974
  };
995
- if (t.type === m.EDITING) {
975
+ if (e.type === m.EDITING) {
996
976
  if (!u)
997
977
  return;
998
978
  p = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
999
979
  c,
1000
980
  l
1001
981
  );
1002
- } else if (t.type === m.ZEN_EDITOR) {
982
+ } else if (e.type === m.ZEN_EDITOR) {
1003
983
  if (!u)
1004
984
  return;
1005
985
  p = this._docCanvasPopManagerService.attachPopupToRange(
@@ -1011,79 +991,79 @@ let K = class extends z {
1011
991
  l,
1012
992
  N
1013
993
  );
1014
- } else if (t.showAll)
1015
- p = this._sheetCanvasPopManagerService.attachPopupToCell(t.row, t.col, l, r, i);
994
+ } else if (e.showAll)
995
+ p = this._sheetCanvasPopManagerService.attachPopupToCell(e.row, e.col, l, i, r);
1016
996
  else {
1017
997
  if (!u)
1018
998
  return;
1019
999
  p = c && this._sheetCanvasPopManagerService.attachPopupByPosition(
1020
1000
  c,
1021
1001
  l,
1022
- t
1002
+ e
1023
1003
  );
1024
1004
  }
1025
1005
  p && (this._currentPopup = {
1026
- unitId: r,
1027
- subUnitId: i,
1006
+ unitId: i,
1007
+ subUnitId: r,
1028
1008
  disposable: p,
1029
- row: s,
1030
- col: o,
1031
- editPermission: !!t.editPermission,
1032
- copyPermission: !!t.copyPermission,
1009
+ row: o,
1010
+ col: s,
1011
+ editPermission: !!e.editPermission,
1012
+ copyPermission: !!e.copyPermission,
1033
1013
  customRange: u,
1034
- type: t.type,
1035
- showAll: t.showAll
1014
+ type: e.type,
1015
+ showAll: e.showAll
1036
1016
  }, this._currentPopup$.next(this._currentPopup));
1037
1017
  }
1038
- hideCurrentPopup(t, n) {
1039
- var r, i;
1040
- this._currentPopup && ((!t || t === this._currentPopup.type) && this._currentPopup.disposable.canDispose() || n) && ((i = (r = this._currentPopup) == null ? void 0 : r.disposable) == null || i.dispose(), this._currentPopup = null, this._currentPopup$.next(null));
1018
+ hideCurrentPopup(e, n) {
1019
+ var i, r;
1020
+ this._currentPopup && ((!e || e === this._currentPopup.type) && this._currentPopup.disposable.canDispose() || n) && ((r = (i = this._currentPopup) == null ? void 0 : i.disposable) == null || r.dispose(), this._currentPopup = null, this._currentPopup$.next(null));
1041
1021
  }
1042
1022
  _getEditingRange() {
1043
- var r, i, s;
1044
- const t = this._editorBridgeService.isVisible().visible, n = this._editorBridgeService.getEditCellState();
1045
- if (t && n) {
1046
- const o = this._textSelectionManagerService.getActiveTextRange(), c = (r = n.documentLayoutObject.documentModel) == null ? void 0 : r.getBody();
1023
+ var i, r, o;
1024
+ const e = this._editorBridgeService.isVisible().visible, n = this._editorBridgeService.getEditCellState();
1025
+ if (e && n) {
1026
+ const s = this._textSelectionManagerService.getActiveTextRange(), c = (i = n.documentLayoutObject.documentModel) == null ? void 0 : i.getBody();
1047
1027
  if (!c)
1048
1028
  return null;
1049
- if (!o || o.collapsed)
1029
+ if (!s || s.collapsed)
1050
1030
  return {
1051
1031
  startOffset: 0,
1052
1032
  endOffset: c.dataStream.length - 2,
1053
1033
  collapsed: c.dataStream.length - 2 === 0,
1054
- label: Se.transform.getPlainText(c.dataStream)
1034
+ label: _e.transform.getPlainText(c.dataStream)
1055
1035
  };
1056
- const u = Se.customRange.getCustomRangesInterestsWithSelection(o, (s = (i = c.customRanges) == null ? void 0 : i.filter((g) => g.rangeType === Ge.HYPERLINK)) != null ? s : []);
1057
- let p = o.startOffset, l = o.endOffset;
1036
+ const u = _e.customRange.getCustomRangesInterestsWithSelection(s, (o = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Ke.HYPERLINK)) != null ? o : []);
1037
+ let p = s.startOffset, l = s.endOffset;
1058
1038
  return u.forEach((g) => {
1059
1039
  p = Math.min(p, g.startIndex), l = Math.max(l, g.endIndex + 1);
1060
1040
  }), {
1061
1041
  startOffset: p,
1062
1042
  endOffset: l,
1063
1043
  collapsed: p === l,
1064
- label: Se.transform.getPlainText(c.dataStream.slice(p, l))
1044
+ label: _e.transform.getPlainText(c.dataStream.slice(p, l))
1065
1045
  };
1066
1046
  }
1067
1047
  return null;
1068
1048
  }
1069
1049
  get _editPopup() {
1070
1050
  return {
1071
- componentKey: ze.componentKey,
1051
+ componentKey: Xe.componentKey,
1072
1052
  direction: "vertical",
1073
1053
  onClickOutside: () => {
1074
- this.getIsKeepVisible() || this.endEditing();
1054
+ this.endEditing();
1075
1055
  },
1076
1056
  onContextMenu: () => {
1077
- this.getIsKeepVisible() || this.endEditing();
1057
+ this.endEditing();
1078
1058
  },
1079
1059
  hiddenType: "hide"
1080
1060
  };
1081
1061
  }
1082
- startAddEditing(t) {
1083
- var s, o, c, u, p;
1084
- const { unitId: n, subUnitId: r, type: i } = t;
1085
- if (i === m.ZEN_EDITOR) {
1086
- const l = this._univerInstanceService.getUnit(N, b.UNIVER_DOC);
1062
+ startAddEditing(e) {
1063
+ var o, s, c, u, p;
1064
+ const { unitId: n, subUnitId: i, type: r } = e;
1065
+ if (r === m.ZEN_EDITOR) {
1066
+ const l = this._univerInstanceService.getUnit(N, w.UNIVER_DOC);
1087
1067
  if (!l)
1088
1068
  return;
1089
1069
  const g = this._textSelectionManagerService.getActiveTextRange();
@@ -1094,17 +1074,17 @@ let K = class extends z {
1094
1074
  this._editPopup,
1095
1075
  N
1096
1076
  );
1097
- const d = (s = l.getBody()) == null ? void 0 : s.dataStream.slice(g.startOffset, g.endOffset);
1077
+ const d = (o = l.getBody()) == null ? void 0 : o.dataStream.slice(g.startOffset, g.endOffset);
1098
1078
  this._currentEditing$.next({
1099
- ...t,
1079
+ ...e,
1100
1080
  label: d
1101
1081
  });
1102
- } else if (i === m.EDITING) {
1082
+ } else if (r === m.EDITING) {
1103
1083
  const l = this._getEditingRange();
1104
1084
  if (!l)
1105
1085
  return;
1106
- this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: ye, subUnitId: ye });
1107
- const g = this._injector.get(Ae).getRenderById(ye);
1086
+ this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: Ie, subUnitId: Ie });
1087
+ const g = this._injector.get(De).getRenderById(Ie);
1108
1088
  if (!g)
1109
1089
  return;
1110
1090
  const d = ii(l, g);
@@ -1114,162 +1094,164 @@ let K = class extends z {
1114
1094
  d.pop(),
1115
1095
  this._editPopup,
1116
1096
  n,
1117
- r
1097
+ i
1118
1098
  ), this._currentEditing$.next({
1119
- ...t,
1120
- label: (o = l == null ? void 0 : l.label) != null ? o : ""
1099
+ ...e,
1100
+ label: (s = l == null ? void 0 : l.label) != null ? s : ""
1121
1101
  });
1122
1102
  } else {
1123
1103
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1124
- t.row,
1125
- t.col,
1104
+ e.row,
1105
+ e.col,
1126
1106
  this._editPopup,
1127
1107
  n,
1128
- r
1108
+ i
1129
1109
  );
1130
- const l = this._univerInstanceService.getUnit(n, b.UNIVER_SHEET), g = l == null ? void 0 : l.getSheetBySheetId(r), d = g == null ? void 0 : g.getCellRaw(t.row, t.col);
1110
+ const l = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), g = l == null ? void 0 : l.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1131
1111
  this._currentEditing$.next({
1132
- ...t,
1133
- label: d != null && d.p ? Se.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1112
+ ...e,
1113
+ label: d != null && d.p ? _e.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1134
1114
  });
1135
1115
  }
1136
1116
  }
1137
1117
  // eslint-disable-next-line complexity, max-lines-per-function
1138
- startEditing(t) {
1139
- var o, c, u, p, l, g;
1140
- (o = this._currentEditingPopup) == null || o.dispose(), this.hideCurrentPopup(void 0, !0);
1141
- const { unitId: n, subUnitId: r } = t;
1142
- let i, s;
1143
- if (t.type === m.ZEN_EDITOR) {
1144
- const d = this._univerInstanceService.getUnit(N, b.UNIVER_DOC);
1145
- if (i = (u = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((_) => _.rangeId === t.customRangeId), s = i ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(i.startIndex, i.endIndex + 1) : "", !i || !s)
1118
+ startEditing(e) {
1119
+ var s, c, u, p, l, g;
1120
+ (s = this._currentEditingPopup) == null || s.dispose(), this.hideCurrentPopup(void 0, !0);
1121
+ const { unitId: n, subUnitId: i } = e;
1122
+ let r, o;
1123
+ if (e.type === m.ZEN_EDITOR) {
1124
+ const d = this._univerInstanceService.getUnit(N, w.UNIVER_DOC);
1125
+ if (r = (u = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((_) => _.rangeId === e.customRangeId), o = r ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(r.startIndex, r.endIndex + 1) : "", !r || !o)
1146
1126
  return;
1147
1127
  this._textSelectionManagerService.replaceTextRanges([
1148
1128
  {
1149
- startOffset: i.startIndex,
1150
- endOffset: i.endIndex + 1
1129
+ startOffset: r.startIndex,
1130
+ endOffset: r.endIndex + 1
1151
1131
  }
1152
1132
  ]), this._currentEditingPopup = this._docCanvasPopManagerService.attachPopupToRange(
1153
1133
  {
1154
- startOffset: i.startIndex,
1155
- endOffset: i.endIndex,
1134
+ startOffset: r.startIndex,
1135
+ endOffset: r.endIndex,
1156
1136
  collapsed: !1
1157
1137
  },
1158
1138
  this._editPopup,
1159
1139
  N
1160
1140
  );
1161
- } else if (t.type === m.EDITING) {
1162
- const d = Pr(this._injector, t.unitId, t.subUnitId, t.row, t.col, t.customRangeId);
1141
+ } else if (e.type === m.EDITING) {
1142
+ const d = xr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1163
1143
  if (!d || !((l = d.rects) != null && l.length))
1164
1144
  return;
1165
- i = d.customRange, s = d.label, this._textSelectionManagerService.replaceTextRanges([
1145
+ r = d.customRange, o = d.label, this._textSelectionManagerService.replaceTextRanges([
1166
1146
  {
1167
- startOffset: i.startIndex,
1168
- endOffset: i.endIndex + 1
1147
+ startOffset: r.startIndex,
1148
+ endOffset: r.endIndex + 1
1169
1149
  }
1170
1150
  ]), this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1171
1151
  d.rects.pop(),
1172
1152
  this._editPopup,
1173
1153
  n,
1174
- r
1154
+ i
1175
1155
  );
1176
1156
  } else {
1177
- const d = this._univerInstanceService.getUnit(n, b.UNIVER_SHEET), _ = d == null ? void 0 : d.getSheetBySheetId(r), C = _ == null ? void 0 : _.getCellRaw(t.row, t.col), v = d == null ? void 0 : d.getStyles().getStyleByCell(C), w = v == null ? void 0 : v.tr, a = kr(this._injector, t.unitId, t.subUnitId, t.row, t.col, t.customRangeId);
1157
+ const d = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), _ = d == null ? void 0 : d.getSheetBySheetId(i), S = _ == null ? void 0 : _.getCellRaw(e.row, e.col), f = d == null ? void 0 : d.getStyles().getStyleByCell(S), k = f == null ? void 0 : f.tr, a = Dr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1178
1158
  if (!a || !((g = a.rects) != null && g.length))
1179
1159
  return;
1180
- i = a.customRange, s = a.label, w ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1181
- t.row,
1182
- t.col,
1160
+ r = a.customRange, o = a.label, k ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1161
+ e.row,
1162
+ e.col,
1183
1163
  this._editPopup,
1184
1164
  n,
1185
- r
1165
+ i
1186
1166
  ) : this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupByPosition(
1187
1167
  a.rects.pop(),
1188
1168
  this._editPopup,
1189
1169
  {
1190
1170
  unitId: n,
1191
- subUnitId: r,
1192
- row: t.row,
1193
- col: t.col
1171
+ subUnitId: i,
1172
+ row: e.row,
1173
+ col: e.col
1194
1174
  }
1195
1175
  );
1196
1176
  }
1197
1177
  this._currentEditing$.next({
1198
- ...t,
1199
- customRange: i,
1200
- label: s
1178
+ ...e,
1179
+ customRange: r,
1180
+ label: o
1201
1181
  });
1202
1182
  }
1203
- endEditing(t) {
1204
- var r;
1183
+ endEditing(e) {
1184
+ var i;
1185
+ if (this.getIsKeepVisible())
1186
+ return;
1205
1187
  const n = this._currentEditing$.getValue();
1206
- n && (!t || t === n.type) && ((r = this._currentEditingPopup) == null || r.dispose(), this._currentEditing$.next(null));
1188
+ n && (!e || e === n.type) && ((i = this._currentEditingPopup) == null || i.dispose(), this._currentEditing$.next(null));
1207
1189
  }
1208
1190
  };
1209
1191
  K = Wi([
1210
- ce(0, R(Lr)),
1211
- ce(1, R(lt)),
1212
- ce(2, Y),
1213
- ce(3, re),
1214
- ce(4, R(De)),
1215
- ce(5, R(ri)),
1216
- ce(6, pt)
1192
+ se(0, y(Hr)),
1193
+ se(1, y(ut)),
1194
+ se(2, Y),
1195
+ se(3, ne),
1196
+ se(4, y(xe)),
1197
+ se(5, y(ri)),
1198
+ se(6, ht)
1217
1199
  ], K);
1218
- var Ue = /* @__PURE__ */ ((e) => (e[e.ALLOWED = 0] = "ALLOWED", e[e.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", e[e.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", e))(Ue || {});
1219
- const Zi = /* @__PURE__ */ new Set([
1200
+ var Ne = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(Ne || {});
1201
+ const ji = /* @__PURE__ */ new Set([
1220
1202
  It.CHECKBOX,
1221
1203
  It.LIST,
1222
1204
  It.LIST_MULTIPLE
1223
- ]), Dt = (e, t, n, r) => {
1224
- var c, u;
1225
- const i = t.getCell(n, r);
1226
- if (i != null && i.f || i != null && i.si)
1205
+ ]), At = (t, e, n, i) => {
1206
+ var c, u, p, l, g;
1207
+ const r = e.getCell(n, i);
1208
+ if (r != null && r.f || r != null && r.si || (p = (u = (c = r == null ? void 0 : r.p) == null ? void 0 : c.body) == null ? void 0 : u.customBlocks) != null && p.length)
1227
1209
  return 1;
1228
- const s = e.has(pn) ? e.get(pn) : null, o = s == null ? void 0 : s.getRuleByLocation(t.getUnitId(), t.getSheetId(), n, r);
1229
- return o && Zi.has(o.type) ? !0 : (u = (c = i == null ? void 0 : i.p) == null ? void 0 : c.drawingsOrder) != null && u.length ? 2 : 0;
1230
- }, Gi = (e) => {
1231
- const t = e.get(Y).getCurrentUnitForType(b.UNIVER_SHEET);
1232
- if (!t)
1210
+ const o = t.has(gn) ? t.get(gn) : null, s = o == null ? void 0 : o.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1211
+ return s && ji.has(s.type) ? !0 : (g = (l = r == null ? void 0 : r.p) == null ? void 0 : l.drawingsOrder) != null && g.length ? 2 : 0;
1212
+ }, Zi = (t) => {
1213
+ const e = t.get(Y).getCurrentUnitForType(w.UNIVER_SHEET);
1214
+ if (!e)
1233
1215
  return !0;
1234
- const n = t.getActiveSheet(), r = e.get(Ot).getCurrentSelections();
1235
- if (!r.length)
1216
+ const n = e.getActiveSheet(), i = t.get(wt).getCurrentSelections();
1217
+ if (!i.length)
1236
1218
  return !0;
1237
- const i = r[0].range.startRow, s = r[0].range.startColumn;
1238
- return Dt(e, n, i, s) === 1;
1239
- }, Ki = (e) => {
1240
- const t = e.get(De), n = e.get(Y), r = t.getTextRanges();
1241
- if (!(r != null && r.length))
1219
+ const r = i[0].range.startRow, o = i[0].range.startColumn;
1220
+ return At(t, n, r, o) === 1;
1221
+ }, Gi = (t) => {
1222
+ const e = t.get(xe), n = t.get(Y), i = e.getTextRanges();
1223
+ if (!(i != null && i.length))
1242
1224
  return !0;
1243
- const i = n.getCurrentUnitForType(b.UNIVER_DOC);
1244
- return !!(!i || r.every((o) => o.collapsed) || !i.getSelfOrHeaderFooterModel(r[0].segmentId).getBody());
1245
- }, At = {
1246
- type: ut.OPERATION,
1225
+ const r = n.getCurrentUnitForType(w.UNIVER_DOC);
1226
+ return !!(!r || i.every((s) => s.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
1227
+ }, $t = {
1228
+ type: dt.OPERATION,
1247
1229
  id: "sheet.operation.open-hyper-link-edit-panel",
1248
- handler(e, t) {
1249
- if (!t)
1230
+ handler(t, e) {
1231
+ if (!e)
1250
1232
  return !1;
1251
- const n = e.get(K);
1252
- return t.customRangeId ? n.startEditing(t) : n.startAddEditing(t), !0;
1233
+ const n = t.get(K);
1234
+ return e.customRangeId ? n.startEditing(e) : n.startAddEditing(e), !0;
1253
1235
  }
1254
- }, qe = {
1255
- type: ut.OPERATION,
1236
+ }, Je = {
1237
+ type: dt.OPERATION,
1256
1238
  id: "sheet.operation.close-hyper-link-popup",
1257
- handler(e) {
1258
- return e.get(K).endEditing(), !0;
1239
+ handler(t) {
1240
+ return t.get(K).endEditing(), !0;
1259
1241
  }
1260
- }, $t = {
1261
- type: ut.OPERATION,
1242
+ }, Bt = {
1243
+ type: dt.OPERATION,
1262
1244
  id: "sheet.operation.insert-hyper-link",
1263
- handler(e) {
1245
+ handler(t) {
1264
1246
  var g;
1265
- const t = e.get(Y), n = wn(t), r = e.get(re);
1247
+ const e = t.get(Y), n = Tt(e), i = t.get(ne);
1266
1248
  if (!n)
1267
1249
  return !1;
1268
- const i = e.get(ie), o = e.get(Ot).getCurrentLastSelection();
1269
- if (!o)
1250
+ const r = t.get(re), s = t.get(wt).getCurrentLastSelection();
1251
+ if (!s)
1270
1252
  return !1;
1271
- const c = o.range.startRow, u = o.range.startColumn, p = r.isVisible(), l = ((g = t.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === N;
1272
- return i.executeCommand(At.id, {
1253
+ const c = s.range.startRow, u = s.range.startColumn, p = i.isVisible(), l = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === N;
1254
+ return r.executeCommand($t.id, {
1273
1255
  unitId: n.unitId,
1274
1256
  subUnitId: n.subUnitId,
1275
1257
  row: c,
@@ -1277,240 +1259,232 @@ const Zi = /* @__PURE__ */ new Set([
1277
1259
  type: l ? m.ZEN_EDITOR : p.visible ? m.EDITING : m.VIEWING
1278
1260
  });
1279
1261
  }
1280
- }, de = {
1281
- type: ut.OPERATION,
1262
+ }, ce = {
1263
+ type: dt.OPERATION,
1282
1264
  id: "sheet.operation.insert-hyper-link-toolbar",
1283
- handler(e) {
1284
- if (Gi(e))
1265
+ handler(t) {
1266
+ if (Zi(t))
1285
1267
  return !1;
1286
- const t = e.get(ie);
1287
- return e.get(K).currentEditing ? t.executeCommand(qe.id) : t.executeCommand($t.id);
1288
- }
1289
- }, Bt = (e, t = N) => {
1290
- var i;
1291
- const n = e.get(Y), r = (i = e.get(Ae).getRenderById(t)) == null ? void 0 : i.with(Un);
1292
- return r ? r.textSelectionInner$.pipe(le(() => {
1293
- const o = e.get(re).getEditCellState();
1294
- if (!o)
1268
+ const e = t.get(re);
1269
+ return t.get(K).currentEditing ? e.executeCommand(Je.id) : e.executeCommand(Bt.id);
1270
+ }
1271
+ }, Ft = (t, e = N) => {
1272
+ var r;
1273
+ const n = t.get(Y), i = (r = t.get(De).getRenderById(e)) == null ? void 0 : r.with(Mn);
1274
+ return i ? i.textSelectionInner$.pipe(xt(() => {
1275
+ const s = t.get(ne).getEditCellState();
1276
+ if (!s)
1295
1277
  return !0;
1296
- const c = wn(n, { unitId: o.unitId, subUnitId: o.sheetId });
1297
- return !(c != null && c.worksheet) || Dt(e, c.worksheet, o.row, o.column) === 1 ? !0 : Ki(e);
1298
- })) : Me(!0);
1299
- }, jn = (e) => {
1300
- const t = wr(e, { workbookTypes: [Ut], worksheetTypes: [Nt, On, Mt], rangeTypes: [Tt] }, !0), n = e.get(Y), r = e.get(Ot), i = e.has(re) ? e.get(re) : null, s = n.focused$.pipe(
1301
- un((o) => !!o),
1302
- le((o) => n.getUnit(o, b.UNIVER_SHEET)),
1303
- un((o) => !!o),
1304
- ue((o) => o.activeSheet$),
1305
- ue((o) => r.selectionMoveEnd$.pipe(le((c) => o && { selections: c, sheet: o }))),
1306
- le((o) => {
1307
- if (!o)
1308
- return Ue.DISABLED_BY_CELL;
1309
- const { selections: c, sheet: u } = o;
1310
- if (!c.length)
1311
- return Ue.DISABLED_BY_CELL;
1312
- const p = c[0].range.startRow, l = c[0].range.startColumn;
1313
- return Dt(e, u, p, l);
1278
+ const c = Tt(n, { unitId: s.unitId, subUnitId: s.sheetId });
1279
+ return !(c != null && c.worksheet) || At(t, c.worksheet, s.row, s.column) === 1 ? !0 : Gi(t);
1280
+ })) : ae(!0);
1281
+ }, Fn = (t) => {
1282
+ var o;
1283
+ const e = Ar(t, { workbookTypes: [Ut], worksheetTypes: [Nt, kn, Mt], rangeTypes: [Ot] }, !0), n = t.get(Y), i = t.has(ne) ? t.get(ne) : null;
1284
+ return ((o = i == null ? void 0 : i.currentEditCellState$.pipe(
1285
+ xt((s) => {
1286
+ if (!s)
1287
+ return Ne.DISABLED_BY_CELL;
1288
+ const c = Tt(n, { unitId: s.unitId, subUnitId: s.sheetId });
1289
+ return c ? At(t, c.worksheet, s.row, s.column) : Ne.DISABLED_BY_CELL;
1314
1290
  }),
1315
- ue((o) => {
1316
- if (o === Ue.DISABLED_BY_CELL)
1317
- return Me(!0);
1318
- const c = (i ? i.visible$ : Me(null)).pipe(le((p) => p != null && p.visible ? ye : void 0)), u = e.get(Rn).subscribeContextValue$(sr);
1319
- return ci([c, u]).pipe(
1320
- ue(
1321
- ([p, l]) => p ? l ? Me(!0) : Bt(e, p) : Me(o === Ue.ALLOW_ON_EDITING)
1291
+ He((s) => {
1292
+ if (s === Ne.DISABLED_BY_CELL)
1293
+ return ae(!0);
1294
+ const c = i ? i.visible$ : ae(null);
1295
+ return ci([c, n.getCurrentTypeOfUnit$(w.UNIVER_DOC)]).pipe(
1296
+ He(
1297
+ ([u, p]) => u != null && u.visible ? (p == null ? void 0 : p.getUnitId()) === sr ? ae(!0) : Ft(t, Ie) : ae(s !== Ne.ALLOWED)
1322
1298
  )
1323
1299
  );
1324
1300
  })
1301
+ )) != null ? o : ae(!0)).pipe(
1302
+ He((s) => s ? ae(!0) : e)
1325
1303
  );
1326
- return t.pipe(
1327
- li(),
1328
- ue((o) => s.pipe(le((c) => o || c)))
1329
- );
1330
- }, Je = {
1331
- commandId: $t.id,
1332
- type: Mn.BUTTON,
1304
+ }, Qe = {
1305
+ commandId: Bt.id,
1306
+ type: Nn.BUTTON,
1333
1307
  title: "hyperLink.menu.add",
1334
1308
  icon: "LinkSingle"
1335
- }, Qe = (e) => `${e}-zen-editor`, Yi = (e) => ({
1336
- ...Je,
1337
- id: Je.commandId,
1338
- hidden$: ht(e, b.UNIVER_SHEET),
1339
- disabled$: jn(e)
1309
+ }, et = (t) => `${t}-zen-editor`, Ki = (t) => ({
1310
+ ...Qe,
1311
+ id: Qe.commandId,
1312
+ hidden$: gt(t, w.UNIVER_SHEET),
1313
+ disabled$: Fn(t)
1340
1314
  // disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
1341
- }), zi = (e) => ({
1342
- ...Je,
1343
- id: Qe(Je.commandId),
1344
- hidden$: ht(e, b.UNIVER_DOC, N),
1345
- disabled$: Bt(e)
1346
- }), et = {
1315
+ }), Yi = (t) => ({
1316
+ ...Qe,
1317
+ id: et(Qe.commandId),
1318
+ hidden$: gt(t, w.UNIVER_DOC, N),
1319
+ disabled$: Ft(t)
1320
+ }), tt = {
1347
1321
  tooltip: "hyperLink.form.addTitle",
1348
- commandId: de.id,
1349
- type: Mn.BUTTON,
1322
+ commandId: ce.id,
1323
+ type: Nn.BUTTON,
1350
1324
  icon: "LinkSingle"
1351
- }, Xi = (e) => ({
1352
- ...et,
1353
- id: et.commandId,
1354
- hidden$: ht(e, b.UNIVER_SHEET),
1355
- disabled$: jn(e)
1356
- }), qi = (e) => ({
1357
- ...et,
1358
- id: Qe(et.commandId),
1359
- hidden$: ht(e, b.UNIVER_DOC, N),
1360
- disabled$: Bt(e)
1325
+ }, zi = (t) => ({
1326
+ ...tt,
1327
+ id: tt.commandId,
1328
+ hidden$: gt(t, w.UNIVER_SHEET),
1329
+ disabled$: Fn(t)
1330
+ }), Xi = (t) => ({
1331
+ ...tt,
1332
+ id: et(tt.commandId),
1333
+ hidden$: gt(t, w.UNIVER_DOC, N),
1334
+ disabled$: Ft(t)
1361
1335
  }), Wn = {
1362
- id: de.id,
1363
- binding: Lt.K | zr.CTRL_COMMAND,
1364
- preconditions: br
1336
+ id: ce.id,
1337
+ binding: Pt.K | zr.CTRL_COMMAND,
1338
+ preconditions: Vr
1365
1339
  };
1366
- var Ji = Object.getOwnPropertyDescriptor, Qi = (e, t, n, r) => {
1367
- for (var i = r > 1 ? void 0 : r ? Ji(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1368
- (o = e[s]) && (i = o(i) || i);
1369
- return i;
1370
- }, _n = (e, t) => (n, r) => t(n, r, e);
1371
- let tt = class extends z {
1372
- constructor(e, t) {
1373
- super(), this._autoFillService = e, this._hyperLinkModel = t, this._initAutoFill();
1340
+ var qi = Object.getOwnPropertyDescriptor, Ji = (t, e, n, i) => {
1341
+ for (var r = i > 1 ? void 0 : i ? qi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1342
+ (s = t[o]) && (r = s(r) || r);
1343
+ return r;
1344
+ }, Sn = (t, e) => (n, i) => e(n, i, t);
1345
+ let nt = class extends z {
1346
+ constructor(t, e) {
1347
+ super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1374
1348
  }
1375
1349
  // eslint-disable-next-line max-lines-per-function
1376
1350
  _initAutoFill() {
1377
- const e = () => ({ redos: [], undos: [] }), t = (r, i) => {
1378
- const { source: s, target: o, unitId: c, subUnitId: u } = r, p = Rt([s, o]), [l, g] = p.ranges, { mapFunc: d } = p, _ = {
1351
+ const t = () => ({ redos: [], undos: [] }), e = (i, r) => {
1352
+ const { source: o, target: s, unitId: c, subUnitId: u } = i, p = Lt([o, s]), [l, g] = p.ranges, { mapFunc: d } = p, _ = {
1379
1353
  row: l.startRow,
1380
1354
  col: l.startColumn
1381
- }, C = Tr(l, g), v = [], w = [];
1382
- return C.forEach((a) => {
1383
- const k = a.repeatStartCell, U = a.relativeRange, O = {
1355
+ }, S = Br(l, g), f = [], k = [];
1356
+ return S.forEach((a) => {
1357
+ const b = a.repeatStartCell, U = a.relativeRange, T = {
1384
1358
  startRow: _.row,
1385
1359
  startColumn: _.col,
1386
1360
  endColumn: _.col,
1387
1361
  endRow: _.row
1388
1362
  }, L = {
1389
- startRow: k.row,
1390
- startColumn: k.col,
1391
- endColumn: k.col,
1392
- endRow: k.row
1363
+ startRow: b.row,
1364
+ startColumn: b.col,
1365
+ endColumn: b.col,
1366
+ endRow: b.row
1393
1367
  };
1394
- En.foreach(U, ($, D) => {
1395
- const X = Ee.getPositionRange(
1368
+ Rn.foreach(U, (A, D) => {
1369
+ const X = ye.getPositionRange(
1396
1370
  {
1397
- startRow: $,
1371
+ startRow: A,
1398
1372
  startColumn: D,
1399
1373
  endColumn: D,
1400
- endRow: $
1374
+ endRow: A
1401
1375
  },
1402
- O
1403
- ), { row: Re, col: $e } = d(X.startRow, X.startColumn), oe = this._hyperLinkModel.getHyperLinkByLocation(c, u, Re, $e), Le = Ee.getPositionRange(
1376
+ T
1377
+ ), { row: Ee, col: Ve } = d(X.startRow, X.startColumn), ie = this._hyperLinkModel.getHyperLinkByLocation(c, u, Ee, Ve), Re = ye.getPositionRange(
1404
1378
  {
1405
- startRow: $,
1379
+ startRow: A,
1406
1380
  startColumn: D,
1407
1381
  endColumn: D,
1408
- endRow: $
1382
+ endRow: A
1409
1383
  },
1410
1384
  L
1411
- ), { row: Pe, col: ke } = d(Le.startRow, Le.startColumn), se = Ie.generateRandomId(), B = this._hyperLinkModel.getHyperLinkByLocation(c, u, Pe, ke);
1412
- B && v.push({
1413
- id: He.id,
1385
+ ), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn), Ae = Ce.generateRandomId(), he = this._hyperLinkModel.getHyperLinkByLocation(c, u, Le, Pe);
1386
+ he && f.push({
1387
+ id: Me.id,
1414
1388
  params: {
1415
1389
  unitId: c,
1416
1390
  subUnitId: u,
1417
- id: B.id
1391
+ id: he.id
1418
1392
  }
1419
- }), (Oe.COPY === i || Oe.SERIES === i) && oe && (v.push({
1420
- id: xe.id,
1393
+ }), (we.COPY === r || we.SERIES === r) && ie && (f.push({
1394
+ id: Ue.id,
1421
1395
  params: {
1422
1396
  unitId: c,
1423
1397
  subUnitId: u,
1424
1398
  link: {
1425
- ...oe,
1426
- id: se,
1427
- row: Pe,
1428
- column: ke
1399
+ ...ie,
1400
+ id: Ae,
1401
+ row: Le,
1402
+ column: Pe
1429
1403
  }
1430
1404
  }
1431
- }), w.push({
1432
- id: He.id,
1405
+ }), k.push({
1406
+ id: Me.id,
1433
1407
  params: {
1434
1408
  unitId: c,
1435
1409
  subUnitId: u,
1436
- id: se
1410
+ id: Ae
1437
1411
  }
1438
- })), B && w.push({
1439
- id: xe.id,
1412
+ })), he && k.push({
1413
+ id: Ue.id,
1440
1414
  params: {
1441
1415
  unitId: c,
1442
1416
  subUnitId: u,
1443
- link: B
1417
+ link: he
1444
1418
  }
1445
1419
  });
1446
1420
  });
1447
1421
  }), {
1448
- undos: w,
1449
- redos: v
1422
+ undos: k,
1423
+ redos: f
1450
1424
  };
1451
1425
  }, n = {
1452
- id: Ht,
1453
- onFillData: (r, i, s) => s === Oe.COPY || s === Oe.ONLY_FORMAT || s === Oe.SERIES ? t(r, s) : e()
1426
+ id: Dt,
1427
+ onFillData: (i, r, o) => o === we.COPY || o === we.ONLY_FORMAT || o === we.SERIES ? e(i, o) : t()
1454
1428
  };
1455
1429
  this.disposeWithMe(this._autoFillService.addHook(n));
1456
1430
  }
1457
1431
  };
1458
- tt = Qi([
1459
- _n(0, Or),
1460
- _n(1, R(dt))
1461
- ], tt);
1462
- var eo = Object.getOwnPropertyDescriptor, to = (e, t, n, r) => {
1463
- for (var i = r > 1 ? void 0 : r ? eo(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1464
- (o = e[s]) && (i = o(i) || i);
1465
- return i;
1466
- }, Et = (e, t) => (n, r) => t(n, r, e);
1467
- let nt = class extends z {
1468
- constructor(e, t, n) {
1469
- super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = n, this._commandExecutedListener();
1432
+ nt = Ji([
1433
+ Sn(0, $r),
1434
+ Sn(1, y(pt))
1435
+ ], nt);
1436
+ var Qi = Object.getOwnPropertyDescriptor, eo = (t, e, n, i) => {
1437
+ for (var r = i > 1 ? void 0 : i ? Qi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1438
+ (s = t[o]) && (r = s(r) || r);
1439
+ return r;
1440
+ }, Rt = (t, e) => (n, i) => e(n, i, t);
1441
+ let rt = class extends z {
1442
+ constructor(t, e, n) {
1443
+ super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = n, this._commandExecutedListener();
1470
1444
  }
1471
1445
  _commandExecutedListener() {
1472
1446
  this.disposeWithMe(
1473
- this._commandService.beforeCommandExecuted((e) => {
1474
- e.id === Wn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1447
+ this._commandService.beforeCommandExecuted((t) => {
1448
+ t.id === Wn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1475
1449
  workbookTypes: [Ut],
1476
- rangeTypes: [Tt],
1477
- worksheetTypes: [Nt, On, Mt]
1450
+ rangeTypes: [Ot],
1451
+ worksheetTypes: [Nt, kn, Mt]
1478
1452
  }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.hyperLinkErr")));
1479
1453
  })
1480
1454
  );
1481
1455
  }
1482
1456
  };
1483
- nt = to([
1484
- Et(0, R(ct)),
1485
- Et(1, ie),
1486
- Et(2, R(Tn))
1487
- ], nt);
1488
- var no = Object.getOwnPropertyDescriptor, ro = (e, t, n, r) => {
1489
- for (var i = r > 1 ? void 0 : r ? no(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1490
- (o = e[s]) && (i = o(i) || i);
1491
- return i;
1492
- }, G = (e, t) => (n, r) => t(n, r, e);
1493
- let rt = class extends z {
1494
- constructor(e, t, n, r, i, s, o, c, u, p) {
1495
- super(), this._hoverManagerService = e, this._sheetsHyperLinkPopupService = t, this._renderManagerService = n, this._permissionService = r, this._sheetPermissionCheckController = i, this._commandService = s, this._editorBridgeService = o, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1457
+ rt = eo([
1458
+ Rt(0, y(lt)),
1459
+ Rt(1, re),
1460
+ Rt(2, y(bn))
1461
+ ], rt);
1462
+ var to = Object.getOwnPropertyDescriptor, no = (t, e, n, i) => {
1463
+ for (var r = i > 1 ? void 0 : i ? to(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1464
+ (s = t[o]) && (r = s(r) || r);
1465
+ return r;
1466
+ }, Z = (t, e) => (n, i) => e(n, i, t);
1467
+ let it = class extends z {
1468
+ constructor(t, e, n, i, r, o, s, c, u, p) {
1469
+ super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionCheckController = r, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1496
1470
  }
1497
- _getLinkPermission(e) {
1498
- const { unitId: t, subUnitId: n, row: r, col: i } = e, s = this._univerInstanceService.getUnit(t, b.UNIVER_SHEET);
1499
- if (!(s == null ? void 0 : s.getSheetBySheetId(n)))
1471
+ _getLinkPermission(t) {
1472
+ const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
1473
+ if (!(o == null ? void 0 : o.getSheetBySheetId(n)))
1500
1474
  return {
1501
1475
  viewPermission: !1,
1502
1476
  editPermission: !1,
1503
1477
  copyPermission: !1
1504
1478
  };
1505
1479
  const c = this._sheetPermissionCheckController.permissionCheckWithRanges({
1506
- workbookTypes: [$r],
1507
- worksheetTypes: [Ar],
1508
- rangeTypes: [Dr]
1509
- }, [{ startRow: r, startColumn: i, endRow: r, endColumn: i }]), u = this._sheetPermissionCheckController.permissionCheckWithRanges({
1480
+ workbookTypes: [mr],
1481
+ worksheetTypes: [gr],
1482
+ rangeTypes: [hr]
1483
+ }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), u = this._sheetPermissionCheckController.permissionCheckWithRanges({
1510
1484
  workbookTypes: [Ut],
1511
1485
  worksheetTypes: [Nt, Mt],
1512
- rangeTypes: [Tt]
1513
- }, [{ startRow: r, startColumn: i, endRow: r, endColumn: i }]), p = this._permissionService.composePermission([new Br(t).id, new Vr(t, n).id]).every((l) => l.value);
1486
+ rangeTypes: [Ot]
1487
+ }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), p = this._permissionService.composePermission([new vr(e).id, new fr(e, n).id]).every((l) => l.value);
1514
1488
  return {
1515
1489
  viewPermission: c,
1516
1490
  editPermission: u,
@@ -1520,46 +1494,46 @@ let rt = class extends z {
1520
1494
  _initHoverListener() {
1521
1495
  this.disposeWithMe(
1522
1496
  // hover over not editing cell
1523
- this._hoverManagerService.currentRichText$.pipe(We(200)).subscribe((e) => {
1524
- var O, L;
1525
- if (!e) {
1497
+ this._hoverManagerService.currentRichText$.pipe(Ze(200)).subscribe((t) => {
1498
+ var T, L;
1499
+ if (!t) {
1526
1500
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1527
1501
  return;
1528
1502
  }
1529
- const { unitId: t, subUnitId: n, row: r, col: i } = e, s = this._renderManagerService.getRenderById(t);
1530
- if (!s)
1503
+ const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._renderManagerService.getRenderById(e);
1504
+ if (!o)
1531
1505
  return;
1532
- const o = this._univerInstanceService.getUnit(t, b.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(n);
1506
+ const s = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1533
1507
  if (!c)
1534
1508
  return;
1535
- if (!s.with(Mr).active) {
1509
+ if (!o.with(Wr).active) {
1536
1510
  this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING);
1537
1511
  return;
1538
1512
  }
1539
- const p = (O = s == null ? void 0 : s.with(sn).getSkeletonParam(n)) == null ? void 0 : O.skeleton, l = i, g = r;
1513
+ const p = (T = o == null ? void 0 : o.with(ln).getSkeletonParam(n)) == null ? void 0 : T.skeleton, l = r, g = i;
1540
1514
  let d = g, _ = l;
1541
- p && p.overflowCache.forValue(($, D, X) => {
1542
- Ee.contains(X, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (d = $, _ = D);
1515
+ p && p.overflowCache.forValue((A, D, X) => {
1516
+ ye.contains(X, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (d = A, _ = D);
1543
1517
  });
1544
- const { viewPermission: C, editPermission: v, copyPermission: w } = this._getLinkPermission(e);
1545
- if (!C) {
1518
+ const { viewPermission: S, editPermission: f, copyPermission: k } = this._getLinkPermission(t);
1519
+ if (!S) {
1546
1520
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1547
1521
  return;
1548
1522
  }
1549
- const a = c.getCellStyleOnly(d, _), k = o.getStyles().getStyleByCell(a), U = (L = k == null ? void 0 : k.tr) == null ? void 0 : L.a;
1550
- if (!U && !e.customRange) {
1523
+ const a = c.getCellStyleOnly(d, _), b = s.getStyles().getStyleByCell(a), U = (L = b == null ? void 0 : b.tr) == null ? void 0 : L.a;
1524
+ if (!U && !t.customRange) {
1551
1525
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1552
1526
  return;
1553
1527
  }
1554
1528
  this._sheetsHyperLinkPopupService.showPopup({
1555
1529
  row: d,
1556
1530
  col: _,
1557
- editPermission: v,
1558
- copyPermission: w,
1559
- customRange: e.customRange,
1560
- customRangeRect: e.rect,
1531
+ editPermission: f,
1532
+ copyPermission: k,
1533
+ customRange: t.customRange,
1534
+ customRangeRect: t.rect,
1561
1535
  type: m.VIEWING,
1562
- unitId: t,
1536
+ unitId: e,
1563
1537
  subUnitId: n,
1564
1538
  showAll: !!U
1565
1539
  });
@@ -1567,41 +1541,41 @@ let rt = class extends z {
1567
1541
  );
1568
1542
  }
1569
1543
  _initHoverEditingListener() {
1570
- let e = null;
1544
+ let t = null;
1571
1545
  this.disposeWithMe(
1572
- this._editorBridgeService.currentEditCellState$.pipe(ue((t) => this._editorBridgeService.visible$.pipe(le((n) => ({ visible: n, state: t }))))).subscribe(({ visible: t, state: n }) => {
1573
- if (!n || n.editorUnitId !== ye)
1546
+ this._editorBridgeService.currentEditCellState$.pipe(He((e) => this._editorBridgeService.visible$.pipe(xt((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1547
+ if (!n || n.editorUnitId !== Ie)
1574
1548
  return;
1575
- if (!t.visible) {
1576
- e == null || e.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1549
+ if (!e.visible) {
1550
+ t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1577
1551
  return;
1578
1552
  }
1579
- const { editorUnitId: r, unitId: i, sheetId: s, row: o, column: c } = n, u = this._renderManagerService.getRenderById(r);
1553
+ const { editorUnitId: i, unitId: r, sheetId: o, row: s, column: c } = n, u = this._renderManagerService.getRenderById(i);
1580
1554
  if (!u)
1581
1555
  return;
1582
- const { editPermission: p, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: i, subUnitId: s, row: o, col: c }), d = u.with(ln);
1583
- l && (e == null || e.unsubscribe(), e = d.hoverCustomRanges$.pipe(We(200)).subscribe((_) => {
1584
- var k, U;
1585
- const C = _.find((O) => O.range.rangeType === Ge.HYPERLINK);
1586
- if (!C) {
1556
+ const { editPermission: p, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: o, row: s, col: c }), d = u.with(hn);
1557
+ l && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(Ze(200)).subscribe((_) => {
1558
+ var b, U;
1559
+ const S = _.find((T) => T.range.rangeType === Ke.HYPERLINK);
1560
+ if (!S) {
1587
1561
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1588
1562
  return;
1589
1563
  }
1590
- const v = C.rects[C.rects.length - 1];
1591
- if (!((U = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(sn).getSkeletonParam(s)) == null ? void 0 : U.skeleton) || !v)
1564
+ const f = S.rects[S.rects.length - 1];
1565
+ if (!((U = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(ln).getSkeletonParam(o)) == null ? void 0 : U.skeleton) || !f)
1592
1566
  return;
1593
1567
  const a = u.engine.getCanvasElement().getBoundingClientRect();
1594
1568
  this._sheetsHyperLinkPopupService.showPopup({
1595
- unitId: i,
1596
- subUnitId: s,
1597
- row: o,
1569
+ unitId: r,
1570
+ subUnitId: o,
1571
+ row: s,
1598
1572
  col: c,
1599
- customRange: C.range,
1573
+ customRange: S.range,
1600
1574
  customRangeRect: {
1601
- left: v.left + a.left,
1602
- top: v.top + a.top,
1603
- bottom: v.bottom + a.top,
1604
- right: v.right + a.left
1575
+ left: f.left + a.left,
1576
+ top: f.top + a.top,
1577
+ bottom: f.bottom + a.top,
1578
+ right: f.right + a.left
1605
1579
  },
1606
1580
  editPermission: p,
1607
1581
  copyPermission: g,
@@ -1610,33 +1584,33 @@ let rt = class extends z {
1610
1584
  }));
1611
1585
  })
1612
1586
  ), this.disposeWithMe(() => {
1613
- e == null || e.unsubscribe();
1587
+ t == null || t.unsubscribe();
1614
1588
  });
1615
1589
  }
1616
1590
  _initZenEditor() {
1617
1591
  this.disposeWithMe(
1618
- this._zenZoneService.visible$.subscribe((e) => {
1619
- e ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(m.ZEN_EDITOR));
1592
+ this._zenZoneService.visible$.subscribe((t) => {
1593
+ t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(m.ZEN_EDITOR));
1620
1594
  })
1621
1595
  ), this.disposeWithMe(
1622
1596
  this._univerInstanceService.focused$.pipe(
1623
- ue((e) => {
1624
- const t = e === N ? this._renderManagerService.getRenderById(e) : null;
1625
- return t ? t.with(ln).hoverCustomRanges$.pipe(We(200)) : new ui((n) => {
1597
+ He((t) => {
1598
+ const e = t === N ? this._renderManagerService.getRenderById(t) : null;
1599
+ return e ? e.with(hn).hoverCustomRanges$.pipe(Ze(200)) : new li((n) => {
1626
1600
  n.next(null);
1627
1601
  });
1628
1602
  })
1629
- ).subscribe((e) => {
1630
- const t = e == null ? void 0 : e.find((r) => r.range.rangeType === Ge.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1631
- if (t && n) {
1632
- const { unitId: r, sheetId: i, row: s, column: o } = n, { editPermission: c, viewPermission: u, copyPermission: p } = this._getLinkPermission({ unitId: r, subUnitId: i, row: s, col: o });
1603
+ ).subscribe((t) => {
1604
+ const e = t == null ? void 0 : t.find((i) => i.range.rangeType === Ke.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1605
+ if (e && n) {
1606
+ const { unitId: i, sheetId: r, row: o, column: s } = n, { editPermission: c, viewPermission: u, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: o, col: s });
1633
1607
  u && this._sheetsHyperLinkPopupService.showPopup({
1634
1608
  type: m.ZEN_EDITOR,
1635
- unitId: r,
1636
- subUnitId: i,
1637
- row: s,
1638
- col: o,
1639
- customRange: t.range,
1609
+ unitId: i,
1610
+ subUnitId: r,
1611
+ row: o,
1612
+ col: s,
1613
+ customRange: e.range,
1640
1614
  editPermission: c,
1641
1615
  copyPermission: p
1642
1616
  });
@@ -1647,219 +1621,219 @@ let rt = class extends z {
1647
1621
  }
1648
1622
  _initTextSelectionListener() {
1649
1623
  this.disposeWithMe(
1650
- this._textSelectionManagerService.textSelection$.subscribe((e) => {
1651
- e && e.unitId === ye && this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1624
+ this._textSelectionManagerService.textSelection$.subscribe((t) => {
1625
+ t && t.unitId === Ie && this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1652
1626
  })
1653
1627
  );
1654
1628
  }
1655
1629
  _initCommandListener() {
1656
- const e = [Fr.id, jr.id, Wr.id];
1657
- this.disposeWithMe(this._commandService.onCommandExecuted((t) => {
1658
- e.includes(t.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
1630
+ const t = [_r.id, Sr.id, Cr.id];
1631
+ this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
1632
+ t.includes(e.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
1659
1633
  }));
1660
1634
  }
1661
1635
  };
1662
- rt = ro([
1663
- G(0, R(Nr)),
1664
- G(1, R(K)),
1665
- G(2, R(Ae)),
1666
- G(3, R(ar)),
1667
- G(4, R(Tn)),
1668
- G(5, ie),
1669
- G(6, re),
1670
- G(7, R(De)),
1671
- G(8, Y),
1672
- G(9, pt)
1673
- ], rt);
1674
- var io = Object.getOwnPropertyDescriptor, Zn = (e, t, n, r) => {
1675
- for (var i = r > 1 ? void 0 : r ? io(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1676
- (o = e[s]) && (i = o(i) || i);
1677
- return i;
1678
- }, kt = (e, t) => (n, r) => t(n, r, e);
1636
+ it = no([
1637
+ Z(0, y(Fr)),
1638
+ Z(1, y(K)),
1639
+ Z(2, y(De)),
1640
+ Z(3, y(ar)),
1641
+ Z(4, y(bn)),
1642
+ Z(5, re),
1643
+ Z(6, ne),
1644
+ Z(7, y(xe)),
1645
+ Z(8, Y),
1646
+ Z(9, ht)
1647
+ ], it);
1648
+ var ro = Object.getOwnPropertyDescriptor, jn = (t, e, n, i) => {
1649
+ for (var r = i > 1 ? void 0 : i ? ro(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1650
+ (s = t[o]) && (r = s(r) || r);
1651
+ return r;
1652
+ }, kt = (t, e) => (n, i) => e(n, i, t);
1679
1653
  let bt = class extends z {
1680
- constructor(e, t) {
1681
- super(), this._context = e, this._hyperLinkModel = t, this._initSkeletonChange();
1654
+ constructor(t, e) {
1655
+ super(), this._context = t, this._hyperLinkModel = e, this._initSkeletonChange();
1682
1656
  }
1683
1657
  _initSkeletonChange() {
1684
- const e = () => {
1685
- var t;
1686
- (t = this._context.mainComponent) == null || t.makeForceDirty();
1658
+ const t = () => {
1659
+ var e;
1660
+ (e = this._context.mainComponent) == null || e.makeForceDirty();
1687
1661
  };
1688
- this.disposeWithMe(this._hyperLinkModel.linkUpdate$.pipe(We(16)).subscribe(() => {
1689
- e();
1662
+ this.disposeWithMe(this._hyperLinkModel.linkUpdate$.pipe(Ze(16)).subscribe(() => {
1663
+ t();
1690
1664
  }));
1691
1665
  }
1692
1666
  };
1693
- bt = Zn([
1694
- kt(1, R(dt))
1667
+ bt = jn([
1668
+ kt(1, y(pt))
1695
1669
  ], bt);
1696
- let it = class extends z {
1697
- constructor(e, t) {
1698
- super(), this._sheetInterceptorService = e, this._hyperLinkModel = t, this._initViewModelIntercept();
1670
+ let ot = class extends z {
1671
+ constructor(t, e) {
1672
+ super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._initViewModelIntercept();
1699
1673
  }
1700
1674
  _initViewModelIntercept() {
1701
1675
  this.disposeWithMe(
1702
1676
  this._sheetInterceptorService.intercept(
1703
- Gr.CELL_CONTENT,
1677
+ yr.CELL_CONTENT,
1704
1678
  {
1705
1679
  effect: cr.Value,
1706
1680
  priority: 100,
1707
- handler: (e, t, n) => {
1708
- const { row: r, col: i, unitId: s, subUnitId: o } = t, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, r, i);
1681
+ handler: (t, e, n) => {
1682
+ const { row: i, col: r, unitId: o, subUnitId: s } = e, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, i, r);
1709
1683
  return n(c ? {
1710
- ...e,
1684
+ ...t,
1711
1685
  linkUrl: c.payload,
1712
1686
  linkId: c.id
1713
- } : e);
1687
+ } : t);
1714
1688
  }
1715
1689
  }
1716
1690
  )
1717
1691
  );
1718
1692
  }
1719
1693
  };
1720
- it = Zn([
1721
- kt(0, R(Zr)),
1722
- kt(1, R(dt))
1723
- ], it);
1724
- const oo = {
1694
+ ot = jn([
1695
+ kt(0, y(Ir)),
1696
+ kt(1, y(pt))
1697
+ ], ot);
1698
+ const io = {
1725
1699
  [Jr.OTHERS]: {
1726
- [de.id]: {
1700
+ [ce.id]: {
1727
1701
  order: 2,
1728
- menuItemFactory: Xi
1702
+ menuItemFactory: zi
1729
1703
  },
1730
- [Qe(de.id)]: {
1704
+ [et(ce.id)]: {
1731
1705
  order: 2,
1732
- menuItemFactory: qi
1706
+ menuItemFactory: Xi
1733
1707
  }
1734
1708
  },
1735
1709
  [Xr.MAIN_AREA]: {
1736
1710
  [qr.OTHERS]: {
1737
1711
  order: 1,
1738
- [de.id]: {
1712
+ [ce.id]: {
1739
1713
  order: 0,
1740
- menuItemFactory: Yi
1714
+ menuItemFactory: Ki
1741
1715
  },
1742
- [Qe(de.id)]: {
1716
+ [et(ce.id)]: {
1743
1717
  order: 0,
1744
- menuItemFactory: zi
1718
+ menuItemFactory: Yi
1745
1719
  }
1746
1720
  }
1747
1721
  }
1748
1722
  };
1749
- var so = Object.getOwnPropertyDescriptor, ao = (e, t, n, r) => {
1750
- for (var i = r > 1 ? void 0 : r ? so(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1751
- (o = e[s]) && (i = o(i) || i);
1752
- return i;
1753
- }, Te = (e, t) => (n, r) => t(n, r, e);
1754
- let ot = class extends z {
1755
- constructor(e, t, n, r, i) {
1756
- super(), this._componentManager = e, this._commandService = t, this._menuManagerService = n, this._injector = r, this._shortcutService = i, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1723
+ var oo = Object.getOwnPropertyDescriptor, so = (t, e, n, i) => {
1724
+ for (var r = i > 1 ? void 0 : i ? oo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1725
+ (s = t[o]) && (r = s(r) || r);
1726
+ return r;
1727
+ }, Te = (t, e) => (n, i) => e(n, i, t);
1728
+ let st = class extends z {
1729
+ constructor(t, e, n, i, r) {
1730
+ super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = i, this._shortcutService = r, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1757
1731
  }
1758
1732
  _initComponents() {
1759
1733
  [
1734
+ [qe, qe.componentKey],
1760
1735
  [Xe, Xe.componentKey],
1761
- [ze, ze.componentKey],
1762
- [xt, "LinkSingle"]
1763
- ].forEach(([e, t]) => {
1764
- this._componentManager.register(t, e);
1736
+ [Vt, "LinkSingle"]
1737
+ ].forEach(([t, e]) => {
1738
+ this._componentManager.register(e, t);
1765
1739
  });
1766
1740
  }
1767
1741
  _initCommands() {
1768
1742
  [
1769
- At,
1770
- qe,
1771
1743
  $t,
1772
- de
1773
- ].forEach((e) => {
1774
- this._commandService.registerCommand(e);
1744
+ Je,
1745
+ Bt,
1746
+ ce
1747
+ ].forEach((t) => {
1748
+ this._commandService.registerCommand(t);
1775
1749
  });
1776
1750
  }
1777
1751
  _initMenus() {
1778
- this._menuManagerService.mergeMenu(oo);
1752
+ this._menuManagerService.mergeMenu(io);
1779
1753
  }
1780
1754
  _initShortCut() {
1781
1755
  this._shortcutService.registerShortcut(Wn);
1782
1756
  }
1783
1757
  };
1784
- ot = ao([
1785
- Te(0, R(Qr)),
1786
- Te(1, ie),
1758
+ st = so([
1759
+ Te(0, y(Qr)),
1760
+ Te(1, re),
1787
1761
  Te(2, ei),
1788
- Te(3, R(lt)),
1789
- Te(4, R(ti))
1790
- ], ot);
1791
- var co = Object.getOwnPropertyDescriptor, lo = (e, t, n, r) => {
1792
- for (var i = r > 1 ? void 0 : r ? co(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1793
- (o = e[s]) && (i = o(i) || i);
1794
- return i;
1795
- }, Sn = (e, t) => (n, r) => t(n, r, e);
1796
- let st = class extends z {
1797
- constructor(e, t) {
1798
- super(), this._parserService = e, this._resolverService = t, this._handleInitUrl();
1762
+ Te(3, y(ut)),
1763
+ Te(4, y(ti))
1764
+ ], st);
1765
+ var ao = Object.getOwnPropertyDescriptor, co = (t, e, n, i) => {
1766
+ for (var r = i > 1 ? void 0 : i ? ao(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1767
+ (s = t[o]) && (r = s(r) || r);
1768
+ return r;
1769
+ }, Cn = (t, e) => (n, i) => e(n, i, t);
1770
+ let at = class extends z {
1771
+ constructor(t, e) {
1772
+ super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
1799
1773
  }
1800
1774
  _handleInitUrl() {
1801
- const e = location.hash;
1802
- if (e) {
1803
- const t = this._parserService.parseHyperLink(e);
1804
- this._resolverService.navigate(t);
1775
+ const t = location.hash;
1776
+ if (t) {
1777
+ const e = this._parserService.parseHyperLink(t);
1778
+ this._resolverService.navigate(e);
1805
1779
  }
1806
1780
  }
1807
1781
  };
1808
- st = lo([
1809
- Sn(0, R(wt)),
1810
- Sn(1, R(pe))
1811
- ], st);
1812
- var uo = Object.defineProperty, po = Object.getOwnPropertyDescriptor, ho = (e, t, n) => t in e ? uo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, go = (e, t, n, r) => {
1813
- for (var i = r > 1 ? void 0 : r ? po(t, n) : t, s = e.length - 1, o; s >= 0; s--)
1814
- (o = e[s]) && (i = o(i) || i);
1815
- return i;
1816
- }, Cn = (e, t) => (n, r) => t(n, r, e), Gn = (e, t, n) => ho(e, typeof t != "symbol" ? t + "" : t, n);
1817
- let at = class extends ur {
1818
- constructor(e = hn, t, n) {
1819
- super(), this._config = e, this._injector = t, this._configService = n;
1820
- const { menu: r, ...i } = dr(
1782
+ at = co([
1783
+ Cn(0, y(Ht)),
1784
+ Cn(1, y(le))
1785
+ ], at);
1786
+ var lo = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, po = (t, e, n) => e in t ? lo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ho = (t, e, n, i) => {
1787
+ for (var r = i > 1 ? void 0 : i ? uo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1788
+ (s = t[o]) && (r = s(r) || r);
1789
+ return r;
1790
+ }, In = (t, e) => (n, i) => e(n, i, t), Zn = (t, e, n) => po(t, typeof e != "symbol" ? e + "" : e, n);
1791
+ let ct = class extends ur {
1792
+ constructor(t = mn, e, n) {
1793
+ super(), this._config = t, this._injector = e, this._configService = n;
1794
+ const { menu: i, ...r } = dr(
1821
1795
  {},
1822
- hn,
1796
+ mn,
1823
1797
  this._config
1824
1798
  );
1825
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Hn, i);
1799
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Hn, r);
1826
1800
  }
1827
1801
  onStarting() {
1828
1802
  [
1829
- [pe],
1803
+ [le],
1830
1804
  [K],
1831
1805
  [xn],
1832
- [it],
1833
- [rt],
1834
1806
  [ot],
1835
- [tt],
1836
- [Ye],
1807
+ [it],
1808
+ [st],
1837
1809
  [nt],
1838
- [st]
1839
- ].forEach((t) => this._injector.add(t)), this._injector.get(it);
1810
+ [ze],
1811
+ [rt],
1812
+ [at]
1813
+ ].forEach((e) => this._injector.add(e)), this._injector.get(ot);
1840
1814
  }
1841
1815
  onReady() {
1842
- this._injector.get(Ae).registerRenderModule(b.UNIVER_SHEET, [bt]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(ot);
1816
+ this._injector.get(De).registerRenderModule(w.UNIVER_SHEET, [bt]), this._injector.get(nt), this._injector.get(ze), this._injector.get(st);
1843
1817
  }
1844
1818
  onRendered() {
1845
- this._injector.get(nt), this._injector.get(st), this._injector.get(rt);
1819
+ this._injector.get(rt), this._injector.get(at), this._injector.get(it);
1846
1820
  }
1847
1821
  };
1848
- Gn(at, "pluginName", Ht);
1849
- Gn(at, "type", b.UNIVER_SHEET);
1850
- at = go([
1851
- lr(Sr, oi),
1852
- Cn(1, R(lt)),
1853
- Cn(2, In)
1854
- ], at);
1822
+ Zn(ct, "pluginName", Dt);
1823
+ Zn(ct, "type", w.UNIVER_SHEET);
1824
+ ct = ho([
1825
+ lr(Tr, oi),
1826
+ In(1, y(ut)),
1827
+ In(2, yn)
1828
+ ], ct);
1855
1829
  export {
1856
- qe as CloseHyperLinkPopupOperation,
1857
- $t as InsertHyperLinkOperation,
1830
+ Je as CloseHyperLinkPopupOperation,
1831
+ Bt as InsertHyperLinkOperation,
1858
1832
  Wn as InsertLinkShortcut,
1859
- At as OpenHyperLinkEditPanelOperation,
1860
- Ye as SheetsHyperLinkCopyPasteController,
1833
+ $t as OpenHyperLinkEditPanelOperation,
1834
+ ze as SheetsHyperLinkCopyPasteController,
1861
1835
  K as SheetsHyperLinkPopupService,
1862
- pe as SheetsHyperLinkResolverService,
1836
+ le as SheetsHyperLinkResolverService,
1863
1837
  xn as SheetsHyperLinkSidePanelService,
1864
- at as UniverSheetsHyperLinkUIPlugin
1838
+ ct as UniverSheetsHyperLinkUIPlugin
1865
1839
  };