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