@univerjs/sheets-hyper-link-ui 0.1.14 → 0.1.15

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,53 +1,53 @@
1
- var Jt = Object.defineProperty;
2
- var Qt = (t, e, n) => e in t ? Jt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var H = (t, e, n) => (Qt(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { Disposable as O, UniverInstanceType as M, OnLifecycle as T, LifecycleStages as U, IUniverInstanceService as J, isValidRange as Re, LocaleService as de, Rectangle as oe, ICommandService as F, toDisposable as en, BooleanNumber as tn, ThemeService as nn, createInternalEditorID as rn, DEFAULT_EMPTY_DOCUMENT_VALUE as sn, Tools as ae, CommandType as Te, CellValueType as at, ObjectMatrix as St, Range as qe, Plugin as on, DependentOn as an } from "@univerjs/core";
5
- import { RemoveSheetCommand as cn, SheetInterceptorService as Je, SetSelectionsOperation as ln, NORMAL_SELECTION_PLUGIN_NAME as dn, SetWorksheetActiveOperation as Pe, RefRangeService as un, handleDefaultRangeChangeWithEffectRefCommands as ct, INTERCEPTOR_POINT as pn, getSheetCommandTarget as Ct, SelectionManagerService as Lt, SetRangeValuesMutation as pe, SetRangeValuesUndoMutationFactory as lt, SetRangeValuesCommand as hn, ClearSelectionContentCommand as gn, ClearSelectionAllCommand as mn, WorkbookEditablePermission as Qe, WorksheetEditPermission as et, WorksheetSetCellValuePermission as tt, WorksheetInsertHyperlinkPermission as nt, RangeProtectionPermissionEditPoint as rt } from "@univerjs/sheets";
6
- import { Inject as g, Injector as Ue } from "@wendellhu/redi";
7
- import { RemoveHyperLinkCommand as fn, AddHyperLinkCommand as it, HyperLinkModel as w, RemoveHyperLinkMutation as x, AddHyperLinkMutation as j, UpdateHyperLinkRefMutation as dt, UpdateHyperLinkMutation as Oe, UpdateHyperLinkCommand as It, CancelHyperLinkCommand as _n, UniverSheetsHyperLinkPlugin as vn } from "@univerjs/sheets-hyper-link";
8
- import { deserializeRangeWithSheet as ce, serializeRangeWithSheet as kt, IDefinedNamesService as bt, serializeRange as fe, serializeRangeToRefString as yn } from "@univerjs/engine-formula";
9
- import { MessageType as ie, FormLayout as G, Input as ut, Select as Ve, Button as pt, Tooltip as Fe } from "@univerjs/design";
10
- import { ScrollToCellCommand as Rt, SheetSkeletonManagerService as Sn, SheetCanvasPopManagerService as Cn, HoverManagerService as Ln, whenSheetEditorFocused as In, getCurrentRangeDisable$ as Pt, APPLY_TYPE as he, IAutoFillService as kn, virtualizeDiscreteRanges as Ye, getAutoFillRepeatRange as bn, COPY_TYPE as ht, rangeToDiscreteRange as Rn, PREDEFINED_HOOK_NAME as We, getRepeatRange as Pn, ISheetClipboardService as On, SheetPermissionInterceptorBaseController as wn } from "@univerjs/sheets-ui";
11
- import { IMessageService as Ot, useObservable as En, RangeSelector as Mn, ISidebarService as wt, KeyCode as xn, MetaKeys as jn, MenuItemType as Et, MenuPosition as Mt, getMenuHiddenObservable as xt, MenuGroup as Tn, ComponentManager as Un, IShortcutService as Hn, IMenuService as $n } from "@univerjs/ui";
12
- import { IRenderManagerService as jt } from "@univerjs/engine-render";
13
- import { Subject as Nn, BehaviorSubject as Dn, debounceTime as An } from "rxjs";
14
- import Bn, { forwardRef as W, useRef as Tt, createElement as Z, useState as te, useEffect as Vn, useMemo as Fn } from "react";
15
- import { useDependency as b, useObservable as Wn } from "@wendellhu/redi/react-bindings";
16
- import gt from "clsx";
17
- import { SPECIAL_PASTE_FORMULA as Zn } from "@univerjs/sheets-formula";
18
- var zn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Yn = (t, e, n, r) => {
19
- for (var i = r > 1 ? void 0 : r ? Kn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
20
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
21
- return r && i && zn(e, n, i), i;
22
- }, Ze = (t, e) => (n, r) => e(n, r, t);
23
- let _e = class extends O {
24
- constructor(t, e, n) {
25
- super(), this._sheetInterceptorService = t, this._univerInstanceService = e, this._hyperLinkModel = n, this._initSheetChange();
1
+ var Kt = Object.defineProperty;
2
+ var Yt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var V = (e, t, n) => (Yt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ import { Disposable as O, UniverInstanceType as E, OnLifecycle as N, LifecycleStages as $, IUniverInstanceService as de, BooleanNumber as Gt, ThemeService as qt, isValidRange as We, LocaleService as ue, RANGE_TYPE as lt, Rectangle as ee, ICommandService as W, DEFAULT_EMPTY_DOCUMENT_VALUE as Xt, createInternalEditorID as Jt, Tools as ce, CommandType as Te, CellValueType as dt, ObjectMatrix as yt, Range as Ge, Plugin as Qt, DependentOn as en } from "@univerjs/core";
5
+ import { RemoveSheetCommand as tn, SheetInterceptorService as qe, INTERCEPTOR_POINT as nn, SetSelectionsOperation as rn, NORMAL_SELECTION_PLUGIN_NAME as on, SetWorksheetActiveOperation as Re, getSheetCommandTarget as Ct, SelectionManagerService as St, SetRangeValuesMutation as ge, SetRangeValuesUndoMutationFactory as ut, SetRangeValuesCommand as sn, ClearSelectionContentCommand as an, ClearSelectionAllCommand as cn, WorkbookEditablePermission as Xe, WorksheetEditPermission as Je, WorksheetSetCellValuePermission as Qe, WorksheetInsertHyperlinkPermission as et, RangeProtectionPermissionEditPoint as tt } from "@univerjs/sheets";
6
+ import { Inject as m, Injector as Ue } from "@wendellhu/redi";
7
+ import { RemoveHyperLinkMutation as M, AddHyperLinkMutation as x, HyperLinkModel as T, ERROR_RANGE as Ze, UpdateHyperLinkCommand as Lt, AddHyperLinkCommand as It, CancelHyperLinkCommand as ln, UniverSheetsHyperLinkPlugin as dn } from "@univerjs/sheets-hyper-link";
8
+ import { SheetSkeletonManagerService as kt, ScrollToRangeOperation as bt, SheetCanvasPopManagerService as un, HoverManagerService as pn, whenSheetEditorFocused as hn, getCurrentRangeDisable$ as Rt, APPLY_TYPE as ne, IAutoFillService as mn, virtualizeDiscreteRanges as ze, getAutoFillRepeatRange as gn, COPY_TYPE as pt, rangeToDiscreteRange as fn, PREDEFINED_HOOK_NAME as $e, getRepeatRange as vn, ISheetClipboardService as _n, SheetPermissionInterceptorBaseController as yn } from "@univerjs/sheets-ui";
9
+ import { IRenderManagerService as nt } from "@univerjs/engine-render";
10
+ import { Subject as Cn, BehaviorSubject as Sn, debounceTime as Ln } from "rxjs";
11
+ import In, { forwardRef as Z, useRef as Pt, createElement as z, useState as re, useEffect as kn, useMemo as bn } from "react";
12
+ import { useDependency as k, useObservable as Rn } from "@wendellhu/redi/react-bindings";
13
+ import ht from "clsx";
14
+ import { MessageType as se, FormLayout as X, Input as mt, Select as Ae, Button as gt, Tooltip as Be } from "@univerjs/design";
15
+ import { IMessageService as Ot, useObservable as Pn, useEvent as On, RangeSelector as wn, ISidebarService as wt, KeyCode as En, MetaKeys as Mn, MenuItemType as Et, MenuPosition as Mt, getMenuHiddenObservable as xt, MenuGroup as xn, ComponentManager as Tn, IShortcutService as Un, IMenuService as jn } from "@univerjs/ui";
16
+ import { deserializeRangeWithSheet as Pe, serializeRangeWithSheet as Tt, IDefinedNamesService as Ut, serializeRangeToRefString as Hn, serializeRange as Nn } from "@univerjs/engine-formula";
17
+ import { SPECIAL_PASTE_FORMULA as $n } from "@univerjs/sheets-formula";
18
+ var An = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, Dn = (e, t, n, i) => {
19
+ for (var r = i > 1 ? void 0 : i ? Bn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
20
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
21
+ return i && r && An(t, n, r), r;
22
+ }, De = (e, t) => (n, i) => t(n, i, e);
23
+ let ve = class extends O {
24
+ constructor(e, t, n) {
25
+ super(), this._sheetInterceptorService = e, this._univerInstanceService = t, this._hyperLinkModel = n, this._initSheetChange();
26
26
  }
27
27
  _initSheetChange() {
28
28
  this.disposeWithMe(
29
29
  this._sheetInterceptorService.interceptCommand({
30
- getMutations: (t) => {
31
- if (t.id === cn.id) {
32
- const e = t.params, n = e.unitId ? this._univerInstanceService.getUnit(e.unitId) : this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
30
+ getMutations: (e) => {
31
+ if (e.id === tn.id) {
32
+ const t = e.params, n = t.unitId ? this._univerInstanceService.getUnit(t.unitId) : this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
33
33
  if (!n)
34
34
  return { redos: [], undos: [] };
35
- const r = n.getUnitId(), i = e.subUnitId || n.getActiveSheet().getSheetId(), s = this._hyperLinkModel.getSubUnit(r, i), o = s.map((a) => ({
36
- id: fn.id,
35
+ const i = n.getUnitId(), r = t.subUnitId || n.getActiveSheet().getSheetId(), o = this._hyperLinkModel.getSubUnit(i, r), s = o.map((a) => ({
36
+ id: M.id,
37
37
  params: {
38
- unitId: r,
39
- subUnitId: i,
38
+ unitId: i,
39
+ subUnitId: r,
40
40
  id: a.id
41
41
  }
42
- })), c = s.map((a) => ({
43
- id: it.id,
42
+ })), c = o.map((a) => ({
43
+ id: x.id,
44
44
  params: {
45
- unitId: r,
46
- subUnitId: i,
45
+ unitId: i,
46
+ subUnitId: r,
47
47
  link: a
48
48
  }
49
49
  }));
50
- return { redos: o, undos: c };
50
+ return { redos: s, undos: c };
51
51
  }
52
52
  return { redos: [], undos: [] };
53
53
  }
@@ -55,46 +55,225 @@ let _e = class extends O {
55
55
  );
56
56
  }
57
57
  };
58
- _e = Yn([
59
- T(U.Ready, _e),
60
- Ze(0, g(Je)),
61
- Ze(1, J),
62
- Ze(2, g(w))
58
+ ve = Dn([
59
+ N($.Ready, ve),
60
+ De(0, m(qe)),
61
+ De(1, de),
62
+ De(2, m(T))
63
+ ], ve);
64
+ var Vn = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, jt = (e, t, n, i) => {
65
+ for (var r = i > 1 ? void 0 : i ? Fn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
66
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
67
+ return i && r && Vn(t, n, r), r;
68
+ }, Q = (e, t) => (n, i) => t(n, i, e);
69
+ let Ke = class extends O {
70
+ constructor(e, t, n, i) {
71
+ super(), this._context = e, this._hyperLinkModel = t, this._sheetSkeletonManagerService = n, this._renderManagerService = i, this._initSkeletonChange();
72
+ }
73
+ _initSkeletonChange() {
74
+ const e = () => {
75
+ const t = this._context.unit, n = t.getUnitId(), i = t.getActiveSheet().getSheetId(), r = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: i }), o = this._renderManagerService.getRenderById(n);
76
+ r == null || r.makeDirty(!0), r == null || r.calculate(), o && o.mainComponent.makeForceDirty();
77
+ };
78
+ this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
79
+ e();
80
+ }));
81
+ }
82
+ };
83
+ Ke = jt([
84
+ Q(1, m(T)),
85
+ Q(2, m(kt)),
86
+ Q(3, nt)
87
+ ], Ke);
88
+ let _e = class extends O {
89
+ constructor(e, t, n) {
90
+ super(), this._sheetInterceptorService = e, this._hyperLinkModel = t, this._themeService = n, this._initViewModelIntercept();
91
+ }
92
+ _initViewModelIntercept() {
93
+ this.disposeWithMe(
94
+ this._sheetInterceptorService.intercept(
95
+ nn.CELL_CONTENT,
96
+ {
97
+ handler: (e, t, n) => {
98
+ const { row: i, col: r, unitId: o, subUnitId: s } = t, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, i, r), a = this._themeService.getCurrentTheme();
99
+ return n(c ? {
100
+ ...e,
101
+ interceptorStyle: {
102
+ ul: {
103
+ s: Gt.TRUE
104
+ },
105
+ cl: {
106
+ rgb: a.blue500
107
+ }
108
+ }
109
+ } : e);
110
+ },
111
+ priority: 100
112
+ }
113
+ )
114
+ );
115
+ }
116
+ };
117
+ _e = jt([
118
+ N($.Ready, _e),
119
+ Q(0, m(qe)),
120
+ Q(1, m(T)),
121
+ Q(2, m(qt))
63
122
  ], _e);
64
- const st = "SHEET_HYPER_LINK_UI_PLUGIN", Ge = "err";
65
- var Gn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, qn = (t, e, n, r) => {
66
- for (var i = r > 1 ? void 0 : r ? Xn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
67
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
68
- return r && i && Gn(e, n, i), i;
69
- }, ne = (t, e) => (n, r) => e(n, r, t);
70
- function Jn(t, e) {
71
- const n = [];
72
- return e.forEach((r) => {
73
- oe.intersects(t, r) && n.push(r);
74
- }), oe.realUnion(t, ...n);
123
+ var Ht = { exports: {} }, je = {};
124
+ /**
125
+ * @license React
126
+ * react-jsx-runtime.production.min.js
127
+ *
128
+ * Copyright (c) Facebook, Inc. and its affiliates.
129
+ *
130
+ * This source code is licensed under the MIT license found in the
131
+ * LICENSE file in the root directory of this source tree.
132
+ */
133
+ var Wn = In, Zn = Symbol.for("react.element"), zn = Symbol.for("react.fragment"), Kn = Object.prototype.hasOwnProperty, Yn = Wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Gn = { key: !0, ref: !0, __self: !0, __source: !0 };
134
+ function Nt(e, t, n) {
135
+ var i, r = {}, o = null, s = null;
136
+ n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
137
+ for (i in t)
138
+ Kn.call(t, i) && !Gn.hasOwnProperty(i) && (r[i] = t[i]);
139
+ if (e && e.defaultProps)
140
+ for (i in t = e.defaultProps, t)
141
+ r[i] === void 0 && (r[i] = t[i]);
142
+ return { $$typeof: Zn, type: e, key: o, ref: s, props: r, _owner: Yn.current };
143
+ }
144
+ je.Fragment = zn;
145
+ je.jsx = Nt;
146
+ je.jsxs = Nt;
147
+ Ht.exports = je;
148
+ var u = Ht.exports, R = function() {
149
+ return R = Object.assign || function(e) {
150
+ for (var t, n = 1, i = arguments.length; n < i; n++) {
151
+ t = arguments[n];
152
+ for (var r in t)
153
+ Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
154
+ }
155
+ return e;
156
+ }, R.apply(this, arguments);
157
+ }, qn = function(e, t) {
158
+ var n = {};
159
+ for (var i in e)
160
+ Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
161
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
162
+ for (var r = 0, i = Object.getOwnPropertySymbols(e); r < i.length; r++)
163
+ t.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[r]) && (n[i[r]] = e[i[r]]);
164
+ return n;
165
+ }, K = Z(function(e, t) {
166
+ var n = e.icon, i = e.id, r = e.className, o = e.extend, s = qn(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Pt("_".concat(Qn()));
167
+ return $t(n, "".concat(i), { defIds: n.defIds, idSuffix: a.current }, R({ ref: t, className: c }, s), o);
168
+ });
169
+ function $t(e, t, n, i, r) {
170
+ return z(e.tag, R(R({ key: t }, Xn(e, n, r)), i), (Jn(e, n).children || []).map(function(o, s) {
171
+ return $t(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, r);
172
+ }));
173
+ }
174
+ function Xn(e, t, n) {
175
+ var i = R({}, e.attrs);
176
+ n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
177
+ var r = t.defIds;
178
+ return !r || r.length === 0 || (e.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + t.idSuffix), Object.entries(i).forEach(function(o) {
179
+ var s = o[0], c = o[1];
180
+ typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
181
+ })), i;
182
+ }
183
+ function Jn(e, t) {
184
+ var n, i = t.defIds;
185
+ return !i || i.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? R(R({}, e), { children: e.children.map(function(r) {
186
+ return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? R(R({}, r), { attrs: R(R({}, r.attrs), { id: r.attrs.id + t.idSuffix }) }) : r;
187
+ }) }) : e;
188
+ }
189
+ function Qn() {
190
+ return Math.random().toString(36).substring(2, 8);
191
+ }
192
+ K.displayName = "UniverIcon";
193
+ var er = { 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" } }] }, ye = Z(function(e, t) {
194
+ return z(K, Object.assign({}, e, {
195
+ id: "all-border-single",
196
+ ref: t,
197
+ icon: er
198
+ }));
199
+ });
200
+ ye.displayName = "AllBorderSingle";
201
+ var tr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = Z(function(e, t) {
202
+ return z(K, Object.assign({}, e, {
203
+ id: "copy-single",
204
+ ref: t,
205
+ icon: tr
206
+ }));
207
+ });
208
+ At.displayName = "CopySingle";
209
+ var nr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oe = Z(function(e, t) {
210
+ return z(K, Object.assign({}, e, {
211
+ id: "link-single",
212
+ ref: t,
213
+ icon: nr
214
+ }));
215
+ });
216
+ Oe.displayName = "LinkSingle";
217
+ var rr = { 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" } }] }, Bt = Z(function(e, t) {
218
+ return z(K, Object.assign({}, e, {
219
+ id: "unlink-single",
220
+ ref: t,
221
+ icon: rr
222
+ }));
223
+ });
224
+ Bt.displayName = "UnlinkSingle";
225
+ var ir = { 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" } }] }, Dt = Z(function(e, t) {
226
+ return z(K, Object.assign({}, e, {
227
+ id: "write-single",
228
+ ref: t,
229
+ icon: ir
230
+ }));
231
+ });
232
+ Dt.displayName = "WriteSingle";
233
+ var or = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ye = Z(function(e, t) {
234
+ return z(K, Object.assign({}, e, {
235
+ id: "xlsx",
236
+ ref: t,
237
+ icon: or
238
+ }));
239
+ });
240
+ Ye.displayName = "Xlsx";
241
+ var sr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, cr = (e, t, n, i) => {
242
+ for (var r = i > 1 ? void 0 : i ? ar(t, n) : t, o = e.length - 1, s; o >= 0; o--)
243
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
244
+ return i && r && sr(t, n, r), r;
245
+ }, ie = (e, t) => (n, i) => t(n, i, e);
246
+ function lr(e, t) {
247
+ const n = t.getMergeData(), i = t.getMaxColumns() - 1, r = t.getMaxRows() - 1;
248
+ if (i < e.endColumn && (e.endColumn = i), r < e.endRow && (e.endRow = r), e.rangeType === lt.COLUMN || lt.ROW)
249
+ return e;
250
+ const o = [];
251
+ return n.forEach((s) => {
252
+ ee.intersects(e, s) && o.push(s);
253
+ }), ee.realUnion(e, ...o);
75
254
  }
76
- let B = class {
77
- constructor(t, e, n, r, i) {
78
- this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = r, this._localeService = i;
255
+ let F = class {
256
+ constructor(e, t, n, i, r) {
257
+ this._univerInstanceService = e, this._commandService = t, this._definedNamesService = n, this._messageService = i, this._localeService = r;
79
258
  }
80
- _getURLName(t) {
259
+ _getURLName(e) {
81
260
  var c;
82
- const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
83
- if (!i)
261
+ const { gid: t, range: n, rangeid: i } = e, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
262
+ if (!r)
84
263
  return null;
85
- const s = e ? i.getSheetBySheetId(e) : i.getActiveSheet(), o = (c = s == null ? void 0 : s.getName()) != null ? c : "";
264
+ const o = t ? r.getSheetBySheetId(t) : r.getActiveSheet(), s = (c = o == null ? void 0 : o.getName()) != null ? c : "";
86
265
  if (n) {
87
- const a = ce(n).range;
88
- return Re(a) && n !== Ge ? {
266
+ const a = Pe(n).range;
267
+ return We(a) && n !== Ze ? {
89
268
  type: "range",
90
- name: kt(o, a)
269
+ name: Tt(s, a)
91
270
  } : {
92
271
  type: "range-error",
93
272
  name: this._localeService.t("hyperLink.message.refError")
94
273
  };
95
274
  }
96
- if (r) {
97
- const a = this._definedNamesService.getValueById(i.getUnitId(), r);
275
+ if (i) {
276
+ const a = this._definedNamesService.getValueById(r.getUnitId(), i);
98
277
  return a ? {
99
278
  type: "defineName",
100
279
  name: a.formulaOrRefString
@@ -103,8 +282,8 @@ let B = class {
103
282
  name: this._localeService.t("hyperLink.message.refError")
104
283
  };
105
284
  }
106
- if (e) {
107
- const a = i.getSheetBySheetId(e);
285
+ if (t) {
286
+ const a = r.getSheetBySheetId(t);
108
287
  return a ? {
109
288
  type: "sheet",
110
289
  name: a.getName()
@@ -115,557 +294,211 @@ let B = class {
115
294
  }
116
295
  return null;
117
296
  }
118
- navigateTo(t) {
119
- const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
120
- if (!i)
297
+ navigateTo(e) {
298
+ const { gid: t, range: n, rangeid: i } = e, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
299
+ if (!r)
121
300
  return;
122
- const s = i.getUnitId();
123
- if (r && this.navigateToDefineName(s, r), !!e) {
301
+ const o = r.getUnitId();
302
+ if (i && this.navigateToDefineName(o, i), !!t) {
124
303
  if (n) {
125
- const o = ce(n);
126
- Re(o.range) && n !== Ge && this.navigateToRange(s, e, o.range);
304
+ const s = Pe(n);
305
+ We(s.range) && n !== Ze && this.navigateToRange(o, t, s.range);
127
306
  return;
128
307
  }
129
- this.navigateToSheetById(s, e);
308
+ this.navigateToSheetById(o, t);
130
309
  }
131
310
  }
132
- parseHyperLink(t) {
133
- var e, n, r;
134
- if (t != null && t.startsWith("#")) {
135
- const i = new URLSearchParams(t.slice(1)), s = {
136
- gid: (e = i.get("gid")) != null ? e : "",
137
- range: (n = i.get("range")) != null ? n : "",
138
- rangeid: (r = i.get("rangeid")) != null ? r : ""
139
- }, o = this._getURLName(s);
311
+ parseHyperLink(e) {
312
+ var t, n, i;
313
+ if (e != null && e.startsWith("#")) {
314
+ const r = new URLSearchParams(e.slice(1)), o = {
315
+ gid: (t = r.get("gid")) != null ? t : "",
316
+ range: (n = r.get("range")) != null ? n : "",
317
+ rangeid: (i = r.get("rangeid")) != null ? i : ""
318
+ }, s = this._getURLName(o);
140
319
  return {
141
- type: (o == null ? void 0 : o.type) || "link",
142
- name: (o == null ? void 0 : o.name) || t,
143
- url: t,
144
- searchObj: s,
320
+ type: (s == null ? void 0 : s.type) || "link",
321
+ name: (s == null ? void 0 : s.name) || e,
322
+ url: e,
323
+ searchObj: o,
145
324
  handler: () => {
146
- this.navigateTo(s);
325
+ this.navigateTo(o);
147
326
  }
148
327
  };
149
328
  } else
150
329
  return {
151
330
  type: "outer",
152
- name: t,
153
- url: t,
331
+ name: e,
332
+ url: e,
154
333
  handler: () => {
155
- this.navigateToOtherWebsite(t);
334
+ this.navigateToOtherWebsite(e);
156
335
  }
157
336
  };
158
337
  }
159
- async navigateToRange(t, e, n) {
160
- const r = await this.navigateToSheetById(t, e);
161
- if (r) {
162
- const i = Jn(n, r.getMergeData());
338
+ async navigateToRange(e, t, n) {
339
+ const i = await this.navigateToSheetById(e, t);
340
+ if (i) {
341
+ const r = lr(n, i);
163
342
  await this._commandService.executeCommand(
164
- ln.id,
343
+ rn.id,
165
344
  {
166
- unitId: t,
167
- subUnitId: e,
168
- pluginName: dn,
345
+ unitId: e,
346
+ subUnitId: t,
347
+ pluginName: on,
169
348
  selections: [{
170
- range: i
349
+ range: r
171
350
  }]
172
351
  }
173
- ), await this._commandService.executeCommand(Rt.id, {
174
- range: i
352
+ ), await this._commandService.executeCommand(bt.id, {
353
+ range: r
175
354
  });
176
355
  }
177
356
  }
178
- async navigateToSheet(t, e) {
179
- const n = this._univerInstanceService.getUnit(t, M.UNIVER_SHEET);
357
+ async navigateToSheet(e, t) {
358
+ const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
180
359
  if (!n)
181
360
  return !1;
182
- const r = n.getActiveSheet();
183
- if ((r == null ? void 0 : r.getName()) === e)
361
+ const i = n.getActiveSheet();
362
+ if ((i == null ? void 0 : i.getName()) === t)
184
363
  return !0;
185
- const i = n.getSheetBySheetName(e);
186
- if (!i) {
364
+ const r = n.getSheetBySheetName(t);
365
+ if (!r) {
187
366
  this._messageService.show({
188
367
  content: this._localeService.t("hyperLink.message.noSheet"),
189
- type: ie.Error
368
+ type: se.Error
190
369
  });
191
370
  return;
192
371
  }
193
- const s = i.getSheetId();
194
- return n.getHiddenWorksheets().indexOf(s) > -1 && this._messageService.show({
372
+ const o = r.getSheetId();
373
+ return n.getHiddenWorksheets().indexOf(o) > -1 && this._messageService.show({
195
374
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
196
- type: ie.Error
197
- }), await this._commandService.executeCommand(Pe.id, { unitId: t, subUnitId: s });
375
+ type: se.Error
376
+ }), await this._commandService.executeCommand(Re.id, { unitId: e, subUnitId: o });
198
377
  }
199
- async navigateToSheetById(t, e) {
200
- const n = this._univerInstanceService.getUnit(t, M.UNIVER_SHEET);
378
+ async navigateToSheetById(e, t) {
379
+ const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
201
380
  if (!n)
202
381
  return !1;
203
- const r = n.getActiveSheet();
204
- if (r.getSheetId() === e)
205
- return r;
206
- const i = n.getSheetBySheetId(e);
207
- return i ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
382
+ const i = n.getActiveSheet();
383
+ if (i.getSheetId() === t)
384
+ return i;
385
+ const r = n.getSheetBySheetId(t);
386
+ return r ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
208
387
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
209
- type: ie.Error
210
- }), !1) : await this._commandService.executeCommand(Pe.id, { unitId: t, subUnitId: e }) ? i : !1 : (this._messageService.show({
388
+ type: se.Error
389
+ }), !1) : await this._commandService.executeCommand(Re.id, { unitId: e, subUnitId: t }) ? r : !1 : (this._messageService.show({
211
390
  content: this._localeService.t("hyperLink.message.noSheet"),
212
- type: ie.Error
391
+ type: se.Error
213
392
  }), !1);
214
393
  }
215
- async navigateToDefineName(t, e) {
216
- return this._definedNamesService.focusRange(t, e), !0;
217
- }
218
- async navigateToOtherWebsite(t) {
219
- window.open(t, "_blank", "noopener noreferrer");
220
- }
221
- };
222
- B = qn([
223
- ne(0, J),
224
- ne(1, F),
225
- ne(2, bt),
226
- ne(3, Ot),
227
- ne(4, g(de))
228
- ], B);
229
- var Qn = Object.defineProperty, er = Object.getOwnPropertyDescriptor, tr = (t, e, n, r) => {
230
- for (var i = r > 1 ? void 0 : r ? er(e, n) : e, s = t.length - 1, o; s >= 0; s--)
231
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
232
- return r && i && Qn(e, n, i), i;
233
- }, ge = (t, e) => (n, r) => e(n, r, t);
234
- let ve = class extends O {
235
- constructor(e, n, r, i) {
236
- super();
237
- H(this, "_disposableMap", /* @__PURE__ */ new Map());
238
- H(this, "_rangeDisableMap", /* @__PURE__ */ new Map());
239
- this._refRangeService = e, this._hyperLinkModel = n, this._resolverService = r, this._univerInstanceService = i, this._initData(), this._initRefRange();
240
- }
241
- _register(e, n, r) {
242
- const i = r.id, s = {
243
- startColumn: r.column,
244
- endColumn: r.column,
245
- startRow: r.row,
246
- endRow: r.row
247
- }, o = (c) => {
248
- const a = ct(s, c);
249
- return a && a.startColumn === s.startColumn && a.startRow === s.startRow ? {
250
- undos: [],
251
- redos: []
252
- } : a ? {
253
- redos: [{
254
- id: dt.id,
255
- params: {
256
- unitId: e,
257
- subUnitId: n,
258
- id: r.id,
259
- row: a.startRow,
260
- column: a.startColumn
261
- }
262
- }],
263
- undos: [{
264
- id: dt.id,
265
- params: {
266
- unitId: e,
267
- subUnitId: n,
268
- id: r.id,
269
- row: s.startRow,
270
- column: s.startColumn
271
- }
272
- }]
273
- } : {
274
- redos: [{
275
- id: x.id,
276
- params: {
277
- unitId: e,
278
- subUnitId: n,
279
- id: r.id
280
- }
281
- }],
282
- undos: [{
283
- id: j.id,
284
- params: {
285
- unitId: e,
286
- subUnitId: n,
287
- link: r
288
- }
289
- }]
290
- };
291
- };
292
- this._disposableMap.set(
293
- i,
294
- this._refRangeService.registerRefRange(s, o, e, n)
295
- );
296
- }
297
- _unregister(e) {
298
- const n = this._disposableMap.get(e);
299
- n == null || n.dispose(), this._disposableMap.delete(e);
300
- }
301
- _registerRange(e, n, r) {
302
- const i = this._resolverService.parseHyperLink(r);
303
- if (i.searchObj && i.searchObj.range && i.searchObj.gid) {
304
- const s = i.searchObj.gid, o = ce(i.searchObj.range).range;
305
- if (Re(o) && i.searchObj.range !== Ge) {
306
- const c = (a) => {
307
- const p = ct(o, a);
308
- return p && fe(p) === fe(o) ? {
309
- redos: [],
310
- undos: []
311
- } : {
312
- redos: [{
313
- id: Oe.id,
314
- params: {
315
- unitId: e,
316
- subUnitId: s,
317
- id: n,
318
- payload: {
319
- payload: `#gid=${s}&range=${p ? fe(p) : "err"}`
320
- }
321
- }
322
- }],
323
- undos: [{
324
- id: Oe.id,
325
- params: {
326
- unitId: e,
327
- subUnitId: s,
328
- id: n,
329
- payload: {
330
- payload: r
331
- }
332
- }
333
- }]
334
- };
335
- };
336
- this._rangeDisableMap.set(n, this._refRangeService.registerRefRange(o, c, e, s));
337
- }
338
- }
339
- }
340
- _unregisterRange(e) {
341
- const n = this._rangeDisableMap.get(e);
342
- n == null || n.dispose(), this._rangeDisableMap.delete(e);
343
- }
344
- _initData() {
345
- this._hyperLinkModel.getAll().forEach((n) => {
346
- n.forEach((r) => {
347
- const { unitId: i, subUnitId: s, links: o } = r;
348
- o.forEach((c) => {
349
- this._register(i, s, c);
350
- });
351
- });
352
- });
394
+ async navigateToDefineName(e, t) {
395
+ return this._definedNamesService.focusRange(e, t), !0;
353
396
  }
354
- _initRefRange() {
355
- this.disposeWithMe(
356
- this._hyperLinkModel.linkUpdate$.subscribe((e) => {
357
- switch (e.type) {
358
- case "add": {
359
- this._register(e.unitId, e.subUnitId, e.payload), this._registerRange(e.unitId, e.payload.id, e.payload.payload);
360
- break;
361
- }
362
- case "remove": {
363
- this._unregister(e.payload.id), this._unregisterRange(e.payload.id);
364
- break;
365
- }
366
- case "updateRef": {
367
- const { unitId: n, subUnitId: r, id: i } = e, s = this._hyperLinkModel.getHyperLink(n, r, i);
368
- if (!s)
369
- return;
370
- this._unregister(i), this._register(n, r, s);
371
- break;
372
- }
373
- case "unload": {
374
- const { unitLinks: n } = e;
375
- n.forEach((r) => {
376
- const { links: i } = r;
377
- i.forEach((s) => {
378
- this._unregister(s.id), this._unregisterRange(s.id);
379
- });
380
- });
381
- break;
382
- }
383
- case "update": {
384
- this._unregisterRange(e.id), this._registerRange(e.unitId, e.id, e.payload.payload);
385
- break;
386
- }
387
- }
388
- })
389
- ), this.disposeWithMe(en(() => {
390
- this._disposableMap.forEach((e) => {
391
- e.dispose();
392
- }), this._disposableMap.clear();
393
- }));
397
+ async navigateToOtherWebsite(e) {
398
+ window.open(e, "_blank", "noopener noreferrer");
394
399
  }
395
400
  };
396
- ve = tr([
397
- T(U.Starting, ve),
398
- ge(0, g(un)),
399
- ge(1, g(w)),
400
- ge(2, g(B)),
401
- ge(3, J)
402
- ], ve);
403
- var nr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, Ut = (t, e, n, r) => {
404
- for (var i = r > 1 ? void 0 : r ? rr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
405
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
406
- return r && i && nr(e, n, i), i;
407
- }, q = (t, e) => (n, r) => e(n, r, t);
408
- let Xe = class extends O {
409
- constructor(t, e, n, r) {
410
- super(), this._context = t, this._hyperLinkModel = e, this._sheetSkeletonManagerService = n, this._renderManagerService = r, this._initSkeletonChange();
411
- }
412
- _initSkeletonChange() {
413
- const t = () => {
414
- const e = this._context.unit, n = e.getUnitId(), r = e.getActiveSheet().getSheetId(), i = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: r }), s = this._renderManagerService.getRenderById(n);
415
- i == null || i.makeDirty(!0), i == null || i.calculate(), s && s.mainComponent.makeForceDirty();
416
- };
417
- this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
418
- t();
419
- }));
420
- }
421
- };
422
- Xe = Ut([
423
- q(1, g(w)),
424
- q(2, g(Sn)),
425
- q(3, jt)
426
- ], Xe);
427
- let ye = class extends O {
428
- constructor(t, e, n) {
429
- super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._themeService = n, this._initViewModelIntercept();
430
- }
431
- _initViewModelIntercept() {
432
- this.disposeWithMe(
433
- this._sheetInterceptorService.intercept(
434
- pn.CELL_CONTENT,
435
- {
436
- handler: (t, e, n) => {
437
- const { row: r, col: i, unitId: s, subUnitId: o } = e, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, r, i), a = this._themeService.getCurrentTheme();
438
- return n(c ? {
439
- ...t,
440
- interceptorStyle: {
441
- ul: {
442
- s: tn.TRUE
443
- },
444
- cl: {
445
- rgb: a.blue500
446
- }
447
- }
448
- } : t);
449
- },
450
- priority: 100
451
- }
452
- )
453
- );
454
- }
455
- };
456
- ye = Ut([
457
- T(U.Ready, ye),
458
- q(0, g(Je)),
459
- q(1, g(w)),
460
- q(2, g(nn))
461
- ], ye);
462
- var Ht = { exports: {} }, He = {};
463
- /**
464
- * @license React
465
- * react-jsx-runtime.production.min.js
466
- *
467
- * Copyright (c) Facebook, Inc. and its affiliates.
468
- *
469
- * This source code is licensed under the MIT license found in the
470
- * LICENSE file in the root directory of this source tree.
471
- */
472
- var ir = Bn, sr = Symbol.for("react.element"), or = Symbol.for("react.fragment"), ar = Object.prototype.hasOwnProperty, cr = ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, lr = { key: !0, ref: !0, __self: !0, __source: !0 };
473
- function $t(t, e, n) {
474
- var r, i = {}, s = null, o = null;
475
- n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref);
476
- for (r in e)
477
- ar.call(e, r) && !lr.hasOwnProperty(r) && (i[r] = e[r]);
478
- if (t && t.defaultProps)
479
- for (r in e = t.defaultProps, e)
480
- i[r] === void 0 && (i[r] = e[r]);
481
- return { $$typeof: sr, type: t, key: s, ref: o, props: i, _owner: cr.current };
482
- }
483
- He.Fragment = or;
484
- He.jsx = $t;
485
- He.jsxs = $t;
486
- Ht.exports = He;
487
- var d = Ht.exports, P = function() {
488
- return P = Object.assign || function(t) {
489
- for (var e, n = 1, r = arguments.length; n < r; n++) {
490
- e = arguments[n];
491
- for (var i in e)
492
- Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
493
- }
494
- return t;
495
- }, P.apply(this, arguments);
496
- }, dr = function(t, e) {
497
- var n = {};
498
- for (var r in t)
499
- Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
500
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
501
- for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
502
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
503
- return n;
504
- }, z = W(function(t, e) {
505
- var n = t.icon, r = t.id, i = t.className, s = t.extend, o = dr(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Tt("_".concat(hr()));
506
- return Nt(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, P({ ref: e, className: c }, o), s);
507
- });
508
- function Nt(t, e, n, r, i) {
509
- return Z(t.tag, P(P({ key: e }, ur(t, n, i)), r), (pr(t, n).children || []).map(function(s, o) {
510
- return Nt(s, "".concat(e, "-").concat(t.tag, "-").concat(o), n, void 0, i);
511
- }));
512
- }
513
- function ur(t, e, n) {
514
- var r = P({}, t.attrs);
515
- n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
516
- var i = e.defIds;
517
- return !i || i.length === 0 || (t.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(s) {
518
- var o = s[0], c = s[1];
519
- typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
520
- })), r;
521
- }
522
- function pr(t, e) {
523
- var n, r = e.defIds;
524
- return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? P(P({}, t), { children: t.children.map(function(i) {
525
- return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? P(P({}, i), { attrs: P(P({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
526
- }) }) : t;
527
- }
528
- function hr() {
529
- return Math.random().toString(36).substring(2, 8);
530
- }
531
- z.displayName = "UniverIcon";
532
- var gr = { 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" } }] }, Dt = W(function(t, e) {
533
- return Z(z, Object.assign({}, t, {
534
- id: "all-border-single",
535
- ref: e,
536
- icon: gr
537
- }));
538
- });
539
- Dt.displayName = "AllBorderSingle";
540
- const ze = Dt;
541
- var mr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = W(function(t, e) {
542
- return Z(z, Object.assign({}, t, {
543
- id: "copy-single",
544
- ref: e,
545
- icon: mr
546
- }));
547
- });
548
- At.displayName = "CopySingle";
549
- const fr = At;
550
- var _r = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, we = W(function(t, e) {
551
- return Z(z, Object.assign({}, t, {
552
- id: "link-single",
553
- ref: e,
554
- icon: _r
555
- }));
556
- });
557
- we.displayName = "LinkSingle";
558
- var vr = { 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" } }] }, Bt = W(function(t, e) {
559
- return Z(z, Object.assign({}, t, {
560
- id: "unlink-single",
561
- ref: e,
562
- icon: vr
563
- }));
564
- });
565
- Bt.displayName = "UnlinkSingle";
566
- const yr = Bt;
567
- var Sr = { 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" } }] }, Vt = W(function(t, e) {
568
- return Z(z, Object.assign({}, t, {
569
- id: "write-single",
570
- ref: e,
571
- icon: Sr
572
- }));
573
- });
574
- Vt.displayName = "WriteSingle";
575
- const Cr = Vt;
576
- var Lr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ft = W(function(t, e) {
577
- return Z(z, Object.assign({}, t, {
578
- id: "xlsx",
579
- ref: e,
580
- icon: Lr
581
- }));
582
- });
583
- Ft.displayName = "Xlsx";
584
- const mt = Ft, Ir = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, kr = new RegExp(Ir);
585
- function le(t) {
586
- return t.startsWith("http://localhost:3002") || t.startsWith("localhost:3002") ? !0 : !!t.match(kr);
401
+ F = cr([
402
+ ie(0, de),
403
+ ie(1, W),
404
+ ie(2, Ut),
405
+ ie(3, Ot),
406
+ ie(4, m(ue))
407
+ ], F);
408
+ const dr = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, ur = new RegExp(dr);
409
+ function le(e) {
410
+ return Number.isNaN(+e) ? e.startsWith("http://localhost:3002") || e.startsWith("localhost:3002") ? !0 : !!e.match(ur) : !1;
587
411
  }
588
- function Wt(t) {
589
- return /^[a-zA-Z]+:\/\//.test(t);
412
+ function pr(e) {
413
+ return /^[a-zA-Z]+:\/\//.test(e);
590
414
  }
591
- function br(t) {
592
- return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
415
+ function hr(e) {
416
+ return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(e);
593
417
  }
594
- function Zt(t) {
595
- return le(t) ? Wt(t) ? t : br(t) ? `mailto://${t}` : `http://${t}` : t;
418
+ function rt(e) {
419
+ if (le(e)) {
420
+ const t = pr(e) ? e : hr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
421
+ if (n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search)
422
+ return n.hash;
423
+ }
424
+ return e;
596
425
  }
597
- const Rr = "univer-cell-link-edit-buttons", Pr = {
598
- cellLinkEditButtons: Rr
599
- };
600
- function Or(t) {
601
- if (t === null)
426
+ function mr(e) {
427
+ if (e === null)
602
428
  return "";
603
- if (t != null && t.p) {
604
- const e = t == null ? void 0 : t.p.body;
605
- if (e == null)
429
+ if (e != null && e.p) {
430
+ const t = e == null ? void 0 : e.p.body;
431
+ if (t == null)
606
432
  return "";
607
- const n = e.dataStream;
608
- return n.substring(n.length - 2, n.length) === sn ? n.substring(0, n.length - 2) : n;
433
+ const n = t.dataStream;
434
+ return n.substring(n.length - 2, n.length) === Xt ? n.substring(0, n.length - 2) : n;
609
435
  }
610
- return t == null ? void 0 : t.v;
436
+ return e == null ? void 0 : e.v;
611
437
  }
612
- const Ee = () => {
613
- var ee;
614
- const [t, e] = te(""), [n, r] = te(""), [i, s] = te(
438
+ const gr = "univer-cell-link-edit-buttons", fr = {
439
+ cellLinkEditButtons: gr
440
+ }, we = () => {
441
+ var te;
442
+ const [e, t] = re(""), [n, i] = re(""), [r, o] = re(
615
443
  "link"
616
444
  /* link */
617
- ), [o, c] = te(""), a = b(de), p = b(bt), h = b(J), _ = b($), l = En(_.currentEditing$), f = b(w), L = b(B), y = b(F), [S, I] = te(!1), v = Tt(!1);
618
- Vn(() => {
619
- var u, m, C;
445
+ ), [s, c] = re(""), a = k(ue), p = k(Ut), h = k(de), f = k(H), l = Pn(f.currentEditing$), g = k(T), S = k(F), v = k(W), [I, D] = re(!1), C = Pt(!1);
446
+ kn(() => {
447
+ var d, _, L;
620
448
  if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
621
- const k = f.getHyperLinkByLocation(l.unitId, l.subUnitId, l.row, l.column);
622
- if (k) {
623
- const Be = L.parseHyperLink(k.payload);
624
- if (e(k.id), r(k.display), Be.type === "outer") {
625
- s(
449
+ const y = g.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
450
+ if (y) {
451
+ const me = S.parseHyperLink(y.payload);
452
+ if (t(y.id), i(y.display), me.type === "outer") {
453
+ o(
626
454
  "link"
627
455
  /* link */
628
- ), c(Be.url);
456
+ ), c(me.url), me.url === y.display && (C.current = !0);
629
457
  return;
630
458
  } else {
631
- const A = Be.searchObj;
632
- if (A.rangeid) {
633
- s(
459
+ const j = me.searchObj;
460
+ if (j.rangeid) {
461
+ o(
634
462
  "rangeid"
635
463
  /* definedName */
636
- ), c(A.rangeid);
464
+ ), c(j.rangeid);
637
465
  return;
638
466
  }
639
- if (A.range) {
640
- const qt = A.gid && (C = (m = (u = h.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(A.gid)) == null ? void 0 : m.getName()) != null ? C : "";
641
- s(
467
+ if (j.range) {
468
+ const zt = j.gid && (L = (_ = (d = h.getUnit(l.unitId)) == null ? void 0 : d.getSheetBySheetId(j.gid)) == null ? void 0 : _.getName()) != null ? L : "";
469
+ if (o(
642
470
  "range"
643
471
  /* range */
644
- ), c(kt(qt, ce(A.range).range));
472
+ ), j.range === Ze)
473
+ c("");
474
+ else {
475
+ const ct = Tt(zt, Pe(j.range).range);
476
+ c(ct), ct === y.display && (C.current = !0);
477
+ }
645
478
  return;
646
479
  }
647
- if (A.gid) {
648
- s(
480
+ if (j.gid) {
481
+ o(
649
482
  "gid"
650
483
  /* sheet */
651
- ), c(A.gid);
484
+ ), c(j.gid);
652
485
  return;
653
486
  }
654
487
  }
655
488
  }
656
- const D = h.getUnit(l.unitId), De = D == null ? void 0 : D.getSheetBySheetId(l.subUnitId), Xt = De == null ? void 0 : De.getCellRaw(l.row, l.column), Ae = Or(Xt);
657
- s(
489
+ const U = h.getUnit(l.unitId), P = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId), Zt = P == null ? void 0 : P.getCellRaw(l.row, l.column), Ne = mr(Zt);
490
+ o(
658
491
  "link"
659
492
  /* link */
660
- ), c(""), r((Ae != null ? Ae : "").toString()), e("");
493
+ ), c(""), i((Ne != null ? Ne : "").toString()), t("");
661
494
  return;
662
495
  }
663
- s(
496
+ o(
664
497
  "link"
665
498
  /* link */
666
- ), c(""), r(""), e("");
667
- }, [l, f, L, h]);
668
- const K = Fn(() => o, [i]), N = [
499
+ ), c(""), i(""), t("");
500
+ }, [l, g, S, h]);
501
+ const Y = bn(() => s, [r]), A = [
669
502
  {
670
503
  label: a.t("hyperLink.form.link"),
671
504
  value: "link"
@@ -686,163 +519,168 @@ const Ee = () => {
686
519
  value: "rangeid"
687
520
  /* definedName */
688
521
  }
689
- ], R = h.getCurrentUnitForType(M.UNIVER_SHEET);
690
- if (!R)
522
+ ], b = h.getCurrentUnitForType(E.UNIVER_SHEET);
523
+ if (!b)
691
524
  return;
692
- const Y = R.getHiddenWorksheets(), V = R.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => Y.indexOf(u.value) === -1), Q = Object.values((ee = p.getDefinedNameMap(R.getUnitId())) != null ? ee : {}).map((u) => ({
693
- label: u.name,
694
- value: u.id
695
- })), ue = (u, m) => {
696
- if (u === "link")
697
- return Wt(m) ? m : `http://${m}`;
698
- if (u === "range") {
699
- const C = ce(m), k = R.getSheetBySheetName(C.sheetName);
700
- if (k)
701
- return `#gid=${k.getSheetId()}&range=${fe(C.range)}`;
525
+ const G = b.getHiddenWorksheets(), B = b.getSheets().map((d) => ({ label: d.getName(), value: d.getSheetId() })).filter((d) => G.indexOf(d.value) === -1), q = Object.values((te = p.getDefinedNameMap(b.getUnitId())) != null ? te : {}).map((d) => ({
526
+ label: d.name,
527
+ value: d.id
528
+ })), pe = (d, _) => {
529
+ if (d === "link")
530
+ return rt(_);
531
+ if (d === "range") {
532
+ const L = Pe(_), y = b.getSheetBySheetName(L.sheetName);
533
+ if (y)
534
+ return `#gid=${y.getSheetId()}&range=${Nn(L.range)}`;
702
535
  }
703
- return `#${u}=${m}`;
704
- }, Ne = async () => {
705
- l && (t ? await y.executeCommand(It.id, {
536
+ return `#${d}=${_}`;
537
+ }, He = On((d) => {
538
+ const _ = d[0];
539
+ if (!_ || !We(_.range))
540
+ return;
541
+ _.sheetName || (_.sheetName = b.getActiveSheet().getName());
542
+ const L = Hn(_);
543
+ c(L), L && (C.current || !n) && (i(L), C.current = !0);
544
+ }), he = async () => {
545
+ if (l && (e ? await v.executeCommand(Lt.id, {
706
546
  unitId: l.unitId,
707
547
  subUnitId: l.subUnitId,
708
- id: t,
548
+ id: e,
709
549
  payload: {
710
550
  display: n,
711
- payload: ue(i, o)
551
+ payload: pe(r, s)
712
552
  }
713
- }) : await y.executeCommand(it.id, {
553
+ }) : await v.executeCommand(It.id, {
714
554
  unitId: l.unitId,
715
555
  subUnitId: l.subUnitId,
716
556
  link: {
717
- id: ae.generateRandomId(),
557
+ id: ce.generateRandomId(),
718
558
  row: l.row,
719
559
  column: l.column,
720
- payload: ue(i, o),
560
+ payload: pe(r, s),
721
561
  display: n
722
562
  }
723
- })), l && (await y.executeCommand(Pe.id, {
724
- unitId: l.unitId,
725
- subUnitId: l.subUnitId
726
- }), await y.executeCommand(Rt.id, {
727
- range: {
728
- startRow: l.row,
729
- endRow: l.row,
730
- startColumn: l.column,
731
- endColumn: l.column
732
- }
733
- })), y.executeCommand(Me.id);
563
+ })), l) {
564
+ await v.executeCommand(Re.id, {
565
+ unitId: l.unitId,
566
+ subUnitId: l.subUnitId
567
+ });
568
+ const d = 5;
569
+ await v.executeCommand(bt.id, {
570
+ range: {
571
+ startRow: Math.max(l.row - d, 0),
572
+ endRow: l.row + d,
573
+ startColumn: Math.max(l.column - d, 0),
574
+ endColumn: l.column + d
575
+ }
576
+ });
577
+ }
578
+ v.executeCommand(Ee.id);
734
579
  };
735
- return /* @__PURE__ */ d.jsxs("div", { children: [
736
- /* @__PURE__ */ d.jsx(
737
- G,
580
+ return /* @__PURE__ */ u.jsxs("div", { children: [
581
+ /* @__PURE__ */ u.jsx(
582
+ X,
738
583
  {
739
584
  label: a.t("hyperLink.form.label"),
740
- error: S && !n ? a.t("hyperLink.form.inputError") : "",
741
- children: /* @__PURE__ */ d.jsx(
742
- ut,
585
+ error: I && !n ? a.t("hyperLink.form.inputError") : "",
586
+ children: /* @__PURE__ */ u.jsx(
587
+ mt,
743
588
  {
744
589
  value: n,
745
- onChange: (u) => {
746
- r(u), v.current = !1;
590
+ onChange: (d) => {
591
+ i(d), C.current = !1;
747
592
  },
748
593
  placeholder: a.t("hyperLink.form.labelPlaceholder")
749
594
  }
750
595
  )
751
596
  }
752
597
  ),
753
- /* @__PURE__ */ d.jsx(G, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
754
- Ve,
598
+ /* @__PURE__ */ u.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ u.jsx(
599
+ Ae,
755
600
  {
756
- options: N,
757
- value: i,
758
- onChange: (u) => {
759
- s(u), c("");
601
+ options: A,
602
+ value: r,
603
+ onChange: (d) => {
604
+ o(d), c("");
760
605
  }
761
606
  }
762
607
  ) }),
763
- i === "link" && /* @__PURE__ */ d.jsx(
764
- G,
608
+ r === "link" && /* @__PURE__ */ u.jsx(
609
+ X,
765
610
  {
766
- error: S ? o ? le(o) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
767
- children: /* @__PURE__ */ d.jsx(
768
- ut,
611
+ error: I ? s ? le(s) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
612
+ children: /* @__PURE__ */ u.jsx(
613
+ mt,
769
614
  {
770
- value: o,
771
- onChange: (u) => {
772
- c(u), u && (v.current || !n) && (r(u), v.current = !0);
615
+ value: s,
616
+ onChange: (d) => {
617
+ c(d), d && (C.current || !n || n === s) && (i(d), C.current = !0);
773
618
  },
774
619
  placeholder: a.t("hyperLink.form.linkPlaceholder")
775
620
  }
776
621
  )
777
622
  }
778
623
  ),
779
- i === "range" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
780
- Mn,
624
+ r === "range" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ u.jsx(
625
+ wn,
781
626
  {
782
- openForSheetUnitId: R.getUnitId(),
783
- id: rn("hyper-link-edit"),
627
+ openForSheetUnitId: b.getUnitId(),
628
+ id: Jt("hyper-link-edit"),
784
629
  isSingleChoice: !0,
785
- value: K,
786
- onChange: (u) => {
787
- const m = u[0];
788
- if (!m || !Re(m.range))
789
- return;
790
- m.sheetName || (m.sheetName = R.getActiveSheet().getName());
791
- const C = yn(m);
792
- c(C), C && (v.current || !n) && (r(C), v.current = !0);
793
- }
630
+ value: Y,
631
+ onChange: He
794
632
  }
795
633
  ) }),
796
- i === "gid" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
797
- Ve,
634
+ r === "gid" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ u.jsx(
635
+ Ae,
798
636
  {
799
- options: V,
800
- value: o,
801
- onChange: (u) => {
802
- var C;
803
- c(u);
804
- const m = (C = V.find((k) => k.value === u)) == null ? void 0 : C.label;
805
- m && (v.current || !n) && (r(m), v.current = !0);
637
+ options: B,
638
+ value: s,
639
+ onChange: (d) => {
640
+ var y, U;
641
+ c(d);
642
+ const _ = (y = B.find((P) => P.value === d)) == null ? void 0 : y.label, L = (U = B.find((P) => P.value === s)) == null ? void 0 : U.label;
643
+ _ && (C.current || !n || n === L) && (i(_), C.current = !0);
806
644
  }
807
645
  }
808
646
  ) }),
809
- i === "rangeid" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
810
- Ve,
647
+ r === "rangeid" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ u.jsx(
648
+ Ae,
811
649
  {
812
- options: Q,
813
- value: o,
814
- onChange: (u) => {
815
- var C;
816
- c(u);
817
- const m = (C = Q.find((k) => k.value === u)) == null ? void 0 : C.label;
818
- m && (v.current || !n) && (r(m), v.current = !0);
650
+ options: q,
651
+ value: s,
652
+ onChange: (d) => {
653
+ var y, U;
654
+ c(d);
655
+ const _ = (y = q.find((P) => P.value === d)) == null ? void 0 : y.label, L = (U = q.find((P) => P.value === s)) == null ? void 0 : U.label;
656
+ _ && (C.current || !n || n === L) && (i(_), C.current = !0);
819
657
  }
820
658
  }
821
659
  ) }),
822
- /* @__PURE__ */ d.jsxs("div", { className: Pr.cellLinkEditButtons, children: [
823
- /* @__PURE__ */ d.jsx(
824
- pt,
660
+ /* @__PURE__ */ u.jsxs("div", { className: fr.cellLinkEditButtons, children: [
661
+ /* @__PURE__ */ u.jsx(
662
+ gt,
825
663
  {
826
664
  onClick: () => {
827
- l && y.executeCommand(Pe.id, {
665
+ l && v.executeCommand(Re.id, {
828
666
  unitId: l.unitId,
829
667
  subUnitId: l.subUnitId
830
- }), y.executeCommand(Me.id);
668
+ }), v.executeCommand(Ee.id);
831
669
  },
832
670
  children: a.t("hyperLink.form.cancel")
833
671
  }
834
672
  ),
835
- /* @__PURE__ */ d.jsx(
836
- pt,
673
+ /* @__PURE__ */ u.jsx(
674
+ gt,
837
675
  {
838
676
  type: "primary",
839
677
  style: { marginLeft: 8 },
840
678
  onClick: async () => {
841
- if (!n || !o || i === "link" && !le(o)) {
842
- I(!0);
679
+ if (!n || !s || r === "link" && !le(s)) {
680
+ D(!0);
843
681
  return;
844
682
  }
845
- Ne();
683
+ he();
846
684
  },
847
685
  children: a.t("hyperLink.form.ok")
848
686
  }
@@ -850,152 +688,156 @@ const Ee = () => {
850
688
  ] })
851
689
  ] });
852
690
  };
853
- Ee.componentKey = "univer.sheet.cell-link-edit";
854
- const ot = {
691
+ we.componentKey = "univer.sheet.cell-link-edit";
692
+ const it = {
855
693
  type: Te.OPERATION,
856
694
  id: "sheet.operation.open-hyper-link-sidebar",
857
- handler(t, e) {
858
- if (!e)
695
+ handler(e, t) {
696
+ if (!t)
859
697
  return !1;
860
- const { unitId: n, subUnitId: r, row: i, column: s } = e, o = t.get(w), c = t.get(wt), a = t.get($), p = o.getHyperLinkByLocation(n, r, i, s);
861
- return a.startEditing(e), c.open({
698
+ const { unitId: n, subUnitId: i, row: r, column: o } = t, s = e.get(T), c = e.get(wt), a = e.get(H), p = s.getHyperLinkByLocation(n, i, r, o);
699
+ return a.startEditing(t), c.open({
862
700
  header: {
863
701
  title: p ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
864
702
  },
865
703
  children: {
866
- label: Ee.componentKey
704
+ label: we.componentKey
867
705
  }
868
706
  }), !0;
869
707
  }
870
- }, Me = {
708
+ }, Ee = {
871
709
  type: Te.OPERATION,
872
710
  id: "sheet.operation.close-hyper-link-sidebar",
873
- handler(t) {
874
- const e = t.get(wt), n = t.get($);
875
- return e.close(), n.endEditing(), !0;
711
+ handler(e) {
712
+ const t = e.get(wt), n = e.get(H);
713
+ return t.close(), n.endEditing(), !0;
876
714
  }
877
- }, $e = {
715
+ }, ot = {
878
716
  type: Te.OPERATION,
879
717
  id: "sheet.operation.insert-hyper-link",
880
- handler(t) {
881
- const e = t.get(J), n = Ct(e);
718
+ handler(e) {
719
+ const t = e.get(de), n = Ct(t);
882
720
  if (!n)
883
721
  return !1;
884
- const r = t.get(F), s = t.get(Lt).getFirst();
885
- if (!(s != null && s.primary))
722
+ const i = e.get(W), o = e.get(St).getFirst();
723
+ if (!(o != null && o.primary))
886
724
  return !1;
887
- const o = s.primary.actualRow, c = s.primary.actualColumn;
888
- return r.executeCommand(ot.id, {
725
+ const s = o.primary.startRow, c = o.primary.startColumn;
726
+ return i.executeCommand(it.id, {
889
727
  unitId: n.unitId,
890
728
  subUnitId: n.subUnitId,
891
- row: o,
729
+ row: s,
892
730
  column: c
893
731
  });
894
732
  }
895
- }, zt = {
733
+ }, st = {
896
734
  type: Te.OPERATION,
897
735
  id: "sheet.operation.insert-hyper-link-toolbar",
898
- handler(t) {
899
- const e = t.get(F);
900
- return t.get($).currentEditing ? e.executeCommand(Me.id) : e.executeCommand($e.id);
736
+ handler(e) {
737
+ const t = e.get(W);
738
+ return e.get(H).currentEditing ? t.executeCommand(Ee.id) : t.executeCommand(ot.id);
901
739
  }
902
- }, wr = "univer-cell-link", Er = "univer-cell-link-type", Mr = "univer-cell-link-content", xr = "univer-cell-link-content-error", jr = "univer-cell-link-url", Tr = "univer-cell-link-operations", Ur = "univer-cell-link-operation", Hr = "univer-cell-link-operation-error", E = {
903
- cellLink: wr,
904
- cellLinkType: Er,
905
- cellLinkContent: Mr,
906
- cellLinkContentError: xr,
907
- cellLinkUrl: jr,
908
- cellLinkOperations: Tr,
909
- cellLinkOperation: Ur,
910
- cellLinkOperationError: Hr
911
- }, $r = {
912
- outer: /* @__PURE__ */ d.jsx(we, {}),
913
- link: /* @__PURE__ */ d.jsx(we, {}),
914
- sheet: /* @__PURE__ */ d.jsx(mt, {}),
915
- range: /* @__PURE__ */ d.jsx(ze, {}),
916
- defineName: /* @__PURE__ */ d.jsx(ze, {}),
917
- "range-error": /* @__PURE__ */ d.jsx(ze, {}),
918
- "sheet-error": /* @__PURE__ */ d.jsx(mt, {})
919
- }, xe = () => {
920
- const t = b($), e = b(w), n = b(F), r = b(Ot), i = b(de), s = Wn(t.currentPopup$, t.currentPopup), o = b(B);
921
- if (!s)
740
+ }, vr = "univer-cell-link", _r = "univer-cell-link-type", yr = "univer-cell-link-content", Cr = "univer-cell-link-content-error", Sr = "univer-cell-link-url", Lr = "univer-cell-link-operations", Ir = "univer-cell-link-operation", kr = "univer-cell-link-operation-error", w = {
741
+ cellLink: vr,
742
+ cellLinkType: _r,
743
+ cellLinkContent: yr,
744
+ cellLinkContentError: Cr,
745
+ cellLinkUrl: Sr,
746
+ cellLinkOperations: Lr,
747
+ cellLinkOperation: Ir,
748
+ cellLinkOperationError: kr
749
+ }, br = {
750
+ outer: /* @__PURE__ */ u.jsx(Oe, {}),
751
+ link: /* @__PURE__ */ u.jsx(Oe, {}),
752
+ sheet: /* @__PURE__ */ u.jsx(Ye, {}),
753
+ range: /* @__PURE__ */ u.jsx(ye, {}),
754
+ defineName: /* @__PURE__ */ u.jsx(ye, {}),
755
+ "range-error": /* @__PURE__ */ u.jsx(ye, {}),
756
+ "sheet-error": /* @__PURE__ */ u.jsx(Ye, {})
757
+ }, Me = () => {
758
+ const e = k(H), t = k(T), n = k(W), i = k(Ot), r = k(ue), o = Rn(e.currentPopup$, e.currentPopup), s = k(F);
759
+ if (!o)
922
760
  return null;
923
- const { unitId: c, subUnitId: a, id: p } = s, h = e.getHyperLink(c, a, p);
761
+ const { unitId: c, subUnitId: a, id: p } = o, h = t.getHyperLink(c, a, p);
924
762
  if (!h)
925
763
  return null;
926
- const _ = o.parseHyperLink(h.payload), l = _.type.indexOf("error") > -1;
927
- return /* @__PURE__ */ d.jsxs("div", { className: E.cellLink, onClick: () => t.hideCurrentPopup(), children: [
928
- /* @__PURE__ */ d.jsxs("div", { className: gt(E.cellLinkContent, { [E.cellLinkContentError]: l }), onClick: _.handler, children: [
929
- /* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children: $r[_.type] }),
930
- /* @__PURE__ */ d.jsx("div", { className: E.cellLinkUrl, children: _.name })
764
+ const f = s.parseHyperLink(h.payload), l = f.type.indexOf("error") > -1;
765
+ return /* @__PURE__ */ u.jsxs("div", { className: w.cellLink, onClick: () => e.hideCurrentPopup(), children: [
766
+ /* @__PURE__ */ u.jsxs("div", { className: ht(w.cellLinkContent, { [w.cellLinkContentError]: l }), onClick: f.handler, children: [
767
+ /* @__PURE__ */ u.jsx("div", { className: w.cellLinkType, children: br[f.type] }),
768
+ /* @__PURE__ */ u.jsx("div", { className: w.cellLinkUrl, children: f.name })
931
769
  ] }),
932
- /* @__PURE__ */ d.jsxs("div", { className: E.cellLinkOperations, children: [
933
- /* @__PURE__ */ d.jsx(
770
+ /* @__PURE__ */ u.jsxs("div", { className: w.cellLinkOperations, children: [
771
+ /* @__PURE__ */ u.jsx(
934
772
  "div",
935
773
  {
936
- className: gt(E.cellLinkOperation, { [E.cellLinkOperationError]: l }),
774
+ className: ht(w.cellLinkOperation, { [w.cellLinkOperationError]: l }),
937
775
  onClick: () => {
938
776
  if (!l) {
939
- if (_.type !== "outer") {
940
- const f = new URL(window.location.href);
941
- f.hash = _.url.slice(1), navigator.clipboard.writeText(f.href);
777
+ if (f.type !== "outer") {
778
+ const g = new URL(window.location.href);
779
+ g.hash = f.url.slice(1), navigator.clipboard.writeText(g.href);
942
780
  } else
943
- navigator.clipboard.writeText(_.url);
944
- r.show({
945
- content: i.t("hyperLink.message.coped"),
946
- type: ie.Info
781
+ navigator.clipboard.writeText(f.url);
782
+ i.show({
783
+ content: r.t("hyperLink.message.coped"),
784
+ type: se.Info
947
785
  });
948
786
  }
949
787
  },
950
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(fr, {}) })
788
+ children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ u.jsx(At, {}) })
951
789
  }
952
790
  ),
953
- /* @__PURE__ */ d.jsx(
791
+ /* @__PURE__ */ u.jsx(
954
792
  "div",
955
793
  {
956
- className: E.cellLinkOperation,
794
+ className: w.cellLinkOperation,
957
795
  onClick: () => {
958
- n.executeCommand(ot.id, {
796
+ n.executeCommand(it.id, {
959
797
  unitId: c,
960
798
  subUnitId: a,
961
799
  row: h.row,
962
800
  column: h.column
963
801
  });
964
802
  },
965
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Cr, {}) })
803
+ children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ u.jsx(Dt, {}) })
966
804
  }
967
805
  ),
968
- /* @__PURE__ */ d.jsx(
806
+ /* @__PURE__ */ u.jsx(
969
807
  "div",
970
808
  {
971
- className: E.cellLinkOperation,
809
+ className: w.cellLinkOperation,
972
810
  onClick: () => {
973
- n.executeCommand(_n.id, {
811
+ n.executeCommand(ln.id, {
974
812
  unitId: c,
975
813
  subUnitId: a,
976
814
  id: h.id
977
815
  });
978
816
  },
979
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(yr, {}) })
817
+ children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ u.jsx(Bt, {}) })
980
818
  }
981
819
  )
982
820
  ] })
983
821
  ] });
984
822
  };
985
- xe.componentKey = "univer.sheet.cell-link-popup";
986
- var Nr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Ar = (t, e, n, r) => {
987
- for (var i = r > 1 ? void 0 : r ? Dr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
988
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
989
- return r && i && Nr(e, n, i), i;
990
- }, ft = (t, e) => (n, r) => e(n, r, t);
991
- let $ = class {
992
- constructor(t, e) {
993
- H(this, "_currentPopup", null);
994
- H(this, "_currentPopup$", new Nn());
995
- H(this, "currentPopup$", this._currentPopup$.asObservable());
996
- H(this, "_currentEditing$", new Dn(null));
997
- H(this, "currentEditing$", this._currentEditing$.asObservable());
998
- this._hyperLinkModel = t, this._sheetCanvasPopManagerService = e;
823
+ Me.componentKey = "univer.sheet.cell-link-popup";
824
+ var Rr = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Or = (e, t, n, i) => {
825
+ for (var r = i > 1 ? void 0 : i ? Pr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
826
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
827
+ return i && r && Rr(t, n, r), r;
828
+ }, ft = (e, t) => (n, i) => t(n, i, e);
829
+ const wr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
830
+ let H = class extends O {
831
+ constructor(t, n) {
832
+ super();
833
+ V(this, "_currentPopup", null);
834
+ V(this, "_currentPopup$", new Cn());
835
+ V(this, "currentPopup$", this._currentPopup$.asObservable());
836
+ V(this, "_currentEditing$", new Sn(null));
837
+ V(this, "currentEditing$", this._currentEditing$.asObservable());
838
+ this._hyperLinkModel = t, this._sheetCanvasPopManagerService = n, this.disposeWithMe(() => {
839
+ this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
840
+ });
999
841
  }
1000
842
  get currentPopup() {
1001
843
  return this._currentPopup;
@@ -1004,20 +846,24 @@ let $ = class {
1004
846
  return this._currentEditing$.getValue();
1005
847
  }
1006
848
  showPopup(t) {
849
+ if (this._currentPopup && wr(t, this._currentPopup))
850
+ return;
1007
851
  this.hideCurrentPopup();
1008
- const { unitId: e, subUnitId: n, row: r, col: i } = t, s = this._hyperLinkModel.getHyperLinkByLocation(e, n, r, i);
852
+ const { unitId: n, subUnitId: i, row: r, col: o } = t, s = this._hyperLinkModel.getHyperLinkByLocation(n, i, r, o);
1009
853
  if (!s)
1010
854
  return;
1011
- const o = this._sheetCanvasPopManagerService.attachPopupToCell(r, i, {
1012
- componentKey: xe.componentKey,
855
+ const c = this._sheetCanvasPopManagerService.attachPopupToCell(r, o, {
856
+ componentKey: Me.componentKey,
1013
857
  direction: "bottom",
1014
858
  closeOnSelfTarget: !0
1015
859
  });
1016
- o && (this._currentPopup = {
1017
- unitId: e,
1018
- subUnitId: n,
860
+ c && (this._currentPopup = {
861
+ unitId: n,
862
+ subUnitId: i,
1019
863
  id: s.id,
1020
- disposable: o
864
+ disposable: c,
865
+ row: r,
866
+ col: o
1021
867
  }, this._currentPopup$.next(this._currentPopup));
1022
868
  }
1023
869
  hideCurrentPopup() {
@@ -1031,34 +877,34 @@ let $ = class {
1031
877
  this._currentEditing$.next(null);
1032
878
  }
1033
879
  };
1034
- $ = Ar([
1035
- ft(0, g(w)),
1036
- ft(1, g(Cn))
1037
- ], $);
1038
- var Br = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Fr = (t, e, n, r) => {
1039
- for (var i = r > 1 ? void 0 : r ? Vr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1040
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1041
- return r && i && Br(e, n, i), i;
1042
- }, re = (t, e) => (n, r) => e(n, r, t);
1043
- let Se = class extends O {
1044
- constructor(t, e, n, r, i) {
1045
- super(), this._sheetInterceptorService = t, this._injector = e, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._initCommandInterceptor();
880
+ H = Or([
881
+ ft(0, m(T)),
882
+ ft(1, m(un))
883
+ ], H);
884
+ var Er = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, xr = (e, t, n, i) => {
885
+ for (var r = i > 1 ? void 0 : i ? Mr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
886
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
887
+ return i && r && Er(t, n, r), r;
888
+ }, oe = (e, t) => (n, i) => t(n, i, e);
889
+ let Ce = class extends O {
890
+ constructor(e, t, n, i, r) {
891
+ super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = i, this._univerInstanceService = r, this._initCommandInterceptor();
1046
892
  }
1047
893
  _initCommandInterceptor() {
1048
894
  this._initAddHyperLinkCommandInterceptor(), this._initSetRangeValuesCommandInterceptor(), this._initUpdateHyperLinkCommandInterceptor(), this._initClearSelectionCommandInterceptor();
1049
895
  }
1050
896
  _initAddHyperLinkCommandInterceptor() {
1051
897
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1052
- getMutations: (t) => {
1053
- if (t.id === it.id) {
1054
- const e = t.params, { unitId: n, subUnitId: r, link: i } = e, s = {
898
+ getMutations: (e) => {
899
+ if (e.id === It.id) {
900
+ const t = e.params, { unitId: n, subUnitId: i, link: r } = t, o = {
1055
901
  unitId: n,
1056
- subUnitId: r,
902
+ subUnitId: i,
1057
903
  cellValue: {
1058
- [i.row]: {
1059
- [i.column]: {
1060
- v: i.display,
1061
- t: at.STRING,
904
+ [r.row]: {
905
+ [r.column]: {
906
+ v: r.display,
907
+ t: dt.STRING,
1062
908
  p: null
1063
909
  }
1064
910
  }
@@ -1066,12 +912,12 @@ let Se = class extends O {
1066
912
  };
1067
913
  return {
1068
914
  redos: [{
1069
- id: pe.id,
1070
- params: s
915
+ id: ge.id,
916
+ params: o
1071
917
  }],
1072
918
  undos: [{
1073
- id: pe.id,
1074
- params: lt(this._injector, s)
919
+ id: ge.id,
920
+ params: ut(this._injector, o)
1075
921
  }]
1076
922
  };
1077
923
  }
@@ -1084,18 +930,18 @@ let Se = class extends O {
1084
930
  }
1085
931
  _initUpdateHyperLinkCommandInterceptor() {
1086
932
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1087
- getMutations: (t) => {
1088
- if (t.id === It.id) {
1089
- const e = t.params, { unitId: n, subUnitId: r, id: i, payload: s } = e, o = this._hyperLinkModel.getHyperLink(n, r, i);
1090
- if (o && o.display !== s.display) {
933
+ getMutations: (e) => {
934
+ if (e.id === Lt.id) {
935
+ const t = e.params, { unitId: n, subUnitId: i, id: r, payload: o } = t, s = this._hyperLinkModel.getHyperLink(n, i, r);
936
+ if (s && s.display !== o.display) {
1091
937
  const c = {
1092
938
  unitId: n,
1093
- subUnitId: r,
939
+ subUnitId: i,
1094
940
  cellValue: {
1095
- [o.row]: {
1096
- [o.column]: {
1097
- v: s.display,
1098
- t: at.STRING,
941
+ [s.row]: {
942
+ [s.column]: {
943
+ v: o.display,
944
+ t: dt.STRING,
1099
945
  p: null
1100
946
  }
1101
947
  }
@@ -1103,12 +949,12 @@ let Se = class extends O {
1103
949
  };
1104
950
  return {
1105
951
  redos: [{
1106
- id: pe.id,
952
+ id: ge.id,
1107
953
  params: c
1108
954
  }],
1109
955
  undos: [{
1110
- id: pe.id,
1111
- params: lt(this._injector, c)
956
+ id: ge.id,
957
+ params: ut(this._injector, c)
1112
958
  }]
1113
959
  };
1114
960
  }
@@ -1120,87 +966,59 @@ let Se = class extends O {
1120
966
  }
1121
967
  }));
1122
968
  }
1123
- // eslint-disable-next-line max-lines-per-function
1124
969
  _initSetRangeValuesCommandInterceptor() {
1125
970
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1126
- // eslint-disable-next-line max-lines-per-function
1127
- getMutations: (t) => {
1128
- if (t.id === hn.id) {
1129
- const e = t.params, { unitId: n, subUnitId: r } = e, i = [], s = [];
1130
- return e.cellValue && new St(e.cellValue).forValue((o, c, a) => {
1131
- var f, L, y, S;
1132
- const p = ((S = (y = a == null ? void 0 : a.v) != null ? y : (L = (f = a == null ? void 0 : a.p) == null ? void 0 : f.body) == null ? void 0 : L.dataStream.slice(0, -2)) != null ? S : "").toString(), h = this._hyperLinkModel.getHyperLinkByLocation(n, r, o, c);
1133
- if (!h) {
1134
- if (le(p)) {
1135
- const I = ae.generateRandomId();
1136
- s.push({
1137
- id: x.id,
971
+ getMutations: (e) => {
972
+ if (e.id === sn.id) {
973
+ const t = e.params, { unitId: n, subUnitId: i } = t, r = [], o = [];
974
+ return t.cellValue && new yt(t.cellValue).forValue((s, c, a) => {
975
+ var l, g, S;
976
+ const p = (S = a == null ? void 0 : a.v) != null ? S : (g = (l = a == null ? void 0 : a.p) == null ? void 0 : l.body) == null ? void 0 : g.dataStream.slice(0, -2), h = (p != null ? p : "").toString(), f = this._hyperLinkModel.getHyperLinkByLocation(n, i, s, c);
977
+ if (!f) {
978
+ if (le(h)) {
979
+ const v = ce.generateRandomId();
980
+ o.push({
981
+ id: M.id,
1138
982
  params: {
1139
983
  unitId: n,
1140
- subUnitId: r,
1141
- id: I
984
+ subUnitId: i,
985
+ id: v
1142
986
  }
1143
- }), i.push({
1144
- id: j.id,
987
+ }), r.push({
988
+ id: x.id,
1145
989
  params: {
1146
990
  unitId: n,
1147
- subUnitId: r,
991
+ subUnitId: i,
1148
992
  link: {
1149
- id: I,
1150
- row: o,
993
+ id: v,
994
+ row: s,
1151
995
  column: c,
1152
- display: p,
1153
- payload: Zt(p)
996
+ display: h,
997
+ payload: rt(h)
1154
998
  }
1155
999
  }
1156
1000
  });
1157
1001
  }
1158
1002
  return;
1159
1003
  }
1160
- if (h.display === p)
1161
- return;
1162
- p || (i.push({
1163
- id: x.id,
1004
+ p === "" && (r.push({
1005
+ id: M.id,
1164
1006
  params: {
1165
1007
  unitId: n,
1166
- subUnitId: r,
1167
- id: h.id
1008
+ subUnitId: i,
1009
+ id: f.id
1168
1010
  }
1169
- }), s.push({
1170
- id: j.id,
1011
+ }), o.push({
1012
+ id: x.id,
1171
1013
  params: {
1172
1014
  unitId: n,
1173
- subUnitId: r,
1174
- link: h
1015
+ subUnitId: i,
1016
+ link: f
1175
1017
  }
1176
1018
  }));
1177
- const _ = {
1178
- unitId: n,
1179
- subUnitId: r,
1180
- id: h.id,
1181
- payload: {
1182
- payload: h.payload,
1183
- display: p
1184
- }
1185
- }, l = {
1186
- unitId: n,
1187
- subUnitId: r,
1188
- id: h.id,
1189
- payload: {
1190
- payload: h.payload,
1191
- display: h.display
1192
- }
1193
- };
1194
- i.push({
1195
- id: Oe.id,
1196
- params: _
1197
- }), s.push({
1198
- id: Oe.id,
1199
- params: l
1200
- });
1201
1019
  }), {
1202
- undos: s,
1203
- redos: i
1020
+ undos: o,
1021
+ redos: r
1204
1022
  };
1205
1023
  }
1206
1024
  return {
@@ -1212,32 +1030,32 @@ let Se = class extends O {
1212
1030
  }
1213
1031
  _initClearSelectionCommandInterceptor() {
1214
1032
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1215
- getMutations: (t) => {
1216
- if (t.id === gn.id || t.id === mn.id) {
1217
- const e = [], n = [], r = this._selectionManagerService.getFirst(), i = Ct(this._univerInstanceService);
1218
- if (r && i) {
1219
- const { unitId: s, subUnitId: o } = i;
1220
- qe.foreach(r.range, (c, a) => {
1221
- const p = this._hyperLinkModel.getHyperLinkByLocation(s, o, c, a);
1222
- p && (e.push({
1223
- id: x.id,
1033
+ getMutations: (e) => {
1034
+ if (e.id === an.id || e.id === cn.id) {
1035
+ const t = [], n = [], i = this._selectionManagerService.getFirst(), r = Ct(this._univerInstanceService);
1036
+ if (i && r) {
1037
+ const { unitId: o, subUnitId: s } = r;
1038
+ Ge.foreach(i.range, (c, a) => {
1039
+ const p = this._hyperLinkModel.getHyperLinkByLocation(o, s, c, a);
1040
+ p && (t.push({
1041
+ id: M.id,
1224
1042
  params: {
1225
- unitId: s,
1226
- subUnitId: o,
1043
+ unitId: o,
1044
+ subUnitId: s,
1227
1045
  id: p.id
1228
1046
  }
1229
1047
  }), n.push({
1230
- id: j.id,
1048
+ id: x.id,
1231
1049
  params: {
1232
- unitId: s,
1233
- subUnitId: o,
1050
+ unitId: o,
1051
+ subUnitId: s,
1234
1052
  link: p
1235
1053
  }
1236
1054
  }));
1237
1055
  });
1238
1056
  }
1239
1057
  return {
1240
- redos: e,
1058
+ redos: t,
1241
1059
  undos: n
1242
1060
  };
1243
1061
  }
@@ -1249,476 +1067,480 @@ let Se = class extends O {
1249
1067
  }));
1250
1068
  }
1251
1069
  };
1252
- Se = Fr([
1253
- T(U.Starting, Se),
1254
- re(0, g(Je)),
1255
- re(1, g(Ue)),
1256
- re(2, g(w)),
1257
- re(3, g(Lt)),
1258
- re(4, J)
1259
- ], Se);
1260
- var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (t, e, n, r) => {
1261
- for (var i = r > 1 ? void 0 : r ? Zr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1262
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1263
- return r && i && Wr(e, n, i), i;
1264
- }, _t = (t, e) => (n, r) => e(n, r, t);
1265
- let Ce = class extends O {
1266
- constructor(t, e) {
1267
- super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._initHoverListener();
1070
+ Ce = xr([
1071
+ N($.Starting, Ce),
1072
+ oe(0, m(qe)),
1073
+ oe(1, m(Ue)),
1074
+ oe(2, m(T)),
1075
+ oe(3, m(St)),
1076
+ oe(4, de)
1077
+ ], Ce);
1078
+ var Tr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, jr = (e, t, n, i) => {
1079
+ for (var r = i > 1 ? void 0 : i ? Ur(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1080
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1081
+ return i && r && Tr(t, n, r), r;
1082
+ }, Ve = (e, t) => (n, i) => t(n, i, e);
1083
+ let Se = class extends O {
1084
+ constructor(e, t, n) {
1085
+ super(), this._hoverManagerService = e, this._sheetsHyperLinkPopupService = t, this._renderManagerService = n, this._initHoverListener();
1268
1086
  }
1269
1087
  _initHoverListener() {
1270
1088
  this.disposeWithMe(
1271
- this._hoverManagerService.currentCell$.pipe(An(100)).subscribe((t) => {
1272
- if (!t) {
1089
+ this._hoverManagerService.currentCell$.pipe(Ln(100)).subscribe((e) => {
1090
+ var s, c;
1091
+ if (!e) {
1273
1092
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1274
1093
  return;
1275
1094
  }
1276
- this._sheetsHyperLinkPopupService.showPopup(t.location);
1095
+ const t = (c = (s = this._renderManagerService.getRenderById(e.location.unitId)) == null ? void 0 : s.with(kt).getUnitSkeleton(e.location.unitId, e.location.subUnitId)) == null ? void 0 : c.skeleton, n = e.location.col, i = e.location.row;
1096
+ let r = i, o = n;
1097
+ t && t.overflowCache.forValue((a, p, h) => {
1098
+ ee.contains(h, { startColumn: n, endColumn: n, startRow: i, endRow: i }) && (r = a, o = p);
1099
+ }), this._sheetsHyperLinkPopupService.showPopup({
1100
+ ...e.location,
1101
+ row: r,
1102
+ col: o
1103
+ });
1277
1104
  })
1278
1105
  );
1279
1106
  }
1280
1107
  };
1281
- Ce = zr([
1282
- T(U.Rendered, Ce),
1283
- _t(0, g(Ln)),
1284
- _t(1, g($))
1285
- ], Ce);
1286
- const Kr = (t) => ({
1287
- id: $e.id,
1108
+ Se = jr([
1109
+ N($.Rendered, Se),
1110
+ Ve(0, m(pn)),
1111
+ Ve(1, m(H)),
1112
+ Ve(2, m(nt))
1113
+ ], Se);
1114
+ const Hr = (e) => ({
1115
+ id: ot.id,
1288
1116
  type: Et.BUTTON,
1289
1117
  positions: [Mt.CONTEXT_MENU],
1290
1118
  title: "hyperLink.menu.add",
1291
- hidden$: xt(t, M.UNIVER_SHEET),
1119
+ hidden$: xt(e, E.UNIVER_SHEET),
1292
1120
  icon: "LinkSingle",
1293
- disabled$: Pt(t, { workbookTypes: [Qe], worksheetTypes: [et, tt, nt], rangeTypes: [rt] })
1294
- }), Yr = (t) => ({
1121
+ disabled$: Rt(e, { workbookTypes: [Xe], worksheetTypes: [Je, Qe, et], rangeTypes: [tt] })
1122
+ }), Nr = (e) => ({
1295
1123
  tooltip: "hyperLink.form.addTitle",
1296
1124
  positions: Mt.TOOLBAR_START,
1297
- group: Tn.TOOLBAR_OTHERS,
1298
- id: zt.id,
1125
+ group: xn.TOOLBAR_OTHERS,
1126
+ id: st.id,
1299
1127
  type: Et.BUTTON,
1300
1128
  icon: "LinkSingle",
1301
- hidden$: xt(t, M.UNIVER_SHEET),
1302
- disabled$: Pt(t, { workbookTypes: [Qe], worksheetTypes: [et, tt, nt], rangeTypes: [rt] })
1303
- }), Kt = {
1304
- id: $e.id,
1305
- binding: xn.K | jn.CTRL_COMMAND,
1306
- preconditions: In
1129
+ hidden$: xt(e, E.UNIVER_SHEET),
1130
+ disabled$: Rt(e, { workbookTypes: [Xe], worksheetTypes: [Je, Qe, et], rangeTypes: [tt] })
1131
+ }), Vt = {
1132
+ id: st.id,
1133
+ binding: En.K | Mn.CTRL_COMMAND,
1134
+ preconditions: hn
1307
1135
  };
1308
- var Gr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, qr = (t, e, n, r) => {
1309
- for (var i = r > 1 ? void 0 : r ? Xr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1310
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1311
- return r && i && Gr(e, n, i), i;
1312
- }, X = (t, e) => (n, r) => e(n, r, t);
1313
- let se = class extends O {
1314
- constructor(t, e, n, r, i, s, o) {
1315
- super(), this._config = t, this._componentManager = e, this._commandService = n, this._localeService = r, this._menuService = i, this._injector = s, this._shortcutService = o, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1136
+ var $r = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Br = (e, t, n, i) => {
1137
+ for (var r = i > 1 ? void 0 : i ? Ar(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1138
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1139
+ return i && r && $r(t, n, r), r;
1140
+ }, J = (e, t) => (n, i) => t(n, i, e);
1141
+ let ae = class extends O {
1142
+ constructor(e, t, n, i, r, o, s) {
1143
+ super(), this._config = e, this._componentManager = t, this._commandService = n, this._localeService = i, this._menuService = r, this._injector = o, this._shortcutService = s, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1316
1144
  }
1317
1145
  _initComponents() {
1318
1146
  [
1319
- [xe, xe.componentKey],
1320
- [Ee, Ee.componentKey],
1321
- [we, "LinkSingle"]
1322
- ].forEach(([t, e]) => {
1323
- this._componentManager.register(e, t);
1147
+ [Me, Me.componentKey],
1148
+ [we, we.componentKey],
1149
+ [Oe, "LinkSingle"]
1150
+ ].forEach(([e, t]) => {
1151
+ this._componentManager.register(t, e);
1324
1152
  });
1325
1153
  }
1326
1154
  _initCommands() {
1327
1155
  [
1156
+ it,
1157
+ Ee,
1328
1158
  ot,
1329
- Me,
1330
- $e,
1331
- zt
1332
- ].forEach((t) => {
1333
- this._commandService.registerCommand(t);
1159
+ st
1160
+ ].forEach((e) => {
1161
+ this._commandService.registerCommand(e);
1334
1162
  });
1335
1163
  }
1336
1164
  _initMenus() {
1337
- var t, e, n, r;
1338
- this._menuService.addMenuItem(Kr(this._injector), (e = (t = this._config) == null ? void 0 : t.menu) != null ? e : {}), this._menuService.addMenuItem(Yr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
1165
+ var e, t, n, i;
1166
+ this._menuService.addMenuItem(Hr(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Nr(this._injector), (i = (n = this._config) == null ? void 0 : n.menu) != null ? i : {});
1339
1167
  }
1340
1168
  _initShortCut() {
1341
- this._shortcutService.registerShortcut(Kt);
1169
+ this._shortcutService.registerShortcut(Vt);
1342
1170
  }
1343
1171
  };
1344
- se = qr([
1345
- T(U.Ready, se),
1346
- X(1, g(Un)),
1347
- X(2, F),
1348
- X(3, g(de)),
1349
- X(4, $n),
1350
- X(5, g(Ue)),
1351
- X(6, g(Hn))
1352
- ], se);
1353
- var Jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, ei = (t, e, n, r) => {
1354
- for (var i = r > 1 ? void 0 : r ? Qr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1355
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1356
- return r && i && Jr(e, n, i), i;
1357
- }, vt = (t, e) => (n, r) => e(n, r, t);
1172
+ ae = Br([
1173
+ N($.Ready, ae),
1174
+ J(1, m(Tn)),
1175
+ J(2, W),
1176
+ J(3, m(ue)),
1177
+ J(4, jn),
1178
+ J(5, m(Ue)),
1179
+ J(6, m(Un))
1180
+ ], ae);
1181
+ const at = "SHEET_HYPER_LINK_UI_PLUGIN";
1182
+ var Dr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Fr = (e, t, n, i) => {
1183
+ for (var r = i > 1 ? void 0 : i ? Vr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1184
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1185
+ return i && r && Dr(t, n, r), r;
1186
+ }, vt = (e, t) => (n, i) => t(n, i, e);
1358
1187
  let Le = class extends O {
1359
- constructor(t, e) {
1360
- super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1188
+ constructor(e, t) {
1189
+ super(), this._autoFillService = e, this._hyperLinkModel = t, this._initAutoFill();
1361
1190
  }
1362
1191
  // eslint-disable-next-line max-lines-per-function
1363
1192
  _initAutoFill() {
1364
- const t = () => ({ redos: [], undos: [] }), e = (r, i) => {
1365
- const { source: s, target: o, unitId: c, subUnitId: a } = r, p = Ye([s, o]), [h, _] = p.ranges, { mapFunc: l } = p, f = {
1193
+ const e = () => ({ redos: [], undos: [] }), t = (i, r) => {
1194
+ const { source: o, target: s, unitId: c, subUnitId: a } = i, p = ze([o, s]), [h, f] = p.ranges, { mapFunc: l } = p, g = {
1366
1195
  row: h.startRow,
1367
1196
  col: h.startColumn
1368
- }, L = bn(h, _), y = [], S = [];
1369
- return L.forEach((I) => {
1370
- const v = I.repeatStartCell, K = I.relativeRange, N = {
1371
- startRow: f.row,
1372
- startColumn: f.col,
1373
- endColumn: f.col,
1374
- endRow: f.row
1375
- }, R = {
1376
- startRow: v.row,
1377
- startColumn: v.col,
1378
- endColumn: v.col,
1379
- endRow: v.row
1197
+ }, S = gn(h, f), v = [], I = [];
1198
+ return S.forEach((D) => {
1199
+ const C = D.repeatStartCell, Y = D.relativeRange, A = {
1200
+ startRow: g.row,
1201
+ startColumn: g.col,
1202
+ endColumn: g.col,
1203
+ endRow: g.row
1204
+ }, b = {
1205
+ startRow: C.row,
1206
+ startColumn: C.col,
1207
+ endColumn: C.col,
1208
+ endRow: C.row
1380
1209
  };
1381
- qe.foreach(K, (Y, V) => {
1382
- const Q = oe.getPositionRange(
1210
+ Ge.foreach(Y, (G, B) => {
1211
+ const q = ee.getPositionRange(
1383
1212
  {
1384
- startRow: Y,
1385
- startColumn: V,
1386
- endColumn: V,
1387
- endRow: Y
1213
+ startRow: G,
1214
+ startColumn: B,
1215
+ endColumn: B,
1216
+ endRow: G
1388
1217
  },
1389
- N
1390
- ), { row: ue, col: Ne } = l(Q.startRow, Q.startColumn), ee = this._hyperLinkModel.getHyperLinkByLocation(c, a, ue, Ne);
1391
- if (ee) {
1392
- const u = oe.getPositionRange(
1218
+ A
1219
+ ), { row: pe, col: He } = l(q.startRow, q.startColumn), he = this._hyperLinkModel.getHyperLinkByLocation(c, a, pe, He);
1220
+ if (he) {
1221
+ const te = ee.getPositionRange(
1393
1222
  {
1394
- startRow: Y,
1395
- startColumn: V,
1396
- endColumn: V,
1397
- endRow: Y
1223
+ startRow: G,
1224
+ startColumn: B,
1225
+ endColumn: B,
1226
+ endRow: G
1398
1227
  },
1399
- R
1400
- ), { row: m, col: C } = l(u.startRow, u.startColumn), k = ae.generateRandomId(), D = this._hyperLinkModel.getHyperLinkByLocation(c, a, m, C);
1401
- D && y.push({
1402
- id: x.id,
1228
+ b
1229
+ ), { row: d, col: _ } = l(te.startRow, te.startColumn), L = ce.generateRandomId(), y = this._hyperLinkModel.getHyperLinkByLocation(c, a, d, _);
1230
+ y && v.push({
1231
+ id: M.id,
1403
1232
  params: {
1404
1233
  unitId: c,
1405
1234
  subUnitId: a,
1406
- id: D.id
1235
+ id: y.id
1407
1236
  }
1408
- }), he.COPY === i && (y.push({
1409
- id: j.id,
1237
+ }), (ne.COPY === r || ne.SERIES === r) && (v.push({
1238
+ id: x.id,
1410
1239
  params: {
1411
1240
  unitId: c,
1412
1241
  subUnitId: a,
1413
1242
  link: {
1414
- ...ee,
1415
- id: k,
1416
- row: m,
1417
- column: C
1243
+ ...he,
1244
+ id: L,
1245
+ row: d,
1246
+ column: _
1418
1247
  }
1419
1248
  }
1420
- }), S.push({
1421
- id: x.id,
1249
+ }), I.push({
1250
+ id: M.id,
1422
1251
  params: {
1423
1252
  unitId: c,
1424
1253
  subUnitId: a,
1425
- id: k
1254
+ id: L
1426
1255
  }
1427
- })), D && S.push({
1428
- id: j.id,
1256
+ })), y && I.push({
1257
+ id: x.id,
1429
1258
  params: {
1430
1259
  unitId: c,
1431
1260
  subUnitId: a,
1432
- link: D
1261
+ link: y
1433
1262
  }
1434
1263
  });
1435
1264
  }
1436
1265
  });
1437
1266
  }), {
1438
- undos: S,
1439
- redos: y
1267
+ undos: I,
1268
+ redos: v
1440
1269
  };
1441
1270
  }, n = {
1442
- id: st,
1443
- onFillData: (r, i, s) => s === he.COPY || s === he.ONLY_FORMAT || s === he.SERIES ? e(r, s) : t()
1271
+ id: at,
1272
+ onFillData: (i, r, o) => o === ne.COPY || o === ne.ONLY_FORMAT || o === ne.SERIES ? t(i, o) : e()
1444
1273
  };
1445
1274
  this.disposeWithMe(this._autoFillService.addHook(n));
1446
1275
  }
1447
1276
  };
1448
- Le = ei([
1449
- T(U.Ready, Le),
1450
- vt(0, kn),
1451
- vt(1, g(w))
1277
+ Le = Fr([
1278
+ N($.Ready, Le),
1279
+ vt(0, mn),
1280
+ vt(1, m(T))
1452
1281
  ], Le);
1453
- var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (t, e, n, r) => {
1454
- for (var i = r > 1 ? void 0 : r ? ni(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1455
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1456
- return r && i && ti(e, n, i), i;
1457
- }, me = (t, e) => (n, r) => e(n, r, t);
1282
+ var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (e, t, n, i) => {
1283
+ for (var r = i > 1 ? void 0 : i ? Zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1284
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1285
+ return i && r && Wr(t, n, r), r;
1286
+ }, fe = (e, t) => (n, i) => t(n, i, e);
1458
1287
  let Ie = class extends O {
1459
- constructor(e, n, r, i) {
1288
+ constructor(t, n, i, r) {
1460
1289
  super();
1461
- H(this, "_copyInfo");
1462
- this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = r, this._resolverService = i, this._initCopyPaste();
1290
+ V(this, "_copyInfo");
1291
+ this._sheetClipboardService = t, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste();
1463
1292
  }
1464
- // eslint-disable-next-line max-lines-per-function
1465
1293
  _initCopyPaste() {
1466
1294
  this._sheetClipboardService.addClipboardHook({
1467
- id: st,
1468
- onBeforeCopy: (e, n, r) => this._collect(e, n, r),
1469
- onPasteCells: (e, n, r, i) => {
1470
- const { copyType: s = ht.COPY, pasteType: o } = i, { range: c } = e || {}, { range: a, unitId: p, subUnitId: h } = n;
1471
- return this._generateMutations(a, { copyType: s, pasteType: o, copyRange: c, unitId: p, subUnitId: h });
1295
+ id: at,
1296
+ onBeforeCopy: (t, n, i) => this._collect(t, n, i),
1297
+ onPasteCells: (t, n, i, r) => {
1298
+ const { copyType: o = pt.COPY, pasteType: s } = r, { range: c } = t || {}, { range: a, unitId: p, subUnitId: h } = n;
1299
+ return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: h });
1472
1300
  },
1473
- onPastePlainText: (e, n) => {
1301
+ onPastePlainText: (t, n) => {
1474
1302
  if (le(n)) {
1475
- let r = Zt(n);
1476
- const i = new URL(r), s = n;
1477
- i.hostname === location.hostname && i.port === location.port && i.protocol === location.protocol && i.pathname === location.pathname && i.hash && (r = i.hash);
1478
- const { range: o, unitId: c, subUnitId: a } = e, { ranges: [p], mapFunc: h } = Ye([o]), _ = [], l = [];
1479
- return qe.foreach(p, (f, L) => {
1480
- const { row: y, col: S } = h(f, L), I = this._hyperLinkModel.getHyperLinkByLocation(c, a, y, S);
1481
- I && _.push({
1482
- id: x.id,
1303
+ const i = rt(n), { range: r, unitId: o, subUnitId: s } = t, { ranges: [c], mapFunc: a } = ze([r]), p = [], h = [];
1304
+ return Ge.foreach(c, (f, l) => {
1305
+ const { row: g, col: S } = a(f, l), v = this._hyperLinkModel.getHyperLinkByLocation(o, s, g, S);
1306
+ v && p.push({
1307
+ id: M.id,
1483
1308
  params: {
1484
- unitId: c,
1485
- subUnitId: a,
1486
- id: I.id
1309
+ unitId: o,
1310
+ subUnitId: s,
1311
+ id: v.id
1487
1312
  }
1488
1313
  });
1489
- const v = ae.generateRandomId();
1490
- _.push({
1491
- id: j.id,
1314
+ const I = ce.generateRandomId();
1315
+ p.push({
1316
+ id: x.id,
1492
1317
  params: {
1493
- unitId: c,
1494
- subUnitId: a,
1318
+ unitId: o,
1319
+ subUnitId: s,
1495
1320
  link: {
1496
- id: v,
1497
- row: y,
1321
+ id: I,
1322
+ row: g,
1498
1323
  column: S,
1499
- display: s,
1500
- payload: r
1324
+ payload: i
1501
1325
  }
1502
1326
  }
1503
- }), l.push({
1504
- id: x.id,
1327
+ }), h.push({
1328
+ id: M.id,
1505
1329
  params: {
1506
- unitId: c,
1507
- subUnitId: a,
1508
- id: v
1330
+ unitId: o,
1331
+ subUnitId: s,
1332
+ id: I
1509
1333
  }
1510
- }), I && l.push({
1511
- id: j.id,
1334
+ }), v && h.push({
1335
+ id: x.id,
1512
1336
  params: {
1513
- unitId: c,
1514
- subUnitId: a,
1515
- link: I
1337
+ unitId: o,
1338
+ subUnitId: s,
1339
+ link: v
1516
1340
  }
1517
1341
  });
1518
- }), { redos: _, undos: l };
1342
+ }), { redos: p, undos: h };
1519
1343
  }
1520
1344
  return { undos: [], redos: [] };
1521
1345
  }
1522
1346
  });
1523
1347
  }
1524
- _collect(e, n, r) {
1525
- const i = new St();
1348
+ _collect(t, n, i) {
1349
+ const r = new yt();
1526
1350
  this._copyInfo = {
1527
- unitId: e,
1351
+ unitId: t,
1528
1352
  subUnitId: n,
1529
- matrix: i
1353
+ matrix: r
1530
1354
  };
1531
- const s = {
1355
+ const o = {
1532
1356
  get: this._injector.get.bind(this._injector)
1533
- }, o = Rn(r, s, e, n);
1534
- if (!o)
1357
+ }, s = fn(i, o, t, n);
1358
+ if (!s)
1535
1359
  return;
1536
- const { rows: c, cols: a } = o;
1360
+ const { rows: c, cols: a } = s;
1537
1361
  c.forEach((p, h) => {
1538
- a.forEach((_, l) => {
1539
- var L;
1540
- const f = this._hyperLinkModel.getHyperLinkByLocation(e, n, p, _);
1541
- i.setValue(h, l, (L = f == null ? void 0 : f.id) != null ? L : "");
1362
+ a.forEach((f, l) => {
1363
+ var S;
1364
+ const g = this._hyperLinkModel.getHyperLinkByLocation(t, n, p, f);
1365
+ r.setValue(h, l, (S = g == null ? void 0 : g.id) != null ? S : "");
1542
1366
  });
1543
1367
  });
1544
1368
  }
1545
1369
  // eslint-disable-next-line max-lines-per-function
1546
- _generateMutations(e, n) {
1370
+ _generateMutations(t, n) {
1547
1371
  if (!this._copyInfo)
1548
1372
  return { redos: [], undos: [] };
1549
- if (n.copyType === ht.CUT)
1373
+ if (n.copyType === pt.CUT)
1550
1374
  return this._copyInfo = null, { redos: [], undos: [] };
1551
1375
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1552
1376
  return { redos: [], undos: [] };
1553
1377
  if ([
1554
- We.SPECIAL_PASTE_COL_WIDTH,
1555
- We.SPECIAL_PASTE_VALUE,
1556
- We.SPECIAL_PASTE_FORMAT,
1557
- Zn
1378
+ $e.SPECIAL_PASTE_COL_WIDTH,
1379
+ $e.SPECIAL_PASTE_VALUE,
1380
+ $e.SPECIAL_PASTE_FORMAT,
1381
+ $n
1558
1382
  ].includes(
1559
1383
  n.pasteType
1560
1384
  ))
1561
1385
  return { redos: [], undos: [] };
1562
- const { unitId: r, subUnitId: i } = this._copyInfo, s = [], o = [], { ranges: [c, a], mapFunc: p } = Ye([n.copyRange, e]);
1563
- return Pn(c, a, !0).forEach(({ startRange: _ }) => {
1386
+ const { unitId: i, subUnitId: r } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: p } = ze([n.copyRange, t]);
1387
+ return vn(c, a, !0).forEach(({ startRange: f }) => {
1564
1388
  var l;
1565
- (l = this._copyInfo) == null || l.matrix.forValue((f, L, y) => {
1566
- const S = oe.getPositionRange(
1389
+ (l = this._copyInfo) == null || l.matrix.forValue((g, S, v) => {
1390
+ const I = ee.getPositionRange(
1567
1391
  {
1568
- startRow: f,
1569
- endRow: f,
1570
- startColumn: L,
1571
- endColumn: L
1392
+ startRow: g,
1393
+ endRow: g,
1394
+ startColumn: S,
1395
+ endColumn: S
1572
1396
  },
1573
- _
1574
- ), I = this._hyperLinkModel.getHyperLink(r, i, y), { row: v, col: K } = p(S.startRow, S.startColumn), N = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, v, K), R = ae.generateRandomId();
1575
- N && s.push({
1576
- id: x.id,
1397
+ f
1398
+ ), D = this._hyperLinkModel.getHyperLink(i, r, v), { row: C, col: Y } = p(I.startRow, I.startColumn), A = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, C, Y), b = ce.generateRandomId();
1399
+ A && o.push({
1400
+ id: M.id,
1577
1401
  params: {
1578
1402
  unitId: n.unitId,
1579
1403
  subUnitId: n.subUnitId,
1580
- id: N.id
1404
+ id: A.id
1581
1405
  }
1582
- }), I && (s.push({
1583
- id: j.id,
1406
+ }), D && (o.push({
1407
+ id: x.id,
1584
1408
  params: {
1585
1409
  unitId: n.unitId,
1586
1410
  subUnitId: n.subUnitId,
1587
1411
  link: {
1588
- ...I,
1589
- id: R,
1590
- row: v,
1591
- column: K
1412
+ ...D,
1413
+ id: b,
1414
+ row: C,
1415
+ column: Y
1592
1416
  }
1593
1417
  }
1594
- }), o.push({
1595
- id: x.id,
1418
+ }), s.push({
1419
+ id: M.id,
1596
1420
  params: {
1597
1421
  unitId: n.unitId,
1598
1422
  subUnitId: n.subUnitId,
1599
- id: R
1423
+ id: b
1600
1424
  }
1601
- })), N && o.push({
1602
- id: j.id,
1425
+ })), A && s.push({
1426
+ id: x.id,
1603
1427
  params: {
1604
1428
  unitId: n.unitId,
1605
1429
  subUnitId: n.subUnitId,
1606
- link: N
1430
+ link: A
1607
1431
  }
1608
1432
  });
1609
1433
  });
1610
1434
  }), {
1611
- redos: s,
1612
- undos: o
1435
+ redos: o,
1436
+ undos: s
1613
1437
  };
1614
1438
  }
1615
1439
  };
1616
- Ie = ri([
1617
- T(U.Ready, Ie),
1618
- me(0, On),
1619
- me(1, g(w)),
1620
- me(2, g(Ue)),
1621
- me(3, g(B))
1440
+ Ie = zr([
1441
+ N($.Ready, Ie),
1442
+ fe(0, _n),
1443
+ fe(1, m(T)),
1444
+ fe(2, m(Ue)),
1445
+ fe(3, m(F))
1622
1446
  ], Ie);
1623
- var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, oi = (t, e, n, r) => {
1624
- for (var i = r > 1 ? void 0 : r ? si(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1625
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1626
- return r && i && ii(e, n, i), i;
1627
- }, ai = (t, e) => (n, r) => e(n, r, t);
1447
+ var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, i) => {
1448
+ for (var r = i > 1 ? void 0 : i ? Yr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1449
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1450
+ return i && r && Kr(t, n, r), r;
1451
+ }, qr = (e, t) => (n, i) => t(n, i, e);
1628
1452
  let ke = class extends O {
1629
- constructor(t) {
1630
- super(), this._resolverService = t, this._handleInitUrl();
1453
+ constructor(e) {
1454
+ super(), this._resolverService = e, this._handleInitUrl();
1631
1455
  }
1632
1456
  _handleInitUrl() {
1633
- const t = location.hash;
1634
- t && this._resolverService.parseHyperLink(t).handler();
1457
+ const e = location.hash;
1458
+ e && this._resolverService.parseHyperLink(e).handler();
1635
1459
  }
1636
1460
  };
1637
- ke = oi([
1638
- T(U.Rendered, ke),
1639
- ai(0, g(B))
1461
+ ke = Gr([
1462
+ N($.Rendered, ke),
1463
+ qr(0, m(F))
1640
1464
  ], ke);
1641
- var ci = Object.defineProperty, li = Object.getOwnPropertyDescriptor, di = (t, e, n, r) => {
1642
- for (var i = r > 1 ? void 0 : r ? li(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1643
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1644
- return r && i && ci(e, n, i), i;
1645
- }, Ke = (t, e) => (n, r) => e(n, r, t);
1465
+ var Xr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Qr = (e, t, n, i) => {
1466
+ for (var r = i > 1 ? void 0 : i ? Jr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1467
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1468
+ return i && r && Xr(t, n, r), r;
1469
+ }, Fe = (e, t) => (n, i) => t(n, i, e);
1646
1470
  let be = class extends O {
1647
- constructor(t, e, n) {
1648
- super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1471
+ constructor(e, t, n) {
1472
+ super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1649
1473
  }
1650
1474
  _commandExecutedListener() {
1651
1475
  this.disposeWithMe(
1652
- this._commandService.beforeCommandExecuted((t) => {
1653
- t.id === Kt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1654
- workbookTypes: [Qe],
1655
- rangeTypes: [rt],
1656
- worksheetTypes: [et, tt, nt]
1476
+ this._commandService.beforeCommandExecuted((e) => {
1477
+ e.id === Vt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1478
+ workbookTypes: [Xe],
1479
+ rangeTypes: [tt],
1480
+ worksheetTypes: [Je, Qe, et]
1657
1481
  }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
1658
1482
  })
1659
1483
  );
1660
1484
  }
1661
1485
  };
1662
- be = di([
1663
- T(U.Rendered, be),
1664
- Ke(0, g(de)),
1665
- Ke(1, F),
1666
- Ke(2, g(wn))
1486
+ be = Qr([
1487
+ N($.Rendered, be),
1488
+ Fe(0, m(ue)),
1489
+ Fe(1, W),
1490
+ Fe(2, m(yn))
1667
1491
  ], be);
1668
- var Yt = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, pi = (t, e, n) => e in t ? Yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, hi = (t, e, n, r) => {
1669
- for (var i = r > 1 ? void 0 : r ? ui(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1670
- (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1671
- return r && i && Yt(e, n, i), i;
1672
- }, yt = (t, e) => (n, r) => e(n, r, t), Gt = (t, e, n) => (pi(t, typeof e != "symbol" ? e + "" : e, n), n);
1673
- let je = class extends on {
1674
- constructor(t, e, n) {
1675
- super(), this._config = t, this._injector = e, this._renderManagerService = n;
1492
+ var Ft = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (e, t, n) => t in e ? Ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ni = (e, t, n, i) => {
1493
+ for (var r = i > 1 ? void 0 : i ? ei(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1494
+ (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1495
+ return i && r && Ft(t, n, r), r;
1496
+ }, _t = (e, t) => (n, i) => t(n, i, e), Wt = (e, t, n) => (ti(e, typeof t != "symbol" ? t + "" : t, n), n);
1497
+ let xe = class extends Qt {
1498
+ constructor(e, t, n) {
1499
+ super(), this._config = e, this._injector = t, this._renderManagerService = n;
1676
1500
  }
1677
- onStarting(t) {
1501
+ onStarting(e) {
1678
1502
  [
1679
- [B],
1680
- [$],
1681
- [_e],
1503
+ [F],
1504
+ [H],
1682
1505
  [ve],
1683
- [ye],
1684
- [Se],
1506
+ [_e],
1685
1507
  [Ce],
1508
+ [Se],
1686
1509
  [
1687
- se,
1510
+ ae,
1688
1511
  {
1689
- useFactory: () => this._injector.createInstance(se, this._config)
1512
+ useFactory: () => this._injector.createInstance(ae, this._config)
1690
1513
  }
1691
1514
  ],
1692
1515
  [Le],
1693
1516
  [Ie],
1694
1517
  [be],
1695
1518
  [ke]
1696
- ].forEach((n) => t.add(n)), this._renderManagerService.registerRenderController(M.UNIVER_SHEET, Xe);
1519
+ ].forEach((n) => e.add(n)), this._renderManagerService.registerRenderController(E.UNIVER_SHEET, Ke);
1697
1520
  }
1698
1521
  };
1699
- Gt(je, "pluginName", st);
1700
- Gt(je, "type", M.UNIVER_SHEET);
1701
- je = hi([
1702
- an(vn),
1703
- yt(1, g(Ue)),
1704
- yt(2, jt)
1705
- ], je);
1522
+ Wt(xe, "pluginName", at);
1523
+ Wt(xe, "type", E.UNIVER_SHEET);
1524
+ xe = ni([
1525
+ en(dn),
1526
+ _t(1, m(Ue)),
1527
+ _t(2, nt)
1528
+ ], xe);
1706
1529
  export {
1707
- Me as CloseHyperLinkSidebarOperation,
1708
- $e as InsertHyperLinkOperation,
1709
- Kt as InsertLinkShortcut,
1710
- ot as OpenHyperLinkSidebarOperation,
1711
- Se as SheetHyperLinkSetRangeController,
1530
+ Ee as CloseHyperLinkSidebarOperation,
1531
+ ot as InsertHyperLinkOperation,
1532
+ Vt as InsertLinkShortcut,
1533
+ it as OpenHyperLinkSidebarOperation,
1534
+ Ce as SheetHyperLinkSetRangeController,
1712
1535
  ke as SheetHyperLinkUrlController,
1713
1536
  Le as SheetsHyperLinkAutoFillController,
1714
1537
  Ie as SheetsHyperLinkCopyPasteController,
1715
- Ce as SheetsHyperLinkPopupController,
1716
- $ as SheetsHyperLinkPopupService,
1717
- ve as SheetsHyperLinkRefRangeController,
1718
- _e as SheetsHyperLinkRemoveSheetController,
1719
- Xe as SheetsHyperLinkRenderController,
1720
- ye as SheetsHyperLinkRenderManagerController,
1721
- B as SheetsHyperLinkResolverService,
1722
- se as SheetsHyperLinkUIController,
1723
- je as UniverSheetsHyperLinkUIPlugin
1538
+ Se as SheetsHyperLinkPopupController,
1539
+ H as SheetsHyperLinkPopupService,
1540
+ ve as SheetsHyperLinkRemoveSheetController,
1541
+ Ke as SheetsHyperLinkRenderController,
1542
+ _e as SheetsHyperLinkRenderManagerController,
1543
+ F as SheetsHyperLinkResolverService,
1544
+ ae as SheetsHyperLinkUIController,
1545
+ xe as UniverSheetsHyperLinkUIPlugin
1724
1546
  };