@univerjs/sheets-hyper-link-ui 0.5.3 → 0.5.4

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,32 +1,32 @@
1
1
  var rr = Object.defineProperty;
2
2
  var ir = (t, e, n) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var B = (t, e, n) => ir(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { Tools as Ie, Inject as R, LocaleService as ct, UniverInstanceType as O, isValidRange as Rn, IUniverInstanceService as K, ICommandService as ie, IConfigService as Ln, RANGE_TYPE as sn, Rectangle as ye, Injector as lt, Disposable as Y, Range as Pn, ObjectMatrix as sr, useDependency as E, IContextService as bn, ThemeService as or, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as cr, FOCUSING_SHEET as It, generateRandomId as lr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ce, DataValidationType as Ct, CommandType as ut, FOCUSING_FX_BAR_EDITOR as ur, IPermissionService as dr, InterceptorEffectEnum as pr, DependentOn as hr, Plugin as gr, merge as mr } from "@univerjs/core";
5
- import { SheetHyperLinkType as S, ERROR_RANGE as fr, HyperLinkModel as dt, RemoveHyperLinkMutation as Ue, AddHyperLinkMutation as He, SheetsHyperLinkParserService as kt, UpdateRichHyperLinkCommand as vr, UpdateHyperLinkCommand as _r, AddRichHyperLinkCommand as Sr, AddHyperLinkCommand as Ir, CancelRichHyperLinkCommand as Cr, CancelHyperLinkCommand as yr, UniverSheetsHyperLinkPlugin as Er } from "@univerjs/sheets-hyper-link";
6
- import { ScrollToRangeOperation as wn, COPY_TYPE as Rr, virtualizeDiscreteRanges as Lt, rangeToDiscreteRange as Lr, PREDEFINED_HOOK_NAME as Be, getRepeatRange as Pr, ISheetClipboardService as br, IEditorBridgeService as re, IMarkSelectionService as wr, SheetCanvasPopManagerService as Or, getEditingCustomRangePosition as kr, getCustomRangePosition as Tr, whenSheetEditorFocused as xr, getCurrentRangeDisable$ as Nr, IAutoFillService as Mr, APPLY_TYPE as Oe, getAutoFillRepeatRange as Ur, SheetPermissionInterceptorBaseController as On, HoverManagerService as Hr, HoverRenderController as Dr, SheetSkeletonManagerService as an } from "@univerjs/sheets-ui";
7
- import { MessageType as xe, FormLayout as ve, Input as cn, Select as yt, Button as ln, Tooltip as Ae } from "@univerjs/design";
8
- import { deserializeRangeWithSheet as Fe, IDefinedNamesService as kn, serializeRangeWithSheet as $r, serializeRangeToRefString as jr, serializeRange as Br } from "@univerjs/engine-formula";
9
- import { SetSelectionsOperation as Tn, SetWorksheetActiveOperation as xn, SheetsSelectionsService as Tt, getSheetCommandTarget as Nn, WorkbookEditablePermission as xt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as Mn, WorksheetInsertHyperlinkPermission as Mt, RangeProtectionPermissionEditPoint as Ut, WorkbookViewPermission as Ar, WorksheetViewPermission as Vr, RangeProtectionPermissionViewPoint as Fr, WorkbookCopyPermission as Wr, WorksheetCopyPermission as Zr, ClearSelectionContentCommand as Gr, ClearSelectionAllCommand as Kr, ClearSelectionFormatCommand as Yr, SheetInterceptorService as zr, INTERCEPTOR_POINT as qr } from "@univerjs/sheets";
4
+ import { Tools as Ce, Inject as R, LocaleService as ct, UniverInstanceType as w, isValidRange as Rn, IUniverInstanceService as Y, ICommandService as ie, IConfigService as Ln, RANGE_TYPE as sn, Rectangle as ye, Injector as lt, Disposable as z, Range as Pn, ObjectMatrix as sr, useDependency as E, IContextService as bn, ThemeService as or, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as cr, FOCUSING_SHEET as Ct, generateRandomId as lr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ie, DataValidationType as It, CommandType as ut, FOCUSING_FX_BAR_EDITOR as ur, IPermissionService as dr, InterceptorEffectEnum as pr, DependentOn as hr, Plugin as gr, merge as fr } from "@univerjs/core";
5
+ import { SheetHyperLinkType as S, ERROR_RANGE as mr, HyperLinkModel as dt, RemoveHyperLinkMutation as Ue, AddHyperLinkMutation as He, SheetsHyperLinkParserService as kt, UpdateRichHyperLinkCommand as _r, UpdateHyperLinkCommand as vr, AddRichHyperLinkCommand as Sr, AddHyperLinkCommand as Cr, CancelRichHyperLinkCommand as Ir, CancelHyperLinkCommand as yr, UniverSheetsHyperLinkPlugin as Er } from "@univerjs/sheets-hyper-link";
6
+ import { ScrollToRangeOperation as wn, COPY_TYPE as Rr, virtualizeDiscreteRanges as Lt, rangeToDiscreteRange as Lr, PREDEFINED_HOOK_NAME as Ae, getRepeatRange as Pr, ISheetClipboardService as br, IEditorBridgeService as re, IMarkSelectionService as wr, SheetCanvasPopManagerService as Or, getEditingCustomRangePosition as kr, getCustomRangePosition as Tr, whenSheetEditorFocused as xr, getCurrentRangeDisable$ as Nr, IAutoFillService as Mr, APPLY_TYPE as Oe, getAutoFillRepeatRange as Ur, HoverManagerService as Hr, HoverRenderController as Dr, SheetSkeletonManagerService as an } from "@univerjs/sheets-ui";
7
+ import { MessageType as xe, FormLayout as _e, Input as cn, Select as yt, Button as ln, Tooltip as Be } from "@univerjs/design";
8
+ import { deserializeRangeWithSheet as Fe, IDefinedNamesService as On, serializeRangeWithSheet as $r, serializeRangeToRefString as jr, serializeRange as Ar } from "@univerjs/engine-formula";
9
+ import { SetSelectionsOperation as kn, SetWorksheetActiveOperation as Tn, SheetsSelectionsService as Tt, getSheetCommandTarget as xn, WorkbookEditablePermission as xt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as Nn, WorksheetInsertHyperlinkPermission as Mt, RangeProtectionPermissionEditPoint as Ut, SheetPermissionCheckController as Mn, WorkbookViewPermission as Br, WorksheetViewPermission as Vr, RangeProtectionPermissionViewPoint as Fr, WorkbookCopyPermission as Wr, WorksheetCopyPermission as Zr, ClearSelectionContentCommand as Gr, ClearSelectionAllCommand as Kr, ClearSelectionFormatCommand as Yr, SheetInterceptorService as zr, INTERCEPTOR_POINT as qr } from "@univerjs/sheets";
10
10
  import { IMessageService as Un, useObservable as Jr, IZenZoneService as pt, useEvent as Xr, KeyCode as Pt, MenuItemType as Hn, MetaKeys as Qr, getMenuHiddenObservable as ht, RibbonStartGroup as ei, ContextMenuPosition as ti, ContextMenuGroup as ni, ComponentManager as ri, IShortcutService as ii, IMenuManagerService as si } from "@univerjs/ui";
11
11
  import { DocSelectionRenderService as Dn, DocBackScrollRenderController as oi, DocCanvasPopManagerService as ai, calcDocRangePositions as ci, DocEventManagerService as un, UniverDocsUIPlugin as li } from "@univerjs/docs-ui";
12
12
  import { IRenderManagerService as $e } from "@univerjs/engine-render";
13
13
  import { Subject as ui, BehaviorSubject as di, of as Ne, map as le, filter as dn, switchMap as ue, combineLatest as pi, distinctUntilChanged as hi, debounceTime as We, Observable as gi } from "rxjs";
14
14
  import { DocSelectionManagerService as De } from "@univerjs/docs";
15
- import mi, { useState as J, useMemo as pn, useRef as bt, useCallback as fi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
16
- import { RangeSelector as vi } from "@univerjs/sheets-formula-ui";
15
+ import fi, { useState as X, useMemo as pn, useRef as bt, useCallback as mi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
16
+ import { RangeSelector as _i } from "@univerjs/sheets-formula-ui";
17
17
  import { SheetDataValidationModel as hn } from "@univerjs/sheets-data-validation";
18
18
  function Ke(t) {
19
- return Ie.isLegalUrl(t);
19
+ return Ce.isLegalUrl(t);
20
20
  }
21
- function _i(t) {
21
+ function vi(t) {
22
22
  return /^[a-zA-Z]+:\/\//.test(t);
23
23
  }
24
24
  function Si(t) {
25
25
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
26
26
  }
27
- function Ii(t) {
27
+ function Ci(t) {
28
28
  if (Ke(t)) {
29
- const e = _i(t) ? t : Si(t) ? `mailto://${t}` : `http://${t}`;
29
+ const e = vi(t) ? t : Si(t) ? `mailto://${t}` : `http://${t}`;
30
30
  let n;
31
31
  try {
32
32
  n = new URL(e);
@@ -38,11 +38,11 @@ function Ii(t) {
38
38
  return t;
39
39
  }
40
40
  const $n = "sheets-hyper-link-ui.config", gn = {};
41
- var Ci = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ei = (t, e, n, i) => {
41
+ var Ii = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ei = (t, e, n, i) => {
42
42
  for (var r = i > 1 ? void 0 : i ? yi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
43
43
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
44
- return i && r && Ci(e, n, r), r;
45
- }, _e = (t, e) => (n, i) => e(n, i, t);
44
+ return i && r && Ii(e, n, r), r;
45
+ }, ve = (t, e) => (n, i) => e(n, i, t);
46
46
  function Ri(t, e) {
47
47
  const n = e.getMergeData(), i = e.getMaxColumns() - 1, r = e.getMaxRows() - 1;
48
48
  if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === sn.COLUMN || sn.ROW)
@@ -66,7 +66,7 @@ let pe = class {
66
66
  }
67
67
  }
68
68
  _navigateToUniver(t) {
69
- const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET);
69
+ const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
70
70
  if (!r)
71
71
  return;
72
72
  const o = r.getUnitId();
@@ -94,7 +94,7 @@ let pe = class {
94
94
  if (e) {
95
95
  if (n) {
96
96
  const s = Fe(n);
97
- Rn(s.range) && n !== fr && this.navigateToRange(o, e, s.range);
97
+ Rn(s.range) && n !== mr && this.navigateToRange(o, e, s.range);
98
98
  return;
99
99
  }
100
100
  this.navigateToSheetById(o, e);
@@ -105,7 +105,7 @@ let pe = class {
105
105
  if (r) {
106
106
  const o = Ri(n, r);
107
107
  await this._commandService.executeCommand(
108
- Tn.id,
108
+ kn.id,
109
109
  {
110
110
  unitId: t,
111
111
  subUnitId: e,
@@ -121,7 +121,7 @@ let pe = class {
121
121
  }
122
122
  }
123
123
  async navigateToSheetById(t, e) {
124
- const n = this._univerInstanceService.getUnit(t, O.UNIVER_SHEET);
124
+ const n = this._univerInstanceService.getUnit(t, w.UNIVER_SHEET);
125
125
  if (!n)
126
126
  return !1;
127
127
  const i = n.getActiveSheet();
@@ -133,7 +133,7 @@ let pe = class {
133
133
  return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
134
134
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
135
135
  type: xe.Error
136
- }), !1) : await this._commandService.executeCommand(xn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
136
+ }), !1) : await this._commandService.executeCommand(Tn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
137
137
  content: this._localeService.t("hyperLink.message.noSheet"),
138
138
  type: xe.Error
139
139
  }), !1);
@@ -150,12 +150,12 @@ let pe = class {
150
150
  }
151
151
  };
152
152
  pe = Ei([
153
- _e(0, K),
154
- _e(1, ie),
155
- _e(2, kn),
156
- _e(3, Un),
157
- _e(4, R(ct)),
158
- _e(5, Ln)
153
+ ve(0, Y),
154
+ ve(1, ie),
155
+ ve(2, On),
156
+ ve(3, Un),
157
+ ve(4, R(ct)),
158
+ ve(5, Ln)
159
159
  ], pe);
160
160
  const Ht = "SHEET_HYPER_LINK_UI_PLUGIN";
161
161
  var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, bi = (t, e, n, i) => {
@@ -163,7 +163,7 @@ var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, bi = (t, e
163
163
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
164
164
  return i && r && Li(e, n, r), r;
165
165
  }, Ve = (t, e) => (n, i) => e(n, i, t);
166
- let Ye = class extends Y {
166
+ let Ye = class extends z {
167
167
  constructor(e, n, i, r) {
168
168
  super();
169
169
  B(this, "_plainTextFilter", /* @__PURE__ */ new Set());
@@ -195,7 +195,7 @@ let Ye = class extends Y {
195
195
  if (Ke(n) && i) {
196
196
  const { range: r, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: l } = Lt([r]), p = [], u = [];
197
197
  return Pn.foreach(c, (g, d) => {
198
- const { row: v, col: I } = l(g, d), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, I);
198
+ const { row: v, col: C } = l(g, d), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, C);
199
199
  _ && p.push({
200
200
  id: Ue.id,
201
201
  params: {
@@ -244,54 +244,52 @@ let Ye = class extends Y {
244
244
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
245
245
  return { redos: [], undos: [] };
246
246
  if ([
247
- Be.SPECIAL_PASTE_COL_WIDTH,
248
- Be.SPECIAL_PASTE_VALUE,
249
- Be.SPECIAL_PASTE_FORMAT,
250
- Be.SPECIAL_PASTE_FORMULA
251
- ].includes(
252
- n.pasteType
253
- ))
247
+ Ae.SPECIAL_PASTE_COL_WIDTH,
248
+ Ae.SPECIAL_PASTE_VALUE,
249
+ Ae.SPECIAL_PASTE_FORMAT,
250
+ Ae.SPECIAL_PASTE_FORMULA
251
+ ].includes(n.pasteType))
254
252
  return { redos: [], undos: [] };
255
- const { unitId: i, subUnitId: r } = this._copyInfo, o = [], s = [], { ranges: [c, l], mapFunc: p } = Lt([n.copyRange, e]);
256
- return Pr(c, l, !0).forEach(({ startRange: g }) => {
257
- var d;
258
- (d = this._copyInfo) == null || d.matrix.forValue((v, I, _) => {
259
- const b = ye.getPositionRange(
253
+ const { unitId: r, subUnitId: o } = this._copyInfo, s = [], c = [], { ranges: [l, p], mapFunc: u } = Lt([n.copyRange, e]);
254
+ return Pr(l, p, !0).forEach(({ startRange: d }) => {
255
+ var v;
256
+ (v = this._copyInfo) == null || v.matrix.forValue((C, _, O) => {
257
+ const a = ye.getPositionRange(
260
258
  {
261
- startRow: v,
262
- endRow: v,
263
- startColumn: I,
264
- endColumn: I
259
+ startRow: C,
260
+ endRow: C,
261
+ startColumn: _,
262
+ endColumn: _
265
263
  },
266
- g
267
- ), a = this._hyperLinkModel.getHyperLink(i, r, _), { row: w, col: M } = p(b.startRow, b.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, w, M), k = Ie.generateRandomId();
268
- L && o.push({
264
+ d
265
+ ), b = this._hyperLinkModel.getHyperLink(r, o, O), { row: M, col: k } = u(a.startRow, a.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, M, k), j = Ce.generateRandomId();
266
+ L && s.push({
269
267
  id: Ue.id,
270
268
  params: {
271
269
  unitId: n.unitId,
272
270
  subUnitId: n.subUnitId,
273
271
  id: L.id
274
272
  }
275
- }), a && (o.push({
273
+ }), b && (s.push({
276
274
  id: He.id,
277
275
  params: {
278
276
  unitId: n.unitId,
279
277
  subUnitId: n.subUnitId,
280
278
  link: {
281
- ...a,
282
- id: k,
283
- row: w,
284
- column: M
279
+ ...b,
280
+ id: j,
281
+ row: M,
282
+ column: k
285
283
  }
286
284
  }
287
- }), s.push({
285
+ }), c.push({
288
286
  id: Ue.id,
289
287
  params: {
290
288
  unitId: n.unitId,
291
289
  subUnitId: n.subUnitId,
292
- id: k
290
+ id: j
293
291
  }
294
- })), L && s.push({
292
+ })), L && c.push({
295
293
  id: He.id,
296
294
  params: {
297
295
  unitId: n.unitId,
@@ -300,7 +298,7 @@ let Ye = class extends Y {
300
298
  }
301
299
  });
302
300
  });
303
- }), { redos: o, undos: s };
301
+ }), { redos: s, undos: c };
304
302
  }
305
303
  };
306
304
  Ye = bi([
@@ -309,7 +307,7 @@ Ye = bi([
309
307
  Ve(2, R(lt)),
310
308
  Ve(3, R(pe))
311
309
  ], Ye);
312
- var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(f || {}), Et = { exports: {} }, ke = {};
310
+ var m = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(m || {}), Et = { exports: {} }, ke = {};
313
311
  /**
314
312
  * @license React
315
313
  * react-jsx-runtime.production.min.js
@@ -319,11 +317,11 @@ var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t
319
317
  * This source code is licensed under the MIT license found in the
320
318
  * LICENSE file in the root directory of this source tree.
321
319
  */
322
- var mn;
320
+ var fn;
323
321
  function wi() {
324
- if (mn) return ke;
325
- mn = 1;
326
- var t = mi, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
322
+ if (fn) return ke;
323
+ fn = 1;
324
+ var t = fi, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
327
325
  function s(c, l, p) {
328
326
  var u, g = {}, d = null, v = null;
329
327
  p !== void 0 && (d = "" + p), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (v = l.ref);
@@ -333,12 +331,12 @@ function wi() {
333
331
  }
334
332
  return ke.Fragment = n, ke.jsx = s, ke.jsxs = s, ke;
335
333
  }
336
- var fn;
334
+ var mn;
337
335
  function Oi() {
338
- return fn || (fn = 1, Et.exports = wi()), Et.exports;
336
+ return mn || (mn = 1, Et.exports = wi()), Et.exports;
339
337
  }
340
- var m = Oi();
341
- class jn extends Y {
338
+ var f = Oi();
339
+ class jn extends z {
342
340
  constructor() {
343
341
  super(...arguments);
344
342
  B(this, "_customHyperLinks", /* @__PURE__ */ new Map());
@@ -366,71 +364,71 @@ class jn extends Y {
366
364
  super.dispose(), this._customHyperLinks.clear();
367
365
  }
368
366
  }
369
- const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
367
+ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
370
368
  cellLinkEdit: ki,
371
369
  cellLinkEditButtons: Ti
372
370
  }, ze = () => {
373
371
  var Ft;
374
- const [t, e] = J(""), [n, i] = J(!1), [r, o] = J(""), [s, c] = J(!0), [l, p] = J(S.URL), [u, g] = J(""), d = E(ct), v = E(kn), I = E(re), _ = E(K), b = E(G), a = Jr(b.currentEditing$), w = E(kt), M = E(pe), L = E(ie), k = E(jn), X = pn(() => k.getOptions(), [k]), D = E(pt), z = E($e), Ee = E(wr), je = E(De), se = E(bn), Re = E(or), Le = E(De), Pe = bt({}), oe = pn(() => {
375
- if (!k.isBuiltInLinkType(l))
376
- return k.getCustomHyperLink(l);
377
- }, [k, l]), [j, Jn] = J(!1), [be, gt] = J(!1), H = bt(!1), A = _.getCurrentUnitForType(O.UNIVER_SHEET), Xn = (A == null ? void 0 : A.getActiveSheet().getSheetId()) || "", Q = fi((h) => {
372
+ const [t, e] = X(""), [n, i] = X(!1), [r, o] = X(""), [s, c] = X(!0), [l, p] = X(S.URL), [u, g] = X(""), d = E(ct), v = E(On), C = E(re), _ = E(Y), O = E(K), a = Jr(O.currentEditing$), b = E(kt), M = E(pe), k = E(ie), L = E(jn), j = pn(() => L.getOptions(), [L]), D = E(pt), q = E($e), Ee = E(wr), je = E(De), se = E(bn), Re = E(or), Le = E(De), Pe = bt({}), oe = pn(() => {
373
+ if (!L.isBuiltInLinkType(l))
374
+ return L.getCustomHyperLink(l);
375
+ }, [L, l]), [A, Jn] = X(!1), [be, gt] = X(!1), H = bt(!1), V = _.getCurrentUnitForType(w.UNIVER_SHEET), Xn = (V == null ? void 0 : V.getActiveSheet().getSheetId()) || "", Q = mi((h) => {
378
376
  o(h.replaceAll(on.CUSTOM_RANGE_START, "").replaceAll(on.CUSTOM_RANGE_END, ""));
379
377
  }, [o]);
380
378
  ne(() => {
381
- var h, y, C, P, N, V, Wt, Zt, Gt, Kt, Yt, zt, qt, Jt, Xt, Qt, en;
379
+ var h, y, I, P, N, F, Wt, Zt, Gt, Kt, Yt, zt, qt, Jt, Xt, Qt, en;
382
380
  if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
383
- const { customRange: ae, row: _t, col: St } = a;
384
- let { label: q } = a;
385
- typeof q == "number" && (q = `${q}`);
386
- let F;
381
+ const { customRange: ae, row: vt, col: St } = a;
382
+ let { label: J } = a;
383
+ typeof J == "number" && (J = `${J}`);
384
+ let W;
387
385
  if (ae)
388
- F = {
386
+ W = {
389
387
  id: (h = ae == null ? void 0 : ae.rangeId) != null ? h : "",
390
- display: q != null ? q : "",
391
- payload: (C = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? C : "",
392
- row: _t,
388
+ display: J != null ? J : "",
389
+ payload: (I = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? I : "",
390
+ row: vt,
393
391
  column: St
394
392
  };
395
- else if (a.type === f.VIEWING) {
396
- const T = _.getUnit(a.unitId), te = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), U = te == null ? void 0 : te.getCellRaw(a.row, a.col), fe = (V = (N = (P = U == null ? void 0 : U.p) == null ? void 0 : P.body) == null ? void 0 : N.customRanges) == null ? void 0 : V.find((nn) => {
393
+ else if (a.type === m.VIEWING) {
394
+ const T = _.getUnit(a.unitId), te = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), U = te == null ? void 0 : te.getCellRaw(a.row, a.col), me = (F = (N = (P = U == null ? void 0 : U.p) == null ? void 0 : P.body) == null ? void 0 : N.customRanges) == null ? void 0 : F.find((nn) => {
397
395
  var rn;
398
396
  return nn.rangeType === Ge.HYPERLINK && ((rn = nn.properties) == null ? void 0 : rn.url);
399
397
  }), we = U == null ? void 0 : U.v;
400
- U && (!Se.transform.isEmptyDocument((Zt = (Wt = U.p) == null ? void 0 : Wt.body) == null ? void 0 : Zt.dataStream) || Ie.isDefine(we)) && c(!1), F = {
398
+ U && (!Se.transform.isEmptyDocument((Zt = (Wt = U.p) == null ? void 0 : Wt.body) == null ? void 0 : Zt.dataStream) || Ce.isDefine(we)) && c(!1), W = {
401
399
  id: "",
402
400
  display: "",
403
- payload: (Kt = (Gt = fe == null ? void 0 : fe.properties) == null ? void 0 : Gt.url) != null ? Kt : "",
404
- row: _t,
401
+ payload: (Kt = (Gt = me == null ? void 0 : me.properties) == null ? void 0 : Gt.url) != null ? Kt : "",
402
+ row: vt,
405
403
  column: St
406
404
  };
407
405
  } else {
408
- const T = _.getCurrentUnitForType(O.UNIVER_DOC), te = je.getActiveTextRange(), U = T == null ? void 0 : T.getBody(), fe = te && U ? te : null, we = fe && ((zt = Se.customRange.getCustomRangesInterestsWithSelection(fe, (Yt = U == null ? void 0 : U.customRanges) != null ? Yt : [])) == null ? void 0 : zt[0]);
409
- c(!1), F = {
406
+ const T = _.getCurrentUnitForType(w.UNIVER_DOC), te = je.getActiveTextRange(), U = T == null ? void 0 : T.getBody(), me = te && U ? te : null, we = me && ((zt = Se.customRange.getCustomRangesInterestsWithSelection(me, (Yt = U == null ? void 0 : U.customRanges) != null ? Yt : [])) == null ? void 0 : zt[0]);
407
+ c(!1), W = {
410
408
  id: "",
411
- display: q != null ? q : "",
409
+ display: J != null ? J : "",
412
410
  payload: (Jt = (qt = we == null ? void 0 : we.properties) == null ? void 0 : qt.url) != null ? Jt : "",
413
- row: _t,
411
+ row: vt,
414
412
  column: St
415
413
  };
416
414
  }
417
- e(F.id);
418
- const tn = k.findCustomHyperLink(F);
415
+ e(W.id);
416
+ const tn = L.findCustomHyperLink(W);
419
417
  if (tn) {
420
- const T = tn.convert(F);
418
+ const T = tn.convert(W);
421
419
  p(T.type), g(T.payload), Q(T.display);
422
420
  return;
423
421
  }
424
- Q(F.display);
425
- const ee = w.parseHyperLink(F.payload);
422
+ Q(W.display);
423
+ const ee = b.parseHyperLink(W.payload);
426
424
  switch (p(ee.type === S.INVALID ? S.RANGE : ee.type), ee.type) {
427
425
  case S.URL: {
428
- g(ee.url), ee.url === F.display && (H.current = !0);
426
+ g(ee.url), ee.url === W.display && (H.current = !0);
429
427
  break;
430
428
  }
431
429
  case S.RANGE: {
432
430
  const T = ee.searchObj, te = T.gid && (en = (Qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : Qt.getName()) != null ? en : "", U = $r(te, Fe(T.range).range);
433
- g(U), U === F.display && (H.current = !0);
431
+ g(U), U === W.display && (H.current = !0);
434
432
  break;
435
433
  }
436
434
  case S.SHEET: {
@@ -448,10 +446,10 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
448
446
  break;
449
447
  }
450
448
  }
451
- }, [a, M, k, je, _]), ne(() => {
449
+ }, [a, M, L, je, _]), ne(() => {
452
450
  let h = null;
453
- if (a && !a.customRangeId && a.type === f.VIEWING && Ie.isDefine(a.row) && Ie.isDefine(a.col)) {
454
- const y = _.getUnit(a.unitId, O.UNIVER_SHEET), C = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = C == null ? void 0 : C.getMergedCell(a.row, a.col), N = new ar(Re.getCurrentTheme().hyacinth500).toRgb();
451
+ if (a && !a.customRangeId && a.type === m.VIEWING && Ce.isDefine(a.row) && Ce.isDefine(a.col)) {
452
+ const y = _.getUnit(a.unitId, w.UNIVER_SHEET), I = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = I == null ? void 0 : I.getMergedCell(a.row, a.col), N = new ar(Re.getCurrentTheme().hyacinth500).toRgb();
455
453
  h = Ee.addShape(
456
454
  {
457
455
  range: P != null ? P : {
@@ -479,26 +477,26 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
479
477
  }, [a, Ee, Re, _]), ne(() => {
480
478
  gt(l === S.RANGE);
481
479
  }, [l]), ne(() => {
482
- const h = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? z.getRenderById(x) : z.getRenderById(I.getCurrentEditorId()), y = new cr();
480
+ const h = (a == null ? void 0 : a.type) === m.ZEN_EDITOR ? q.getRenderById(x) : q.getRenderById(C.getCurrentEditorId()), y = new cr();
483
481
  if (h) {
484
- const C = h.with(Dn);
485
- C.setReserveRangesStatus(!0), y.add(() => {
486
- C.setReserveRangesStatus(!1);
482
+ const I = h.with(Dn);
483
+ I.setReserveRangesStatus(!0), y.add(() => {
484
+ I.setReserveRangesStatus(!1);
487
485
  });
488
486
  }
489
487
  return () => {
490
- I.disableForceKeepVisible(), y.dispose();
488
+ C.disableForceKeepVisible(), y.dispose();
491
489
  };
492
- }, [a == null ? void 0 : a.type, I, z]), ne(() => (b.setIsKeepVisible(be), () => {
493
- b.setIsKeepVisible(!1);
494
- }), [be, b]), ne(() => () => {
495
- D.temporaryHidden && (D.show(), se.setContextValue(It, !1));
490
+ }, [a == null ? void 0 : a.type, C, q]), ne(() => (O.setIsKeepVisible(be), () => {
491
+ O.setIsKeepVisible(!1);
492
+ }), [be, O]), ne(() => () => {
493
+ D.temporaryHidden && (D.show(), se.setContextValue(Ct, !1));
496
494
  }, [se, D]), ne(() => {
497
495
  if (be)
498
- return I.enableForceKeepVisible(), () => {
499
- I.disableForceKeepVisible();
496
+ return C.enableForceKeepVisible(), () => {
497
+ C.disableForceKeepVisible();
500
498
  };
501
- }, [be, I]);
499
+ }, [be, C]);
502
500
  const Qn = [
503
501
  {
504
502
  label: d.t("hyperLink.form.link"),
@@ -516,39 +514,39 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
516
514
  label: d.t("hyperLink.form.definedName"),
517
515
  value: S.DEFINE_NAME
518
516
  },
519
- ...X
517
+ ...j
520
518
  ];
521
- if (!A)
519
+ if (!V)
522
520
  return;
523
- const er = A.getHiddenWorksheets(), mt = A.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => er.indexOf(h.value) === -1), ft = Object.values((Ft = v.getDefinedNameMap(A.getUnitId())) != null ? Ft : {}).map((h) => ({
521
+ const er = V.getHiddenWorksheets(), ft = V.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => er.indexOf(h.value) === -1), mt = Object.values((Ft = v.getDefinedNameMap(V.getUnitId())) != null ? Ft : {}).map((h) => ({
524
522
  label: h.name,
525
523
  value: h.id
526
524
  })), Vt = (h, y) => {
527
525
  if (h === S.URL)
528
- return Ii(y);
526
+ return Ci(y);
529
527
  if (h === S.RANGE) {
530
- const C = Fe(y), P = A.getSheetBySheetName(C.sheetName);
528
+ const I = Fe(y), P = V.getSheetBySheetName(I.sheetName);
531
529
  if (P)
532
- return `#gid=${P.getSheetId()}&range=${Br(C.range)}`;
530
+ return `#gid=${P.getSheetId()}&range=${Ar(I.range)}`;
533
531
  }
534
532
  return `#${h}=${y}`;
535
533
  }, tr = Xr((h) => {
536
534
  var N;
537
- const C = h.split(",").map(Fe)[0];
538
- if (!C || !Rn(C.range))
535
+ const I = h.split(",").map(Fe)[0];
536
+ if (!I || !Rn(I.range))
539
537
  return;
540
- C.sheetName || (C.sheetName = ((N = A.getActiveSheet()) == null ? void 0 : N.getName()) || "");
541
- const P = jr(C);
538
+ I.sheetName || (I.sheetName = ((N = V.getActiveSheet()) == null ? void 0 : N.getName()) || "");
539
+ const P = jr(I);
542
540
  g(P), P && (H.current || !r) && (Q(P), H.current = !0);
543
- }), vt = async () => {
541
+ }), _t = async () => {
544
542
  if (s && !r || !u || l === S.URL && !Ke(u)) {
545
543
  Jn(!0);
546
544
  return;
547
545
  }
548
546
  if (a)
549
547
  if (t) {
550
- const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? vr.id : _r.id;
551
- await L.executeCommand(h, {
548
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? _r.id : vr.id;
549
+ await k.executeCommand(h, {
552
550
  id: t,
553
551
  unitId: a.unitId,
554
552
  subUnitId: a.subUnitId,
@@ -558,11 +556,11 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
558
556
  },
559
557
  row: a.row,
560
558
  column: a.col,
561
- documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
559
+ documentId: a.type === m.ZEN_EDITOR ? x : C.getCurrentEditorId()
562
560
  });
563
561
  } else {
564
- const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? Sr.id : Ir.id;
565
- await L.executeCommand(h, {
562
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? Sr.id : Cr.id;
563
+ await k.executeCommand(h, {
566
564
  unitId: a.unitId,
567
565
  subUnitId: a.subUnitId,
568
566
  link: {
@@ -572,16 +570,16 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
572
570
  payload: Vt(l, u),
573
571
  display: s ? r : ""
574
572
  },
575
- documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
573
+ documentId: a.type === m.ZEN_EDITOR ? x : C.getCurrentEditorId()
576
574
  });
577
575
  }
578
- if ((a == null ? void 0 : a.type) === f.VIEWING) {
579
- await L.executeCommand(xn.id, {
576
+ if ((a == null ? void 0 : a.type) === m.VIEWING) {
577
+ await k.executeCommand(Tn.id, {
580
578
  unitId: a.unitId,
581
579
  subUnitId: a.subUnitId
582
580
  });
583
581
  const h = 1;
584
- await L.executeCommand(wn.id, {
582
+ await k.executeCommand(wn.id, {
585
583
  range: {
586
584
  startRow: Math.max(a.row - h, 0),
587
585
  endRow: a.row + h,
@@ -590,21 +588,21 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
590
588
  }
591
589
  });
592
590
  }
593
- L.executeCommand(Je.id);
591
+ k.executeCommand(Je.id);
594
592
  }, nr = (h) => {
595
- var C;
593
+ var I;
596
594
  if (l !== S.RANGE)
597
595
  return;
598
- const y = (C = Pe.current) == null ? void 0 : C.handleOutClick;
596
+ const y = (I = Pe.current) == null ? void 0 : I.handleOutClick;
599
597
  y && y(h, () => gt(!1));
600
598
  };
601
- return a ? /* @__PURE__ */ m.jsxs("div", { className: vn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: nr, children: [
602
- s ? /* @__PURE__ */ m.jsx(
603
- ve,
599
+ return a ? /* @__PURE__ */ f.jsxs("div", { className: _n.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: nr, children: [
600
+ s ? /* @__PURE__ */ f.jsx(
601
+ _e,
604
602
  {
605
603
  label: d.t("hyperLink.form.label"),
606
- error: j && !r ? d.t("hyperLink.form.inputError") : "",
607
- children: /* @__PURE__ */ m.jsx(
604
+ error: A && !r ? d.t("hyperLink.form.inputError") : "",
605
+ children: /* @__PURE__ */ f.jsx(
608
606
  cn,
609
607
  {
610
608
  value: r,
@@ -614,13 +612,13 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
614
612
  placeholder: d.t("hyperLink.form.labelPlaceholder"),
615
613
  autoFocus: !0,
616
614
  onKeyDown: (h) => {
617
- h.keyCode === Pt.ENTER && vt();
615
+ h.keyCode === Pt.ENTER && _t();
618
616
  }
619
617
  }
620
618
  )
621
619
  }
622
620
  ) : null,
623
- /* @__PURE__ */ m.jsx(ve, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ m.jsx(
621
+ /* @__PURE__ */ f.jsx(_e, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ f.jsx(
624
622
  yt,
625
623
  {
626
624
  options: Qn,
@@ -630,11 +628,11 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
630
628
  }
631
629
  }
632
630
  ) }),
633
- l === S.URL && /* @__PURE__ */ m.jsx(
634
- ve,
631
+ l === S.URL && /* @__PURE__ */ f.jsx(
632
+ _e,
635
633
  {
636
- error: j ? u ? Ke(u) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
637
- children: /* @__PURE__ */ m.jsx(
634
+ error: A ? u ? Ke(u) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
635
+ children: /* @__PURE__ */ f.jsx(
638
636
  cn,
639
637
  {
640
638
  value: u,
@@ -644,16 +642,16 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
644
642
  placeholder: d.t("hyperLink.form.linkPlaceholder"),
645
643
  autoFocus: !0,
646
644
  onKeyDown: (h) => {
647
- h.keyCode === Pt.ENTER && vt();
645
+ h.keyCode === Pt.ENTER && _t();
648
646
  }
649
647
  }
650
648
  )
651
649
  }
652
650
  ),
653
- l === S.RANGE && /* @__PURE__ */ m.jsx(ve, { error: j && !u ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m.jsx(
654
- vi,
651
+ l === S.RANGE && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ f.jsx(
652
+ _i,
655
653
  {
656
- unitId: A.getUnitId(),
654
+ unitId: V.getUnitId(),
657
655
  subUnitId: Xn,
658
656
  isOnlyOneRange: !0,
659
657
  isSupportAcrossSheet: !0,
@@ -663,57 +661,57 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
663
661
  onFocus: () => gt(!0),
664
662
  actions: Pe.current,
665
663
  onRangeSelectorDialogVisibleChange: async (h) => {
666
- var y, C;
664
+ var y, I;
667
665
  if (h)
668
- a.type === f.ZEN_EDITOR && (D.hide(), se.setContextValue(It, !0)), a.type !== f.VIEWING && I.enableForceKeepVisible(), i(!0);
666
+ a.type === m.ZEN_EDITOR && (D.hide(), se.setContextValue(Ct, !0)), a.type !== m.VIEWING && C.enableForceKeepVisible(), i(!0);
669
667
  else {
670
- if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === f.ZEN_EDITOR) {
671
- await L.executeCommand(Tn.id, {
668
+ if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === m.ZEN_EDITOR) {
669
+ await k.executeCommand(kn.id, {
672
670
  unitId: a.unitId,
673
671
  subUnitId: a.subUnitId,
674
672
  selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
675
- }), D.show(), se.setContextValue(It, !1);
676
- const P = (y = z.getRenderById(x)) == null ? void 0 : y.with(oi), N = (C = Le.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : C[0];
673
+ }), D.show(), se.setContextValue(Ct, !1);
674
+ const P = (y = q.getRenderById(x)) == null ? void 0 : y.with(oi), N = (I = Le.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : I[0];
677
675
  P && N && (P.scrollToRange(N), Le.refreshSelection({ unitId: x, subUnitId: x }));
678
676
  }
679
- I.disableForceKeepVisible(), i(!1);
677
+ C.disableForceKeepVisible(), i(!1);
680
678
  }
681
679
  }
682
680
  }
683
681
  ) }),
684
- l === S.SHEET && /* @__PURE__ */ m.jsx(ve, { error: j && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
682
+ l === S.SHEET && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f.jsx(
685
683
  yt,
686
684
  {
687
- options: mt,
685
+ options: ft,
688
686
  value: u,
689
687
  onChange: (h) => {
690
688
  var P, N;
691
689
  g(h);
692
- const y = (P = mt.find((V) => V.value === h)) == null ? void 0 : P.label, C = (N = mt.find((V) => V.value === u)) == null ? void 0 : N.label;
693
- y && (H.current || !r || r === C) && (Q(y), H.current = !0);
690
+ const y = (P = ft.find((F) => F.value === h)) == null ? void 0 : P.label, I = (N = ft.find((F) => F.value === u)) == null ? void 0 : N.label;
691
+ y && (H.current || !r || r === I) && (Q(y), H.current = !0);
694
692
  }
695
693
  }
696
694
  ) }),
697
- l === S.DEFINE_NAME && /* @__PURE__ */ m.jsx(ve, { error: j && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
695
+ l === S.DEFINE_NAME && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f.jsx(
698
696
  yt,
699
697
  {
700
- options: ft,
698
+ options: mt,
701
699
  value: u,
702
700
  onChange: (h) => {
703
701
  var P, N;
704
702
  g(h);
705
- const y = (P = ft.find((V) => V.value === h)) == null ? void 0 : P.label, C = (N = ft.find((V) => V.value === u)) == null ? void 0 : N.label;
706
- y && (H.current || !r || r === C) && (Q(y), H.current = !0);
703
+ const y = (P = mt.find((F) => F.value === h)) == null ? void 0 : P.label, I = (N = mt.find((F) => F.value === u)) == null ? void 0 : N.label;
704
+ y && (H.current || !r || r === I) && (Q(y), H.current = !0);
707
705
  }
708
706
  }
709
707
  ) }),
710
- (oe == null ? void 0 : oe.Form) && /* @__PURE__ */ m.jsx(
708
+ (oe == null ? void 0 : oe.Form) && /* @__PURE__ */ f.jsx(
711
709
  oe.Form,
712
710
  {
713
711
  linkId: t,
714
712
  payload: u,
715
713
  display: r,
716
- showError: j,
714
+ showError: A,
717
715
  setByPayload: H,
718
716
  setDisplay: (h) => {
719
717
  Q(h), H.current = !0;
@@ -721,23 +719,23 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", vn = {
721
719
  setPayload: g
722
720
  }
723
721
  ),
724
- /* @__PURE__ */ m.jsxs("div", { className: vn.cellLinkEditButtons, children: [
725
- /* @__PURE__ */ m.jsx(
722
+ /* @__PURE__ */ f.jsxs("div", { className: _n.cellLinkEditButtons, children: [
723
+ /* @__PURE__ */ f.jsx(
726
724
  ln,
727
725
  {
728
726
  onClick: () => {
729
- a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), L.executeCommand(Je.id);
727
+ a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), k.executeCommand(Je.id);
730
728
  },
731
729
  children: d.t("hyperLink.form.cancel")
732
730
  }
733
731
  ),
734
- /* @__PURE__ */ m.jsx(
732
+ /* @__PURE__ */ f.jsx(
735
733
  ln,
736
734
  {
737
735
  type: "primary",
738
736
  style: { marginLeft: 8 },
739
737
  onClick: async () => {
740
- vt();
738
+ _t();
741
739
  },
742
740
  children: d.t("hyperLink.form.ok")
743
741
  }
@@ -761,13 +759,13 @@ var $ = function() {
761
759
  for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
762
760
  e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
763
761
  return n;
764
- }, me = he(function(t, e) {
762
+ }, fe = he(function(t, e) {
765
763
  var n = t.icon, i = t.id, r = t.className, o = t.extend, s = xi(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), l = bt("_".concat(Ui()));
766
- return Bn(n, "".concat(i), { defIds: n.defIds, idSuffix: l.current }, $({ ref: e, className: c }, s), o);
764
+ return An(n, "".concat(i), { defIds: n.defIds, idSuffix: l.current }, $({ ref: e, className: c }, s), o);
767
765
  });
768
- function Bn(t, e, n, i, r) {
766
+ function An(t, e, n, i, r) {
769
767
  return ge(t.tag, $($({ key: e }, Ni(t, n, r)), i), (Mi(t, n).children || []).map(function(o, s) {
770
- return Bn(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, r);
768
+ return An(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, r);
771
769
  }));
772
770
  }
773
771
  function Ni(t, e, n) {
@@ -788,25 +786,25 @@ function Mi(t, e) {
788
786
  function Ui() {
789
787
  return Math.random().toString(36).substring(2, 8);
790
788
  }
791
- me.displayName = "UniverIcon";
789
+ fe.displayName = "UniverIcon";
792
790
  var Hi = { 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(t, e) {
793
- return ge(me, Object.assign({}, t, {
791
+ return ge(fe, Object.assign({}, t, {
794
792
  id: "all-border-single",
795
793
  ref: e,
796
794
  icon: Hi
797
795
  }));
798
796
  });
799
797
  Ze.displayName = "AllBorderSingle";
800
- var Di = { 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(t, e) {
801
- return ge(me, Object.assign({}, t, {
798
+ var Di = { 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" } }] }, Bn = he(function(t, e) {
799
+ return ge(fe, Object.assign({}, t, {
802
800
  id: "copy-single",
803
801
  ref: e,
804
802
  icon: Di
805
803
  }));
806
804
  });
807
- An.displayName = "CopySingle";
805
+ Bn.displayName = "CopySingle";
808
806
  var $i = { 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" } }] }, Dt = he(function(t, e) {
809
- return ge(me, Object.assign({}, t, {
807
+ return ge(fe, Object.assign({}, t, {
810
808
  id: "link-single",
811
809
  ref: e,
812
810
  icon: $i
@@ -814,26 +812,26 @@ var $i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
814
812
  });
815
813
  Dt.displayName = "LinkSingle";
816
814
  var ji = { 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" } }] }, Vn = he(function(t, e) {
817
- return ge(me, Object.assign({}, t, {
815
+ return ge(fe, Object.assign({}, t, {
818
816
  id: "unlink-single",
819
817
  ref: e,
820
818
  icon: ji
821
819
  }));
822
820
  });
823
821
  Vn.displayName = "UnlinkSingle";
824
- var Bi = { 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" } }] }, Fn = he(function(t, e) {
825
- return ge(me, Object.assign({}, t, {
822
+ var Ai = { 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" } }] }, Fn = he(function(t, e) {
823
+ return ge(fe, Object.assign({}, t, {
826
824
  id: "write-single",
827
825
  ref: e,
828
- icon: Bi
826
+ icon: Ai
829
827
  }));
830
828
  });
831
829
  Fn.displayName = "WriteSingle";
832
- var Ai = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.4535 1.12549C2.7002 1.12549 2.08954 1.73615 2.08954 2.48945V13.5104C2.08954 14.2637 2.7002 14.8744 3.4535 14.8744H12.5465C13.2998 14.8744 13.9105 14.2637 13.9105 13.5104V5.0992L10.0091 1.12549H3.4535Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M10.0075 1.12549L13.9104 5.09842H10.6742C10.306 5.09842 10.0075 4.79994 10.0075 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.8088 10.2949L6.3764 12.403C6.26259 12.5705 6.03455 12.614 5.86705 12.5002C5.69955 12.3864 5.65603 12.1584 5.76984 11.9909L7.3655 9.64252L5.94042 7.54519C5.82661 7.37769 5.87013 7.14964 6.03763 7.03583C6.20512 6.92202 6.43317 6.96555 6.54698 7.13304L7.8088 8.9901L9.07062 7.13304C9.18443 6.96555 9.41248 6.92202 9.57997 7.03583C9.74747 7.14964 9.79099 7.37769 9.67718 7.54519L8.2521 9.64252L9.84776 11.9909C9.96157 12.1584 9.91805 12.3864 9.75055 12.5002C9.58305 12.614 9.35501 12.5705 9.2412 12.403L7.8088 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wn = he(function(t, e) {
833
- return ge(me, Object.assign({}, t, {
830
+ var Bi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.4535 1.12549C2.7002 1.12549 2.08954 1.73615 2.08954 2.48945V13.5104C2.08954 14.2637 2.7002 14.8744 3.4535 14.8744H12.5465C13.2998 14.8744 13.9105 14.2637 13.9105 13.5104V5.0992L10.0091 1.12549H3.4535Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M10.0075 1.12549L13.9104 5.09842H10.6742C10.306 5.09842 10.0075 4.79994 10.0075 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.8088 10.2949L6.3764 12.403C6.26259 12.5705 6.03455 12.614 5.86705 12.5002C5.69955 12.3864 5.65603 12.1584 5.76984 11.9909L7.3655 9.64252L5.94042 7.54519C5.82661 7.37769 5.87013 7.14964 6.03763 7.03583C6.20512 6.92202 6.43317 6.96555 6.54698 7.13304L7.8088 8.9901L9.07062 7.13304C9.18443 6.96555 9.41248 6.92202 9.57997 7.03583C9.74747 7.14964 9.79099 7.37769 9.67718 7.54519L8.2521 9.64252L9.84776 11.9909C9.96157 12.1584 9.91805 12.3864 9.75055 12.5002C9.58305 12.614 9.35501 12.5705 9.2412 12.403L7.8088 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wn = he(function(t, e) {
831
+ return ge(fe, Object.assign({}, t, {
834
832
  id: "xlsx",
835
833
  ref: e,
836
- icon: Ai
834
+ icon: Bi
837
835
  }));
838
836
  });
839
837
  Wn.displayName = "Xlsx";
@@ -846,11 +844,11 @@ function Zn(t) {
846
844
  } else for (n in t) t[n] && (i && (i += " "), i += n);
847
845
  return i;
848
846
  }
849
- function _n() {
847
+ function vn() {
850
848
  for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = Zn(t)) && (i && (i += " "), i += e);
851
849
  return i;
852
850
  }
853
- const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-link-content", Zi = "univer-cell-link-content-error", Gi = "univer-cell-link-url", Ki = "univer-cell-link-operations", Yi = "univer-cell-link-operation", zi = "univer-cell-link-operation-error", W = {
851
+ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-link-content", Zi = "univer-cell-link-content-error", Gi = "univer-cell-link-url", Ki = "univer-cell-link-operations", Yi = "univer-cell-link-operation", zi = "univer-cell-link-operation-error", Z = {
854
852
  cellLink: Vi,
855
853
  cellLinkType: Fi,
856
854
  cellLinkContent: Wi,
@@ -860,41 +858,41 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
860
858
  cellLinkOperation: Yi,
861
859
  cellLinkOperationError: zi
862
860
  }, qi = {
863
- [S.URL]: /* @__PURE__ */ m.jsx(Dt, {}),
864
- [S.SHEET]: /* @__PURE__ */ m.jsx(Wn, {}),
865
- [S.RANGE]: /* @__PURE__ */ m.jsx(Ze, {}),
866
- [S.DEFINE_NAME]: /* @__PURE__ */ m.jsx(Ze, {}),
867
- [S.INVALID]: /* @__PURE__ */ m.jsx(Ze, {})
861
+ [S.URL]: /* @__PURE__ */ f.jsx(Dt, {}),
862
+ [S.SHEET]: /* @__PURE__ */ f.jsx(Wn, {}),
863
+ [S.RANGE]: /* @__PURE__ */ f.jsx(Ze, {}),
864
+ [S.DEFINE_NAME]: /* @__PURE__ */ f.jsx(Ze, {}),
865
+ [S.INVALID]: /* @__PURE__ */ f.jsx(Ze, {})
868
866
  }, Sn = (t) => {
869
- var M, L;
870
- const e = E(G), n = E(ie), i = E(Un), r = E(ct), o = E(pe), s = E(re), c = E(kt), l = E(pt), { customRange: p, row: u, col: g, unitId: d, subUnitId: v, editPermission: I, copyPermission: _, type: b } = t;
867
+ var M, k;
868
+ const e = E(K), n = E(ie), i = E(Un), r = E(ct), o = E(pe), s = E(re), c = E(kt), l = E(pt), { customRange: p, row: u, col: g, unitId: d, subUnitId: v, editPermission: C, copyPermission: _, type: O } = t;
871
869
  if (!((M = p == null ? void 0 : p.properties) != null && M.url))
872
870
  return null;
873
- const a = c.parseHyperLink((L = p.properties.url) != null ? L : ""), w = a.type === S.INVALID;
874
- return /* @__PURE__ */ m.jsxs("div", { className: W.cellLink, onClick: () => e.hideCurrentPopup(), children: [
875
- /* @__PURE__ */ m.jsxs(
871
+ const a = c.parseHyperLink((k = p.properties.url) != null ? k : ""), b = a.type === S.INVALID;
872
+ return /* @__PURE__ */ f.jsxs("div", { className: Z.cellLink, onClick: () => e.hideCurrentPopup(), children: [
873
+ /* @__PURE__ */ f.jsxs(
876
874
  "div",
877
875
  {
878
- className: _n(W.cellLinkContent, { [W.cellLinkContentError]: w }),
876
+ className: vn(Z.cellLinkContent, { [Z.cellLinkContentError]: b }),
879
877
  onClick: () => {
880
- l.visible || w || o.navigate(a);
878
+ l.visible || b || o.navigate(a);
881
879
  },
882
880
  children: [
883
- /* @__PURE__ */ m.jsx("div", { className: W.cellLinkType, children: qi[a.type] }),
884
- /* @__PURE__ */ m.jsx(Ae, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ m.jsx("span", { className: W.cellLinkUrl, children: a.name }) })
881
+ /* @__PURE__ */ f.jsx("div", { className: Z.cellLinkType, children: qi[a.type] }),
882
+ /* @__PURE__ */ f.jsx(Be, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ f.jsx("span", { className: Z.cellLinkUrl, children: a.name }) })
885
883
  ]
886
884
  }
887
885
  ),
888
- /* @__PURE__ */ m.jsxs("div", { className: W.cellLinkOperations, children: [
889
- _ && /* @__PURE__ */ m.jsx(
886
+ /* @__PURE__ */ f.jsxs("div", { className: Z.cellLinkOperations, children: [
887
+ _ && /* @__PURE__ */ f.jsx(
890
888
  "div",
891
889
  {
892
- className: _n(W.cellLinkOperation, { [W.cellLinkOperationError]: w }),
890
+ className: vn(Z.cellLinkOperation, { [Z.cellLinkOperationError]: b }),
893
891
  onClick: () => {
894
- if (!w) {
892
+ if (!b) {
895
893
  if (a.type !== S.URL) {
896
- const k = new URL(window.location.href);
897
- k.hash = a.url.slice(1), navigator.clipboard.writeText(k.href);
894
+ const L = new URL(window.location.href);
895
+ L.hash = a.url.slice(1), navigator.clipboard.writeText(L.href);
898
896
  } else
899
897
  navigator.clipboard.writeText(a.url);
900
898
  i.show({
@@ -903,14 +901,14 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
903
901
  });
904
902
  }
905
903
  },
906
- children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m.jsx(An, {}) })
904
+ children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ f.jsx(Bn, {}) })
907
905
  }
908
906
  ),
909
- I && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
910
- /* @__PURE__ */ m.jsx(
907
+ C && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
908
+ /* @__PURE__ */ f.jsx(
911
909
  "div",
912
910
  {
913
- className: W.cellLinkOperation,
911
+ className: Z.cellLinkOperation,
914
912
  onClick: () => {
915
913
  n.executeCommand(jt.id, {
916
914
  unitId: d,
@@ -918,28 +916,28 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
918
916
  row: u,
919
917
  col: g,
920
918
  customRangeId: p.rangeId,
921
- type: b
919
+ type: O
922
920
  });
923
921
  },
924
- children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m.jsx(Fn, {}) })
922
+ children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ f.jsx(Fn, {}) })
925
923
  }
926
924
  ),
927
- /* @__PURE__ */ m.jsx(
925
+ /* @__PURE__ */ f.jsx(
928
926
  "div",
929
927
  {
930
- className: W.cellLinkOperation,
928
+ className: Z.cellLinkOperation,
931
929
  onClick: () => {
932
- const k = b === f.EDITING || b === f.ZEN_EDITOR ? Cr.id : yr.id;
933
- n.syncExecuteCommand(k, {
930
+ const L = O === m.EDITING || O === m.ZEN_EDITOR ? Ir.id : yr.id;
931
+ n.syncExecuteCommand(L, {
934
932
  unitId: d,
935
933
  subUnitId: v,
936
934
  id: p.rangeId,
937
935
  row: u,
938
936
  column: g,
939
- documentId: b === f.ZEN_EDITOR ? x : s.getCurrentEditorId()
937
+ documentId: O === m.ZEN_EDITOR ? x : s.getCurrentEditorId()
940
938
  }) && e.hideCurrentPopup(void 0, !0);
941
939
  },
942
- children: /* @__PURE__ */ m.jsx(Ae, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m.jsx(Vn, {}) })
940
+ children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ f.jsx(Vn, {}) })
943
941
  }
944
942
  )
945
943
  ] })
@@ -947,7 +945,7 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
947
945
  ] });
948
946
  }, qe = () => {
949
947
  var r, o;
950
- const t = E(G), [e, n] = J(null), i = E(K);
948
+ const t = E(K), [e, n] = X(null), i = E(Y);
951
949
  if (ne(() => {
952
950
  n(t.currentPopup);
953
951
  const s = t.currentPopup$.subscribe((c) => {
@@ -959,10 +957,10 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
959
957
  }, [t.currentPopup, t.currentPopup$]), !e)
960
958
  return null;
961
959
  if (e.showAll) {
962
- const s = i.getUnit(e.unitId, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), l = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (r = l == null ? void 0 : l.p) == null ? void 0 : r.body) == null ? void 0 : o.customRanges;
963
- return p != null && p.length ? /* @__PURE__ */ m.jsx("div", { children: p.map((u) => /* @__PURE__ */ m.jsx(Sn, { ...e, customRange: u }, u.rangeId)) }) : null;
960
+ const s = i.getUnit(e.unitId, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), l = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (r = l == null ? void 0 : l.p) == null ? void 0 : r.body) == null ? void 0 : o.customRanges;
961
+ return p != null && p.length ? /* @__PURE__ */ f.jsx("div", { children: p.map((u) => /* @__PURE__ */ f.jsx(Sn, { ...e, customRange: u }, u.rangeId)) }) : null;
964
962
  }
965
- return /* @__PURE__ */ m.jsx(Sn, { ...e });
963
+ return /* @__PURE__ */ f.jsx(Sn, { ...e });
966
964
  };
967
965
  qe.componentKey = "univer.sheet.cell-link-popup";
968
966
  var Ji = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Qi = (t, e, n, i) => {
@@ -970,11 +968,11 @@ var Ji = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Qi = (t, e
970
968
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
971
969
  return i && r && Ji(e, n, r), r;
972
970
  }, ce = (t, e) => (n, i) => e(n, i, t);
973
- const In = (t, e) => {
971
+ const Cn = (t, e) => {
974
972
  var n, i;
975
973
  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;
976
974
  };
977
- let G = class extends Y {
975
+ let K = class extends z {
978
976
  constructor(e, n, i, r, o, s, c) {
979
977
  super();
980
978
  B(this, "_currentPopup", null);
@@ -1001,10 +999,10 @@ let G = class extends Y {
1001
999
  return this._isKeepVisible;
1002
1000
  }
1003
1001
  showPopup(e) {
1004
- if (this._currentPopup && In(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== f.ZEN_EDITOR && this._zenZoneService.visible))
1002
+ if (this._currentPopup && Cn(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== m.ZEN_EDITOR && this._zenZoneService.visible))
1005
1003
  return;
1006
1004
  const n = this._currentEditing$.getValue();
1007
- if (n && In(e, n))
1005
+ if (n && Cn(e, n))
1008
1006
  return;
1009
1007
  const { unitId: i, subUnitId: r, row: o, col: s, customRangeRect: c, customRange: l } = e;
1010
1008
  let p;
@@ -1018,14 +1016,14 @@ let G = class extends Y {
1018
1016
  this.hideCurrentPopup(e.type, !0);
1019
1017
  }
1020
1018
  };
1021
- if (e.type === f.EDITING) {
1019
+ if (e.type === m.EDITING) {
1022
1020
  if (!l)
1023
1021
  return;
1024
1022
  p = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1025
1023
  c,
1026
1024
  u
1027
1025
  );
1028
- } else if (e.type === f.ZEN_EDITOR) {
1026
+ } else if (e.type === m.ZEN_EDITOR) {
1029
1027
  if (!l)
1030
1028
  return;
1031
1029
  p = this._docCanvasPopManagerService.attachPopupToRange(
@@ -1108,8 +1106,8 @@ let G = class extends Y {
1108
1106
  startAddEditing(e) {
1109
1107
  var o, s, c, l, p;
1110
1108
  const { unitId: n, subUnitId: i, type: r } = e;
1111
- if (r === f.ZEN_EDITOR) {
1112
- const u = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
1109
+ if (r === m.ZEN_EDITOR) {
1110
+ const u = this._univerInstanceService.getUnit(x, w.UNIVER_DOC);
1113
1111
  if (!u)
1114
1112
  return;
1115
1113
  const g = this._textSelectionManagerService.getActiveTextRange();
@@ -1125,12 +1123,12 @@ let G = class extends Y {
1125
1123
  ...e,
1126
1124
  label: d
1127
1125
  });
1128
- } else if (r === f.EDITING) {
1126
+ } else if (r === m.EDITING) {
1129
1127
  const u = this._getEditingRange();
1130
1128
  if (!u)
1131
1129
  return;
1132
- this._textSelectionManagerService.replaceDocRanges([{ ...u }], { unitId: Ce, subUnitId: Ce });
1133
- const g = this._injector.get($e).getRenderById(Ce);
1130
+ this._textSelectionManagerService.replaceDocRanges([{ ...u }], { unitId: Ie, subUnitId: Ie });
1131
+ const g = this._injector.get($e).getRenderById(Ie);
1134
1132
  if (!g)
1135
1133
  return;
1136
1134
  const d = ci(u, g);
@@ -1153,7 +1151,7 @@ let G = class extends Y {
1153
1151
  n,
1154
1152
  i
1155
1153
  );
1156
- const u = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), g = u == null ? void 0 : u.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1154
+ const u = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), g = u == null ? void 0 : u.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1157
1155
  this._currentEditing$.next({
1158
1156
  ...e,
1159
1157
  label: d != null && d.p ? Se.transform.getPlainText((l = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? l : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
@@ -1166,8 +1164,8 @@ let G = class extends Y {
1166
1164
  (s = this._currentEditingPopup) == null || s.dispose(), this.hideCurrentPopup(void 0, !0);
1167
1165
  const { unitId: n, subUnitId: i } = e;
1168
1166
  let r, o;
1169
- if (e.type === f.ZEN_EDITOR) {
1170
- const d = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
1167
+ if (e.type === m.ZEN_EDITOR) {
1168
+ const d = this._univerInstanceService.getUnit(x, w.UNIVER_DOC);
1171
1169
  if (r = (l = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : l.find((v) => v.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)
1172
1170
  return;
1173
1171
  this._textSelectionManagerService.replaceTextRanges([
@@ -1184,7 +1182,7 @@ let G = class extends Y {
1184
1182
  this._editPopup,
1185
1183
  x
1186
1184
  );
1187
- } else if (e.type === f.EDITING) {
1185
+ } else if (e.type === m.EDITING) {
1188
1186
  const d = kr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1189
1187
  if (!d || !((u = d.rects) != null && u.length))
1190
1188
  return;
@@ -1200,10 +1198,10 @@ let G = class extends Y {
1200
1198
  i
1201
1199
  );
1202
1200
  } else {
1203
- const d = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(i), I = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(I), b = _ == null ? void 0 : _.tr, a = Tr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1201
+ const d = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(i), C = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(C), O = _ == null ? void 0 : _.tr, a = Tr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1204
1202
  if (!a || !((g = a.rects) != null && g.length))
1205
1203
  return;
1206
- r = a.customRange, o = a.label, b ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1204
+ r = a.customRange, o = a.label, O ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1207
1205
  e.row,
1208
1206
  e.col,
1209
1207
  this._editPopup,
@@ -1232,20 +1230,20 @@ let G = class extends Y {
1232
1230
  n && (!e || e === n.type) && ((i = this._currentEditingPopup) == null || i.dispose(), this._currentEditing$.next(null));
1233
1231
  }
1234
1232
  };
1235
- G = Qi([
1233
+ K = Qi([
1236
1234
  ce(0, R(Or)),
1237
1235
  ce(1, R(lt)),
1238
- ce(2, K),
1236
+ ce(2, Y),
1239
1237
  ce(3, re),
1240
1238
  ce(4, R(De)),
1241
1239
  ce(5, R(ai)),
1242
1240
  ce(6, pt)
1243
- ], G);
1241
+ ], K);
1244
1242
  var Me = /* @__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))(Me || {});
1245
1243
  const es = /* @__PURE__ */ new Set([
1246
- Ct.CHECKBOX,
1247
- Ct.LIST,
1248
- Ct.LIST_MULTIPLE
1244
+ It.CHECKBOX,
1245
+ It.LIST,
1246
+ It.LIST_MULTIPLE
1249
1247
  ]), $t = (t, e, n, i) => {
1250
1248
  var c, l;
1251
1249
  const r = e.getCell(n, i);
@@ -1254,7 +1252,7 @@ const es = /* @__PURE__ */ new Set([
1254
1252
  const o = t.has(hn) ? t.get(hn) : null, s = o == null ? void 0 : o.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1255
1253
  return s && es.has(s.type) ? !0 : (l = (c = r == null ? void 0 : r.p) == null ? void 0 : c.drawingsOrder) != null && l.length ? 2 : 0;
1256
1254
  }, ts = (t) => {
1257
- const e = t.get(K).getCurrentUnitForType(O.UNIVER_SHEET);
1255
+ const e = t.get(Y).getCurrentUnitForType(w.UNIVER_SHEET);
1258
1256
  if (!e)
1259
1257
  return !0;
1260
1258
  const n = e.getActiveSheet(), i = t.get(Tt).getCurrentSelections();
@@ -1263,10 +1261,10 @@ const es = /* @__PURE__ */ new Set([
1263
1261
  const r = i[0].range.startRow, o = i[0].range.startColumn;
1264
1262
  return $t(t, n, r, o) === 1;
1265
1263
  }, ns = (t) => {
1266
- const e = t.get(De), n = t.get(K), i = e.getTextRanges();
1264
+ const e = t.get(De), n = t.get(Y), i = e.getTextRanges();
1267
1265
  if (!(i != null && i.length))
1268
1266
  return !0;
1269
- const r = n.getCurrentUnitForType(O.UNIVER_DOC);
1267
+ const r = n.getCurrentUnitForType(w.UNIVER_DOC);
1270
1268
  return !!(!r || i.every((s) => s.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
1271
1269
  }, jt = {
1272
1270
  type: ut.OPERATION,
@@ -1274,21 +1272,21 @@ const es = /* @__PURE__ */ new Set([
1274
1272
  handler(t, e) {
1275
1273
  if (!e)
1276
1274
  return !1;
1277
- const n = t.get(G);
1275
+ const n = t.get(K);
1278
1276
  return e.customRangeId ? n.startEditing(e) : n.startAddEditing(e), !0;
1279
1277
  }
1280
1278
  }, Je = {
1281
1279
  type: ut.OPERATION,
1282
1280
  id: "sheet.operation.close-hyper-link-popup",
1283
1281
  handler(t) {
1284
- return t.get(G).endEditing(), !0;
1282
+ return t.get(K).endEditing(), !0;
1285
1283
  }
1286
- }, Bt = {
1284
+ }, At = {
1287
1285
  type: ut.OPERATION,
1288
1286
  id: "sheet.operation.insert-hyper-link",
1289
1287
  handler(t) {
1290
1288
  var g;
1291
- const e = t.get(K), n = Nn(e), i = t.get(re);
1289
+ const e = t.get(Y), n = xn(e), i = t.get(re);
1292
1290
  if (!n)
1293
1291
  return !1;
1294
1292
  const r = t.get(ie), s = t.get(Tt).getCurrentLastSelection();
@@ -1300,7 +1298,7 @@ const es = /* @__PURE__ */ new Set([
1300
1298
  subUnitId: n.subUnitId,
1301
1299
  row: c,
1302
1300
  col: l,
1303
- type: u ? f.ZEN_EDITOR : p.visible ? f.EDITING : f.VIEWING
1301
+ type: u ? m.ZEN_EDITOR : p.visible ? m.EDITING : m.VIEWING
1304
1302
  });
1305
1303
  }
1306
1304
  }, de = {
@@ -1310,22 +1308,22 @@ const es = /* @__PURE__ */ new Set([
1310
1308
  if (ts(t))
1311
1309
  return !1;
1312
1310
  const e = t.get(ie);
1313
- return t.get(G).currentEditing ? e.executeCommand(Je.id) : e.executeCommand(Bt.id);
1311
+ return t.get(K).currentEditing ? e.executeCommand(Je.id) : e.executeCommand(At.id);
1314
1312
  }
1315
- }, At = (t, e = x) => {
1313
+ }, Bt = (t, e = x) => {
1316
1314
  var r;
1317
- const n = t.get(K), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(Dn);
1315
+ const n = t.get(Y), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(Dn);
1318
1316
  return i ? i.textSelectionInner$.pipe(le(() => {
1319
1317
  const s = t.get(re).getEditCellState();
1320
1318
  if (!s)
1321
1319
  return !0;
1322
- const c = Nn(n, { unitId: s.unitId, subUnitId: s.sheetId });
1320
+ const c = xn(n, { unitId: s.unitId, subUnitId: s.sheetId });
1323
1321
  return !(c != null && c.worksheet) || $t(t, c.worksheet, s.row, s.column) === 1 ? !0 : ns(t);
1324
1322
  })) : Ne(!0);
1325
1323
  }, Gn = (t) => {
1326
- const e = Nr(t, { workbookTypes: [xt], worksheetTypes: [Nt, Mn, Mt], rangeTypes: [Ut] }, !0), n = t.get(K), i = t.get(Tt), r = t.has(re) ? t.get(re) : null, o = n.focused$.pipe(
1324
+ const e = Nr(t, { workbookTypes: [xt], worksheetTypes: [Nt, Nn, Mt], rangeTypes: [Ut] }, !0), n = t.get(Y), i = t.get(Tt), r = t.has(re) ? t.get(re) : null, o = n.focused$.pipe(
1327
1325
  dn((s) => !!s),
1328
- le((s) => n.getUnit(s, O.UNIVER_SHEET)),
1326
+ le((s) => n.getUnit(s, w.UNIVER_SHEET)),
1329
1327
  dn((s) => !!s),
1330
1328
  ue((s) => s.activeSheet$),
1331
1329
  ue((s) => i.selectionMoveEnd$.pipe(le((c) => s && { selections: c, sheet: s }))),
@@ -1341,10 +1339,10 @@ const es = /* @__PURE__ */ new Set([
1341
1339
  ue((s) => {
1342
1340
  if (s === Me.DISABLED_BY_CELL)
1343
1341
  return Ne(!0);
1344
- const c = (r ? r.visible$ : Ne(null)).pipe(le((p) => p != null && p.visible ? Ce : void 0)), l = t.get(bn).subscribeContextValue$(ur);
1342
+ const c = (r ? r.visible$ : Ne(null)).pipe(le((p) => p != null && p.visible ? Ie : void 0)), l = t.get(bn).subscribeContextValue$(ur);
1345
1343
  return pi([c, l]).pipe(
1346
1344
  ue(
1347
- ([p, u]) => p ? u ? Ne(!0) : At(t, p) : Ne(s === Me.ALLOW_ON_EDITING)
1345
+ ([p, u]) => p ? u ? Ne(!0) : Bt(t, p) : Ne(s === Me.ALLOW_ON_EDITING)
1348
1346
  )
1349
1347
  );
1350
1348
  })
@@ -1354,21 +1352,21 @@ const es = /* @__PURE__ */ new Set([
1354
1352
  ue((s) => o.pipe(le((c) => s || c)))
1355
1353
  );
1356
1354
  }, Xe = {
1357
- commandId: Bt.id,
1355
+ commandId: At.id,
1358
1356
  type: Hn.BUTTON,
1359
1357
  title: "hyperLink.menu.add",
1360
1358
  icon: "LinkSingle"
1361
1359
  }, Qe = (t) => `${t}-zen-editor`, rs = (t) => ({
1362
1360
  ...Xe,
1363
1361
  id: Xe.commandId,
1364
- hidden$: ht(t, O.UNIVER_SHEET),
1362
+ hidden$: ht(t, w.UNIVER_SHEET),
1365
1363
  disabled$: Gn(t)
1366
1364
  // disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
1367
1365
  }), is = (t) => ({
1368
1366
  ...Xe,
1369
1367
  id: Qe(Xe.commandId),
1370
- hidden$: ht(t, O.UNIVER_DOC, x),
1371
- disabled$: At(t)
1368
+ hidden$: ht(t, w.UNIVER_DOC, x),
1369
+ disabled$: Bt(t)
1372
1370
  }), et = {
1373
1371
  tooltip: "hyperLink.form.addTitle",
1374
1372
  commandId: de.id,
@@ -1377,13 +1375,13 @@ const es = /* @__PURE__ */ new Set([
1377
1375
  }, ss = (t) => ({
1378
1376
  ...et,
1379
1377
  id: et.commandId,
1380
- hidden$: ht(t, O.UNIVER_SHEET),
1378
+ hidden$: ht(t, w.UNIVER_SHEET),
1381
1379
  disabled$: Gn(t)
1382
1380
  }), os = (t) => ({
1383
1381
  ...et,
1384
1382
  id: Qe(et.commandId),
1385
- hidden$: ht(t, O.UNIVER_DOC, x),
1386
- disabled$: At(t)
1383
+ hidden$: ht(t, w.UNIVER_DOC, x),
1384
+ disabled$: Bt(t)
1387
1385
  }), Kn = {
1388
1386
  id: de.id,
1389
1387
  binding: Pt.K | Qr.CTRL_COMMAND,
@@ -1393,8 +1391,8 @@ var as = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, ls = (t, e
1393
1391
  for (var r = i > 1 ? void 0 : i ? cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1394
1392
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1395
1393
  return i && r && as(e, n, r), r;
1396
- }, Cn = (t, e) => (n, i) => e(n, i, t);
1397
- let tt = class extends Y {
1394
+ }, In = (t, e) => (n, i) => e(n, i, t);
1395
+ let tt = class extends z {
1398
1396
  constructor(t, e) {
1399
1397
  super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1400
1398
  }
@@ -1404,43 +1402,43 @@ let tt = class extends Y {
1404
1402
  const { source: o, target: s, unitId: c, subUnitId: l } = i, p = Lt([o, s]), [u, g] = p.ranges, { mapFunc: d } = p, v = {
1405
1403
  row: u.startRow,
1406
1404
  col: u.startColumn
1407
- }, I = Ur(u, g), _ = [], b = [];
1408
- return I.forEach((a) => {
1409
- const w = a.repeatStartCell, M = a.relativeRange, L = {
1405
+ }, C = Ur(u, g), _ = [], O = [];
1406
+ return C.forEach((a) => {
1407
+ const b = a.repeatStartCell, M = a.relativeRange, k = {
1410
1408
  startRow: v.row,
1411
1409
  startColumn: v.col,
1412
1410
  endColumn: v.col,
1413
1411
  endRow: v.row
1414
- }, k = {
1415
- startRow: w.row,
1416
- startColumn: w.col,
1417
- endColumn: w.col,
1418
- endRow: w.row
1412
+ }, L = {
1413
+ startRow: b.row,
1414
+ startColumn: b.col,
1415
+ endColumn: b.col,
1416
+ endRow: b.row
1419
1417
  };
1420
- Pn.foreach(M, (X, D) => {
1421
- const z = ye.getPositionRange(
1418
+ Pn.foreach(M, (j, D) => {
1419
+ const q = ye.getPositionRange(
1422
1420
  {
1423
- startRow: X,
1421
+ startRow: j,
1424
1422
  startColumn: D,
1425
1423
  endColumn: D,
1426
- endRow: X
1424
+ endRow: j
1427
1425
  },
1428
- L
1429
- ), { row: Ee, col: je } = d(z.startRow, z.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, l, Ee, je), Re = ye.getPositionRange(
1426
+ k
1427
+ ), { row: Ee, col: je } = d(q.startRow, q.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, l, Ee, je), Re = ye.getPositionRange(
1430
1428
  {
1431
- startRow: X,
1429
+ startRow: j,
1432
1430
  startColumn: D,
1433
1431
  endColumn: D,
1434
- endRow: X
1432
+ endRow: j
1435
1433
  },
1436
- k
1437
- ), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn), oe = Ie.generateRandomId(), j = this._hyperLinkModel.getHyperLinkByLocation(c, l, Le, Pe);
1438
- j && _.push({
1434
+ L
1435
+ ), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn), oe = Ce.generateRandomId(), A = this._hyperLinkModel.getHyperLinkByLocation(c, l, Le, Pe);
1436
+ A && _.push({
1439
1437
  id: Ue.id,
1440
1438
  params: {
1441
1439
  unitId: c,
1442
1440
  subUnitId: l,
1443
- id: j.id
1441
+ id: A.id
1444
1442
  }
1445
1443
  }), (Oe.COPY === r || Oe.SERIES === r) && se && (_.push({
1446
1444
  id: He.id,
@@ -1454,24 +1452,24 @@ let tt = class extends Y {
1454
1452
  column: Pe
1455
1453
  }
1456
1454
  }
1457
- }), b.push({
1455
+ }), O.push({
1458
1456
  id: Ue.id,
1459
1457
  params: {
1460
1458
  unitId: c,
1461
1459
  subUnitId: l,
1462
1460
  id: oe
1463
1461
  }
1464
- })), j && b.push({
1462
+ })), A && O.push({
1465
1463
  id: He.id,
1466
1464
  params: {
1467
1465
  unitId: c,
1468
1466
  subUnitId: l,
1469
- link: j
1467
+ link: A
1470
1468
  }
1471
1469
  });
1472
1470
  });
1473
1471
  }), {
1474
- undos: b,
1472
+ undos: O,
1475
1473
  redos: _
1476
1474
  };
1477
1475
  }, n = {
@@ -1482,26 +1480,26 @@ let tt = class extends Y {
1482
1480
  }
1483
1481
  };
1484
1482
  tt = ls([
1485
- Cn(0, Mr),
1486
- Cn(1, R(dt))
1483
+ In(0, Mr),
1484
+ In(1, R(dt))
1487
1485
  ], tt);
1488
1486
  var us = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, ps = (t, e, n, i) => {
1489
1487
  for (var r = i > 1 ? void 0 : i ? ds(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1490
1488
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1491
1489
  return i && r && us(e, n, r), r;
1492
1490
  }, Rt = (t, e) => (n, i) => e(n, i, t);
1493
- let nt = class extends Y {
1491
+ let nt = class extends z {
1494
1492
  constructor(t, e, n) {
1495
- super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1493
+ super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = n, this._commandExecutedListener();
1496
1494
  }
1497
1495
  _commandExecutedListener() {
1498
1496
  this.disposeWithMe(
1499
1497
  this._commandService.beforeCommandExecuted((t) => {
1500
- t.id === Kn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1498
+ t.id === Kn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1501
1499
  workbookTypes: [xt],
1502
1500
  rangeTypes: [Ut],
1503
- worksheetTypes: [Nt, Mn, Mt]
1504
- }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
1501
+ worksheetTypes: [Nt, Nn, Mt]
1502
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.hyperLinkErr")));
1505
1503
  })
1506
1504
  );
1507
1505
  }
@@ -1509,30 +1507,30 @@ let nt = class extends Y {
1509
1507
  nt = ps([
1510
1508
  Rt(0, R(ct)),
1511
1509
  Rt(1, ie),
1512
- Rt(2, R(On))
1510
+ Rt(2, R(Mn))
1513
1511
  ], nt);
1514
- var hs = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, ms = (t, e, n, i) => {
1512
+ var hs = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, fs = (t, e, n, i) => {
1515
1513
  for (var r = i > 1 ? void 0 : i ? gs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1516
1514
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1517
1515
  return i && r && hs(e, n, r), r;
1518
- }, Z = (t, e) => (n, i) => e(n, i, t);
1519
- let rt = class extends Y {
1516
+ }, G = (t, e) => (n, i) => e(n, i, t);
1517
+ let rt = class extends z {
1520
1518
  constructor(t, e, n, i, r, o, s, c, l, p) {
1521
- super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionInterceptorBaseController = r, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = l, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1519
+ 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 = l, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1522
1520
  }
1523
1521
  _getLinkPermission(t) {
1524
- const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET);
1522
+ const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
1525
1523
  if (!(o == null ? void 0 : o.getSheetBySheetId(n)))
1526
1524
  return {
1527
1525
  viewPermission: !1,
1528
1526
  editPermission: !1,
1529
1527
  copyPermission: !1
1530
1528
  };
1531
- const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1532
- workbookTypes: [Ar],
1529
+ const c = this._sheetPermissionCheckController.permissionCheckWithRanges({
1530
+ workbookTypes: [Br],
1533
1531
  worksheetTypes: [Vr],
1534
1532
  rangeTypes: [Fr]
1535
- }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), l = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1533
+ }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), l = this._sheetPermissionCheckController.permissionCheckWithRanges({
1536
1534
  workbookTypes: [xt],
1537
1535
  worksheetTypes: [Nt, Mt],
1538
1536
  rangeTypes: [Ut]
@@ -1547,7 +1545,7 @@ let rt = class extends Y {
1547
1545
  this.disposeWithMe(
1548
1546
  // hover over not editing cell
1549
1547
  this._hoverManagerService.currentRichText$.pipe(We(200)).subscribe((t) => {
1550
- var L, k;
1548
+ var k, L;
1551
1549
  if (!t) {
1552
1550
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1553
1551
  return;
@@ -1555,24 +1553,24 @@ let rt = class extends Y {
1555
1553
  const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._renderManagerService.getRenderById(e);
1556
1554
  if (!o)
1557
1555
  return;
1558
- const s = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1556
+ const s = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1559
1557
  if (!c)
1560
1558
  return;
1561
1559
  if (!o.with(Dr).active) {
1562
- this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING);
1560
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING);
1563
1561
  return;
1564
1562
  }
1565
- const p = (L = o == null ? void 0 : o.with(an).getWorksheetSkeleton(n)) == null ? void 0 : L.skeleton, u = r, g = i;
1563
+ const p = (k = o == null ? void 0 : o.with(an).getWorksheetSkeleton(n)) == null ? void 0 : k.skeleton, u = r, g = i;
1566
1564
  let d = g, v = u;
1567
- p && p.overflowCache.forValue((X, D, z) => {
1568
- ye.contains(z, { startColumn: u, endColumn: u, startRow: g, endRow: g }) && (d = X, v = D);
1565
+ p && p.overflowCache.forValue((j, D, q) => {
1566
+ ye.contains(q, { startColumn: u, endColumn: u, startRow: g, endRow: g }) && (d = j, v = D);
1569
1567
  });
1570
- const { viewPermission: I, editPermission: _, copyPermission: b } = this._getLinkPermission(t);
1571
- if (!I) {
1568
+ const { viewPermission: C, editPermission: _, copyPermission: O } = this._getLinkPermission(t);
1569
+ if (!C) {
1572
1570
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1573
1571
  return;
1574
1572
  }
1575
- const a = c.getCellStyleOnly(d, v), w = s.getStyles().getStyleByCell(a), M = (k = w == null ? void 0 : w.tr) == null ? void 0 : k.a;
1573
+ const a = c.getCellStyleOnly(d, v), b = s.getStyles().getStyleByCell(a), M = (L = b == null ? void 0 : b.tr) == null ? void 0 : L.a;
1576
1574
  if (!M && !t.customRange) {
1577
1575
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1578
1576
  return;
@@ -1581,10 +1579,10 @@ let rt = class extends Y {
1581
1579
  row: d,
1582
1580
  col: v,
1583
1581
  editPermission: _,
1584
- copyPermission: b,
1582
+ copyPermission: O,
1585
1583
  customRange: t.customRange,
1586
1584
  customRangeRect: t.rect,
1587
- type: f.VIEWING,
1585
+ type: m.VIEWING,
1588
1586
  unitId: e,
1589
1587
  subUnitId: n,
1590
1588
  showAll: !!M
@@ -1596,10 +1594,10 @@ let rt = class extends Y {
1596
1594
  let t = null;
1597
1595
  this.disposeWithMe(
1598
1596
  this._editorBridgeService.currentEditCellState$.pipe(ue((e) => this._editorBridgeService.visible$.pipe(le((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1599
- if (!n || n.editorUnitId !== Ce)
1597
+ if (!n || n.editorUnitId !== Ie)
1600
1598
  return;
1601
1599
  if (!e.visible) {
1602
- t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1600
+ t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1603
1601
  return;
1604
1602
  }
1605
1603
  const { editorUnitId: i, unitId: r, sheetId: o, row: s, column: c } = n, l = this._renderManagerService.getRenderById(i);
@@ -1607,14 +1605,14 @@ let rt = class extends Y {
1607
1605
  return;
1608
1606
  const { editPermission: p, viewPermission: u, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: o, row: s, col: c }), d = l.with(un);
1609
1607
  u && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(We(200)).subscribe((v) => {
1610
- var w, M;
1611
- const I = v.find((L) => L.range.rangeType === Ge.HYPERLINK);
1612
- if (!I) {
1608
+ var b, M;
1609
+ const C = v.find((k) => k.range.rangeType === Ge.HYPERLINK);
1610
+ if (!C) {
1613
1611
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1614
1612
  return;
1615
1613
  }
1616
- const _ = I.rects[I.rects.length - 1];
1617
- if (!((M = (w = this._renderManagerService.getRenderById(r)) == null ? void 0 : w.with(an).getWorksheetSkeleton(o)) == null ? void 0 : M.skeleton) || !_)
1614
+ const _ = C.rects[C.rects.length - 1];
1615
+ if (!((M = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(an).getWorksheetSkeleton(o)) == null ? void 0 : M.skeleton) || !_)
1618
1616
  return;
1619
1617
  const a = l.engine.getCanvasElement().getBoundingClientRect();
1620
1618
  this._sheetsHyperLinkPopupService.showPopup({
@@ -1622,7 +1620,7 @@ let rt = class extends Y {
1622
1620
  subUnitId: o,
1623
1621
  row: s,
1624
1622
  col: c,
1625
- customRange: I.range,
1623
+ customRange: C.range,
1626
1624
  customRangeRect: {
1627
1625
  left: _.left + a.left,
1628
1626
  top: _.top + a.top,
@@ -1631,7 +1629,7 @@ let rt = class extends Y {
1631
1629
  },
1632
1630
  editPermission: p,
1633
1631
  copyPermission: g,
1634
- type: f.EDITING
1632
+ type: m.EDITING
1635
1633
  });
1636
1634
  }));
1637
1635
  })
@@ -1642,7 +1640,7 @@ let rt = class extends Y {
1642
1640
  _initZenEditor() {
1643
1641
  this.disposeWithMe(
1644
1642
  this._zenZoneService.visible$.subscribe((t) => {
1645
- t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(f.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(f.ZEN_EDITOR));
1643
+ 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));
1646
1644
  })
1647
1645
  ), this.disposeWithMe(
1648
1646
  this._univerInstanceService.focused$.pipe(
@@ -1657,7 +1655,7 @@ let rt = class extends Y {
1657
1655
  if (e && n) {
1658
1656
  const { unitId: i, sheetId: r, row: o, column: s } = n, { editPermission: c, viewPermission: l, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: o, col: s });
1659
1657
  l && this._sheetsHyperLinkPopupService.showPopup({
1660
- type: f.ZEN_EDITOR,
1658
+ type: m.ZEN_EDITOR,
1661
1659
  unitId: i,
1662
1660
  subUnitId: r,
1663
1661
  row: o,
@@ -1667,14 +1665,14 @@ let rt = class extends Y {
1667
1665
  copyPermission: p
1668
1666
  });
1669
1667
  } else
1670
- this._sheetsHyperLinkPopupService.hideCurrentPopup(f.ZEN_EDITOR);
1668
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR);
1671
1669
  })
1672
1670
  );
1673
1671
  }
1674
1672
  _initTextSelectionListener() {
1675
1673
  this.disposeWithMe(
1676
1674
  this._textSelectionManagerService.textSelection$.subscribe((t) => {
1677
- t && t.unitId === Ce && this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1675
+ t && t.unitId === Ie && this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1678
1676
  })
1679
1677
  );
1680
1678
  }
@@ -1685,24 +1683,24 @@ let rt = class extends Y {
1685
1683
  }));
1686
1684
  }
1687
1685
  };
1688
- rt = ms([
1689
- Z(0, R(Hr)),
1690
- Z(1, R(G)),
1691
- Z(2, R($e)),
1692
- Z(3, R(dr)),
1693
- Z(4, R(On)),
1694
- Z(5, ie),
1695
- Z(6, re),
1696
- Z(7, R(De)),
1697
- Z(8, K),
1698
- Z(9, pt)
1686
+ rt = fs([
1687
+ G(0, R(Hr)),
1688
+ G(1, R(K)),
1689
+ G(2, R($e)),
1690
+ G(3, R(dr)),
1691
+ G(4, R(Mn)),
1692
+ G(5, ie),
1693
+ G(6, re),
1694
+ G(7, R(De)),
1695
+ G(8, Y),
1696
+ G(9, pt)
1699
1697
  ], rt);
1700
- var fs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Yn = (t, e, n, i) => {
1701
- for (var r = i > 1 ? void 0 : i ? vs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1698
+ var ms = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Yn = (t, e, n, i) => {
1699
+ for (var r = i > 1 ? void 0 : i ? _s(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1702
1700
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1703
- return i && r && fs(e, n, r), r;
1701
+ return i && r && ms(e, n, r), r;
1704
1702
  }, wt = (t, e) => (n, i) => e(n, i, t);
1705
- let Ot = class extends Y {
1703
+ let Ot = class extends z {
1706
1704
  constructor(t, e) {
1707
1705
  super(), this._context = t, this._hyperLinkModel = e, this._initSkeletonChange();
1708
1706
  }
@@ -1719,7 +1717,7 @@ let Ot = class extends Y {
1719
1717
  Ot = Yn([
1720
1718
  wt(1, R(dt))
1721
1719
  ], Ot);
1722
- let it = class extends Y {
1720
+ let it = class extends z {
1723
1721
  constructor(t, e) {
1724
1722
  super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._initViewModelIntercept();
1725
1723
  }
@@ -1747,7 +1745,7 @@ it = Yn([
1747
1745
  wt(0, R(zr)),
1748
1746
  wt(1, R(dt))
1749
1747
  ], it);
1750
- const _s = {
1748
+ const vs = {
1751
1749
  [ei.OTHERS]: {
1752
1750
  [de.id]: {
1753
1751
  order: 2,
@@ -1772,12 +1770,12 @@ const _s = {
1772
1770
  }
1773
1771
  }
1774
1772
  };
1775
- var Ss = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Cs = (t, e, n, i) => {
1776
- for (var r = i > 1 ? void 0 : i ? Is(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1773
+ var Ss = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Is = (t, e, n, i) => {
1774
+ for (var r = i > 1 ? void 0 : i ? Cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1777
1775
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1778
1776
  return i && r && Ss(e, n, r), r;
1779
1777
  }, Te = (t, e) => (n, i) => e(n, i, t);
1780
- let st = class extends Y {
1778
+ let st = class extends z {
1781
1779
  constructor(t, e, n, i, r) {
1782
1780
  super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = i, this._shortcutService = r, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1783
1781
  }
@@ -1794,20 +1792,20 @@ let st = class extends Y {
1794
1792
  [
1795
1793
  jt,
1796
1794
  Je,
1797
- Bt,
1795
+ At,
1798
1796
  de
1799
1797
  ].forEach((t) => {
1800
1798
  this._commandService.registerCommand(t);
1801
1799
  });
1802
1800
  }
1803
1801
  _initMenus() {
1804
- this._menuManagerService.mergeMenu(_s);
1802
+ this._menuManagerService.mergeMenu(vs);
1805
1803
  }
1806
1804
  _initShortCut() {
1807
1805
  this._shortcutService.registerShortcut(Kn);
1808
1806
  }
1809
1807
  };
1810
- st = Cs([
1808
+ st = Is([
1811
1809
  Te(0, R(ri)),
1812
1810
  Te(1, ie),
1813
1811
  Te(2, si),
@@ -1819,7 +1817,7 @@ var ys = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Rs = (t, e
1819
1817
  (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1820
1818
  return i && r && ys(e, n, r), r;
1821
1819
  }, yn = (t, e) => (n, i) => e(n, i, t);
1822
- let ot = class extends Y {
1820
+ let ot = class extends z {
1823
1821
  constructor(t, e) {
1824
1822
  super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
1825
1823
  }
@@ -1843,7 +1841,7 @@ var zn = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ps = (t, e
1843
1841
  let at = class extends gr {
1844
1842
  constructor(t = gn, e, n) {
1845
1843
  super(), this._config = t, this._injector = e, this._configService = n;
1846
- const { menu: i, ...r } = mr(
1844
+ const { menu: i, ...r } = fr(
1847
1845
  {},
1848
1846
  gn,
1849
1847
  this._config
@@ -1853,7 +1851,7 @@ let at = class extends gr {
1853
1851
  onStarting() {
1854
1852
  [
1855
1853
  [pe],
1856
- [G],
1854
+ [K],
1857
1855
  [jn],
1858
1856
  [it],
1859
1857
  [rt],
@@ -1865,14 +1863,14 @@ let at = class extends gr {
1865
1863
  ].forEach((e) => this._injector.add(e)), this._injector.get(it);
1866
1864
  }
1867
1865
  onReady() {
1868
- this._injector.get($e).registerRenderModule(O.UNIVER_SHEET, [Ot]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(st);
1866
+ this._injector.get($e).registerRenderModule(w.UNIVER_SHEET, [Ot]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(st);
1869
1867
  }
1870
1868
  onRendered() {
1871
1869
  this._injector.get(nt), this._injector.get(ot), this._injector.get(rt);
1872
1870
  }
1873
1871
  };
1874
1872
  qn(at, "pluginName", Ht);
1875
- qn(at, "type", O.UNIVER_SHEET);
1873
+ qn(at, "type", w.UNIVER_SHEET);
1876
1874
  at = bs([
1877
1875
  hr(Er, li),
1878
1876
  En(1, R(lt)),
@@ -1880,11 +1878,11 @@ at = bs([
1880
1878
  ], at);
1881
1879
  export {
1882
1880
  Je as CloseHyperLinkPopupOperation,
1883
- Bt as InsertHyperLinkOperation,
1881
+ At as InsertHyperLinkOperation,
1884
1882
  Kn as InsertLinkShortcut,
1885
1883
  jt as OpenHyperLinkEditPanelOperation,
1886
1884
  Ye as SheetsHyperLinkCopyPasteController,
1887
- G as SheetsHyperLinkPopupService,
1885
+ K as SheetsHyperLinkPopupService,
1888
1886
  pe as SheetsHyperLinkResolverService,
1889
1887
  jn as SheetsHyperLinkSidePanelService,
1890
1888
  at as UniverSheetsHyperLinkUIPlugin