@univerjs-pro/sheets-shape 0.21.1 → 0.22.0-insiders.20260513-09bbeca

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 CHANGED
@@ -1,30 +1,36 @@
1
1
  # @univerjs-pro/sheets-shape
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@univerjs-pro/sheets-shape)](https://npmjs.org/packages/@univerjs-pro/sheets-shape)
4
- [![license](https://img.shields.io/npm/l/@univerjs-pro/sheets-shape)](https://img.shields.io/npm/l/@univerjs-pro/sheets-shape)
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs-pro/sheets-shape?style=flat-square)](https://npmjs.com/package/@univerjs-pro/sheets-shape)
4
+ [![downloads](https://img.shields.io/npm/dm/@univerjs-pro/sheets-shape?style=flat-square)](https://npmjs.com/package/@univerjs-pro/sheets-shape)
5
5
 
6
- ## Introduction
6
+ `@univerjs-pro/sheets-shape` provides shape and drawing model integration for Univer Sheets.
7
7
 
8
- Sheets Shape provides the core shape/drawing model and services for Univer Sheets. It allows users to insert, update, and remove various shapes (rectangles, circles, connectors, etc.) on spreadsheet worksheets. This package handles shape data management, mutations, and the underlying shape model logic. It is typically used together with `@univerjs-pro/sheets-shape-ui`, which provides the UI interactions for shapes.
8
+ ## Package Overview
9
9
 
10
- ## Usage
11
-
12
- ### Installation
10
+ | Package | UMD global | CSS | Locales | Facade entry |
11
+ | --- | --- | :---: | :---: | :---: |
12
+ | `@univerjs-pro/sheets-shape` | `UniverProSheetsShape` | No | No | Yes |
13
13
 
14
- ```shell
15
- # Using npm
16
- npm install @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
14
+ ## Installation
17
15
 
18
- # Using pnpm
19
- pnpm add @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
16
+ ```sh
17
+ pnpm add @univerjs-pro/sheets-shape
18
+ # or
19
+ npm install @univerjs-pro/sheets-shape
20
20
  ```
21
21
 
22
- ### Import
22
+ Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
23
+
24
+ ## Usage
23
25
 
24
26
  ```ts
25
27
  import { UniverSheetsShapePlugin } from '@univerjs-pro/sheets-shape';
26
- import { UniverSheetsShapeUIPlugin } from '@univerjs-pro/sheets-shape-ui';
27
28
 
28
29
  univer.registerPlugin(UniverSheetsShapePlugin);
29
- univer.registerPlugin(UniverSheetsShapeUIPlugin);
30
30
  ```
31
+
32
+ ## Resources
33
+
34
+ - [Documentation](https://docs.univer.ai/guides/pro)
35
+ - [NPM package](https://npmjs.com/package/@univerjs-pro/sheets-shape)
36
+
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x5dce(_0x268913,_0x3dbc12){_0x268913=_0x268913-0xac;const _0x542693=_0x5426();let _0x5dce90=_0x542693[_0x268913];return _0x5dce90;}const _0x50d3b2=_0x5dce;(function(_0x1a1c33,_0x4dc714){const _0x47e22d=_0x5dce,_0x241ae8=_0x1a1c33();while(!![]){try{const _0x564841=-parseInt(_0x47e22d(0x139))/0x1*(-parseInt(_0x47e22d(0x12d))/0x2)+-parseInt(_0x47e22d(0xd8))/0x3+parseInt(_0x47e22d(0x114))/0x4+-parseInt(_0x47e22d(0xea))/0x5+-parseInt(_0x47e22d(0x116))/0x6+-parseInt(_0x47e22d(0xe3))/0x7+-parseInt(_0x47e22d(0x121))/0x8*(-parseInt(_0x47e22d(0xc0))/0x9);if(_0x564841===_0x4dc714)break;else _0x241ae8['push'](_0x241ae8['shift']());}catch(_0x2421b9){_0x241ae8['push'](_0x241ae8['shift']());}}}(_0x5426,0x259bf),Object[_0x50d3b2(0x10b)](exports,Symbol[_0x50d3b2(0x112)],{'value':_0x50d3b2(0xcb)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x50d3b2(0x134)]{get['ShapeTypeEnum'](){const _0x423db3=_0x50d3b2;return _univerjs_pro_engine_shape[_0x423db3(0xfc)];}get[_0x50d3b2(0x132)](){return _univerjs_pro_engine_shape['ShapeFillEnum'];}get[_0x50d3b2(0x110)](){const _0x12c239=_0x50d3b2;return _univerjs_pro_engine_shape[_0x12c239(0x110)];}get[_0x50d3b2(0x11e)](){const _0x29dbe0=_0x50d3b2;return _univerjs_pro_engine_shape[_0x29dbe0(0x11e)];}get[_0x50d3b2(0x137)](){const _0x4054a1=_0x50d3b2;return _univerjs_pro_engine_shape[_0x4054a1(0x137)];}get[_0x50d3b2(0xae)](){const _0x29283e=_0x50d3b2;return _univerjs_pro_engine_shape[_0x29283e(0xae)];}get[_0x50d3b2(0x100)](){const _0x4b2e7c=_0x50d3b2;return _univerjs_pro_engine_shape[_0x4b2e7c(0x100)];}get[_0x50d3b2(0x12a)](){const _0x5bb496=_0x50d3b2;return _univerjs_pro_engine_shape[_0x5bb496(0x12a)];}get[_0x50d3b2(0xc8)](){const _0x448e5f=_0x50d3b2;return _univerjs_pro_engine_shape[_0x448e5f(0xc8)];}};function _0x5426(){const _0x18190c=['ShapeLineTypeEnum','lineType','adjustValues','24NbcMnN','_preloadShapeProperties','shape','IDrawingManagerService','newShape','setStartArrowSize','parse','NoFill','setStrokeColor','ShapeArrowTypeEnum','constructor','isLineShape','7894VafFgW','getStartConnectInfo','getShapeType','fillType','string','ShapeFillEnum','index','FEnum','getBasicShapeRotateBound','fill','ShapeLineDashEnum','updateContext','63ONVPrX','connectionSiteIndex','object','shapeId','lineStrokeType','length','sin','ShapeLineCapEnum','setShapeType','DEFAULT_SHAPE_WIDTH','worldRect','getShapeModel','setWidth','_resolveExistingOrFreeEndpoint','InsertShapeCommand','setStrokeOpacity','ConnectorCoordinateTransform','cxnIndex','gradientStops','getUnitId','keys','UpdateConnectorRelationCommand','SetShapeDrawingDataCommand','getDrawingPoints','GradientFill','519723JFBzBz','push','shapeType','height','entries','flipY','color','shapeData','ShapeArrowSizeEnum','relation','convertPositionCellToSheetOverGrid','Module','prototype','getSheetId','setStartArrowType','getShapeData','capType','_commandService','setEndArrowType','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','FShape','cos','startArrow','setNoneFill','461778VkYeNU','setStrokeLineJoinType','find',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','\x20not\x20found','drawId','get','ensureSkeleton','function','gradientType','routeConnectorLineShape','464849HQMwum','getSize','getShapeId','symbol','getPosition','call','getConnectionSiteList','1217620GaqOKh','RemoveSheetDrawingCommand','_resolveEndpoints','SheetsShapeService','type','generateRandomId','FConnectorShape','width','ISheetDrawingService','build','DRAWING_SHAPE','DrawingTypeEnum','iterator','unitId','from','localToWorld','executeCommand','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ShapeTypeEnum','getShapeRelation','top','transform','ShapeLineJoinEnum','subUnitId','endArrow','setShapeSolidFill','Skeleton\x20for\x20unitId\x20','setStrokeLineCapType','getEndConnectInfo','stroke','getConnectorLinePoints','setEndArrowSize','FWorksheet','defineProperty','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','opacity','drawingType','rotation','ShapeGradientTypeEnum','DEFAULT_SHAPE_HEIGHT','toStringTag','getWorkbook','1193432NSBxgX','lineJoinType','614136azVukd','_injector','getDrawingByParam','\x20and\x20subUnitId\x20','isConnectorShape','SheetSkeletonService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','left'];_0x5426=function(){return _0x18190c;};return _0x5426();}_univerjs_core_facade[_0x50d3b2(0x134)]['extend'](FSheetsShapeEnumMixin);function _typeof(_0x3d2dbc){'@babel/helpers - typeof';const _0x11c888=_0x50d3b2;return _typeof=_0x11c888(0xe0)==typeof Symbol&&_0x11c888(0xe6)==typeof Symbol[_0x11c888(0xf6)]?function(_0x2e86e9){return typeof _0x2e86e9;}:function(_0xd4424e){const _0x222ffa=_0x11c888;return _0xd4424e&&'function'==typeof Symbol&&_0xd4424e[_0x222ffa(0x12b)]===Symbol&&_0xd4424e!==Symbol[_0x222ffa(0xcc)]?_0x222ffa(0xe6):typeof _0xd4424e;},_typeof(_0x3d2dbc);}function toPrimitive(_0x4e9bbe,_0x2b8ae9){const _0x2cce8a=_0x50d3b2;if(_0x2cce8a(0x13b)!=_typeof(_0x4e9bbe)||!_0x4e9bbe)return _0x4e9bbe;var _0x30ba4a=_0x4e9bbe[Symbol['toPrimitive']];if(void 0x0!==_0x30ba4a){var _0x502e64=_0x30ba4a[_0x2cce8a(0xe8)](_0x4e9bbe,_0x2b8ae9||'default');if(_0x2cce8a(0x13b)!=_typeof(_0x502e64))return _0x502e64;throw new TypeError(_0x2cce8a(0x11c));}return('string'===_0x2b8ae9?String:Number)(_0x4e9bbe);}function toPropertyKey(_0x1c11e7){const _0x38783d=_0x50d3b2;var _0x1a3cb6=toPrimitive(_0x1c11e7,_0x38783d(0x131));return'symbol'==_typeof(_0x1a3cb6)?_0x1a3cb6:_0x1a3cb6+'';}function _defineProperty(_0x598c3a,_0x28a1b7,_0x1f579c){const _0x25a1c2=_0x50d3b2;return(_0x28a1b7=toPropertyKey(_0x28a1b7))in _0x598c3a?Object[_0x25a1c2(0x10b)](_0x598c3a,_0x28a1b7,{'value':_0x1f579c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x598c3a[_0x28a1b7]=_0x1f579c,_0x598c3a;}var FShape=class{constructor(_0x2e094d,_0xdaabd4,_0x173d30,_0x2b119b){const _0x5a1e84=_0x50d3b2;_defineProperty(this,_0x5a1e84(0xf7),void 0x0),_defineProperty(this,_0x5a1e84(0x101),void 0x0),_defineProperty(this,_0x5a1e84(0xdd),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x5a1e84(0xb0)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x5a1e84(0x111)]),_defineProperty(this,'shapeType',void 0x0),_defineProperty(this,_0x5a1e84(0xc7),{}),_defineProperty(this,_0x5a1e84(0x117),void 0x0),this[_0x5a1e84(0xf7)]=_0x2e094d,this['subUnitId']=_0xdaabd4,this[_0x5a1e84(0xdd)]=_0x173d30||(0x0,_univerjs_core[_0x5a1e84(0xef)])(),this[_0x5a1e84(0x117)]=_0x2b119b;}['setPosition'](_0x1127f7,_0xb13679,_0x550ebd,_0x42bb55){const _0x552da4=_0x50d3b2,_0x332f4b=this['_injector'][_0x552da4(0xde)](_univerjs_sheets['SheetSkeletonService'])[_0x552da4(0xdf)](this[_0x552da4(0xf7)],this[_0x552da4(0x101)]);if(!_0x332f4b)throw new Error(_0x552da4(0x104)+this[_0x552da4(0xf7)]+_0x552da4(0x119)+this[_0x552da4(0x101)]+_0x552da4(0xdc));const {transform:_0x4fc4c1}=(0x0,_univerjs_sheets[_0x552da4(0xca)])(this['unitId'],this['subUnitId'],{'row':_0x1127f7,'column':_0xb13679,'rowOffset':_0x550ebd,'columnOffset':_0x42bb55},0x1,0x1,_0x332f4b);return this['x']=_0x4fc4c1[_0x552da4(0x11d)],this['y']=_0x4fc4c1[_0x552da4(0xfe)],this;}['setAbsolutePosition'](_0x36048a,_0x4901b6){return this['x']=_0x36048a,this['y']=_0x4901b6,this;}[_0x50d3b2(0xaf)](_0x1727c6){const _0x280b68=_0x50d3b2;return this[_0x280b68(0xc2)]=_0x1727c6,this;}[_0x50d3b2(0x103)](_0x551665,_0x57cf65){const _0x355662=_0x50d3b2;if(!this[_0x355662(0xc7)][_0x355662(0x136)])this[_0x355662(0xc7)]['fill']={};this[_0x355662(0xc7)][_0x355662(0x136)]['fillType']=_univerjs_pro_engine_shape[_0x355662(0x132)]['SolidFill'];if(_0x551665!==void 0x0)this['shapeData']['fill']['color']=_0x551665;if(_0x57cf65!==void 0x0)this[_0x355662(0xc7)][_0x355662(0x136)][_0x355662(0x10d)]=_0x57cf65;return this;}['setShapeGradientFill'](_0x337459,_0x42fa31,_0x2821a8){const _0x4a622c=_0x50d3b2;if(_0x42fa31===void 0x0||_0x42fa31[_0x4a622c(0xac)]===0x0)throw new Error(_0x4a622c(0xd3));if(!this[_0x4a622c(0xc7)][_0x4a622c(0x136)])this[_0x4a622c(0xc7)]['fill']={};this[_0x4a622c(0xc7)][_0x4a622c(0x136)][_0x4a622c(0xb9)]=_0x42fa31,this[_0x4a622c(0xc7)][_0x4a622c(0x136)][_0x4a622c(0x130)]=_univerjs_pro_engine_shape[_0x4a622c(0x132)][_0x4a622c(0xbf)],this['shapeData'][_0x4a622c(0x136)][_0x4a622c(0xe1)]=_0x337459;if(_0x2821a8!==void 0x0)this['shapeData'][_0x4a622c(0x136)]['gradientAngle']=_0x2821a8;return this;}[_0x50d3b2(0xd7)](){const _0x2212ba=_0x50d3b2;return this['shapeData'][_0x2212ba(0x136)]={'fillType':_univerjs_pro_engine_shape['ShapeFillEnum'][_0x2212ba(0x128)]},this;}[_0x50d3b2(0x129)](_0x1570de){const _0x56ded9=_0x50d3b2;if(!this[_0x56ded9(0xc7)][_0x56ded9(0x107)])this['shapeData'][_0x56ded9(0x107)]={};return this[_0x56ded9(0xc7)][_0x56ded9(0x107)][_0x56ded9(0xc6)]=_0x1570de,this;}['setStrokeWidth'](_0x5d8ad4){const _0x2c08a2=_0x50d3b2;if(!this[_0x2c08a2(0xc7)][_0x2c08a2(0x107)])this[_0x2c08a2(0xc7)]['stroke']={};return this['shapeData'][_0x2c08a2(0x107)][_0x2c08a2(0xf1)]=_0x5d8ad4,this;}['setStrokeLineDashType'](_0x3798ce){const _0x36e35b=_0x50d3b2;if(!this[_0x36e35b(0xc7)]['stroke'])this[_0x36e35b(0xc7)][_0x36e35b(0x107)]={};return this[_0x36e35b(0xc7)][_0x36e35b(0x107)]['dashType']=_0x3798ce,this;}[_0x50d3b2(0xd9)](_0x17294f){const _0x57f75b=_0x50d3b2;if(!this[_0x57f75b(0xc7)][_0x57f75b(0x107)])this[_0x57f75b(0xc7)][_0x57f75b(0x107)]={};return this[_0x57f75b(0xc7)][_0x57f75b(0x107)][_0x57f75b(0x115)]=_0x17294f,this;}[_0x50d3b2(0x105)](_0x44def4){const _0x28c5f1=_0x50d3b2;if(!this[_0x28c5f1(0xc7)][_0x28c5f1(0x107)])this[_0x28c5f1(0xc7)]['stroke']={};return this[_0x28c5f1(0xc7)][_0x28c5f1(0x107)][_0x28c5f1(0xd0)]=_0x44def4,this;}[_0x50d3b2(0xb6)](_0x570f89){const _0x52d55b=_0x50d3b2;if(!this[_0x52d55b(0xc7)][_0x52d55b(0x107)])this[_0x52d55b(0xc7)]['stroke']={};return this['shapeData']['stroke']['opacity']=_0x570f89,this;}['setStrokeLineType'](_0x4f02e8){const _0x183f98=_0x50d3b2;if(!this[_0x183f98(0xc7)][_0x183f98(0x107)])this['shapeData']['stroke']={};return this['shapeData'][_0x183f98(0x107)][_0x183f98(0x13d)]=_0x4f02e8,this;}[_0x50d3b2(0xb3)](_0x254822){const _0x21275a=_0x50d3b2;return this[_0x21275a(0xf1)]=_0x254822,this;}['setHeight'](_0x457905){return this['height']=_0x457905,this;}[_0x50d3b2(0x12c)](){const _0x1a3f21=_0x50d3b2,_0x3e7f7d=this['_injector'][_0x1a3f21(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x1a3f21(0xb2)](this[_0x1a3f21(0xf7)],this[_0x1a3f21(0x101)],this['drawId']);if(_0x3e7f7d)return(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x3e7f7d[_0x1a3f21(0x12f)]());if(this[_0x1a3f21(0xc2)])return(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(this['shapeType']);return![];}['getConnectionSites'](){const _0x262f9a=_0x50d3b2,_0x245074=this['_injector'][_0x262f9a(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x262f9a(0xb2)](this[_0x262f9a(0xf7)],this['subUnitId'],this['drawId']);if(!_0x245074)return[];const _0x24445b=this[_0x262f9a(0x117)]['get'](_univerjs_drawing[_0x262f9a(0x124)])[_0x262f9a(0x118)]({'unitId':this['unitId'],'subUnitId':this[_0x262f9a(0x101)],'drawingId':this[_0x262f9a(0xdd)]});if(!(_0x24445b===null||_0x24445b===void 0x0?void 0x0:_0x24445b[_0x262f9a(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x24445b[_0x262f9a(0xff)];return _0x245074['updateContext']({'width':width,'height':height}),_0x245074[_0x262f9a(0xe9)]();}['getAdjustPoints'](){const _0x9ea6d5=_0x50d3b2,_0x3ddc8a=this['_injector']['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x9ea6d5(0xf7)],this['subUnitId'],this['drawId']);if(!_0x3ddc8a)return[];const _0x5c64ba=this['_injector'][_0x9ea6d5(0xde)](_univerjs_drawing[_0x9ea6d5(0x124)])[_0x9ea6d5(0x118)]({'unitId':this['unitId'],'subUnitId':this[_0x9ea6d5(0x101)],'drawingId':this[_0x9ea6d5(0xdd)]});if(!(_0x5c64ba===null||_0x5c64ba===void 0x0?void 0x0:_0x5c64ba[_0x9ea6d5(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x5c64ba[_0x9ea6d5(0xff)];return _0x3ddc8a[_0x9ea6d5(0x138)]({'width':width,'height':height}),_0x3ddc8a[_0x9ea6d5(0xbe)]();}[_0x50d3b2(0x108)](){const _0x4193a6=_0x50d3b2,_0x2b2f02=this[_0x4193a6(0x117)]['get'](_univerjs_pro_sheets_shape[_0x4193a6(0xed)])[_0x4193a6(0xb2)](this['unitId'],this[_0x4193a6(0x101)],this[_0x4193a6(0xdd)]);if(!_0x2b2f02)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x4193a6(0x11a)])(_0x2b2f02[_0x4193a6(0x12f)]()))return[];const _0x1668ba=this[_0x4193a6(0x117)][_0x4193a6(0xde)](_univerjs_drawing['IDrawingManagerService'])[_0x4193a6(0x118)]({'unitId':this[_0x4193a6(0xf7)],'subUnitId':this[_0x4193a6(0x101)],'drawingId':this['drawId']});if(!(_0x1668ba===null||_0x1668ba===void 0x0?void 0x0:_0x1668ba[_0x4193a6(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x1668ba[_0x4193a6(0xff)];return _0x2b2f02[_0x4193a6(0x138)]({'width':width,'height':height}),_0x2b2f02[_0x4193a6(0x108)]();}[_0x50d3b2(0x12e)](){const _0x18f3a1=_0x50d3b2;var _0x335188;const _0x103d7a=this['_injector'][_0x18f3a1(0xde)](_univerjs_pro_sheets_shape[_0x18f3a1(0xed)])[_0x18f3a1(0xb2)](this[_0x18f3a1(0xf7)],this['subUnitId'],this['drawId']);if(!_0x103d7a)return null;return(_0x335188=_0x103d7a[_0x18f3a1(0x12e)]())!==null&&_0x335188!==void 0x0?_0x335188:null;}[_0x50d3b2(0x106)](){const _0xf6cc08=_0x50d3b2;var _0x5f0acf;const _0x44a89b=this['_injector'][_0xf6cc08(0xde)](_univerjs_pro_sheets_shape[_0xf6cc08(0xed)])[_0xf6cc08(0xb2)](this['unitId'],this[_0xf6cc08(0x101)],this[_0xf6cc08(0xdd)]);if(!_0x44a89b)return null;return(_0x5f0acf=_0x44a89b[_0xf6cc08(0x106)]())!==null&&_0x5f0acf!==void 0x0?_0x5f0acf:null;}[_0x50d3b2(0xf3)](){const _0x343e06=_0x50d3b2;var _0x2d679b,_0x1a6e16;if(!this[_0x343e06(0xc2)])throw new Error(_0x343e06(0x10c));if(this['x']===0x0||this['y']===0x0){const _0x3e9552=this[_0x343e06(0x117)][_0x343e06(0xde)](_univerjs_sheets[_0x343e06(0x11b)])['ensureSkeleton'](this[_0x343e06(0xf7)],this[_0x343e06(0x101)]);if(!_0x3e9552)throw new Error(_0x343e06(0x104)+this[_0x343e06(0xf7)]+'\x20and\x20subUnitId\x20'+this[_0x343e06(0x101)]+_0x343e06(0xdc));const {transform:_0x1baeab}=(0x0,_univerjs_sheets[_0x343e06(0xca)])(this[_0x343e06(0xf7)],this[_0x343e06(0x101)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x3e9552);this['x']=this['x']>0x0?this['x']:_0x1baeab['left'],this['y']=this['y']>0x0?this['y']:_0x1baeab[_0x343e06(0xfe)];}return this[_0x343e06(0xf1)]=(_0x2d679b=this['width'])!==null&&_0x2d679b!==void 0x0?_0x2d679b:_univerjs_pro_sheets_shape[_0x343e06(0xb0)],this['height']=(_0x1a6e16=this[_0x343e06(0xc3)])!==null&&_0x1a6e16!==void 0x0?_0x1a6e16:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT'],{'unitId':this[_0x343e06(0xf7)],'subUnitId':this[_0x343e06(0x101)],'shapeId':this[_0x343e06(0xdd)],'shapeType':this[_0x343e06(0xc2)],'shapeData':Object[_0x343e06(0xbb)](this[_0x343e06(0xc7)])[_0x343e06(0xac)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x343e06(0xc3)]};}[_0x50d3b2(0xe5)](){const _0x13336a=_0x50d3b2;return this[_0x13336a(0xdd)];}[_0x50d3b2(0x12f)](){const _0x2b199d=_0x50d3b2;return this[_0x2b199d(0xc2)];}[_0x50d3b2(0xcf)](){return this['shapeData'];}[_0x50d3b2(0xe7)](){return{'x':this['x'],'y':this['y']};}[_0x50d3b2(0xe4)](){const _0x4db91c=_0x50d3b2;return{'width':this[_0x4db91c(0xf1)],'height':this[_0x4db91c(0xc3)]};}},FConnectorShape=class extends FShape{constructor(_0x4549e7,_0x62a85d,_0x212246,_0x14ff2e){super(_0x4549e7,_0x62a85d,_0x212246,_0x14ff2e),_defineProperty(this,'shapeData',{});}[_0x50d3b2(0xaf)](_0x4f7218){const _0x153830=_0x50d3b2;if(!(0x0,_univerjs_pro_engine_shape[_0x153830(0x11a)])(_0x4f7218))throw new Error(_0x153830(0xfb)+_0x4f7218+_0x153830(0xdb));return super['setShapeType'](_0x4f7218),this;}[_0x50d3b2(0xce)](_0x4665c7){const _0x55ab8a=_0x50d3b2;var _0x488810,_0x282eac;if(!((_0x488810=this[_0x55ab8a(0xc7)])===null||_0x488810===void 0x0?void 0x0:_0x488810['ln']))this[_0x55ab8a(0xc7)]['ln']={};if(!((_0x282eac=this['shapeData'])===null||_0x282eac===void 0x0||(_0x282eac=_0x282eac['ln'])===null||_0x282eac===void 0x0?void 0x0:_0x282eac['startArrow']))this[_0x55ab8a(0xc7)]['ln'][_0x55ab8a(0xd6)]={};return this[_0x55ab8a(0xc7)]['ln']['startArrow'][_0x55ab8a(0xee)]=_0x4665c7,this;}[_0x50d3b2(0xd2)](_0xc1aaa2){const _0x384ea2=_0x50d3b2;var _0x4820c1,_0x42cbff;if(!((_0x4820c1=this[_0x384ea2(0xc7)])===null||_0x4820c1===void 0x0?void 0x0:_0x4820c1['ln']))this[_0x384ea2(0xc7)]['ln']={};if(!((_0x42cbff=this[_0x384ea2(0xc7)])===null||_0x42cbff===void 0x0||(_0x42cbff=_0x42cbff['ln'])===null||_0x42cbff===void 0x0?void 0x0:_0x42cbff[_0x384ea2(0x102)]))this[_0x384ea2(0xc7)]['ln'][_0x384ea2(0x102)]={};return this[_0x384ea2(0xc7)]['ln'][_0x384ea2(0x102)][_0x384ea2(0xee)]=_0xc1aaa2,this;}[_0x50d3b2(0x126)](_0x14fdb3){const _0x46e65e=_0x50d3b2;var _0x2e60e3,_0x369a01;if(!((_0x2e60e3=this['shapeData'])===null||_0x2e60e3===void 0x0?void 0x0:_0x2e60e3['ln']))this[_0x46e65e(0xc7)]['ln']={};if(!((_0x369a01=this[_0x46e65e(0xc7)])===null||_0x369a01===void 0x0||(_0x369a01=_0x369a01['ln'])===null||_0x369a01===void 0x0?void 0x0:_0x369a01['startArrow']))this[_0x46e65e(0xc7)]['ln'][_0x46e65e(0xd6)]={};return this[_0x46e65e(0xc7)]['ln'][_0x46e65e(0xd6)]['size']=_0x14fdb3,this;}[_0x50d3b2(0x109)](_0xeea96e){const _0x4cc9f9=_0x50d3b2;var _0xe4a0fb,_0x4c547d;if(!((_0xe4a0fb=this[_0x4cc9f9(0xc7)])===null||_0xe4a0fb===void 0x0?void 0x0:_0xe4a0fb['ln']))this['shapeData']['ln']={};if(!((_0x4c547d=this['shapeData'])===null||_0x4c547d===void 0x0||(_0x4c547d=_0x4c547d['ln'])===null||_0x4c547d===void 0x0?void 0x0:_0x4c547d[_0x4cc9f9(0x102)]))this[_0x4cc9f9(0xc7)]['ln'][_0x4cc9f9(0x102)]={};return this[_0x4cc9f9(0xc7)]['ln'][_0x4cc9f9(0x102)]['size']=_0xeea96e,this;}[_0x50d3b2(0xf3)](){return super['build']();}['getEndConnectInfo'](){const _0x2d0368=_0x50d3b2;var _0x3510b5;return((_0x3510b5=this[_0x2d0368(0xc7)])===null||_0x3510b5===void 0x0||(_0x3510b5=_0x3510b5[_0x2d0368(0xc9)])===null||_0x3510b5===void 0x0?void 0x0:_0x3510b5['to'])||null;}[_0x50d3b2(0x12e)](){const _0x1c2969=_0x50d3b2;var _0x21b3f2;return((_0x21b3f2=this[_0x1c2969(0xc7)])===null||_0x21b3f2===void 0x0||(_0x21b3f2=_0x21b3f2[_0x1c2969(0xc9)])===null||_0x21b3f2===void 0x0?void 0x0:_0x21b3f2['from'])||null;}};function computeConnectionPointInfo(_0x35fa70,_0x26c5a6,_0x585a6f,_0x3d4849,_0xebea6b,_0x1b5560){const _0x4ecced=_0x50d3b2,_0x221dcb=_0xebea6b[_0x4ecced(0xb2)](_0x35fa70,_0x26c5a6,_0x585a6f);if(!_0x221dcb)return null;const _0x47d147=_0x1b5560['getDrawingByParam']({'unitId':_0x35fa70,'subUnitId':_0x26c5a6,'drawingId':_0x585a6f});if(!(_0x47d147===null||_0x47d147===void 0x0?void 0x0:_0x47d147[_0x4ecced(0xff)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x269de5}=_0x47d147[_0x4ecced(0xff)];_0x221dcb[_0x4ecced(0x138)]({'width':width,'height':height});const _0x1a4594=_0x221dcb[_0x4ecced(0xe9)]()[_0x4ecced(0xda)](_0x56dfd1=>_0x56dfd1[_0x4ecced(0x133)]===_0x3d4849);if(!_0x1a4594)return null;let _0x3fcebf=flipX?width-_0x1a4594['x']:_0x1a4594['x'],_0x4ba150=flipY?height-_0x1a4594['y']:_0x1a4594['y'];if(_0x269de5&&_0x269de5!==0x0){const _0x24e2be=_0x269de5*Math['PI']/0xb4,_0x1fad7e=Math[_0x4ecced(0xd5)](_0x24e2be),_0x2c06b9=Math[_0x4ecced(0xad)](_0x24e2be),_0x5e8562=width/0x2,_0x2cf8b5=height/0x2,_0x480980=_0x3fcebf-_0x5e8562,_0x4ae961=_0x4ba150-_0x2cf8b5;_0x3fcebf=_0x5e8562+_0x480980*_0x1fad7e-_0x4ae961*_0x2c06b9,_0x4ba150=_0x2cf8b5+_0x480980*_0x2c06b9+_0x4ae961*_0x1fad7e;}_0x3fcebf+=left,_0x4ba150+=top;let _0x58eb0d=_0x1a4594['ang']/0xea60;if(flipX)_0x58eb0d=0xb4-_0x58eb0d;if(flipY)_0x58eb0d=-_0x58eb0d;_0x58eb0d+=_0x269de5||0x0,_0x58eb0d=(_0x58eb0d%0x168+0x168)%0x168;const _0xb03560=(0x0,_univerjs_pro_engine_shape[_0x4ecced(0x135)])({'left':left,'top':top,'width':width,'height':height},_0x269de5||0x0);return{'point':{'x':_0x3fcebf,'y':_0x4ba150},'angle':_0x58eb0d,'bounds':_0xb03560};}function calculateFreeEndpointAngle(_0x32acd6,_0x892ccc){const _0x5d035d=_0x892ccc['x']-_0x32acd6['x'],_0x3e0d77=_0x892ccc['y']-_0x32acd6['y'];if(Math['abs'](_0x5d035d)>=Math['abs'](_0x3e0d77))return _0x5d035d>=0x0?0xb4:0x0;return _0x3e0d77>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x400cd4,_0x34c7be,_0x32131c,_0x4937fb,_0x45aa42,_0x3cbe31,_0x184eaf){const _0x2bfa6b=_0x50d3b2,_0x427311=_0x3cbe31[_0x2bfa6b(0xb2)](_0x400cd4,_0x34c7be,_0x32131c);if(!_0x427311)return null;const _0x28c1cd=_0x184eaf[_0x2bfa6b(0x118)]({'unitId':_0x400cd4,'subUnitId':_0x34c7be,'drawingId':_0x32131c});if(!(_0x28c1cd===null||_0x28c1cd===void 0x0?void 0x0:_0x28c1cd[_0x2bfa6b(0xff)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x28c1cd[_0x2bfa6b(0xff)];_0x427311[_0x2bfa6b(0x138)]({'width':width,'height':height});const _0xa1550e=_0x427311[_0x2bfa6b(0x108)]();if(_0xa1550e[_0x2bfa6b(0xac)]<0x2)return null;const _0x29f9f1=_0x4937fb?_0xa1550e[0x0]:_0xa1550e[_0xa1550e['length']-0x1],_0x262e5b=new _univerjs_pro_engine_shape[(_0x2bfa6b(0xb7))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x2bfa6b(0xf9)](_0x29f9f1);return{'point':_0x262e5b,'angle':calculateFreeEndpointAngle(_0x45aa42['point'],_0x262e5b),'bounds':{'left':_0x262e5b['x'],'top':_0x262e5b['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x50d3b2(0x10a)]{async['insertShape'](_0xeaec9c){const _0x1feabc=_0x50d3b2,{unitId:_0x37b77e,subUnitId:_0x29b46e,shapeId:_0x164849,shapeType:_0x7a74bd,shapeData:_0x5eb9e4,x:_0x205926,y:_0x5d1a49,width:_0x36f445,height:_0x32bebf}=_0xeaec9c;return this['_commandService'][_0x1feabc(0xfa)](_univerjs_pro_sheets_shape[_0x1feabc(0xb5)]['id'],{'unitId':_0x37b77e,'subUnitId':_0x29b46e,'shapeId':_0x164849,'shapeType':_0x7a74bd,'shapeData':_0x5eb9e4,'position':{'x':_0x205926,'y':_0x5d1a49},'width':_0x36f445,'height':_0x32bebf});}async['updateShape'](_0xf9db04){const _0x4f60aa=_0x50d3b2,{unitId:_0x41f834,subUnitId:_0x17898b,shapeId:_0x53df1f,shapeType:_0x12b268,shapeData:_0x3f3309,x:_0x1bd4b5,y:_0x3c4634,width:_0x1feeb6,height:_0x55fcab}=_0xf9db04;return this[_0x4f60aa(0xd1)][_0x4f60aa(0xfa)](_univerjs_pro_sheets_shape[_0x4f60aa(0xbd)]['id'],{'unitId':_0x41f834,'subUnitId':_0x17898b,'shapeId':_0x53df1f,'shapeType':_0x12b268,'shapeData':_0x3f3309,'position':{'x':_0x1bd4b5,'y':_0x3c4634},'width':_0x1feeb6,'height':_0x55fcab});}[_0x50d3b2(0x125)](_0x4e43b4){const _0x4d7d17=_0x50d3b2,_0x121a2c=this[_0x4d7d17(0x113)]()[_0x4d7d17(0xba)](),_0x354b21=this[_0x4d7d17(0xcd)]();if(_0x4e43b4){const _0x65e269=new FShape(_0x121a2c,_0x354b21,_0x4e43b4['drawId'],this['_injector']);return this['_preloadShapeProperties'](_0x65e269,_0x121a2c,_0x354b21,_0x4e43b4['drawId']),_0x65e269;}return new FShape(_0x121a2c,_0x354b21,(0x0,_univerjs_core[_0x4d7d17(0xef)])(),this['_injector']);}['newConnector'](_0x21f796){const _0x47aa58=_0x50d3b2,_0x44f2e2=this[_0x47aa58(0x113)]()[_0x47aa58(0xba)](),_0x1093f1=this[_0x47aa58(0xcd)]();if(_0x21f796){const _0x4daca2=new FConnectorShape(_0x44f2e2,_0x1093f1,_0x21f796[_0x47aa58(0xdd)],this[_0x47aa58(0x117)]);return this[_0x47aa58(0x122)](_0x4daca2,_0x44f2e2,_0x1093f1,_0x21f796[_0x47aa58(0xdd)]),_0x4daca2;}return new FConnectorShape(_0x44f2e2,_0x1093f1,(0x0,_univerjs_core['generateRandomId'])(),this[_0x47aa58(0x117)]);}['getShapes'](){const _0x4db511=_0x50d3b2,_0x2bdfe6=this[_0x4db511(0x117)][_0x4db511(0xde)](_univerjs_sheets_drawing[_0x4db511(0xf2)]),_0x3a61e2=this[_0x4db511(0x113)]()['getUnitId'](),_0x523108=this['getSheetId'](),_0x473eb8=_0x2bdfe6['getDrawingData'](_0x3a61e2,_0x523108);if(!_0x473eb8)return[];const _0x3bf277=[];for(const [_0x1cd2cd,_0x33c1fb]of Object[_0x4db511(0xc4)](_0x473eb8))if(_0x33c1fb&&_0x33c1fb[_0x4db511(0x10e)]===_univerjs_core[_0x4db511(0xf5)][_0x4db511(0xf4)]){const _0x4ab641=new FShape(_0x3a61e2,_0x523108,_0x1cd2cd,this[_0x4db511(0x117)]);this[_0x4db511(0x122)](_0x4ab641,_0x3a61e2,_0x523108,_0x1cd2cd),_0x3bf277[_0x4db511(0xc1)](_0x4ab641);}return _0x3bf277;}['removeShape'](_0x34ffa9){const _0x5e6b6d=_0x50d3b2,{unitId:_0x152a33,subUnitId:_0x25800e,drawId:_0x322ede}=_0x34ffa9;return this[_0x5e6b6d(0xd1)][_0x5e6b6d(0xfa)](_univerjs_sheets_drawing[_0x5e6b6d(0xeb)]['id'],{'unitId':_0x152a33,'drawings':[{'unitId':_0x152a33,'subUnitId':_0x25800e,'drawingId':_0x322ede,'drawingType':_univerjs_core[_0x5e6b6d(0xf5)]['DRAWING_SHAPE']}]});}async['connectShapes'](_0x29c4e7){const _0x27f91d=_0x50d3b2,{connector:_0x1b70e7,startTarget:_0x479df6,endTarget:_0xbbe03f}=_0x29c4e7;if(!_0x479df6&&!_0xbbe03f)return![];const _0xad3d7e=this[_0x27f91d(0x113)]()[_0x27f91d(0xba)](),_0x389303=this[_0x27f91d(0xcd)](),_0xc4c8df=this[_0x27f91d(0x117)][_0x27f91d(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x31eb4d=this[_0x27f91d(0x117)][_0x27f91d(0xde)](_univerjs_drawing[_0x27f91d(0x124)]),_0x1e94c9=_0xc4c8df[_0x27f91d(0xb2)](_0xad3d7e,_0x389303,_0x1b70e7[_0x27f91d(0xdd)]);if(!_0x1e94c9)return![];const _0x2410d1=_0x1e94c9['getShapeType'](),_0x1c75c0=_0x1e94c9[_0x27f91d(0xfd)](),_0x458ef8={};for(const _0x4259a7 of _0x1e94c9['getAdjustNames']()){const _0x392ce9=_0x1e94c9['getAdjustValueByName'](_0x4259a7);if(_0x392ce9!==void 0x0)_0x458ef8[_0x4259a7]=_0x392ce9;}const {startInfo:_0x43424d,endInfo:_0x359489}=this[_0x27f91d(0xec)](_0xad3d7e,_0x389303,_0x1b70e7,_0x1e94c9,_0x479df6,_0xbbe03f,_0xc4c8df,_0x31eb4d,_0x1c75c0);if(!_0x43424d||!_0x359489)return![];const _0x37d69c=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape[_0x27f91d(0xe2)])(_0x43424d,_0x359489,_0x2410d1),_0x2410d1),_0x83c7ff={};if(_0x479df6)_0x83c7ff[_0x27f91d(0xf8)]={'shapeId':_0x479df6[_0x27f91d(0x123)][_0x27f91d(0xdd)],'cxnIndex':_0x479df6[_0x27f91d(0x13a)]};else{if(_0x1c75c0===null||_0x1c75c0===void 0x0?void 0x0:_0x1c75c0['from'])_0x83c7ff[_0x27f91d(0xf8)]=_0x1c75c0[_0x27f91d(0xf8)];}if(_0xbbe03f)_0x83c7ff['to']={'shapeId':_0xbbe03f[_0x27f91d(0x123)]['drawId'],'cxnIndex':_0xbbe03f[_0x27f91d(0x13a)]};else{if(_0x1c75c0===null||_0x1c75c0===void 0x0?void 0x0:_0x1c75c0['to'])_0x83c7ff['to']=_0x1c75c0['to'];}return this[_0x27f91d(0xd1)][_0x27f91d(0xfa)](_univerjs_pro_sheets_shape[_0x27f91d(0xbc)]['id'],{'unitId':_0xad3d7e,'subUnitId':_0x389303,'connectorShapeId':_0x1b70e7[_0x27f91d(0xdd)],'width':_0x37d69c['worldRect'][_0x27f91d(0xf1)],'height':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xc3)],'left':_0x37d69c[_0x27f91d(0xb1)]['left'],'top':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xfe)],'flipX':_0x37d69c['worldRect']['flipX']||![],'flipY':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xc5)]||![],'oldAdjustValues':_0x458ef8,'newAdjustValues':_0x37d69c[_0x27f91d(0x120)],'newLineType':_0x37d69c[_0x27f91d(0x11f)],'oldLineType':_0x2410d1,'rotation':_0x37d69c[_0x27f91d(0x10f)],'oldRelation':_0x1c75c0,'newRelation':_0x83c7ff});}['_preloadShapeProperties'](_0x516e81,_0xba3682,_0x378166,_0x3dc6fe){const _0x3bf36d=_0x50d3b2,_0x593681=this[_0x3bf36d(0x117)][_0x3bf36d(0xde)](_univerjs_drawing[_0x3bf36d(0x124)])[_0x3bf36d(0x118)]({'unitId':_0xba3682,'subUnitId':_0x378166,'drawingId':_0x3dc6fe});if(_0x593681===null||_0x593681===void 0x0?void 0x0:_0x593681[_0x3bf36d(0xff)]){var _0x2b6d25,_0x41bf74,_0x5b5e3b,_0x28ea50;_0x516e81['x']=(_0x2b6d25=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0x11d)])!==null&&_0x2b6d25!==void 0x0?_0x2b6d25:0x0,_0x516e81['y']=(_0x41bf74=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0xfe)])!==null&&_0x41bf74!==void 0x0?_0x41bf74:0x0,_0x516e81['width']=(_0x5b5e3b=_0x593681['transform']['width'])!==null&&_0x5b5e3b!==void 0x0?_0x5b5e3b:_0x516e81['width'],_0x516e81[_0x3bf36d(0xc3)]=(_0x28ea50=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0xc3)])!==null&&_0x28ea50!==void 0x0?_0x28ea50:_0x516e81['height'];}const _0x534614=this[_0x3bf36d(0x117)]['get'](_univerjs_pro_sheets_shape[_0x3bf36d(0xed)])[_0x3bf36d(0xb2)](_0xba3682,_0x378166,_0x3dc6fe);if(_0x534614){_0x516e81[_0x3bf36d(0xc2)]=_0x534614[_0x3bf36d(0x12f)]();const _0x4beda4=_0x534614['getShapeData']();if(_0x4beda4)_0x516e81[_0x3bf36d(0xc7)]=JSON[_0x3bf36d(0x127)](JSON['stringify'](_0x4beda4));}}[_0x50d3b2(0xec)](_0x13ad77,_0x5ec7bb,_0x4f7c02,_0x51ff77,_0x3b6fe6,_0x428deb,_0x198188,_0x37b7ed,_0x2bfd6f){const _0x3579b0=_0x50d3b2;let _0x239f96=null,_0x125465=null;if(_0x3b6fe6)_0x239f96=computeConnectionPointInfo(_0x13ad77,_0x5ec7bb,_0x3b6fe6[_0x3579b0(0x123)][_0x3579b0(0xdd)],_0x3b6fe6[_0x3579b0(0x13a)],_0x198188,_0x37b7ed);if(_0x428deb)_0x125465=computeConnectionPointInfo(_0x13ad77,_0x5ec7bb,_0x428deb[_0x3579b0(0x123)][_0x3579b0(0xdd)],_0x428deb[_0x3579b0(0x13a)],_0x198188,_0x37b7ed);if(!_0x239f96)_0x239f96=this[_0x3579b0(0xb4)](_0x13ad77,_0x5ec7bb,_0x4f7c02['drawId'],!![],_0x125465,_0x2bfd6f===null||_0x2bfd6f===void 0x0?void 0x0:_0x2bfd6f[_0x3579b0(0xf8)],_0x198188,_0x37b7ed);if(!_0x125465)_0x125465=this[_0x3579b0(0xb4)](_0x13ad77,_0x5ec7bb,_0x4f7c02[_0x3579b0(0xdd)],![],_0x239f96,_0x2bfd6f===null||_0x2bfd6f===void 0x0?void 0x0:_0x2bfd6f['to'],_0x198188,_0x37b7ed);return{'startInfo':_0x239f96,'endInfo':_0x125465};}[_0x50d3b2(0xb4)](_0x2d37f9,_0x439542,_0x1ca519,_0x46e70b,_0x151542,_0x4a96b5,_0x208aef,_0xa7f902){const _0x1122e3=_0x50d3b2;if(_0x4a96b5){const _0x4269cd=computeConnectionPointInfo(_0x2d37f9,_0x439542,_0x4a96b5[_0x1122e3(0x13c)],_0x4a96b5[_0x1122e3(0xb8)],_0x208aef,_0xa7f902);if(_0x4269cd)return _0x4269cd;}if(!_0x151542)return null;return computeFreeEndpointInfo(_0x2d37f9,_0x439542,_0x1ca519,_0x46e70b,_0x151542,_0x208aef,_0xa7f902);}};_univerjs_sheets_facade[_0x50d3b2(0x10a)]['extend'](FWorksheetShapeMixin),exports[_0x50d3b2(0xf0)]=FConnectorShape,exports[_0x50d3b2(0xd4)]=FShape;
1
+ const _0x2253a1=_0x56a7;(function(_0x1485c6,_0x4ca5a0){const _0x110c34=_0x56a7,_0x2b504d=_0x1485c6();while(!![]){try{const _0xd9ac53=-parseInt(_0x110c34(0x17b))/0x1+parseInt(_0x110c34(0x11a))/0x2+-parseInt(_0x110c34(0xf3))/0x3*(parseInt(_0x110c34(0x12f))/0x4)+parseInt(_0x110c34(0x13b))/0x5+parseInt(_0x110c34(0x158))/0x6+-parseInt(_0x110c34(0x116))/0x7+parseInt(_0x110c34(0x17d))/0x8*(parseInt(_0x110c34(0x142))/0x9);if(_0xd9ac53===_0x4ca5a0)break;else _0x2b504d['push'](_0x2b504d['shift']());}catch(_0x2df963){_0x2b504d['push'](_0x2b504d['shift']());}}}(_0x4f14,0xebd2d),Object[_0x2253a1(0x160)](exports,Symbol[_0x2253a1(0x17e)],{'value':_0x2253a1(0x136)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x2253a1(0x14b)]{get[_0x2253a1(0x14a)](){const _0x5cb2f4=_0x2253a1;return _univerjs_pro_engine_shape[_0x5cb2f4(0x14a)];}get[_0x2253a1(0xf1)](){const _0x118143=_0x2253a1;return _univerjs_pro_engine_shape[_0x118143(0xf1)];}get['ShapeGradientTypeEnum'](){return _univerjs_pro_engine_shape['ShapeGradientTypeEnum'];}get[_0x2253a1(0x113)](){return _univerjs_pro_engine_shape['ShapeLineTypeEnum'];}get[_0x2253a1(0xf0)](){const _0x5e6659=_0x2253a1;return _univerjs_pro_engine_shape[_0x5e6659(0xf0)];}get[_0x2253a1(0x137)](){const _0x222a14=_0x2253a1;return _univerjs_pro_engine_shape[_0x222a14(0x137)];}get[_0x2253a1(0x17f)](){return _univerjs_pro_engine_shape['ShapeLineJoinEnum'];}get[_0x2253a1(0x16d)](){const _0x5a81ae=_0x2253a1;return _univerjs_pro_engine_shape[_0x5a81ae(0x16d)];}get[_0x2253a1(0x12d)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade['FEnum'][_0x2253a1(0x135)](FSheetsShapeEnumMixin);function _typeof(_0x352171){'@babel/helpers - typeof';const _0x5d8f13=_0x2253a1;return _typeof=_0x5d8f13(0x11b)==typeof Symbol&&_0x5d8f13(0xef)==typeof Symbol[_0x5d8f13(0x140)]?function(_0xb4a2bd){return typeof _0xb4a2bd;}:function(_0x518f9f){const _0x34ea31=_0x5d8f13;return _0x518f9f&&_0x34ea31(0x11b)==typeof Symbol&&_0x518f9f[_0x34ea31(0x108)]===Symbol&&_0x518f9f!==Symbol[_0x34ea31(0x111)]?_0x34ea31(0xef):typeof _0x518f9f;},_typeof(_0x352171);}function toPrimitive(_0x50f904,_0x45e75c){const _0xe2268b=_0x2253a1;if('object'!=_typeof(_0x50f904)||!_0x50f904)return _0x50f904;var _0x358412=_0x50f904[Symbol[_0xe2268b(0x152)]];if(void 0x0!==_0x358412){var _0x2e8a11=_0x358412[_0xe2268b(0xfd)](_0x50f904,_0x45e75c||_0xe2268b(0x15b));if(_0xe2268b(0x16f)!=_typeof(_0x2e8a11))return _0x2e8a11;throw new TypeError(_0xe2268b(0x128));}return(_0xe2268b(0x11f)===_0x45e75c?String:Number)(_0x50f904);}function toPropertyKey(_0x3a9803){const _0x53703d=_0x2253a1;var _0x3cca9e=toPrimitive(_0x3a9803,_0x53703d(0x11f));return'symbol'==_typeof(_0x3cca9e)?_0x3cca9e:_0x3cca9e+'';}function _defineProperty(_0x4f8558,_0x2d3de1,_0x3d2d4b){const _0x5b2a74=_0x2253a1;return(_0x2d3de1=toPropertyKey(_0x2d3de1))in _0x4f8558?Object[_0x5b2a74(0x160)](_0x4f8558,_0x2d3de1,{'value':_0x3d2d4b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f8558[_0x2d3de1]=_0x3d2d4b,_0x4f8558;}function _0x56a7(_0x1a9630,_0x1aa594){_0x1a9630=_0x1a9630-0xea;const _0x4f14e5=_0x4f14();let _0x56a7ef=_0x4f14e5[_0x1a9630];return _0x56a7ef;}var FShape=class{constructor(_0x364222,_0x18706b,_0x78e2f,_0x7efd70){const _0x1acbfd=_0x2253a1;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x1acbfd(0x16c),void 0x0),_defineProperty(this,_0x1acbfd(0xf9),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x1acbfd(0x157)]),_defineProperty(this,_0x1acbfd(0x147),_univerjs_pro_sheets_shape[_0x1acbfd(0x11e)]),_defineProperty(this,_0x1acbfd(0x161),void 0x0),_defineProperty(this,_0x1acbfd(0x168),{}),_defineProperty(this,_0x1acbfd(0xff),void 0x0),this[_0x1acbfd(0x159)]=_0x364222,this[_0x1acbfd(0x16c)]=_0x18706b,this[_0x1acbfd(0xf9)]=_0x78e2f||(0x0,_univerjs_core['generateRandomId'])(),this['_injector']=_0x7efd70;}[_0x2253a1(0x179)](_0x1ba60b,_0x51a265,_0x118536,_0x43f94f){const _0xa21d66=_0x2253a1,_0x214c4b=this[_0xa21d66(0xff)][_0xa21d66(0x15a)](_univerjs_sheets[_0xa21d66(0x176)])['ensureSkeleton'](this[_0xa21d66(0x159)],this[_0xa21d66(0x16c)]);if(!_0x214c4b)throw new Error(_0xa21d66(0x15c)+this[_0xa21d66(0x159)]+_0xa21d66(0x12c)+this['subUnitId']+_0xa21d66(0x16b));const {transform:_0xc86019}=(0x0,_univerjs_sheets[_0xa21d66(0x178)])(this[_0xa21d66(0x159)],this['subUnitId'],{'row':_0x1ba60b,'column':_0x51a265,'rowOffset':_0x118536,'columnOffset':_0x43f94f},0x1,0x1,_0x214c4b);return this['x']=_0xc86019[_0xa21d66(0x181)],this['y']=_0xc86019[_0xa21d66(0xec)],this;}[_0x2253a1(0x164)](_0x2a4944,_0x844bb1){return this['x']=_0x2a4944,this['y']=_0x844bb1,this;}[_0x2253a1(0x171)](_0x3b6b92){const _0xb0e79c=_0x2253a1;return this[_0xb0e79c(0x161)]=_0x3b6b92,this;}[_0x2253a1(0x182)](_0x23b1cb,_0x5e99cf){const _0x59a026=_0x2253a1;if(!this[_0x59a026(0x168)][_0x59a026(0xf8)])this[_0x59a026(0x168)]['fill']={};this['shapeData'][_0x59a026(0xf8)]['fillType']=_univerjs_pro_engine_shape[_0x59a026(0xf1)][_0x59a026(0x154)];if(_0x23b1cb!==void 0x0)this['shapeData']['fill'][_0x59a026(0x122)]=_0x23b1cb;if(_0x5e99cf!==void 0x0)this[_0x59a026(0x168)][_0x59a026(0xf8)]['opacity']=_0x5e99cf;return this;}[_0x2253a1(0x13c)](_0x5d1e3f,_0x1ea997,_0x52b862){const _0x135b6b=_0x2253a1;if(_0x1ea997===void 0x0||_0x1ea997[_0x135b6b(0x131)]===0x0)throw new Error(_0x135b6b(0x145));if(!this['shapeData'][_0x135b6b(0xf8)])this['shapeData'][_0x135b6b(0xf8)]={};this[_0x135b6b(0x168)][_0x135b6b(0xf8)]['gradientStops']=_0x1ea997,this[_0x135b6b(0x168)][_0x135b6b(0xf8)][_0x135b6b(0x11d)]=_univerjs_pro_engine_shape['ShapeFillEnum'][_0x135b6b(0xf2)],this['shapeData'][_0x135b6b(0xf8)][_0x135b6b(0x13e)]=_0x5d1e3f;if(_0x52b862!==void 0x0)this[_0x135b6b(0x168)][_0x135b6b(0xf8)][_0x135b6b(0xfa)]=_0x52b862;return this;}[_0x2253a1(0xee)](){const _0x4a1c51=_0x2253a1;return this['shapeData'][_0x4a1c51(0xf8)]={'fillType':_univerjs_pro_engine_shape[_0x4a1c51(0xf1)][_0x4a1c51(0xeb)]},this;}[_0x2253a1(0x149)](_0xdef303){const _0x386439=_0x2253a1;if(!this[_0x386439(0x168)][_0x386439(0x14d)])this[_0x386439(0x168)][_0x386439(0x14d)]={};return this['shapeData']['stroke'][_0x386439(0x122)]=_0xdef303,this;}[_0x2253a1(0x120)](_0x5a78db){const _0x24d00f=_0x2253a1;if(!this['shapeData']['stroke'])this['shapeData'][_0x24d00f(0x14d)]={};return this[_0x24d00f(0x168)]['stroke'][_0x24d00f(0x106)]=_0x5a78db,this;}[_0x2253a1(0x143)](_0x576212){const _0x3bfb5e=_0x2253a1;if(!this['shapeData'][_0x3bfb5e(0x14d)])this[_0x3bfb5e(0x168)][_0x3bfb5e(0x14d)]={};return this[_0x3bfb5e(0x168)][_0x3bfb5e(0x14d)][_0x3bfb5e(0x133)]=_0x576212,this;}['setStrokeLineJoinType'](_0x43f1e1){const _0x4789a9=_0x2253a1;if(!this[_0x4789a9(0x168)]['stroke'])this[_0x4789a9(0x168)][_0x4789a9(0x14d)]={};return this['shapeData']['stroke'][_0x4789a9(0x129)]=_0x43f1e1,this;}[_0x2253a1(0x183)](_0xefb3d2){const _0x6ee844=_0x2253a1;if(!this['shapeData'][_0x6ee844(0x14d)])this[_0x6ee844(0x168)][_0x6ee844(0x14d)]={};return this[_0x6ee844(0x168)]['stroke'][_0x6ee844(0x16e)]=_0xefb3d2,this;}[_0x2253a1(0x118)](_0xd120a3){const _0x57ccf4=_0x2253a1;if(!this[_0x57ccf4(0x168)][_0x57ccf4(0x14d)])this['shapeData'][_0x57ccf4(0x14d)]={};return this['shapeData'][_0x57ccf4(0x14d)]['opacity']=_0xd120a3,this;}[_0x2253a1(0x115)](_0x3b6c05){const _0x12432f=_0x2253a1;if(!this['shapeData'][_0x12432f(0x14d)])this['shapeData'][_0x12432f(0x14d)]={};return this[_0x12432f(0x168)][_0x12432f(0x14d)][_0x12432f(0x10a)]=_0x3b6c05,this;}[_0x2253a1(0x156)](_0x294e50){const _0x3818a9=_0x2253a1;return this[_0x3818a9(0x106)]=_0x294e50,this;}['setHeight'](_0x140576){return this['height']=_0x140576,this;}['isLineShape'](){const _0x5c2076=_0x2253a1,_0x55cf16=this[_0x5c2076(0xff)]['get'](_univerjs_pro_sheets_shape[_0x5c2076(0x175)])['getShapeModel'](this[_0x5c2076(0x159)],this['subUnitId'],this[_0x5c2076(0xf9)]);if(_0x55cf16)return(0x0,_univerjs_pro_engine_shape[_0x5c2076(0x16a)])(_0x55cf16[_0x5c2076(0x165)]());if(this[_0x5c2076(0x161)])return(0x0,_univerjs_pro_engine_shape[_0x5c2076(0x16a)])(this['shapeType']);return![];}[_0x2253a1(0x102)](){const _0x33ad26=_0x2253a1,_0x233543=this['_injector'][_0x33ad26(0x15a)](_univerjs_pro_sheets_shape[_0x33ad26(0x175)])[_0x33ad26(0x103)](this[_0x33ad26(0x159)],this['subUnitId'],this[_0x33ad26(0xf9)]);if(!_0x233543)return[];const _0x1f27d4=this['_injector'][_0x33ad26(0x15a)](_univerjs_drawing[_0x33ad26(0x126)])[_0x33ad26(0x109)]({'unitId':this[_0x33ad26(0x159)],'subUnitId':this[_0x33ad26(0x16c)],'drawingId':this[_0x33ad26(0xf9)]});if(!(_0x1f27d4===null||_0x1f27d4===void 0x0?void 0x0:_0x1f27d4[_0x33ad26(0x162)]))return[];const {width:width=0x0,height:height=0x0}=_0x1f27d4[_0x33ad26(0x162)];return _0x233543[_0x33ad26(0x148)]({'width':width,'height':height}),_0x233543['getConnectionSiteList']();}['getAdjustPoints'](){const _0x5904d4=_0x2253a1,_0x114236=this[_0x5904d4(0xff)]['get'](_univerjs_pro_sheets_shape[_0x5904d4(0x175)])[_0x5904d4(0x103)](this['unitId'],this['subUnitId'],this[_0x5904d4(0xf9)]);if(!_0x114236)return[];const _0x3a89b5=this[_0x5904d4(0xff)]['get'](_univerjs_drawing[_0x5904d4(0x126)])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this['subUnitId'],'drawingId':this['drawId']});if(!(_0x3a89b5===null||_0x3a89b5===void 0x0?void 0x0:_0x3a89b5[_0x5904d4(0x162)]))return[];const {width:width=0x0,height:height=0x0}=_0x3a89b5['transform'];return _0x114236[_0x5904d4(0x148)]({'width':width,'height':height}),_0x114236[_0x5904d4(0x155)]();}['getConnectorLinePoints'](){const _0x241fd8=_0x2253a1,_0x503f6f=this[_0x241fd8(0xff)][_0x241fd8(0x15a)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x241fd8(0x103)](this[_0x241fd8(0x159)],this[_0x241fd8(0x16c)],this[_0x241fd8(0xf9)]);if(!_0x503f6f)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x241fd8(0x16a)])(_0x503f6f[_0x241fd8(0x165)]()))return[];const _0x5576e3=this[_0x241fd8(0xff)][_0x241fd8(0x15a)](_univerjs_drawing[_0x241fd8(0x126)])['getDrawingByParam']({'unitId':this[_0x241fd8(0x159)],'subUnitId':this[_0x241fd8(0x16c)],'drawingId':this[_0x241fd8(0xf9)]});if(!(_0x5576e3===null||_0x5576e3===void 0x0?void 0x0:_0x5576e3['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x5576e3[_0x241fd8(0x162)];return _0x503f6f[_0x241fd8(0x148)]({'width':width,'height':height}),_0x503f6f[_0x241fd8(0x139)]();}['getStartConnectInfo'](){const _0x322cbd=_0x2253a1;var _0xc91d08;const _0x1f8359=this[_0x322cbd(0xff)][_0x322cbd(0x15a)](_univerjs_pro_sheets_shape[_0x322cbd(0x175)])['getShapeModel'](this[_0x322cbd(0x159)],this[_0x322cbd(0x16c)],this[_0x322cbd(0xf9)]);if(!_0x1f8359)return null;return(_0xc91d08=_0x1f8359[_0x322cbd(0x14e)]())!==null&&_0xc91d08!==void 0x0?_0xc91d08:null;}[_0x2253a1(0x167)](){const _0x3b1636=_0x2253a1;var _0x25a680;const _0x41e464=this['_injector'][_0x3b1636(0x15a)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3b1636(0x103)](this[_0x3b1636(0x159)],this[_0x3b1636(0x16c)],this[_0x3b1636(0xf9)]);if(!_0x41e464)return null;return(_0x25a680=_0x41e464[_0x3b1636(0x167)]())!==null&&_0x25a680!==void 0x0?_0x25a680:null;}['build'](){const _0x24c354=_0x2253a1;var _0x472717,_0xef4a4c;if(!this['shapeType'])throw new Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){const _0x1b733b=this[_0x24c354(0xff)]['get'](_univerjs_sheets[_0x24c354(0x176)])[_0x24c354(0x119)](this[_0x24c354(0x159)],this[_0x24c354(0x16c)]);if(!_0x1b733b)throw new Error(_0x24c354(0x15c)+this[_0x24c354(0x159)]+_0x24c354(0x12c)+this[_0x24c354(0x16c)]+_0x24c354(0x16b));const {transform:_0x47b682}=(0x0,_univerjs_sheets[_0x24c354(0x178)])(this[_0x24c354(0x159)],this[_0x24c354(0x16c)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x1b733b);this['x']=this['x']>0x0?this['x']:_0x47b682[_0x24c354(0x181)],this['y']=this['y']>0x0?this['y']:_0x47b682[_0x24c354(0xec)];}return this[_0x24c354(0x106)]=(_0x472717=this['width'])!==null&&_0x472717!==void 0x0?_0x472717:_univerjs_pro_sheets_shape[_0x24c354(0x157)],this['height']=(_0xef4a4c=this['height'])!==null&&_0xef4a4c!==void 0x0?_0xef4a4c:_univerjs_pro_sheets_shape[_0x24c354(0x11e)],{'unitId':this['unitId'],'subUnitId':this[_0x24c354(0x16c)],'shapeId':this[_0x24c354(0xf9)],'shapeType':this[_0x24c354(0x161)],'shapeData':Object[_0x24c354(0x153)](this[_0x24c354(0x168)])[_0x24c354(0x131)]>0x0?this[_0x24c354(0x168)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x24c354(0x106)],'height':this[_0x24c354(0x147)]};}[_0x2253a1(0x15f)](){const _0x5701f5=_0x2253a1;return this[_0x5701f5(0xf9)];}[_0x2253a1(0x165)](){const _0x4c6a65=_0x2253a1;return this[_0x4c6a65(0x161)];}[_0x2253a1(0x13a)](){const _0x93ac05=_0x2253a1;return this[_0x93ac05(0x168)];}[_0x2253a1(0x12e)](){return{'x':this['x'],'y':this['y']};}[_0x2253a1(0x12b)](){const _0x52d0f5=_0x2253a1;return{'width':this['width'],'height':this[_0x52d0f5(0x147)]};}},FConnectorShape=class extends FShape{constructor(_0xf1b83b,_0x2c79bc,_0x1a0f80,_0x12d110){const _0x5c06a7=_0x2253a1;super(_0xf1b83b,_0x2c79bc,_0x1a0f80,_0x12d110),_defineProperty(this,_0x5c06a7(0x168),{});}[_0x2253a1(0x171)](_0x2f267a){const _0x11375b=_0x2253a1;if(!(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x2f267a))throw new Error(_0x11375b(0x10c)+_0x2f267a+_0x11375b(0x15e));return super[_0x11375b(0x171)](_0x2f267a),this;}['setStartArrowType'](_0x37cd7c){const _0x4681c2=_0x2253a1;var _0x4d6c38,_0xc8560;if(!((_0x4d6c38=this['shapeData'])===null||_0x4d6c38===void 0x0?void 0x0:_0x4d6c38['ln']))this[_0x4681c2(0x168)]['ln']={};if(!((_0xc8560=this['shapeData'])===null||_0xc8560===void 0x0||(_0xc8560=_0xc8560['ln'])===null||_0xc8560===void 0x0?void 0x0:_0xc8560[_0x4681c2(0x114)]))this[_0x4681c2(0x168)]['ln'][_0x4681c2(0x114)]={};return this[_0x4681c2(0x168)]['ln'][_0x4681c2(0x114)]['type']=_0x37cd7c,this;}[_0x2253a1(0x110)](_0x57ed3a){const _0x4e702e=_0x2253a1;var _0x1bd25d,_0x133a86;if(!((_0x1bd25d=this[_0x4e702e(0x168)])===null||_0x1bd25d===void 0x0?void 0x0:_0x1bd25d['ln']))this[_0x4e702e(0x168)]['ln']={};if(!((_0x133a86=this[_0x4e702e(0x168)])===null||_0x133a86===void 0x0||(_0x133a86=_0x133a86['ln'])===null||_0x133a86===void 0x0?void 0x0:_0x133a86[_0x4e702e(0x169)]))this[_0x4e702e(0x168)]['ln']['endArrow']={};return this[_0x4e702e(0x168)]['ln'][_0x4e702e(0x169)][_0x4e702e(0x121)]=_0x57ed3a,this;}[_0x2253a1(0x125)](_0x53c97b){const _0x4d57a5=_0x2253a1;var _0x4c5ee3,_0x4b3218;if(!((_0x4c5ee3=this[_0x4d57a5(0x168)])===null||_0x4c5ee3===void 0x0?void 0x0:_0x4c5ee3['ln']))this[_0x4d57a5(0x168)]['ln']={};if(!((_0x4b3218=this[_0x4d57a5(0x168)])===null||_0x4b3218===void 0x0||(_0x4b3218=_0x4b3218['ln'])===null||_0x4b3218===void 0x0?void 0x0:_0x4b3218[_0x4d57a5(0x114)]))this[_0x4d57a5(0x168)]['ln'][_0x4d57a5(0x114)]={};return this['shapeData']['ln']['startArrow']['size']=_0x53c97b,this;}[_0x2253a1(0xf7)](_0x5a6a29){const _0x488512=_0x2253a1;var _0x2ea2a3,_0x44010a;if(!((_0x2ea2a3=this[_0x488512(0x168)])===null||_0x2ea2a3===void 0x0?void 0x0:_0x2ea2a3['ln']))this[_0x488512(0x168)]['ln']={};if(!((_0x44010a=this[_0x488512(0x168)])===null||_0x44010a===void 0x0||(_0x44010a=_0x44010a['ln'])===null||_0x44010a===void 0x0?void 0x0:_0x44010a['endArrow']))this[_0x488512(0x168)]['ln'][_0x488512(0x169)]={};return this[_0x488512(0x168)]['ln']['endArrow'][_0x488512(0x105)]=_0x5a6a29,this;}[_0x2253a1(0x11c)](){return super['build']();}[_0x2253a1(0x167)](){const _0x59abd0=_0x2253a1;var _0x3f303a;return((_0x3f303a=this[_0x59abd0(0x168)])===null||_0x3f303a===void 0x0||(_0x3f303a=_0x3f303a[_0x59abd0(0xed)])===null||_0x3f303a===void 0x0?void 0x0:_0x3f303a['to'])||null;}[_0x2253a1(0x14e)](){const _0x31e502=_0x2253a1;var _0x2ba9b8;return((_0x2ba9b8=this['shapeData'])===null||_0x2ba9b8===void 0x0||(_0x2ba9b8=_0x2ba9b8[_0x31e502(0xed)])===null||_0x2ba9b8===void 0x0?void 0x0:_0x2ba9b8[_0x31e502(0x100)])||null;}};function computeConnectionPointInfo(_0x1b3b72,_0x15a38e,_0xd6d481,_0x194300,_0x1f78d6,_0x1ba3c6){const _0x14f025=_0x2253a1,_0x84d6a7=_0x1f78d6[_0x14f025(0x103)](_0x1b3b72,_0x15a38e,_0xd6d481);if(!_0x84d6a7)return null;const _0x15d7da=_0x1ba3c6[_0x14f025(0x109)]({'unitId':_0x1b3b72,'subUnitId':_0x15a38e,'drawingId':_0xd6d481});if(!(_0x15d7da===null||_0x15d7da===void 0x0?void 0x0:_0x15d7da['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x3d2b99}=_0x15d7da['transform'];_0x84d6a7['updateContext']({'width':width,'height':height});const _0x288e96=_0x84d6a7[_0x14f025(0x146)]()[_0x14f025(0x127)](_0x48ed5a=>_0x48ed5a[_0x14f025(0x184)]===_0x194300);if(!_0x288e96)return null;let _0x2e6896=flipX?width-_0x288e96['x']:_0x288e96['x'],_0x50411e=flipY?height-_0x288e96['y']:_0x288e96['y'];if(_0x3d2b99&&_0x3d2b99!==0x0){const _0x209846=_0x3d2b99*Math['PI']/0xb4,_0x259afd=Math['cos'](_0x209846),_0x2e1c54=Math[_0x14f025(0x10b)](_0x209846),_0x621985=width/0x2,_0x4c8370=height/0x2,_0x1c02d6=_0x2e6896-_0x621985,_0xb866ca=_0x50411e-_0x4c8370;_0x2e6896=_0x621985+_0x1c02d6*_0x259afd-_0xb866ca*_0x2e1c54,_0x50411e=_0x4c8370+_0x1c02d6*_0x2e1c54+_0xb866ca*_0x259afd;}_0x2e6896+=left,_0x50411e+=top;let _0x50b026=_0x288e96[_0x14f025(0x107)]/0xea60;if(flipX)_0x50b026=0xb4-_0x50b026;if(flipY)_0x50b026=-_0x50b026;_0x50b026+=_0x3d2b99||0x0,_0x50b026=(_0x50b026%0x168+0x168)%0x168;const _0x51ee3e=(0x0,_univerjs_pro_engine_shape[_0x14f025(0xf6)])({'left':left,'top':top,'width':width,'height':height},_0x3d2b99||0x0);return{'point':{'x':_0x2e6896,'y':_0x50411e},'angle':_0x50b026,'bounds':_0x51ee3e};}function calculateFreeEndpointAngle(_0x541ad4,_0x21cff1){const _0x319f82=_0x2253a1,_0x1a0728=_0x21cff1['x']-_0x541ad4['x'],_0x46d278=_0x21cff1['y']-_0x541ad4['y'];if(Math[_0x319f82(0x166)](_0x1a0728)>=Math[_0x319f82(0x166)](_0x46d278))return _0x1a0728>=0x0?0xb4:0x0;return _0x46d278>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x2a67d4,_0x2571fe,_0x4f8323,_0x1d9995,_0x1a2f16,_0x146cbc,_0xa2dfa8){const _0x219d05=_0x2253a1,_0x48bb81=_0x146cbc[_0x219d05(0x103)](_0x2a67d4,_0x2571fe,_0x4f8323);if(!_0x48bb81)return null;const _0xba79cc=_0xa2dfa8[_0x219d05(0x109)]({'unitId':_0x2a67d4,'subUnitId':_0x2571fe,'drawingId':_0x4f8323});if(!(_0xba79cc===null||_0xba79cc===void 0x0?void 0x0:_0xba79cc['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0xba79cc[_0x219d05(0x162)];_0x48bb81[_0x219d05(0x148)]({'width':width,'height':height});const _0x3a0f8d=_0x48bb81[_0x219d05(0x139)]();if(_0x3a0f8d[_0x219d05(0x131)]<0x2)return null;const _0x536752=_0x1d9995?_0x3a0f8d[0x0]:_0x3a0f8d[_0x3a0f8d[_0x219d05(0x131)]-0x1],_0x3995de=new _univerjs_pro_engine_shape[(_0x219d05(0x14f))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x219d05(0x13f)](_0x536752);return{'point':_0x3995de,'angle':calculateFreeEndpointAngle(_0x1a2f16[_0x219d05(0x141)],_0x3995de),'bounds':{'left':_0x3995de['x'],'top':_0x3995de['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2253a1(0x12a)]{async[_0x2253a1(0x151)](_0x20c7a2){const _0xd58246=_0x2253a1,{unitId:_0x2db138,subUnitId:_0x4d660e,shapeId:_0x218019,shapeType:_0x210221,shapeData:_0x3dc113,x:_0x4d7562,y:_0x54d3a6,width:_0xc0e879,height:_0x4512e4}=_0x20c7a2;return this['_commandService'][_0xd58246(0x10e)](_univerjs_pro_sheets_shape[_0xd58246(0xfe)]['id'],{'unitId':_0x2db138,'subUnitId':_0x4d660e,'shapeId':_0x218019,'shapeType':_0x210221,'shapeData':_0x3dc113,'position':{'x':_0x4d7562,'y':_0x54d3a6},'width':_0xc0e879,'height':_0x4512e4});}async['updateShape'](_0x21d93b){const _0x40278a=_0x2253a1,{unitId:_0x525e6c,subUnitId:_0x24fa1e,shapeId:_0xacf844,shapeType:_0xfa1f27,shapeData:_0x5b7f2f,x:_0x2749ca,y:_0x7fe906,width:_0x57291a,height:_0x2d049f}=_0x21d93b;return this[_0x40278a(0x10d)][_0x40278a(0x10e)](_univerjs_pro_sheets_shape[_0x40278a(0x17a)]['id'],{'unitId':_0x525e6c,'subUnitId':_0x24fa1e,'shapeId':_0xacf844,'shapeType':_0xfa1f27,'shapeData':_0x5b7f2f,'position':{'x':_0x2749ca,'y':_0x7fe906},'width':_0x57291a,'height':_0x2d049f});}[_0x2253a1(0x112)](_0x11f1ef){const _0x3f6e29=_0x2253a1,_0x4c31bc=this[_0x3f6e29(0x15d)]()[_0x3f6e29(0x173)](),_0x4e720f=this[_0x3f6e29(0x124)]();if(_0x11f1ef){const _0x415ee6=new FShape(_0x4c31bc,_0x4e720f,_0x11f1ef[_0x3f6e29(0xf9)],this[_0x3f6e29(0xff)]);return this['_preloadShapeProperties'](_0x415ee6,_0x4c31bc,_0x4e720f,_0x11f1ef[_0x3f6e29(0xf9)]),_0x415ee6;}return new FShape(_0x4c31bc,_0x4e720f,(0x0,_univerjs_core[_0x3f6e29(0x132)])(),this[_0x3f6e29(0xff)]);}[_0x2253a1(0x134)](_0xd3d7f7){const _0x4460de=_0x2253a1,_0x1cd1ab=this[_0x4460de(0x15d)]()[_0x4460de(0x173)](),_0x694246=this[_0x4460de(0x124)]();if(_0xd3d7f7){const _0x1b89d2=new FConnectorShape(_0x1cd1ab,_0x694246,_0xd3d7f7[_0x4460de(0xf9)],this[_0x4460de(0xff)]);return this[_0x4460de(0x104)](_0x1b89d2,_0x1cd1ab,_0x694246,_0xd3d7f7[_0x4460de(0xf9)]),_0x1b89d2;}return new FConnectorShape(_0x1cd1ab,_0x694246,(0x0,_univerjs_core[_0x4460de(0x132)])(),this['_injector']);}[_0x2253a1(0x138)](){const _0x35afc4=_0x2253a1,_0x2a10a8=this['_injector'][_0x35afc4(0x15a)](_univerjs_sheets_drawing['ISheetDrawingService']),_0x5ed240=this[_0x35afc4(0x15d)]()[_0x35afc4(0x173)](),_0x341912=this[_0x35afc4(0x124)](),_0x5a70a0=_0x2a10a8[_0x35afc4(0x144)](_0x5ed240,_0x341912);if(!_0x5a70a0)return[];const _0x1125c6=[];for(const [_0x2138fa,_0x5289a8]of Object['entries'](_0x5a70a0))if(_0x5289a8&&_0x5289a8[_0x35afc4(0x17c)]===_univerjs_core[_0x35afc4(0xfb)][_0x35afc4(0xea)]){const _0x5a8d39=new FShape(_0x5ed240,_0x341912,_0x2138fa,this[_0x35afc4(0xff)]);this[_0x35afc4(0x104)](_0x5a8d39,_0x5ed240,_0x341912,_0x2138fa),_0x1125c6[_0x35afc4(0x101)](_0x5a8d39);}return _0x1125c6;}[_0x2253a1(0x177)](_0x3ba13a){const _0x4dff66=_0x2253a1,{unitId:_0x2c19cf,subUnitId:_0x496f3f,drawId:_0x5edb64}=_0x3ba13a;return this[_0x4dff66(0x10d)][_0x4dff66(0x10e)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x2c19cf,'drawings':[{'unitId':_0x2c19cf,'subUnitId':_0x496f3f,'drawingId':_0x5edb64,'drawingType':_univerjs_core[_0x4dff66(0xfb)][_0x4dff66(0xea)]}]});}async[_0x2253a1(0x150)](_0x150a77){const _0x2d9151=_0x2253a1,{connector:_0xcc4c1,startTarget:_0x497c56,endTarget:_0x243690}=_0x150a77;if(!_0x497c56&&!_0x243690)return![];const _0x33b003=this[_0x2d9151(0x15d)]()['getUnitId'](),_0x42a396=this['getSheetId'](),_0x1aedac=this[_0x2d9151(0xff)][_0x2d9151(0x15a)](_univerjs_pro_sheets_shape[_0x2d9151(0x175)]),_0x103912=this[_0x2d9151(0xff)][_0x2d9151(0x15a)](_univerjs_drawing[_0x2d9151(0x126)]),_0x5f2b1e=_0x1aedac['getShapeModel'](_0x33b003,_0x42a396,_0xcc4c1[_0x2d9151(0xf9)]);if(!_0x5f2b1e)return![];const _0x1adf31=_0x5f2b1e[_0x2d9151(0x165)](),_0x298f05=_0x5f2b1e['getShapeRelation'](),_0x2cc3c5={};for(const _0x20b4a4 of _0x5f2b1e[_0x2d9151(0xf4)]()){const _0x544195=_0x5f2b1e[_0x2d9151(0x170)](_0x20b4a4);if(_0x544195!==void 0x0)_0x2cc3c5[_0x20b4a4]=_0x544195;}const {startInfo:_0xbf2c72,endInfo:_0x38f2c9}=this[_0x2d9151(0x185)](_0x33b003,_0x42a396,_0xcc4c1,_0x5f2b1e,_0x497c56,_0x243690,_0x1aedac,_0x103912,_0x298f05);if(!_0xbf2c72||!_0x38f2c9)return![];const _0x54dc22=(0x0,_univerjs_pro_engine_shape[_0x2d9151(0x14c)])((0x0,_univerjs_pro_engine_shape[_0x2d9151(0xfc)])(_0xbf2c72,_0x38f2c9,_0x1adf31),_0x1adf31),_0x1d40c7={};if(_0x497c56)_0x1d40c7[_0x2d9151(0x100)]={'shapeId':_0x497c56[_0x2d9151(0x10f)][_0x2d9151(0xf9)],'cxnIndex':_0x497c56['connectionSiteIndex']};else{if(_0x298f05===null||_0x298f05===void 0x0?void 0x0:_0x298f05['from'])_0x1d40c7['from']=_0x298f05[_0x2d9151(0x100)];}if(_0x243690)_0x1d40c7['to']={'shapeId':_0x243690[_0x2d9151(0x10f)][_0x2d9151(0xf9)],'cxnIndex':_0x243690[_0x2d9151(0x174)]};else{if(_0x298f05===null||_0x298f05===void 0x0?void 0x0:_0x298f05['to'])_0x1d40c7['to']=_0x298f05['to'];}return this[_0x2d9151(0x10d)]['executeCommand'](_univerjs_pro_sheets_shape[_0x2d9151(0xf5)]['id'],{'unitId':_0x33b003,'subUnitId':_0x42a396,'connectorShapeId':_0xcc4c1[_0x2d9151(0xf9)],'width':_0x54dc22[_0x2d9151(0x172)]['width'],'height':_0x54dc22[_0x2d9151(0x172)][_0x2d9151(0x147)],'left':_0x54dc22[_0x2d9151(0x172)][_0x2d9151(0x181)],'top':_0x54dc22['worldRect'][_0x2d9151(0xec)],'flipX':_0x54dc22[_0x2d9151(0x172)]['flipX']||![],'flipY':_0x54dc22[_0x2d9151(0x172)]['flipY']||![],'oldAdjustValues':_0x2cc3c5,'newAdjustValues':_0x54dc22['adjustValues'],'newLineType':_0x54dc22[_0x2d9151(0x123)],'oldLineType':_0x1adf31,'rotation':_0x54dc22[_0x2d9151(0x13d)],'oldRelation':_0x298f05,'newRelation':_0x1d40c7});}[_0x2253a1(0x104)](_0x1992fd,_0x3f1154,_0x46665e,_0x5797c2){const _0x358694=_0x2253a1,_0x265645=this['_injector']['get'](_univerjs_drawing[_0x358694(0x126)])[_0x358694(0x109)]({'unitId':_0x3f1154,'subUnitId':_0x46665e,'drawingId':_0x5797c2});if(_0x265645===null||_0x265645===void 0x0?void 0x0:_0x265645['transform']){var _0x81a847,_0x4d242e,_0x33c6e9,_0x3d2453;_0x1992fd['x']=(_0x81a847=_0x265645[_0x358694(0x162)]['left'])!==null&&_0x81a847!==void 0x0?_0x81a847:0x0,_0x1992fd['y']=(_0x4d242e=_0x265645[_0x358694(0x162)]['top'])!==null&&_0x4d242e!==void 0x0?_0x4d242e:0x0,_0x1992fd[_0x358694(0x106)]=(_0x33c6e9=_0x265645['transform'][_0x358694(0x106)])!==null&&_0x33c6e9!==void 0x0?_0x33c6e9:_0x1992fd[_0x358694(0x106)],_0x1992fd[_0x358694(0x147)]=(_0x3d2453=_0x265645['transform']['height'])!==null&&_0x3d2453!==void 0x0?_0x3d2453:_0x1992fd['height'];}const _0x3db1da=this['_injector'][_0x358694(0x15a)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x358694(0x103)](_0x3f1154,_0x46665e,_0x5797c2);if(_0x3db1da){_0x1992fd[_0x358694(0x161)]=_0x3db1da['getShapeType']();const _0x290169=_0x3db1da[_0x358694(0x13a)]();if(_0x290169)_0x1992fd[_0x358694(0x168)]=JSON['parse'](JSON[_0x358694(0x117)](_0x290169));}}[_0x2253a1(0x185)](_0x33934d,_0x19e212,_0x6a582f,_0x1ad2ed,_0x272974,_0x28d442,_0x1fd3aa,_0x12cd96,_0x3d090b){const _0x2172c4=_0x2253a1;let _0x2e64e6=null,_0x1a8582=null;if(_0x272974)_0x2e64e6=computeConnectionPointInfo(_0x33934d,_0x19e212,_0x272974['shape']['drawId'],_0x272974[_0x2172c4(0x174)],_0x1fd3aa,_0x12cd96);if(_0x28d442)_0x1a8582=computeConnectionPointInfo(_0x33934d,_0x19e212,_0x28d442[_0x2172c4(0x10f)][_0x2172c4(0xf9)],_0x28d442[_0x2172c4(0x174)],_0x1fd3aa,_0x12cd96);if(!_0x2e64e6)_0x2e64e6=this[_0x2172c4(0x130)](_0x33934d,_0x19e212,_0x6a582f[_0x2172c4(0xf9)],!![],_0x1a8582,_0x3d090b===null||_0x3d090b===void 0x0?void 0x0:_0x3d090b[_0x2172c4(0x100)],_0x1fd3aa,_0x12cd96);if(!_0x1a8582)_0x1a8582=this[_0x2172c4(0x130)](_0x33934d,_0x19e212,_0x6a582f[_0x2172c4(0xf9)],![],_0x2e64e6,_0x3d090b===null||_0x3d090b===void 0x0?void 0x0:_0x3d090b['to'],_0x1fd3aa,_0x12cd96);return{'startInfo':_0x2e64e6,'endInfo':_0x1a8582};}[_0x2253a1(0x130)](_0x4ec707,_0x2f9b80,_0x50261e,_0x4a45c,_0x3708c6,_0xc16d4c,_0x802687,_0x1a9409){const _0x4853ca=_0x2253a1;if(_0xc16d4c){const _0x3d9d5f=computeConnectionPointInfo(_0x4ec707,_0x2f9b80,_0xc16d4c[_0x4853ca(0x187)],_0xc16d4c[_0x4853ca(0x186)],_0x802687,_0x1a9409);if(_0x3d9d5f)return _0x3d9d5f;}if(!_0x3708c6)return null;return computeFreeEndpointInfo(_0x4ec707,_0x2f9b80,_0x50261e,_0x4a45c,_0x3708c6,_0x802687,_0x1a9409);}};_univerjs_sheets_facade[_0x2253a1(0x12a)][_0x2253a1(0x135)](FWorksheetShapeMixin),exports[_0x2253a1(0x180)]=FConnectorShape,exports[_0x2253a1(0x163)]=FShape;function _0x4f14(){const _0x40a546=['top','relation','setNoneFill','symbol','ShapeLineDashEnum','ShapeFillEnum','GradientFill','3WMtLiQ','getAdjustNames','UpdateConnectorRelationCommand','getBasicShapeRotateBound','setEndArrowSize','fill','drawId','gradientAngle','DrawingTypeEnum','routeConnectorLineShape','call','InsertShapeCommand','_injector','from','push','getConnectionSites','getShapeModel','_preloadShapeProperties','size','width','ang','constructor','getDrawingByParam','lineStrokeType','sin','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','_commandService','executeCommand','shape','setEndArrowType','prototype','newShape','ShapeLineTypeEnum','startArrow','setStrokeLineType','9195501bcUYzF','stringify','setStrokeOpacity','ensureSkeleton','2881650rYDiBy','function','build','fillType','DEFAULT_SHAPE_HEIGHT','string','setStrokeWidth','type','color','lineType','getSheetId','setStartArrowSize','IDrawingManagerService','find','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','lineJoinType','FWorksheet','getSize','\x20and\x20subUnitId\x20','ShapeArrowSizeEnum','getPosition','424492NrSZFw','_resolveExistingOrFreeEndpoint','length','generateRandomId','dashType','newConnector','extend','Module','ShapeLineCapEnum','getShapes','getConnectorLinePoints','getShapeData','1427730QZpocy','setShapeGradientFill','rotation','gradientType','localToWorld','iterator','point','14171589WINMhN','setStrokeLineDashType','getDrawingData','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','getConnectionSiteList','height','updateContext','setStrokeColor','ShapeTypeEnum','FEnum','computeConnectorRouteLayout','stroke','getStartConnectInfo','ConnectorCoordinateTransform','connectShapes','insertShape','toPrimitive','keys','SolidFill','getDrawingPoints','setWidth','DEFAULT_SHAPE_WIDTH','1513788vnEnIf','unitId','get','default','Skeleton\x20for\x20unitId\x20','getWorkbook',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','getShapeId','defineProperty','shapeType','transform','FShape','setAbsolutePosition','getShapeType','abs','getEndConnectInfo','shapeData','endArrow','isConnectorShape','\x20not\x20found','subUnitId','ShapeArrowTypeEnum','capType','object','getAdjustValueByName','setShapeType','worldRect','getUnitId','connectionSiteIndex','SheetsShapeService','SheetSkeletonService','removeShape','convertPositionCellToSheetOverGrid','setPosition','SetShapeDrawingDataCommand','1167591ckyopp','drawingType','8iaeFWs','toStringTag','ShapeLineJoinEnum','FConnectorShape','left','setShapeSolidFill','setStrokeLineCapType','index','_resolveEndpoints','cxnIndex','shapeId','DRAWING_SHAPE','NoFill'];_0x4f14=function(){return _0x40a546;};return _0x4f14();}
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2a18d5=_0x1514;(function(_0x54a8fb,_0x15715d){const _0x47a26f=_0x1514,_0x55a548=_0x54a8fb();while(!![]){try{const _0x149a63=parseInt(_0x47a26f(0x169))/0x1+parseInt(_0x47a26f(0x176))/0x2*(-parseInt(_0x47a26f(0xdc))/0x3)+-parseInt(_0x47a26f(0x15e))/0x4+-parseInt(_0x47a26f(0x17a))/0x5*(-parseInt(_0x47a26f(0x10b))/0x6)+parseInt(_0x47a26f(0x11b))/0x7+parseInt(_0x47a26f(0x158))/0x8+parseInt(_0x47a26f(0xf8))/0x9*(-parseInt(_0x47a26f(0xc8))/0xa);if(_0x149a63===_0x15715d)break;else _0x55a548['push'](_0x55a548['shift']());}catch(_0x154d01){_0x55a548['push'](_0x55a548['shift']());}}}(_0x50b6,0x61be1),Object[_0x2a18d5(0x14c)](exports,Symbol[_0x2a18d5(0x152)],{'value':_0x2a18d5(0xe6)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0xa469a8){'@babel/helpers - typeof';const _0xdfe174=_0x2a18d5;return _typeof=_0xdfe174(0x189)==typeof Symbol&&_0xdfe174(0x157)==typeof Symbol[_0xdfe174(0x16a)]?function(_0x5e61e4){return typeof _0x5e61e4;}:function(_0xa9853a){const _0x4e8f4e=_0xdfe174;return _0xa9853a&&_0x4e8f4e(0x189)==typeof Symbol&&_0xa9853a[_0x4e8f4e(0x151)]===Symbol&&_0xa9853a!==Symbol[_0x4e8f4e(0x121)]?_0x4e8f4e(0x157):typeof _0xa9853a;},_typeof(_0xa469a8);}function _0x50b6(){const _0x3b1473=['getBasicShapeRotateBound','getShapeType','flipY','rotation','7382990vxuwlB','rotateEnabled','width','UniverInstanceType','entries','height','getConnectionSiteList','sheet.command.update-shape-type','UpdateConnectorRelationCommand','transform','stringify','IUniverInstanceService','_linesIds','top','IDrawingManagerService','getShapeTypeById','every','version','getShapeDataById','_serializeShapeForUnit','1633602oTGcdI','keys','adjustValues','startY','DRAWING_SHAPE','sheet.mutation.update-shape-type','getBatchUpdateOp','IResourceManagerService','MUTATION','_sheetSkeletonService','Module','SheetSkeletonService','0.21.1','getBasicShapeRelation','isLineShape','SetSheetDrawingCommand','UpdateSheetsShapeDataMutation','worldRect','range','getAdjustNames','pluginName','startX','sequenceExecute','InsertSheetsShapeMutation','shapeData','_groupIds','InsertShapeCommand','clear','9RzvtyA','Injector','ICommandService','isConnectorShape','sheets-shape.config','ToggleSheetsShapeFlipCommand','_deserializeShapeForUnit','length','getShapeData','position','Disposable','DependentOn','syncExecuteCommand','relation','SetShapeDrawingDataCommand','_config','getShapeRelation','preRedos','getShapeModel','293154nHaKrA','getCellWithCoordByIndex','ShapeModel','onCommandExecute','computeConnectorRouteLayout','sheet.command.set-shape-text-vertical-toggle','touchDependencies','fromJSON','_sheetsShapeService','insertShape','assign','sheet.command.toggle-shape-flip','decorate','SetDrawingApplyMutation','SheetInterceptorService','transformToAxisAlignPosition','3499083UuqUgF','SetSheetsShapeRotateCommand','ClearSheetDrawingTransformerOperation','SHEET_SHAPE_PLUGIN','SheetsShapeService','delete','prototype','_initCommands','pushUndoRedo','getEndConnectInfo','sheet.command.update-line-shape-resize','disposeWithMe','getSheetCommandTarget','UPDATE','removeLinePoints','left','ensureSkeleton','sheet.command.insert-shape','hasShape','forEach','redos','getBatchAddOp','removeShape','_resourcesManagerService','merge','COMMAND','_initSnapshot','undos','parse','interceptCommand','call','registerPluginResource','getSkeleton','params','_initCommandInterceptor','isFrom','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','getDrawingData','setShapeData','getAdjustValueByName','generateRandomId','fill','_shapeModelManagerMap','_injector','cxnIndex','object','UNIVER_SHEET','has','routeConnectorLineShape','defineProperty','shapeId','sheet.command.set-shape-rotate','DEFAULT_SHAPE_HEIGHT','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','constructor','toStringTag','addShape','Inject','UpdateLineShapeResizeCommand','set','symbol','5171248VMPNba','toJSON','angle','InsertSheetDrawingCommand','borderEnabled','sheet.mutation.update-shape-data','1616032wPUyAg','CommandType','_addLineRerouteUpdates','add','resizeEnabled','@univerjs-pro/sheets-shape','get','registerCommand','_commandService','_getConnectPointInfo','lineShapeId','745483jPRmuL','iterator','DrawingTypeEnum','push','getDrawingByParam','_drawingManagerService','_shapes','data','setConfig','_configService','getStartConnectInfo','UpdateSheetsShapeTypeCommand','type','2IskYSL','sheet.mutation.insert-shape','IUndoRedoService','preUndos','20YqOhpM','IConfigService','sheet.command.set-shape-drawing-data','INSERT','lineType','SetSheetsShapeTextVerticalToggleCommand','dispose','setShapeType','ISheetDrawingService','cos','getCellIndexAndOffsetByPosition','from','DrawingApplyType','UpdateSheetsShapeTypeMutation','_sheetInterceptorService','function','sheet.command.update-connector-relation','getShapeTextData','flipX','UniverSheetsShapePlugin','getLineShapeRelation','string','_ensureShapeModelManager','transformToDrawingPosition'];_0x50b6=function(){return _0x3b1473;};return _0x50b6();}function toPrimitive(_0x21b1b9,_0x16ae31){const _0xc39c3f=_0x2a18d5;if('object'!=_typeof(_0x21b1b9)||!_0x21b1b9)return _0x21b1b9;var _0x48f551=_0x21b1b9[Symbol['toPrimitive']];if(void 0x0!==_0x48f551){var _0x25ad2f=_0x48f551[_0xc39c3f(0x139)](_0x21b1b9,_0x16ae31||'default');if(_0xc39c3f(0x148)!=_typeof(_0x25ad2f))return _0x25ad2f;throw new TypeError(_0xc39c3f(0x150));}return(_0xc39c3f(0xc1)===_0x16ae31?String:Number)(_0x21b1b9);}function toPropertyKey(_0x429363){const _0x234846=_0x2a18d5;var _0x46db3d=toPrimitive(_0x429363,_0x234846(0xc1));return _0x234846(0x157)==_typeof(_0x46db3d)?_0x46db3d:_0x46db3d+'';}function _defineProperty(_0x285e69,_0x4f47a1,_0x3fb90c){return(_0x4f47a1=toPropertyKey(_0x4f47a1))in _0x285e69?Object['defineProperty'](_0x285e69,_0x4f47a1,{'value':_0x3fb90c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x285e69[_0x4f47a1]=_0x3fb90c,_0x285e69;}var SheetShapeModelManager=class extends _univerjs_core[_0x2a18d5(0x102)]{constructor(){const _0x1e953b=_0x2a18d5;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0x1e953b(0xd4),new Set()),_defineProperty(this,'_groupIds',new Set());}[_0x2a18d5(0x153)](_0x2e8c41,_0x1df41e,_0x4819d1){const _0x42d2d7=_0x2a18d5,_0x5b4449=new _univerjs_pro_engine_shape[(_0x42d2d7(0x10d))](_0x2e8c41,_0x1df41e,_0x4819d1);this['_shapes'][_0x42d2d7(0x156)](_0x1df41e,_0x5b4449);if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x2e8c41))this[_0x42d2d7(0xd4)][_0x42d2d7(0x161)](_0x1df41e);return _0x5b4449;}['getBasicShapeRelation'](_0x723b0d){const _0x15ec9f=_0x2a18d5,_0x24f2ad=[];for(const _0x5c78df of this[_0x15ec9f(0xd4)]){const _0x2e827e=this[_0x15ec9f(0x16f)][_0x15ec9f(0x164)](_0x5c78df);if(_0x2e827e){const _0x184ea0=_0x2e827e['getShapeRelation']();if(_0x184ea0){var _0x58970a,_0x4cae20;if(((_0x58970a=_0x184ea0[_0x15ec9f(0x185)])===null||_0x58970a===void 0x0?void 0x0:_0x58970a['shapeId'])===_0x723b0d)_0x24f2ad['push']({..._0x184ea0[_0x15ec9f(0x185)],'lineShapeId':_0x5c78df,'isFrom':!![]});if(((_0x4cae20=_0x184ea0['to'])===null||_0x4cae20===void 0x0?void 0x0:_0x4cae20[_0x15ec9f(0x14d)])===_0x723b0d)_0x24f2ad[_0x15ec9f(0x16c)]({..._0x184ea0['to'],'lineShapeId':_0x5c78df,'isFrom':![]});}}}return _0x24f2ad;}['getLineShapeRelation'](_0x171a7a){const _0x3e28d1=_0x2a18d5,_0x29e6e3=this['_shapes'][_0x3e28d1(0x164)](_0x171a7a);if(_0x29e6e3)return _0x29e6e3['getShapeRelation']();}[_0x2a18d5(0xc5)](_0x1a125f){const _0xca1832=_0x2a18d5,_0x1255c8=this['_shapes']['get'](_0x1a125f);if(_0x1255c8)return _0x1255c8[_0xca1832(0xc5)]();}['hasShape'](_0x11241b){const _0x420c41=_0x2a18d5;return this[_0x420c41(0x16f)][_0x420c41(0x14a)](_0x11241b);}[_0x2a18d5(0x131)](_0x5970a7){const _0x22e554=_0x2a18d5,_0xa92958=this[_0x22e554(0x16f)][_0x22e554(0x164)](_0x5970a7);if(!_0xa92958)return;if((0x0,_univerjs_pro_engine_shape[_0x22e554(0xfb)])(_0xa92958['getShapeType']()))this[_0x22e554(0xd4)][_0x22e554(0x120)](_0x5970a7);this[_0x22e554(0x16f)]['delete'](_0x5970a7);}[_0x2a18d5(0x159)](){const _0x10ce04=_0x2a18d5,_0x5ba373=[];return this[_0x10ce04(0x16f)]['forEach'](_0x49b051=>{const _0x30a850=_0x10ce04;_0x5ba373[_0x30a850(0x16c)](_0x49b051[_0x30a850(0x159)]());}),_0x5ba373;}[_0x2a18d5(0x112)](_0xa3bd98){const _0x1a2378=_0x2a18d5;for(const _0x575736 of _0xa3bd98){const {id:_0x4deaed,shapeType:_0x1fb04e}=_0x575736,_0x342aca=this[_0x1a2378(0x153)](_0x1fb04e,_0x4deaed,_0x575736[_0x1a2378(0xf4)]);if(_0x342aca&&_0x342aca[_0x1a2378(0xea)]())this[_0x1a2378(0xd4)]['add'](_0x4deaed);}}[_0x2a18d5(0x180)](){const _0x5cad17=_0x2a18d5;if(this['_disposed'])return;this[_0x5cad17(0x16f)][_0x5cad17(0x12e)](_0x10e4bf=>{const _0x29f40f=_0x5cad17;_0x10e4bf[_0x29f40f(0x180)]();}),this[_0x5cad17(0x16f)][_0x5cad17(0xf7)](),this[_0x5cad17(0xd4)][_0x5cad17(0xf7)](),this[_0x5cad17(0xf5)][_0x5cad17(0xf7)](),super[_0x5cad17(0x180)]();}};function __decorateParam(_0xe540c6,_0x1ebabf){return function(_0x2142e1,_0x1519b6){_0x1ebabf(_0x2142e1,_0x1519b6,_0xe540c6);};}function __decorate(_0x346b68,_0x5326ae,_0x2aa428,_0xa156d2){const _0x313132=_0x2a18d5;var _0x1dd079=arguments['length'],_0x4e8ac0=_0x1dd079<0x3?_0x5326ae:_0xa156d2===null?_0xa156d2=Object['getOwnPropertyDescriptor'](_0x5326ae,_0x2aa428):_0xa156d2,_0x13353f;if(typeof Reflect===_0x313132(0x148)&&typeof Reflect[_0x313132(0x117)]===_0x313132(0x189))_0x4e8ac0=Reflect[_0x313132(0x117)](_0x346b68,_0x5326ae,_0x2aa428,_0xa156d2);else{for(var _0xa4ca51=_0x346b68['length']-0x1;_0xa4ca51>=0x0;_0xa4ca51--)if(_0x13353f=_0x346b68[_0xa4ca51])_0x4e8ac0=(_0x1dd079<0x3?_0x13353f(_0x4e8ac0):_0x1dd079>0x3?_0x13353f(_0x5326ae,_0x2aa428,_0x4e8ac0):_0x13353f(_0x5326ae,_0x2aa428))||_0x4e8ac0;}return _0x1dd079>0x3&&_0x4e8ac0&&Object[_0x313132(0x14c)](_0x5326ae,_0x2aa428,_0x4e8ac0),_0x4e8ac0;}function _0x1514(_0x2e8fb0,_0x55cade){_0x2e8fb0=_0x2e8fb0-0xc1;const _0x50b605=_0x50b6();let _0x1514a5=_0x50b605[_0x2e8fb0];return _0x1514a5;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x2a18d5(0x102)]{constructor(_0x40d687){const _0x2baada=_0x2a18d5;super(),this['_resourcesManagerService']=_0x40d687,_defineProperty(this,_0x2baada(0x145),new Map()),this[_0x2baada(0x135)]();}[_0x2a18d5(0xc2)](_0x412685,_0x41bad5){const _0x42e71c=_0x2a18d5;let _0xe314fb=this['_shapeModelManagerMap'][_0x42e71c(0x164)](_0x412685);!_0xe314fb&&(_0xe314fb=new Map(),this[_0x42e71c(0x145)][_0x42e71c(0x156)](_0x412685,_0xe314fb));let _0x3f1297=_0xe314fb['get'](_0x41bad5);return!_0x3f1297&&(_0x3f1297=new SheetShapeModelManager(),_0xe314fb[_0x42e71c(0x156)](_0x41bad5,_0x3f1297)),_0x3f1297;}[_0x2a18d5(0x114)](_0x592909,_0xd9ad71,_0x23671d,_0x30d7d1,_0x89b8ad){const _0x3f4aa9=_0x2a18d5;this['_ensureShapeModelManager'](_0x592909,_0xd9ad71)[_0x3f4aa9(0x153)](_0x23671d,_0x30d7d1,_0x89b8ad);}[_0x2a18d5(0x131)](_0x1ee422,_0x54f02f,_0x58288c){const _0x3b4adc=_0x2a18d5;this['_ensureShapeModelManager'](_0x1ee422,_0x54f02f)[_0x3b4adc(0x131)](_0x58288c);}['getBasicShapeType'](_0x3db012,_0x231b9e,_0x5f4516){const _0x2c9611=_0x2a18d5;return this[_0x2c9611(0xc2)](_0x3db012,_0x231b9e)[_0x2c9611(0xc5)](_0x5f4516);}[_0x2a18d5(0xc5)](_0x10f928,_0x2cf993,_0x28b6e4){const _0x438956=_0x2a18d5;return this[_0x438956(0xc2)](_0x10f928,_0x2cf993)[_0x438956(0xc5)](_0x28b6e4);}[_0x2a18d5(0x12d)](_0x3641e7,_0x9a68ca,_0x5bd7e8){return this['_ensureShapeModelManager'](_0x3641e7,_0x9a68ca)['hasShape'](_0x5bd7e8);}[_0x2a18d5(0xd7)](_0x1b7881,_0x17595c,_0x12133a){const _0x4e3b70=_0x2a18d5;return this[_0x4e3b70(0xc2)](_0x1b7881,_0x17595c)[_0x4e3b70(0xc5)](_0x12133a);}[_0x2a18d5(0xda)](_0x422315,_0x3be221,_0x4ef625){const _0x4a0617=_0x2a18d5,_0x1a4a83=this[_0x4a0617(0xc2)](_0x422315,_0x3be221);if(!_0x1a4a83[_0x4a0617(0xc5)](_0x4ef625))return;const _0xa27101=_0x1a4a83[_0x4a0617(0x16f)][_0x4a0617(0x164)](_0x4ef625);if(!_0xa27101)return;return _0xa27101[_0x4a0617(0x100)]();}[_0x2a18d5(0x10a)](_0x4ea4be,_0x217397,_0x475c39){const _0x50cdb2=_0x2a18d5;return this[_0x50cdb2(0xc2)](_0x4ea4be,_0x217397)[_0x50cdb2(0x16f)][_0x50cdb2(0x164)](_0x475c39);}['getBasicShapeRelation'](_0x143332,_0x216613,_0x5b54a9){const _0x5d7723=_0x2a18d5;return this[_0x5d7723(0xc2)](_0x143332,_0x216613)[_0x5d7723(0xe9)](_0x5b54a9);}['getLineShapeRelation'](_0x41048b,_0x3e8c5c,_0x320229){const _0x4dfb8c=_0x2a18d5,_0x2b7130=this[_0x4dfb8c(0xc2)](_0x41048b,_0x3e8c5c)[_0x4dfb8c(0x16f)][_0x4dfb8c(0x164)](_0x320229);if(!_0x2b7130)return;return _0x2b7130[_0x4dfb8c(0x108)]();}[_0x2a18d5(0x181)](){}[_0x2a18d5(0xdb)](_0x37b383){const _0x5ca9c3=_0x2a18d5,_0x46e9ea={},_0x4b1897=this[_0x5ca9c3(0x145)][_0x5ca9c3(0x164)](_0x37b383);if(_0x4b1897)_0x4b1897[_0x5ca9c3(0x12e)]((_0x10c313,_0xb06cd5)=>{const _0x46acfc=_0x5ca9c3,_0x5abb67=_0x10c313[_0x46acfc(0x159)]();if(_0x5abb67['length']>0x0)_0x46e9ea[_0xb06cd5]=_0x5abb67;});return JSON[_0x5ca9c3(0xd2)](_0x46e9ea);}['_deserializeShapeForUnit'](_0x53fee5,_0xcf1908){const _0x429316=_0x2a18d5;Object[_0x429316(0xdd)](_0xcf1908)[_0x429316(0x12e)](_0x3dfb14=>{const _0x32a258=_0x429316;this[_0x32a258(0xc2)](_0x53fee5,_0x3dfb14)[_0x32a258(0x112)](_0xcf1908[_0x3dfb14]);});}[_0x2a18d5(0x159)](){const _0x328ed8=_0x2a18d5,_0x3c24e0={};return this['_shapeModelManagerMap'][_0x328ed8(0x12e)]((_0x4dbfbe,_0x4bf583)=>{const _0x412603=_0x328ed8;_0x3c24e0[_0x4bf583]={},_0x4dbfbe[_0x412603(0x12e)]((_0x9421fd,_0x5e08ce)=>{const _0x27bbff=_0x412603;_0x3c24e0[_0x4bf583][_0x5e08ce]=_0x9421fd[_0x27bbff(0x159)]();});}),_0x3c24e0;}[_0x2a18d5(0x112)](_0x413399){const _0x8365e1=_0x2a18d5;Object[_0x8365e1(0xdd)](_0x413399)[_0x8365e1(0x12e)](_0x544446=>{const _0x493bfc=_0x8365e1,_0x4116a4=_0x413399[_0x544446];Object[_0x493bfc(0xdd)](_0x4116a4)[_0x493bfc(0x12e)](_0x4ec317=>{const _0x1e2f89=_0x493bfc;this[_0x1e2f89(0xc2)](_0x544446,_0x4ec317)[_0x1e2f89(0x112)](_0x4116a4[_0x4ec317]);});});}[_0x2a18d5(0x135)](){const _0x16f6a9=_0x2a18d5;this[_0x16f6a9(0x132)][_0x16f6a9(0x13a)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x16f6a9(0xcb)][_0x16f6a9(0x149)]],'toJson':_0x350b5a=>this[_0x16f6a9(0xdb)](_0x350b5a),'parseJson':_0x2a7bbf=>JSON[_0x16f6a9(0x137)](_0x2a7bbf),'onLoad':(_0x164683,_0x28f80c)=>{const _0x5e7e57=_0x16f6a9;this[_0x5e7e57(0xfe)](_0x164683,_0x28f80c);},'onUnLoad':_0x1ef03a=>{const _0x4879b8=_0x16f6a9,_0x2839a7=this[_0x4879b8(0x145)][_0x4879b8(0x164)](_0x1ef03a);_0x2839a7&&(_0x2839a7[_0x4879b8(0x12e)](_0x32a8b5=>{_0x32a8b5['dispose']();}),this[_0x4879b8(0x145)][_0x4879b8(0x120)](_0x1ef03a));}});}[_0x2a18d5(0x180)](){const _0x1dc46a=_0x2a18d5;this[_0x1dc46a(0x145)][_0x1dc46a(0x12e)](_0x4e3b4d=>{const _0x29695a=_0x1dc46a;_0x4e3b4d[_0x29695a(0x12e)](_0x2e7b29=>{_0x2e7b29['dispose']();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x2a18d5(0xe3)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x2a18d5(0x177),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0xe4)],'handler':(_0x47afe1,_0x1004e3)=>{const {unitId:_0x13c071,subUnitId:_0x19bcae,shapeType:_0xfd6f31,shapeId:_0x5c69e8,shapeData:_0x4077eb}=_0x1004e3;return _0x47afe1['get'](SheetsShapeService)['insertShape'](_0x13c071,_0x19bcae,_0xfd6f31,_0x5c69e8,_0x4077eb),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core['CommandType']['MUTATION'],'handler':(_0x207c2,_0x277bbe)=>{const _0x40fde7=_0x2a18d5,{unitId:_0x5850f4,subUnitId:_0x2eaf8a,shapeId:_0x3b115e}=_0x277bbe;return _0x207c2[_0x40fde7(0x164)](SheetsShapeService)[_0x40fde7(0x131)](_0x5850f4,_0x2eaf8a,_0x3b115e),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x12c),'handler':(_0x4d9064,_0x6edfdb)=>{const _0x511155=_0x2a18d5;var _0x2acad0,_0x2ba7db;const _0xb4f2fc=(0x0,_univerjs_sheets[_0x511155(0x127)])(_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0xd3)]),_0x6edfdb);if(!_0xb4f2fc)return![];const _0x310897=_0x4d9064[_0x511155(0x164)](_univerjs_sheets[_0x511155(0xe7)]),{unitId:_0x508450,subUnitId:_0x14bb54}=_0xb4f2fc,_0x3fb4fd=_0x310897['ensureSkeleton'](_0x508450,_0x14bb54);if(!_0x3fb4fd)return![];const _0xea867e=_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0xfa)]),_0x57cba3=_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0x178)]),_0x4b2be9=_0x4d9064[_0x511155(0x164)](_univerjs_sheets[_0x511155(0x119)]),_0x571e0b=_0x4d9064[_0x511155(0x164)](_univerjs_sheets_drawing[_0x511155(0x182)]),{shapeType:_0x3eab77,shapeData:_0x1605a6}=_0x6edfdb,_0x5a430b=_0x6edfdb[_0x511155(0x14d)]||(0x0,_univerjs_core[_0x511155(0x143)])(),_0x5f25a8={'unitId':_0x508450,'subUnitId':_0x14bb54,'shapeId':_0x5a430b,'shapeType':_0x3eab77,'shapeData':_0x1605a6},_0x5569ad=_0x6edfdb['width']||0xc8,_0x47bffa=_0x6edfdb['height']||0xc8;let _0x1adbdd=0x0,_0x14663c=0x0,_0xe69a2d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x47474c={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x6edfdb[_0x511155(0x101)]){const {x:_0x5a4e04,y:_0x5a3423}=_0x6edfdb['position'];_0x1adbdd=_0x5a4e04,_0x14663c=_0x5a3423,_0xe69a2d=_0x3fb4fd[_0x511155(0x184)](_0x5a4e04,_0x5a3423),_0x47474c=_0x3fb4fd[_0x511155(0x184)](_0x5a4e04+_0x5569ad,_0x5a3423+_0x47bffa);}else{if(_0x6edfdb[_0x511155(0xee)]){const {startRow:_0x1ce811,startColumn:_0x13ae4e}=_0x6edfdb[_0x511155(0xee)],_0x5721e2=0xa,_0x41da4a=0xa;_0xe69a2d={'row':_0x1ce811,'rowOffset':_0x5721e2,'column':_0x13ae4e,'columnOffset':_0x41da4a};const _0xdc1222=_0x3fb4fd[_0x511155(0x10c)](_0x1ce811,_0x13ae4e);_0x1adbdd=_0xdc1222[_0x511155(0xf1)]+_0x41da4a,_0x14663c=_0xdc1222[_0x511155(0xdf)]+_0x5721e2,_0x47474c=_0x3fb4fd[_0x511155(0x184)](_0x1adbdd+_0x5569ad,_0x14663c+_0x47bffa);}}const _0x429d34={'from':_0xe69a2d,'to':_0x47474c},_0x4795dc={'unitId':_0x508450,'subUnitId':_0x14bb54,'drawingId':_0x5a430b,'drawingType':_univerjs_core[_0x511155(0x16b)][_0x511155(0xe0)],'sheetTransform':_0x429d34,'transform':{'left':_0x1adbdd,'top':_0x14663c,'width':_0x5569ad,'height':_0x47bffa},'data':{'shapeType':_0x3eab77,'shapeData':_0x1605a6},'axisAlignSheetTransform':_0x429d34,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x511155(0xfb)])(_0x3eab77)&&(_0x4795dc[_0x511155(0x170)][_0x511155(0x144)]=![],_0x4795dc[_0x511155(0x170)][_0x511155(0xc9)]=![],_0x4795dc[_0x511155(0x170)][_0x511155(0x162)]=![],_0x4795dc['data'][_0x511155(0x15c)]=![],_0x4795dc['transform'][_0x511155(0xc9)]=![],_0x4795dc['transform'][_0x511155(0x162)]=![],_0x4795dc[_0x511155(0xd1)][_0x511155(0x15c)]=![]);const {undo:_0x1d268d,redo:_0x37d62c,objects:_0x2b17d4}=_0x571e0b[_0x511155(0x130)]([_0x4795dc]),_0x3dd903=_0x4b2be9[_0x511155(0x10e)]({'id':_univerjs_sheets_drawing[_0x511155(0x15b)]['id'],'params':{'unitId':_0x508450,'drawings':[_0x4795dc]}}),_0x474a02=[...(_0x2acad0=_0x3dd903[_0x511155(0x109)])!==null&&_0x2acad0!==void 0x0?_0x2acad0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'op':_0x37d62c,'objects':_0x2b17d4,'type':_univerjs_sheets_drawing[_0x511155(0x186)][_0x511155(0x17d)]}},{'id':_univerjs_sheets_drawing[_0x511155(0x11d)]['id'],'params':[_0x508450]},..._0x3dd903['redos'],{'id':InsertSheetsShapeMutation['id'],'params':_0x5f25a8}],_0x168fad=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'shapeId':_0x5a430b}},...(_0x2ba7db=_0x3dd903['preUndos'])!==null&&_0x2ba7db!==void 0x0?_0x2ba7db:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'op':_0x1d268d,'objects':_0x2b17d4,'type':_univerjs_sheets_drawing[_0x511155(0x186)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x511155(0x11d)]['id'],'params':[_0x508450]},..._0x3dd903[_0x511155(0x136)]];if((0x0,_univerjs_core[_0x511155(0xf2)])(_0x474a02,_0xea867e))return _0x57cba3[_0x511155(0x123)]({'unitID':_0x508450,'undoMutations':_0x168fad,'redoMutations':_0x474a02}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x2a18d5(0x15d),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0xe4)],'handler':(_0x554549,_0x2c162e)=>{const _0x5a27c9=_0x2a18d5,{unitId:_0x56b339,subUnitId:_0x4e2eb4,shapeType:_0x3619fd,shapeId:_0x33bca7,shapeData:_0xeda8e3}=_0x2c162e,_0x3eef39=_0x554549['get'](SheetsShapeService)[_0x5a27c9(0x10a)](_0x56b339,_0x4e2eb4,_0x33bca7);if(_0x3eef39){if(_0x3619fd!==void 0x0)_0x3eef39[_0x5a27c9(0x181)](_0x3619fd);if(_0xeda8e3)_0x3eef39===null||_0x3eef39===void 0x0||_0x3eef39['setShapeData'](_0xeda8e3,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x17c),'handler':(_0x2b2849,_0x44bdcc)=>{const _0x3a7dea=_0x2a18d5;var _0x1be978,_0x1ef9f3;const _0x3e1852=(0x0,_univerjs_sheets[_0x3a7dea(0x127)])(_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0xd3)]),_0x44bdcc);if(!_0x3e1852)return![];const _0xea5650=_0x2b2849['get'](_univerjs_sheets[_0x3a7dea(0xe7)]),{unitId:_0x425953,subUnitId:_0x2f591d}=_0x3e1852,_0x53e9bb=_0xea5650[_0x3a7dea(0x12b)](_0x425953,_0x2f591d);if(!_0x53e9bb)return![];const _0x28c542=_0x2b2849[_0x3a7dea(0x164)](SheetsShapeService),{shapeId:_0x3fd655,shapeType:_0x379116,shapeData:_0xe15174,position:_0x4afd20,width:_0x3dac54,height:_0x81f91b}=_0x44bdcc,_0x10b181=_0x28c542[_0x3a7dea(0x10a)](_0x425953,_0x2f591d,_0x3fd655);if(!_0x10b181)return![];const _0x395d91=_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0xfa)]),_0x4dcaa0=_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0x178)]),_0x535ce2=_0x2b2849[_0x3a7dea(0x164)](_univerjs_sheets[_0x3a7dea(0x119)]),_0x5a584b=_0x2b2849['get'](_univerjs_sheets_drawing[_0x3a7dea(0x182)]),_0x1b8a45={'unitId':_0x425953,'subUnitId':_0x2f591d,'shapeId':_0x3fd655,'shapeType':_0x379116,'shapeData':_0xe15174},_0x12d40a=_0x10b181['getShapeType'](),_0x336d3e=_0x10b181['getShapeData'](),{x:_0x1f8b68,y:_0x49a357}=_0x4afd20,_0x5d66c9={'from':_0x53e9bb[_0x3a7dea(0x184)](_0x1f8b68,_0x49a357),'to':_0x53e9bb[_0x3a7dea(0x184)](_0x1f8b68+_0x3dac54,_0x49a357+_0x81f91b)},_0x2aa58a={'unitId':_0x425953,'subUnitId':_0x2f591d,'drawingId':_0x3fd655,'drawingType':_univerjs_core[_0x3a7dea(0x16b)][_0x3a7dea(0xe0)],'sheetTransform':_0x5d66c9,'transform':{'left':_0x1f8b68,'top':_0x49a357,'width':_0x3dac54,'height':_0x81f91b},'data':{'shapeType':_0x379116,'shapeData':_0xe15174},'axisAlignSheetTransform':_0x5d66c9,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x3a7dea(0xfb)])(_0x379116)&&(_0x2aa58a[_0x3a7dea(0x170)][_0x3a7dea(0x144)]=![],_0x2aa58a['data'][_0x3a7dea(0xc9)]=![],_0x2aa58a[_0x3a7dea(0x170)]['resizeEnabled']=![],_0x2aa58a['data'][_0x3a7dea(0x15c)]=![],_0x2aa58a[_0x3a7dea(0xd1)]['rotateEnabled']=![],_0x2aa58a[_0x3a7dea(0xd1)]['resizeEnabled']=![],_0x2aa58a[_0x3a7dea(0xd1)][_0x3a7dea(0x15c)]=![]);const {undo:_0x1f1754,redo:_0x4eea89,objects:_0x15484f}=_0x5a584b['getBatchUpdateOp']([_0x2aa58a]),_0x1bab54=_0x535ce2[_0x3a7dea(0x10e)]({'id':_univerjs_sheets_drawing[_0x3a7dea(0xeb)]['id'],'params':{'unitId':_0x425953,'drawings':[_0x2aa58a]}}),_0x218760=[...(_0x1be978=_0x1bab54[_0x3a7dea(0x109)])!==null&&_0x1be978!==void 0x0?_0x1be978:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'op':_0x4eea89,'objects':_0x15484f,'type':_univerjs_sheets_drawing[_0x3a7dea(0x186)][_0x3a7dea(0x128)]}},{'id':_univerjs_sheets_drawing[_0x3a7dea(0x11d)]['id'],'params':[_0x425953]},..._0x1bab54[_0x3a7dea(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1b8a45}],_0x561437=[...(_0x1ef9f3=_0x1bab54[_0x3a7dea(0x179)])!==null&&_0x1ef9f3!==void 0x0?_0x1ef9f3:[],{'id':_univerjs_sheets_drawing[_0x3a7dea(0x118)]['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'op':_0x1f1754,'objects':_0x15484f,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x3a7dea(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x425953]},..._0x1bab54[_0x3a7dea(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'shapeType':_0x12d40a,'shapeId':_0x3fd655,'shapeData':_0x336d3e}}];if((0x0,_univerjs_core[_0x3a7dea(0xf2)])(_0x218760,_0x395d91))return _0x4dcaa0[_0x3a7dea(0x123)]({'unitID':_0x425953,'undoMutations':_0x561437,'redoMutations':_0x218760}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x116),'handler':(_0x45275d,_0x1652fe)=>{const _0x2152d0=_0x2a18d5;var _0x56628e,_0x172060;const _0x4dd38e=(0x0,_univerjs_sheets[_0x2152d0(0x127)])(_0x45275d[_0x2152d0(0x164)](_univerjs_core[_0x2152d0(0xd3)]),_0x1652fe);if(!_0x4dd38e)return![];const _0x2ba4c7=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets[_0x2152d0(0xe7)]),{unitId:_0x43ef7d,subUnitId:_0x5e7f81}=_0x4dd38e,_0x130fad=_0x2ba4c7[_0x2152d0(0x13b)](_0x43ef7d,_0x5e7f81);if(!_0x130fad)return![];const _0x1da19e=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets_drawing[_0x2152d0(0x182)]),{shapeId:_0x581831,flipH:_0x26c41d,flipV:_0x1b2f5e}=_0x1652fe,_0x4add16=_0x1da19e[_0x2152d0(0x16d)]({'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'drawingId':_0x581831});if(!_0x4add16)return![];const _0xeab154=_0x45275d['get'](SheetsShapeService)[_0x2152d0(0x10a)](_0x43ef7d,_0x5e7f81,_0x581831);if(!_0xeab154)return![];const _0x20bbf2=_0x45275d['get'](_univerjs_core['ICommandService']),_0x5b339c=_0x45275d[_0x2152d0(0x164)](_univerjs_core[_0x2152d0(0x178)]),_0x2e13a5=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets['SheetInterceptorService']),_0x28bd21={..._0x4add16[_0x2152d0(0xd1)]};if(_0x26c41d!==void 0x0)_0x28bd21[_0x2152d0(0x18c)]=!_0x28bd21[_0x2152d0(0x18c)];if(_0x1b2f5e!==void 0x0)_0x28bd21[_0x2152d0(0xc6)]=!_0x28bd21[_0x2152d0(0xc6)];const _0x438ac8=(0x0,_univerjs_sheets_drawing[_0x2152d0(0xc3)])(_0x28bd21,_0x130fad),_0x5319bc=(0x0,_univerjs_sheets_drawing[_0x2152d0(0x11a)])(_0x28bd21,_0x130fad),_0x544b73=_0xeab154[_0x2152d0(0xc5)](),_0x22fda0=_0xeab154[_0x2152d0(0x100)](),_0x4fb4fa={'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'drawingId':_0x581831,'drawingType':_univerjs_core[_0x2152d0(0x16b)][_0x2152d0(0xe0)],'sheetTransform':_0x438ac8,'transform':_0x28bd21,'data':{'shapeType':_0x544b73,'shapeData':_0x22fda0},'axisAlignSheetTransform':_0x5319bc,'allowTransform':!![]},{undo:_0x4bbba0,redo:_0x5aafb4,objects:_0x114fcd}=_0x1da19e[_0x2152d0(0xe2)]([_0x4fb4fa]),_0x1cd65d=_0x2e13a5[_0x2152d0(0x10e)]({'id':_univerjs_sheets_drawing[_0x2152d0(0xeb)]['id'],'params':{'unitId':_0x43ef7d,'drawings':[_0x4fb4fa]}}),_0xe4741=[...(_0x56628e=_0x1cd65d[_0x2152d0(0x109)])!==null&&_0x56628e!==void 0x0?_0x56628e:[],{'id':_univerjs_sheets_drawing[_0x2152d0(0x118)]['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'op':_0x5aafb4,'objects':_0x114fcd,'type':_univerjs_sheets_drawing[_0x2152d0(0x186)][_0x2152d0(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x43ef7d]},..._0x1cd65d[_0x2152d0(0x12f)]],_0x53075e=[...(_0x172060=_0x1cd65d[_0x2152d0(0x179)])!==null&&_0x172060!==void 0x0?_0x172060:[],{'id':_univerjs_sheets_drawing[_0x2152d0(0x118)]['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'op':_0x4bbba0,'objects':_0x114fcd,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2152d0(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x43ef7d]},..._0x1cd65d[_0x2152d0(0x136)]];if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x544b73)){const _0x3107d6=_0xeab154[_0x2152d0(0x108)]();if(_0x3107d6){const _0x3c5c3b={..._0x3107d6};_0x3c5c3b[_0x2152d0(0x185)]=void 0x0,_0x3c5c3b['to']=void 0x0,_0xe4741[_0x2152d0(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'shapeId':_0x581831,'shapeType':_0x544b73,'shapeData':{'relation':_0x3c5c3b}}}),_0x53075e[_0x2152d0(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'shapeId':_0x581831,'shapeType':_0x544b73,'shapeData':{'relation':_0x3107d6}}});}}if((0x0,_univerjs_core[_0x2152d0(0xf2)])(_0xe4741,_0x20bbf2))return _0x5b339c[_0x2152d0(0x123)]({'unitID':_0x43ef7d,'undoMutations':_0x53075e,'redoMutations':_0xe4741}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core['CommandType'][_0x2a18d5(0x134)],'id':_0x2a18d5(0x14e),'handler':(_0x1c7c3c,_0x596df6)=>{const _0x13f094=_0x2a18d5;var _0x55ebb5,_0xed3ec1;const _0x854b74=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0xd3)]),_0x596df6);if(!_0x854b74)return![];const _0x55b8ef=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets[_0x13f094(0xe7)]),{unitId:_0x38e0a1,subUnitId:_0x4d80a3}=_0x854b74,_0x254f8e=_0x55b8ef['getSkeleton'](_0x38e0a1,_0x4d80a3);if(!_0x254f8e)return![];const _0x2b7398=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets_drawing[_0x13f094(0x182)]),{shapeId:_0x208b17,rotate:_0x1d0985}=_0x596df6,_0x12c603=_0x2b7398[_0x13f094(0x16d)]({'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'drawingId':_0x208b17});if(!_0x12c603)return![];const _0x4b7efa=_0x1c7c3c['get'](SheetsShapeService)[_0x13f094(0x10a)](_0x38e0a1,_0x4d80a3,_0x208b17);if(!_0x4b7efa)return![];const _0x124044=_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0xfa)]),_0x359810=_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0x178)]),_0x177edd=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets[_0x13f094(0x119)]),_0x2a99ed={..._0x12c603['transform']};if(_0x1d0985!==void 0x0)_0x2a99ed[_0x13f094(0x15a)]=(_0x2a99ed[_0x13f094(0x15a)]||0x0)+_0x1d0985;const _0x3ccf64=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x2a99ed,_0x254f8e),_0x356ddd=(0x0,_univerjs_sheets_drawing[_0x13f094(0x11a)])(_0x2a99ed,_0x254f8e),_0x37a7c3=_0x4b7efa[_0x13f094(0xc5)](),_0x4bcbf3=_0x4b7efa[_0x13f094(0x100)](),_0x9b7b8b={'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'drawingId':_0x208b17,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x13f094(0xe0)],'sheetTransform':_0x3ccf64,'transform':_0x2a99ed,'data':{'shapeType':_0x37a7c3,'shapeData':_0x4bcbf3},'axisAlignSheetTransform':_0x356ddd,'allowTransform':!![]},{undo:_0x47a4db,redo:_0x593fa8,objects:_0x58f864}=_0x2b7398[_0x13f094(0xe2)]([_0x9b7b8b]),_0x44f676=_0x177edd[_0x13f094(0x10e)]({'id':_univerjs_sheets_drawing[_0x13f094(0xeb)]['id'],'params':{'unitId':_0x38e0a1,'drawings':[_0x9b7b8b]}}),_0xe723fd=[...(_0x55ebb5=_0x44f676[_0x13f094(0x109)])!==null&&_0x55ebb5!==void 0x0?_0x55ebb5:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'op':_0x593fa8,'objects':_0x58f864,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x13f094(0x128)]}},{'id':_univerjs_sheets_drawing[_0x13f094(0x11d)]['id'],'params':[_0x38e0a1]},..._0x44f676[_0x13f094(0x12f)]],_0x1bc36f=[...(_0xed3ec1=_0x44f676[_0x13f094(0x179)])!==null&&_0xed3ec1!==void 0x0?_0xed3ec1:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'op':_0x47a4db,'objects':_0x58f864,'type':_univerjs_sheets_drawing[_0x13f094(0x186)][_0x13f094(0x128)]}},{'id':_univerjs_sheets_drawing[_0x13f094(0x11d)]['id'],'params':[_0x38e0a1]},..._0x44f676['undos']];if((0x0,_univerjs_core[_0x13f094(0xf2)])(_0xe723fd,_0x124044))return _0x359810['pushUndoRedo']({'unitID':_0x38e0a1,'undoMutations':_0x1bc36f,'redoMutations':_0xe723fd}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x110),'handler':(_0x280b8f,_0x4b69fd)=>{const _0x29caf3=_0x2a18d5;var _0x37185d;const _0x4d22a2=(0x0,_univerjs_sheets[_0x29caf3(0x127)])(_0x280b8f[_0x29caf3(0x164)](_univerjs_core[_0x29caf3(0xd3)]),_0x4b69fd);if(!_0x4d22a2)return![];const {unitId:_0x2c6567,subUnitId:_0x385c26}=_0x4d22a2,{shapeId:_0x4678f6}=_0x4b69fd,_0x5a0616=_0x280b8f[_0x29caf3(0x164)](SheetsShapeService)[_0x29caf3(0x10a)](_0x2c6567,_0x385c26,_0x4678f6);if(!_0x5a0616)return![];const _0x96fa5e=_0x5a0616[_0x29caf3(0x18b)](),_0x17db1b=(_0x37185d=_0x96fa5e===null||_0x96fa5e===void 0x0?void 0x0:_0x96fa5e['isHorizontal'])!==null&&_0x37185d!==void 0x0?_0x37185d:!![],_0x42a960=!_0x17db1b,_0x11ff8c=_0x280b8f['get'](_univerjs_core[_0x29caf3(0xfa)]),_0x2ee44e=_0x280b8f['get'](_univerjs_core[_0x29caf3(0x178)]),_0x88a43e={'unitId':_0x2c6567,'subUnitId':_0x385c26,'shapeId':_0x4678f6,'shapeData':{'shapeText':{'isHorizontal':_0x42a960}}},_0x3d31d0={'unitId':_0x2c6567,'subUnitId':_0x385c26,'shapeId':_0x4678f6,'shapeData':{'shapeText':{'isHorizontal':_0x17db1b}}},_0x36d8b8=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x88a43e}],_0x7a6dab=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x3d31d0}];if((0x0,_univerjs_core[_0x29caf3(0xf2)])(_0x36d8b8,_0x11ff8c))return _0x2ee44e['pushUndoRedo']({'unitID':_0x2c6567,'undoMutations':_0x7a6dab,'redoMutations':_0x36d8b8}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType'][_0x2a18d5(0x134)],'id':_0x2a18d5(0x18a),'handler':(_0x80c18f,_0x4c0f9e)=>{const _0x6fa552=_0x2a18d5;var _0x5a46cd,_0x4fb2ae,_0x3ea708,_0x501b3f;const _0xb29db4=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x80c18f['get'](_univerjs_core[_0x6fa552(0xd3)]),_0x4c0f9e);if(!_0xb29db4)return![];const _0x1e509a=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0xc47eb7,subUnitId:_0x1be48b}=_0xb29db4,_0x22b52f=_0x1e509a['getSkeleton'](_0xc47eb7,_0x1be48b);if(!_0x22b52f)return![];const _0x2eae23=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets_drawing[_0x6fa552(0x182)]),{connectorShapeId:_0x1cfed7,width:_0x595f87,height:_0x630217,left:_0x4ffad0,top:_0x304383,flipX:_0x16dfd6,flipY:_0x1d2153,rotation:_0x3177dd,oldAdjustValues:_0x43df8e,newAdjustValues:_0x3efa2d,oldLineType:_0x432bb8,newLineType:_0x2a6ad1,oldRelation:_0x3dbee7,newRelation:_0xd94f9}=_0x4c0f9e,_0x24e54d=_0x2eae23[_0x6fa552(0x16d)]({'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'drawingId':_0x1cfed7});if(!_0x24e54d)return![];const _0x3d8fbc=_0x80c18f['get'](SheetsShapeService)[_0x6fa552(0x10a)](_0xc47eb7,_0x1be48b,_0x1cfed7);if(!_0x3d8fbc)return![];const _0x59496b=_0x80c18f[_0x6fa552(0x164)](_univerjs_core['ICommandService']),_0x4e9ec5=_0x80c18f[_0x6fa552(0x164)](_univerjs_core['IUndoRedoService']),_0x16f02d=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets[_0x6fa552(0x119)]),_0x3b4c65={..._0x24e54d[_0x6fa552(0xd1)],'width':_0x595f87,'height':_0x630217,'left':_0x4ffad0,'top':_0x304383,'flipX':_0x16dfd6,'flipY':_0x1d2153,'angle':(_0x5a46cd=_0x3177dd!==null&&_0x3177dd!==void 0x0?_0x3177dd:(_0x4fb2ae=_0x24e54d[_0x6fa552(0xd1)])===null||_0x4fb2ae===void 0x0?void 0x0:_0x4fb2ae[_0x6fa552(0x15a)])!==null&&_0x5a46cd!==void 0x0?_0x5a46cd:0x0},_0x7f4f75=(0x0,_univerjs_sheets_drawing[_0x6fa552(0xc3)])(_0x3b4c65,_0x22b52f),_0x50abf9=(0x0,_univerjs_sheets_drawing[_0x6fa552(0x11a)])(_0x3b4c65,_0x22b52f),_0x455d36=_0x3d8fbc[_0x6fa552(0xc5)](),_0x118bbf=_0x3d8fbc[_0x6fa552(0x100)](),_0x44e35f={'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'drawingId':_0x1cfed7,'drawingType':_univerjs_core[_0x6fa552(0x16b)]['DRAWING_SHAPE'],'sheetTransform':_0x7f4f75,'transform':_0x3b4c65,'data':{'shapeType':_0x2a6ad1||_0x432bb8||_0x455d36,'shapeData':{..._0x118bbf,'adjustValues':_0x3efa2d||_0x43df8e||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0xde)]),'relation':_0xd94f9||_0x3dbee7||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0x105)])}},'axisAlignSheetTransform':_0x50abf9,'allowTransform':!![]},{undo:_0x1af21c,redo:_0x382ee0,objects:_0x37b9e5}=_0x2eae23['getBatchUpdateOp']([_0x44e35f]),_0x4c7c7=_0x16f02d[_0x6fa552(0x10e)]({'id':_univerjs_sheets_drawing[_0x6fa552(0xeb)]['id'],'params':{'unitId':_0xc47eb7,'drawings':[_0x44e35f]}}),_0x9a1efc=[...(_0x3ea708=_0x4c7c7[_0x6fa552(0x109)])!==null&&_0x3ea708!==void 0x0?_0x3ea708:[],{'id':_univerjs_sheets_drawing[_0x6fa552(0x118)]['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'op':_0x382ee0,'objects':_0x37b9e5,'type':_univerjs_sheets_drawing[_0x6fa552(0x186)][_0x6fa552(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0xc47eb7]},..._0x4c7c7[_0x6fa552(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'shapeId':_0x1cfed7,'shapeType':_0x2a6ad1,'shapeData':{'adjustValues':_0x3efa2d,'relation':_0xd94f9}}}],_0x36fc34=[...(_0x501b3f=_0x4c7c7[_0x6fa552(0x179)])!==null&&_0x501b3f!==void 0x0?_0x501b3f:[],{'id':_univerjs_sheets_drawing[_0x6fa552(0x118)]['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'op':_0x1af21c,'objects':_0x37b9e5,'type':_univerjs_sheets_drawing[_0x6fa552(0x186)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x6fa552(0x11d)]['id'],'params':[_0xc47eb7]},..._0x4c7c7[_0x6fa552(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'shapeId':_0x1cfed7,'shapeType':_0x455d36,'shapeData':{..._0x118bbf,'adjustValues':_0x43df8e||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0xde)]),'relation':_0x3dbee7||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0x105)])}}}];if((0x0,_univerjs_core[_0x6fa552(0xf2)])(_0x9a1efc,_0x59496b))return _0x4e9ec5[_0x6fa552(0x123)]({'unitID':_0xc47eb7,'undoMutations':_0x36fc34,'redoMutations':_0x9a1efc}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x125),'handler':(_0x4f61ea,_0x32b945)=>{const _0x2602cc=_0x2a18d5;var _0x723f3d,_0x23776d;const _0x1e1681=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x4f61ea[_0x2602cc(0x164)](_univerjs_core[_0x2602cc(0xd3)]),_0x32b945);if(!_0x1e1681)return![];const _0x5423df=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets[_0x2602cc(0xe7)]),{unitId:_0x29356c,subUnitId:_0x52b05e}=_0x1e1681,_0xdee136=_0x5423df[_0x2602cc(0x13b)](_0x29356c,_0x52b05e);if(!_0xdee136)return![];const _0x31a8e5=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets_drawing[_0x2602cc(0x182)]),{shapeId:_0x42aa5e,width:_0x5aadb9,height:_0xd18981,left:_0x5a5faa,top:_0x2a943c,flipX:_0x304e71,flipY:_0x329bdd,angle:_0xf50dff,oldAdjustValues:_0x512b7d,newAdjustValues:_0x23159e,oldLineType:_0x9a241e,newLineType:_0x29668e}=_0x32b945,_0x227626=_0x31a8e5['getDrawingByParam']({'unitId':_0x29356c,'subUnitId':_0x52b05e,'drawingId':_0x42aa5e});if(!_0x227626)return![];const _0x5e0130=_0x4f61ea[_0x2602cc(0x164)](SheetsShapeService)[_0x2602cc(0x10a)](_0x29356c,_0x52b05e,_0x42aa5e);if(!_0x5e0130)return![];const _0x419f8d=_0x4f61ea['get'](_univerjs_core['ICommandService']),_0x9dd4ca=_0x4f61ea[_0x2602cc(0x164)](_univerjs_core['IUndoRedoService']),_0x3c9b76=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets[_0x2602cc(0x119)]),_0x361a65={..._0x227626['transform'],'width':_0x5aadb9,'height':_0xd18981,'left':_0x5a5faa,'top':_0x2a943c,'flipX':_0x304e71,'flipY':_0x329bdd,'angle':_0xf50dff},_0x13c6ec=(0x0,_univerjs_sheets_drawing[_0x2602cc(0xc3)])(_0x361a65,_0xdee136),_0x414bcc=(0x0,_univerjs_sheets_drawing[_0x2602cc(0x11a)])(_0x361a65,_0xdee136),_0x492778=_0x5e0130[_0x2602cc(0xc5)](),_0x3c1ba9=_0x5e0130[_0x2602cc(0x100)](),_0x493f26={'unitId':_0x29356c,'subUnitId':_0x52b05e,'drawingId':_0x42aa5e,'drawingType':_univerjs_core[_0x2602cc(0x16b)][_0x2602cc(0xe0)],'sheetTransform':_0x13c6ec,'transform':_0x361a65,'data':{'shapeType':_0x29668e||_0x9a241e||_0x492778,'shapeData':{..._0x3c1ba9,'adjustValues':_0x23159e||_0x512b7d||(_0x3c1ba9===null||_0x3c1ba9===void 0x0?void 0x0:_0x3c1ba9[_0x2602cc(0xde)])}},'axisAlignSheetTransform':_0x414bcc,'allowTransform':!![]},{undo:_0x1f943f,redo:_0x351afb,objects:_0x5c80ee}=_0x31a8e5[_0x2602cc(0xe2)]([_0x493f26]),_0x471a3a=_0x3c9b76[_0x2602cc(0x10e)]({'id':_univerjs_sheets_drawing[_0x2602cc(0xeb)]['id'],'params':{'unitId':_0x29356c,'drawings':[_0x493f26]}}),_0x171f21=[...(_0x723f3d=_0x471a3a[_0x2602cc(0x109)])!==null&&_0x723f3d!==void 0x0?_0x723f3d:[],{'id':_univerjs_sheets_drawing[_0x2602cc(0x118)]['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'op':_0x351afb,'objects':_0x5c80ee,'type':_univerjs_sheets_drawing[_0x2602cc(0x186)][_0x2602cc(0x128)]}},{'id':_univerjs_sheets_drawing[_0x2602cc(0x11d)]['id'],'params':[_0x29356c]},..._0x471a3a[_0x2602cc(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'shapeId':_0x42aa5e,'shapeType':_0x29668e,'shapeData':{'adjustValues':_0x23159e}}}],_0x138951=[...(_0x23776d=_0x471a3a[_0x2602cc(0x179)])!==null&&_0x23776d!==void 0x0?_0x23776d:[],{'id':_univerjs_sheets_drawing[_0x2602cc(0x118)]['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'op':_0x1f943f,'objects':_0x5c80ee,'type':_univerjs_sheets_drawing[_0x2602cc(0x186)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x2602cc(0x11d)]['id'],'params':[_0x29356c]},..._0x471a3a[_0x2602cc(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'shapeId':_0x42aa5e,'shapeType':_0x492778,'shapeData':{..._0x3c1ba9,'adjustValues':_0x512b7d||(_0x3c1ba9===null||_0x3c1ba9===void 0x0?void 0x0:_0x3c1ba9['adjustValues'])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x171f21,_0x419f8d))return _0x9dd4ca[_0x2602cc(0x123)]({'unitID':_0x29356c,'undoMutations':_0x138951,'redoMutations':_0x171f21}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x2a18d5(0xe1),'type':_univerjs_core['CommandType'][_0x2a18d5(0xe4)],'handler':(_0x21ce2c,_0x4df78c)=>{const _0x442715=_0x2a18d5,{unitId:_0x28cef5,subUnitId:_0x31f597,shapeType:_0x3378f7,shapeId:_0x16918c,shapeData:_0x2af477}=_0x4df78c,_0x13f6da=_0x21ce2c[_0x442715(0x164)](SheetsShapeService)['getShapeModel'](_0x28cef5,_0x31f597,_0x16918c);if(_0x13f6da){_0x13f6da['setShapeType'](_0x3378f7);if(_0x2af477)_0x13f6da===null||_0x13f6da===void 0x0||_0x13f6da[_0x442715(0x141)](_0x2af477);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x2a18d5(0xcf),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'handler':(_0x2bd525,_0x2c82fe)=>{const _0x5c9618=_0x2a18d5;if(!_0x2c82fe)return![];const _0xb8103b=_0x2bd525[_0x5c9618(0x164)](_univerjs_core[_0x5c9618(0xfa)]),_0x2116f1=_0x2bd525[_0x5c9618(0x164)](SheetsShapeService),_0x53b379=_0x2bd525[_0x5c9618(0x164)](_univerjs_core[_0x5c9618(0x178)]),_0x38e92a=[],_0x5e5dc0=[],{unitId:_0x1a5075,subUnitId:_0x59b528,shapeId:_0x2b7e83,shapeType:_0x280d71,shapeData:_0x3e6426}=_0x2c82fe,_0x52b770=_0x2116f1['getShapeModel'](_0x1a5075,_0x59b528,_0x2b7e83);if(_0x52b770){const _0xef5e29=_0x52b770[_0x5c9618(0xc5)](),_0x580cd2=Object[_0x5c9618(0x115)]({},_0x52b770['getShapeData']()),_0x2288ea={'unitId':_0x1a5075,'subUnitId':_0x59b528,'shapeId':_0x2b7e83,'shapeType':_0x280d71,'shapeData':_0x3e6426},_0x3ee0b4={'unitId':_0x1a5075,'subUnitId':_0x59b528,'shapeId':_0x2b7e83,'shapeType':_0xef5e29,'shapeData':_0x580cd2};_0x38e92a['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x2288ea}),_0x5e5dc0[_0x5c9618(0x16c)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x3ee0b4});if(_0x38e92a[_0x5c9618(0xd8)](_0x1dd3a3=>_0xb8103b[_0x5c9618(0x104)](_0x1dd3a3['id'],_0x1dd3a3[_0x5c9618(0x13c)])))_0x53b379['pushUndoRedo']({'unitID':_0x1a5075,'redoMutations':[..._0x38e92a],'undoMutations':[..._0x5e5dc0]});return!![];}return![];}};var name=_0x2a18d5(0x163),version=_0x2a18d5(0xe8);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x2a18d5(0xfc),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0xb9f704,_0x28e2d4,_0x2ff18c,_0x41e58b,_0x506897){const _0x103dc1=_0x2a18d5;super(),this[_0x103dc1(0x166)]=_0xb9f704,this[_0x103dc1(0x188)]=_0x28e2d4,this[_0x103dc1(0xe5)]=_0x2ff18c,this[_0x103dc1(0x113)]=_0x41e58b,this[_0x103dc1(0x16e)]=_0x506897,this[_0x103dc1(0x122)](),this[_0x103dc1(0x13d)]();}[_0x2a18d5(0x122)](){const _0x450ed2=_0x2a18d5;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation]['forEach'](_0x5c4905=>this[_0x450ed2(0x126)](this[_0x450ed2(0x166)][_0x450ed2(0x165)](_0x5c4905)));}[_0x2a18d5(0x13d)](){const _0x1233a6=_0x2a18d5;this[_0x1233a6(0x126)](this[_0x1233a6(0x188)][_0x1233a6(0x138)]({'getMutations':_0x476099=>{const _0x403128=_0x1233a6;if(_0x476099['id']===_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id']){const {drawings:_0x12c31e}=_0x476099[_0x403128(0x13c)],_0x1ab5db=_0x12c31e['filter'](_0x502d11=>_0x502d11['drawingType']===_univerjs_core[_0x403128(0x16b)]['DRAWING_SHAPE']);if(_0x1ab5db['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x361c63=[],_0x442031=[];return _0x1ab5db[_0x403128(0x12e)](_0x1ddcd8=>{const _0x4c521c=_0x403128,{unitId:_0x8f2465,subUnitId:_0x298707,drawingId:_0x10116a}=_0x1ddcd8,_0x3f2127=this[_0x4c521c(0x113)][_0x4c521c(0x10a)](_0x8f2465,_0x298707,_0x10116a);if(!_0x3f2127)throw new TypeError(_0x4c521c(0x13f)+_0x3f2127);_0x361c63[_0x4c521c(0x16c)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x10116a}}),_0x442031['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x10116a,'shapeType':_0x3f2127[_0x4c521c(0xc5)](),'shapeData':_0x3f2127[_0x4c521c(0x100)]()}});const _0xfb56b4=this[_0x4c521c(0x113)][_0x4c521c(0xe9)](_0x8f2465,_0x298707,_0x10116a);if(_0xfb56b4)for(const _0x3f21ff of _0xfb56b4){const _0x1321eb=_0x3f21ff[_0x4c521c(0x168)],_0x5ee33a=_0x3f21ff[_0x4c521c(0x13e)],_0x8e2724=_0x5ee33a?{'from':void 0x0}:{'to':void 0x0},_0x2a86fd=_0x5ee33a?{'from':{'shapeId':_0x3f21ff['shapeId'],'cxnIndex':_0x3f21ff[_0x4c521c(0x147)]}}:{'to':{'shapeId':_0x3f21ff[_0x4c521c(0x14d)],'cxnIndex':_0x3f21ff[_0x4c521c(0x147)]}};_0x361c63['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x1321eb,'shapeData':{'relation':_0x8e2724}}}),_0x442031[_0x4c521c(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x1321eb,'shapeData':{'relation':_0x2a86fd}}});}}),{'preRedos':_0x361c63,'redos':[],'preUndos':[],'undos':_0x442031};}if(_0x476099['id']===_univerjs_sheets_drawing[_0x403128(0xeb)]['id']){const {drawings:_0x5af7e8}=_0x476099[_0x403128(0x13c)],_0x575869=_0x5af7e8['filter'](_0x23558b=>_0x23558b['drawingType']===_univerjs_core[_0x403128(0x16b)]['DRAWING_SHAPE']);if(_0x575869[_0x403128(0xff)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x40b8ed=[],_0x56073d=[];for(const _0x2cfe35 of _0x575869){const {unitId:_0x95f0c3,subUnitId:_0x5aa7c2,drawingId:_0x49a0e7,transform:_0x35671f}=_0x2cfe35;if(!_0x95f0c3||!_0x5aa7c2||!_0x49a0e7||!_0x35671f)continue;const _0xa4302d=this[_0x403128(0x113)][_0x403128(0x10a)](_0x95f0c3,_0x5aa7c2,_0x49a0e7);if(!_0xa4302d)throw new TypeError(_0x403128(0x13f)+_0xa4302d);if((0x0,_univerjs_pro_engine_shape[_0x403128(0xfb)])(_0xa4302d['getShapeType']())){const _0x671d4a=this['_sheetsShapeService'][_0x403128(0x18e)](_0x95f0c3,_0x5aa7c2,_0x49a0e7),_0x5d02f0={'from':void 0x0,'to':void 0x0};_0x671d4a&&(_0x40b8ed[_0x403128(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x95f0c3,'subUnitId':_0x5aa7c2,'shapeId':_0x49a0e7,'shapeData':{'relation':_0x5d02f0}}}),_0x56073d[_0x403128(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x95f0c3,'subUnitId':_0x5aa7c2,'shapeId':_0x49a0e7,'shapeData':{'relation':_0x671d4a}}}));}else{const _0xeecda8=this[_0x403128(0x113)][_0x403128(0xe9)](_0x95f0c3,_0x5aa7c2,_0x49a0e7);if(_0xeecda8&&_0xeecda8[_0x403128(0xff)]>0x0)for(const _0x10dea5 of _0xeecda8){const _0x164089=_0x10dea5['lineShapeId'],_0xc97777=_0x10dea5[_0x403128(0x13e)],_0x360b28=this[_0x403128(0x113)][_0x403128(0x10a)](_0x95f0c3,_0x5aa7c2,_0x164089);if(!_0x360b28)continue;const _0x45055e=_0x360b28[_0x403128(0x173)](),_0x5c2eb7=_0x360b28['getEndConnectInfo']();if(_0x45055e&&_0x5c2eb7)this[_0x403128(0x160)](_0x95f0c3,_0x5aa7c2,_0x164089,_0x360b28,_0x45055e,_0x5c2eb7,_0x40b8ed,_0x56073d,_0x49a0e7,_0x35671f);else this['_addLineFollowShapeUpdates'](_0x95f0c3,_0x5aa7c2,_0x164089,_0x360b28,_0xc97777?_0x45055e:_0x5c2eb7,_0xc97777,_0x40b8ed,_0x56073d,_0x49a0e7,_0x35671f);}}}return{'preRedos':[],'redos':_0x40b8ed,'preUndos':_0x56073d,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x2a18d5(0x167)](_0x2cbe21,_0x396dff,_0x46a758,_0x15829d,_0x857494){const _0xfc62fe=_0x2a18d5;if(!_0x396dff||!_0x46a758)return null;const {shapeId:_0x4ba598,cxnIndex:_0x282947}=_0x2cbe21,_0x13710f=this[_0xfc62fe(0x113)]['getShapeModel'](_0x396dff,_0x46a758,_0x4ba598);if(!_0x13710f)return null;const _0x39e5b2=this[_0xfc62fe(0x16e)][_0xfc62fe(0x16d)]({'unitId':_0x396dff,'subUnitId':_0x46a758,'drawingId':_0x4ba598});if(!(_0x39e5b2===null||_0x39e5b2===void 0x0?void 0x0:_0x39e5b2[_0xfc62fe(0xd1)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x24a6cb}=_0x39e5b2['transform'];if(_0x857494&&_0x15829d===_0x4ba598){var _0x50085e,_0x1ad76a,_0x14d31d,_0x3925c3,_0x409842,_0x372a8f,_0x5e367f;left=(_0x50085e=_0x857494[_0xfc62fe(0x12a)])!==null&&_0x50085e!==void 0x0?_0x50085e:left,top=(_0x1ad76a=_0x857494[_0xfc62fe(0xd5)])!==null&&_0x1ad76a!==void 0x0?_0x1ad76a:top,width=(_0x14d31d=_0x857494[_0xfc62fe(0xca)])!==null&&_0x14d31d!==void 0x0?_0x14d31d:width,height=(_0x3925c3=_0x857494[_0xfc62fe(0xcd)])!==null&&_0x3925c3!==void 0x0?_0x3925c3:height,flipX=(_0x409842=_0x857494['flipX'])!==null&&_0x409842!==void 0x0?_0x409842:flipX,flipY=(_0x372a8f=_0x857494['flipY'])!==null&&_0x372a8f!==void 0x0?_0x372a8f:flipY,_0x24a6cb=(_0x5e367f=_0x857494[_0xfc62fe(0x15a)])!==null&&_0x5e367f!==void 0x0?_0x5e367f:_0x24a6cb;}_0x13710f['updateContext']({'width':width,'height':height});const _0x117f16=_0x13710f[_0xfc62fe(0xce)]()['find'](_0x5a07db=>_0x5a07db['index']===_0x282947);if(!_0x117f16)return null;let _0x29f17d=flipX?width-_0x117f16['x']:_0x117f16['x'],_0x5d1e77=flipY?height-_0x117f16['y']:_0x117f16['y'];if(_0x24a6cb!==0x0&&_0x24a6cb!==void 0x0&&_0x24a6cb!==null){const _0x5bf4b9=_0x24a6cb*Math['PI']/0xb4,_0x24f7b5=Math[_0xfc62fe(0x183)](_0x5bf4b9),_0x2a20c5=Math['sin'](_0x5bf4b9),_0x2d5e81=width/0x2,_0x304f55=height/0x2,_0x5e844d=_0x29f17d-_0x2d5e81,_0x1d5347=_0x5d1e77-_0x304f55;_0x29f17d=_0x2d5e81+_0x5e844d*_0x24f7b5-_0x1d5347*_0x2a20c5,_0x5d1e77=_0x304f55+_0x5e844d*_0x2a20c5+_0x1d5347*_0x24f7b5;}_0x29f17d+=left,_0x5d1e77+=top;let _0x12d0ae=_0x117f16['ang']/0xea60;if(flipX)_0x12d0ae=0xb4-_0x12d0ae;if(flipY)_0x12d0ae=-_0x12d0ae;_0x12d0ae+=_0x24a6cb||0x0,_0x12d0ae=(_0x12d0ae%0x168+0x168)%0x168;const _0x17d1aa=(0x0,_univerjs_pro_engine_shape[_0xfc62fe(0xc4)])({'left':left,'top':top,'width':width,'height':height},_0x24a6cb||0x0);return{'point':{'x':_0x29f17d,'y':_0x5d1e77},'angle':_0x12d0ae,'bounds':_0x17d1aa};}[_0x2a18d5(0x160)](_0x40ab74,_0x214fcb,_0x5108bb,_0x52ffa6,_0x529b3d,_0x5488e1,_0x58d4f5,_0x1fced1,_0x3eee75,_0x242af5){const _0x49b9ab=_0x2a18d5,_0x8ea92f=this[_0x49b9ab(0xe5)][_0x49b9ab(0x13b)](_0x40ab74,_0x214fcb);if(!_0x8ea92f)return;const _0x478b83=_0x52ffa6[_0x49b9ab(0x108)](),_0x157c80=_0x52ffa6[_0x49b9ab(0xef)](),_0x4eaac2={},_0x1ac4f7={};_0x157c80[_0x49b9ab(0x12e)](_0x200e41=>{const _0x1cfb76=_0x49b9ab,_0x2baf34=_0x52ffa6[_0x1cfb76(0x142)](_0x200e41);_0x1ac4f7[_0x200e41]=_0x2baf34!==null&&_0x2baf34!==void 0x0?_0x2baf34:0x0;});const _0x19f8dd=this[_0x49b9ab(0x167)](_0x529b3d,_0x40ab74,_0x214fcb,_0x3eee75,_0x242af5),_0x465f3a=this['_getConnectPointInfo'](_0x5488e1,_0x40ab74,_0x214fcb,_0x3eee75,_0x242af5);if(_0x19f8dd&&_0x465f3a){const _0x213d25=_0x52ffa6[_0x49b9ab(0xc5)](),_0x1200f1=(0x0,_univerjs_pro_engine_shape[_0x49b9ab(0x14b)])(_0x19f8dd,_0x465f3a,_0x213d25);let _0x145899=_0x213d25;if(_0x1200f1){const _0x55c792=(0x0,_univerjs_pro_engine_shape[_0x49b9ab(0x10f)])(_0x1200f1,_0x52ffa6['getShapeType']()),_0x4e835b=this[_0x49b9ab(0x16e)][_0x49b9ab(0x140)](_0x40ab74,_0x214fcb);if(_0x4e835b&&_0x4e835b[_0x5108bb]){const _0x4d09f4=_0x4e835b[_0x5108bb];_0x145899=_0x55c792[_0x49b9ab(0x17e)];for(const [_0x21dea8,_0x5c01e5]of Object[_0x49b9ab(0xcc)](_0x55c792['adjustValues']))_0x4eaac2[_0x21dea8]=_0x5c01e5;const _0x3e1a8f={..._0x4d09f4[_0x49b9ab(0xd1)],'width':_0x55c792[_0x49b9ab(0xed)][_0x49b9ab(0xca)],'height':_0x55c792['worldRect'][_0x49b9ab(0xcd)],'left':_0x55c792[_0x49b9ab(0xed)]['left'],'top':_0x55c792[_0x49b9ab(0xed)][_0x49b9ab(0xd5)],'flipX':_0x55c792['worldRect'][_0x49b9ab(0x18c)],'flipY':_0x55c792[_0x49b9ab(0xed)]['flipY'],'angle':_0x55c792[_0x49b9ab(0xc7)]},_0x5f17bd=(0x0,_univerjs_sheets_drawing[_0x49b9ab(0xc3)])(_0x3e1a8f,_0x8ea92f),_0x242f31=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x3e1a8f,_0x8ea92f),_0x130f87={'unitId':_0x40ab74,'subUnitId':_0x214fcb,'drawingType':_univerjs_core[_0x49b9ab(0x16b)]['DRAWING_SHAPE'],'drawingId':_0x5108bb,'transform':_0x3e1a8f,'sheetTransform':_0x5f17bd,'axisAlignSheetTransform':_0x242f31},{unitId:_0x124f4a,subUnitId:_0x1d4931,undo:_0x5d49fb,redo:_0x4dc3dd,objects:_0x32bfea}=this[_0x49b9ab(0x16e)]['getBatchUpdateOp']([_0x130f87]);_0x58d4f5['push']({'id':_univerjs_sheets_drawing[_0x49b9ab(0x118)]['id'],'params':{'unitId':_0x124f4a,'subUnitId':_0x1d4931,'op':_0x4dc3dd,'objects':_0x32bfea,'type':_univerjs_sheets_drawing[_0x49b9ab(0x186)][_0x49b9ab(0x128)]}}),_0x1fced1[_0x49b9ab(0x16c)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x124f4a,'subUnitId':_0x1d4931,'op':_0x5d49fb,'objects':_0x32bfea,'type':_univerjs_sheets_drawing[_0x49b9ab(0x186)]['UPDATE']}});}_0x52ffa6[_0x49b9ab(0x129)]();}_0x58d4f5[_0x49b9ab(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x40ab74,'subUnitId':_0x214fcb,'shapeId':_0x5108bb,'shapeType':_0x145899,'shapeData':{'adjustValues':_0x4eaac2,'relation':_0x478b83}}}),_0x1fced1[_0x49b9ab(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x40ab74,'subUnitId':_0x214fcb,'shapeId':_0x5108bb,'shapeType':_0x213d25,'shapeData':{'adjustValues':_0x1ac4f7,'relation':_0x478b83}}});}}['_addLineFollowShapeUpdates'](_0x5c1f36,_0x53de35,_0x41da91,_0x3ec8c6,_0x1d3118,_0x201fa7,_0x38b4af,_0x580ffb,_0x538e59,_0x318941){const _0x953a7e=_0x2a18d5;var _0x2a053b;if(!_0x1d3118)return;const _0x3aa9f9=this['_sheetSkeletonService'][_0x953a7e(0x13b)](_0x5c1f36,_0x53de35);if(!_0x3aa9f9)return;const _0x480f24=(_0x2a053b=this[_0x953a7e(0x16e)][_0x953a7e(0x16d)]({'unitId':_0x5c1f36,'subUnitId':_0x53de35,'drawingId':_0x538e59}))===null||_0x2a053b===void 0x0?void 0x0:_0x2a053b[_0x953a7e(0xd1)];if(!_0x480f24)return;const _0x27080f=_0x480f24[_0x953a7e(0x12a)]!==_0x318941[_0x953a7e(0x12a)]||_0x480f24[_0x953a7e(0xd5)]!==_0x318941[_0x953a7e(0xd5)],_0x390891=_0x480f24[_0x953a7e(0xca)]!==_0x318941[_0x953a7e(0xca)]||_0x480f24[_0x953a7e(0xcd)]!==_0x318941[_0x953a7e(0xcd)],_0x2fac5e=_0x480f24['flipX']!==_0x318941[_0x953a7e(0x18c)]||_0x480f24[_0x953a7e(0xc6)]!==_0x318941[_0x953a7e(0xc6)],_0x4118f2=_0x480f24[_0x953a7e(0x15a)]!==_0x318941[_0x953a7e(0x15a)];if(_0x27080f&&!_0x390891&&!_0x2fac5e&&!_0x4118f2){var _0x2a72e4,_0x4216ee,_0x3de75e,_0xd66391;const _0x1094a6=((_0x2a72e4=_0x318941[_0x953a7e(0x12a)])!==null&&_0x2a72e4!==void 0x0?_0x2a72e4:0x0)-((_0x4216ee=_0x480f24['left'])!==null&&_0x4216ee!==void 0x0?_0x4216ee:0x0),_0x27b38a=((_0x3de75e=_0x318941['top'])!==null&&_0x3de75e!==void 0x0?_0x3de75e:0x0)-((_0xd66391=_0x480f24[_0x953a7e(0xd5)])!==null&&_0xd66391!==void 0x0?_0xd66391:0x0),_0x505068=this[_0x953a7e(0x16e)][_0x953a7e(0x140)](_0x5c1f36,_0x53de35);if(_0x505068&&_0x505068[_0x41da91]){var _0x33ecb1,_0x48408e,_0x416479,_0x1ea23a;const _0x2f095d=_0x505068[_0x41da91],_0x225bb6={..._0x2f095d['transform'],'left':((_0x33ecb1=(_0x48408e=_0x2f095d[_0x953a7e(0xd1)])===null||_0x48408e===void 0x0?void 0x0:_0x48408e[_0x953a7e(0x12a)])!==null&&_0x33ecb1!==void 0x0?_0x33ecb1:0x0)+_0x1094a6,'top':((_0x416479=(_0x1ea23a=_0x2f095d[_0x953a7e(0xd1)])===null||_0x1ea23a===void 0x0?void 0x0:_0x1ea23a[_0x953a7e(0xd5)])!==null&&_0x416479!==void 0x0?_0x416479:0x0)+_0x27b38a},_0xe3d902=(0x0,_univerjs_sheets_drawing[_0x953a7e(0xc3)])(_0x225bb6,_0x3aa9f9),_0x3db30c=(0x0,_univerjs_sheets_drawing[_0x953a7e(0x11a)])(_0x225bb6,_0x3aa9f9),_0x3f87ea={'unitId':_0x5c1f36,'subUnitId':_0x53de35,'drawingType':_univerjs_core[_0x953a7e(0x16b)][_0x953a7e(0xe0)],'drawingId':_0x41da91,'transform':_0x225bb6,'sheetTransform':_0xe3d902,'axisAlignSheetTransform':_0x3db30c},{unitId:_0x4f6e72,subUnitId:_0x300e2c,undo:_0x305e59,redo:_0x5f28a9,objects:_0x32c62f}=this['_drawingManagerService']['getBatchUpdateOp']([_0x3f87ea]);_0x38b4af['push']({'id':_univerjs_sheets_drawing[_0x953a7e(0x118)]['id'],'params':{'unitId':_0x4f6e72,'subUnitId':_0x300e2c,'op':_0x5f28a9,'objects':_0x32c62f,'type':_univerjs_sheets_drawing[_0x953a7e(0x186)][_0x953a7e(0x128)]}}),_0x580ffb[_0x953a7e(0x16c)]({'id':_univerjs_sheets_drawing[_0x953a7e(0x118)]['id'],'params':{'unitId':_0x4f6e72,'subUnitId':_0x300e2c,'op':_0x305e59,'objects':_0x32c62f,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x953a7e(0x128)]}});}}else{const _0x5b121c=_0x3ec8c6[_0x953a7e(0x173)](),_0x1b511e=_0x3ec8c6[_0x953a7e(0x124)]();this[_0x953a7e(0x160)](_0x5c1f36,_0x53de35,_0x41da91,_0x3ec8c6,_0x5b121c,_0x1b511e,_0x38b4af,_0x580ffb,_0x538e59,_0x318941);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x2a18d5(0xfa)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x2a18d5(0x119)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x2a18d5(0x154)])(_univerjs_sheets[_0x2a18d5(0xe7)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x2a18d5(0x154)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_drawing[_0x2a18d5(0xd6)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core['Plugin']{constructor(_0x55cef4=defaultPluginConfig,_0x19cc1e,_0x499636,_0xb76ad0){const _0x4459a3=_0x2a18d5;super(),this['_config']=_0x55cef4,this[_0x4459a3(0x146)]=_0x19cc1e,this['_commandService']=_0x499636,this['_configService']=_0xb76ad0;const {..._0x49de54}=(0x0,_univerjs_core[_0x4459a3(0x133)])({},defaultPluginConfig,this[_0x4459a3(0x107)]);this[_0x4459a3(0x172)][_0x4459a3(0x171)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x49de54);}['onStarting'](){const _0x378696=_0x2a18d5,_0x32a6ea=this['_injector'];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x378696(0x12e)](_0x3998a5=>_0x32a6ea[_0x378696(0x161)](_0x3998a5)),(0x0,_univerjs_core[_0x378696(0x111)])(_0x32a6ea,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0x175),_univerjs_core[_0x2a18d5(0xcb)]['UNIVER_SHEET']),_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0xf0),_0x2a18d5(0x11e)),_defineProperty(UniverSheetsShapePlugin,'packageName',name),_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0xd9),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x2a18d5(0x103)])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x2a18d5(0x154)])(_univerjs_core[_0x2a18d5(0xf9)])),__decorateParam(0x2,_univerjs_core[_0x2a18d5(0xfa)]),__decorateParam(0x3,_univerjs_core[_0x2a18d5(0x17b)])],UniverSheetsShapePlugin),exports[_0x2a18d5(0x14f)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x2a18d5(0xf6)]=InsertShapeCommand,exports[_0x2a18d5(0xf3)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x2a18d5(0x106)]=SetShapeDrawingDataCommand,exports[_0x2a18d5(0x11c)]=SetSheetsShapeRotateCommand,exports[_0x2a18d5(0x17f)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x2a18d5(0x14c)](exports,_0x2a18d5(0x11f),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x2a18d5(0xfd)]=ToggleSheetsShapeFlipCommand,Object[_0x2a18d5(0x14c)](exports,_0x2a18d5(0x18d),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x2a18d5(0xd0)]=UpdateConnectorRelationCommand,exports[_0x2a18d5(0x155)]=UpdateLineShapeResizeCommand,exports[_0x2a18d5(0xec)]=UpdateSheetsShapeDataMutation,exports[_0x2a18d5(0x174)]=UpdateSheetsShapeTypeCommand,exports[_0x2a18d5(0x187)]=UpdateSheetsShapeTypeMutation;
1
+ const _0x22bf2f=_0x851f;(function(_0x3f57dc,_0xb0b7b6){const _0x32389d=_0x851f,_0x5b8197=_0x3f57dc();while(!![]){try{const _0x10004f=parseInt(_0x32389d(0x1d7))/0x1*(parseInt(_0x32389d(0x148))/0x2)+-parseInt(_0x32389d(0x14b))/0x3+-parseInt(_0x32389d(0x14d))/0x4+-parseInt(_0x32389d(0x1b1))/0x5+parseInt(_0x32389d(0x1d9))/0x6+parseInt(_0x32389d(0x1a6))/0x7+-parseInt(_0x32389d(0x1b9))/0x8*(-parseInt(_0x32389d(0x200))/0x9);if(_0x10004f===_0xb0b7b6)break;else _0x5b8197['push'](_0x5b8197['shift']());}catch(_0x14dc4a){_0x5b8197['push'](_0x5b8197['shift']());}}}(_0xc5db,0x58b47),Object[_0x22bf2f(0x1d1)](exports,Symbol[_0x22bf2f(0x1bc)],{'value':_0x22bf2f(0x1f7)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x32dfab){'@babel/helpers - typeof';const _0x52df9a=_0x22bf2f;return _typeof=_0x52df9a(0x186)==typeof Symbol&&_0x52df9a(0x16a)==typeof Symbol[_0x52df9a(0x19c)]?function(_0x2fa6e5){return typeof _0x2fa6e5;}:function(_0xba75f1){const _0x447950=_0x52df9a;return _0xba75f1&&_0x447950(0x186)==typeof Symbol&&_0xba75f1[_0x447950(0x145)]===Symbol&&_0xba75f1!==Symbol['prototype']?_0x447950(0x16a):typeof _0xba75f1;},_typeof(_0x32dfab);}function toPrimitive(_0x1d792c,_0x38d979){const _0x517be1=_0x22bf2f;if('object'!=_typeof(_0x1d792c)||!_0x1d792c)return _0x1d792c;var _0x4a4c2f=_0x1d792c[Symbol[_0x517be1(0x1d3)]];if(void 0x0!==_0x4a4c2f){var _0x1ff77d=_0x4a4c2f[_0x517be1(0x1df)](_0x1d792c,_0x38d979||_0x517be1(0x17b));if(_0x517be1(0x1fa)!=_typeof(_0x1ff77d))return _0x1ff77d;throw new TypeError(_0x517be1(0x1aa));}return(_0x517be1(0x1d8)===_0x38d979?String:Number)(_0x1d792c);}function toPropertyKey(_0x4e5462){const _0x8d9bb1=_0x22bf2f;var _0x59e804=toPrimitive(_0x4e5462,_0x8d9bb1(0x1d8));return'symbol'==_typeof(_0x59e804)?_0x59e804:_0x59e804+'';}function _defineProperty(_0x10cf06,_0x4b713b,_0x5dafe7){const _0x19058e=_0x22bf2f;return(_0x4b713b=toPropertyKey(_0x4b713b))in _0x10cf06?Object[_0x19058e(0x1d1)](_0x10cf06,_0x4b713b,{'value':_0x5dafe7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x10cf06[_0x4b713b]=_0x5dafe7,_0x10cf06;}var SheetShapeModelManager=class extends _univerjs_core[_0x22bf2f(0x167)]{constructor(){const _0x220aaa=_0x22bf2f;super(),_defineProperty(this,_0x220aaa(0x1a1),new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,_0x220aaa(0x1e8),new Set());}[_0x22bf2f(0x1d0)](_0x236fa8,_0x7544c0,_0x4fa641){const _0x15378b=_0x22bf2f,_0x254e51=new _univerjs_pro_engine_shape[(_0x15378b(0x198))](_0x236fa8,_0x7544c0,_0x4fa641);this['_shapes']['set'](_0x7544c0,_0x254e51);if((0x0,_univerjs_pro_engine_shape[_0x15378b(0x152)])(_0x236fa8))this[_0x15378b(0x1f4)]['add'](_0x7544c0);return _0x254e51;}[_0x22bf2f(0x162)](_0x5447e7){const _0x14842d=_0x22bf2f,_0x3cf95f=[];for(const _0x1cf103 of this[_0x14842d(0x1f4)]){const _0x3dd6fd=this['_shapes'][_0x14842d(0x17f)](_0x1cf103);if(_0x3dd6fd){const _0x4f8b7f=_0x3dd6fd[_0x14842d(0x201)]();if(_0x4f8b7f){var _0x19e22a,_0x523a13;if(((_0x19e22a=_0x4f8b7f[_0x14842d(0x15c)])===null||_0x19e22a===void 0x0?void 0x0:_0x19e22a[_0x14842d(0x150)])===_0x5447e7)_0x3cf95f[_0x14842d(0x17d)]({..._0x4f8b7f[_0x14842d(0x15c)],'lineShapeId':_0x1cf103,'isFrom':!![]});if(((_0x523a13=_0x4f8b7f['to'])===null||_0x523a13===void 0x0?void 0x0:_0x523a13[_0x14842d(0x150)])===_0x5447e7)_0x3cf95f[_0x14842d(0x17d)]({..._0x4f8b7f['to'],'lineShapeId':_0x1cf103,'isFrom':![]});}}}return _0x3cf95f;}[_0x22bf2f(0x15a)](_0x48fc76){const _0x4df6a7=_0x22bf2f,_0x3eeaaf=this[_0x4df6a7(0x1a1)][_0x4df6a7(0x17f)](_0x48fc76);if(_0x3eeaaf)return _0x3eeaaf['getShapeRelation']();}[_0x22bf2f(0x165)](_0x47e115){const _0x23d90a=_0x22bf2f,_0x1a849d=this[_0x23d90a(0x1a1)][_0x23d90a(0x17f)](_0x47e115);if(_0x1a849d)return _0x1a849d['getShapeType']();}[_0x22bf2f(0x14c)](_0x59d249){const _0x4e1f4f=_0x22bf2f;return this[_0x4e1f4f(0x1a1)]['has'](_0x59d249);}[_0x22bf2f(0x1d5)](_0x33e5fe){const _0x4f0c1d=_0x22bf2f,_0x1ad427=this['_shapes'][_0x4f0c1d(0x17f)](_0x33e5fe);if(!_0x1ad427)return;if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1ad427[_0x4f0c1d(0x165)]()))this[_0x4f0c1d(0x1f4)]['delete'](_0x33e5fe);this[_0x4f0c1d(0x1a1)][_0x4f0c1d(0x20a)](_0x33e5fe);}[_0x22bf2f(0x161)](){const _0x1279cb=[];return this['_shapes']['forEach'](_0x574c9b=>{const _0x38a488=_0x851f;_0x1279cb[_0x38a488(0x17d)](_0x574c9b['toJSON']());}),_0x1279cb;}[_0x22bf2f(0x1b4)](_0x11bdbc){const _0x40ebc5=_0x22bf2f;for(const _0x26f33b of _0x11bdbc){const {id:_0x58ba92,shapeType:_0x399073}=_0x26f33b,_0x11bc34=this[_0x40ebc5(0x1d0)](_0x399073,_0x58ba92,_0x26f33b['shapeData']);if(_0x11bc34&&_0x11bc34[_0x40ebc5(0x16f)]())this[_0x40ebc5(0x1f4)][_0x40ebc5(0x1a4)](_0x58ba92);}}['dispose'](){const _0x5caead=_0x22bf2f;if(this[_0x5caead(0x143)])return;this[_0x5caead(0x1a1)][_0x5caead(0x156)](_0x50e626=>{_0x50e626['dispose']();}),this['_shapes'][_0x5caead(0x1dd)](),this[_0x5caead(0x1f4)]['clear'](),this[_0x5caead(0x1e8)][_0x5caead(0x1dd)](),super[_0x5caead(0x1b2)]();}};function __decorateParam(_0x58f836,_0x5a9a6e){return function(_0x316f6f,_0x18569c){_0x5a9a6e(_0x316f6f,_0x18569c,_0x58f836);};}function _0x851f(_0x546120,_0x36adc1){_0x546120=_0x546120-0x140;const _0xc5db13=_0xc5db();let _0x851f92=_0xc5db13[_0x546120];return _0x851f92;}function __decorate(_0x501f8d,_0x5883e4,_0x5e22a6,_0x176db1){const _0x20fc30=_0x22bf2f;var _0x33f0ad=arguments['length'],_0x12205b=_0x33f0ad<0x3?_0x5883e4:_0x176db1===null?_0x176db1=Object[_0x20fc30(0x1ec)](_0x5883e4,_0x5e22a6):_0x176db1,_0x2d0c42;if(typeof Reflect===_0x20fc30(0x1fa)&&typeof Reflect[_0x20fc30(0x18f)]==='function')_0x12205b=Reflect[_0x20fc30(0x18f)](_0x501f8d,_0x5883e4,_0x5e22a6,_0x176db1);else{for(var _0x2e288f=_0x501f8d[_0x20fc30(0x15f)]-0x1;_0x2e288f>=0x0;_0x2e288f--)if(_0x2d0c42=_0x501f8d[_0x2e288f])_0x12205b=(_0x33f0ad<0x3?_0x2d0c42(_0x12205b):_0x33f0ad>0x3?_0x2d0c42(_0x5883e4,_0x5e22a6,_0x12205b):_0x2d0c42(_0x5883e4,_0x5e22a6))||_0x12205b;}return _0x33f0ad>0x3&&_0x12205b&&Object[_0x20fc30(0x1d1)](_0x5883e4,_0x5e22a6,_0x12205b),_0x12205b;}const SHEET_SHAPE_PLUGIN=_0x22bf2f(0x179);let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x22bf2f(0x167)]{constructor(_0x4d4437){const _0x17bf35=_0x22bf2f;super(),this[_0x17bf35(0x206)]=_0x4d4437,_defineProperty(this,_0x17bf35(0x14a),new Map()),this[_0x17bf35(0x204)]();}[_0x22bf2f(0x1f8)](_0x366c74,_0x3968bd){const _0x49388b=_0x22bf2f;let _0xb21893=this['_shapeModelManagerMap'][_0x49388b(0x17f)](_0x366c74);!_0xb21893&&(_0xb21893=new Map(),this[_0x49388b(0x14a)]['set'](_0x366c74,_0xb21893));let _0x3ebf5c=_0xb21893[_0x49388b(0x17f)](_0x3968bd);return!_0x3ebf5c&&(_0x3ebf5c=new SheetShapeModelManager(),_0xb21893['set'](_0x3968bd,_0x3ebf5c)),_0x3ebf5c;}[_0x22bf2f(0x193)](_0x345b32,_0x1f840f,_0x73d821,_0x321b73,_0x3bfab7){const _0x2fc005=_0x22bf2f;this[_0x2fc005(0x1f8)](_0x345b32,_0x1f840f)[_0x2fc005(0x1d0)](_0x73d821,_0x321b73,_0x3bfab7);}['removeShape'](_0x48e925,_0x36fe4b,_0x3a6713){const _0x59a91c=_0x22bf2f;this['_ensureShapeModelManager'](_0x48e925,_0x36fe4b)[_0x59a91c(0x1d5)](_0x3a6713);}[_0x22bf2f(0x1c5)](_0x28b596,_0x4bfa39,_0x15e54b){const _0x315eb0=_0x22bf2f;return this[_0x315eb0(0x1f8)](_0x28b596,_0x4bfa39)[_0x315eb0(0x165)](_0x15e54b);}[_0x22bf2f(0x165)](_0xb20ac1,_0x49dc7a,_0x5097ca){const _0x4d1f94=_0x22bf2f;return this[_0x4d1f94(0x1f8)](_0xb20ac1,_0x49dc7a)['getShapeType'](_0x5097ca);}['hasShape'](_0xea015c,_0x2ae217,_0x5073a9){const _0x4c5e81=_0x22bf2f;return this[_0x4c5e81(0x1f8)](_0xea015c,_0x2ae217)[_0x4c5e81(0x14c)](_0x5073a9);}[_0x22bf2f(0x1ca)](_0x25cef7,_0x560311,_0x5ba124){return this['_ensureShapeModelManager'](_0x25cef7,_0x560311)['getShapeType'](_0x5ba124);}['getShapeDataById'](_0x5b8cf4,_0x5b8f8f,_0x59a379){const _0x26181f=_0x22bf2f,_0x2d3202=this['_ensureShapeModelManager'](_0x5b8cf4,_0x5b8f8f);if(!_0x2d3202[_0x26181f(0x165)](_0x59a379))return;const _0x4a49bc=_0x2d3202['_shapes'][_0x26181f(0x17f)](_0x59a379);if(!_0x4a49bc)return;return _0x4a49bc[_0x26181f(0x1c0)]();}[_0x22bf2f(0x1ed)](_0x52e440,_0x53a94a,_0x4ebc4e){const _0x3293fd=_0x22bf2f;return this[_0x3293fd(0x1f8)](_0x52e440,_0x53a94a)[_0x3293fd(0x1a1)]['get'](_0x4ebc4e);}['getBasicShapeRelation'](_0x19d75b,_0x169c18,_0x16933f){const _0x20b29f=_0x22bf2f;return this[_0x20b29f(0x1f8)](_0x19d75b,_0x169c18)[_0x20b29f(0x162)](_0x16933f);}[_0x22bf2f(0x15a)](_0x32d436,_0x272693,_0x5183e3){const _0x2a2b09=_0x22bf2f,_0xff2f43=this[_0x2a2b09(0x1f8)](_0x32d436,_0x272693)['_shapes']['get'](_0x5183e3);if(!_0xff2f43)return;return _0xff2f43[_0x2a2b09(0x201)]();}[_0x22bf2f(0x1fc)](){}[_0x22bf2f(0x20c)](_0x3d0d65){const _0x176bf3=_0x22bf2f,_0x1ce64c={},_0x2a42f5=this[_0x176bf3(0x14a)][_0x176bf3(0x17f)](_0x3d0d65);if(_0x2a42f5)_0x2a42f5[_0x176bf3(0x156)]((_0x4920c,_0x4f1a0e)=>{const _0x2b0a3b=_0x176bf3,_0x1921e6=_0x4920c['toJSON']();if(_0x1921e6[_0x2b0a3b(0x15f)]>0x0)_0x1ce64c[_0x4f1a0e]=_0x1921e6;});return JSON['stringify'](_0x1ce64c);}[_0x22bf2f(0x1dc)](_0x3c6317,_0x512abc){const _0x2b9ffb=_0x22bf2f;Object[_0x2b9ffb(0x1d2)](_0x512abc)[_0x2b9ffb(0x156)](_0xc8b8a6=>{const _0x141dd2=_0x2b9ffb;this[_0x141dd2(0x1f8)](_0x3c6317,_0xc8b8a6)['fromJSON'](_0x512abc[_0xc8b8a6]);});}['toJSON'](){const _0x230337=_0x22bf2f,_0xfc5298={};return this[_0x230337(0x14a)][_0x230337(0x156)]((_0x366707,_0x71e1f0)=>{_0xfc5298[_0x71e1f0]={},_0x366707['forEach']((_0x4d9271,_0x412844)=>{const _0x54879e=_0x851f;_0xfc5298[_0x71e1f0][_0x412844]=_0x4d9271[_0x54879e(0x161)]();});}),_0xfc5298;}[_0x22bf2f(0x1b4)](_0x429b30){const _0x3c5f87=_0x22bf2f;Object[_0x3c5f87(0x1d2)](_0x429b30)[_0x3c5f87(0x156)](_0x572cad=>{const _0xb0144f=_0x3c5f87,_0x2e1bda=_0x429b30[_0x572cad];Object['keys'](_0x2e1bda)[_0xb0144f(0x156)](_0x56a723=>{const _0x9a290a=_0xb0144f;this[_0x9a290a(0x1f8)](_0x572cad,_0x56a723)[_0x9a290a(0x1b4)](_0x2e1bda[_0x56a723]);});});}[_0x22bf2f(0x204)](){const _0x1c041d=_0x22bf2f;this['_resourcesManagerService']['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x1c041d(0x1e2)][_0x1c041d(0x1ef)]],'toJson':_0xebbea6=>this['_serializeShapeForUnit'](_0xebbea6),'parseJson':_0x4027c3=>JSON[_0x1c041d(0x1ae)](_0x4027c3),'onLoad':(_0x11b2ba,_0x21e0c0)=>{this['_deserializeShapeForUnit'](_0x11b2ba,_0x21e0c0);},'onUnLoad':_0x66b089=>{const _0x4fe06d=_0x1c041d,_0x40c776=this[_0x4fe06d(0x14a)][_0x4fe06d(0x17f)](_0x66b089);_0x40c776&&(_0x40c776[_0x4fe06d(0x156)](_0x2ae5f6=>{const _0x35c964=_0x4fe06d;_0x2ae5f6[_0x35c964(0x1b2)]();}),this[_0x4fe06d(0x14a)][_0x4fe06d(0x20a)](_0x66b089));}});}[_0x22bf2f(0x1b2)](){const _0x39fa0c=_0x22bf2f;this[_0x39fa0c(0x14a)][_0x39fa0c(0x156)](_0x5ad611=>{const _0x55cc72=_0x39fa0c;_0x5ad611[_0x55cc72(0x156)](_0x48cd32=>{const _0x180494=_0x55cc72;_0x48cd32[_0x180494(0x1b2)]();});});}};function _0xc5db(){const _0x35d051=['toPrimitive','sheet.mutation.remove-shape','removeShape','_addLineRerouteUpdates','1vKKQob','string','1112910shGmMS','fill','_initCommandInterceptor','_deserializeShapeForUnit','clear','cos','call','every','find','UniverInstanceType','range','sequenceExecute','ToggleSheetsShapeFlipCommand','setConfig','isFrom','_groupIds','SheetSkeletonService','rotation','sheet.command.set-shape-text-vertical-toggle','getOwnPropertyDescriptor','getShapeModel','onStarting','UNIVER_SHEET','DRAWING_SHAPE','getAdjustNames','_getConnectPointInfo','getDrawingData','_linesIds','_initCommands','_injector','Module','_ensureShapeModelManager','sheet.command.update-connector-relation','object','getAdjustValueByName','setShapeType','DependentOn','DEFAULT_SHAPE_HEIGHT','removeLinePoints','2013885ZbWCXb','getShapeRelation','UpdateSheetsShapeTypeMutation','merge','_initSnapshot','SetShapeDrawingDataCommand','_resourcesManagerService','IUndoRedoService','_configService','getSkeleton','delete','worldRect','_serializeShapeForUnit','_sheetInterceptorService','getSheetCommandTarget','startY','_disposed','Injector','constructor','cxnIndex','setShapeData','1076450rMLBMr','COMMAND','_shapeModelManagerMap','978624qyXHSa','hasShape','2408364EWGPum','startX','sheets-shape.config','shapeId','result','isConnectorShape','_sheetSkeletonService','SheetInterceptorService','redos','forEach','undos','transform','width','getLineShapeRelation','0.22.0-insiders.20260513-09bbeca','from','params','SetSheetDrawingCommand','length','onCommandExecute','toJSON','getBasicShapeRelation','_commandService','transformToDrawingPosition','getShapeType','RemoveSheetDrawingCommand','Disposable','INSERT','registerCommand','symbol','sheet.command.toggle-shape-flip','adjustValues','drawingType','height','isLineShape','Inject','sheet.mutation.insert-shape','RemoveSheetsShapeMutation','ClearSheetDrawingTransformerOperation','ICommandService','DrawingTypeEnum','flipX','top','preUndos','SHEET_SHAPE_PLUGIN','_sheetsShapeService','default','index','push','sheet.command.set-shape-drawing-data','get','@univerjs-pro/sheets-shape','generateRandomId','_config','getStartConnectInfo','data','angle','function','IUniverInstanceService','getCellIndexAndOffsetByPosition','position','resizeEnabled','touchDependencies','_addLineFollowShapeUpdates','rotateEnabled','SetDrawingApplyMutation','decorate','borderEnabled','UniverLicensePlugin','UpdateLineShapeResizeCommand','insertShape','transformToAxisAlignPosition','SheetsShapeService','DrawingApplyType','pluginName','ShapeModel','relation','updateContext','routeConnectorLineShape','iterator','interceptCommand','InsertSheetsShapeMutation','getShapeTextData','IConfigService','_shapes','syncExecuteCommand','IDrawingManagerService','add','getBatchAddOp','91938hKuzLF','ensureSkeleton','Plugin','entries','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','flipY','IResourceManagerService','sheet.mutation.update-shape-type','parse','pushUndoRedo','UPDATE','1701350tBrsUA','dispose','SetSheetsShapeTextVerticalToggleCommand','fromJSON','getEndConnectInfo','getBatchUpdateOp','left','type','32SfKIpr','disposeWithMe','REMOVE','toStringTag','preRedos','version','sheet.command.set-shape-rotate','getShapeData','ISheetDrawingService','ang','isHorizontal','lineType','getBasicShapeType','sheet.mutation.update-shape-data','_drawingManagerService','MUTATION','filter','getShapeTypeById','InsertSheetDrawingCommand','sheet.command.insert-shape','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','CommandType','getDrawingByParam','addShape','defineProperty','keys'];_0xc5db=function(){return _0x35d051;};return _0xc5db();}SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x22bf2f(0x1ac)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x22bf2f(0x171),'type':_univerjs_core['CommandType'][_0x22bf2f(0x1c8)],'handler':(_0x1fbc7b,_0x26ccca)=>{const _0x5701f4=_0x22bf2f,{unitId:_0x5c8732,subUnitId:_0x131450,shapeType:_0x1c23ee,shapeId:_0x20a6cf,shapeData:_0x39e58b}=_0x26ccca;return _0x1fbc7b['get'](SheetsShapeService)[_0x5701f4(0x193)](_0x5c8732,_0x131450,_0x1c23ee,_0x20a6cf,_0x39e58b),!![];}},RemoveSheetsShapeMutation={'id':_0x22bf2f(0x1d4),'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x1c8)],'handler':(_0x36a52d,_0x2f5121)=>{const _0x221144=_0x22bf2f,{unitId:_0x129e28,subUnitId:_0x2ff5b9,shapeId:_0x3ed153}=_0x2f5121;return _0x36a52d[_0x221144(0x17f)](SheetsShapeService)[_0x221144(0x1d5)](_0x129e28,_0x2ff5b9,_0x3ed153),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x149)],'id':_0x22bf2f(0x1cc),'handler':(_0x2d3444,_0x565978)=>{const _0xbe3e7b=_0x22bf2f;var _0x456b93,_0x432160;const _0x1373e6=(0x0,_univerjs_sheets[_0xbe3e7b(0x141)])(_0x2d3444[_0xbe3e7b(0x17f)](_univerjs_core[_0xbe3e7b(0x187)]),_0x565978);if(!_0x1373e6)return![];const _0x57e42a=_0x2d3444[_0xbe3e7b(0x17f)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x13e68c,subUnitId:_0xb3deb8}=_0x1373e6,_0x2a34f8=_0x57e42a['ensureSkeleton'](_0x13e68c,_0xb3deb8);if(!_0x2a34f8)return![];const _0x48bee0=_0x2d3444['get'](_univerjs_core[_0xbe3e7b(0x174)]),_0x1ab19b=_0x2d3444[_0xbe3e7b(0x17f)](_univerjs_core[_0xbe3e7b(0x207)]),_0x32b86b=_0x2d3444[_0xbe3e7b(0x17f)](_univerjs_sheets[_0xbe3e7b(0x154)]),_0x222d7e=_0x2d3444['get'](_univerjs_sheets_drawing[_0xbe3e7b(0x1c1)]),{shapeType:_0x2c0d08,shapeData:_0x1e741e}=_0x565978,_0x4a3d17=_0x565978[_0xbe3e7b(0x150)]||(0x0,_univerjs_core[_0xbe3e7b(0x181)])(),_0x294e40={'unitId':_0x13e68c,'subUnitId':_0xb3deb8,'shapeId':_0x4a3d17,'shapeType':_0x2c0d08,'shapeData':_0x1e741e},_0x1eec61=_0x565978[_0xbe3e7b(0x159)]||0xc8,_0x3e362d=_0x565978['height']||0xc8;let _0xc63ffe=0x0,_0x273f4c=0x0,_0x46a1e6={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x1b289e={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x565978[_0xbe3e7b(0x189)]){const {x:_0x3b446c,y:_0x2c4fa4}=_0x565978[_0xbe3e7b(0x189)];_0xc63ffe=_0x3b446c,_0x273f4c=_0x2c4fa4,_0x46a1e6=_0x2a34f8[_0xbe3e7b(0x188)](_0x3b446c,_0x2c4fa4),_0x1b289e=_0x2a34f8[_0xbe3e7b(0x188)](_0x3b446c+_0x1eec61,_0x2c4fa4+_0x3e362d);}else{if(_0x565978[_0xbe3e7b(0x1e3)]){const {startRow:_0x3134e4,startColumn:_0x47ee2f}=_0x565978['range'],_0x1f81cd=0xa,_0x4db99b=0xa;_0x46a1e6={'row':_0x3134e4,'rowOffset':_0x1f81cd,'column':_0x47ee2f,'columnOffset':_0x4db99b};const _0x3cebb4=_0x2a34f8['getCellWithCoordByIndex'](_0x3134e4,_0x47ee2f);_0xc63ffe=_0x3cebb4[_0xbe3e7b(0x14e)]+_0x4db99b,_0x273f4c=_0x3cebb4[_0xbe3e7b(0x142)]+_0x1f81cd,_0x1b289e=_0x2a34f8['getCellIndexAndOffsetByPosition'](_0xc63ffe+_0x1eec61,_0x273f4c+_0x3e362d);}}const _0xc0dac7={'from':_0x46a1e6,'to':_0x1b289e},_0x6fa861={'unitId':_0x13e68c,'subUnitId':_0xb3deb8,'drawingId':_0x4a3d17,'drawingType':_univerjs_core['DrawingTypeEnum'][_0xbe3e7b(0x1f0)],'sheetTransform':_0xc0dac7,'transform':{'left':_0xc63ffe,'top':_0x273f4c,'width':_0x1eec61,'height':_0x3e362d},'data':{'shapeType':_0x2c0d08,'shapeData':_0x1e741e},'axisAlignSheetTransform':_0xc0dac7,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0xbe3e7b(0x152)])(_0x2c0d08)&&(_0x6fa861[_0xbe3e7b(0x184)][_0xbe3e7b(0x1da)]=![],_0x6fa861[_0xbe3e7b(0x184)][_0xbe3e7b(0x18d)]=![],_0x6fa861['data'][_0xbe3e7b(0x18a)]=![],_0x6fa861[_0xbe3e7b(0x184)]['borderEnabled']=![],_0x6fa861[_0xbe3e7b(0x158)]['rotateEnabled']=![],_0x6fa861[_0xbe3e7b(0x158)][_0xbe3e7b(0x18a)]=![],_0x6fa861[_0xbe3e7b(0x158)][_0xbe3e7b(0x190)]=![]);const {undo:_0x4e0003,redo:_0x1b3f39,objects:_0x50a5ba}=_0x222d7e[_0xbe3e7b(0x1a5)]([_0x6fa861]),_0x573d6a=_0x32b86b[_0xbe3e7b(0x160)]({'id':_univerjs_sheets_drawing[_0xbe3e7b(0x1cb)]['id'],'params':{'unitId':_0x13e68c,'drawings':[_0x6fa861]}}),_0x30866b=[...(_0x456b93=_0x573d6a[_0xbe3e7b(0x1bd)])!==null&&_0x456b93!==void 0x0?_0x456b93:[],{'id':_univerjs_sheets_drawing[_0xbe3e7b(0x18e)]['id'],'params':{'unitId':_0x13e68c,'subUnitId':_0xb3deb8,'op':_0x1b3f39,'objects':_0x50a5ba,'type':_univerjs_sheets_drawing[_0xbe3e7b(0x196)][_0xbe3e7b(0x168)]}},{'id':_univerjs_sheets_drawing[_0xbe3e7b(0x173)]['id'],'params':[_0x13e68c]},..._0x573d6a['redos'],{'id':InsertSheetsShapeMutation['id'],'params':_0x294e40}],_0x2c4c6e=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x13e68c,'subUnitId':_0xb3deb8,'shapeId':_0x4a3d17}},...(_0x432160=_0x573d6a[_0xbe3e7b(0x178)])!==null&&_0x432160!==void 0x0?_0x432160:[],{'id':_univerjs_sheets_drawing[_0xbe3e7b(0x18e)]['id'],'params':{'unitId':_0x13e68c,'subUnitId':_0xb3deb8,'op':_0x4e0003,'objects':_0x50a5ba,'type':_univerjs_sheets_drawing[_0xbe3e7b(0x196)][_0xbe3e7b(0x1bb)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x13e68c]},..._0x573d6a['undos']];if((0x0,_univerjs_core[_0xbe3e7b(0x1e4)])(_0x30866b,_0x48bee0)[_0xbe3e7b(0x151)])return _0x1ab19b['pushUndoRedo']({'unitID':_0x13e68c,'undoMutations':_0x2c4c6e,'redoMutations':_0x30866b}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x22bf2f(0x1c6),'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x1c8)],'handler':(_0x7de2bf,_0x1b64b1)=>{const _0x2a82a3=_0x22bf2f,{unitId:_0x1563b3,subUnitId:_0x4d54ad,shapeType:_0x12eb4e,shapeId:_0x4b91a7,shapeData:_0x5e6aea}=_0x1b64b1,_0x3ab6c4=_0x7de2bf[_0x2a82a3(0x17f)](SheetsShapeService)['getShapeModel'](_0x1563b3,_0x4d54ad,_0x4b91a7);if(_0x3ab6c4){if(_0x12eb4e!==void 0x0)_0x3ab6c4[_0x2a82a3(0x1fc)](_0x12eb4e);if(_0x5e6aea)_0x3ab6c4===null||_0x3ab6c4===void 0x0||_0x3ab6c4['setShapeData'](_0x5e6aea,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core['CommandType'][_0x22bf2f(0x149)],'id':_0x22bf2f(0x17e),'handler':(_0x5b1358,_0x61d22f)=>{const _0x45ffef=_0x22bf2f;var _0x239af5,_0x376240;const _0x1af839=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x5b1358[_0x45ffef(0x17f)](_univerjs_core['IUniverInstanceService']),_0x61d22f);if(!_0x1af839)return![];const _0x19e1da=_0x5b1358[_0x45ffef(0x17f)](_univerjs_sheets[_0x45ffef(0x1e9)]),{unitId:_0x390dc1,subUnitId:_0xd424df}=_0x1af839,_0x509633=_0x19e1da[_0x45ffef(0x1a7)](_0x390dc1,_0xd424df);if(!_0x509633)return![];const _0x340b97=_0x5b1358[_0x45ffef(0x17f)](SheetsShapeService),{shapeId:_0x1f20a5,shapeType:_0x4a70b2,shapeData:_0x93d1de,position:_0xa3b07b,width:_0x1831c2,height:_0x387615}=_0x61d22f,_0x497ad2=_0x340b97[_0x45ffef(0x1ed)](_0x390dc1,_0xd424df,_0x1f20a5);if(!_0x497ad2)return![];const _0x808442=_0x5b1358[_0x45ffef(0x17f)](_univerjs_core[_0x45ffef(0x174)]),_0x5c7d79=_0x5b1358[_0x45ffef(0x17f)](_univerjs_core['IUndoRedoService']),_0x30df2f=_0x5b1358['get'](_univerjs_sheets['SheetInterceptorService']),_0x1a47bc=_0x5b1358[_0x45ffef(0x17f)](_univerjs_sheets_drawing[_0x45ffef(0x1c1)]),_0x36f66c={'unitId':_0x390dc1,'subUnitId':_0xd424df,'shapeId':_0x1f20a5,'shapeType':_0x4a70b2,'shapeData':_0x93d1de},_0x3aef4c=_0x497ad2[_0x45ffef(0x165)](),_0x17830a=_0x497ad2[_0x45ffef(0x1c0)](),{x:_0x11f9d7,y:_0xb1749}=_0xa3b07b,_0x458d0b={'from':_0x509633[_0x45ffef(0x188)](_0x11f9d7,_0xb1749),'to':_0x509633[_0x45ffef(0x188)](_0x11f9d7+_0x1831c2,_0xb1749+_0x387615)},_0x39ab38={'unitId':_0x390dc1,'subUnitId':_0xd424df,'drawingId':_0x1f20a5,'drawingType':_univerjs_core[_0x45ffef(0x175)]['DRAWING_SHAPE'],'sheetTransform':_0x458d0b,'transform':{'left':_0x11f9d7,'top':_0xb1749,'width':_0x1831c2,'height':_0x387615},'data':{'shapeType':_0x4a70b2,'shapeData':_0x93d1de},'axisAlignSheetTransform':_0x458d0b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x45ffef(0x152)])(_0x4a70b2)&&(_0x39ab38['data'][_0x45ffef(0x1da)]=![],_0x39ab38[_0x45ffef(0x184)][_0x45ffef(0x18d)]=![],_0x39ab38[_0x45ffef(0x184)][_0x45ffef(0x18a)]=![],_0x39ab38[_0x45ffef(0x184)][_0x45ffef(0x190)]=![],_0x39ab38[_0x45ffef(0x158)][_0x45ffef(0x18d)]=![],_0x39ab38['transform']['resizeEnabled']=![],_0x39ab38['transform'][_0x45ffef(0x190)]=![]);const {undo:_0x32b3ef,redo:_0x1d56da,objects:_0x21c4bc}=_0x1a47bc[_0x45ffef(0x1b6)]([_0x39ab38]),_0x3d3816=_0x30df2f[_0x45ffef(0x160)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x390dc1,'drawings':[_0x39ab38]}}),_0x4c1473=[...(_0x239af5=_0x3d3816[_0x45ffef(0x1bd)])!==null&&_0x239af5!==void 0x0?_0x239af5:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x390dc1,'subUnitId':_0xd424df,'op':_0x1d56da,'objects':_0x21c4bc,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x45ffef(0x1b0)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x390dc1]},..._0x3d3816[_0x45ffef(0x155)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x36f66c}],_0x578004=[...(_0x376240=_0x3d3816[_0x45ffef(0x178)])!==null&&_0x376240!==void 0x0?_0x376240:[],{'id':_univerjs_sheets_drawing[_0x45ffef(0x18e)]['id'],'params':{'unitId':_0x390dc1,'subUnitId':_0xd424df,'op':_0x32b3ef,'objects':_0x21c4bc,'type':_univerjs_sheets_drawing[_0x45ffef(0x196)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x45ffef(0x173)]['id'],'params':[_0x390dc1]},..._0x3d3816[_0x45ffef(0x157)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x390dc1,'subUnitId':_0xd424df,'shapeType':_0x3aef4c,'shapeId':_0x1f20a5,'shapeData':_0x17830a}}];if((0x0,_univerjs_core[_0x45ffef(0x1e4)])(_0x4c1473,_0x808442)[_0x45ffef(0x151)])return _0x5c7d79[_0x45ffef(0x1af)]({'unitID':_0x390dc1,'undoMutations':_0x578004,'redoMutations':_0x4c1473}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x22bf2f(0x149)],'id':_0x22bf2f(0x16b),'handler':(_0x6d6a67,_0x20ee4c)=>{const _0x355273=_0x22bf2f;var _0x1e1567,_0x13116a;const _0x315626=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x6d6a67['get'](_univerjs_core[_0x355273(0x187)]),_0x20ee4c);if(!_0x315626)return![];const _0x1cca13=_0x6d6a67[_0x355273(0x17f)](_univerjs_sheets[_0x355273(0x1e9)]),{unitId:_0x2eaaa7,subUnitId:_0xc36a8c}=_0x315626,_0x59469e=_0x1cca13[_0x355273(0x209)](_0x2eaaa7,_0xc36a8c);if(!_0x59469e)return![];const _0x5af193=_0x6d6a67[_0x355273(0x17f)](_univerjs_sheets_drawing[_0x355273(0x1c1)]),{shapeId:_0x419986,flipH:_0xc752e7,flipV:_0xaf8ce}=_0x20ee4c,_0x288f80=_0x5af193[_0x355273(0x1cf)]({'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'drawingId':_0x419986});if(!_0x288f80)return![];const _0x3f9ff2=_0x6d6a67[_0x355273(0x17f)](SheetsShapeService)[_0x355273(0x1ed)](_0x2eaaa7,_0xc36a8c,_0x419986);if(!_0x3f9ff2)return![];const _0x414cd7=_0x6d6a67[_0x355273(0x17f)](_univerjs_core['ICommandService']),_0x44824e=_0x6d6a67[_0x355273(0x17f)](_univerjs_core[_0x355273(0x207)]),_0xed741c=_0x6d6a67[_0x355273(0x17f)](_univerjs_sheets['SheetInterceptorService']),_0x11b74b={..._0x288f80[_0x355273(0x158)]};if(_0xc752e7!==void 0x0)_0x11b74b['flipX']=!_0x11b74b[_0x355273(0x176)];if(_0xaf8ce!==void 0x0)_0x11b74b[_0x355273(0x1ab)]=!_0x11b74b['flipY'];const _0x266789=(0x0,_univerjs_sheets_drawing[_0x355273(0x164)])(_0x11b74b,_0x59469e),_0xcce1d1=(0x0,_univerjs_sheets_drawing[_0x355273(0x194)])(_0x11b74b,_0x59469e),_0x3d5657=_0x3f9ff2['getShapeType'](),_0x4cc288=_0x3f9ff2[_0x355273(0x1c0)](),_0x2f0a6d={'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'drawingId':_0x419986,'drawingType':_univerjs_core[_0x355273(0x175)][_0x355273(0x1f0)],'sheetTransform':_0x266789,'transform':_0x11b74b,'data':{'shapeType':_0x3d5657,'shapeData':_0x4cc288},'axisAlignSheetTransform':_0xcce1d1,'allowTransform':!![]},{undo:_0x541a80,redo:_0xcd73f7,objects:_0x12e0c6}=_0x5af193[_0x355273(0x1b6)]([_0x2f0a6d]),_0x5db70c=_0xed741c[_0x355273(0x160)]({'id':_univerjs_sheets_drawing[_0x355273(0x15e)]['id'],'params':{'unitId':_0x2eaaa7,'drawings':[_0x2f0a6d]}}),_0x28208c=[...(_0x1e1567=_0x5db70c[_0x355273(0x1bd)])!==null&&_0x1e1567!==void 0x0?_0x1e1567:[],{'id':_univerjs_sheets_drawing[_0x355273(0x18e)]['id'],'params':{'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'op':_0xcd73f7,'objects':_0x12e0c6,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x355273(0x1b0)]}},{'id':_univerjs_sheets_drawing[_0x355273(0x173)]['id'],'params':[_0x2eaaa7]},..._0x5db70c[_0x355273(0x155)]],_0x385c04=[...(_0x13116a=_0x5db70c[_0x355273(0x178)])!==null&&_0x13116a!==void 0x0?_0x13116a:[],{'id':_univerjs_sheets_drawing[_0x355273(0x18e)]['id'],'params':{'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'op':_0x541a80,'objects':_0x12e0c6,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x355273(0x1b0)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2eaaa7]},..._0x5db70c['undos']];if((0x0,_univerjs_pro_engine_shape[_0x355273(0x152)])(_0x3d5657)){const _0x5a3d72=_0x3f9ff2[_0x355273(0x201)]();if(_0x5a3d72){const _0x3ad9e4={..._0x5a3d72};_0x3ad9e4[_0x355273(0x15c)]=void 0x0,_0x3ad9e4['to']=void 0x0,_0x28208c[_0x355273(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'shapeId':_0x419986,'shapeType':_0x3d5657,'shapeData':{'relation':_0x3ad9e4}}}),_0x385c04['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2eaaa7,'subUnitId':_0xc36a8c,'shapeId':_0x419986,'shapeType':_0x3d5657,'shapeData':{'relation':_0x5a3d72}}});}}if((0x0,_univerjs_core[_0x355273(0x1e4)])(_0x28208c,_0x414cd7)['result'])return _0x44824e['pushUndoRedo']({'unitID':_0x2eaaa7,'undoMutations':_0x385c04,'redoMutations':_0x28208c}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x22bf2f(0x1ce)]['COMMAND'],'id':_0x22bf2f(0x1bf),'handler':(_0x52fe31,_0x203ec8)=>{const _0x5a2be1=_0x22bf2f;var _0x4254d2,_0x5591ea;const _0x28d705=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x52fe31['get'](_univerjs_core[_0x5a2be1(0x187)]),_0x203ec8);if(!_0x28d705)return![];const _0x1ee33e=_0x52fe31['get'](_univerjs_sheets[_0x5a2be1(0x1e9)]),{unitId:_0x329936,subUnitId:_0x1285a5}=_0x28d705,_0x2cba4a=_0x1ee33e[_0x5a2be1(0x209)](_0x329936,_0x1285a5);if(!_0x2cba4a)return![];const _0x12f8a1=_0x52fe31['get'](_univerjs_sheets_drawing[_0x5a2be1(0x1c1)]),{shapeId:_0x363615,rotate:_0x185876}=_0x203ec8,_0x1d58f3=_0x12f8a1[_0x5a2be1(0x1cf)]({'unitId':_0x329936,'subUnitId':_0x1285a5,'drawingId':_0x363615});if(!_0x1d58f3)return![];const _0x6c2c94=_0x52fe31[_0x5a2be1(0x17f)](SheetsShapeService)[_0x5a2be1(0x1ed)](_0x329936,_0x1285a5,_0x363615);if(!_0x6c2c94)return![];const _0x4975cb=_0x52fe31[_0x5a2be1(0x17f)](_univerjs_core[_0x5a2be1(0x174)]),_0x3a582e=_0x52fe31[_0x5a2be1(0x17f)](_univerjs_core[_0x5a2be1(0x207)]),_0x12f696=_0x52fe31[_0x5a2be1(0x17f)](_univerjs_sheets[_0x5a2be1(0x154)]),_0xfc87b1={..._0x1d58f3[_0x5a2be1(0x158)]};if(_0x185876!==void 0x0)_0xfc87b1[_0x5a2be1(0x185)]=(_0xfc87b1['angle']||0x0)+_0x185876;const _0x459cbf=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0xfc87b1,_0x2cba4a),_0x139e38=(0x0,_univerjs_sheets_drawing[_0x5a2be1(0x194)])(_0xfc87b1,_0x2cba4a),_0x2cd364=_0x6c2c94['getShapeType'](),_0x305f86=_0x6c2c94['getShapeData'](),_0x578192={'unitId':_0x329936,'subUnitId':_0x1285a5,'drawingId':_0x363615,'drawingType':_univerjs_core[_0x5a2be1(0x175)][_0x5a2be1(0x1f0)],'sheetTransform':_0x459cbf,'transform':_0xfc87b1,'data':{'shapeType':_0x2cd364,'shapeData':_0x305f86},'axisAlignSheetTransform':_0x139e38,'allowTransform':!![]},{undo:_0x5d715f,redo:_0x5acda5,objects:_0x30fa54}=_0x12f8a1['getBatchUpdateOp']([_0x578192]),_0x18ad89=_0x12f696[_0x5a2be1(0x160)]({'id':_univerjs_sheets_drawing[_0x5a2be1(0x15e)]['id'],'params':{'unitId':_0x329936,'drawings':[_0x578192]}}),_0x461d2e=[...(_0x4254d2=_0x18ad89[_0x5a2be1(0x1bd)])!==null&&_0x4254d2!==void 0x0?_0x4254d2:[],{'id':_univerjs_sheets_drawing[_0x5a2be1(0x18e)]['id'],'params':{'unitId':_0x329936,'subUnitId':_0x1285a5,'op':_0x5acda5,'objects':_0x30fa54,'type':_univerjs_sheets_drawing[_0x5a2be1(0x196)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x5a2be1(0x173)]['id'],'params':[_0x329936]},..._0x18ad89[_0x5a2be1(0x155)]],_0x143dc8=[...(_0x5591ea=_0x18ad89[_0x5a2be1(0x178)])!==null&&_0x5591ea!==void 0x0?_0x5591ea:[],{'id':_univerjs_sheets_drawing[_0x5a2be1(0x18e)]['id'],'params':{'unitId':_0x329936,'subUnitId':_0x1285a5,'op':_0x5d715f,'objects':_0x30fa54,'type':_univerjs_sheets_drawing[_0x5a2be1(0x196)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x5a2be1(0x173)]['id'],'params':[_0x329936]},..._0x18ad89[_0x5a2be1(0x157)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x461d2e,_0x4975cb)[_0x5a2be1(0x151)])return _0x3a582e[_0x5a2be1(0x1af)]({'unitID':_0x329936,'undoMutations':_0x143dc8,'redoMutations':_0x461d2e}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x149)],'id':_0x22bf2f(0x1eb),'handler':(_0x41ccd4,_0x1bffac)=>{const _0x2d75fc=_0x22bf2f;var _0x37b0b5;const _0x520c20=(0x0,_univerjs_sheets[_0x2d75fc(0x141)])(_0x41ccd4[_0x2d75fc(0x17f)](_univerjs_core['IUniverInstanceService']),_0x1bffac);if(!_0x520c20)return![];const {unitId:_0x172261,subUnitId:_0x53c3f4}=_0x520c20,{shapeId:_0x5df82d}=_0x1bffac,_0xe2af86=_0x41ccd4[_0x2d75fc(0x17f)](SheetsShapeService)['getShapeModel'](_0x172261,_0x53c3f4,_0x5df82d);if(!_0xe2af86)return![];const _0x30794e=_0xe2af86[_0x2d75fc(0x19f)](),_0x2ddffb=(_0x37b0b5=_0x30794e===null||_0x30794e===void 0x0?void 0x0:_0x30794e[_0x2d75fc(0x1c3)])!==null&&_0x37b0b5!==void 0x0?_0x37b0b5:!![],_0x400fa7=!_0x2ddffb,_0x212665=_0x41ccd4[_0x2d75fc(0x17f)](_univerjs_core['ICommandService']),_0x2b6d60=_0x41ccd4[_0x2d75fc(0x17f)](_univerjs_core[_0x2d75fc(0x207)]),_0x5e10e7={'unitId':_0x172261,'subUnitId':_0x53c3f4,'shapeId':_0x5df82d,'shapeData':{'shapeText':{'isHorizontal':_0x400fa7}}},_0x412765={'unitId':_0x172261,'subUnitId':_0x53c3f4,'shapeId':_0x5df82d,'shapeData':{'shapeText':{'isHorizontal':_0x2ddffb}}},_0x10fa02=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x5e10e7}],_0x14e73d=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x412765}];if((0x0,_univerjs_core['sequenceExecute'])(_0x10fa02,_0x212665)[_0x2d75fc(0x151)])return _0x2b6d60[_0x2d75fc(0x1af)]({'unitID':_0x172261,'undoMutations':_0x14e73d,'redoMutations':_0x10fa02}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x149)],'id':_0x22bf2f(0x1f9),'handler':(_0x4b3dc3,_0x141d61)=>{const _0x341e5d=_0x22bf2f;var _0x2d05fb,_0xfd0fc5,_0x16e00e,_0x3209ef;const _0x57fc1a=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x4b3dc3[_0x341e5d(0x17f)](_univerjs_core[_0x341e5d(0x187)]),_0x141d61);if(!_0x57fc1a)return![];const _0x1f9fc6=_0x4b3dc3[_0x341e5d(0x17f)](_univerjs_sheets[_0x341e5d(0x1e9)]),{unitId:_0x30305b,subUnitId:_0xb8e392}=_0x57fc1a,_0x3dff01=_0x1f9fc6[_0x341e5d(0x209)](_0x30305b,_0xb8e392);if(!_0x3dff01)return![];const _0x47bca2=_0x4b3dc3[_0x341e5d(0x17f)](_univerjs_sheets_drawing[_0x341e5d(0x1c1)]),{connectorShapeId:_0x57e8ee,width:_0x31d8c9,height:_0x5ee45e,left:_0x2291bc,top:_0x4ac25e,flipX:_0x440ac6,flipY:_0x1194a8,rotation:_0x2e6706,oldAdjustValues:_0x5cdf43,newAdjustValues:_0x3f08c1,oldLineType:_0x585aa8,newLineType:_0x5bc2bb,oldRelation:_0x1d5909,newRelation:_0x24a5be}=_0x141d61,_0x53a938=_0x47bca2[_0x341e5d(0x1cf)]({'unitId':_0x30305b,'subUnitId':_0xb8e392,'drawingId':_0x57e8ee});if(!_0x53a938)return![];const _0x57818f=_0x4b3dc3['get'](SheetsShapeService)['getShapeModel'](_0x30305b,_0xb8e392,_0x57e8ee);if(!_0x57818f)return![];const _0x23e00a=_0x4b3dc3[_0x341e5d(0x17f)](_univerjs_core[_0x341e5d(0x174)]),_0x136a4a=_0x4b3dc3['get'](_univerjs_core[_0x341e5d(0x207)]),_0x215b9b=_0x4b3dc3[_0x341e5d(0x17f)](_univerjs_sheets[_0x341e5d(0x154)]),_0x862366={..._0x53a938[_0x341e5d(0x158)],'width':_0x31d8c9,'height':_0x5ee45e,'left':_0x2291bc,'top':_0x4ac25e,'flipX':_0x440ac6,'flipY':_0x1194a8,'angle':(_0x2d05fb=_0x2e6706!==null&&_0x2e6706!==void 0x0?_0x2e6706:(_0xfd0fc5=_0x53a938[_0x341e5d(0x158)])===null||_0xfd0fc5===void 0x0?void 0x0:_0xfd0fc5[_0x341e5d(0x185)])!==null&&_0x2d05fb!==void 0x0?_0x2d05fb:0x0},_0x398dfc=(0x0,_univerjs_sheets_drawing[_0x341e5d(0x164)])(_0x862366,_0x3dff01),_0x4a8b3a=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x862366,_0x3dff01),_0x18bd30=_0x57818f[_0x341e5d(0x165)](),_0x545214=_0x57818f['getShapeData'](),_0x38688a={'unitId':_0x30305b,'subUnitId':_0xb8e392,'drawingId':_0x57e8ee,'drawingType':_univerjs_core[_0x341e5d(0x175)][_0x341e5d(0x1f0)],'sheetTransform':_0x398dfc,'transform':_0x862366,'data':{'shapeType':_0x5bc2bb||_0x585aa8||_0x18bd30,'shapeData':{..._0x545214,'adjustValues':_0x3f08c1||_0x5cdf43||(_0x545214===null||_0x545214===void 0x0?void 0x0:_0x545214[_0x341e5d(0x16c)]),'relation':_0x24a5be||_0x1d5909||(_0x545214===null||_0x545214===void 0x0?void 0x0:_0x545214[_0x341e5d(0x199)])}},'axisAlignSheetTransform':_0x4a8b3a,'allowTransform':!![]},{undo:_0x2635ba,redo:_0x212c77,objects:_0x54fc8f}=_0x47bca2['getBatchUpdateOp']([_0x38688a]),_0x57e634=_0x215b9b[_0x341e5d(0x160)]({'id':_univerjs_sheets_drawing[_0x341e5d(0x15e)]['id'],'params':{'unitId':_0x30305b,'drawings':[_0x38688a]}}),_0x116018=[...(_0x16e00e=_0x57e634[_0x341e5d(0x1bd)])!==null&&_0x16e00e!==void 0x0?_0x16e00e:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x30305b,'subUnitId':_0xb8e392,'op':_0x212c77,'objects':_0x54fc8f,'type':_univerjs_sheets_drawing[_0x341e5d(0x196)][_0x341e5d(0x1b0)]}},{'id':_univerjs_sheets_drawing[_0x341e5d(0x173)]['id'],'params':[_0x30305b]},..._0x57e634[_0x341e5d(0x155)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x30305b,'subUnitId':_0xb8e392,'shapeId':_0x57e8ee,'shapeType':_0x5bc2bb,'shapeData':{'adjustValues':_0x3f08c1,'relation':_0x24a5be}}}],_0x381a3f=[...(_0x3209ef=_0x57e634[_0x341e5d(0x178)])!==null&&_0x3209ef!==void 0x0?_0x3209ef:[],{'id':_univerjs_sheets_drawing[_0x341e5d(0x18e)]['id'],'params':{'unitId':_0x30305b,'subUnitId':_0xb8e392,'op':_0x2635ba,'objects':_0x54fc8f,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x341e5d(0x1b0)]}},{'id':_univerjs_sheets_drawing[_0x341e5d(0x173)]['id'],'params':[_0x30305b]},..._0x57e634['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x30305b,'subUnitId':_0xb8e392,'shapeId':_0x57e8ee,'shapeType':_0x18bd30,'shapeData':{..._0x545214,'adjustValues':_0x5cdf43||(_0x545214===null||_0x545214===void 0x0?void 0x0:_0x545214[_0x341e5d(0x16c)]),'relation':_0x1d5909||(_0x545214===null||_0x545214===void 0x0?void 0x0:_0x545214['relation'])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x116018,_0x23e00a)[_0x341e5d(0x151)])return _0x136a4a[_0x341e5d(0x1af)]({'unitID':_0x30305b,'undoMutations':_0x381a3f,'redoMutations':_0x116018}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core['CommandType']['COMMAND'],'id':'sheet.command.update-line-shape-resize','handler':(_0x4886a0,_0xe0e488)=>{const _0xd6929f=_0x22bf2f;var _0x29bd84,_0x17fb83;const _0x228f5b=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x4886a0['get'](_univerjs_core[_0xd6929f(0x187)]),_0xe0e488);if(!_0x228f5b)return![];const _0x4d9f5f=_0x4886a0[_0xd6929f(0x17f)](_univerjs_sheets[_0xd6929f(0x1e9)]),{unitId:_0x3722f1,subUnitId:_0x42cdd9}=_0x228f5b,_0x86b568=_0x4d9f5f[_0xd6929f(0x209)](_0x3722f1,_0x42cdd9);if(!_0x86b568)return![];const _0x592276=_0x4886a0['get'](_univerjs_sheets_drawing['ISheetDrawingService']),{shapeId:_0x820a73,width:_0x3d18f1,height:_0xf8b1c,left:_0x1bd94a,top:_0x185b7e,flipX:_0x144a13,flipY:_0x539b97,angle:_0x5118a5,oldAdjustValues:_0x5ef0c5,newAdjustValues:_0x3cb840,oldLineType:_0x41b1ab,newLineType:_0x4814f8}=_0xe0e488,_0x3170f5=_0x592276[_0xd6929f(0x1cf)]({'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'drawingId':_0x820a73});if(!_0x3170f5)return![];const _0x413e42=_0x4886a0[_0xd6929f(0x17f)](SheetsShapeService)['getShapeModel'](_0x3722f1,_0x42cdd9,_0x820a73);if(!_0x413e42)return![];const _0xd4bb97=_0x4886a0[_0xd6929f(0x17f)](_univerjs_core['ICommandService']),_0x2fdf88=_0x4886a0[_0xd6929f(0x17f)](_univerjs_core['IUndoRedoService']),_0x477d8b=_0x4886a0[_0xd6929f(0x17f)](_univerjs_sheets['SheetInterceptorService']),_0x7a2285={..._0x3170f5['transform'],'width':_0x3d18f1,'height':_0xf8b1c,'left':_0x1bd94a,'top':_0x185b7e,'flipX':_0x144a13,'flipY':_0x539b97,'angle':_0x5118a5},_0xa4337=(0x0,_univerjs_sheets_drawing[_0xd6929f(0x164)])(_0x7a2285,_0x86b568),_0x2b7e2e=(0x0,_univerjs_sheets_drawing[_0xd6929f(0x194)])(_0x7a2285,_0x86b568),_0x18dcbc=_0x413e42['getShapeType'](),_0x157438=_0x413e42[_0xd6929f(0x1c0)](),_0x584e51={'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'drawingId':_0x820a73,'drawingType':_univerjs_core[_0xd6929f(0x175)][_0xd6929f(0x1f0)],'sheetTransform':_0xa4337,'transform':_0x7a2285,'data':{'shapeType':_0x4814f8||_0x41b1ab||_0x18dcbc,'shapeData':{..._0x157438,'adjustValues':_0x3cb840||_0x5ef0c5||(_0x157438===null||_0x157438===void 0x0?void 0x0:_0x157438[_0xd6929f(0x16c)])}},'axisAlignSheetTransform':_0x2b7e2e,'allowTransform':!![]},{undo:_0x24c589,redo:_0xcab77,objects:_0x82bb7e}=_0x592276[_0xd6929f(0x1b6)]([_0x584e51]),_0x211ce3=_0x477d8b[_0xd6929f(0x160)]({'id':_univerjs_sheets_drawing[_0xd6929f(0x15e)]['id'],'params':{'unitId':_0x3722f1,'drawings':[_0x584e51]}}),_0x51912b=[...(_0x29bd84=_0x211ce3['preRedos'])!==null&&_0x29bd84!==void 0x0?_0x29bd84:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'op':_0xcab77,'objects':_0x82bb7e,'type':_univerjs_sheets_drawing[_0xd6929f(0x196)][_0xd6929f(0x1b0)]}},{'id':_univerjs_sheets_drawing[_0xd6929f(0x173)]['id'],'params':[_0x3722f1]},..._0x211ce3['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'shapeId':_0x820a73,'shapeType':_0x4814f8,'shapeData':{'adjustValues':_0x3cb840}}}],_0x581c65=[...(_0x17fb83=_0x211ce3[_0xd6929f(0x178)])!==null&&_0x17fb83!==void 0x0?_0x17fb83:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'op':_0x24c589,'objects':_0x82bb7e,'type':_univerjs_sheets_drawing[_0xd6929f(0x196)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0xd6929f(0x173)]['id'],'params':[_0x3722f1]},..._0x211ce3['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3722f1,'subUnitId':_0x42cdd9,'shapeId':_0x820a73,'shapeType':_0x18dcbc,'shapeData':{..._0x157438,'adjustValues':_0x5ef0c5||(_0x157438===null||_0x157438===void 0x0?void 0x0:_0x157438['adjustValues'])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x51912b,_0xd4bb97)[_0xd6929f(0x151)])return _0x2fdf88[_0xd6929f(0x1af)]({'unitID':_0x3722f1,'undoMutations':_0x581c65,'redoMutations':_0x51912b}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x22bf2f(0x1ad),'type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x1c8)],'handler':(_0x298727,_0x2134f7)=>{const _0x309e13=_0x22bf2f,{unitId:_0x7a5fd2,subUnitId:_0x2f2f26,shapeType:_0x3e2a3f,shapeId:_0x1ebcf2,shapeData:_0x42e43a}=_0x2134f7,_0x2115af=_0x298727[_0x309e13(0x17f)](SheetsShapeService)[_0x309e13(0x1ed)](_0x7a5fd2,_0x2f2f26,_0x1ebcf2);if(_0x2115af){_0x2115af[_0x309e13(0x1fc)](_0x3e2a3f);if(_0x42e43a)_0x2115af===null||_0x2115af===void 0x0||_0x2115af[_0x309e13(0x147)](_0x42e43a);}return!![];}},UpdateSheetsShapeTypeCommand={'id':'sheet.command.update-shape-type','type':_univerjs_core[_0x22bf2f(0x1ce)][_0x22bf2f(0x149)],'handler':(_0x4c90ef,_0x16c20b)=>{const _0x5d2140=_0x22bf2f;if(!_0x16c20b)return![];const _0x27949e=_0x4c90ef[_0x5d2140(0x17f)](_univerjs_core[_0x5d2140(0x174)]),_0x1f6313=_0x4c90ef[_0x5d2140(0x17f)](SheetsShapeService),_0x2ebca6=_0x4c90ef[_0x5d2140(0x17f)](_univerjs_core['IUndoRedoService']),_0x3b464a=[],_0x1be0f6=[],{unitId:_0x5643e5,subUnitId:_0x5e7ec5,shapeId:_0x571d34,shapeType:_0x54a3ff,shapeData:_0x1bb15b}=_0x16c20b,_0x5e2d34=_0x1f6313[_0x5d2140(0x1ed)](_0x5643e5,_0x5e7ec5,_0x571d34);if(_0x5e2d34){const _0xebd3f6=_0x5e2d34[_0x5d2140(0x165)](),_0x3d89a7=Object['assign']({},_0x5e2d34['getShapeData']()),_0xbdf792={'unitId':_0x5643e5,'subUnitId':_0x5e7ec5,'shapeId':_0x571d34,'shapeType':_0x54a3ff,'shapeData':_0x1bb15b},_0x4f7108={'unitId':_0x5643e5,'subUnitId':_0x5e7ec5,'shapeId':_0x571d34,'shapeType':_0xebd3f6,'shapeData':_0x3d89a7};_0x3b464a[_0x5d2140(0x17d)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0xbdf792}),_0x1be0f6['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x4f7108});if(_0x3b464a[_0x5d2140(0x1e0)](_0x1e1267=>_0x27949e[_0x5d2140(0x1a2)](_0x1e1267['id'],_0x1e1267[_0x5d2140(0x15d)])))_0x2ebca6['pushUndoRedo']({'unitID':_0x5643e5,'redoMutations':[..._0x3b464a],'undoMutations':[..._0x1be0f6]});return!![];}return![];}};var name=_0x22bf2f(0x180),version=_0x22bf2f(0x15b);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x22bf2f(0x14f),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0x22bf2f(0x167)]{constructor(_0x34744e,_0x3ec6ed,_0x49b11a,_0x57f65d,_0x5cbbda){const _0x1c6241=_0x22bf2f;super(),this['_commandService']=_0x34744e,this[_0x1c6241(0x140)]=_0x3ec6ed,this[_0x1c6241(0x153)]=_0x49b11a,this[_0x1c6241(0x17a)]=_0x57f65d,this['_drawingManagerService']=_0x5cbbda,this[_0x1c6241(0x1f5)](),this[_0x1c6241(0x1db)]();}[_0x22bf2f(0x1f5)](){const _0x40c0d2=_0x22bf2f;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x40c0d2(0x156)](_0x525a92=>this['disposeWithMe'](this[_0x40c0d2(0x163)][_0x40c0d2(0x169)](_0x525a92)));}[_0x22bf2f(0x1db)](){const _0x3f03a2=_0x22bf2f;this[_0x3f03a2(0x1ba)](this['_sheetInterceptorService'][_0x3f03a2(0x19d)]({'getMutations':_0x2dea43=>{const _0x541c77=_0x3f03a2;if(_0x2dea43['id']===_univerjs_sheets_drawing[_0x541c77(0x166)]['id']){const {drawings:_0x1597a0}=_0x2dea43[_0x541c77(0x15d)],_0x5bf652=_0x1597a0[_0x541c77(0x1c9)](_0x1b204d=>_0x1b204d[_0x541c77(0x16d)]===_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE']);if(_0x5bf652[_0x541c77(0x15f)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x3604b6=[],_0x12da05=[];return _0x5bf652[_0x541c77(0x156)](_0x2aac7e=>{const _0x42e444=_0x541c77,{unitId:_0xd74eab,subUnitId:_0x5e1f9d,drawingId:_0x188322}=_0x2aac7e,_0x439d09=this[_0x42e444(0x17a)][_0x42e444(0x1ed)](_0xd74eab,_0x5e1f9d,_0x188322);if(!_0x439d09)throw new TypeError(_0x42e444(0x1cd)+_0x439d09);_0x3604b6['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0xd74eab,'subUnitId':_0x5e1f9d,'shapeId':_0x188322}}),_0x12da05[_0x42e444(0x17d)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0xd74eab,'subUnitId':_0x5e1f9d,'shapeId':_0x188322,'shapeType':_0x439d09['getShapeType'](),'shapeData':_0x439d09[_0x42e444(0x1c0)]()}});const _0x11a0b7=this[_0x42e444(0x17a)][_0x42e444(0x162)](_0xd74eab,_0x5e1f9d,_0x188322);if(_0x11a0b7)for(const _0x122a1c of _0x11a0b7){const _0xdec5b4=_0x122a1c['lineShapeId'],_0x38e1ca=_0x122a1c['isFrom'],_0x1231c1=_0x38e1ca?{'from':void 0x0}:{'to':void 0x0},_0x1c107d=_0x38e1ca?{'from':{'shapeId':_0x122a1c[_0x42e444(0x150)],'cxnIndex':_0x122a1c[_0x42e444(0x146)]}}:{'to':{'shapeId':_0x122a1c[_0x42e444(0x150)],'cxnIndex':_0x122a1c[_0x42e444(0x146)]}};_0x3604b6[_0x42e444(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xd74eab,'subUnitId':_0x5e1f9d,'shapeId':_0xdec5b4,'shapeData':{'relation':_0x1231c1}}}),_0x12da05[_0x42e444(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xd74eab,'subUnitId':_0x5e1f9d,'shapeId':_0xdec5b4,'shapeData':{'relation':_0x1c107d}}});}}),{'preRedos':_0x3604b6,'redos':[],'preUndos':[],'undos':_0x12da05};}if(_0x2dea43['id']===_univerjs_sheets_drawing[_0x541c77(0x15e)]['id']){const {drawings:_0xcf86f9}=_0x2dea43[_0x541c77(0x15d)],_0x14402b=_0xcf86f9[_0x541c77(0x1c9)](_0x4f8736=>_0x4f8736['drawingType']===_univerjs_core[_0x541c77(0x175)][_0x541c77(0x1f0)]);if(_0x14402b[_0x541c77(0x15f)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x56a0bf=[],_0x2eeb59=[];for(const _0x503444 of _0x14402b){const {unitId:_0x1e494b,subUnitId:_0x4cef04,drawingId:_0x3969a5,transform:_0x2ff006}=_0x503444;if(!_0x1e494b||!_0x4cef04||!_0x3969a5||!_0x2ff006)continue;const _0xa7f1d6=this[_0x541c77(0x17a)][_0x541c77(0x1ed)](_0x1e494b,_0x4cef04,_0x3969a5);if(!_0xa7f1d6)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0xa7f1d6);if((0x0,_univerjs_pro_engine_shape[_0x541c77(0x152)])(_0xa7f1d6[_0x541c77(0x165)]())){const _0x598d59=this['_sheetsShapeService'][_0x541c77(0x15a)](_0x1e494b,_0x4cef04,_0x3969a5),_0x4d46af={'from':void 0x0,'to':void 0x0};_0x598d59&&(_0x56a0bf[_0x541c77(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e494b,'subUnitId':_0x4cef04,'shapeId':_0x3969a5,'shapeData':{'relation':_0x4d46af}}}),_0x2eeb59[_0x541c77(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e494b,'subUnitId':_0x4cef04,'shapeId':_0x3969a5,'shapeData':{'relation':_0x598d59}}}));}else{const _0x2763f0=this[_0x541c77(0x17a)]['getBasicShapeRelation'](_0x1e494b,_0x4cef04,_0x3969a5);if(_0x2763f0&&_0x2763f0[_0x541c77(0x15f)]>0x0)for(const _0x1df855 of _0x2763f0){const _0x156102=_0x1df855['lineShapeId'],_0xbc1caf=_0x1df855[_0x541c77(0x1e7)],_0x5909df=this[_0x541c77(0x17a)][_0x541c77(0x1ed)](_0x1e494b,_0x4cef04,_0x156102);if(!_0x5909df)continue;const _0x7bec82=_0x5909df['getStartConnectInfo'](),_0x462d48=_0x5909df[_0x541c77(0x1b5)]();if(_0x7bec82&&_0x462d48)this[_0x541c77(0x1d6)](_0x1e494b,_0x4cef04,_0x156102,_0x5909df,_0x7bec82,_0x462d48,_0x56a0bf,_0x2eeb59,_0x3969a5,_0x2ff006);else this[_0x541c77(0x18c)](_0x1e494b,_0x4cef04,_0x156102,_0x5909df,_0xbc1caf?_0x7bec82:_0x462d48,_0xbc1caf,_0x56a0bf,_0x2eeb59,_0x3969a5,_0x2ff006);}}}return{'preRedos':[],'redos':_0x56a0bf,'preUndos':_0x2eeb59,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x22bf2f(0x1f2)](_0x23187c,_0x5b77bb,_0x474e67,_0x583cc4,_0x1c9980){const _0x1a113f=_0x22bf2f;if(!_0x5b77bb||!_0x474e67)return null;const {shapeId:_0x1f3bec,cxnIndex:_0x3dc214}=_0x23187c,_0x1fe63d=this[_0x1a113f(0x17a)][_0x1a113f(0x1ed)](_0x5b77bb,_0x474e67,_0x1f3bec);if(!_0x1fe63d)return null;const _0x377250=this[_0x1a113f(0x1c7)][_0x1a113f(0x1cf)]({'unitId':_0x5b77bb,'subUnitId':_0x474e67,'drawingId':_0x1f3bec});if(!(_0x377250===null||_0x377250===void 0x0?void 0x0:_0x377250[_0x1a113f(0x158)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x5c7914}=_0x377250[_0x1a113f(0x158)];if(_0x1c9980&&_0x583cc4===_0x1f3bec){var _0x467bc2,_0xc1407e,_0x4532cf,_0x7aea8f,_0x2eddb4,_0x125018,_0x1cc9ab;left=(_0x467bc2=_0x1c9980[_0x1a113f(0x1b7)])!==null&&_0x467bc2!==void 0x0?_0x467bc2:left,top=(_0xc1407e=_0x1c9980[_0x1a113f(0x177)])!==null&&_0xc1407e!==void 0x0?_0xc1407e:top,width=(_0x4532cf=_0x1c9980[_0x1a113f(0x159)])!==null&&_0x4532cf!==void 0x0?_0x4532cf:width,height=(_0x7aea8f=_0x1c9980['height'])!==null&&_0x7aea8f!==void 0x0?_0x7aea8f:height,flipX=(_0x2eddb4=_0x1c9980['flipX'])!==null&&_0x2eddb4!==void 0x0?_0x2eddb4:flipX,flipY=(_0x125018=_0x1c9980['flipY'])!==null&&_0x125018!==void 0x0?_0x125018:flipY,_0x5c7914=(_0x1cc9ab=_0x1c9980[_0x1a113f(0x185)])!==null&&_0x1cc9ab!==void 0x0?_0x1cc9ab:_0x5c7914;}_0x1fe63d[_0x1a113f(0x19a)]({'width':width,'height':height});const _0x46f6e8=_0x1fe63d['getConnectionSiteList']()[_0x1a113f(0x1e1)](_0x3dec9e=>_0x3dec9e[_0x1a113f(0x17c)]===_0x3dc214);if(!_0x46f6e8)return null;let _0x277918=flipX?width-_0x46f6e8['x']:_0x46f6e8['x'],_0x32c52c=flipY?height-_0x46f6e8['y']:_0x46f6e8['y'];if(_0x5c7914!==0x0&&_0x5c7914!==void 0x0&&_0x5c7914!==null){const _0x1fdb00=_0x5c7914*Math['PI']/0xb4,_0x3ff7e1=Math[_0x1a113f(0x1de)](_0x1fdb00),_0x2942e1=Math['sin'](_0x1fdb00),_0xba443c=width/0x2,_0x243ffc=height/0x2,_0x465836=_0x277918-_0xba443c,_0x7941e0=_0x32c52c-_0x243ffc;_0x277918=_0xba443c+_0x465836*_0x3ff7e1-_0x7941e0*_0x2942e1,_0x32c52c=_0x243ffc+_0x465836*_0x2942e1+_0x7941e0*_0x3ff7e1;}_0x277918+=left,_0x32c52c+=top;let _0x59f67e=_0x46f6e8[_0x1a113f(0x1c2)]/0xea60;if(flipX)_0x59f67e=0xb4-_0x59f67e;if(flipY)_0x59f67e=-_0x59f67e;_0x59f67e+=_0x5c7914||0x0,_0x59f67e=(_0x59f67e%0x168+0x168)%0x168;const _0x4ada11=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x5c7914||0x0);return{'point':{'x':_0x277918,'y':_0x32c52c},'angle':_0x59f67e,'bounds':_0x4ada11};}[_0x22bf2f(0x1d6)](_0x282b34,_0x2a322d,_0xb92d69,_0x54aab5,_0x31374f,_0x5c1fce,_0x2f02d4,_0x4b05c7,_0x598c7a,_0x17c883){const _0x3a83b7=_0x22bf2f,_0x115318=this[_0x3a83b7(0x153)][_0x3a83b7(0x209)](_0x282b34,_0x2a322d);if(!_0x115318)return;const _0xd3cd35=_0x54aab5[_0x3a83b7(0x201)](),_0x25cdf9=_0x54aab5[_0x3a83b7(0x1f1)](),_0x116ad5={},_0x503a68={};_0x25cdf9[_0x3a83b7(0x156)](_0x308dec=>{const _0x4c85eb=_0x3a83b7,_0x1fd97d=_0x54aab5[_0x4c85eb(0x1fb)](_0x308dec);_0x503a68[_0x308dec]=_0x1fd97d!==null&&_0x1fd97d!==void 0x0?_0x1fd97d:0x0;});const _0x286b7b=this[_0x3a83b7(0x1f2)](_0x31374f,_0x282b34,_0x2a322d,_0x598c7a,_0x17c883),_0x2e52c1=this[_0x3a83b7(0x1f2)](_0x5c1fce,_0x282b34,_0x2a322d,_0x598c7a,_0x17c883);if(_0x286b7b&&_0x2e52c1){const _0x49419a=_0x54aab5[_0x3a83b7(0x165)](),_0x3a1954=(0x0,_univerjs_pro_engine_shape[_0x3a83b7(0x19b)])(_0x286b7b,_0x2e52c1,_0x49419a);let _0x1d8d22=_0x49419a;if(_0x3a1954){const _0x2819ef=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x3a1954,_0x54aab5[_0x3a83b7(0x165)]()),_0x54078b=this[_0x3a83b7(0x1c7)][_0x3a83b7(0x1f3)](_0x282b34,_0x2a322d);if(_0x54078b&&_0x54078b[_0xb92d69]){const _0x41e64b=_0x54078b[_0xb92d69];_0x1d8d22=_0x2819ef[_0x3a83b7(0x1c4)];for(const [_0x425003,_0x806380]of Object[_0x3a83b7(0x1a9)](_0x2819ef[_0x3a83b7(0x16c)]))_0x116ad5[_0x425003]=_0x806380;const _0xf21684={..._0x41e64b[_0x3a83b7(0x158)],'width':_0x2819ef['worldRect'][_0x3a83b7(0x159)],'height':_0x2819ef[_0x3a83b7(0x20b)]['height'],'left':_0x2819ef['worldRect'][_0x3a83b7(0x1b7)],'top':_0x2819ef[_0x3a83b7(0x20b)][_0x3a83b7(0x177)],'flipX':_0x2819ef[_0x3a83b7(0x20b)]['flipX'],'flipY':_0x2819ef['worldRect'][_0x3a83b7(0x1ab)],'angle':_0x2819ef[_0x3a83b7(0x1ea)]},_0x1c951c=(0x0,_univerjs_sheets_drawing[_0x3a83b7(0x164)])(_0xf21684,_0x115318),_0x4265c5=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0xf21684,_0x115318),_0xc6be03={'unitId':_0x282b34,'subUnitId':_0x2a322d,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x3a83b7(0x1f0)],'drawingId':_0xb92d69,'transform':_0xf21684,'sheetTransform':_0x1c951c,'axisAlignSheetTransform':_0x4265c5},{unitId:_0x1be0ac,subUnitId:_0x9059cd,undo:_0x47a252,redo:_0x36c331,objects:_0xb1870d}=this[_0x3a83b7(0x1c7)][_0x3a83b7(0x1b6)]([_0xc6be03]);_0x2f02d4[_0x3a83b7(0x17d)]({'id':_univerjs_sheets_drawing[_0x3a83b7(0x18e)]['id'],'params':{'unitId':_0x1be0ac,'subUnitId':_0x9059cd,'op':_0x36c331,'objects':_0xb1870d,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x3a83b7(0x1b0)]}}),_0x4b05c7[_0x3a83b7(0x17d)]({'id':_univerjs_sheets_drawing[_0x3a83b7(0x18e)]['id'],'params':{'unitId':_0x1be0ac,'subUnitId':_0x9059cd,'op':_0x47a252,'objects':_0xb1870d,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x3a83b7(0x1b0)]}});}_0x54aab5[_0x3a83b7(0x1ff)]();}_0x2f02d4['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x282b34,'subUnitId':_0x2a322d,'shapeId':_0xb92d69,'shapeType':_0x1d8d22,'shapeData':{'adjustValues':_0x116ad5,'relation':_0xd3cd35}}}),_0x4b05c7[_0x3a83b7(0x17d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x282b34,'subUnitId':_0x2a322d,'shapeId':_0xb92d69,'shapeType':_0x49419a,'shapeData':{'adjustValues':_0x503a68,'relation':_0xd3cd35}}});}}[_0x22bf2f(0x18c)](_0x263fa0,_0x311d31,_0x4f5cae,_0x381c70,_0x522117,_0x1d7ac3,_0x20c1a6,_0x2b0cff,_0x4564d4,_0x4fb40c){const _0x5b90e4=_0x22bf2f;var _0x2f806a;if(!_0x522117)return;const _0x5c952f=this[_0x5b90e4(0x153)]['getSkeleton'](_0x263fa0,_0x311d31);if(!_0x5c952f)return;const _0x136699=(_0x2f806a=this[_0x5b90e4(0x1c7)][_0x5b90e4(0x1cf)]({'unitId':_0x263fa0,'subUnitId':_0x311d31,'drawingId':_0x4564d4}))===null||_0x2f806a===void 0x0?void 0x0:_0x2f806a['transform'];if(!_0x136699)return;const _0x17e3d6=_0x136699[_0x5b90e4(0x1b7)]!==_0x4fb40c['left']||_0x136699[_0x5b90e4(0x177)]!==_0x4fb40c[_0x5b90e4(0x177)],_0x1209b6=_0x136699[_0x5b90e4(0x159)]!==_0x4fb40c[_0x5b90e4(0x159)]||_0x136699[_0x5b90e4(0x16e)]!==_0x4fb40c['height'],_0x120155=_0x136699[_0x5b90e4(0x176)]!==_0x4fb40c[_0x5b90e4(0x176)]||_0x136699[_0x5b90e4(0x1ab)]!==_0x4fb40c[_0x5b90e4(0x1ab)],_0x16eb6d=_0x136699[_0x5b90e4(0x185)]!==_0x4fb40c['angle'];if(_0x17e3d6&&!_0x1209b6&&!_0x120155&&!_0x16eb6d){var _0x32dddb,_0x574804,_0x4661ae,_0x8221a7;const _0x121d3e=((_0x32dddb=_0x4fb40c[_0x5b90e4(0x1b7)])!==null&&_0x32dddb!==void 0x0?_0x32dddb:0x0)-((_0x574804=_0x136699[_0x5b90e4(0x1b7)])!==null&&_0x574804!==void 0x0?_0x574804:0x0),_0x2528cb=((_0x4661ae=_0x4fb40c[_0x5b90e4(0x177)])!==null&&_0x4661ae!==void 0x0?_0x4661ae:0x0)-((_0x8221a7=_0x136699[_0x5b90e4(0x177)])!==null&&_0x8221a7!==void 0x0?_0x8221a7:0x0),_0x49103f=this[_0x5b90e4(0x1c7)][_0x5b90e4(0x1f3)](_0x263fa0,_0x311d31);if(_0x49103f&&_0x49103f[_0x4f5cae]){var _0x1780d9,_0x4b7e8b,_0x140e70,_0x573d91;const _0x46e909=_0x49103f[_0x4f5cae],_0x2de74f={..._0x46e909[_0x5b90e4(0x158)],'left':((_0x1780d9=(_0x4b7e8b=_0x46e909[_0x5b90e4(0x158)])===null||_0x4b7e8b===void 0x0?void 0x0:_0x4b7e8b[_0x5b90e4(0x1b7)])!==null&&_0x1780d9!==void 0x0?_0x1780d9:0x0)+_0x121d3e,'top':((_0x140e70=(_0x573d91=_0x46e909[_0x5b90e4(0x158)])===null||_0x573d91===void 0x0?void 0x0:_0x573d91[_0x5b90e4(0x177)])!==null&&_0x140e70!==void 0x0?_0x140e70:0x0)+_0x2528cb},_0x3d845f=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x2de74f,_0x5c952f),_0x4157da=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x2de74f,_0x5c952f),_0x577544={'unitId':_0x263fa0,'subUnitId':_0x311d31,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x5b90e4(0x1f0)],'drawingId':_0x4f5cae,'transform':_0x2de74f,'sheetTransform':_0x3d845f,'axisAlignSheetTransform':_0x4157da},{unitId:_0x1ea5d3,subUnitId:_0x595bc5,undo:_0x41cee2,redo:_0x14e4d9,objects:_0x3e431f}=this[_0x5b90e4(0x1c7)][_0x5b90e4(0x1b6)]([_0x577544]);_0x20c1a6['push']({'id':_univerjs_sheets_drawing[_0x5b90e4(0x18e)]['id'],'params':{'unitId':_0x1ea5d3,'subUnitId':_0x595bc5,'op':_0x14e4d9,'objects':_0x3e431f,'type':_univerjs_sheets_drawing[_0x5b90e4(0x196)][_0x5b90e4(0x1b0)]}}),_0x2b0cff['push']({'id':_univerjs_sheets_drawing[_0x5b90e4(0x18e)]['id'],'params':{'unitId':_0x1ea5d3,'subUnitId':_0x595bc5,'op':_0x41cee2,'objects':_0x3e431f,'type':_univerjs_sheets_drawing[_0x5b90e4(0x196)][_0x5b90e4(0x1b0)]}});}}else{const _0x13e35a=_0x381c70[_0x5b90e4(0x183)](),_0x3f62c4=_0x381c70['getEndConnectInfo']();this[_0x5b90e4(0x1d6)](_0x263fa0,_0x311d31,_0x4f5cae,_0x381c70,_0x13e35a,_0x3f62c4,_0x20c1a6,_0x2b0cff,_0x4564d4,_0x4fb40c);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core['ICommandService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x22bf2f(0x170)])(_univerjs_sheets[_0x22bf2f(0x154)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x22bf2f(0x170)])(_univerjs_sheets[_0x22bf2f(0x1e9)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x22bf2f(0x170)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x22bf2f(0x170)])(_univerjs_drawing[_0x22bf2f(0x1a3)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x22bf2f(0x1a8)]{constructor(_0x4bc0d6=defaultPluginConfig,_0x286f26,_0x51b61c,_0x34e469){const _0x41830d=_0x22bf2f;super(),this[_0x41830d(0x182)]=_0x4bc0d6,this[_0x41830d(0x1f6)]=_0x286f26,this[_0x41830d(0x163)]=_0x51b61c,this['_configService']=_0x34e469;const {..._0x3aa2a0}=(0x0,_univerjs_core[_0x41830d(0x203)])({},defaultPluginConfig,this[_0x41830d(0x182)]);this[_0x41830d(0x208)][_0x41830d(0x1e6)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x3aa2a0);}[_0x22bf2f(0x1ee)](){const _0x1d5df7=_0x22bf2f,_0x435650=this[_0x1d5df7(0x1f6)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]]['forEach'](_0x3b25ce=>_0x435650[_0x1d5df7(0x1a4)](_0x3b25ce)),(0x0,_univerjs_core[_0x1d5df7(0x18b)])(_0x435650,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x22bf2f(0x1b8),_univerjs_core[_0x22bf2f(0x1e2)]['UNIVER_SHEET']),_defineProperty(UniverSheetsShapePlugin,_0x22bf2f(0x197),_0x22bf2f(0x179)),_defineProperty(UniverSheetsShapePlugin,'packageName',name),_defineProperty(UniverSheetsShapePlugin,_0x22bf2f(0x1be),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x22bf2f(0x1fd)])(_univerjs_pro_license[_0x22bf2f(0x191)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x22bf2f(0x144)])),__decorateParam(0x2,_univerjs_core[_0x22bf2f(0x174)]),__decorateParam(0x3,_univerjs_core[_0x22bf2f(0x1a0)])],UniverSheetsShapePlugin),exports[_0x22bf2f(0x1fe)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports['InsertShapeCommand']=InsertShapeCommand,exports[_0x22bf2f(0x19e)]=InsertSheetsShapeMutation,exports[_0x22bf2f(0x172)]=RemoveSheetsShapeMutation,exports[_0x22bf2f(0x205)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x22bf2f(0x1b3)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x22bf2f(0x1d1)](exports,_0x22bf2f(0x195),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x22bf2f(0x1e5)]=ToggleSheetsShapeFlipCommand,Object[_0x22bf2f(0x1d1)](exports,'UniverSheetsShapePlugin',{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0x22bf2f(0x192)]=UpdateLineShapeResizeCommand,exports['UpdateSheetsShapeDataMutation']=UpdateSheetsShapeDataMutation,exports['UpdateSheetsShapeTypeCommand']=UpdateSheetsShapeTypeCommand,exports[_0x22bf2f(0x202)]=UpdateSheetsShapeTypeMutation;