@univerjs-pro/sheets-shape-ui 0.15.5 → 0.16.0
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/README.md +30 -0
- package/lib/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -0
- package/lib/index.css +1 -0
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/command/set-shape-drawing-data-command.d.ts +13 -0
- package/lib/types/controllers/shape-sheet-change.controller.d.ts +12 -0
- package/lib/types/controllers/shape-text-editing.render-controller.d.ts +3 -3
- package/lib/types/controllers/shape-update.controller.d.ts +1 -0
- package/lib/types/controllers/sheet-basic-shape-connection.controller.d.ts +3 -3
- package/lib/types/controllers/sheet-shape-adjust-controller.d.ts +3 -3
- package/lib/types/controllers/sheet-shape-clipboard.controller.d.ts +20 -0
- package/lib/types/controllers/sheet-shape-command-interceptor.controller.d.ts +3 -3
- package/lib/types/controllers/sheet-shape-connector.controller.d.ts +3 -3
- package/lib/types/controllers/sheet-shape-render.controller.d.ts +3 -3
- package/lib/types/controllers/sheets-shape-ui.controller.d.ts +3 -3
- package/lib/types/facade/f-connector-shape.d.ts +180 -0
- package/lib/types/facade/f-enum.d.ts +194 -0
- package/lib/types/facade/f-shape.d.ts +642 -0
- package/lib/types/facade/f-worksheet.d.ts +231 -0
- package/lib/types/facade/index.d.ts +13 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/views/shape-text-editor/index.d.ts +1 -2
- package/lib/types/views/shape-text-editor/position-wrapper.d.ts +1 -2
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +26 -16
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { IShapeBuilderInfo, FShape } from './f-shape';
|
|
2
|
+
import { FWorksheet } from '@univerjs/sheets/facade';
|
|
3
|
+
import { FConnectorShape } from './f-connector-shape';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for connecting shapes via a connector.
|
|
6
|
+
*/
|
|
7
|
+
export interface IConnectShapesParams {
|
|
8
|
+
/** The connector/line shape to update. */
|
|
9
|
+
connector: FShape;
|
|
10
|
+
/** Optional start target. If provided, connects the connector's start to this shape's connection site. */
|
|
11
|
+
startTarget?: {
|
|
12
|
+
shape: FShape;
|
|
13
|
+
connectionSiteIndex: number;
|
|
14
|
+
};
|
|
15
|
+
/** Optional end target. If provided, connects the connector's end to this shape's connection site. */
|
|
16
|
+
endTarget?: {
|
|
17
|
+
shape: FShape;
|
|
18
|
+
connectionSiteIndex: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @ignore
|
|
23
|
+
*/
|
|
24
|
+
export interface IFWorksheetShapeMixin {
|
|
25
|
+
/**
|
|
26
|
+
* Adds a new shape to this sheet.
|
|
27
|
+
* @param {IShapeBuilderInfo} shapeBuilderInfo - The shape builder info returned by `FShape.build()`.
|
|
28
|
+
* @returns {Promise<boolean>} - Whether the shape was inserted successfully.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
33
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
34
|
+
*
|
|
35
|
+
* // Create a rectangle shape at cell B2.
|
|
36
|
+
* const shapeInfo = fWorksheet.newShape()
|
|
37
|
+
* .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect)
|
|
38
|
+
* .setPosition(1, 1, 0, 0)
|
|
39
|
+
* .setWidth(200)
|
|
40
|
+
* .setHeight(200)
|
|
41
|
+
* .setStrokeColor('#000000')
|
|
42
|
+
* .build();
|
|
43
|
+
* await fWorksheet.insertShape(shapeInfo);
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
insertShape(shapeBuilderInfo: IShapeBuilderInfo): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Updates an existing shape on this sheet.
|
|
49
|
+
* @param {IShapeBuilderInfo} shapeBuilderInfo - The shape builder info returned by `FShape.build()`.
|
|
50
|
+
* @returns {Promise<boolean>} - Whether the shape was updated successfully.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
55
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
56
|
+
*
|
|
57
|
+
* // Create a rectangle shape at cell B2.
|
|
58
|
+
* const shapeInfo = fWorksheet.newShape()
|
|
59
|
+
* .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect)
|
|
60
|
+
* .setPosition(1, 1, 0, 0)
|
|
61
|
+
* .build();
|
|
62
|
+
* await fWorksheet.insertShape(shapeInfo);
|
|
63
|
+
*
|
|
64
|
+
* // Get all shapes on the active sheet.
|
|
65
|
+
* const shapes = fWorksheet.getShapes();
|
|
66
|
+
*
|
|
67
|
+
* // Update the first shape after 3 seconds.
|
|
68
|
+
* setTimeout(async () => {
|
|
69
|
+
* const newShapeInfo = fWorksheet.newShape(shapes[0])
|
|
70
|
+
* .setStrokeColor('#ff0000')
|
|
71
|
+
* .setStrokeWidth(3)
|
|
72
|
+
* .build();
|
|
73
|
+
* await fWorksheet.updateShape(newShapeInfo);
|
|
74
|
+
* }, 3000);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
updateShape(shapeBuilderInfo: IShapeBuilderInfo): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Returns a builder to create a new shape for this sheet. The builder will not automatically create the shape.
|
|
80
|
+
* You must call `build()` on the returned builder to get the shape info, then insert it via `insertShape(shapeInfo)`.
|
|
81
|
+
* @description If an existing FShape is provided, the builder will be initialized with that shape's current properties (id, type, position, size) for updating.
|
|
82
|
+
* @param {FShape} [existingShape] An existing shape to initialize the builder with for updating.
|
|
83
|
+
* @returns {FShape} - A new shape builder.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
88
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
89
|
+
*
|
|
90
|
+
* // Create a rectangle shape at cell B2 with 200x200 size.
|
|
91
|
+
* const shapeInfo = fWorksheet.newShape()
|
|
92
|
+
* .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect)
|
|
93
|
+
* .setPosition(1, 1, 0, 0)
|
|
94
|
+
* .setWidth(200)
|
|
95
|
+
* .setHeight(200)
|
|
96
|
+
* .build();
|
|
97
|
+
* await fWorksheet.insertShape(shapeInfo);
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
newShape(existingShape?: FShape): FShape;
|
|
101
|
+
/**
|
|
102
|
+
* Returns an array of shapes on this sheet.
|
|
103
|
+
* @returns {FShape[]} - An array of shapes on this sheet.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
108
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
109
|
+
*
|
|
110
|
+
* // Get all shapes on the active sheet.
|
|
111
|
+
* const shapes = fWorksheet.getShapes();
|
|
112
|
+
* console.log(shapes);
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
getShapes(): FShape[];
|
|
116
|
+
/**
|
|
117
|
+
* Removes a shape from this sheet.
|
|
118
|
+
* @param {FShape} shape - The shape to remove.
|
|
119
|
+
* @returns {Promise<boolean>} - Whether the shape was removed successfully.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
124
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
125
|
+
*
|
|
126
|
+
* // Create a rectangle shape.
|
|
127
|
+
* const shapeInfo = fWorksheet.newShape()
|
|
128
|
+
* .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect)
|
|
129
|
+
* .setPosition(1, 1, 0, 0)
|
|
130
|
+
* .build();
|
|
131
|
+
* await fWorksheet.insertShape(shapeInfo);
|
|
132
|
+
*
|
|
133
|
+
* // Get all shapes on the active sheet.
|
|
134
|
+
* const shapes = fWorksheet.getShapes();
|
|
135
|
+
*
|
|
136
|
+
* // Remove the first shape after 3 seconds.
|
|
137
|
+
* setTimeout(async () => {
|
|
138
|
+
* await fWorksheet.removeShape(shapes[0]);
|
|
139
|
+
* console.log(fWorksheet.getShapes());
|
|
140
|
+
* }, 3000);
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
removeShape(shape: FShape): Promise<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Connects a connector (line) shape's endpoints to basic shapes' connection sites.
|
|
146
|
+
* At least one of `startTarget` or `endTarget` must be provided. If an endpoint is not provided,
|
|
147
|
+
* its existing connection (if any) is preserved, or it remains as a free point.
|
|
148
|
+
*
|
|
149
|
+
* This method requires the sheet to be active (has a render context).
|
|
150
|
+
*
|
|
151
|
+
* @param {IConnectShapesParams} params - Parameters specifying the connector and target shapes.
|
|
152
|
+
* @returns {Promise<boolean>} - Whether the connection was established successfully.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
157
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
158
|
+
*
|
|
159
|
+
* // Get all shapes on the sheet.
|
|
160
|
+
* const shapes = fWorksheet.getShapes();
|
|
161
|
+
* const basicShapes = shapes.filter((s) => !s.isLineShape());
|
|
162
|
+
* const connectors = shapes.filter((s) => s.isLineShape());
|
|
163
|
+
*
|
|
164
|
+
* if (connectors.length > 0 && basicShapes.length >= 2) {
|
|
165
|
+
* // Connect the first connector's start to the first basic shape's cxn site 0,
|
|
166
|
+
* // and the end to the second basic shape's cxn site 2.
|
|
167
|
+
* await fWorksheet.connectShapes({
|
|
168
|
+
* connector: connectors[0],
|
|
169
|
+
* startTarget: { shape: basicShapes[0], connectionSiteIndex: 0 },
|
|
170
|
+
* endTarget: { shape: basicShapes[1], connectionSiteIndex: 2 },
|
|
171
|
+
* });
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
connectShapes(params: IConnectShapesParams): Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Returns a builder to create a new connector (line) shape for this sheet. The builder will not automatically create the connector.
|
|
178
|
+
* You must call `build()` on the returned builder to get the shape info, then insert it via `insertShape(shapeInfo)`.
|
|
179
|
+
* @description If an existing FShape is provided, the builder will be initialized with that shape's current properties (id, type, position, size) for updating.
|
|
180
|
+
* @param {FShape} [existingShape] An existing connector shape to initialize the builder with for updating.
|
|
181
|
+
* @returns {FConnectorShape} - A new connector shape builder.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
186
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
187
|
+
*
|
|
188
|
+
* // Create a straight connector with arrows at cell B2 with 200x100 size.
|
|
189
|
+
* const connectorInfo = fWorksheet.newConnector()
|
|
190
|
+
* .setShapeType(univerAPI.Enum.ShapeTypeEnum.StraightConnector1)
|
|
191
|
+
* .setPosition(1, 1, 0, 0)
|
|
192
|
+
* .setWidth(200)
|
|
193
|
+
* .setHeight(100)
|
|
194
|
+
* .setStartArrowType(univerAPI.Enum.ShapeArrowTypeEnum.Arrow)
|
|
195
|
+
* .setEndArrowType(univerAPI.Enum.ShapeArrowTypeEnum.Arrow)
|
|
196
|
+
* .setStrokeColor('#000000')
|
|
197
|
+
* .setStrokeWidth(2)
|
|
198
|
+
* .build();
|
|
199
|
+
* await fWorksheet.insertShape(connectorInfo);
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
newConnector(existingShape?: FShape): FConnectorShape;
|
|
203
|
+
}
|
|
204
|
+
export declare class FWorksheetShapeMixin extends FWorksheet implements IFWorksheetShapeMixin {
|
|
205
|
+
insertShape(shapeBuilderInfo: IShapeBuilderInfo): Promise<boolean>;
|
|
206
|
+
updateShape(shapeBuilderInfo: IShapeBuilderInfo): Promise<boolean>;
|
|
207
|
+
newShape(existingShape?: FShape): FShape;
|
|
208
|
+
newConnector(existingShape?: FShape): FConnectorShape;
|
|
209
|
+
getShapes(): FShape[];
|
|
210
|
+
removeShape(shape: FShape): Promise<boolean>;
|
|
211
|
+
connectShapes(connectParams: IConnectShapesParams): Promise<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* @ignore
|
|
214
|
+
*/
|
|
215
|
+
private _preloadShapeProperties;
|
|
216
|
+
/**
|
|
217
|
+
* @ignore
|
|
218
|
+
*/
|
|
219
|
+
private _resolveEndpoints;
|
|
220
|
+
/**
|
|
221
|
+
* @ignore
|
|
222
|
+
*/
|
|
223
|
+
private _resolveExistingOrFreeEndpoint;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @ignore
|
|
227
|
+
*/
|
|
228
|
+
declare module '@univerjs/sheets/facade' {
|
|
229
|
+
interface FWorksheet extends IFWorksheetShapeMixin {
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './f-enum';
|
|
2
|
+
import './f-shape';
|
|
3
|
+
import './f-worksheet';
|
|
4
|
+
export { FConnectorShape } from './f-connector-shape';
|
|
5
|
+
export { FShape } from './f-shape';
|
|
6
|
+
export type * from './f-shape';
|
|
7
|
+
export type * from './f-worksheet';
|
|
8
|
+
declare module '@univerjs-pro/sheets-shape-ui/facade' {
|
|
9
|
+
interface FShape {
|
|
10
|
+
}
|
|
11
|
+
interface IShapeBuildOptions {
|
|
12
|
+
}
|
|
13
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import './global.css';
|
|
2
|
+
export { InsertShapeCommand } from './commands/command/add-shape-command';
|
|
3
|
+
export { SetShapeDrawingDataCommand } from './commands/command/set-shape-drawing-data-command';
|
|
4
|
+
export { SetShapeFillColorCommand } from './commands/command/set-shape-fill.command';
|
|
5
|
+
export { ToggleSheetsShapeFlipCommand } from './commands/command/set-shape-flip-command';
|
|
6
|
+
export { SetSheetsShapeRotateCommand } from './commands/command/set-shape-rotate.command';
|
|
7
|
+
export { SetShapeTextFontSizeCommand, SetShapeTextFontSizeDecreaseCommand, SetShapeTextFontSizeIncreaseCommand } from './commands/command/set-shape-text-style.command';
|
|
8
|
+
export { SetShapeTextVerticalAlignCommand } from './commands/command/set-shape-text-vertical-align.command';
|
|
9
|
+
export { ShapeDocAlignCommand } from './commands/command/shape-doc-align.command';
|
|
10
|
+
export { UpdateConnectorRelationCommand } from './commands/command/update-connector-relation.command';
|
|
11
|
+
export { UpdateLineShapeResizeCommand } from './commands/command/update-line-shape-resize.command';
|
|
12
|
+
export { UpdateShapeDataCommand } from './commands/command/update-shape-data-command';
|
|
1
13
|
export type { IUniverSheetsShapeUIConfig } from './controllers/config.schema';
|
|
2
14
|
export { SheetsShapeUIController } from './controllers/sheets-shape-ui.controller';
|
|
3
15
|
export { UniverSheetsShapeUIPlugin } from './plugin';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* Main shape text editor container component.
|
|
4
3
|
* Combines PositionWrapper (first layer) and Editor (second layer).
|
|
5
4
|
*/
|
|
6
|
-
export declare const ShapeTextEditorContainer:
|
|
5
|
+
export declare const ShapeTextEditorContainer: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
export interface IShapePositionWrapperProps {
|
|
4
3
|
children: ReactNode;
|
|
5
4
|
onPositionUpdate?: (position: {
|
|
@@ -13,4 +12,4 @@ export interface IShapePositionWrapperProps {
|
|
|
13
12
|
* Position wrapper component that handles shape positioning in DOM.
|
|
14
13
|
* This is the first layer DOM that tracks shape position with scroll.
|
|
15
14
|
*/
|
|
16
|
-
export declare const ShapePositionWrapper:
|
|
15
|
+
export declare const ShapePositionWrapper: import('react').MemoExoticComponent<(props: IShapePositionWrapperProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1b1da6,_0x1ca32f){const _0x140f11=_0xc7df,_0x1e7c66=_0x1b1da6();while(!![]){try{const _0x11cc7a=parseInt(_0x140f11(0x156))/0x1+parseInt(_0x140f11(0x13e))/0x2+-parseInt(_0x140f11(0x10d))/0x3*(parseInt(_0x140f11(0x180))/0x4)+-parseInt(_0x140f11(0x150))/0x5*(parseInt(_0x140f11(0x110))/0x6)+parseInt(_0x140f11(0xff))/0x7*(-parseInt(_0x140f11(0x16f))/0x8)+parseInt(_0x140f11(0x157))/0x9+parseInt(_0x140f11(0x126))/0xa;if(_0x11cc7a===_0x1ca32f)break;else _0x1e7c66['push'](_0x1e7c66['shift']());}catch(_0x2c4d12){_0x1e7c66['push'](_0x1e7c66['shift']());}}}(_0x53a1,0x7b90b),function(_0x2ce829,_0x4226e2){const _0x4215ca=_0xc7df;typeof exports==_0x4215ca(0x131)&&typeof module<'u'?_0x4226e2(exports,require('@univerjs-pro/engine-shape'),require('@univerjs/core/facade'),require('@univerjs-pro/sheets-shape'),require('@univerjs/core'),require('@univerjs/drawing'),require('@univerjs/engine-render'),require('@univerjs/sheets-ui'),require('@univerjs-pro/sheets-shape-ui'),require('@univerjs/sheets-drawing'),require('@univerjs/sheets-drawing-ui'),require('@univerjs/sheets/facade')):typeof define==_0x4215ca(0x11d)&&define[_0x4215ca(0xfb)]?define([_0x4215ca(0x159),_0x4215ca(0xea),_0x4215ca(0x116),_0x4215ca(0xfe),'@univerjs/core',_0x4215ca(0x15e),'@univerjs/engine-render',_0x4215ca(0x14e),'@univerjs-pro/sheets-shape-ui',_0x4215ca(0xf8),_0x4215ca(0xeb),_0x4215ca(0x165)],_0x4226e2):(_0x2ce829=typeof globalThis<'u'?globalThis:_0x2ce829||self,_0x4226e2(_0x2ce829[_0x4215ca(0x112)]={},_0x2ce829[_0x4215ca(0x17e)],_0x2ce829['UniverCoreFacade'],_0x2ce829[_0x4215ca(0x15c)],_0x2ce829[_0x4215ca(0x194)],_0x2ce829[_0x4215ca(0x170)],_0x2ce829[_0x4215ca(0x144)],_0x2ce829[_0x4215ca(0x111)],_0x2ce829['UniverProSheetsShapeUi'],_0x2ce829[_0x4215ca(0x174)],_0x2ce829[_0x4215ca(0x169)],_0x2ce829[_0x4215ca(0x18d)]));}(this,function(_0x274c2a,_0x40e6c7,_0x4c085a,_0x1e72e8,_0x53fe44,_0x322ea4,_0x5df7b3,_0x1823f3,_0x40f76b,_0x2e6d6b,_0x50f262,_0x4998c0){'use strict';const _0x4445ee=_0xc7df;var _0x1c855d=Object[_0x4445ee(0x17a)],_0x54271b=(_0xf684c3,_0x2cb2f7,_0x16b56f)=>_0x2cb2f7 in _0xf684c3?_0x1c855d(_0xf684c3,_0x2cb2f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16b56f}):_0xf684c3[_0x2cb2f7]=_0x16b56f,_0x2738a0=(_0xe6865c,_0x2ce372,_0x50b438)=>_0x54271b(_0xe6865c,typeof _0x2ce372!=_0x4445ee(0x18b)?_0x2ce372+'':_0x2ce372,_0x50b438);class _0x6db0e3 extends _0x4c085a[_0x4445ee(0x103)]{get[_0x4445ee(0xf2)](){return _0x40e6c7['ShapeTypeEnum'];}get[_0x4445ee(0x13a)](){const _0x3ca716=_0x4445ee;return _0x40e6c7[_0x3ca716(0x13a)];}get[_0x4445ee(0x14a)](){const _0x51cf02=_0x4445ee;return _0x40e6c7[_0x51cf02(0x14a)];}get['ShapeLineTypeEnum'](){const _0x256cba=_0x4445ee;return _0x40e6c7[_0x256cba(0x137)];}get['ShapeLineDashEnum'](){const _0x1c3c70=_0x4445ee;return _0x40e6c7[_0x1c3c70(0x17c)];}get[_0x4445ee(0xee)](){const _0x2c5a73=_0x4445ee;return _0x40e6c7[_0x2c5a73(0xee)];}get[_0x4445ee(0xed)](){const _0x3cb405=_0x4445ee;return _0x40e6c7[_0x3cb405(0xed)];}get[_0x4445ee(0x186)](){return _0x40e6c7['ShapeArrowTypeEnum'];}get[_0x4445ee(0x15d)](){const _0x133956=_0x4445ee;return _0x40e6c7[_0x133956(0x15d)];}}_0x4c085a[_0x4445ee(0x103)]['extend'](_0x6db0e3);const _0x5d021b=0xc8,_0x2cdcdb=0xc8;class _0x41795d{constructor(_0x4c507e,_0x1b0952,_0x5c48c,_0x495e5c){const _0x5569dd=_0x4445ee;_0x2738a0(this,_0x5569dd(0x101)),_0x2738a0(this,_0x5569dd(0x18f)),_0x2738a0(this,_0x5569dd(0x141)),_0x2738a0(this,'x',0x0),_0x2738a0(this,'y',0x0),_0x2738a0(this,_0x5569dd(0x139),_0x5d021b),_0x2738a0(this,_0x5569dd(0x168),_0x2cdcdb),_0x2738a0(this,'shapeType'),_0x2738a0(this,_0x5569dd(0x10f),{}),_0x2738a0(this,_0x5569dd(0x11a)),(this[_0x5569dd(0x101)]=_0x4c507e,this[_0x5569dd(0x18f)]=_0x1b0952,this[_0x5569dd(0x141)]=_0x5c48c||_0x53fe44['generateRandomId'](),this[_0x5569dd(0x11a)]=_0x495e5c);}[_0x4445ee(0xfd)](_0x176b9e,_0x295d44,_0x43d640,_0x26322a){const _0xf9dbad=_0x4445ee,_0x19822f=this['_injector']['get'](_0x5df7b3[_0xf9dbad(0x132)])[_0xf9dbad(0x108)](this[_0xf9dbad(0x101)]);if(!_0x19822f)throw new Error('This\x20api\x20only\x20works\x20in\x20the\x20active\x20sheet.');const _0x26c194=_0x19822f[_0xf9dbad(0xf9)](_0x1823f3['ISheetSelectionRenderService']),_0x5c73db=_0x19822f[_0xf9dbad(0xf9)](_0x1823f3[_0xf9dbad(0x15f)]),{transform:_0x215b29}=_0x1823f3[_0xf9dbad(0x127)](this[_0xf9dbad(0x101)],this['subUnitId'],{'row':_0x176b9e,'column':_0x295d44,'rowOffset':_0x43d640,'columnOffset':_0x26322a},0x1,0x1,_0x26c194,_0x5c73db);return this['x']=_0x215b29[_0xf9dbad(0x12c)],this['y']=_0x215b29['top'],this;}[_0x4445ee(0x16d)](_0x3efce5,_0x109509){return this['x']=_0x3efce5,this['y']=_0x109509,this;}['setShapeType'](_0x30d132){const _0x4e38d1=_0x4445ee;return this[_0x4e38d1(0x121)]=_0x30d132,this;}[_0x4445ee(0x11f)](_0x11cfdf,_0x131272){const _0x5460ea=_0x4445ee;return this[_0x5460ea(0x10f)][_0x5460ea(0xfc)]||(this[_0x5460ea(0x10f)][_0x5460ea(0xfc)]={}),this['shapeData']['fill']['fillType']=_0x40e6c7[_0x5460ea(0x13a)][_0x5460ea(0x146)],_0x11cfdf!==void 0x0&&(this[_0x5460ea(0x10f)][_0x5460ea(0xfc)][_0x5460ea(0x115)]=_0x11cfdf),_0x131272!==void 0x0&&(this['shapeData']['fill']['opacity']=_0x131272),this;}[_0x4445ee(0x17f)](_0x4cc77e,_0x1f2b73,_0x4576d2){const _0x51b6c8=_0x4445ee;if(_0x1f2b73===void 0x0||_0x1f2b73[_0x51b6c8(0x15b)]===0x0)throw new Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');return this[_0x51b6c8(0x10f)][_0x51b6c8(0xfc)]||(this[_0x51b6c8(0x10f)][_0x51b6c8(0xfc)]={}),this[_0x51b6c8(0x10f)][_0x51b6c8(0xfc)][_0x51b6c8(0x120)]=_0x1f2b73,this['shapeData'][_0x51b6c8(0xfc)][_0x51b6c8(0x152)]=_0x40e6c7[_0x51b6c8(0x13a)][_0x51b6c8(0x148)],this[_0x51b6c8(0x10f)][_0x51b6c8(0xfc)][_0x51b6c8(0xf7)]=_0x4cc77e,_0x4576d2!==void 0x0&&(this[_0x51b6c8(0x10f)][_0x51b6c8(0xfc)][_0x51b6c8(0x167)]=_0x4576d2),this;}['setNoneFill'](){const _0x2faff5=_0x4445ee;return this[_0x2faff5(0x10f)][_0x2faff5(0xfc)]={'fillType':_0x40e6c7[_0x2faff5(0x13a)]['NoFill']},this;}['setStrokeColor'](_0x129dbf){const _0x4637f6=_0x4445ee;return this[_0x4637f6(0x10f)]['stroke']||(this[_0x4637f6(0x10f)][_0x4637f6(0x179)]={}),this['shapeData'][_0x4637f6(0x179)][_0x4637f6(0x115)]=_0x129dbf,this;}['setStrokeWidth'](_0x6396a1){const _0x1c2978=_0x4445ee;return this[_0x1c2978(0x10f)][_0x1c2978(0x179)]||(this['shapeData'][_0x1c2978(0x179)]={}),this[_0x1c2978(0x10f)]['stroke'][_0x1c2978(0x139)]=_0x6396a1,this;}['setStrokeLineDashType'](_0x15b86f){const _0x369c94=_0x4445ee;return this['shapeData'][_0x369c94(0x179)]||(this[_0x369c94(0x10f)][_0x369c94(0x179)]={}),this[_0x369c94(0x10f)]['stroke']['dashType']=_0x15b86f,this;}[_0x4445ee(0xf6)](_0x241167){const _0x4f8357=_0x4445ee;return this[_0x4f8357(0x10f)][_0x4f8357(0x179)]||(this[_0x4f8357(0x10f)][_0x4f8357(0x179)]={}),this[_0x4f8357(0x10f)][_0x4f8357(0x179)][_0x4f8357(0x10b)]=_0x241167,this;}['setStrokeLineCapType'](_0x21529a){const _0x382553=_0x4445ee;return this[_0x382553(0x10f)]['stroke']||(this[_0x382553(0x10f)][_0x382553(0x179)]={}),this[_0x382553(0x10f)][_0x382553(0x179)][_0x382553(0x102)]=_0x21529a,this;}[_0x4445ee(0x171)](_0x3baada){const _0x21bc35=_0x4445ee;return this[_0x21bc35(0x10f)][_0x21bc35(0x179)]||(this[_0x21bc35(0x10f)][_0x21bc35(0x179)]={}),this[_0x21bc35(0x10f)][_0x21bc35(0x179)][_0x21bc35(0x18a)]=_0x3baada,this;}[_0x4445ee(0xf4)](_0xea8331){const _0x159763=_0x4445ee;return this['shapeData'][_0x159763(0x179)]||(this[_0x159763(0x10f)][_0x159763(0x179)]={}),this[_0x159763(0x10f)][_0x159763(0x179)][_0x159763(0x17b)]=_0xea8331,this;}[_0x4445ee(0x183)](_0x46ea64){const _0x22213b=_0x4445ee;return this[_0x22213b(0x139)]=_0x46ea64,this;}['setHeight'](_0x22cacc){const _0x21eea0=_0x4445ee;return this[_0x21eea0(0x168)]=_0x22cacc,this;}[_0x4445ee(0x164)](){const _0x3d3eb6=_0x4445ee,_0x401c9a=this[_0x3d3eb6(0x11a)][_0x3d3eb6(0x187)](_0x1e72e8[_0x3d3eb6(0x125)])['getShapeModel'](this[_0x3d3eb6(0x101)],this['subUnitId'],this['drawId']);return _0x401c9a?_0x40e6c7['isConnectorShape'](_0x401c9a[_0x3d3eb6(0x119)]()):this['shapeType']?_0x40e6c7[_0x3d3eb6(0x197)](this['shapeType']):!0x1;}[_0x4445ee(0x123)](){const _0x20955d=_0x4445ee,_0x4a2b7c=this['_injector'][_0x20955d(0x187)](_0x1e72e8[_0x20955d(0x125)])[_0x20955d(0xf1)](this[_0x20955d(0x101)],this[_0x20955d(0x18f)],this[_0x20955d(0x141)]);if(!_0x4a2b7c)return[];const _0x39bf82=this[_0x20955d(0x11a)][_0x20955d(0x187)](_0x322ea4[_0x20955d(0x16c)])[_0x20955d(0x11b)]({'unitId':this[_0x20955d(0x101)],'subUnitId':this['subUnitId'],'drawingId':this[_0x20955d(0x141)]});if(!(_0x39bf82!=null&&_0x39bf82['transform']))return[];const {width:_0x57d6a8=0x0,height:_0x382c25=0x0}=_0x39bf82[_0x20955d(0x151)];return _0x4a2b7c[_0x20955d(0x192)]({'width':_0x57d6a8,'height':_0x382c25}),_0x4a2b7c[_0x20955d(0x195)]();}[_0x4445ee(0x193)](){const _0x2805a7=_0x4445ee,_0x103ad9=this[_0x2805a7(0x11a)]['get'](_0x1e72e8[_0x2805a7(0x125)])['getShapeModel'](this[_0x2805a7(0x101)],this[_0x2805a7(0x18f)],this[_0x2805a7(0x141)]);if(!_0x103ad9)return[];const _0x26ff3b=this[_0x2805a7(0x11a)]['get'](_0x322ea4['IDrawingManagerService'])[_0x2805a7(0x11b)]({'unitId':this[_0x2805a7(0x101)],'subUnitId':this[_0x2805a7(0x18f)],'drawingId':this['drawId']});if(!(_0x26ff3b!=null&&_0x26ff3b[_0x2805a7(0x151)]))return[];const {width:_0x10500d=0x0,height:_0x446d39=0x0}=_0x26ff3b[_0x2805a7(0x151)];return _0x103ad9[_0x2805a7(0x192)]({'width':_0x10500d,'height':_0x446d39}),_0x103ad9[_0x2805a7(0x184)]();}[_0x4445ee(0x15a)](){const _0x46414a=_0x4445ee,_0x2a496e=this['_injector'][_0x46414a(0x187)](_0x1e72e8[_0x46414a(0x125)])[_0x46414a(0xf1)](this[_0x46414a(0x101)],this[_0x46414a(0x18f)],this['drawId']);if(!_0x2a496e)return[];if(!_0x40e6c7['isConnectorShape'](_0x2a496e['getShapeType']()))return[];const _0x621f3f=this[_0x46414a(0x11a)][_0x46414a(0x187)](_0x322ea4['IDrawingManagerService'])['getDrawingByParam']({'unitId':this[_0x46414a(0x101)],'subUnitId':this[_0x46414a(0x18f)],'drawingId':this[_0x46414a(0x141)]});if(!(_0x621f3f!=null&&_0x621f3f[_0x46414a(0x151)]))return[];const {width:_0x10a8cd=0x0,height:_0x1dbcd5=0x0}=_0x621f3f[_0x46414a(0x151)];return _0x2a496e[_0x46414a(0x192)]({'width':_0x10a8cd,'height':_0x1dbcd5}),_0x2a496e[_0x46414a(0x15a)]();}[_0x4445ee(0x11c)](){const _0x293610=_0x4445ee;var _0x3f41b4;const _0x1c56c4=this['_injector']['get'](_0x1e72e8['SheetsShapeService'])[_0x293610(0xf1)](this['unitId'],this[_0x293610(0x18f)],this['drawId']);return _0x1c56c4&&(_0x3f41b4=_0x1c56c4[_0x293610(0x11c)]())!=null?_0x3f41b4:null;}['getEndConnectInfo'](){const _0x4400f9=_0x4445ee;var _0x2882d8;const _0x38e34b=this[_0x4400f9(0x11a)][_0x4400f9(0x187)](_0x1e72e8[_0x4400f9(0x125)])[_0x4400f9(0xf1)](this[_0x4400f9(0x101)],this['subUnitId'],this['drawId']);return _0x38e34b&&(_0x2882d8=_0x38e34b['getEndConnectInfo']())!=null?_0x2882d8:null;}[_0x4445ee(0x14f)](){const _0x3a7019=_0x4445ee;var _0x4bfc23,_0x169bae;if(!this[_0x3a7019(0x121)])throw new Error(_0x3a7019(0x104));if(this['x']===0x0||this['y']===0x0){const _0x3e93b4=this['_injector'][_0x3a7019(0x187)](_0x5df7b3[_0x3a7019(0x132)])[_0x3a7019(0x108)](this[_0x3a7019(0x101)]);if(!_0x3e93b4)throw new Error('This\x20api\x20only\x20works\x20in\x20the\x20active\x20sheet.');const _0x45fb57=_0x3e93b4[_0x3a7019(0xf9)](_0x1823f3[_0x3a7019(0x143)]),_0x1366d9=_0x3e93b4['with'](_0x1823f3[_0x3a7019(0x15f)]),{transform:_0x580f56}=_0x1823f3[_0x3a7019(0x127)](this['unitId'],this[_0x3a7019(0x18f)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x45fb57,_0x1366d9);this['x']=this['x']>0x0?this['x']:_0x580f56[_0x3a7019(0x12c)],this['y']=this['y']>0x0?this['y']:_0x580f56[_0x3a7019(0x130)];}return this[_0x3a7019(0x139)]=(_0x4bfc23=this[_0x3a7019(0x139)])!=null?_0x4bfc23:_0x5d021b,this[_0x3a7019(0x168)]=(_0x169bae=this[_0x3a7019(0x168)])!=null?_0x169bae:_0x2cdcdb,{'unitId':this['unitId'],'subUnitId':this[_0x3a7019(0x18f)],'shapeId':this[_0x3a7019(0x141)],'shapeType':this[_0x3a7019(0x121)],'shapeData':Object[_0x3a7019(0x124)](this[_0x3a7019(0x10f)])[_0x3a7019(0x15b)]>0x0?this[_0x3a7019(0x10f)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this['height']};}[_0x4445ee(0x11e)](){const _0x63100a=_0x4445ee;return this[_0x63100a(0x141)];}[_0x4445ee(0x119)](){return this['shapeType'];}[_0x4445ee(0x13c)](){return this['shapeData'];}[_0x4445ee(0x166)](){return{'x':this['x'],'y':this['y']};}[_0x4445ee(0x16b)](){const _0x4a088c=_0x4445ee;return{'width':this[_0x4a088c(0x139)],'height':this[_0x4a088c(0x168)]};}}class _0x49937a extends _0x41795d{constructor(_0x2feee9,_0x2df43c,_0x5801de,_0x41195d){const _0xc56adb=_0x4445ee;super(_0x2feee9,_0x2df43c,_0x5801de,_0x41195d),_0x2738a0(this,_0xc56adb(0x10f),{});}[_0x4445ee(0xf0)](_0x48a1ce){const _0xbba6cf=_0x4445ee;if(!_0x40e6c7[_0xbba6cf(0x197)](_0x48a1ce))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x48a1ce+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0xbba6cf(0xf0)](_0x48a1ce),this;}[_0x4445ee(0x142)](_0x311695){const _0x396bf2=_0x4445ee;var _0x41f9f9,_0x20a3a0,_0x1e83fb;return(_0x41f9f9=this[_0x396bf2(0x10f)])!=null&&_0x41f9f9['ln']||(this['shapeData']['ln']={}),(_0x1e83fb=(_0x20a3a0=this[_0x396bf2(0x10f)])==null?void 0x0:_0x20a3a0['ln'])!=null&&_0x1e83fb['startArrow']||(this[_0x396bf2(0x10f)]['ln']['startArrow']={}),this[_0x396bf2(0x10f)]['ln']['startArrow']['type']=_0x311695,this;}['setEndArrowType'](_0x561539){const _0x13c9ed=_0x4445ee;var _0xd60a08,_0x416be5,_0x179a97;return(_0xd60a08=this['shapeData'])!=null&&_0xd60a08['ln']||(this[_0x13c9ed(0x10f)]['ln']={}),(_0x179a97=(_0x416be5=this[_0x13c9ed(0x10f)])==null?void 0x0:_0x416be5['ln'])!=null&&_0x179a97[_0x13c9ed(0x14d)]||(this[_0x13c9ed(0x10f)]['ln']['endArrow']={}),this[_0x13c9ed(0x10f)]['ln'][_0x13c9ed(0x14d)][_0x13c9ed(0x189)]=_0x561539,this;}[_0x4445ee(0x190)](_0x4ad0cb){const _0x167053=_0x4445ee;var _0x32ae16,_0xb68a7f,_0xffe9f5;return(_0x32ae16=this[_0x167053(0x10f)])!=null&&_0x32ae16['ln']||(this['shapeData']['ln']={}),(_0xffe9f5=(_0xb68a7f=this['shapeData'])==null?void 0x0:_0xb68a7f['ln'])!=null&&_0xffe9f5['startArrow']||(this[_0x167053(0x10f)]['ln'][_0x167053(0x147)]={}),this[_0x167053(0x10f)]['ln'][_0x167053(0x147)][_0x167053(0x176)]=_0x4ad0cb,this;}[_0x4445ee(0x122)](_0x1dc9eb){const _0x1f9d5c=_0x4445ee;var _0x109546,_0x24abc6,_0x782f3b;return(_0x109546=this[_0x1f9d5c(0x10f)])!=null&&_0x109546['ln']||(this[_0x1f9d5c(0x10f)]['ln']={}),(_0x782f3b=(_0x24abc6=this[_0x1f9d5c(0x10f)])==null?void 0x0:_0x24abc6['ln'])!=null&&_0x782f3b[_0x1f9d5c(0x14d)]||(this[_0x1f9d5c(0x10f)]['ln'][_0x1f9d5c(0x14d)]={}),this[_0x1f9d5c(0x10f)]['ln'][_0x1f9d5c(0x14d)]['size']=_0x1dc9eb,this;}[_0x4445ee(0x14f)](){return super['build']();}[_0x4445ee(0x177)](){const _0x3e9199=_0x4445ee;var _0x386d16,_0x80186c;return((_0x80186c=(_0x386d16=this[_0x3e9199(0x10f)])==null?void 0x0:_0x386d16['relation'])==null?void 0x0:_0x80186c['to'])||null;}[_0x4445ee(0x11c)](){const _0x17ce45=_0x4445ee;var _0x2ab223,_0x3adee7;return((_0x3adee7=(_0x2ab223=this['shapeData'])==null?void 0x0:_0x2ab223['relation'])==null?void 0x0:_0x3adee7[_0x17ce45(0x162)])||null;}}function _0x3b1dc9(_0x2ce562,_0x5bc607,_0x5466c0){const _0x5a8b9c=_0x4445ee;var _0x258ebf;const _0x3fb84c=(_0x258ebf=_0x5466c0['getRenderById'](_0x5bc607))==null?void 0x0:_0x258ebf['with'](_0x1823f3['ISheetSelectionRenderService']);if(!_0x3fb84c)return null;const _0x3aad39=_0x3fb84c[_0x5a8b9c(0x185)](_0x2ce562[_0x5a8b9c(0xf3)],_0x2ce562[_0x5a8b9c(0x109)]);if(!_0x3aad39)return null;const _0x4f275e=_0x3fb84c['getCellWithCoordByOffset'](_0x2ce562[_0x5a8b9c(0x128)],_0x2ce562[_0x5a8b9c(0x105)]);return _0x4f275e?{'from':{'column':_0x3aad39[_0x5a8b9c(0x13f)],'columnOffset':_0x2ce562['startX']-_0x3aad39[_0x5a8b9c(0xf3)],'row':_0x3aad39[_0x5a8b9c(0x161)],'rowOffset':_0x2ce562[_0x5a8b9c(0x109)]-_0x3aad39[_0x5a8b9c(0x109)]},'to':{'column':_0x4f275e[_0x5a8b9c(0x13f)],'columnOffset':_0x2ce562[_0x5a8b9c(0x128)]-_0x4f275e[_0x5a8b9c(0xf3)],'row':_0x4f275e[_0x5a8b9c(0x161)],'rowOffset':_0x2ce562['endY']-_0x4f275e[_0x5a8b9c(0x109)]}}:null;}function _0x26d4a2(_0x3e5588,_0x20ae26){const _0x130ed0=_0x4445ee,_0x58ddf7={'shapeType':_0x3e5588,'shapeData':_0x20ae26},_0xdffe20=_0x40e6c7[_0x130ed0(0x197)](_0x3e5588);return _0xdffe20&&(_0x58ddf7[_0x130ed0(0xfc)]=!0x1,_0x58ddf7['rotateEnabled']=!0x1,_0x58ddf7[_0x130ed0(0x149)]=!0x1,_0x58ddf7[_0x130ed0(0x12e)]=!0x1),{'extraData':_0x58ddf7,'isLine':_0xdffe20};}function _0x5cbf60(_0x47a169,_0x249f85){const _0x1170e9=_0x4445ee,_0x3f2842={'left':_0x47a169[_0x1170e9(0xf3)],'top':_0x47a169[_0x1170e9(0x109)],'width':_0x47a169[_0x1170e9(0x128)]-_0x47a169['startX'],'height':_0x47a169[_0x1170e9(0x105)]-_0x47a169['startY']};return _0x249f85&&(_0x3f2842[_0x1170e9(0x198)]=!0x1,_0x3f2842[_0x1170e9(0x149)]=!0x1,_0x3f2842['borderEnabled']=!0x1),_0x3f2842;}function _0x296f50(_0x4504aa,_0x51f8c9,_0x21417c,_0x5c0504,_0xb1349b,_0x1bd27d){const _0x1b9a6f=_0x4445ee,_0x24c6ae=_0xb1349b[_0x1b9a6f(0xf1)](_0x4504aa,_0x51f8c9,_0x21417c);if(!_0x24c6ae)return null;const _0x1df572=_0x1bd27d[_0x1b9a6f(0x11b)]({'unitId':_0x4504aa,'subUnitId':_0x51f8c9,'drawingId':_0x21417c});if(!(_0x1df572!=null&&_0x1df572[_0x1b9a6f(0x151)]))return null;const {left:_0x4ae18f=0x0,top:_0x24b047=0x0,width:_0x3439bf=0x0,height:_0x20280c=0x0,flipX:_0xe30c3f=!0x1,flipY:_0x578836=!0x1,angle:_0xcaa649}=_0x1df572['transform'];_0x24c6ae[_0x1b9a6f(0x192)]({'width':_0x3439bf,'height':_0x20280c});const _0xc58163=_0x24c6ae['getConnectionSiteList']()[_0x1b9a6f(0xe9)](_0x60e9e8=>_0x60e9e8['index']===_0x5c0504);if(!_0xc58163)return null;let _0x286805=_0xe30c3f?_0x3439bf-_0xc58163['x']:_0xc58163['x'],_0x257099=_0x578836?_0x20280c-_0xc58163['y']:_0xc58163['y'];if(_0xcaa649&&_0xcaa649!==0x0){const _0x2b6716=_0xcaa649*Math['PI']/0xb4,_0x1dc697=Math[_0x1b9a6f(0x12a)](_0x2b6716),_0x284fe7=Math[_0x1b9a6f(0x154)](_0x2b6716),_0x4449c1=_0x3439bf/0x2,_0x33ac13=_0x20280c/0x2,_0x37c9be=_0x286805-_0x4449c1,_0x1b539b=_0x257099-_0x33ac13;_0x286805=_0x4449c1+_0x37c9be*_0x1dc697-_0x1b539b*_0x284fe7,_0x257099=_0x33ac13+_0x37c9be*_0x284fe7+_0x1b539b*_0x1dc697;}_0x286805+=_0x4ae18f,_0x257099+=_0x24b047;let _0x20e780=_0xc58163['ang']/0xea60;_0xe30c3f&&(_0x20e780=0xb4-_0x20e780),_0x578836&&(_0x20e780=-_0x20e780),_0x20e780+=_0xcaa649||0x0,_0x20e780=(_0x20e780%0x168+0x168)%0x168;const _0xfb04e7=_0x40e6c7[_0x1b9a6f(0x145)]({'left':_0x4ae18f,'top':_0x24b047,'width':_0x3439bf,'height':_0x20280c},_0xcaa649||0x0);return{'point':{'x':_0x286805,'y':_0x257099},'angle':_0x20e780,'bounds':_0xfb04e7};}function _0x313db2(_0x1004fe,_0x1622ba){const _0x2c731d=_0x4445ee,_0x2d3713=_0x1622ba['x']-_0x1004fe['x'],_0x49aa5b=_0x1622ba['y']-_0x1004fe['y'];return Math['abs'](_0x2d3713)>=Math[_0x2c731d(0x196)](_0x49aa5b)?_0x2d3713>=0x0?0xb4:0x0:_0x49aa5b>=0x0?0x10e:0x5a;}function _0x1a0fad(_0x209d7c,_0x32b132,_0x1c2a7a,_0x5bfb6c,_0x334870,_0x91f5a2,_0x2718e9){const _0x565639=_0x4445ee,_0x3f50f8=_0x91f5a2['getShapeModel'](_0x209d7c,_0x32b132,_0x1c2a7a);if(!_0x3f50f8)return null;const _0xb578d=_0x2718e9[_0x565639(0x11b)]({'unitId':_0x209d7c,'subUnitId':_0x32b132,'drawingId':_0x1c2a7a});if(!(_0xb578d!=null&&_0xb578d[_0x565639(0x151)]))return null;const {left:_0x3f9301=0x0,top:_0x254ed6=0x0,width:_0x2aab0e=0x0,height:_0x49a38a=0x0,flipX:_0x1a4085=!0x1,flipY:_0x3dd96d=!0x1}=_0xb578d['transform'];_0x3f50f8[_0x565639(0x192)]({'width':_0x2aab0e,'height':_0x49a38a});const _0x5e356a=_0x3f50f8[_0x565639(0x15a)]();if(_0x5e356a[_0x565639(0x15b)]<0x2)return null;const _0x3e7de3=_0x5bfb6c?_0x5e356a[0x0]:_0x5e356a[_0x5e356a[_0x565639(0x15b)]-0x1],_0x5988ea=new _0x40e6c7['ConnectorCoordinateTransform']({'left':_0x3f9301,'top':_0x254ed6,'width':_0x2aab0e,'height':_0x49a38a,'flipX':_0x1a4085,'flipY':_0x3dd96d})[_0x565639(0x182)](_0x3e7de3),_0x861e7f=_0x313db2(_0x334870[_0x565639(0x173)],_0x5988ea);return{'point':_0x5988ea,'angle':_0x861e7f,'bounds':{'left':_0x5988ea['x'],'top':_0x5988ea['y'],'width':0x0,'height':0x0}};}class _0x99c9fe extends _0x4998c0[_0x4445ee(0xec)]{async[_0x4445ee(0x133)](_0x5276f5){const _0x5ec1b8=_0x4445ee,_0x337aa5=_0x5276f5[_0x5ec1b8(0x101)]||this[_0x5ec1b8(0x10a)]()[_0x5ec1b8(0x114)](),_0x3431d4=_0x5276f5['subUnitId']||this[_0x5ec1b8(0xfa)](),_0x5151fd=_0x5276f5['shapeId']||_0x53fe44[_0x5ec1b8(0x12d)](),{shapeType:_0xdd2da9,shapeData:_0x36d7dc,x:_0x12d7aa,y:_0x1049c8,width:_0x2aef4a,height:_0x32f942}=_0x5276f5,_0x34a266=this[_0x5ec1b8(0x11a)][_0x5ec1b8(0x187)](_0x5df7b3['IRenderManagerService']),_0x321960={'startX':_0x12d7aa,'endX':_0x12d7aa+_0x2aef4a,'startY':_0x1049c8,'endY':_0x1049c8+_0x32f942},_0x30a519=_0x3b1dc9(_0x321960,_0x337aa5,_0x34a266);if(!_0x30a519)return!0x1;const {extraData:_0x3445f5,isLine:_0x3e734a}=_0x26d4a2(_0xdd2da9,_0x36d7dc),_0x36f7cc=_0x5cbf60(_0x321960,_0x3e734a);return this[_0x5ec1b8(0x155)]['executeCommand'](_0x50f262[_0x5ec1b8(0x158)]['id'],{'unitId':_0x337aa5,'drawings':[{'unitId':_0x337aa5,'subUnitId':_0x3431d4,'drawingId':_0x5151fd,'drawingType':_0x53fe44[_0x5ec1b8(0x10e)][_0x5ec1b8(0x10c)],'componentKey':_0x5ec1b8(0x17d),'sheetTransform':_0x30a519,'axisAlignSheetTransform':_0x30a519,'transform':_0x36f7cc,'data':_0x3445f5,'allowTransform':!0x0}]});}async[_0x4445ee(0x136)](_0x38dbe6){const _0x561457=_0x4445ee,_0x3cac00=_0x38dbe6[_0x561457(0x101)]||this[_0x561457(0x10a)]()[_0x561457(0x114)](),_0x5eb6ce=_0x38dbe6['subUnitId']||this[_0x561457(0xfa)](),_0x14005b=_0x38dbe6[_0x561457(0x106)],{shapeType:_0x140c6e,shapeData:_0x543b4e,x:_0x51a9d5,y:_0x5e4691,width:_0x3000f0,height:_0x14882f}=_0x38dbe6,_0x136ba0=this[_0x561457(0x11a)][_0x561457(0x187)](_0x5df7b3[_0x561457(0x132)]),_0x41a30b={'startX':_0x51a9d5,'endX':_0x51a9d5+_0x3000f0,'startY':_0x5e4691,'endY':_0x5e4691+_0x14882f},_0x4b769e=_0x3b1dc9(_0x41a30b,_0x3cac00,_0x136ba0);if(!_0x4b769e)return!0x1;const _0x1d9eb=_0x5cbf60(_0x41a30b,_0x40e6c7['isConnectorShape'](_0x140c6e));return this[_0x561457(0x155)][_0x561457(0x16a)](_0x40f76b[_0x561457(0x172)]['id'],{'unitId':_0x3cac00,'subUnitId':_0x5eb6ce,'shapeId':_0x14005b,'shapeType':_0x140c6e,'shapeData':_0x543b4e,'transform':_0x1d9eb,'sheetTransform':_0x4b769e,'axisAlignSheetTransform':_0x4b769e});}[_0x4445ee(0x138)](_0x2095a8){const _0x204be8=_0x4445ee,_0x42af5b=this[_0x204be8(0x10a)]()[_0x204be8(0x114)](),_0x511e00=this[_0x204be8(0xfa)]();if(_0x2095a8){const _0x2a3ec6=new _0x41795d(_0x42af5b,_0x511e00,_0x2095a8[_0x204be8(0x141)],this[_0x204be8(0x11a)]);return this[_0x204be8(0x163)](_0x2a3ec6,_0x42af5b,_0x511e00,_0x2095a8['drawId']),_0x2a3ec6;}return new _0x41795d(_0x42af5b,_0x511e00,_0x53fe44[_0x204be8(0x12d)](),this[_0x204be8(0x11a)]);}[_0x4445ee(0x135)](_0x284708){const _0x596568=_0x4445ee,_0x3d395f=this[_0x596568(0x10a)]()[_0x596568(0x114)](),_0x2db5b2=this[_0x596568(0xfa)]();if(_0x284708){const _0x43edd5=new _0x49937a(_0x3d395f,_0x2db5b2,_0x284708['drawId'],this[_0x596568(0x11a)]);return this[_0x596568(0x163)](_0x43edd5,_0x3d395f,_0x2db5b2,_0x284708['drawId']),_0x43edd5;}return new _0x49937a(_0x3d395f,_0x2db5b2,_0x53fe44[_0x596568(0x12d)](),this[_0x596568(0x11a)]);}[_0x4445ee(0x191)](){const _0x4d2c3b=_0x4445ee,_0x185f08=this[_0x4d2c3b(0x11a)][_0x4d2c3b(0x187)](_0x2e6d6b[_0x4d2c3b(0x175)]),_0x4bb6cf=this[_0x4d2c3b(0x10a)]()[_0x4d2c3b(0x114)](),_0x1ab72d=this['getSheetId'](),_0x151514=_0x185f08['getDrawingData'](_0x4bb6cf,_0x1ab72d);if(!_0x151514)return[];const _0x1550aa=[];for(const [_0x15521a,_0xd24efa]of Object[_0x4d2c3b(0x18e)](_0x151514))if(_0xd24efa&&_0xd24efa[_0x4d2c3b(0x181)]===_0x53fe44[_0x4d2c3b(0x10e)][_0x4d2c3b(0x10c)]){const _0x510735=new _0x41795d(_0x4bb6cf,_0x1ab72d,_0x15521a,this[_0x4d2c3b(0x11a)]);this[_0x4d2c3b(0x163)](_0x510735,_0x4bb6cf,_0x1ab72d,_0x15521a),_0x1550aa['push'](_0x510735);}return _0x1550aa;}[_0x4445ee(0x160)](_0x335216){const _0xf6e1e8=_0x4445ee,_0x103790=_0x335216[_0xf6e1e8(0x101)],_0x5f36fe=_0x335216[_0xf6e1e8(0x18f)],_0x56aa0c=_0x335216[_0xf6e1e8(0x141)],_0x3f61eb={'unitId':_0x103790,'drawings':[{'unitId':_0x103790,'subUnitId':_0x5f36fe,'drawingId':_0x56aa0c,'drawingType':_0x53fe44[_0xf6e1e8(0x10e)][_0xf6e1e8(0x10c)]}]};return this['_commandService']['executeCommand'](_0x50f262[_0xf6e1e8(0xef)]['id'],_0x3f61eb);}async[_0x4445ee(0x12f)](_0x2b0fde){const _0x23741a=_0x4445ee,{connector:_0x29babe,startTarget:_0x38bb7d,endTarget:_0x516f11}=_0x2b0fde;if(!_0x38bb7d&&!_0x516f11)return!0x1;const _0xaab1cf=this[_0x23741a(0x10a)]()[_0x23741a(0x114)](),_0x51f95a=this['getSheetId'](),_0x15e36f=this[_0x23741a(0x11a)][_0x23741a(0x187)](_0x1e72e8[_0x23741a(0x125)]),_0x119f03=this[_0x23741a(0x11a)]['get'](_0x322ea4[_0x23741a(0x16c)]),_0x2ed120=_0x15e36f[_0x23741a(0xf1)](_0xaab1cf,_0x51f95a,_0x29babe[_0x23741a(0x141)]);if(!_0x2ed120)return!0x1;const _0x225677=_0x2ed120[_0x23741a(0x119)](),_0x1f7d11=_0x2ed120['getShapeRelation'](),_0x57ad4b={};for(const _0x275365 of _0x2ed120[_0x23741a(0x18c)]()){const _0x345d8f=_0x2ed120[_0x23741a(0x14c)](_0x275365);_0x345d8f!==void 0x0&&(_0x57ad4b[_0x275365]=_0x345d8f);}const {startInfo:_0xca50f2,endInfo:_0x36a998}=this['_resolveEndpoints'](_0xaab1cf,_0x51f95a,_0x29babe,_0x2ed120,_0x38bb7d,_0x516f11,_0x15e36f,_0x119f03,_0x1f7d11);if(!_0xca50f2||!_0x36a998)return!0x1;const _0x3bab52=_0x40e6c7['routeConnectorLineShape'](_0xca50f2,_0x36a998,_0x225677),_0x13c679=_0x40e6c7[_0x23741a(0x129)](_0x3bab52,_0x225677),_0x28c085={};return _0x38bb7d?_0x28c085[_0x23741a(0x162)]={'shapeId':_0x38bb7d['shape']['drawId'],'cxnIndex':_0x38bb7d['connectionSiteIndex']}:_0x1f7d11!=null&&_0x1f7d11[_0x23741a(0x162)]&&(_0x28c085[_0x23741a(0x162)]=_0x1f7d11[_0x23741a(0x162)]),_0x516f11?_0x28c085['to']={'shapeId':_0x516f11[_0x23741a(0x113)]['drawId'],'cxnIndex':_0x516f11['connectionSiteIndex']}:_0x1f7d11!=null&&_0x1f7d11['to']&&(_0x28c085['to']=_0x1f7d11['to']),this['_commandService'][_0x23741a(0x16a)](_0x23741a(0x100),{'unitId':_0xaab1cf,'subUnitId':_0x51f95a,'connectorShapeId':_0x29babe[_0x23741a(0x141)],'width':_0x13c679[_0x23741a(0x134)][_0x23741a(0x139)],'height':_0x13c679['worldRect'][_0x23741a(0x168)],'left':_0x13c679[_0x23741a(0x134)][_0x23741a(0x12c)],'top':_0x13c679[_0x23741a(0x134)][_0x23741a(0x130)],'flipX':_0x13c679['worldRect'][_0x23741a(0x117)]||!0x1,'flipY':_0x13c679[_0x23741a(0x134)][_0x23741a(0x16e)]||!0x1,'oldAdjustValues':_0x57ad4b,'newAdjustValues':_0x13c679[_0x23741a(0x12b)],'newLineType':_0x13c679['lineType'],'oldLineType':_0x225677,'rotation':_0x13c679[_0x23741a(0x107)],'oldRelation':_0x1f7d11,'newRelation':_0x28c085});}[_0x4445ee(0x163)](_0x12212c,_0x31392c,_0x386994,_0x1654f4){const _0x2dc4d9=_0x4445ee;var _0x4318ff,_0x4d347e,_0x28cf8c,_0x33c8e2;const _0x4858c8=this[_0x2dc4d9(0x11a)][_0x2dc4d9(0x187)](_0x322ea4[_0x2dc4d9(0x16c)])[_0x2dc4d9(0x11b)]({'unitId':_0x31392c,'subUnitId':_0x386994,'drawingId':_0x1654f4});_0x4858c8!=null&&_0x4858c8[_0x2dc4d9(0x151)]&&(_0x12212c['x']=(_0x4318ff=_0x4858c8[_0x2dc4d9(0x151)][_0x2dc4d9(0x12c)])!=null?_0x4318ff:0x0,_0x12212c['y']=(_0x4d347e=_0x4858c8[_0x2dc4d9(0x151)][_0x2dc4d9(0x130)])!=null?_0x4d347e:0x0,_0x12212c['width']=(_0x28cf8c=_0x4858c8[_0x2dc4d9(0x151)][_0x2dc4d9(0x139)])!=null?_0x28cf8c:_0x12212c[_0x2dc4d9(0x139)],_0x12212c[_0x2dc4d9(0x168)]=(_0x33c8e2=_0x4858c8[_0x2dc4d9(0x151)][_0x2dc4d9(0x168)])!=null?_0x33c8e2:_0x12212c['height']);const _0x4e75d4=this[_0x2dc4d9(0x11a)][_0x2dc4d9(0x187)](_0x1e72e8[_0x2dc4d9(0x125)])[_0x2dc4d9(0xf1)](_0x31392c,_0x386994,_0x1654f4);if(_0x4e75d4){_0x12212c[_0x2dc4d9(0x121)]=_0x4e75d4['getShapeType']();const _0x228a51=_0x4e75d4[_0x2dc4d9(0x13c)]();_0x228a51&&(_0x12212c[_0x2dc4d9(0x10f)]=JSON[_0x2dc4d9(0x118)](JSON['stringify'](_0x228a51)));}}['_resolveEndpoints'](_0x125118,_0x1fe467,_0x16d46f,_0x5d9748,_0x5ebac3,_0x3b5bd1,_0x1d5ccd,_0x51378a,_0x137555){const _0x288631=_0x4445ee;let _0x475e7f=null,_0x46bfa8=null;return _0x5ebac3&&(_0x475e7f=_0x296f50(_0x125118,_0x1fe467,_0x5ebac3[_0x288631(0x113)]['drawId'],_0x5ebac3[_0x288631(0x178)],_0x1d5ccd,_0x51378a)),_0x3b5bd1&&(_0x46bfa8=_0x296f50(_0x125118,_0x1fe467,_0x3b5bd1[_0x288631(0x113)]['drawId'],_0x3b5bd1[_0x288631(0x178)],_0x1d5ccd,_0x51378a)),_0x475e7f||(_0x475e7f=this[_0x288631(0x14b)](_0x125118,_0x1fe467,_0x16d46f[_0x288631(0x141)],!0x0,_0x46bfa8,_0x137555==null?void 0x0:_0x137555[_0x288631(0x162)],_0x1d5ccd,_0x51378a)),_0x46bfa8||(_0x46bfa8=this['_resolveExistingOrFreeEndpoint'](_0x125118,_0x1fe467,_0x16d46f[_0x288631(0x141)],!0x1,_0x475e7f,_0x137555==null?void 0x0:_0x137555['to'],_0x1d5ccd,_0x51378a)),{'startInfo':_0x475e7f,'endInfo':_0x46bfa8};}[_0x4445ee(0x14b)](_0x4d775d,_0x5f2186,_0x3b91a0,_0x4287c6,_0x563b60,_0x8a5267,_0x3408c9,_0x597c11){const _0x4d6ba9=_0x4445ee;if(_0x8a5267){const _0x342bdf=_0x296f50(_0x4d775d,_0x5f2186,_0x8a5267[_0x4d6ba9(0x106)],_0x8a5267[_0x4d6ba9(0x188)],_0x3408c9,_0x597c11);if(_0x342bdf)return _0x342bdf;}return _0x563b60?_0x1a0fad(_0x4d775d,_0x5f2186,_0x3b91a0,_0x4287c6,_0x563b60,_0x3408c9,_0x597c11):null;}}_0x4998c0[_0x4445ee(0xec)][_0x4445ee(0x13b)](_0x99c9fe),_0x274c2a[_0x4445ee(0xf5)]=_0x49937a,_0x274c2a[_0x4445ee(0x13d)]=_0x41795d,Object[_0x4445ee(0x17a)](_0x274c2a,Symbol[_0x4445ee(0x153)],{'value':_0x4445ee(0x140)});}));function _0xc7df(_0x342e5b,_0x28fe2a){_0x342e5b=_0x342e5b-0xe9;const _0x53a113=_0x53a1();let _0xc7df3f=_0x53a113[_0x342e5b];return _0xc7df3f;}function _0x53a1(){const _0x2b86db=['914405fAgZra','transform','fillType','toStringTag','sin','_commandService','350850dXoCop','2053656Nghdry','InsertSheetDrawingCommand','exports','getConnectorLinePoints','length','UniverProSheetsShape','ShapeArrowSizeEnum','@univerjs/drawing','SheetSkeletonManagerService','removeShape','actualRow','from','_preloadShapeProperties','isLineShape','@univerjs/sheets/facade','getPosition','gradientAngle','height','UniverSheetsDrawingUi','executeCommand','getSize','IDrawingManagerService','setAbsolutePosition','flipY','16elRSRF','UniverDrawing','setStrokeOpacity','SetShapeDrawingDataCommand','point','UniverSheetsDrawing','ISheetDrawingService','size','getEndConnectInfo','connectionSiteIndex','stroke','defineProperty','lineStrokeType','ShapeLineDashEnum','drawing-shape','UniverProEngineShape','setShapeGradientFill','244yUaNXU','drawingType','localToWorld','setWidth','getDrawingPoints','getCellWithCoordByOffset','ShapeArrowTypeEnum','get','cxnIndex','type','opacity','symbol','getAdjustNames','UniverSheetsFacade','entries','subUnitId','setStartArrowSize','getShapes','updateContext','getAdjustPoints','UniverCore','getConnectionSiteList','abs','isConnectorShape','rotateEnabled','find','@univerjs-pro/engine-shape','@univerjs/sheets-drawing-ui','FWorksheet','ShapeLineJoinEnum','ShapeLineCapEnum','RemoveSheetDrawingCommand','setShapeType','getShapeModel','ShapeTypeEnum','startX','setStrokeLineType','FConnectorShape','setStrokeLineJoinType','gradientType','@univerjs/sheets-drawing','with','getSheetId','amd','fill','setPosition','@univerjs-pro/sheets-shape','868406DEDSLf','sheet.command.update-connector-relation','unitId','capType','FEnum','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','endY','shapeId','rotation','getRenderById','startY','getWorkbook','lineJoinType','DRAWING_SHAPE','33708vzYwBt','DrawingTypeEnum','shapeData','12HFkUxA','UniverSheetsUi','UniverProSheetsShapeUiFacade','shape','getUnitId','color','@univerjs/core/facade','flipX','parse','getShapeType','_injector','getDrawingByParam','getStartConnectInfo','function','getShapeId','setShapeSolidFill','gradientStops','shapeType','setEndArrowSize','getConnectionSites','keys','SheetsShapeService','4917990XjGUeR','convertPositionCellToSheetOverGrid','endX','computeConnectorRouteLayout','cos','adjustValues','left','generateRandomId','borderEnabled','connectShapes','top','object','IRenderManagerService','insertShape','worldRect','newConnector','updateShape','ShapeLineTypeEnum','newShape','width','ShapeFillEnum','extend','getShapeData','FShape','1469128duKcdg','actualColumn','Module','drawId','setStartArrowType','ISheetSelectionRenderService','UniverEngineRender','getBasicShapeRotateBound','SolidFil','startArrow','GradientFill','resizeEnabled','ShapeGradientTypeEnum','_resolveExistingOrFreeEndpoint','getAdjustValueByName','endArrow','@univerjs/sheets-ui','build'];_0x53a1=function(){return _0x2b86db;};return _0x53a1();}
|