@univerjs-pro/sheets-shape 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x4296b1=_0x26cd;(function(_0x11a5d5,_0x5933f5){const _0x997147=_0x26cd,_0x5beee3=_0x11a5d5();while(!![]){try{const _0x439401=parseInt(_0x997147(0x1b4))/0x1+-parseInt(_0x997147(0x1ae))/0x2+-parseInt(_0x997147(0x19e))/0x3+-parseInt(_0x997147(0x1c2))/0x4*(parseInt(_0x997147(0x18d))/0x5)+-parseInt(_0x997147(0x1cc))/0x6*(parseInt(_0x997147(0x1ee))/0x7)+-parseInt(_0x997147(0x188))/0x8*(-parseInt(_0x997147(0x1c8))/0x9)+-parseInt(_0x997147(0x1a4))/0xa*(-parseInt(_0x997147(0x190))/0xb);if(_0x439401===_0x5933f5)break;else _0x5beee3['push'](_0x5beee3['shift']());}catch(_0x29eaf4){_0x5beee3['push'](_0x5beee3['shift']());}}}(_0x5bfe,0x595f7));function _0x26cd(_0xfe032f,_0x713fc4){_0xfe032f=_0xfe032f-0x16d;const _0x5bfe3d=_0x5bfe();let _0x26cd83=_0x5bfe3d[_0xfe032f];return _0x26cd83;}import{ConnectorCoordinateTransform,ShapeArrowSizeEnum,ShapeArrowTypeEnum,ShapeFillEnum,ShapeGradientTypeEnum,ShapeLineCapEnum,ShapeLineDashEnum,ShapeLineJoinEnum,ShapeLineTypeEnum,ShapeTypeEnum,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{FEnum}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,SetShapeDrawingDataCommand,SheetsShapeService,UpdateConnectorRelationCommand}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum,generateRandomId}from'@univerjs/core';import{IDrawingManagerService}from'@univerjs/drawing';function _0x5bfe(){const _0x38145f=['type','removeShape','insertShape','ShapeLineCapEnum','shapeData','executeCommand','function','_injector','getConnectionSiteList','SolidFill','setStartArrowSize','\x20and\x20subUnitId\x20','updateContext','default','extend','worldRect','gradientAngle','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','symbol','gradientType','ShapeLineTypeEnum','8ZFdEUZ','parse','DRAWING_SHAPE','ang','_resolveExistingOrFreeEndpoint','85ZBBizl','height','newConnector','2962212aUratN','gradientStops','dashType','getWorkbook','sin','fillType','flipX','getShapeModel','setNoneFill','getPosition','size','setEndArrowType','adjustValues','left','579720flBQMy','getUnitId','toPrimitive','setStrokeColor','getSize','shape','20jNrRfB','length','stringify','flipY','string',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','lineJoinType','ShapeGradientTypeEnum','shapeId','get','941798UtfsNP','getEndConnectInfo','ShapeArrowTypeEnum','Skeleton\x20for\x20unitId\x20','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ensureSkeleton','625093PQSgek','setStrokeLineCapType','transform','keys','getSheetId','newShape','fill','getConnectorLinePoints','width','entries','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','setStrokeLineJoinType','from','_preloadShapeProperties','6164fkaPgq','rotation','_commandService','setStrokeLineDashType','color','getAdjustNames','4182471ghtBAB','call','getAdjustPoints','getShapeRelation','311994agMSRI','iterator','startArrow','setStrokeLineType','setStrokeOpacity','getAdjustValueByName','build','top','ShapeLineJoinEnum','drawId','setHeight','getDrawingByParam','setShapeSolidFill','object','\x20not\x20found','cos','ShapeLineDashEnum','setShapeType','stroke','getShapeData','setWidth','shapeType','opacity','setPosition','connectShapes','abs','localToWorld','getStartConnectInfo','getDrawingPoints','getShapeType','unitId','connectionSiteIndex','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','prototype','77vBAHdu','updateShape','getShapeId','getConnectionSites','_resolveEndpoints','subUnitId','find','endArrow'];_0x5bfe=function(){return _0x38145f;};return _0x5bfe();}import{SheetSkeletonService,convertPositionCellToSheetOverGrid}from'@univerjs/sheets';import{ISheetDrawingService,RemoveSheetDrawingCommand}from'@univerjs/sheets-drawing';import{FWorksheet}from'@univerjs/sheets/facade';var FSheetsShapeEnumMixin=class extends FEnum{get['ShapeTypeEnum'](){return ShapeTypeEnum;}get['ShapeFillEnum'](){return ShapeFillEnum;}get[_0x4296b1(0x1ab)](){return ShapeGradientTypeEnum;}get[_0x4296b1(0x187)](){return ShapeLineTypeEnum;}get[_0x4296b1(0x1dc)](){return ShapeLineDashEnum;}get[_0x4296b1(0x176)](){return ShapeLineCapEnum;}get[_0x4296b1(0x1d4)](){return ShapeLineJoinEnum;}get[_0x4296b1(0x1b0)](){return ShapeArrowTypeEnum;}get['ShapeArrowSizeEnum'](){return ShapeArrowSizeEnum;}};FEnum[_0x4296b1(0x181)](FSheetsShapeEnumMixin);function _typeof(_0xd175e8){'@babel/helpers - typeof';const _0x53c326=_0x4296b1;return _typeof=_0x53c326(0x179)==typeof Symbol&&_0x53c326(0x185)==typeof Symbol[_0x53c326(0x1cd)]?function(_0x261472){return typeof _0x261472;}:function(_0xb8e2e5){const _0x34ce11=_0x53c326;return _0xb8e2e5&&_0x34ce11(0x179)==typeof Symbol&&_0xb8e2e5['constructor']===Symbol&&_0xb8e2e5!==Symbol[_0x34ce11(0x1ed)]?_0x34ce11(0x185):typeof _0xb8e2e5;},_typeof(_0xd175e8);}function toPrimitive(_0x42ffe3,_0x2193ff){const _0x543da3=_0x4296b1;if(_0x543da3(0x1d9)!=_typeof(_0x42ffe3)||!_0x42ffe3)return _0x42ffe3;var _0x1f93a5=_0x42ffe3[Symbol[_0x543da3(0x1a0)]];if(void 0x0!==_0x1f93a5){var _0x4819c1=_0x1f93a5[_0x543da3(0x1c9)](_0x42ffe3,_0x2193ff||_0x543da3(0x180));if('object'!=_typeof(_0x4819c1))return _0x4819c1;throw new TypeError(_0x543da3(0x1be));}return(_0x543da3(0x1a8)===_0x2193ff?String:Number)(_0x42ffe3);}function toPropertyKey(_0x52c7bd){const _0x4502a3=_0x4296b1;var _0x711b55=toPrimitive(_0x52c7bd,'string');return _0x4502a3(0x185)==_typeof(_0x711b55)?_0x711b55:_0x711b55+'';}function _defineProperty(_0x101f93,_0x301b06,_0x28d40c){return(_0x301b06=toPropertyKey(_0x301b06))in _0x101f93?Object['defineProperty'](_0x101f93,_0x301b06,{'value':_0x28d40c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x101f93[_0x301b06]=_0x28d40c,_0x101f93;}var FShape=class{constructor(_0x24e252,_0x2d85e6,_0x4ad9e6,_0xd4c48b){const _0x266ae0=_0x4296b1;_defineProperty(this,_0x266ae0(0x1ea),void 0x0),_defineProperty(this,'subUnitId',void 0x0),_defineProperty(this,_0x266ae0(0x1d5),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x266ae0(0x1bc),DEFAULT_SHAPE_WIDTH),_defineProperty(this,_0x266ae0(0x18e),DEFAULT_SHAPE_HEIGHT),_defineProperty(this,_0x266ae0(0x1e1),void 0x0),_defineProperty(this,_0x266ae0(0x177),{}),_defineProperty(this,'_injector',void 0x0),this[_0x266ae0(0x1ea)]=_0x24e252,this['subUnitId']=_0x2d85e6,this[_0x266ae0(0x1d5)]=_0x4ad9e6||generateRandomId(),this[_0x266ae0(0x17a)]=_0xd4c48b;}[_0x4296b1(0x1e3)](_0x4b97e9,_0x140d84,_0x5a849e,_0x332ded){const _0x2c163d=_0x4296b1,_0x81bec1=this[_0x2c163d(0x17a)][_0x2c163d(0x1ad)](SheetSkeletonService)['ensureSkeleton'](this[_0x2c163d(0x1ea)],this['subUnitId']);if(!_0x81bec1)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x2c163d(0x1ea)]+'\x20and\x20subUnitId\x20'+this[_0x2c163d(0x170)]+'\x20not\x20found');const {transform:_0x547883}=convertPositionCellToSheetOverGrid(this['unitId'],this['subUnitId'],{'row':_0x4b97e9,'column':_0x140d84,'rowOffset':_0x5a849e,'columnOffset':_0x332ded},0x1,0x1,_0x81bec1);return this['x']=_0x547883[_0x2c163d(0x19d)],this['y']=_0x547883[_0x2c163d(0x1d3)],this;}['setAbsolutePosition'](_0x30e167,_0x4a894a){return this['x']=_0x30e167,this['y']=_0x4a894a,this;}[_0x4296b1(0x1dd)](_0x489677){const _0x4b04c3=_0x4296b1;return this[_0x4b04c3(0x1e1)]=_0x489677,this;}[_0x4296b1(0x1d8)](_0x1899dc,_0x42aac6){const _0x405364=_0x4296b1;if(!this[_0x405364(0x177)]['fill'])this['shapeData'][_0x405364(0x1ba)]={};this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x195)]=ShapeFillEnum[_0x405364(0x17c)];if(_0x1899dc!==void 0x0)this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x1c6)]=_0x1899dc;if(_0x42aac6!==void 0x0)this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x1e2)]=_0x42aac6;return this;}['setShapeGradientFill'](_0x75a39d,_0x4efb58,_0x2c4d6f){const _0x9da8d2=_0x4296b1;if(_0x4efb58===void 0x0||_0x4efb58['length']===0x0)throw new Error(_0x9da8d2(0x184));if(!this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)])this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)]={};this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)][_0x9da8d2(0x191)]=_0x4efb58,this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)][_0x9da8d2(0x195)]=ShapeFillEnum['GradientFill'],this['shapeData'][_0x9da8d2(0x1ba)][_0x9da8d2(0x186)]=_0x75a39d;if(_0x2c4d6f!==void 0x0)this['shapeData'][_0x9da8d2(0x1ba)][_0x9da8d2(0x183)]=_0x2c4d6f;return this;}[_0x4296b1(0x198)](){const _0x26c4d6=_0x4296b1;return this[_0x26c4d6(0x177)]['fill']={'fillType':ShapeFillEnum['NoFill']},this;}[_0x4296b1(0x1a1)](_0x52eb5c){const _0x12f2e7=_0x4296b1;if(!this[_0x12f2e7(0x177)][_0x12f2e7(0x1de)])this[_0x12f2e7(0x177)][_0x12f2e7(0x1de)]={};return this[_0x12f2e7(0x177)]['stroke'][_0x12f2e7(0x1c6)]=_0x52eb5c,this;}['setStrokeWidth'](_0x308bea){const _0x4e06f9=_0x4296b1;if(!this[_0x4e06f9(0x177)][_0x4e06f9(0x1de)])this['shapeData']['stroke']={};return this[_0x4e06f9(0x177)]['stroke'][_0x4e06f9(0x1bc)]=_0x308bea,this;}[_0x4296b1(0x1c5)](_0x4df6c0){const _0x15c4fc=_0x4296b1;if(!this[_0x15c4fc(0x177)]['stroke'])this['shapeData'][_0x15c4fc(0x1de)]={};return this['shapeData'][_0x15c4fc(0x1de)][_0x15c4fc(0x192)]=_0x4df6c0,this;}[_0x4296b1(0x1bf)](_0x508c3f){const _0x1e8420=_0x4296b1;if(!this[_0x1e8420(0x177)][_0x1e8420(0x1de)])this[_0x1e8420(0x177)][_0x1e8420(0x1de)]={};return this[_0x1e8420(0x177)][_0x1e8420(0x1de)][_0x1e8420(0x1aa)]=_0x508c3f,this;}[_0x4296b1(0x1b5)](_0x1af8ef){const _0x1bfd1f=_0x4296b1;if(!this[_0x1bfd1f(0x177)][_0x1bfd1f(0x1de)])this[_0x1bfd1f(0x177)][_0x1bfd1f(0x1de)]={};return this[_0x1bfd1f(0x177)]['stroke']['capType']=_0x1af8ef,this;}[_0x4296b1(0x1d0)](_0x5d22d1){const _0xe8716b=_0x4296b1;if(!this[_0xe8716b(0x177)][_0xe8716b(0x1de)])this[_0xe8716b(0x177)]['stroke']={};return this[_0xe8716b(0x177)][_0xe8716b(0x1de)][_0xe8716b(0x1e2)]=_0x5d22d1,this;}[_0x4296b1(0x1cf)](_0x1fc1e4){const _0x36f9b3=_0x4296b1;if(!this[_0x36f9b3(0x177)]['stroke'])this[_0x36f9b3(0x177)][_0x36f9b3(0x1de)]={};return this[_0x36f9b3(0x177)][_0x36f9b3(0x1de)]['lineStrokeType']=_0x1fc1e4,this;}[_0x4296b1(0x1e0)](_0x45ea76){const _0xba6e4d=_0x4296b1;return this[_0xba6e4d(0x1bc)]=_0x45ea76,this;}[_0x4296b1(0x1d6)](_0x4987e2){const _0x58758c=_0x4296b1;return this[_0x58758c(0x18e)]=_0x4987e2,this;}['isLineShape'](){const _0xcc2e99=_0x4296b1,_0x295e09=this['_injector'][_0xcc2e99(0x1ad)](SheetsShapeService)[_0xcc2e99(0x197)](this[_0xcc2e99(0x1ea)],this[_0xcc2e99(0x170)],this[_0xcc2e99(0x1d5)]);if(_0x295e09)return isConnectorShape(_0x295e09[_0xcc2e99(0x1e9)]());if(this[_0xcc2e99(0x1e1)])return isConnectorShape(this[_0xcc2e99(0x1e1)]);return![];}[_0x4296b1(0x16e)](){const _0xd83d62=_0x4296b1,_0x2ed5f7=this['_injector']['get'](SheetsShapeService)[_0xd83d62(0x197)](this['unitId'],this[_0xd83d62(0x170)],this[_0xd83d62(0x1d5)]);if(!_0x2ed5f7)return[];const _0x441a09=this[_0xd83d62(0x17a)][_0xd83d62(0x1ad)](IDrawingManagerService)[_0xd83d62(0x1d7)]({'unitId':this['unitId'],'subUnitId':this[_0xd83d62(0x170)],'drawingId':this[_0xd83d62(0x1d5)]});if(!(_0x441a09===null||_0x441a09===void 0x0?void 0x0:_0x441a09['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x441a09[_0xd83d62(0x1b6)];return _0x2ed5f7['updateContext']({'width':width,'height':height}),_0x2ed5f7[_0xd83d62(0x17b)]();}[_0x4296b1(0x1ca)](){const _0x4a736a=_0x4296b1,_0x58a463=this[_0x4a736a(0x17a)][_0x4a736a(0x1ad)](SheetsShapeService)[_0x4a736a(0x197)](this[_0x4a736a(0x1ea)],this[_0x4a736a(0x170)],this[_0x4a736a(0x1d5)]);if(!_0x58a463)return[];const _0x310927=this[_0x4a736a(0x17a)][_0x4a736a(0x1ad)](IDrawingManagerService)[_0x4a736a(0x1d7)]({'unitId':this['unitId'],'subUnitId':this[_0x4a736a(0x170)],'drawingId':this['drawId']});if(!(_0x310927===null||_0x310927===void 0x0?void 0x0:_0x310927[_0x4a736a(0x1b6)]))return[];const {width:width=0x0,height:height=0x0}=_0x310927['transform'];return _0x58a463[_0x4a736a(0x17f)]({'width':width,'height':height}),_0x58a463[_0x4a736a(0x1e8)]();}[_0x4296b1(0x1bb)](){const _0xc19b01=_0x4296b1,_0x227083=this[_0xc19b01(0x17a)]['get'](SheetsShapeService)[_0xc19b01(0x197)](this['unitId'],this['subUnitId'],this[_0xc19b01(0x1d5)]);if(!_0x227083)return[];if(!isConnectorShape(_0x227083[_0xc19b01(0x1e9)]()))return[];const _0x23795a=this[_0xc19b01(0x17a)][_0xc19b01(0x1ad)](IDrawingManagerService)[_0xc19b01(0x1d7)]({'unitId':this[_0xc19b01(0x1ea)],'subUnitId':this[_0xc19b01(0x170)],'drawingId':this['drawId']});if(!(_0x23795a===null||_0x23795a===void 0x0?void 0x0:_0x23795a[_0xc19b01(0x1b6)]))return[];const {width:width=0x0,height:height=0x0}=_0x23795a[_0xc19b01(0x1b6)];return _0x227083[_0xc19b01(0x17f)]({'width':width,'height':height}),_0x227083[_0xc19b01(0x1bb)]();}[_0x4296b1(0x1e7)](){const _0x589962=_0x4296b1;var _0x1a2caf;const _0x4239ee=this['_injector'][_0x589962(0x1ad)](SheetsShapeService)[_0x589962(0x197)](this['unitId'],this['subUnitId'],this[_0x589962(0x1d5)]);if(!_0x4239ee)return null;return(_0x1a2caf=_0x4239ee[_0x589962(0x1e7)]())!==null&&_0x1a2caf!==void 0x0?_0x1a2caf:null;}[_0x4296b1(0x1af)](){const _0x45bb25=_0x4296b1;var _0x207fbd;const _0xe1c07f=this[_0x45bb25(0x17a)][_0x45bb25(0x1ad)](SheetsShapeService)[_0x45bb25(0x197)](this[_0x45bb25(0x1ea)],this['subUnitId'],this[_0x45bb25(0x1d5)]);if(!_0xe1c07f)return null;return(_0x207fbd=_0xe1c07f['getEndConnectInfo']())!==null&&_0x207fbd!==void 0x0?_0x207fbd:null;}['build'](){const _0x5ddd54=_0x4296b1;var _0x30e3a6,_0x1cedc9;if(!this[_0x5ddd54(0x1e1)])throw new Error(_0x5ddd54(0x1ec));if(this['x']===0x0||this['y']===0x0){const _0xc90448=this[_0x5ddd54(0x17a)][_0x5ddd54(0x1ad)](SheetSkeletonService)[_0x5ddd54(0x1b3)](this[_0x5ddd54(0x1ea)],this[_0x5ddd54(0x170)]);if(!_0xc90448)throw new Error(_0x5ddd54(0x1b1)+this['unitId']+_0x5ddd54(0x17e)+this[_0x5ddd54(0x170)]+_0x5ddd54(0x1da));const {transform:_0x21cf9d}=convertPositionCellToSheetOverGrid(this[_0x5ddd54(0x1ea)],this[_0x5ddd54(0x170)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0xc90448);this['x']=this['x']>0x0?this['x']:_0x21cf9d[_0x5ddd54(0x19d)],this['y']=this['y']>0x0?this['y']:_0x21cf9d['top'];}return this[_0x5ddd54(0x1bc)]=(_0x30e3a6=this[_0x5ddd54(0x1bc)])!==null&&_0x30e3a6!==void 0x0?_0x30e3a6:DEFAULT_SHAPE_WIDTH,this[_0x5ddd54(0x18e)]=(_0x1cedc9=this[_0x5ddd54(0x18e)])!==null&&_0x1cedc9!==void 0x0?_0x1cedc9:DEFAULT_SHAPE_HEIGHT,{'unitId':this[_0x5ddd54(0x1ea)],'subUnitId':this['subUnitId'],'shapeId':this['drawId'],'shapeType':this['shapeType'],'shapeData':Object[_0x5ddd54(0x1b7)](this[_0x5ddd54(0x177)])[_0x5ddd54(0x1a5)]>0x0?this[_0x5ddd54(0x177)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this['height']};}[_0x4296b1(0x16d)](){return this['drawId'];}[_0x4296b1(0x1e9)](){const _0xb9b10d=_0x4296b1;return this[_0xb9b10d(0x1e1)];}[_0x4296b1(0x1df)](){const _0x380fff=_0x4296b1;return this[_0x380fff(0x177)];}[_0x4296b1(0x199)](){return{'x':this['x'],'y':this['y']};}[_0x4296b1(0x1a2)](){const _0x4b024c=_0x4296b1;return{'width':this[_0x4b024c(0x1bc)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0x545d83,_0x2e3df6,_0x3437e8,_0x3b9d35){const _0x1dfb4e=_0x4296b1;super(_0x545d83,_0x2e3df6,_0x3437e8,_0x3b9d35),_defineProperty(this,_0x1dfb4e(0x177),{});}['setShapeType'](_0x38dd2d){const _0x302968=_0x4296b1;if(!isConnectorShape(_0x38dd2d))throw new Error(_0x302968(0x1b2)+_0x38dd2d+_0x302968(0x1a9));return super[_0x302968(0x1dd)](_0x38dd2d),this;}['setStartArrowType'](_0xd2b8ec){const _0x4f48ba=_0x4296b1;var _0x2df4c5,_0x2f88e9;if(!((_0x2df4c5=this[_0x4f48ba(0x177)])===null||_0x2df4c5===void 0x0?void 0x0:_0x2df4c5['ln']))this[_0x4f48ba(0x177)]['ln']={};if(!((_0x2f88e9=this[_0x4f48ba(0x177)])===null||_0x2f88e9===void 0x0||(_0x2f88e9=_0x2f88e9['ln'])===null||_0x2f88e9===void 0x0?void 0x0:_0x2f88e9[_0x4f48ba(0x1ce)]))this[_0x4f48ba(0x177)]['ln'][_0x4f48ba(0x1ce)]={};return this['shapeData']['ln'][_0x4f48ba(0x1ce)]['type']=_0xd2b8ec,this;}[_0x4296b1(0x19b)](_0x5302af){const _0x4053a6=_0x4296b1;var _0x3588cf,_0x590902;if(!((_0x3588cf=this[_0x4053a6(0x177)])===null||_0x3588cf===void 0x0?void 0x0:_0x3588cf['ln']))this[_0x4053a6(0x177)]['ln']={};if(!((_0x590902=this['shapeData'])===null||_0x590902===void 0x0||(_0x590902=_0x590902['ln'])===null||_0x590902===void 0x0?void 0x0:_0x590902['endArrow']))this[_0x4053a6(0x177)]['ln'][_0x4053a6(0x172)]={};return this[_0x4053a6(0x177)]['ln'][_0x4053a6(0x172)][_0x4053a6(0x173)]=_0x5302af,this;}[_0x4296b1(0x17d)](_0x2e5bd4){const _0x5ec447=_0x4296b1;var _0xda075e,_0x3a1207;if(!((_0xda075e=this[_0x5ec447(0x177)])===null||_0xda075e===void 0x0?void 0x0:_0xda075e['ln']))this['shapeData']['ln']={};if(!((_0x3a1207=this[_0x5ec447(0x177)])===null||_0x3a1207===void 0x0||(_0x3a1207=_0x3a1207['ln'])===null||_0x3a1207===void 0x0?void 0x0:_0x3a1207[_0x5ec447(0x1ce)]))this[_0x5ec447(0x177)]['ln'][_0x5ec447(0x1ce)]={};return this['shapeData']['ln'][_0x5ec447(0x1ce)][_0x5ec447(0x19a)]=_0x2e5bd4,this;}['setEndArrowSize'](_0x17dd49){const _0x479f1c=_0x4296b1;var _0x444d95,_0x4b808d;if(!((_0x444d95=this[_0x479f1c(0x177)])===null||_0x444d95===void 0x0?void 0x0:_0x444d95['ln']))this[_0x479f1c(0x177)]['ln']={};if(!((_0x4b808d=this[_0x479f1c(0x177)])===null||_0x4b808d===void 0x0||(_0x4b808d=_0x4b808d['ln'])===null||_0x4b808d===void 0x0?void 0x0:_0x4b808d['endArrow']))this[_0x479f1c(0x177)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x479f1c(0x172)][_0x479f1c(0x19a)]=_0x17dd49,this;}[_0x4296b1(0x1d2)](){return super['build']();}[_0x4296b1(0x1af)](){var _0x510935;return((_0x510935=this['shapeData'])===null||_0x510935===void 0x0||(_0x510935=_0x510935['relation'])===null||_0x510935===void 0x0?void 0x0:_0x510935['to'])||null;}[_0x4296b1(0x1e7)](){const _0x123950=_0x4296b1;var _0x43b1ba;return((_0x43b1ba=this[_0x123950(0x177)])===null||_0x43b1ba===void 0x0||(_0x43b1ba=_0x43b1ba['relation'])===null||_0x43b1ba===void 0x0?void 0x0:_0x43b1ba[_0x123950(0x1c0)])||null;}};function computeConnectionPointInfo(_0x3aabea,_0x5ee288,_0x51e515,_0x7e8a40,_0x380c1d,_0x122970){const _0x3184ab=_0x4296b1,_0x43671c=_0x380c1d[_0x3184ab(0x197)](_0x3aabea,_0x5ee288,_0x51e515);if(!_0x43671c)return null;const _0x5f4c3=_0x122970[_0x3184ab(0x1d7)]({'unitId':_0x3aabea,'subUnitId':_0x5ee288,'drawingId':_0x51e515});if(!(_0x5f4c3===null||_0x5f4c3===void 0x0?void 0x0:_0x5f4c3[_0x3184ab(0x1b6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x13eca9}=_0x5f4c3[_0x3184ab(0x1b6)];_0x43671c[_0x3184ab(0x17f)]({'width':width,'height':height});const _0xcef540=_0x43671c[_0x3184ab(0x17b)]()[_0x3184ab(0x171)](_0x641d2d=>_0x641d2d['index']===_0x7e8a40);if(!_0xcef540)return null;let _0x29dd94=flipX?width-_0xcef540['x']:_0xcef540['x'],_0x48d2a7=flipY?height-_0xcef540['y']:_0xcef540['y'];if(_0x13eca9&&_0x13eca9!==0x0){const _0x2a2f29=_0x13eca9*Math['PI']/0xb4,_0x3e3f40=Math[_0x3184ab(0x1db)](_0x2a2f29),_0x2f288e=Math[_0x3184ab(0x194)](_0x2a2f29),_0x288407=width/0x2,_0x20f3af=height/0x2,_0x536eeb=_0x29dd94-_0x288407,_0x1bdb50=_0x48d2a7-_0x20f3af;_0x29dd94=_0x288407+_0x536eeb*_0x3e3f40-_0x1bdb50*_0x2f288e,_0x48d2a7=_0x20f3af+_0x536eeb*_0x2f288e+_0x1bdb50*_0x3e3f40;}_0x29dd94+=left,_0x48d2a7+=top;let _0x498542=_0xcef540[_0x3184ab(0x18b)]/0xea60;if(flipX)_0x498542=0xb4-_0x498542;if(flipY)_0x498542=-_0x498542;_0x498542+=_0x13eca9||0x0,_0x498542=(_0x498542%0x168+0x168)%0x168;const _0x7df8cb=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x13eca9||0x0);return{'point':{'x':_0x29dd94,'y':_0x48d2a7},'angle':_0x498542,'bounds':_0x7df8cb};}function calculateFreeEndpointAngle(_0x382f26,_0x49e5df){const _0x45635b=_0x4296b1,_0x32d072=_0x49e5df['x']-_0x382f26['x'],_0x30b5e5=_0x49e5df['y']-_0x382f26['y'];if(Math[_0x45635b(0x1e5)](_0x32d072)>=Math['abs'](_0x30b5e5))return _0x32d072>=0x0?0xb4:0x0;return _0x30b5e5>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x502745,_0x3f0c48,_0x3651d2,_0x419f03,_0x355d1a,_0x2d3e3b,_0x4b7aa0){const _0x2a71a1=_0x4296b1,_0x27091f=_0x2d3e3b[_0x2a71a1(0x197)](_0x502745,_0x3f0c48,_0x3651d2);if(!_0x27091f)return null;const _0x2098c1=_0x4b7aa0['getDrawingByParam']({'unitId':_0x502745,'subUnitId':_0x3f0c48,'drawingId':_0x3651d2});if(!(_0x2098c1===null||_0x2098c1===void 0x0?void 0x0:_0x2098c1[_0x2a71a1(0x1b6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x2098c1['transform'];_0x27091f[_0x2a71a1(0x17f)]({'width':width,'height':height});const _0x434dee=_0x27091f[_0x2a71a1(0x1bb)]();if(_0x434dee[_0x2a71a1(0x1a5)]<0x2)return null;const _0x1f585a=_0x419f03?_0x434dee[0x0]:_0x434dee[_0x434dee[_0x2a71a1(0x1a5)]-0x1],_0x2db3a1=new ConnectorCoordinateTransform({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x2a71a1(0x1e6)](_0x1f585a);return{'point':_0x2db3a1,'angle':calculateFreeEndpointAngle(_0x355d1a['point'],_0x2db3a1),'bounds':{'left':_0x2db3a1['x'],'top':_0x2db3a1['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends FWorksheet{async[_0x4296b1(0x175)](_0x59fdfd){const _0x2e0bcb=_0x4296b1,{unitId:_0x5a542e,subUnitId:_0x127d02,shapeId:_0x31b02a,shapeType:_0x5537b9,shapeData:_0x11494a,x:_0xbe9019,y:_0x570793,width:_0x502b7a,height:_0x29d44b}=_0x59fdfd;return this['_commandService'][_0x2e0bcb(0x178)](InsertShapeCommand['id'],{'unitId':_0x5a542e,'subUnitId':_0x127d02,'shapeId':_0x31b02a,'shapeType':_0x5537b9,'shapeData':_0x11494a,'position':{'x':_0xbe9019,'y':_0x570793},'width':_0x502b7a,'height':_0x29d44b});}async[_0x4296b1(0x1ef)](_0x415ccd){const _0x408cb4=_0x4296b1,{unitId:_0x39eab7,subUnitId:_0x59024b,shapeId:_0x1c6674,shapeType:_0x35f437,shapeData:_0x36b1be,x:_0x253a1a,y:_0x28b9ce,width:_0x56e549,height:_0x13b20a}=_0x415ccd;return this[_0x408cb4(0x1c4)][_0x408cb4(0x178)](SetShapeDrawingDataCommand['id'],{'unitId':_0x39eab7,'subUnitId':_0x59024b,'shapeId':_0x1c6674,'shapeType':_0x35f437,'shapeData':_0x36b1be,'position':{'x':_0x253a1a,'y':_0x28b9ce},'width':_0x56e549,'height':_0x13b20a});}[_0x4296b1(0x1b9)](_0x3e1d0b){const _0xfdf40=_0x4296b1,_0x2c4d69=this[_0xfdf40(0x193)]()[_0xfdf40(0x19f)](),_0x4bda6b=this[_0xfdf40(0x1b8)]();if(_0x3e1d0b){const _0x187976=new FShape(_0x2c4d69,_0x4bda6b,_0x3e1d0b[_0xfdf40(0x1d5)],this[_0xfdf40(0x17a)]);return this['_preloadShapeProperties'](_0x187976,_0x2c4d69,_0x4bda6b,_0x3e1d0b['drawId']),_0x187976;}return new FShape(_0x2c4d69,_0x4bda6b,generateRandomId(),this[_0xfdf40(0x17a)]);}[_0x4296b1(0x18f)](_0x2bf1f3){const _0x2d9923=_0x4296b1,_0x185826=this[_0x2d9923(0x193)]()[_0x2d9923(0x19f)](),_0x51c78f=this[_0x2d9923(0x1b8)]();if(_0x2bf1f3){const _0x4c5b91=new FConnectorShape(_0x185826,_0x51c78f,_0x2bf1f3[_0x2d9923(0x1d5)],this[_0x2d9923(0x17a)]);return this[_0x2d9923(0x1c1)](_0x4c5b91,_0x185826,_0x51c78f,_0x2bf1f3[_0x2d9923(0x1d5)]),_0x4c5b91;}return new FConnectorShape(_0x185826,_0x51c78f,generateRandomId(),this['_injector']);}['getShapes'](){const _0x27b81a=_0x4296b1,_0x183efd=this[_0x27b81a(0x17a)]['get'](ISheetDrawingService),_0x1b6ff2=this[_0x27b81a(0x193)]()[_0x27b81a(0x19f)](),_0x58579e=this[_0x27b81a(0x1b8)](),_0x4e9109=_0x183efd['getDrawingData'](_0x1b6ff2,_0x58579e);if(!_0x4e9109)return[];const _0x2bdffc=[];for(const [_0x7993b8,_0x4a8792]of Object[_0x27b81a(0x1bd)](_0x4e9109))if(_0x4a8792&&_0x4a8792['drawingType']===DrawingTypeEnum[_0x27b81a(0x18a)]){const _0x15d2c1=new FShape(_0x1b6ff2,_0x58579e,_0x7993b8,this[_0x27b81a(0x17a)]);this[_0x27b81a(0x1c1)](_0x15d2c1,_0x1b6ff2,_0x58579e,_0x7993b8),_0x2bdffc['push'](_0x15d2c1);}return _0x2bdffc;}[_0x4296b1(0x174)](_0x140c0e){const _0x590d17=_0x4296b1,{unitId:_0x5398c5,subUnitId:_0x2c1a0a,drawId:_0x39da9c}=_0x140c0e;return this[_0x590d17(0x1c4)][_0x590d17(0x178)](RemoveSheetDrawingCommand['id'],{'unitId':_0x5398c5,'drawings':[{'unitId':_0x5398c5,'subUnitId':_0x2c1a0a,'drawingId':_0x39da9c,'drawingType':DrawingTypeEnum['DRAWING_SHAPE']}]});}async[_0x4296b1(0x1e4)](_0x149288){const _0x31e303=_0x4296b1,{connector:_0xb6bcee,startTarget:_0x151dbe,endTarget:_0x3c4595}=_0x149288;if(!_0x151dbe&&!_0x3c4595)return![];const _0x1b26e7=this[_0x31e303(0x193)]()[_0x31e303(0x19f)](),_0xbb405f=this[_0x31e303(0x1b8)](),_0x2694c0=this['_injector']['get'](SheetsShapeService),_0x1f1d63=this[_0x31e303(0x17a)][_0x31e303(0x1ad)](IDrawingManagerService),_0xb504c=_0x2694c0['getShapeModel'](_0x1b26e7,_0xbb405f,_0xb6bcee[_0x31e303(0x1d5)]);if(!_0xb504c)return![];const _0x4a4471=_0xb504c[_0x31e303(0x1e9)](),_0x1efcde=_0xb504c[_0x31e303(0x1cb)](),_0x37ac88={};for(const _0x36ae1b of _0xb504c[_0x31e303(0x1c7)]()){const _0x3fe095=_0xb504c[_0x31e303(0x1d1)](_0x36ae1b);if(_0x3fe095!==void 0x0)_0x37ac88[_0x36ae1b]=_0x3fe095;}const {startInfo:_0x29ec96,endInfo:_0x28b1ea}=this[_0x31e303(0x16f)](_0x1b26e7,_0xbb405f,_0xb6bcee,_0xb504c,_0x151dbe,_0x3c4595,_0x2694c0,_0x1f1d63,_0x1efcde);if(!_0x29ec96||!_0x28b1ea)return![];const _0x42224d=computeConnectorRouteLayout(routeConnectorLineShape(_0x29ec96,_0x28b1ea,_0x4a4471),_0x4a4471),_0x48d06d={};if(_0x151dbe)_0x48d06d[_0x31e303(0x1c0)]={'shapeId':_0x151dbe[_0x31e303(0x1a3)][_0x31e303(0x1d5)],'cxnIndex':_0x151dbe['connectionSiteIndex']};else{if(_0x1efcde===null||_0x1efcde===void 0x0?void 0x0:_0x1efcde[_0x31e303(0x1c0)])_0x48d06d['from']=_0x1efcde[_0x31e303(0x1c0)];}if(_0x3c4595)_0x48d06d['to']={'shapeId':_0x3c4595[_0x31e303(0x1a3)]['drawId'],'cxnIndex':_0x3c4595['connectionSiteIndex']};else{if(_0x1efcde===null||_0x1efcde===void 0x0?void 0x0:_0x1efcde['to'])_0x48d06d['to']=_0x1efcde['to'];}return this['_commandService']['executeCommand'](UpdateConnectorRelationCommand['id'],{'unitId':_0x1b26e7,'subUnitId':_0xbb405f,'connectorShapeId':_0xb6bcee[_0x31e303(0x1d5)],'width':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1bc)],'height':_0x42224d['worldRect'][_0x31e303(0x18e)],'left':_0x42224d[_0x31e303(0x182)][_0x31e303(0x19d)],'top':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1d3)],'flipX':_0x42224d['worldRect'][_0x31e303(0x196)]||![],'flipY':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1a7)]||![],'oldAdjustValues':_0x37ac88,'newAdjustValues':_0x42224d[_0x31e303(0x19c)],'newLineType':_0x42224d['lineType'],'oldLineType':_0x4a4471,'rotation':_0x42224d[_0x31e303(0x1c3)],'oldRelation':_0x1efcde,'newRelation':_0x48d06d});}[_0x4296b1(0x1c1)](_0x334790,_0x767677,_0x1f7997,_0x68ffac){const _0xd7caa5=_0x4296b1,_0x59a1bf=this[_0xd7caa5(0x17a)][_0xd7caa5(0x1ad)](IDrawingManagerService)[_0xd7caa5(0x1d7)]({'unitId':_0x767677,'subUnitId':_0x1f7997,'drawingId':_0x68ffac});if(_0x59a1bf===null||_0x59a1bf===void 0x0?void 0x0:_0x59a1bf[_0xd7caa5(0x1b6)]){var _0x4b61b8,_0x112f1e,_0x3fc427,_0x10ba6f;_0x334790['x']=(_0x4b61b8=_0x59a1bf[_0xd7caa5(0x1b6)]['left'])!==null&&_0x4b61b8!==void 0x0?_0x4b61b8:0x0,_0x334790['y']=(_0x112f1e=_0x59a1bf[_0xd7caa5(0x1b6)][_0xd7caa5(0x1d3)])!==null&&_0x112f1e!==void 0x0?_0x112f1e:0x0,_0x334790[_0xd7caa5(0x1bc)]=(_0x3fc427=_0x59a1bf[_0xd7caa5(0x1b6)]['width'])!==null&&_0x3fc427!==void 0x0?_0x3fc427:_0x334790[_0xd7caa5(0x1bc)],_0x334790['height']=(_0x10ba6f=_0x59a1bf[_0xd7caa5(0x1b6)][_0xd7caa5(0x18e)])!==null&&_0x10ba6f!==void 0x0?_0x10ba6f:_0x334790[_0xd7caa5(0x18e)];}const _0x261fed=this['_injector'][_0xd7caa5(0x1ad)](SheetsShapeService)[_0xd7caa5(0x197)](_0x767677,_0x1f7997,_0x68ffac);if(_0x261fed){_0x334790[_0xd7caa5(0x1e1)]=_0x261fed['getShapeType']();const _0x1ad07e=_0x261fed[_0xd7caa5(0x1df)]();if(_0x1ad07e)_0x334790[_0xd7caa5(0x177)]=JSON[_0xd7caa5(0x189)](JSON[_0xd7caa5(0x1a6)](_0x1ad07e));}}[_0x4296b1(0x16f)](_0x43c675,_0x11c40f,_0x18bc0f,_0x1134ce,_0x12a4d8,_0x44bb2b,_0x537a15,_0x4a3154,_0x920042){const _0x2f10ed=_0x4296b1;let _0x4c6609=null,_0x446331=null;if(_0x12a4d8)_0x4c6609=computeConnectionPointInfo(_0x43c675,_0x11c40f,_0x12a4d8['shape']['drawId'],_0x12a4d8['connectionSiteIndex'],_0x537a15,_0x4a3154);if(_0x44bb2b)_0x446331=computeConnectionPointInfo(_0x43c675,_0x11c40f,_0x44bb2b[_0x2f10ed(0x1a3)]['drawId'],_0x44bb2b[_0x2f10ed(0x1eb)],_0x537a15,_0x4a3154);if(!_0x4c6609)_0x4c6609=this[_0x2f10ed(0x18c)](_0x43c675,_0x11c40f,_0x18bc0f['drawId'],!![],_0x446331,_0x920042===null||_0x920042===void 0x0?void 0x0:_0x920042['from'],_0x537a15,_0x4a3154);if(!_0x446331)_0x446331=this['_resolveExistingOrFreeEndpoint'](_0x43c675,_0x11c40f,_0x18bc0f[_0x2f10ed(0x1d5)],![],_0x4c6609,_0x920042===null||_0x920042===void 0x0?void 0x0:_0x920042['to'],_0x537a15,_0x4a3154);return{'startInfo':_0x4c6609,'endInfo':_0x446331};}[_0x4296b1(0x18c)](_0x335f37,_0x2905b5,_0x315790,_0x566a80,_0x2a802b,_0x5445e4,_0x2398c7,_0x22811f){const _0x2788c6=_0x4296b1;if(_0x5445e4){const _0x1dc872=computeConnectionPointInfo(_0x335f37,_0x2905b5,_0x5445e4[_0x2788c6(0x1ac)],_0x5445e4['cxnIndex'],_0x2398c7,_0x22811f);if(_0x1dc872)return _0x1dc872;}if(!_0x2a802b)return null;return computeFreeEndpointInfo(_0x335f37,_0x2905b5,_0x315790,_0x566a80,_0x2a802b,_0x2398c7,_0x22811f);}};FWorksheet[_0x4296b1(0x181)](FWorksheetShapeMixin);export{FConnectorShape,FShape};
1
+ const _0x245d3a=_0x1b79;(function(_0x13fb2b,_0xa99a92){const _0x4947ec=_0x1b79,_0x1da5fa=_0x13fb2b();while(!![]){try{const _0x14522e=parseInt(_0x4947ec(0x7b))/0x1+parseInt(_0x4947ec(0xa6))/0x2+-parseInt(_0x4947ec(0xb2))/0x3+-parseInt(_0x4947ec(0x97))/0x4+-parseInt(_0x4947ec(0xd8))/0x5+parseInt(_0x4947ec(0x8a))/0x6*(parseInt(_0x4947ec(0xa5))/0x7)+parseInt(_0x4947ec(0xca))/0x8*(parseInt(_0x4947ec(0x85))/0x9);if(_0x14522e===_0xa99a92)break;else _0x1da5fa['push'](_0x1da5fa['shift']());}catch(_0x268c45){_0x1da5fa['push'](_0x1da5fa['shift']());}}}(_0x2100,0xab119));import{ConnectorCoordinateTransform as _0x34439f,ShapeArrowSizeEnum as _0x54e0e1,ShapeArrowTypeEnum as _0x335d65,ShapeFillEnum as _0x3e14b8,ShapeGradientTypeEnum as _0x245464,ShapeLineCapEnum as _0xadc783,ShapeLineDashEnum as _0x2e2237,ShapeLineJoinEnum as _0x216ef4,ShapeLineTypeEnum as _0x39a7be,ShapeTypeEnum as _0x91019f,computeConnectorRouteLayout as _0x5129d0,getBasicShapeRotateBound as _0x423cee,isConnectorShape as _0x58493c,routeConnectorLineShape as _0x311777}from'@univerjs-pro/engine-shape';import{FEnum as _0x2fbe40}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT as _0x288aed,DEFAULT_SHAPE_WIDTH as _0x5857c2,InsertShapeCommand as _0x48442c,SetShapeDrawingDataCommand as _0xbd1de4,SheetsShapeService as _0x458533,UpdateConnectorRelationCommand as _0x10f71e}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum as _0x215d4d,generateRandomId as _0x58c69f}from'@univerjs/core';import{IDrawingManagerService as _0x155517}from'@univerjs/drawing';import{SheetSkeletonService as _0x55eb89,convertPositionCellToSheetOverGrid as _0x15097a}from'@univerjs/sheets';import{ISheetDrawingService as _0x428383,RemoveSheetDrawingCommand as _0x55e1a4}from'@univerjs/sheets-drawing';import{FWorksheet as _0x4ae227}from'@univerjs/sheets/facade';function _0x2100(){const _0x5b3436=['adjustValues','subUnitId','worldRect','sin','lineStrokeType','NoFill','ShapeFillEnum','connectShapes','stroke','getAdjustNames','size','relation','setStartArrowSize','gradientType','shapeData','color','call','abs','getConnectorLinePoints','setHeight','40fNpaeO','updateContext','DRAWING_SHAPE','lineJoinType','ShapeGradientTypeEnum','setShapeSolidFill','setStartArrowType','default','getDrawingPoints','getPosition','getSize','setShapeType','setEndArrowType','length','4214995AHXNPg','parse','shapeId','drawingType','get','top','keys','getShapes','setShapeGradientFill','setWidth','getConnectionSiteList','getShapeType','setStrokeLineJoinType','executeCommand','height','symbol','ang','getUnitId','function','entries','extend','flipY','ensureSkeleton','getAdjustPoints','startArrow','updateShape','_commandService','setStrokeLineCapType','Skeleton\x20for\x20unitId\x20','_preloadShapeProperties','flipX','unitId','getDrawingByParam','_resolveExistingOrFreeEndpoint','getDrawingData','localToWorld','112359HNUTcW','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','iterator','getEndConnectInfo','setEndArrowSize','getShapeRelation','index','\x20not\x20found','rotation','5100453LdBTvk','build','defineProperty','getShapeData','cxnIndex','139674zanUHq','from','left','getShapeModel','object','getStartConnectInfo','opacity','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','width','ShapeLineDashEnum','constructor','find','ShapeTypeEnum','2977220CiMNMz','_injector','isLineShape','stringify','ShapeArrowSizeEnum','newShape','_resolveEndpoints','fillType','connectionSiteIndex','string','getShapeId','drawId','getWorkbook','GradientFill','91xRTOJw','297650OgmbIm','SolidFill','transform','getSheetId','\x20and\x20subUnitId\x20','getAdjustValueByName','ShapeLineCapEnum','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','removeShape','shapeType','endArrow','shape','3328185vzRnmg','setStrokeLineType','fill','prototype'];_0x2100=function(){return _0x5b3436;};return _0x2100();}function _0x1b79(_0x3bb631,_0x3aa0e4){_0x3bb631=_0x3bb631-0x69;const _0x21003d=_0x2100();let _0x1b790b=_0x21003d[_0x3bb631];return _0x1b790b;}var k=class extends _0x2fbe40{get[_0x245d3a(0x96)](){return _0x91019f;}get[_0x245d3a(0xbc)](){return _0x3e14b8;}get[_0x245d3a(0xce)](){return _0x245464;}get['ShapeLineTypeEnum'](){return _0x39a7be;}get[_0x245d3a(0x93)](){return _0x2e2237;}get[_0x245d3a(0xac)](){return _0xadc783;}get['ShapeLineJoinEnum'](){return _0x216ef4;}get['ShapeArrowTypeEnum'](){return _0x335d65;}get[_0x245d3a(0x9b)](){return _0x54e0e1;}};_0x2fbe40[_0x245d3a(0x6b)](k);function A(_0x37bfc3){'@babel/helpers - typeof';const _0x4cdfb4=_0x245d3a;return A=typeof Symbol==_0x4cdfb4(0x69)&&typeof Symbol[_0x4cdfb4(0x7e)]==_0x4cdfb4(0xe7)?function(_0x18d3af){return typeof _0x18d3af;}:function(_0x695a3){const _0x2f19ac=_0x4cdfb4;return _0x695a3&&typeof Symbol==_0x2f19ac(0x69)&&_0x695a3[_0x2f19ac(0x94)]===Symbol&&_0x695a3!==Symbol[_0x2f19ac(0xb5)]?_0x2f19ac(0xe7):typeof _0x695a3;},A(_0x37bfc3);}function j(_0x2154af,_0x2e7aca){const _0x2b1046=_0x245d3a;if(A(_0x2154af)!=_0x2b1046(0x8e)||!_0x2154af)return _0x2154af;var _0x270bb0=_0x2154af[Symbol['toPrimitive']];if(_0x270bb0!==void 0x0){var _0x184d9a=_0x270bb0[_0x2b1046(0xc6)](_0x2154af,_0x2e7aca||_0x2b1046(0xd1));if(A(_0x184d9a)!='object')return _0x184d9a;throw TypeError(_0x2b1046(0x91));}return(_0x2e7aca==='string'?String:Number)(_0x2154af);}function M(_0x237fdb){const _0x395483=_0x245d3a;var _0x215426=j(_0x237fdb,_0x395483(0xa0));return A(_0x215426)==_0x395483(0xe7)?_0x215426:_0x215426+'';}function N(_0x51da70,_0x3d58ae,_0x3d016e){const _0x18de13=_0x245d3a;return(_0x3d58ae=M(_0x3d58ae))in _0x51da70?Object[_0x18de13(0x87)](_0x51da70,_0x3d58ae,{'value':_0x3d016e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x51da70[_0x3d58ae]=_0x3d016e,_0x51da70;}var P=class{constructor(_0x261c9a,_0x5bcfea,_0x1ed22e,_0x50e9a8){const _0x2c19b6=_0x245d3a;N(this,_0x2c19b6(0x76),void 0x0),N(this,_0x2c19b6(0xb7),void 0x0),N(this,'drawId',void 0x0),N(this,'x',0x0),N(this,'y',0x0),N(this,_0x2c19b6(0x92),_0x5857c2),N(this,'height',_0x288aed),N(this,_0x2c19b6(0xaf),void 0x0),N(this,_0x2c19b6(0xc4),{}),N(this,'_injector',void 0x0),this['unitId']=_0x261c9a,this[_0x2c19b6(0xb7)]=_0x5bcfea,this[_0x2c19b6(0xa2)]=_0x1ed22e||_0x58c69f(),this[_0x2c19b6(0x98)]=_0x50e9a8;}['setPosition'](_0x6da34d,_0x3c339a,_0x2aa247,_0x3f0b01){const _0x311946=_0x245d3a;let _0x27ce42=this[_0x311946(0x98)][_0x311946(0xdc)](_0x55eb89)[_0x311946(0x6d)](this[_0x311946(0x76)],this[_0x311946(0xb7)]);if(!_0x27ce42)throw Error(_0x311946(0x73)+this[_0x311946(0x76)]+_0x311946(0xaa)+this['subUnitId']+_0x311946(0x83));let {transform:_0x4183ad}=_0x15097a(this[_0x311946(0x76)],this[_0x311946(0xb7)],{'row':_0x6da34d,'column':_0x3c339a,'rowOffset':_0x2aa247,'columnOffset':_0x3f0b01},0x1,0x1,_0x27ce42);return this['x']=_0x4183ad[_0x311946(0x8c)],this['y']=_0x4183ad[_0x311946(0xdd)],this;}['setAbsolutePosition'](_0x139ec1,_0x3077e0){return this['x']=_0x139ec1,this['y']=_0x3077e0,this;}['setShapeType'](_0x5db06f){const _0x286723=_0x245d3a;return this[_0x286723(0xaf)]=_0x5db06f,this;}[_0x245d3a(0xcf)](_0x2f84b6,_0x3c5ff5){const _0x18b368=_0x245d3a;return this['shapeData']['fill']||(this[_0x18b368(0xc4)]['fill']={}),this[_0x18b368(0xc4)][_0x18b368(0xb4)][_0x18b368(0x9e)]=_0x3e14b8[_0x18b368(0xa7)],_0x2f84b6!==void 0x0&&(this[_0x18b368(0xc4)][_0x18b368(0xb4)][_0x18b368(0xc5)]=_0x2f84b6),_0x3c5ff5!==void 0x0&&(this[_0x18b368(0xc4)][_0x18b368(0xb4)][_0x18b368(0x90)]=_0x3c5ff5),this;}[_0x245d3a(0xe0)](_0x2455f2,_0x3e7a58,_0x1e17f7){const _0xba02a9=_0x245d3a;if(_0x3e7a58===void 0x0||_0x3e7a58[_0xba02a9(0xd7)]===0x0)throw Error(_0xba02a9(0xad));return this[_0xba02a9(0xc4)][_0xba02a9(0xb4)]||(this[_0xba02a9(0xc4)][_0xba02a9(0xb4)]={}),this['shapeData'][_0xba02a9(0xb4)]['gradientStops']=_0x3e7a58,this['shapeData'][_0xba02a9(0xb4)]['fillType']=_0x3e14b8[_0xba02a9(0xa4)],this[_0xba02a9(0xc4)][_0xba02a9(0xb4)][_0xba02a9(0xc3)]=_0x2455f2,_0x1e17f7!==void 0x0&&(this[_0xba02a9(0xc4)][_0xba02a9(0xb4)]['gradientAngle']=_0x1e17f7),this;}['setNoneFill'](){const _0x5d41df=_0x245d3a;return this[_0x5d41df(0xc4)][_0x5d41df(0xb4)]={'fillType':_0x3e14b8[_0x5d41df(0xbb)]},this;}['setStrokeColor'](_0x341d03){const _0x2f07d5=_0x245d3a;return this['shapeData'][_0x2f07d5(0xbe)]||(this[_0x2f07d5(0xc4)][_0x2f07d5(0xbe)]={}),this[_0x2f07d5(0xc4)][_0x2f07d5(0xbe)][_0x2f07d5(0xc5)]=_0x341d03,this;}['setStrokeWidth'](_0x1bb622){const _0x535509=_0x245d3a;return this['shapeData'][_0x535509(0xbe)]||(this[_0x535509(0xc4)]['stroke']={}),this['shapeData'][_0x535509(0xbe)]['width']=_0x1bb622,this;}['setStrokeLineDashType'](_0x2d3f6d){const _0xb960fa=_0x245d3a;return this[_0xb960fa(0xc4)][_0xb960fa(0xbe)]||(this['shapeData'][_0xb960fa(0xbe)]={}),this[_0xb960fa(0xc4)][_0xb960fa(0xbe)]['dashType']=_0x2d3f6d,this;}[_0x245d3a(0xe4)](_0x534f12){const _0x8ddcdd=_0x245d3a;return this[_0x8ddcdd(0xc4)][_0x8ddcdd(0xbe)]||(this[_0x8ddcdd(0xc4)]['stroke']={}),this[_0x8ddcdd(0xc4)][_0x8ddcdd(0xbe)][_0x8ddcdd(0xcd)]=_0x534f12,this;}[_0x245d3a(0x72)](_0x288e8a){const _0x462a84=_0x245d3a;return this['shapeData'][_0x462a84(0xbe)]||(this[_0x462a84(0xc4)][_0x462a84(0xbe)]={}),this[_0x462a84(0xc4)][_0x462a84(0xbe)]['capType']=_0x288e8a,this;}['setStrokeOpacity'](_0x2b07be){const _0x4ca0ab=_0x245d3a;return this[_0x4ca0ab(0xc4)][_0x4ca0ab(0xbe)]||(this[_0x4ca0ab(0xc4)]['stroke']={}),this['shapeData']['stroke']['opacity']=_0x2b07be,this;}[_0x245d3a(0xb3)](_0x23772a){const _0x2cb4e5=_0x245d3a;return this[_0x2cb4e5(0xc4)][_0x2cb4e5(0xbe)]||(this['shapeData'][_0x2cb4e5(0xbe)]={}),this[_0x2cb4e5(0xc4)][_0x2cb4e5(0xbe)][_0x2cb4e5(0xba)]=_0x23772a,this;}[_0x245d3a(0xe1)](_0x586fe3){const _0x5c35b7=_0x245d3a;return this[_0x5c35b7(0x92)]=_0x586fe3,this;}[_0x245d3a(0xc9)](_0x3ac05f){const _0x489d94=_0x245d3a;return this[_0x489d94(0xe6)]=_0x3ac05f,this;}[_0x245d3a(0x99)](){const _0x5a76de=_0x245d3a;let _0x49f428=this[_0x5a76de(0x98)][_0x5a76de(0xdc)](_0x458533)[_0x5a76de(0x8d)](this[_0x5a76de(0x76)],this[_0x5a76de(0xb7)],this[_0x5a76de(0xa2)]);return _0x49f428?_0x58493c(_0x49f428[_0x5a76de(0xe3)]()):this[_0x5a76de(0xaf)]?_0x58493c(this[_0x5a76de(0xaf)]):!0x1;}['getConnectionSites'](){const _0xf86f4c=_0x245d3a;let _0xda4bfa=this[_0xf86f4c(0x98)]['get'](_0x458533)[_0xf86f4c(0x8d)](this[_0xf86f4c(0x76)],this[_0xf86f4c(0xb7)],this[_0xf86f4c(0xa2)]);if(!_0xda4bfa)return[];let _0x39ca50=this[_0xf86f4c(0x98)][_0xf86f4c(0xdc)](_0x155517)['getDrawingByParam']({'unitId':this[_0xf86f4c(0x76)],'subUnitId':this[_0xf86f4c(0xb7)],'drawingId':this[_0xf86f4c(0xa2)]});if(!(_0x39ca50!=null&&_0x39ca50[_0xf86f4c(0xa8)]))return[];let {width:_0x1e7425=0x0,height:_0x125fd7=0x0}=_0x39ca50['transform'];return _0xda4bfa[_0xf86f4c(0xcb)]({'width':_0x1e7425,'height':_0x125fd7}),_0xda4bfa[_0xf86f4c(0xe2)]();}[_0x245d3a(0x6e)](){const _0x148037=_0x245d3a;let _0x348b2e=this[_0x148037(0x98)][_0x148037(0xdc)](_0x458533)[_0x148037(0x8d)](this[_0x148037(0x76)],this[_0x148037(0xb7)],this[_0x148037(0xa2)]);if(!_0x348b2e)return[];let _0x5cf699=this[_0x148037(0x98)]['get'](_0x155517)['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x148037(0xb7)],'drawingId':this[_0x148037(0xa2)]});if(!(_0x5cf699!=null&&_0x5cf699[_0x148037(0xa8)]))return[];let {width:_0x247350=0x0,height:_0x20a795=0x0}=_0x5cf699[_0x148037(0xa8)];return _0x348b2e[_0x148037(0xcb)]({'width':_0x247350,'height':_0x20a795}),_0x348b2e[_0x148037(0xd2)]();}[_0x245d3a(0xc8)](){const _0x12007e=_0x245d3a;let _0x46d169=this[_0x12007e(0x98)][_0x12007e(0xdc)](_0x458533)[_0x12007e(0x8d)](this[_0x12007e(0x76)],this[_0x12007e(0xb7)],this[_0x12007e(0xa2)]);if(!_0x46d169||!_0x58493c(_0x46d169[_0x12007e(0xe3)]()))return[];let _0x290742=this[_0x12007e(0x98)][_0x12007e(0xdc)](_0x155517)[_0x12007e(0x77)]({'unitId':this['unitId'],'subUnitId':this[_0x12007e(0xb7)],'drawingId':this['drawId']});if(!(_0x290742!=null&&_0x290742[_0x12007e(0xa8)]))return[];let {width:_0x2b7002=0x0,height:_0x547e28=0x0}=_0x290742[_0x12007e(0xa8)];return _0x46d169[_0x12007e(0xcb)]({'width':_0x2b7002,'height':_0x547e28}),_0x46d169[_0x12007e(0xc8)]();}[_0x245d3a(0x8f)](){const _0x5da5c0=_0x245d3a;var _0x268f33;let _0x53ef04=this[_0x5da5c0(0x98)][_0x5da5c0(0xdc)](_0x458533)[_0x5da5c0(0x8d)](this[_0x5da5c0(0x76)],this[_0x5da5c0(0xb7)],this[_0x5da5c0(0xa2)]);return _0x53ef04?(_0x268f33=_0x53ef04[_0x5da5c0(0x8f)]())==null?null:_0x268f33:null;}[_0x245d3a(0x7f)](){const _0x28c33f=_0x245d3a;var _0x504826;let _0x5be1c1=this[_0x28c33f(0x98)]['get'](_0x458533)[_0x28c33f(0x8d)](this[_0x28c33f(0x76)],this[_0x28c33f(0xb7)],this[_0x28c33f(0xa2)]);return _0x5be1c1?(_0x504826=_0x5be1c1[_0x28c33f(0x7f)]())==null?null:_0x504826:null;}[_0x245d3a(0x86)](){const _0x301065=_0x245d3a;var _0x378359,_0x19624b;if(!this[_0x301065(0xaf)])throw Error(_0x301065(0x7d));if(this['x']===0x0||this['y']===0x0){let _0x3dda44=this['_injector'][_0x301065(0xdc)](_0x55eb89)[_0x301065(0x6d)](this[_0x301065(0x76)],this[_0x301065(0xb7)]);if(!_0x3dda44)throw Error(_0x301065(0x73)+this['unitId']+_0x301065(0xaa)+this[_0x301065(0xb7)]+_0x301065(0x83));let {transform:_0x3c8e74}=_0x15097a(this[_0x301065(0x76)],this['subUnitId'],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x3dda44);this['x']=this['x']>0x0?this['x']:_0x3c8e74['left'],this['y']=this['y']>0x0?this['y']:_0x3c8e74[_0x301065(0xdd)];}return this[_0x301065(0x92)]=(_0x378359=this[_0x301065(0x92)])==null?_0x5857c2:_0x378359,this[_0x301065(0xe6)]=(_0x19624b=this['height'])==null?_0x288aed:_0x19624b,{'unitId':this[_0x301065(0x76)],'subUnitId':this[_0x301065(0xb7)],'shapeId':this[_0x301065(0xa2)],'shapeType':this['shapeType'],'shapeData':Object[_0x301065(0xde)](this[_0x301065(0xc4)])['length']>0x0?this[_0x301065(0xc4)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x301065(0xe6)]};}[_0x245d3a(0xa1)](){const _0xa22e8a=_0x245d3a;return this[_0xa22e8a(0xa2)];}['getShapeType'](){const _0x5b81a4=_0x245d3a;return this[_0x5b81a4(0xaf)];}['getShapeData'](){const _0x18e8dd=_0x245d3a;return this[_0x18e8dd(0xc4)];}[_0x245d3a(0xd3)](){return{'x':this['x'],'y':this['y']};}[_0x245d3a(0xd4)](){const _0x47cb56=_0x245d3a;return{'width':this['width'],'height':this[_0x47cb56(0xe6)]};}},F=class extends P{constructor(_0xc1acf4,_0x37841b,_0x261ef8,_0x20c8d3){const _0x3bf0cc=_0x245d3a;super(_0xc1acf4,_0x37841b,_0x261ef8,_0x20c8d3),N(this,_0x3bf0cc(0xc4),{});}[_0x245d3a(0xd5)](_0x16ba6c){const _0x4a34cb=_0x245d3a;if(!_0x58493c(_0x16ba6c))throw Error(_0x4a34cb(0x7c)+_0x16ba6c+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super['setShapeType'](_0x16ba6c),this;}[_0x245d3a(0xd0)](_0x32cc11){const _0x2d3fd6=_0x245d3a;var _0x258999,_0xf1c21b;return(_0x258999=this['shapeData'])!=null&&_0x258999['ln']||(this[_0x2d3fd6(0xc4)]['ln']={}),!((_0xf1c21b=this[_0x2d3fd6(0xc4)])==null||(_0xf1c21b=_0xf1c21b['ln'])==null)&&_0xf1c21b[_0x2d3fd6(0x6f)]||(this['shapeData']['ln'][_0x2d3fd6(0x6f)]={}),this[_0x2d3fd6(0xc4)]['ln']['startArrow']['type']=_0x32cc11,this;}[_0x245d3a(0xd6)](_0x1c43bb){const _0x1dd3ac=_0x245d3a;var _0x27f28d,_0x161951;return(_0x27f28d=this['shapeData'])!=null&&_0x27f28d['ln']||(this[_0x1dd3ac(0xc4)]['ln']={}),!((_0x161951=this['shapeData'])==null||(_0x161951=_0x161951['ln'])==null)&&_0x161951[_0x1dd3ac(0xb0)]||(this[_0x1dd3ac(0xc4)]['ln'][_0x1dd3ac(0xb0)]={}),this[_0x1dd3ac(0xc4)]['ln'][_0x1dd3ac(0xb0)]['type']=_0x1c43bb,this;}[_0x245d3a(0xc2)](_0x3d9691){const _0x5416b9=_0x245d3a;var _0x4283f7,_0x401127;return(_0x4283f7=this[_0x5416b9(0xc4)])!=null&&_0x4283f7['ln']||(this[_0x5416b9(0xc4)]['ln']={}),!((_0x401127=this[_0x5416b9(0xc4)])==null||(_0x401127=_0x401127['ln'])==null)&&_0x401127['startArrow']||(this[_0x5416b9(0xc4)]['ln'][_0x5416b9(0x6f)]={}),this[_0x5416b9(0xc4)]['ln'][_0x5416b9(0x6f)][_0x5416b9(0xc0)]=_0x3d9691,this;}[_0x245d3a(0x80)](_0x483cf8){const _0x15ced2=_0x245d3a;var _0x444843,_0x1a3979;return(_0x444843=this[_0x15ced2(0xc4)])!=null&&_0x444843['ln']||(this[_0x15ced2(0xc4)]['ln']={}),!((_0x1a3979=this[_0x15ced2(0xc4)])==null||(_0x1a3979=_0x1a3979['ln'])==null)&&_0x1a3979[_0x15ced2(0xb0)]||(this[_0x15ced2(0xc4)]['ln']['endArrow']={}),this['shapeData']['ln']['endArrow'][_0x15ced2(0xc0)]=_0x483cf8,this;}[_0x245d3a(0x86)](){const _0xb2fe17=_0x245d3a;return super[_0xb2fe17(0x86)]();}['getEndConnectInfo'](){const _0x3779f9=_0x245d3a;var _0xaef10;return((_0xaef10=this[_0x3779f9(0xc4)])==null||(_0xaef10=_0xaef10[_0x3779f9(0xc1)])==null?void 0x0:_0xaef10['to'])||null;}['getStartConnectInfo'](){const _0x7ea93e=_0x245d3a;var _0x6e5ed;return((_0x6e5ed=this[_0x7ea93e(0xc4)])==null||(_0x6e5ed=_0x6e5ed[_0x7ea93e(0xc1)])==null?void 0x0:_0x6e5ed[_0x7ea93e(0x8b)])||null;}};function I(_0x49a457,_0x766408,_0x31e157,_0xb72f5f,_0x5f2dc2,_0x31aa5a){const _0x4123e4=_0x245d3a;let _0x108991=_0x5f2dc2['getShapeModel'](_0x49a457,_0x766408,_0x31e157);if(!_0x108991)return null;let _0x53caea=_0x31aa5a[_0x4123e4(0x77)]({'unitId':_0x49a457,'subUnitId':_0x766408,'drawingId':_0x31e157});if(!(_0x53caea!=null&&_0x53caea[_0x4123e4(0xa8)]))return null;let {left:_0x2d634e=0x0,top:_0x4d05d8=0x0,width:_0x437a6e=0x0,height:_0xb5b7a2=0x0,flipX:_0x3cd0b9=!0x1,flipY:_0x1363f0=!0x1,angle:_0x2ba431}=_0x53caea[_0x4123e4(0xa8)];_0x108991['updateContext']({'width':_0x437a6e,'height':_0xb5b7a2});let _0x40786d=_0x108991[_0x4123e4(0xe2)]()[_0x4123e4(0x95)](_0x926199=>_0x926199[_0x4123e4(0x82)]===_0xb72f5f);if(!_0x40786d)return null;let _0x4f1573=_0x3cd0b9?_0x437a6e-_0x40786d['x']:_0x40786d['x'],_0x333bfc=_0x1363f0?_0xb5b7a2-_0x40786d['y']:_0x40786d['y'];if(_0x2ba431&&_0x2ba431!==0x0){let _0x710f79=_0x2ba431*Math['PI']/0xb4,_0x1405fd=Math['cos'](_0x710f79),_0x564fcf=Math[_0x4123e4(0xb9)](_0x710f79),_0x5545a6=_0x437a6e/0x2,_0x31513c=_0xb5b7a2/0x2,_0xe792fb=_0x4f1573-_0x5545a6,_0x456cc7=_0x333bfc-_0x31513c;_0x4f1573=_0x5545a6+_0xe792fb*_0x1405fd-_0x456cc7*_0x564fcf,_0x333bfc=_0x31513c+_0xe792fb*_0x564fcf+_0x456cc7*_0x1405fd;}_0x4f1573+=_0x2d634e,_0x333bfc+=_0x4d05d8;let _0x3bca9e=_0x40786d[_0x4123e4(0xe8)]/0xea60;_0x3cd0b9&&(_0x3bca9e=0xb4-_0x3bca9e),_0x1363f0&&(_0x3bca9e=-_0x3bca9e),_0x3bca9e+=_0x2ba431||0x0,_0x3bca9e=(_0x3bca9e%0x168+0x168)%0x168;let _0x2a6e0e=_0x423cee({'left':_0x2d634e,'top':_0x4d05d8,'width':_0x437a6e,'height':_0xb5b7a2},_0x2ba431||0x0);return{'point':{'x':_0x4f1573,'y':_0x333bfc},'angle':_0x3bca9e,'bounds':_0x2a6e0e};}function L(_0x21b5b5,_0x2f0ead){const _0x526bd5=_0x245d3a;let _0x2dba75=_0x2f0ead['x']-_0x21b5b5['x'],_0x4354b6=_0x2f0ead['y']-_0x21b5b5['y'];return Math[_0x526bd5(0xc7)](_0x2dba75)>=Math['abs'](_0x4354b6)?_0x2dba75>=0x0?0xb4:0x0:_0x4354b6>=0x0?0x10e:0x5a;}function R(_0x2246e1,_0x118312,_0x3e9df9,_0x4bcda2,_0x50b343,_0x52e9aa,_0x33e5a8){const _0x3ccfd9=_0x245d3a;let _0xf6a587=_0x52e9aa['getShapeModel'](_0x2246e1,_0x118312,_0x3e9df9);if(!_0xf6a587)return null;let _0x5b018f=_0x33e5a8[_0x3ccfd9(0x77)]({'unitId':_0x2246e1,'subUnitId':_0x118312,'drawingId':_0x3e9df9});if(!(_0x5b018f!=null&&_0x5b018f[_0x3ccfd9(0xa8)]))return null;let {left:_0xe3d905=0x0,top:_0x9a238e=0x0,width:_0x1148e8=0x0,height:_0x27480c=0x0,flipX:_0x333072=!0x1,flipY:_0x3221a5=!0x1}=_0x5b018f[_0x3ccfd9(0xa8)];_0xf6a587[_0x3ccfd9(0xcb)]({'width':_0x1148e8,'height':_0x27480c});let _0x2acfda=_0xf6a587[_0x3ccfd9(0xc8)]();if(_0x2acfda[_0x3ccfd9(0xd7)]<0x2)return null;let _0x3c48cf=_0x4bcda2?_0x2acfda[0x0]:_0x2acfda[_0x2acfda['length']-0x1],_0x4b625c=new _0x34439f({'left':_0xe3d905,'top':_0x9a238e,'width':_0x1148e8,'height':_0x27480c,'flipX':_0x333072,'flipY':_0x3221a5})[_0x3ccfd9(0x7a)](_0x3c48cf);return{'point':_0x4b625c,'angle':L(_0x50b343['point'],_0x4b625c),'bounds':{'left':_0x4b625c['x'],'top':_0x4b625c['y'],'width':0x0,'height':0x0}};}var z=class extends _0x4ae227{async['insertShape'](_0x25132){const _0x4c230a=_0x245d3a;let {unitId:_0x3a2d9c,subUnitId:_0x40519b,shapeId:_0x3c9bba,shapeType:_0x290fc5,shapeData:_0x11baab,x:_0x3ce62a,y:_0x20b2fb,width:_0x54c3e6,height:_0x1771a2}=_0x25132;return this[_0x4c230a(0x71)][_0x4c230a(0xe5)](_0x48442c['id'],{'unitId':_0x3a2d9c,'subUnitId':_0x40519b,'shapeId':_0x3c9bba,'shapeType':_0x290fc5,'shapeData':_0x11baab,'position':{'x':_0x3ce62a,'y':_0x20b2fb},'width':_0x54c3e6,'height':_0x1771a2});}async[_0x245d3a(0x70)](_0x4f9cb5){const _0x2c994c=_0x245d3a;let {unitId:_0xcfce0d,subUnitId:_0x1e62d5,shapeId:_0x9e5ea8,shapeType:_0x46aec0,shapeData:_0x1a793b,x:_0x15d647,y:_0x245c4b,width:_0x1c55a2,height:_0x22e089}=_0x4f9cb5;return this[_0x2c994c(0x71)][_0x2c994c(0xe5)](_0xbd1de4['id'],{'unitId':_0xcfce0d,'subUnitId':_0x1e62d5,'shapeId':_0x9e5ea8,'shapeType':_0x46aec0,'shapeData':_0x1a793b,'position':{'x':_0x15d647,'y':_0x245c4b},'width':_0x1c55a2,'height':_0x22e089});}[_0x245d3a(0x9c)](_0x519406){const _0x35ac00=_0x245d3a;let _0x16909a=this[_0x35ac00(0xa3)]()[_0x35ac00(0xe9)](),_0x15dbd1=this[_0x35ac00(0xa9)]();if(_0x519406){let _0x2a2600=new P(_0x16909a,_0x15dbd1,_0x519406[_0x35ac00(0xa2)],this['_injector']);return this[_0x35ac00(0x74)](_0x2a2600,_0x16909a,_0x15dbd1,_0x519406['drawId']),_0x2a2600;}return new P(_0x16909a,_0x15dbd1,_0x58c69f(),this[_0x35ac00(0x98)]);}['newConnector'](_0x3c710a){const _0x31eae7=_0x245d3a;let _0x341179=this[_0x31eae7(0xa3)]()[_0x31eae7(0xe9)](),_0x453780=this[_0x31eae7(0xa9)]();if(_0x3c710a){let _0x400073=new F(_0x341179,_0x453780,_0x3c710a[_0x31eae7(0xa2)],this[_0x31eae7(0x98)]);return this['_preloadShapeProperties'](_0x400073,_0x341179,_0x453780,_0x3c710a[_0x31eae7(0xa2)]),_0x400073;}return new F(_0x341179,_0x453780,_0x58c69f(),this[_0x31eae7(0x98)]);}[_0x245d3a(0xdf)](){const _0x503ee7=_0x245d3a;let _0x249672=this[_0x503ee7(0x98)]['get'](_0x428383),_0x56ca0a=this[_0x503ee7(0xa3)]()[_0x503ee7(0xe9)](),_0x1a27c7=this[_0x503ee7(0xa9)](),_0x508a38=_0x249672[_0x503ee7(0x79)](_0x56ca0a,_0x1a27c7);if(!_0x508a38)return[];let _0x125ed5=[];for(let [_0x43cd1f,_0x197ba7]of Object[_0x503ee7(0x6a)](_0x508a38))if(_0x197ba7&&_0x197ba7[_0x503ee7(0xdb)]===_0x215d4d[_0x503ee7(0xcc)]){let _0x5406c3=new P(_0x56ca0a,_0x1a27c7,_0x43cd1f,this[_0x503ee7(0x98)]);this[_0x503ee7(0x74)](_0x5406c3,_0x56ca0a,_0x1a27c7,_0x43cd1f),_0x125ed5['push'](_0x5406c3);}return _0x125ed5;}[_0x245d3a(0xae)](_0x441d04){const _0x5b120c=_0x245d3a;let {unitId:_0x30b3be,subUnitId:_0x3ecd5d,drawId:_0x29efc0}=_0x441d04;return this[_0x5b120c(0x71)][_0x5b120c(0xe5)](_0x55e1a4['id'],{'unitId':_0x30b3be,'drawings':[{'unitId':_0x30b3be,'subUnitId':_0x3ecd5d,'drawingId':_0x29efc0,'drawingType':_0x215d4d[_0x5b120c(0xcc)]}]});}async[_0x245d3a(0xbd)](_0x5133d0){const _0x156e55=_0x245d3a;let {connector:_0x130fe8,startTarget:_0x8732c6,endTarget:_0x163116}=_0x5133d0;if(!_0x8732c6&&!_0x163116)return!0x1;let _0x466152=this[_0x156e55(0xa3)]()[_0x156e55(0xe9)](),_0x21d480=this[_0x156e55(0xa9)](),_0x5dc00f=this[_0x156e55(0x98)][_0x156e55(0xdc)](_0x458533),_0x4c4b2d=this['_injector'][_0x156e55(0xdc)](_0x155517),_0x3d9349=_0x5dc00f[_0x156e55(0x8d)](_0x466152,_0x21d480,_0x130fe8[_0x156e55(0xa2)]);if(!_0x3d9349)return!0x1;let _0x2c284d=_0x3d9349[_0x156e55(0xe3)](),_0x18d5b5=_0x3d9349[_0x156e55(0x81)](),_0x54e5b5={};for(let _0xf35998 of _0x3d9349[_0x156e55(0xbf)]()){let _0x366b26=_0x3d9349[_0x156e55(0xab)](_0xf35998);_0x366b26!==void 0x0&&(_0x54e5b5[_0xf35998]=_0x366b26);}let {startInfo:_0x2d9e0a,endInfo:_0x3917ea}=this['_resolveEndpoints'](_0x466152,_0x21d480,_0x130fe8,_0x3d9349,_0x8732c6,_0x163116,_0x5dc00f,_0x4c4b2d,_0x18d5b5);if(!_0x2d9e0a||!_0x3917ea)return!0x1;let _0x2f4c74=_0x5129d0(_0x311777(_0x2d9e0a,_0x3917ea,_0x2c284d),_0x2c284d),_0x33135e={};return _0x8732c6?_0x33135e[_0x156e55(0x8b)]={'shapeId':_0x8732c6[_0x156e55(0xb1)]['drawId'],'cxnIndex':_0x8732c6['connectionSiteIndex']}:_0x18d5b5!=null&&_0x18d5b5[_0x156e55(0x8b)]&&(_0x33135e[_0x156e55(0x8b)]=_0x18d5b5[_0x156e55(0x8b)]),_0x163116?_0x33135e['to']={'shapeId':_0x163116[_0x156e55(0xb1)]['drawId'],'cxnIndex':_0x163116[_0x156e55(0x9f)]}:_0x18d5b5!=null&&_0x18d5b5['to']&&(_0x33135e['to']=_0x18d5b5['to']),this[_0x156e55(0x71)][_0x156e55(0xe5)](_0x10f71e['id'],{'unitId':_0x466152,'subUnitId':_0x21d480,'connectorShapeId':_0x130fe8[_0x156e55(0xa2)],'width':_0x2f4c74[_0x156e55(0xb8)][_0x156e55(0x92)],'height':_0x2f4c74[_0x156e55(0xb8)]['height'],'left':_0x2f4c74[_0x156e55(0xb8)]['left'],'top':_0x2f4c74['worldRect'][_0x156e55(0xdd)],'flipX':_0x2f4c74[_0x156e55(0xb8)][_0x156e55(0x75)]||!0x1,'flipY':_0x2f4c74[_0x156e55(0xb8)][_0x156e55(0x6c)]||!0x1,'oldAdjustValues':_0x54e5b5,'newAdjustValues':_0x2f4c74[_0x156e55(0xb6)],'newLineType':_0x2f4c74['lineType'],'oldLineType':_0x2c284d,'rotation':_0x2f4c74[_0x156e55(0x84)],'oldRelation':_0x18d5b5,'newRelation':_0x33135e});}[_0x245d3a(0x74)](_0x6ee6c,_0x4a911b,_0x51562d,_0x2248ad){const _0x318a89=_0x245d3a;let _0x3af245=this[_0x318a89(0x98)]['get'](_0x155517)['getDrawingByParam']({'unitId':_0x4a911b,'subUnitId':_0x51562d,'drawingId':_0x2248ad});if(_0x3af245!=null&&_0x3af245['transform']){var _0xbd7ba1,_0x28c1a7,_0x5c8c5f,_0x195531;_0x6ee6c['x']=(_0xbd7ba1=_0x3af245[_0x318a89(0xa8)]['left'])==null?0x0:_0xbd7ba1,_0x6ee6c['y']=(_0x28c1a7=_0x3af245[_0x318a89(0xa8)][_0x318a89(0xdd)])==null?0x0:_0x28c1a7,_0x6ee6c[_0x318a89(0x92)]=(_0x5c8c5f=_0x3af245['transform'][_0x318a89(0x92)])==null?_0x6ee6c[_0x318a89(0x92)]:_0x5c8c5f,_0x6ee6c['height']=(_0x195531=_0x3af245[_0x318a89(0xa8)][_0x318a89(0xe6)])==null?_0x6ee6c[_0x318a89(0xe6)]:_0x195531;}let _0x49b09d=this[_0x318a89(0x98)]['get'](_0x458533)[_0x318a89(0x8d)](_0x4a911b,_0x51562d,_0x2248ad);if(_0x49b09d){_0x6ee6c[_0x318a89(0xaf)]=_0x49b09d['getShapeType']();let _0x9beed2=_0x49b09d[_0x318a89(0x88)]();_0x9beed2&&(_0x6ee6c['shapeData']=JSON[_0x318a89(0xd9)](JSON[_0x318a89(0x9a)](_0x9beed2)));}}[_0x245d3a(0x9d)](_0x5450fc,_0x120536,_0x4b7615,_0x472185,_0x4dd9af,_0x323dec,_0x52fd6f,_0xd55c5d,_0x1e6058){const _0x3ae668=_0x245d3a;let _0x3ef8bf=null,_0x465062=null;return _0x4dd9af&&(_0x3ef8bf=I(_0x5450fc,_0x120536,_0x4dd9af['shape'][_0x3ae668(0xa2)],_0x4dd9af['connectionSiteIndex'],_0x52fd6f,_0xd55c5d)),_0x323dec&&(_0x465062=I(_0x5450fc,_0x120536,_0x323dec[_0x3ae668(0xb1)][_0x3ae668(0xa2)],_0x323dec[_0x3ae668(0x9f)],_0x52fd6f,_0xd55c5d)),_0x3ef8bf||(_0x3ef8bf=this[_0x3ae668(0x78)](_0x5450fc,_0x120536,_0x4b7615[_0x3ae668(0xa2)],!0x0,_0x465062,_0x1e6058==null?void 0x0:_0x1e6058[_0x3ae668(0x8b)],_0x52fd6f,_0xd55c5d)),_0x465062||(_0x465062=this[_0x3ae668(0x78)](_0x5450fc,_0x120536,_0x4b7615['drawId'],!0x1,_0x3ef8bf,_0x1e6058==null?void 0x0:_0x1e6058['to'],_0x52fd6f,_0xd55c5d)),{'startInfo':_0x3ef8bf,'endInfo':_0x465062};}['_resolveExistingOrFreeEndpoint'](_0x560780,_0x8d6e2f,_0x18150d,_0x1b80e9,_0x423ada,_0x843eab,_0x3bc7d2,_0x5027b8){const _0x1973d5=_0x245d3a;if(_0x843eab){let _0x94431c=I(_0x560780,_0x8d6e2f,_0x843eab[_0x1973d5(0xda)],_0x843eab[_0x1973d5(0x89)],_0x3bc7d2,_0x5027b8);if(_0x94431c)return _0x94431c;}return _0x423ada?R(_0x560780,_0x8d6e2f,_0x18150d,_0x1b80e9,_0x423ada,_0x3bc7d2,_0x5027b8):null;}};_0x4ae227[_0x245d3a(0x6b)](z);export{F as FConnectorShape,P as FShape};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x341a97=_0x16de;(function(_0x4f3524,_0x5b9a4a){const _0x593e3c=_0x16de,_0x3614b0=_0x4f3524();while(!![]){try{const _0x224736=-parseInt(_0x593e3c(0x11a))/0x1*(parseInt(_0x593e3c(0x150))/0x2)+-parseInt(_0x593e3c(0x184))/0x3+parseInt(_0x593e3c(0x175))/0x4*(-parseInt(_0x593e3c(0x11e))/0x5)+-parseInt(_0x593e3c(0x1a4))/0x6+-parseInt(_0x593e3c(0x190))/0x7+-parseInt(_0x593e3c(0x15c))/0x8*(parseInt(_0x593e3c(0x142))/0x9)+parseInt(_0x593e3c(0x111))/0xa;if(_0x224736===_0x5b9a4a)break;else _0x3614b0['push'](_0x3614b0['shift']());}catch(_0x2d68e5){_0x3614b0['push'](_0x3614b0['shift']());}}}(_0x2d10,0x95c63));import{ShapeModel,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{CommandType,DependentOn,Disposable,DrawingTypeEnum,ICommandService,IConfigService,IResourceManagerService,IUndoRedoService,IUniverInstanceService,Inject,Injector,Plugin,UniverInstanceType,generateRandomId,merge,sequenceExecute,touchDependencies}from'@univerjs/core';import{SheetInterceptorService,SheetSkeletonService,getSheetCommandTarget}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation,DrawingApplyType,ISheetDrawingService,InsertSheetDrawingCommand,RemoveSheetDrawingCommand,SetDrawingApplyMutation,SetSheetDrawingCommand,transformToAxisAlignPosition,transformToDrawingPosition}from'@univerjs/sheets-drawing';import{UniverLicensePlugin}from'@univerjs-pro/license';import{IDrawingManagerService}from'@univerjs/drawing';const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x2669e1){'@babel/helpers - typeof';const _0x37c67b=_0x16de;return _typeof=_0x37c67b(0x159)==typeof Symbol&&'symbol'==typeof Symbol[_0x37c67b(0x156)]?function(_0x5e5feb){return typeof _0x5e5feb;}:function(_0x4c746f){const _0x1c219e=_0x37c67b;return _0x4c746f&&_0x1c219e(0x159)==typeof Symbol&&_0x4c746f[_0x1c219e(0x185)]===Symbol&&_0x4c746f!==Symbol[_0x1c219e(0x117)]?_0x1c219e(0x135):typeof _0x4c746f;},_typeof(_0x2669e1);}function toPrimitive(_0x54ee,_0x25aac4){const _0x53f496=_0x16de;if(_0x53f496(0x168)!=_typeof(_0x54ee)||!_0x54ee)return _0x54ee;var _0x2f5eee=_0x54ee[Symbol[_0x53f496(0x174)]];if(void 0x0!==_0x2f5eee){var _0x5366eb=_0x2f5eee[_0x53f496(0x18b)](_0x54ee,_0x25aac4||'default');if(_0x53f496(0x168)!=_typeof(_0x5366eb))return _0x5366eb;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x53f496(0x126)===_0x25aac4?String:Number)(_0x54ee);}function toPropertyKey(_0x36e67c){const _0x24f02e=_0x16de;var _0x2791d2=toPrimitive(_0x36e67c,_0x24f02e(0x126));return _0x24f02e(0x135)==_typeof(_0x2791d2)?_0x2791d2:_0x2791d2+'';}function _defineProperty(_0x1cc10b,_0x29ad56,_0x3472fc){return(_0x29ad56=toPropertyKey(_0x29ad56))in _0x1cc10b?Object['defineProperty'](_0x1cc10b,_0x29ad56,{'value':_0x3472fc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1cc10b[_0x29ad56]=_0x3472fc,_0x1cc10b;}var SheetShapeModelManager=class extends Disposable{constructor(){const _0x272193=_0x16de;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0x272193(0x141),new Set()),_defineProperty(this,'_groupIds',new Set());}[_0x341a97(0x187)](_0x279b3a,_0x57ee2c,_0x587886){const _0x3cda98=_0x341a97,_0x8a372f=new ShapeModel(_0x279b3a,_0x57ee2c,_0x587886);this[_0x3cda98(0x13e)][_0x3cda98(0x119)](_0x57ee2c,_0x8a372f);if(isConnectorShape(_0x279b3a))this['_linesIds'][_0x3cda98(0x1ab)](_0x57ee2c);return _0x8a372f;}[_0x341a97(0x148)](_0x24a515){const _0x52779c=_0x341a97,_0x49a4f5=[];for(const _0x74d4ae of this[_0x52779c(0x141)]){const _0x111d4f=this[_0x52779c(0x13e)][_0x52779c(0x17f)](_0x74d4ae);if(_0x111d4f){const _0x4c0fb5=_0x111d4f['getShapeRelation']();if(_0x4c0fb5){var _0x3e2c62,_0x65980d;if(((_0x3e2c62=_0x4c0fb5[_0x52779c(0x11d)])===null||_0x3e2c62===void 0x0?void 0x0:_0x3e2c62['shapeId'])===_0x24a515)_0x49a4f5[_0x52779c(0x12d)]({..._0x4c0fb5[_0x52779c(0x11d)],'lineShapeId':_0x74d4ae,'isFrom':!![]});if(((_0x65980d=_0x4c0fb5['to'])===null||_0x65980d===void 0x0?void 0x0:_0x65980d[_0x52779c(0x125)])===_0x24a515)_0x49a4f5[_0x52779c(0x12d)]({..._0x4c0fb5['to'],'lineShapeId':_0x74d4ae,'isFrom':![]});}}}return _0x49a4f5;}[_0x341a97(0x12e)](_0x427227){const _0x5a542c=_0x341a97,_0x184419=this[_0x5a542c(0x13e)][_0x5a542c(0x17f)](_0x427227);if(_0x184419)return _0x184419['getShapeRelation']();}[_0x341a97(0x144)](_0x267b0e){const _0x5dd0c7=_0x341a97,_0x100caf=this[_0x5dd0c7(0x13e)][_0x5dd0c7(0x17f)](_0x267b0e);if(_0x100caf)return _0x100caf['getShapeType']();}[_0x341a97(0x12a)](_0x5bb6ba){const _0x1462c5=_0x341a97;return this['_shapes'][_0x1462c5(0x192)](_0x5bb6ba);}[_0x341a97(0x127)](_0x5a795d){const _0x52ee82=_0x341a97,_0x2e986a=this[_0x52ee82(0x13e)][_0x52ee82(0x17f)](_0x5a795d);if(!_0x2e986a)return;if(isConnectorShape(_0x2e986a[_0x52ee82(0x144)]()))this['_linesIds'][_0x52ee82(0x121)](_0x5a795d);this[_0x52ee82(0x13e)][_0x52ee82(0x121)](_0x5a795d);}[_0x341a97(0x131)](){const _0x474c3c=_0x341a97,_0x2955f3=[];return this[_0x474c3c(0x13e)]['forEach'](_0x44a1f8=>{const _0x51d558=_0x474c3c;_0x2955f3[_0x51d558(0x12d)](_0x44a1f8[_0x51d558(0x131)]());}),_0x2955f3;}['fromJSON'](_0x42f7a0){const _0x5a1bfd=_0x341a97;for(const _0x581ddf of _0x42f7a0){const {id:_0x5bde8a,shapeType:_0x489eb4}=_0x581ddf,_0x20fde0=this[_0x5a1bfd(0x187)](_0x489eb4,_0x5bde8a,_0x581ddf[_0x5a1bfd(0x176)]);if(_0x20fde0&&_0x20fde0[_0x5a1bfd(0x151)]())this[_0x5a1bfd(0x141)]['add'](_0x5bde8a);}}[_0x341a97(0x15b)](){const _0xd97997=_0x341a97;if(this[_0xd97997(0x166)])return;this[_0xd97997(0x13e)][_0xd97997(0x116)](_0x3468b4=>{const _0x42e427=_0xd97997;_0x3468b4[_0x42e427(0x15b)]();}),this[_0xd97997(0x13e)][_0xd97997(0x1a5)](),this[_0xd97997(0x141)][_0xd97997(0x1a5)](),this[_0xd97997(0x170)][_0xd97997(0x1a5)](),super['dispose']();}};function __decorateParam(_0x9bd393,_0x2844da){return function(_0x1827c0,_0x20c69a){_0x2844da(_0x1827c0,_0x20c69a,_0x9bd393);};}function __decorate(_0x2ae185,_0x46abe8,_0x254137,_0x114744){const _0x265121=_0x341a97;var _0x81c0e2=arguments[_0x265121(0x17c)],_0x55803d=_0x81c0e2<0x3?_0x46abe8:_0x114744===null?_0x114744=Object[_0x265121(0x12b)](_0x46abe8,_0x254137):_0x114744,_0x7744f1;if(typeof Reflect===_0x265121(0x168)&&typeof Reflect[_0x265121(0x122)]===_0x265121(0x159))_0x55803d=Reflect[_0x265121(0x122)](_0x2ae185,_0x46abe8,_0x254137,_0x114744);else{for(var _0x4934bb=_0x2ae185[_0x265121(0x17c)]-0x1;_0x4934bb>=0x0;_0x4934bb--)if(_0x7744f1=_0x2ae185[_0x4934bb])_0x55803d=(_0x81c0e2<0x3?_0x7744f1(_0x55803d):_0x81c0e2>0x3?_0x7744f1(_0x46abe8,_0x254137,_0x55803d):_0x7744f1(_0x46abe8,_0x254137))||_0x55803d;}return _0x81c0e2>0x3&&_0x55803d&&Object[_0x265121(0x194)](_0x46abe8,_0x254137,_0x55803d),_0x55803d;}const SHEET_SHAPE_PLUGIN=_0x341a97(0x186);let SheetsShapeService=class SheetsShapeService extends Disposable{constructor(_0x32407f){const _0x4c878e=_0x341a97;super(),this['_resourcesManagerService']=_0x32407f,_defineProperty(this,_0x4c878e(0x1a8),new Map()),this[_0x4c878e(0x183)]();}[_0x341a97(0x147)](_0x559ca7,_0x46b586){const _0x4d05a5=_0x341a97;let _0x46bc41=this['_shapeModelManagerMap'][_0x4d05a5(0x17f)](_0x559ca7);!_0x46bc41&&(_0x46bc41=new Map(),this[_0x4d05a5(0x1a8)][_0x4d05a5(0x119)](_0x559ca7,_0x46bc41));let _0x1daa2e=_0x46bc41[_0x4d05a5(0x17f)](_0x46b586);return!_0x1daa2e&&(_0x1daa2e=new SheetShapeModelManager(),_0x46bc41[_0x4d05a5(0x119)](_0x46b586,_0x1daa2e)),_0x1daa2e;}[_0x341a97(0x124)](_0xd1e571,_0x1027b7,_0x25a95a,_0x323e0b,_0x37da63){const _0x4dd39d=_0x341a97;this['_ensureShapeModelManager'](_0xd1e571,_0x1027b7)[_0x4dd39d(0x187)](_0x25a95a,_0x323e0b,_0x37da63);}[_0x341a97(0x127)](_0x4d38fa,_0x2e6a61,_0x24019c){const _0x48ef05=_0x341a97;this[_0x48ef05(0x147)](_0x4d38fa,_0x2e6a61)[_0x48ef05(0x127)](_0x24019c);}[_0x341a97(0x172)](_0x5b832f,_0x55bb92,_0x10bbbb){const _0xda7489=_0x341a97;return this[_0xda7489(0x147)](_0x5b832f,_0x55bb92)['getShapeType'](_0x10bbbb);}[_0x341a97(0x144)](_0x316469,_0x1806bb,_0x47b36e){const _0x3584b0=_0x341a97;return this[_0x3584b0(0x147)](_0x316469,_0x1806bb)[_0x3584b0(0x144)](_0x47b36e);}['hasShape'](_0x558732,_0x2b279a,_0x18d227){const _0x5b6701=_0x341a97;return this[_0x5b6701(0x147)](_0x558732,_0x2b279a)[_0x5b6701(0x12a)](_0x18d227);}[_0x341a97(0x18e)](_0x210b74,_0x24cda0,_0x1b8332){const _0x234d88=_0x341a97;return this[_0x234d88(0x147)](_0x210b74,_0x24cda0)[_0x234d88(0x144)](_0x1b8332);}[_0x341a97(0x19b)](_0x3f9f2d,_0x10abdb,_0x11fc0b){const _0x2a3bc9=_0x341a97,_0x3714bd=this[_0x2a3bc9(0x147)](_0x3f9f2d,_0x10abdb);if(!_0x3714bd[_0x2a3bc9(0x144)](_0x11fc0b))return;const _0x8588ad=_0x3714bd[_0x2a3bc9(0x13e)][_0x2a3bc9(0x17f)](_0x11fc0b);if(!_0x8588ad)return;return _0x8588ad[_0x2a3bc9(0x1a0)]();}[_0x341a97(0x16d)](_0x3c22e0,_0x1d9b4b,_0x515c85){return this['_ensureShapeModelManager'](_0x3c22e0,_0x1d9b4b)['_shapes']['get'](_0x515c85);}['getBasicShapeRelation'](_0x1bde01,_0x1e0f6e,_0x359289){return this['_ensureShapeModelManager'](_0x1bde01,_0x1e0f6e)['getBasicShapeRelation'](_0x359289);}[_0x341a97(0x12e)](_0x5efbda,_0x526671,_0x96b5b2){const _0x2ac4c4=_0x341a97,_0x4a3792=this[_0x2ac4c4(0x147)](_0x5efbda,_0x526671)[_0x2ac4c4(0x13e)][_0x2ac4c4(0x17f)](_0x96b5b2);if(!_0x4a3792)return;return _0x4a3792[_0x2ac4c4(0x18a)]();}[_0x341a97(0x198)](){}[_0x341a97(0x161)](_0x271158){const _0x1e14e4=_0x341a97,_0x37f95b={},_0x29ce57=this[_0x1e14e4(0x1a8)]['get'](_0x271158);if(_0x29ce57)_0x29ce57['forEach']((_0x2871ed,_0x1e9600)=>{const _0x4abc43=_0x1e14e4,_0x5384fd=_0x2871ed['toJSON']();if(_0x5384fd[_0x4abc43(0x17c)]>0x0)_0x37f95b[_0x1e9600]=_0x5384fd;});return JSON[_0x1e14e4(0x158)](_0x37f95b);}['_deserializeShapeForUnit'](_0x21f8f9,_0x1cf0fc){const _0x3fa576=_0x341a97;Object[_0x3fa576(0x118)](_0x1cf0fc)['forEach'](_0x5a9d62=>{const _0xa800df=_0x3fa576;this[_0xa800df(0x147)](_0x21f8f9,_0x5a9d62)['fromJSON'](_0x1cf0fc[_0x5a9d62]);});}[_0x341a97(0x131)](){const _0x4e5855=_0x341a97,_0x5beba2={};return this[_0x4e5855(0x1a8)][_0x4e5855(0x116)]((_0x153e29,_0x1bcbd6)=>{const _0x1ae90c=_0x4e5855;_0x5beba2[_0x1bcbd6]={},_0x153e29[_0x1ae90c(0x116)]((_0x296f6d,_0x28794d)=>{_0x5beba2[_0x1bcbd6][_0x28794d]=_0x296f6d['toJSON']();});}),_0x5beba2;}[_0x341a97(0x191)](_0x46108a){const _0x2221cf=_0x341a97;Object[_0x2221cf(0x118)](_0x46108a)[_0x2221cf(0x116)](_0x2b780b=>{const _0x5c191c=_0x46108a[_0x2b780b];Object['keys'](_0x5c191c)['forEach'](_0x168f91=>{const _0x42adc3=_0x16de;this['_ensureShapeModelManager'](_0x2b780b,_0x168f91)[_0x42adc3(0x191)](_0x5c191c[_0x168f91]);});});}['_initSnapshot'](){const _0x937193=_0x341a97;this[_0x937193(0x11b)][_0x937193(0x15e)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[UniverInstanceType[_0x937193(0x162)]],'toJson':_0x220d32=>this[_0x937193(0x161)](_0x220d32),'parseJson':_0x458af6=>JSON[_0x937193(0x14c)](_0x458af6),'onLoad':(_0x48b65a,_0x387713)=>{this['_deserializeShapeForUnit'](_0x48b65a,_0x387713);},'onUnLoad':_0x314f15=>{const _0x90b8ef=_0x937193,_0x3d7235=this[_0x90b8ef(0x1a8)][_0x90b8ef(0x17f)](_0x314f15);_0x3d7235&&(_0x3d7235[_0x90b8ef(0x116)](_0x35e3c3=>{const _0x249525=_0x90b8ef;_0x35e3c3[_0x249525(0x15b)]();}),this[_0x90b8ef(0x1a8)]['delete'](_0x314f15));}});}[_0x341a97(0x15b)](){const _0x235e58=_0x341a97;this[_0x235e58(0x1a8)]['forEach'](_0xec4182=>{const _0x445d10=_0x235e58;_0xec4182[_0x445d10(0x116)](_0x904b00=>{_0x904b00['dispose']();});});}};function _0x16de(_0x402efb,_0x2ea7c8){_0x402efb=_0x402efb-0x110;const _0x2d10cc=_0x2d10();let _0x16deec=_0x2d10cc[_0x402efb];return _0x16deec;}SheetsShapeService=__decorate([__decorateParam(0x0,IResourceManagerService)],SheetsShapeService);function _0x2d10(){const _0x4c1a7c=['get','sheet.command.set-shape-text-vertical-toggle','startX','fill','_initSnapshot','3167433KJfYbE','constructor','SHEET_SHAPE_PLUGIN','addShape','getAdjustValueByName','_addLineFollowShapeUpdates','getShapeRelation','call','getCellIndexAndOffsetByPosition','setShapeData','getShapeTypeById','registerCommand','5653774MGPmwG','fromJSON','has','getEndConnectInfo','defineProperty','setConfig','isHorizontal','pushUndoRedo','setShapeType','sheet.command.update-shape-type','@univerjs-pro/sheets-shape','getShapeDataById','rotateEnabled','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','ang','type','getShapeData','getDrawingByParam','ensureSkeleton','preRedos','3054546iKzjbQ','clear','_sheetsShapeService','adjustValues','_shapeModelManagerMap','MUTATION','worldRect','add','cxnIndex','45180070FIWdck','0.22.1','getDrawingData','sheet.command.update-line-shape-resize','width','forEach','prototype','keys','set','1srcwpK','_resourcesManagerService','_commandService','from','155MQXZrd','sheet.command.toggle-shape-flip','_addLineRerouteUpdates','delete','decorate','_injector','insertShape','shapeId','string','removeShape','_getConnectPointInfo','lineShapeId','hasShape','getOwnPropertyDescriptor','index','push','getLineShapeRelation','drawingType','getCellWithCoordByIndex','toJSON','onStarting','flipX','redos','symbol','sheet.mutation.update-shape-type','data','_drawingManagerService','_configService','COMMAND','top','DRAWING_SHAPE','flipY','_shapes','result','position','_linesIds','2486853XWgQPU','startY','getShapeType','pluginName','undos','_ensureShapeModelManager','getBasicShapeRelation','left','getSkeleton','getStartConnectInfo','parse','packageName','getBatchUpdateOp','_initCommandInterceptor','1303970XjErvP','isLineShape','sheets-shape.config','getConnectionSiteList','onCommandExecute','params','iterator','UPDATE','stringify','function','range','dispose','16INLsCw','getShapeTextData','registerPluginResource','cos','_initCommands','_serializeShapeForUnit','UNIVER_SHEET','preUndos','_sheetSkeletonService','height','_disposed','INSERT','object','borderEnabled','_config','interceptCommand','disposeWithMe','getShapeModel','getAdjustNames','lineType','_groupIds','_sheetInterceptorService','getBasicShapeType','removeLinePoints','toPrimitive','42236DLVzpz','shapeData','angle','isFrom','filter','resizeEnabled','sheet.command.update-connector-relation','length','relation','transform'];_0x2d10=function(){return _0x4c1a7c;};return _0x2d10();}const InsertSheetsShapeMutation={'id':'sheet.mutation.insert-shape','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x1d32c0,_0x5360ae)=>{const _0x2138b1=_0x341a97,{unitId:_0x4ec7e5,subUnitId:_0x42eec3,shapeType:_0x2227f2,shapeId:_0x63442d,shapeData:_0x201495}=_0x5360ae;return _0x1d32c0['get'](SheetsShapeService)[_0x2138b1(0x124)](_0x4ec7e5,_0x42eec3,_0x2227f2,_0x63442d,_0x201495),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x526b66,_0x3097df)=>{const _0x3dd609=_0x341a97,{unitId:_0xa54f39,subUnitId:_0x1de393,shapeId:_0x32c41c}=_0x3097df;return _0x526b66[_0x3dd609(0x17f)](SheetsShapeService)[_0x3dd609(0x127)](_0xa54f39,_0x1de393,_0x32c41c),!![];}},InsertShapeCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.insert-shape','handler':(_0x4c0466,_0x396c57)=>{const _0x5c8558=_0x341a97;var _0x2de56b,_0x94cb09;const _0x515c34=getSheetCommandTarget(_0x4c0466['get'](IUniverInstanceService),_0x396c57);if(!_0x515c34)return![];const _0x4db599=_0x4c0466['get'](SheetSkeletonService),{unitId:_0x31dcc9,subUnitId:_0x319fce}=_0x515c34,_0x4824ec=_0x4db599[_0x5c8558(0x1a2)](_0x31dcc9,_0x319fce);if(!_0x4824ec)return![];const _0x923d1a=_0x4c0466['get'](ICommandService),_0x3fd453=_0x4c0466[_0x5c8558(0x17f)](IUndoRedoService),_0x230197=_0x4c0466[_0x5c8558(0x17f)](SheetInterceptorService),_0x20770b=_0x4c0466[_0x5c8558(0x17f)](ISheetDrawingService),{shapeType:_0x1a0f34,shapeData:_0x34bcb3}=_0x396c57,_0x6a9ffe=_0x396c57[_0x5c8558(0x125)]||generateRandomId(),_0x4c7fd6={'unitId':_0x31dcc9,'subUnitId':_0x319fce,'shapeId':_0x6a9ffe,'shapeType':_0x1a0f34,'shapeData':_0x34bcb3},_0x3d0e0e=_0x396c57[_0x5c8558(0x115)]||0xc8,_0x57c21f=_0x396c57[_0x5c8558(0x165)]||0xc8;let _0x48aa94=0x0,_0x56c44c=0x0,_0x42c8ab={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x2c12d3={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x396c57[_0x5c8558(0x140)]){const {x:_0x24fce8,y:_0x43d395}=_0x396c57['position'];_0x48aa94=_0x24fce8,_0x56c44c=_0x43d395,_0x42c8ab=_0x4824ec[_0x5c8558(0x18c)](_0x24fce8,_0x43d395),_0x2c12d3=_0x4824ec[_0x5c8558(0x18c)](_0x24fce8+_0x3d0e0e,_0x43d395+_0x57c21f);}else{if(_0x396c57[_0x5c8558(0x15a)]){const {startRow:_0x4590e4,startColumn:_0x497a90}=_0x396c57['range'],_0xedbba0=0xa,_0x53194e=0xa;_0x42c8ab={'row':_0x4590e4,'rowOffset':_0xedbba0,'column':_0x497a90,'columnOffset':_0x53194e};const _0x299300=_0x4824ec[_0x5c8558(0x130)](_0x4590e4,_0x497a90);_0x48aa94=_0x299300[_0x5c8558(0x181)]+_0x53194e,_0x56c44c=_0x299300[_0x5c8558(0x143)]+_0xedbba0,_0x2c12d3=_0x4824ec[_0x5c8558(0x18c)](_0x48aa94+_0x3d0e0e,_0x56c44c+_0x57c21f);}}const _0x1f6228={'from':_0x42c8ab,'to':_0x2c12d3},_0x4769a2={'unitId':_0x31dcc9,'subUnitId':_0x319fce,'drawingId':_0x6a9ffe,'drawingType':DrawingTypeEnum[_0x5c8558(0x13c)],'sheetTransform':_0x1f6228,'transform':{'left':_0x48aa94,'top':_0x56c44c,'width':_0x3d0e0e,'height':_0x57c21f},'data':{'shapeType':_0x1a0f34,'shapeData':_0x34bcb3},'axisAlignSheetTransform':_0x1f6228,'allowTransform':!![]};isConnectorShape(_0x1a0f34)&&(_0x4769a2[_0x5c8558(0x137)][_0x5c8558(0x182)]=![],_0x4769a2[_0x5c8558(0x137)]['rotateEnabled']=![],_0x4769a2[_0x5c8558(0x137)]['resizeEnabled']=![],_0x4769a2['data'][_0x5c8558(0x169)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x19c)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x17a)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x169)]=![]);const {undo:_0x451dbc,redo:_0x21dcc2,objects:_0x3eb3ff}=_0x20770b['getBatchAddOp']([_0x4769a2]),_0x817e0d=_0x230197[_0x5c8558(0x154)]({'id':InsertSheetDrawingCommand['id'],'params':{'unitId':_0x31dcc9,'drawings':[_0x4769a2]}}),_0x45f808=[...(_0x2de56b=_0x817e0d['preRedos'])!==null&&_0x2de56b!==void 0x0?_0x2de56b:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'op':_0x21dcc2,'objects':_0x3eb3ff,'type':DrawingApplyType[_0x5c8558(0x167)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x31dcc9]},..._0x817e0d[_0x5c8558(0x134)],{'id':InsertSheetsShapeMutation['id'],'params':_0x4c7fd6}],_0x50d74a=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'shapeId':_0x6a9ffe}},...(_0x94cb09=_0x817e0d['preUndos'])!==null&&_0x94cb09!==void 0x0?_0x94cb09:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'op':_0x451dbc,'objects':_0x3eb3ff,'type':DrawingApplyType['REMOVE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x31dcc9]},..._0x817e0d[_0x5c8558(0x146)]];if(sequenceExecute(_0x45f808,_0x923d1a)[_0x5c8558(0x13f)])return _0x3fd453['pushUndoRedo']({'unitID':_0x31dcc9,'undoMutations':_0x50d74a,'redoMutations':_0x45f808}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':'sheet.mutation.update-shape-data','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x4fe054,_0x4135f5)=>{const _0x43f2a3=_0x341a97,{unitId:_0x5ea515,subUnitId:_0x5b4115,shapeType:_0x3bfdb2,shapeId:_0x3d543c,shapeData:_0x3e0d5d}=_0x4135f5,_0x11a179=_0x4fe054[_0x43f2a3(0x17f)](SheetsShapeService)['getShapeModel'](_0x5ea515,_0x5b4115,_0x3d543c);if(_0x11a179){if(_0x3bfdb2!==void 0x0)_0x11a179[_0x43f2a3(0x198)](_0x3bfdb2);if(_0x3e0d5d)_0x11a179===null||_0x11a179===void 0x0||_0x11a179['setShapeData'](_0x3e0d5d,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x11dafe,_0x20fba0)=>{const _0x441b0d=_0x341a97;var _0x4a088f,_0x32f7ab;const _0x3fcd4c=getSheetCommandTarget(_0x11dafe['get'](IUniverInstanceService),_0x20fba0);if(!_0x3fcd4c)return![];const _0x1bca65=_0x11dafe['get'](SheetSkeletonService),{unitId:_0x4eab77,subUnitId:_0x745007}=_0x3fcd4c,_0x4ac798=_0x1bca65['ensureSkeleton'](_0x4eab77,_0x745007);if(!_0x4ac798)return![];const _0x552c21=_0x11dafe['get'](SheetsShapeService),{shapeId:_0x32a5b2,shapeType:_0x4f6aa6,shapeData:_0x469cbc,position:_0x42a4f8,width:_0x18c5de,height:_0x366661}=_0x20fba0,_0x22b269=_0x552c21[_0x441b0d(0x16d)](_0x4eab77,_0x745007,_0x32a5b2);if(!_0x22b269)return![];const _0xb405a1=_0x11dafe[_0x441b0d(0x17f)](ICommandService),_0x4951db=_0x11dafe['get'](IUndoRedoService),_0xd72277=_0x11dafe[_0x441b0d(0x17f)](SheetInterceptorService),_0xd92001=_0x11dafe[_0x441b0d(0x17f)](ISheetDrawingService),_0x46f7ad={'unitId':_0x4eab77,'subUnitId':_0x745007,'shapeId':_0x32a5b2,'shapeType':_0x4f6aa6,'shapeData':_0x469cbc},_0x20873c=_0x22b269[_0x441b0d(0x144)](),_0x555d73=_0x22b269[_0x441b0d(0x1a0)](),{x:_0x5a0711,y:_0x34ea67}=_0x42a4f8,_0x14c47f={'from':_0x4ac798['getCellIndexAndOffsetByPosition'](_0x5a0711,_0x34ea67),'to':_0x4ac798['getCellIndexAndOffsetByPosition'](_0x5a0711+_0x18c5de,_0x34ea67+_0x366661)},_0x54e06b={'unitId':_0x4eab77,'subUnitId':_0x745007,'drawingId':_0x32a5b2,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x14c47f,'transform':{'left':_0x5a0711,'top':_0x34ea67,'width':_0x18c5de,'height':_0x366661},'data':{'shapeType':_0x4f6aa6,'shapeData':_0x469cbc},'axisAlignSheetTransform':_0x14c47f,'allowTransform':!![]};isConnectorShape(_0x4f6aa6)&&(_0x54e06b['data'][_0x441b0d(0x182)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x19c)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x17a)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x169)]=![],_0x54e06b['transform'][_0x441b0d(0x19c)]=![],_0x54e06b[_0x441b0d(0x17e)][_0x441b0d(0x17a)]=![],_0x54e06b['transform'][_0x441b0d(0x169)]=![]);const {undo:_0x512cb0,redo:_0x457490,objects:_0x2c0519}=_0xd92001[_0x441b0d(0x14e)]([_0x54e06b]),_0x248a34=_0xd72277['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x4eab77,'drawings':[_0x54e06b]}}),_0x4bb8cd=[...(_0x4a088f=_0x248a34[_0x441b0d(0x1a3)])!==null&&_0x4a088f!==void 0x0?_0x4a088f:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'op':_0x457490,'objects':_0x2c0519,'type':DrawingApplyType[_0x441b0d(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x4eab77]},..._0x248a34[_0x441b0d(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x46f7ad}],_0x101770=[...(_0x32f7ab=_0x248a34[_0x441b0d(0x163)])!==null&&_0x32f7ab!==void 0x0?_0x32f7ab:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'op':_0x512cb0,'objects':_0x2c0519,'type':DrawingApplyType[_0x441b0d(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x4eab77]},..._0x248a34[_0x441b0d(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'shapeType':_0x20873c,'shapeId':_0x32a5b2,'shapeData':_0x555d73}}];if(sequenceExecute(_0x4bb8cd,_0xb405a1)[_0x441b0d(0x13f)])return _0x4951db[_0x441b0d(0x197)]({'unitID':_0x4eab77,'undoMutations':_0x101770,'redoMutations':_0x4bb8cd}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x11f),'handler':(_0x15961c,_0x210597)=>{const _0x16ff56=_0x341a97;var _0x3a851a,_0x5eca0a;const _0xd7cde9=getSheetCommandTarget(_0x15961c['get'](IUniverInstanceService),_0x210597);if(!_0xd7cde9)return![];const _0x226829=_0x15961c[_0x16ff56(0x17f)](SheetSkeletonService),{unitId:_0x116fa8,subUnitId:_0x239305}=_0xd7cde9,_0x56efe4=_0x226829[_0x16ff56(0x14a)](_0x116fa8,_0x239305);if(!_0x56efe4)return![];const _0x1e0228=_0x15961c['get'](ISheetDrawingService),{shapeId:_0x121cec,flipH:_0x427530,flipV:_0x1dc414}=_0x210597,_0x392f0f=_0x1e0228[_0x16ff56(0x1a1)]({'unitId':_0x116fa8,'subUnitId':_0x239305,'drawingId':_0x121cec});if(!_0x392f0f)return![];const _0x1d28d0=_0x15961c[_0x16ff56(0x17f)](SheetsShapeService)[_0x16ff56(0x16d)](_0x116fa8,_0x239305,_0x121cec);if(!_0x1d28d0)return![];const _0xacb2cd=_0x15961c['get'](ICommandService),_0x49a2c5=_0x15961c['get'](IUndoRedoService),_0x35bacc=_0x15961c['get'](SheetInterceptorService),_0x486c91={..._0x392f0f[_0x16ff56(0x17e)]};if(_0x427530!==void 0x0)_0x486c91[_0x16ff56(0x133)]=!_0x486c91[_0x16ff56(0x133)];if(_0x1dc414!==void 0x0)_0x486c91[_0x16ff56(0x13d)]=!_0x486c91['flipY'];const _0x5e9727=transformToDrawingPosition(_0x486c91,_0x56efe4),_0x35b72d=transformToAxisAlignPosition(_0x486c91,_0x56efe4),_0x4ffc74=_0x1d28d0[_0x16ff56(0x144)](),_0xc05404=_0x1d28d0['getShapeData'](),_0x18960f={'unitId':_0x116fa8,'subUnitId':_0x239305,'drawingId':_0x121cec,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x5e9727,'transform':_0x486c91,'data':{'shapeType':_0x4ffc74,'shapeData':_0xc05404},'axisAlignSheetTransform':_0x35b72d,'allowTransform':!![]},{undo:_0x212cfb,redo:_0x103f5a,objects:_0x419ed7}=_0x1e0228[_0x16ff56(0x14e)]([_0x18960f]),_0x6575d3=_0x35bacc['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x116fa8,'drawings':[_0x18960f]}}),_0x27948e=[...(_0x3a851a=_0x6575d3[_0x16ff56(0x1a3)])!==null&&_0x3a851a!==void 0x0?_0x3a851a:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'op':_0x103f5a,'objects':_0x419ed7,'type':DrawingApplyType[_0x16ff56(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x116fa8]},..._0x6575d3[_0x16ff56(0x134)]],_0x194211=[...(_0x5eca0a=_0x6575d3['preUndos'])!==null&&_0x5eca0a!==void 0x0?_0x5eca0a:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'op':_0x212cfb,'objects':_0x419ed7,'type':DrawingApplyType[_0x16ff56(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x116fa8]},..._0x6575d3[_0x16ff56(0x146)]];if(isConnectorShape(_0x4ffc74)){const _0x5a17fb=_0x1d28d0['getShapeRelation']();if(_0x5a17fb){const _0x4d4559={..._0x5a17fb};_0x4d4559[_0x16ff56(0x11d)]=void 0x0,_0x4d4559['to']=void 0x0,_0x27948e[_0x16ff56(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'shapeId':_0x121cec,'shapeType':_0x4ffc74,'shapeData':{'relation':_0x4d4559}}}),_0x194211['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'shapeId':_0x121cec,'shapeType':_0x4ffc74,'shapeData':{'relation':_0x5a17fb}}});}}if(sequenceExecute(_0x27948e,_0xacb2cd)[_0x16ff56(0x13f)])return _0x49a2c5[_0x16ff56(0x197)]({'unitID':_0x116fa8,'undoMutations':_0x194211,'redoMutations':_0x27948e}),!![];return![];}},SetSheetsShapeRotateCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.set-shape-rotate','handler':(_0x26cd92,_0x7a8ba7)=>{const _0x2d6af2=_0x341a97;var _0x4b96b8,_0x55972b;const _0xe82bad=getSheetCommandTarget(_0x26cd92[_0x2d6af2(0x17f)](IUniverInstanceService),_0x7a8ba7);if(!_0xe82bad)return![];const _0x24a1a5=_0x26cd92[_0x2d6af2(0x17f)](SheetSkeletonService),{unitId:_0x3acd4d,subUnitId:_0x4d34e0}=_0xe82bad,_0x3ad027=_0x24a1a5[_0x2d6af2(0x14a)](_0x3acd4d,_0x4d34e0);if(!_0x3ad027)return![];const _0xb0da03=_0x26cd92['get'](ISheetDrawingService),{shapeId:_0xceb1c9,rotate:_0xcfdb3b}=_0x7a8ba7,_0x157100=_0xb0da03['getDrawingByParam']({'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'drawingId':_0xceb1c9});if(!_0x157100)return![];const _0x37271b=_0x26cd92[_0x2d6af2(0x17f)](SheetsShapeService)[_0x2d6af2(0x16d)](_0x3acd4d,_0x4d34e0,_0xceb1c9);if(!_0x37271b)return![];const _0x574c07=_0x26cd92[_0x2d6af2(0x17f)](ICommandService),_0x1dd945=_0x26cd92[_0x2d6af2(0x17f)](IUndoRedoService),_0x545699=_0x26cd92[_0x2d6af2(0x17f)](SheetInterceptorService),_0x2de8e2={..._0x157100['transform']};if(_0xcfdb3b!==void 0x0)_0x2de8e2[_0x2d6af2(0x177)]=(_0x2de8e2[_0x2d6af2(0x177)]||0x0)+_0xcfdb3b;const _0x44d370=transformToDrawingPosition(_0x2de8e2,_0x3ad027),_0x5c390e=transformToAxisAlignPosition(_0x2de8e2,_0x3ad027),_0x54b1b3=_0x37271b[_0x2d6af2(0x144)](),_0x3f8622=_0x37271b[_0x2d6af2(0x1a0)](),_0x7e192d={'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'drawingId':_0xceb1c9,'drawingType':DrawingTypeEnum[_0x2d6af2(0x13c)],'sheetTransform':_0x44d370,'transform':_0x2de8e2,'data':{'shapeType':_0x54b1b3,'shapeData':_0x3f8622},'axisAlignSheetTransform':_0x5c390e,'allowTransform':!![]},{undo:_0x4a7256,redo:_0x54d9cb,objects:_0xfccf9a}=_0xb0da03[_0x2d6af2(0x14e)]([_0x7e192d]),_0x323277=_0x545699[_0x2d6af2(0x154)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x3acd4d,'drawings':[_0x7e192d]}}),_0x466e57=[...(_0x4b96b8=_0x323277[_0x2d6af2(0x1a3)])!==null&&_0x4b96b8!==void 0x0?_0x4b96b8:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'op':_0x54d9cb,'objects':_0xfccf9a,'type':DrawingApplyType[_0x2d6af2(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x3acd4d]},..._0x323277['redos']],_0x59aa1c=[...(_0x55972b=_0x323277['preUndos'])!==null&&_0x55972b!==void 0x0?_0x55972b:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'op':_0x4a7256,'objects':_0xfccf9a,'type':DrawingApplyType[_0x2d6af2(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x3acd4d]},..._0x323277[_0x2d6af2(0x146)]];if(sequenceExecute(_0x466e57,_0x574c07)[_0x2d6af2(0x13f)])return _0x1dd945[_0x2d6af2(0x197)]({'unitID':_0x3acd4d,'undoMutations':_0x59aa1c,'redoMutations':_0x466e57}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x180),'handler':(_0x2fc3c0,_0x83e9e8)=>{const _0x408c64=_0x341a97;var _0x11b845;const _0x155142=getSheetCommandTarget(_0x2fc3c0[_0x408c64(0x17f)](IUniverInstanceService),_0x83e9e8);if(!_0x155142)return![];const {unitId:_0x20614c,subUnitId:_0x37a35d}=_0x155142,{shapeId:_0x4a49ea}=_0x83e9e8,_0x35f10c=_0x2fc3c0[_0x408c64(0x17f)](SheetsShapeService)['getShapeModel'](_0x20614c,_0x37a35d,_0x4a49ea);if(!_0x35f10c)return![];const _0xd1dce5=_0x35f10c[_0x408c64(0x15d)](),_0x10f4f0=(_0x11b845=_0xd1dce5===null||_0xd1dce5===void 0x0?void 0x0:_0xd1dce5[_0x408c64(0x196)])!==null&&_0x11b845!==void 0x0?_0x11b845:!![],_0xd70d8a=!_0x10f4f0,_0x21756a=_0x2fc3c0[_0x408c64(0x17f)](ICommandService),_0x5c2fb7=_0x2fc3c0[_0x408c64(0x17f)](IUndoRedoService),_0x2ce2a9={'unitId':_0x20614c,'subUnitId':_0x37a35d,'shapeId':_0x4a49ea,'shapeData':{'shapeText':{'isHorizontal':_0xd70d8a}}},_0x453dc5={'unitId':_0x20614c,'subUnitId':_0x37a35d,'shapeId':_0x4a49ea,'shapeData':{'shapeText':{'isHorizontal':_0x10f4f0}}},_0x5ca4a2=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x2ce2a9}],_0x5e4330=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x453dc5}];if(sequenceExecute(_0x5ca4a2,_0x21756a)['result'])return _0x5c2fb7[_0x408c64(0x197)]({'unitID':_0x20614c,'undoMutations':_0x5e4330,'redoMutations':_0x5ca4a2}),!![];return![];}},UpdateConnectorRelationCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x17b),'handler':(_0x46efbc,_0x30959f)=>{const _0x1938ab=_0x341a97;var _0x16e480,_0x56ad39,_0x14b513,_0x54064f;const _0x153ded=getSheetCommandTarget(_0x46efbc[_0x1938ab(0x17f)](IUniverInstanceService),_0x30959f);if(!_0x153ded)return![];const _0x317455=_0x46efbc['get'](SheetSkeletonService),{unitId:_0x45c90e,subUnitId:_0x4153c6}=_0x153ded,_0x4b8984=_0x317455['getSkeleton'](_0x45c90e,_0x4153c6);if(!_0x4b8984)return![];const _0x1e370b=_0x46efbc[_0x1938ab(0x17f)](ISheetDrawingService),{connectorShapeId:_0xc75386,width:_0x4e428a,height:_0x4dd56b,left:_0x53385a,top:_0x47794d,flipX:_0x42826e,flipY:_0x50f0d5,rotation:_0x3896c1,oldAdjustValues:_0x5ddb7e,newAdjustValues:_0x154331,oldLineType:_0x2975cf,newLineType:_0x8ef532,oldRelation:_0x3163b7,newRelation:_0x35a282}=_0x30959f,_0x2bff1e=_0x1e370b['getDrawingByParam']({'unitId':_0x45c90e,'subUnitId':_0x4153c6,'drawingId':_0xc75386});if(!_0x2bff1e)return![];const _0x346660=_0x46efbc[_0x1938ab(0x17f)](SheetsShapeService)[_0x1938ab(0x16d)](_0x45c90e,_0x4153c6,_0xc75386);if(!_0x346660)return![];const _0x3a4bb6=_0x46efbc[_0x1938ab(0x17f)](ICommandService),_0x45d8b1=_0x46efbc[_0x1938ab(0x17f)](IUndoRedoService),_0x45b2fb=_0x46efbc[_0x1938ab(0x17f)](SheetInterceptorService),_0x490df8={..._0x2bff1e['transform'],'width':_0x4e428a,'height':_0x4dd56b,'left':_0x53385a,'top':_0x47794d,'flipX':_0x42826e,'flipY':_0x50f0d5,'angle':(_0x16e480=_0x3896c1!==null&&_0x3896c1!==void 0x0?_0x3896c1:(_0x56ad39=_0x2bff1e[_0x1938ab(0x17e)])===null||_0x56ad39===void 0x0?void 0x0:_0x56ad39[_0x1938ab(0x177)])!==null&&_0x16e480!==void 0x0?_0x16e480:0x0},_0x4c9ec7=transformToDrawingPosition(_0x490df8,_0x4b8984),_0x473bca=transformToAxisAlignPosition(_0x490df8,_0x4b8984),_0x51c1f7=_0x346660[_0x1938ab(0x144)](),_0x4cb55e=_0x346660[_0x1938ab(0x1a0)](),_0x1f286c={'unitId':_0x45c90e,'subUnitId':_0x4153c6,'drawingId':_0xc75386,'drawingType':DrawingTypeEnum[_0x1938ab(0x13c)],'sheetTransform':_0x4c9ec7,'transform':_0x490df8,'data':{'shapeType':_0x8ef532||_0x2975cf||_0x51c1f7,'shapeData':{..._0x4cb55e,'adjustValues':_0x154331||_0x5ddb7e||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x1a7)]),'relation':_0x35a282||_0x3163b7||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x17d)])}},'axisAlignSheetTransform':_0x473bca,'allowTransform':!![]},{undo:_0xcf3d79,redo:_0x307c1b,objects:_0x341393}=_0x1e370b[_0x1938ab(0x14e)]([_0x1f286c]),_0x4a8d0c=_0x45b2fb['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x45c90e,'drawings':[_0x1f286c]}}),_0x34e09f=[...(_0x14b513=_0x4a8d0c[_0x1938ab(0x1a3)])!==null&&_0x14b513!==void 0x0?_0x14b513:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'op':_0x307c1b,'objects':_0x341393,'type':DrawingApplyType[_0x1938ab(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x45c90e]},..._0x4a8d0c[_0x1938ab(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'shapeId':_0xc75386,'shapeType':_0x8ef532,'shapeData':{'adjustValues':_0x154331,'relation':_0x35a282}}}],_0x5c9f86=[...(_0x54064f=_0x4a8d0c['preUndos'])!==null&&_0x54064f!==void 0x0?_0x54064f:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'op':_0xcf3d79,'objects':_0x341393,'type':DrawingApplyType[_0x1938ab(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x45c90e]},..._0x4a8d0c[_0x1938ab(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'shapeId':_0xc75386,'shapeType':_0x51c1f7,'shapeData':{..._0x4cb55e,'adjustValues':_0x5ddb7e||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x1a7)]),'relation':_0x3163b7||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x17d)])}}}];if(sequenceExecute(_0x34e09f,_0x3a4bb6)[_0x1938ab(0x13f)])return _0x45d8b1[_0x1938ab(0x197)]({'unitID':_0x45c90e,'undoMutations':_0x5c9f86,'redoMutations':_0x34e09f}),!![];return![];}},UpdateLineShapeResizeCommand={'type':CommandType['COMMAND'],'id':_0x341a97(0x114),'handler':(_0x1f13ce,_0x42dec3)=>{const _0x146e4a=_0x341a97;var _0x17fba3,_0x5b7ce6;const _0x4ce93b=getSheetCommandTarget(_0x1f13ce['get'](IUniverInstanceService),_0x42dec3);if(!_0x4ce93b)return![];const _0x3e63bb=_0x1f13ce[_0x146e4a(0x17f)](SheetSkeletonService),{unitId:_0x20b49b,subUnitId:_0x5a9bb0}=_0x4ce93b,_0x2cc0ee=_0x3e63bb['getSkeleton'](_0x20b49b,_0x5a9bb0);if(!_0x2cc0ee)return![];const _0x2eab1b=_0x1f13ce['get'](ISheetDrawingService),{shapeId:_0x1551b2,width:_0xba5c2c,height:_0x12f435,left:_0x2de522,top:_0x4b0e11,flipX:_0x24a8e0,flipY:_0x20ab62,angle:_0x4d649d,oldAdjustValues:_0x204c6b,newAdjustValues:_0x34fce7,oldLineType:_0x18686f,newLineType:_0x8b81c4}=_0x42dec3,_0x57d9d6=_0x2eab1b[_0x146e4a(0x1a1)]({'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'drawingId':_0x1551b2});if(!_0x57d9d6)return![];const _0x2400b4=_0x1f13ce[_0x146e4a(0x17f)](SheetsShapeService)['getShapeModel'](_0x20b49b,_0x5a9bb0,_0x1551b2);if(!_0x2400b4)return![];const _0x8621d0=_0x1f13ce['get'](ICommandService),_0x5d95f3=_0x1f13ce[_0x146e4a(0x17f)](IUndoRedoService),_0x4c15da=_0x1f13ce[_0x146e4a(0x17f)](SheetInterceptorService),_0x336f73={..._0x57d9d6['transform'],'width':_0xba5c2c,'height':_0x12f435,'left':_0x2de522,'top':_0x4b0e11,'flipX':_0x24a8e0,'flipY':_0x20ab62,'angle':_0x4d649d},_0xe4bdd0=transformToDrawingPosition(_0x336f73,_0x2cc0ee),_0x48a849=transformToAxisAlignPosition(_0x336f73,_0x2cc0ee),_0x92cc2a=_0x2400b4['getShapeType'](),_0x3f58e3=_0x2400b4[_0x146e4a(0x1a0)](),_0x98ff93={'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'drawingId':_0x1551b2,'drawingType':DrawingTypeEnum[_0x146e4a(0x13c)],'sheetTransform':_0xe4bdd0,'transform':_0x336f73,'data':{'shapeType':_0x8b81c4||_0x18686f||_0x92cc2a,'shapeData':{..._0x3f58e3,'adjustValues':_0x34fce7||_0x204c6b||(_0x3f58e3===null||_0x3f58e3===void 0x0?void 0x0:_0x3f58e3[_0x146e4a(0x1a7)])}},'axisAlignSheetTransform':_0x48a849,'allowTransform':!![]},{undo:_0xb8eb7b,redo:_0x5520e5,objects:_0x173ef0}=_0x2eab1b[_0x146e4a(0x14e)]([_0x98ff93]),_0x35bc12=_0x4c15da[_0x146e4a(0x154)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x20b49b,'drawings':[_0x98ff93]}}),_0x2ab597=[...(_0x17fba3=_0x35bc12[_0x146e4a(0x1a3)])!==null&&_0x17fba3!==void 0x0?_0x17fba3:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'op':_0x5520e5,'objects':_0x173ef0,'type':DrawingApplyType[_0x146e4a(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x20b49b]},..._0x35bc12[_0x146e4a(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'shapeId':_0x1551b2,'shapeType':_0x8b81c4,'shapeData':{'adjustValues':_0x34fce7}}}],_0x3b08e4=[...(_0x5b7ce6=_0x35bc12[_0x146e4a(0x163)])!==null&&_0x5b7ce6!==void 0x0?_0x5b7ce6:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'op':_0xb8eb7b,'objects':_0x173ef0,'type':DrawingApplyType['UPDATE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x20b49b]},..._0x35bc12[_0x146e4a(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'shapeId':_0x1551b2,'shapeType':_0x92cc2a,'shapeData':{..._0x3f58e3,'adjustValues':_0x204c6b||(_0x3f58e3===null||_0x3f58e3===void 0x0?void 0x0:_0x3f58e3['adjustValues'])}}}];if(sequenceExecute(_0x2ab597,_0x8621d0)[_0x146e4a(0x13f)])return _0x5d95f3['pushUndoRedo']({'unitID':_0x20b49b,'undoMutations':_0x3b08e4,'redoMutations':_0x2ab597}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x341a97(0x136),'type':CommandType[_0x341a97(0x1a9)],'handler':(_0x1a4d66,_0x5f0800)=>{const _0x374d14=_0x341a97,{unitId:_0x44794d,subUnitId:_0x11b27c,shapeType:_0x5462e4,shapeId:_0x167f93,shapeData:_0x3f0d8a}=_0x5f0800,_0x4630b9=_0x1a4d66[_0x374d14(0x17f)](SheetsShapeService)['getShapeModel'](_0x44794d,_0x11b27c,_0x167f93);if(_0x4630b9){_0x4630b9[_0x374d14(0x198)](_0x5462e4);if(_0x3f0d8a)_0x4630b9===null||_0x4630b9===void 0x0||_0x4630b9[_0x374d14(0x18d)](_0x3f0d8a);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x341a97(0x199),'type':CommandType[_0x341a97(0x13a)],'handler':(_0x1f98e9,_0x2b8649)=>{const _0x572eb4=_0x341a97;if(!_0x2b8649)return![];const _0x10e09e=_0x1f98e9['get'](ICommandService),_0x122434=_0x1f98e9[_0x572eb4(0x17f)](SheetsShapeService),_0x5c42f2=_0x1f98e9[_0x572eb4(0x17f)](IUndoRedoService),_0x261d1a=[],_0x5f9b68=[],{unitId:_0x1a0385,subUnitId:_0x4b33ef,shapeId:_0x32001a,shapeType:_0x1ea431,shapeData:_0x22e565}=_0x2b8649,_0xa5638=_0x122434['getShapeModel'](_0x1a0385,_0x4b33ef,_0x32001a);if(_0xa5638){const _0x261ede=_0xa5638['getShapeType'](),_0x5460fb=Object['assign']({},_0xa5638[_0x572eb4(0x1a0)]()),_0x3a8d7c={'unitId':_0x1a0385,'subUnitId':_0x4b33ef,'shapeId':_0x32001a,'shapeType':_0x1ea431,'shapeData':_0x22e565},_0x461769={'unitId':_0x1a0385,'subUnitId':_0x4b33ef,'shapeId':_0x32001a,'shapeType':_0x261ede,'shapeData':_0x5460fb};_0x261d1a[_0x572eb4(0x12d)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x3a8d7c}),_0x5f9b68[_0x572eb4(0x12d)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x461769});if(_0x261d1a['every'](_0x4fc471=>_0x10e09e['syncExecuteCommand'](_0x4fc471['id'],_0x4fc471[_0x572eb4(0x155)])))_0x5c42f2['pushUndoRedo']({'unitID':_0x1a0385,'redoMutations':[..._0x261d1a],'undoMutations':[..._0x5f9b68]});return!![];}return![];}};var name=_0x341a97(0x19a),version=_0x341a97(0x112);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x341a97(0x152),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends Disposable{constructor(_0x55ecd7,_0x2780d7,_0x2427e8,_0x5bd2f,_0x2c5182){const _0x432e5a=_0x341a97;super(),this[_0x432e5a(0x11c)]=_0x55ecd7,this[_0x432e5a(0x171)]=_0x2780d7,this[_0x432e5a(0x164)]=_0x2427e8,this[_0x432e5a(0x1a6)]=_0x5bd2f,this[_0x432e5a(0x138)]=_0x2c5182,this[_0x432e5a(0x160)](),this[_0x432e5a(0x14f)]();}[_0x341a97(0x160)](){const _0x21a786=_0x341a97;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x21a786(0x116)](_0x29f886=>this[_0x21a786(0x16c)](this[_0x21a786(0x11c)][_0x21a786(0x18f)](_0x29f886)));}['_initCommandInterceptor'](){const _0x25fcf4=_0x341a97;this['disposeWithMe'](this[_0x25fcf4(0x171)][_0x25fcf4(0x16b)]({'getMutations':_0x2d12b5=>{const _0x26fbb5=_0x25fcf4;if(_0x2d12b5['id']===RemoveSheetDrawingCommand['id']){const {drawings:_0x10f03a}=_0x2d12b5[_0x26fbb5(0x155)],_0x23e175=_0x10f03a[_0x26fbb5(0x179)](_0x1d903c=>_0x1d903c[_0x26fbb5(0x12f)]===DrawingTypeEnum['DRAWING_SHAPE']);if(_0x23e175[_0x26fbb5(0x17c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x3484da=[],_0x3e5bb2=[];return _0x23e175[_0x26fbb5(0x116)](_0x35020a=>{const _0x4f0835=_0x26fbb5,{unitId:_0x39af9f,subUnitId:_0xaf745,drawingId:_0x18c98a}=_0x35020a,_0x4550d7=this[_0x4f0835(0x1a6)]['getShapeModel'](_0x39af9f,_0xaf745,_0x18c98a);if(!_0x4550d7)throw new TypeError(_0x4f0835(0x19d)+_0x4550d7);_0x3484da['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x18c98a}}),_0x3e5bb2[_0x4f0835(0x12d)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x18c98a,'shapeType':_0x4550d7[_0x4f0835(0x144)](),'shapeData':_0x4550d7[_0x4f0835(0x1a0)]()}});const _0x13aba7=this[_0x4f0835(0x1a6)][_0x4f0835(0x148)](_0x39af9f,_0xaf745,_0x18c98a);if(_0x13aba7)for(const _0x5002e7 of _0x13aba7){const _0x21c301=_0x5002e7[_0x4f0835(0x129)],_0x5d795c=_0x5002e7[_0x4f0835(0x178)],_0x3165cf=_0x5d795c?{'from':void 0x0}:{'to':void 0x0},_0x4efe4b=_0x5d795c?{'from':{'shapeId':_0x5002e7[_0x4f0835(0x125)],'cxnIndex':_0x5002e7[_0x4f0835(0x110)]}}:{'to':{'shapeId':_0x5002e7[_0x4f0835(0x125)],'cxnIndex':_0x5002e7[_0x4f0835(0x110)]}};_0x3484da['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x21c301,'shapeData':{'relation':_0x3165cf}}}),_0x3e5bb2[_0x4f0835(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x21c301,'shapeData':{'relation':_0x4efe4b}}});}}),{'preRedos':_0x3484da,'redos':[],'preUndos':[],'undos':_0x3e5bb2};}if(_0x2d12b5['id']===SetSheetDrawingCommand['id']){const {drawings:_0x318d17}=_0x2d12b5[_0x26fbb5(0x155)],_0x1a5143=_0x318d17[_0x26fbb5(0x179)](_0x3f8f45=>_0x3f8f45[_0x26fbb5(0x12f)]===DrawingTypeEnum[_0x26fbb5(0x13c)]);if(_0x1a5143[_0x26fbb5(0x17c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x13dbef=[],_0x42792b=[];for(const _0x7e791f of _0x1a5143){const {unitId:_0x234d0e,subUnitId:_0x2e9720,drawingId:_0xb56d0e,transform:_0x78dd7e}=_0x7e791f;if(!_0x234d0e||!_0x2e9720||!_0xb56d0e||!_0x78dd7e)continue;const _0x421265=this[_0x26fbb5(0x1a6)][_0x26fbb5(0x16d)](_0x234d0e,_0x2e9720,_0xb56d0e);if(!_0x421265)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x421265);if(isConnectorShape(_0x421265['getShapeType']())){const _0x38c47f=this[_0x26fbb5(0x1a6)]['getLineShapeRelation'](_0x234d0e,_0x2e9720,_0xb56d0e),_0x259fe4={'from':void 0x0,'to':void 0x0};_0x38c47f&&(_0x13dbef['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x234d0e,'subUnitId':_0x2e9720,'shapeId':_0xb56d0e,'shapeData':{'relation':_0x259fe4}}}),_0x42792b[_0x26fbb5(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x234d0e,'subUnitId':_0x2e9720,'shapeId':_0xb56d0e,'shapeData':{'relation':_0x38c47f}}}));}else{const _0x4e7133=this['_sheetsShapeService'][_0x26fbb5(0x148)](_0x234d0e,_0x2e9720,_0xb56d0e);if(_0x4e7133&&_0x4e7133[_0x26fbb5(0x17c)]>0x0)for(const _0x16a20f of _0x4e7133){const _0x1434e2=_0x16a20f[_0x26fbb5(0x129)],_0x1eee69=_0x16a20f['isFrom'],_0x22d791=this[_0x26fbb5(0x1a6)][_0x26fbb5(0x16d)](_0x234d0e,_0x2e9720,_0x1434e2);if(!_0x22d791)continue;const _0x5bea7b=_0x22d791[_0x26fbb5(0x14b)](),_0x31c2e0=_0x22d791['getEndConnectInfo']();if(_0x5bea7b&&_0x31c2e0)this[_0x26fbb5(0x120)](_0x234d0e,_0x2e9720,_0x1434e2,_0x22d791,_0x5bea7b,_0x31c2e0,_0x13dbef,_0x42792b,_0xb56d0e,_0x78dd7e);else this[_0x26fbb5(0x189)](_0x234d0e,_0x2e9720,_0x1434e2,_0x22d791,_0x1eee69?_0x5bea7b:_0x31c2e0,_0x1eee69,_0x13dbef,_0x42792b,_0xb56d0e,_0x78dd7e);}}}return{'preRedos':[],'redos':_0x13dbef,'preUndos':_0x42792b,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x341a97(0x128)](_0x53b388,_0x58614f,_0xe14842,_0x5d5a26,_0x47e603){const _0x46f1ec=_0x341a97;if(!_0x58614f||!_0xe14842)return null;const {shapeId:_0x46bdce,cxnIndex:_0x261feb}=_0x53b388,_0x1b1757=this[_0x46f1ec(0x1a6)]['getShapeModel'](_0x58614f,_0xe14842,_0x46bdce);if(!_0x1b1757)return null;const _0x4bf59c=this['_drawingManagerService'][_0x46f1ec(0x1a1)]({'unitId':_0x58614f,'subUnitId':_0xe14842,'drawingId':_0x46bdce});if(!(_0x4bf59c===null||_0x4bf59c===void 0x0?void 0x0:_0x4bf59c[_0x46f1ec(0x17e)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x5b5bac}=_0x4bf59c[_0x46f1ec(0x17e)];if(_0x47e603&&_0x5d5a26===_0x46bdce){var _0x259e62,_0x445f7c,_0x1590e7,_0x14f501,_0x42aff3,_0x17cd8b,_0x45b485;left=(_0x259e62=_0x47e603['left'])!==null&&_0x259e62!==void 0x0?_0x259e62:left,top=(_0x445f7c=_0x47e603[_0x46f1ec(0x13b)])!==null&&_0x445f7c!==void 0x0?_0x445f7c:top,width=(_0x1590e7=_0x47e603[_0x46f1ec(0x115)])!==null&&_0x1590e7!==void 0x0?_0x1590e7:width,height=(_0x14f501=_0x47e603[_0x46f1ec(0x165)])!==null&&_0x14f501!==void 0x0?_0x14f501:height,flipX=(_0x42aff3=_0x47e603['flipX'])!==null&&_0x42aff3!==void 0x0?_0x42aff3:flipX,flipY=(_0x17cd8b=_0x47e603[_0x46f1ec(0x13d)])!==null&&_0x17cd8b!==void 0x0?_0x17cd8b:flipY,_0x5b5bac=(_0x45b485=_0x47e603[_0x46f1ec(0x177)])!==null&&_0x45b485!==void 0x0?_0x45b485:_0x5b5bac;}_0x1b1757['updateContext']({'width':width,'height':height});const _0x27df96=_0x1b1757[_0x46f1ec(0x153)]()['find'](_0x793e08=>_0x793e08[_0x46f1ec(0x12c)]===_0x261feb);if(!_0x27df96)return null;let _0x1c22a3=flipX?width-_0x27df96['x']:_0x27df96['x'],_0x49b04d=flipY?height-_0x27df96['y']:_0x27df96['y'];if(_0x5b5bac!==0x0&&_0x5b5bac!==void 0x0&&_0x5b5bac!==null){const _0x334e1d=_0x5b5bac*Math['PI']/0xb4,_0x388bf4=Math[_0x46f1ec(0x15f)](_0x334e1d),_0x1fdb65=Math['sin'](_0x334e1d),_0x17c5b5=width/0x2,_0x4cd26f=height/0x2,_0x712111=_0x1c22a3-_0x17c5b5,_0x3cac0c=_0x49b04d-_0x4cd26f;_0x1c22a3=_0x17c5b5+_0x712111*_0x388bf4-_0x3cac0c*_0x1fdb65,_0x49b04d=_0x4cd26f+_0x712111*_0x1fdb65+_0x3cac0c*_0x388bf4;}_0x1c22a3+=left,_0x49b04d+=top;let _0x42b729=_0x27df96[_0x46f1ec(0x19e)]/0xea60;if(flipX)_0x42b729=0xb4-_0x42b729;if(flipY)_0x42b729=-_0x42b729;_0x42b729+=_0x5b5bac||0x0,_0x42b729=(_0x42b729%0x168+0x168)%0x168;const _0x3e27e2=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x5b5bac||0x0);return{'point':{'x':_0x1c22a3,'y':_0x49b04d},'angle':_0x42b729,'bounds':_0x3e27e2};}[_0x341a97(0x120)](_0x898107,_0x120937,_0x25dd1d,_0x529417,_0x13b2a7,_0x1fce68,_0x324e27,_0x360b13,_0x5af694,_0x21d4c0){const _0x159015=_0x341a97,_0x4df202=this[_0x159015(0x164)][_0x159015(0x14a)](_0x898107,_0x120937);if(!_0x4df202)return;const _0x100869=_0x529417[_0x159015(0x18a)](),_0x1c80c6=_0x529417[_0x159015(0x16e)](),_0x47609e={},_0x21c28d={};_0x1c80c6[_0x159015(0x116)](_0x10c5a6=>{const _0x4230ad=_0x159015,_0x20c6ab=_0x529417[_0x4230ad(0x188)](_0x10c5a6);_0x21c28d[_0x10c5a6]=_0x20c6ab!==null&&_0x20c6ab!==void 0x0?_0x20c6ab:0x0;});const _0x1da5ba=this[_0x159015(0x128)](_0x13b2a7,_0x898107,_0x120937,_0x5af694,_0x21d4c0),_0x50a22f=this[_0x159015(0x128)](_0x1fce68,_0x898107,_0x120937,_0x5af694,_0x21d4c0);if(_0x1da5ba&&_0x50a22f){const _0x5932ad=_0x529417['getShapeType'](),_0x483feb=routeConnectorLineShape(_0x1da5ba,_0x50a22f,_0x5932ad);let _0x24e160=_0x5932ad;if(_0x483feb){const _0x29572c=computeConnectorRouteLayout(_0x483feb,_0x529417[_0x159015(0x144)]()),_0x795777=this['_drawingManagerService'][_0x159015(0x113)](_0x898107,_0x120937);if(_0x795777&&_0x795777[_0x25dd1d]){const _0x4a0b79=_0x795777[_0x25dd1d];_0x24e160=_0x29572c[_0x159015(0x16f)];for(const [_0x520860,_0x3ec193]of Object['entries'](_0x29572c[_0x159015(0x1a7)]))_0x47609e[_0x520860]=_0x3ec193;const _0x142e68={..._0x4a0b79[_0x159015(0x17e)],'width':_0x29572c['worldRect'][_0x159015(0x115)],'height':_0x29572c[_0x159015(0x1aa)]['height'],'left':_0x29572c['worldRect'][_0x159015(0x149)],'top':_0x29572c[_0x159015(0x1aa)][_0x159015(0x13b)],'flipX':_0x29572c[_0x159015(0x1aa)]['flipX'],'flipY':_0x29572c[_0x159015(0x1aa)]['flipY'],'angle':_0x29572c['rotation']},_0x496876=transformToDrawingPosition(_0x142e68,_0x4df202),_0x563867=transformToAxisAlignPosition(_0x142e68,_0x4df202),_0xc3d02c={'unitId':_0x898107,'subUnitId':_0x120937,'drawingType':DrawingTypeEnum[_0x159015(0x13c)],'drawingId':_0x25dd1d,'transform':_0x142e68,'sheetTransform':_0x496876,'axisAlignSheetTransform':_0x563867},{unitId:_0x53cd12,subUnitId:_0x4f6a54,undo:_0x2821c6,redo:_0x255e66,objects:_0x2be59}=this['_drawingManagerService'][_0x159015(0x14e)]([_0xc3d02c]);_0x324e27[_0x159015(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x53cd12,'subUnitId':_0x4f6a54,'op':_0x255e66,'objects':_0x2be59,'type':DrawingApplyType['UPDATE']}}),_0x360b13[_0x159015(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x53cd12,'subUnitId':_0x4f6a54,'op':_0x2821c6,'objects':_0x2be59,'type':DrawingApplyType[_0x159015(0x157)]}});}_0x529417[_0x159015(0x173)]();}_0x324e27[_0x159015(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x898107,'subUnitId':_0x120937,'shapeId':_0x25dd1d,'shapeType':_0x24e160,'shapeData':{'adjustValues':_0x47609e,'relation':_0x100869}}}),_0x360b13[_0x159015(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x898107,'subUnitId':_0x120937,'shapeId':_0x25dd1d,'shapeType':_0x5932ad,'shapeData':{'adjustValues':_0x21c28d,'relation':_0x100869}}});}}[_0x341a97(0x189)](_0x5480a9,_0x301915,_0x7a7d8f,_0x49169d,_0x1e727e,_0xda7fa4,_0x4e0bf1,_0x2bee4b,_0x5a6d8c,_0x3592c0){const _0x5e402d=_0x341a97;var _0x20610f;if(!_0x1e727e)return;const _0x2fa567=this[_0x5e402d(0x164)]['getSkeleton'](_0x5480a9,_0x301915);if(!_0x2fa567)return;const _0x5effe1=(_0x20610f=this['_drawingManagerService']['getDrawingByParam']({'unitId':_0x5480a9,'subUnitId':_0x301915,'drawingId':_0x5a6d8c}))===null||_0x20610f===void 0x0?void 0x0:_0x20610f[_0x5e402d(0x17e)];if(!_0x5effe1)return;const _0x1882e7=_0x5effe1['left']!==_0x3592c0[_0x5e402d(0x149)]||_0x5effe1[_0x5e402d(0x13b)]!==_0x3592c0[_0x5e402d(0x13b)],_0x5b6c71=_0x5effe1[_0x5e402d(0x115)]!==_0x3592c0[_0x5e402d(0x115)]||_0x5effe1[_0x5e402d(0x165)]!==_0x3592c0['height'],_0x2907c2=_0x5effe1[_0x5e402d(0x133)]!==_0x3592c0[_0x5e402d(0x133)]||_0x5effe1['flipY']!==_0x3592c0['flipY'],_0x58427a=_0x5effe1[_0x5e402d(0x177)]!==_0x3592c0[_0x5e402d(0x177)];if(_0x1882e7&&!_0x5b6c71&&!_0x2907c2&&!_0x58427a){var _0x1f1678,_0x4c76aa,_0x5cdb31,_0x396f07;const _0x427697=((_0x1f1678=_0x3592c0[_0x5e402d(0x149)])!==null&&_0x1f1678!==void 0x0?_0x1f1678:0x0)-((_0x4c76aa=_0x5effe1[_0x5e402d(0x149)])!==null&&_0x4c76aa!==void 0x0?_0x4c76aa:0x0),_0x3b95c5=((_0x5cdb31=_0x3592c0[_0x5e402d(0x13b)])!==null&&_0x5cdb31!==void 0x0?_0x5cdb31:0x0)-((_0x396f07=_0x5effe1['top'])!==null&&_0x396f07!==void 0x0?_0x396f07:0x0),_0x47411d=this[_0x5e402d(0x138)][_0x5e402d(0x113)](_0x5480a9,_0x301915);if(_0x47411d&&_0x47411d[_0x7a7d8f]){var _0x16e103,_0x46f685,_0x5d0ac4,_0x340f8a;const _0x4f4001=_0x47411d[_0x7a7d8f],_0xc77154={..._0x4f4001[_0x5e402d(0x17e)],'left':((_0x16e103=(_0x46f685=_0x4f4001[_0x5e402d(0x17e)])===null||_0x46f685===void 0x0?void 0x0:_0x46f685['left'])!==null&&_0x16e103!==void 0x0?_0x16e103:0x0)+_0x427697,'top':((_0x5d0ac4=(_0x340f8a=_0x4f4001['transform'])===null||_0x340f8a===void 0x0?void 0x0:_0x340f8a[_0x5e402d(0x13b)])!==null&&_0x5d0ac4!==void 0x0?_0x5d0ac4:0x0)+_0x3b95c5},_0x44a130=transformToDrawingPosition(_0xc77154,_0x2fa567),_0x49b020=transformToAxisAlignPosition(_0xc77154,_0x2fa567),_0xc01ac2={'unitId':_0x5480a9,'subUnitId':_0x301915,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'drawingId':_0x7a7d8f,'transform':_0xc77154,'sheetTransform':_0x44a130,'axisAlignSheetTransform':_0x49b020},{unitId:_0x10f4ff,subUnitId:_0x2e7741,undo:_0x50b8a9,redo:_0x30b010,objects:_0x49212e}=this[_0x5e402d(0x138)][_0x5e402d(0x14e)]([_0xc01ac2]);_0x4e0bf1[_0x5e402d(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x10f4ff,'subUnitId':_0x2e7741,'op':_0x30b010,'objects':_0x49212e,'type':DrawingApplyType[_0x5e402d(0x157)]}}),_0x2bee4b[_0x5e402d(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x10f4ff,'subUnitId':_0x2e7741,'op':_0x50b8a9,'objects':_0x49212e,'type':DrawingApplyType[_0x5e402d(0x157)]}});}}else{const _0x5e9645=_0x49169d[_0x5e402d(0x14b)](),_0x36fe34=_0x49169d[_0x5e402d(0x193)]();this[_0x5e402d(0x120)](_0x5480a9,_0x301915,_0x7a7d8f,_0x49169d,_0x5e9645,_0x36fe34,_0x4e0bf1,_0x2bee4b,_0x5a6d8c,_0x3592c0);}}};SheetsShapeController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,Inject(SheetInterceptorService)),__decorateParam(0x2,Inject(SheetSkeletonService)),__decorateParam(0x3,Inject(SheetsShapeService)),__decorateParam(0x4,Inject(IDrawingManagerService))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends Plugin{constructor(_0x3b452b=defaultPluginConfig,_0x2ff48,_0x48da89,_0x399d6d){const _0xb82596=_0x341a97;super(),this[_0xb82596(0x16a)]=_0x3b452b,this[_0xb82596(0x123)]=_0x2ff48,this['_commandService']=_0x48da89,this[_0xb82596(0x139)]=_0x399d6d;const {..._0x2351fb}=merge({},defaultPluginConfig,this[_0xb82596(0x16a)]);this[_0xb82596(0x139)][_0xb82596(0x195)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x2351fb);}[_0x341a97(0x132)](){const _0x9bcc93=_0x341a97,_0x582692=this[_0x9bcc93(0x123)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x9bcc93(0x116)](_0x2aa18b=>_0x582692['add'](_0x2aa18b)),touchDependencies(_0x582692,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x19f),UniverInstanceType[_0x341a97(0x162)]),_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x145),_0x341a97(0x186)),_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x14d),name),_defineProperty(UniverSheetsShapePlugin,'version',version),UniverSheetsShapePlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,ICommandService),__decorateParam(0x3,IConfigService)],UniverSheetsShapePlugin);export{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,SetShapeDrawingDataCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,SheetsShapeService,ToggleSheetsShapeFlipCommand,UniverSheetsShapePlugin,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,UpdateSheetsShapeDataMutation,UpdateSheetsShapeTypeCommand,UpdateSheetsShapeTypeMutation};
1
+ const _0x524b07=_0x2d92;(function(_0x27fcbe,_0x2ec196){const _0x307b7d=_0x2d92,_0x13f26e=_0x27fcbe();while(!![]){try{const _0x3e7ef6=parseInt(_0x307b7d(0x177))/0x1*(parseInt(_0x307b7d(0x104))/0x2)+-parseInt(_0x307b7d(0x162))/0x3*(-parseInt(_0x307b7d(0x111))/0x4)+parseInt(_0x307b7d(0x17a))/0x5*(parseInt(_0x307b7d(0x103))/0x6)+-parseInt(_0x307b7d(0xfc))/0x7+parseInt(_0x307b7d(0x131))/0x8+parseInt(_0x307b7d(0x14b))/0x9*(parseInt(_0x307b7d(0x167))/0xa)+-parseInt(_0x307b7d(0x171))/0xb;if(_0x3e7ef6===_0x2ec196)break;else _0x13f26e['push'](_0x13f26e['shift']());}catch(_0xcfed1e){_0x13f26e['push'](_0x13f26e['shift']());}}}(_0x36ec,0xbf6e0));import{ShapeModel as _0x59f482,computeConnectorRouteLayout as _0x24d05d,getBasicShapeRotateBound as _0x99cd44,isConnectorShape as _0x2268cf,routeConnectorLineShape as _0x306e4f}from'@univerjs-pro/engine-shape';import{CommandType as _0x6a9665,DependentOn as _0x4d9764,Disposable as _0xf366a6,DrawingTypeEnum as _0x4b689a,ICommandService as _0x42d311,IConfigService as _0xb915cd,IResourceManagerService as _0x2be511,IUndoRedoService as _0x766309,IUniverInstanceService as _0x587f6e,Inject as _0x1c1ea5,Injector as _0x5373cb,Plugin as _0x1b8cd9,UniverInstanceType as _0x3d34e0,generateRandomId as _0x40cb57,merge as _0x508608,sequenceExecute as _0x618d40,touchDependencies as _0x44b044}from'@univerjs/core';import{SheetInterceptorService as _0x1967ce,SheetSkeletonService as _0x59bdce,getSheetCommandTarget as _0x12b758}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation as _0x1c3205,DrawingApplyType as _0x34149e,ISheetDrawingService as _0x478a50,InsertSheetDrawingCommand as _0x481590,RemoveSheetDrawingCommand as _0x114f87,SetDrawingApplyMutation as _0x42ee93,SetSheetDrawingCommand as _0x25cc72,transformToAxisAlignPosition as _0x2eabf8,transformToDrawingPosition as _0xc9c2ce}from'@univerjs/sheets-drawing';import{UniverLicensePlugin as _0x578903}from'@univerjs-pro/license';import{IDrawingManagerService as _0x4b5bfb}from'@univerjs/drawing';const I=0xc8,L=0xc8;function R(_0x3546e6){'@babel/helpers - typeof';const _0x11e3cd=_0x2d92;return R=typeof Symbol==_0x11e3cd(0x141)&&typeof Symbol[_0x11e3cd(0x180)]==_0x11e3cd(0x122)?function(_0x49cfab){return typeof _0x49cfab;}:function(_0x2fe95a){const _0x79240d=_0x11e3cd;return _0x2fe95a&&typeof Symbol==_0x79240d(0x141)&&_0x2fe95a['constructor']===Symbol&&_0x2fe95a!==Symbol[_0x79240d(0x16b)]?_0x79240d(0x122):typeof _0x2fe95a;},R(_0x3546e6);}function z(_0x246f1f,_0x57f8fb){const _0x2d5997=_0x2d92;if(R(_0x246f1f)!=_0x2d5997(0x143)||!_0x246f1f)return _0x246f1f;var _0x5eb0bb=_0x246f1f[Symbol[_0x2d5997(0x155)]];if(_0x5eb0bb!==void 0x0){var _0x1fb562=_0x5eb0bb[_0x2d5997(0x13e)](_0x246f1f,_0x57f8fb||'default');if(R(_0x1fb562)!=_0x2d5997(0x143))return _0x1fb562;throw TypeError(_0x2d5997(0x136));}return(_0x57f8fb===_0x2d5997(0x17d)?String:Number)(_0x246f1f);}function B(_0x1caf8d){const _0x50dbda=_0x2d92;var _0x37724f=z(_0x1caf8d,_0x50dbda(0x17d));return R(_0x37724f)==_0x50dbda(0x122)?_0x37724f:_0x37724f+'';}function V(_0x42f71f,_0x516a61,_0x3125c1){return(_0x516a61=B(_0x516a61))in _0x42f71f?Object['defineProperty'](_0x42f71f,_0x516a61,{'value':_0x3125c1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x42f71f[_0x516a61]=_0x3125c1,_0x42f71f;}var H=class extends _0xf366a6{constructor(){const _0xcff9ba=_0x2d92;super(),V(this,'_shapes',new Map()),V(this,_0xcff9ba(0x160),new Set()),V(this,_0xcff9ba(0x14e),new Set());}[_0x524b07(0x154)](_0x35f465,_0x841d17,_0x39bf1){const _0x1bb4a8=_0x524b07;let _0x26a81e=new _0x59f482(_0x35f465,_0x841d17,_0x39bf1);return this[_0x1bb4a8(0x120)][_0x1bb4a8(0x18b)](_0x841d17,_0x26a81e),_0x2268cf(_0x35f465)&&this[_0x1bb4a8(0x160)][_0x1bb4a8(0x192)](_0x841d17),_0x26a81e;}[_0x524b07(0x13d)](_0x5f049f){const _0x415291=_0x524b07;let _0x39e29b=[];for(let _0x4e140a of this['_linesIds']){let _0x5caf36=this[_0x415291(0x120)]['get'](_0x4e140a);if(_0x5caf36){let _0x3fdb90=_0x5caf36['getShapeRelation']();if(_0x3fdb90){var _0x5d41dd,_0x20cb6d;((_0x5d41dd=_0x3fdb90[_0x415291(0x16f)])==null?void 0x0:_0x5d41dd['shapeId'])===_0x5f049f&&_0x39e29b[_0x415291(0x17e)]({..._0x3fdb90[_0x415291(0x16f)],'lineShapeId':_0x4e140a,'isFrom':!0x0}),((_0x20cb6d=_0x3fdb90['to'])==null?void 0x0:_0x20cb6d[_0x415291(0x18c)])===_0x5f049f&&_0x39e29b[_0x415291(0x17e)]({..._0x3fdb90['to'],'lineShapeId':_0x4e140a,'isFrom':!0x1});}}}return _0x39e29b;}['getLineShapeRelation'](_0x261ad6){const _0x11c869=_0x524b07;let _0x168a69=this[_0x11c869(0x120)][_0x11c869(0x152)](_0x261ad6);if(_0x168a69)return _0x168a69['getShapeRelation']();}[_0x524b07(0x179)](_0x1cbf5b){const _0x470203=_0x524b07;let _0x495e14=this[_0x470203(0x120)][_0x470203(0x152)](_0x1cbf5b);if(_0x495e14)return _0x495e14['getShapeType']();}[_0x524b07(0x168)](_0x128f02){const _0x18ba78=_0x524b07;return this[_0x18ba78(0x120)][_0x18ba78(0x176)](_0x128f02);}['removeShape'](_0x56c4ea){const _0x3a73a7=_0x524b07;let _0xfd2f2=this[_0x3a73a7(0x120)][_0x3a73a7(0x152)](_0x56c4ea);_0xfd2f2&&(_0x2268cf(_0xfd2f2['getShapeType']())&&this[_0x3a73a7(0x160)][_0x3a73a7(0xfb)](_0x56c4ea),this['_shapes'][_0x3a73a7(0xfb)](_0x56c4ea));}[_0x524b07(0xff)](){const _0x415f05=_0x524b07;let _0x3220a7=[];return this[_0x415f05(0x120)]['forEach'](_0x506429=>{const _0x57b4b9=_0x415f05;_0x3220a7[_0x57b4b9(0x17e)](_0x506429['toJSON']());}),_0x3220a7;}[_0x524b07(0x169)](_0xe8e45e){const _0xcaad60=_0x524b07;for(let _0x447443 of _0xe8e45e){let {id:_0xbb7f43,shapeType:_0x15f3c6}=_0x447443,_0x2c93c1=this[_0xcaad60(0x154)](_0x15f3c6,_0xbb7f43,_0x447443[_0xcaad60(0x139)]);_0x2c93c1&&_0x2c93c1['isLineShape']()&&this['_linesIds']['add'](_0xbb7f43);}}[_0x524b07(0x12f)](){const _0x67b7c9=_0x524b07;this[_0x67b7c9(0x184)]||(this[_0x67b7c9(0x120)]['forEach'](_0x362612=>{_0x362612['dispose']();}),this[_0x67b7c9(0x120)][_0x67b7c9(0x11f)](),this['_linesIds'][_0x67b7c9(0x11f)](),this[_0x67b7c9(0x14e)][_0x67b7c9(0x11f)](),super[_0x67b7c9(0x12f)]());}};function U(_0x3fe4f9,_0x4c3863){return function(_0x4c388b,_0x3aeaa0){_0x4c3863(_0x4c388b,_0x3aeaa0,_0x3fe4f9);};}function _0x2d92(_0x9d0e11,_0x5d8d14){_0x9d0e11=_0x9d0e11-0xfb;const _0x36ecb6=_0x36ec();let _0x2d925c=_0x36ecb6[_0x9d0e11];return _0x2d925c;}function W(_0x8df62a,_0x245f0d,_0x311740,_0x4799d6){const _0x26d230=_0x524b07;var _0x29310c=arguments[_0x26d230(0x142)],_0x3fb4c8=_0x29310c<0x3?_0x245f0d:_0x4799d6===null?_0x4799d6=Object[_0x26d230(0x12d)](_0x245f0d,_0x311740):_0x4799d6,_0xe6cfc0;if(typeof Reflect==_0x26d230(0x143)&&typeof Reflect[_0x26d230(0x144)]==_0x26d230(0x141))_0x3fb4c8=Reflect['decorate'](_0x8df62a,_0x245f0d,_0x311740,_0x4799d6);else{for(var _0x50f04b=_0x8df62a[_0x26d230(0x142)]-0x1;_0x50f04b>=0x0;_0x50f04b--)(_0xe6cfc0=_0x8df62a[_0x50f04b])&&(_0x3fb4c8=(_0x29310c<0x3?_0xe6cfc0(_0x3fb4c8):_0x29310c>0x3?_0xe6cfc0(_0x245f0d,_0x311740,_0x3fb4c8):_0xe6cfc0(_0x245f0d,_0x311740))||_0x3fb4c8);}return _0x29310c>0x3&&_0x3fb4c8&&Object[_0x26d230(0x16a)](_0x245f0d,_0x311740,_0x3fb4c8),_0x3fb4c8;}let G=class extends _0xf366a6{constructor(_0x4a6eea){const _0x199931=_0x524b07;super(),this[_0x199931(0x12a)]=_0x4a6eea,V(this,'_shapeModelManagerMap',new Map()),this[_0x199931(0x193)]();}[_0x524b07(0x107)](_0x23fa18,_0x52f663){const _0x4cc9c9=_0x524b07;let _0x425962=this[_0x4cc9c9(0x134)][_0x4cc9c9(0x152)](_0x23fa18);_0x425962||(_0x425962=new Map(),this[_0x4cc9c9(0x134)][_0x4cc9c9(0x18b)](_0x23fa18,_0x425962));let _0x32fcfc=_0x425962[_0x4cc9c9(0x152)](_0x52f663);return _0x32fcfc||(_0x32fcfc=new H(),_0x425962['set'](_0x52f663,_0x32fcfc)),_0x32fcfc;}['insertShape'](_0x210f0c,_0x24cb07,_0x443238,_0x4cdc97,_0x5d6df6){const _0x2223a3=_0x524b07;this[_0x2223a3(0x107)](_0x210f0c,_0x24cb07)[_0x2223a3(0x154)](_0x443238,_0x4cdc97,_0x5d6df6);}['removeShape'](_0x20cb49,_0x321656,_0x1743c4){const _0x2b9411=_0x524b07;this['_ensureShapeModelManager'](_0x20cb49,_0x321656)[_0x2b9411(0x11c)](_0x1743c4);}[_0x524b07(0x10f)](_0x41fd3c,_0x142ee9,_0xd5dd22){const _0x5e0836=_0x524b07;return this[_0x5e0836(0x107)](_0x41fd3c,_0x142ee9)[_0x5e0836(0x179)](_0xd5dd22);}[_0x524b07(0x179)](_0x34a533,_0x3e92a3,_0x2e8b89){const _0x2054c0=_0x524b07;return this[_0x2054c0(0x107)](_0x34a533,_0x3e92a3)[_0x2054c0(0x179)](_0x2e8b89);}[_0x524b07(0x168)](_0x6223cd,_0x3fe17c,_0x1bc277){const _0x38a1ac=_0x524b07;return this[_0x38a1ac(0x107)](_0x6223cd,_0x3fe17c)[_0x38a1ac(0x168)](_0x1bc277);}[_0x524b07(0x186)](_0x2ec128,_0x1258ac,_0x13b6f0){const _0x3b6d88=_0x524b07;return this['_ensureShapeModelManager'](_0x2ec128,_0x1258ac)[_0x3b6d88(0x179)](_0x13b6f0);}[_0x524b07(0x195)](_0x563b21,_0x6e47ac,_0x44efb7){const _0xf715d0=_0x524b07;let _0x53ab3e=this['_ensureShapeModelManager'](_0x563b21,_0x6e47ac);if(!_0x53ab3e[_0xf715d0(0x179)](_0x44efb7))return;let _0x20ebe6=_0x53ab3e[_0xf715d0(0x120)]['get'](_0x44efb7);if(_0x20ebe6)return _0x20ebe6[_0xf715d0(0x12c)]();}['getShapeModel'](_0x3d7649,_0x2920f4,_0x43edcf){const _0x5964fc=_0x524b07;return this[_0x5964fc(0x107)](_0x3d7649,_0x2920f4)[_0x5964fc(0x120)][_0x5964fc(0x152)](_0x43edcf);}[_0x524b07(0x13d)](_0x16f771,_0x1202f8,_0x256d55){const _0xeb24ea=_0x524b07;return this['_ensureShapeModelManager'](_0x16f771,_0x1202f8)[_0xeb24ea(0x13d)](_0x256d55);}[_0x524b07(0x10c)](_0x5b1016,_0x4b177b,_0x532e78){const _0x224223=_0x524b07;let _0x565a17=this['_ensureShapeModelManager'](_0x5b1016,_0x4b177b)[_0x224223(0x120)]['get'](_0x532e78);if(_0x565a17)return _0x565a17[_0x224223(0x102)]();}[_0x524b07(0x109)](){}['_serializeShapeForUnit'](_0x42acd6){const _0x28cee5=_0x524b07;let _0x584863={},_0x28df79=this['_shapeModelManagerMap'][_0x28cee5(0x152)](_0x42acd6);return _0x28df79&&_0x28df79[_0x28cee5(0x197)]((_0x725fa3,_0x431cc2)=>{const _0x44b444=_0x28cee5;let _0x15ca3e=_0x725fa3['toJSON']();_0x15ca3e[_0x44b444(0x142)]>0x0&&(_0x584863[_0x431cc2]=_0x15ca3e);}),JSON[_0x28cee5(0x13a)](_0x584863);}[_0x524b07(0x194)](_0x2e4438,_0x4094fe){const _0x36d0b3=_0x524b07;Object['keys'](_0x4094fe)[_0x36d0b3(0x197)](_0x3a2ae8=>{const _0x1c3ca4=_0x36d0b3;this[_0x1c3ca4(0x107)](_0x2e4438,_0x3a2ae8)['fromJSON'](_0x4094fe[_0x3a2ae8]);});}[_0x524b07(0xff)](){const _0x1a4a55=_0x524b07;let _0x4d0483={};return this['_shapeModelManagerMap'][_0x1a4a55(0x197)]((_0xedf202,_0x6fde18)=>{const _0x569367=_0x1a4a55;_0x4d0483[_0x6fde18]={},_0xedf202[_0x569367(0x197)]((_0x9a7ede,_0x1bc0a2)=>{const _0x44cbd7=_0x569367;_0x4d0483[_0x6fde18][_0x1bc0a2]=_0x9a7ede[_0x44cbd7(0xff)]();});}),_0x4d0483;}[_0x524b07(0x169)](_0x504f4d){const _0x2fd5e2=_0x524b07;Object[_0x2fd5e2(0x15b)](_0x504f4d)[_0x2fd5e2(0x197)](_0x18e9db=>{const _0x461e19=_0x2fd5e2;let _0x4511f2=_0x504f4d[_0x18e9db];Object['keys'](_0x4511f2)[_0x461e19(0x197)](_0x2f40b0=>{const _0x520252=_0x461e19;this['_ensureShapeModelManager'](_0x18e9db,_0x2f40b0)[_0x520252(0x169)](_0x4511f2[_0x2f40b0]);});});}[_0x524b07(0x193)](){const _0x2e5abb=_0x524b07;this[_0x2e5abb(0x12a)]['registerPluginResource']({'pluginName':_0x2e5abb(0x127),'businesses':[_0x3d34e0['UNIVER_SHEET']],'toJson':_0x5605d3=>this[_0x2e5abb(0x12e)](_0x5605d3),'parseJson':_0x2b8c5b=>JSON['parse'](_0x2b8c5b),'onLoad':(_0x31c308,_0x3496e6)=>{const _0x38907c=_0x2e5abb;this[_0x38907c(0x194)](_0x31c308,_0x3496e6);},'onUnLoad':_0x339863=>{const _0x5c77bf=_0x2e5abb;let _0x551b36=this['_shapeModelManagerMap'][_0x5c77bf(0x152)](_0x339863);_0x551b36&&(_0x551b36[_0x5c77bf(0x197)](_0xb4fd2=>{const _0x15aadf=_0x5c77bf;_0xb4fd2[_0x15aadf(0x12f)]();}),this['_shapeModelManagerMap'][_0x5c77bf(0xfb)](_0x339863));}});}['dispose'](){const _0xf57f18=_0x524b07;this['_shapeModelManagerMap'][_0xf57f18(0x197)](_0x532c88=>{_0x532c88['forEach'](_0x215b49=>{_0x215b49['dispose']();});});}};G=W([U(0x0,_0x2be511)],G);const K={'id':_0x524b07(0x112),'type':_0x6a9665[_0x524b07(0x157)],'handler':(_0x2d8c6f,_0x5b1327)=>{const _0xc6f781=_0x524b07;let {unitId:_0x3d311c,subUnitId:_0x4de21d,shapeType:_0x1c35d1,shapeId:_0x5a63cd,shapeData:_0x3c9359}=_0x5b1327;return _0x2d8c6f['get'](G)[_0xc6f781(0x190)](_0x3d311c,_0x4de21d,_0x1c35d1,_0x5a63cd,_0x3c9359),!0x0;}},q={'id':_0x524b07(0x161),'type':_0x6a9665[_0x524b07(0x157)],'handler':(_0x4aba30,_0x24212b)=>{const _0x12c8ff=_0x524b07;let {unitId:_0x402f75,subUnitId:_0x500dfb,shapeId:_0x3cce46}=_0x24212b;return _0x4aba30[_0x12c8ff(0x152)](G)[_0x12c8ff(0x11c)](_0x402f75,_0x500dfb,_0x3cce46),!0x0;}},J={'type':_0x6a9665[_0x524b07(0x135)],'id':_0x524b07(0x146),'handler':(_0x3c6260,_0x5cd0bf)=>{const _0x18db68=_0x524b07;var _0xdc0e6d,_0x34ec48;let _0x2b4404=_0x12b758(_0x3c6260[_0x18db68(0x152)](_0x587f6e),_0x5cd0bf);if(!_0x2b4404)return!0x1;let _0x3a601e=_0x3c6260[_0x18db68(0x152)](_0x59bdce),{unitId:_0x12ba5b,subUnitId:_0x11558c}=_0x2b4404,_0x546b78=_0x3a601e[_0x18db68(0x18e)](_0x12ba5b,_0x11558c);if(!_0x546b78)return!0x1;let _0x18472c=_0x3c6260['get'](_0x42d311),_0x11eb26=_0x3c6260['get'](_0x766309),_0x337d38=_0x3c6260[_0x18db68(0x152)](_0x1967ce),_0x28e0c3=_0x3c6260[_0x18db68(0x152)](_0x478a50),{shapeType:_0x555883,shapeData:_0x3974b5}=_0x5cd0bf,_0x37eb96=_0x5cd0bf['shapeId']||_0x40cb57(),_0x505347={'unitId':_0x12ba5b,'subUnitId':_0x11558c,'shapeId':_0x37eb96,'shapeType':_0x555883,'shapeData':_0x3974b5},_0x41a1b9=_0x5cd0bf[_0x18db68(0x16d)]||0xc8,_0x1a81e0=_0x5cd0bf[_0x18db68(0x118)]||0xc8,_0x9a4243=0x0,_0x24c521=0x0,_0x3c562a={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x1ecad8={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x5cd0bf[_0x18db68(0x159)]){let {x:_0x9012b4,y:_0x38b72e}=_0x5cd0bf['position'];_0x9a4243=_0x9012b4,_0x24c521=_0x38b72e,_0x3c562a=_0x546b78['getCellIndexAndOffsetByPosition'](_0x9012b4,_0x38b72e),_0x1ecad8=_0x546b78[_0x18db68(0x15d)](_0x9012b4+_0x41a1b9,_0x38b72e+_0x1a81e0);}else{if(_0x5cd0bf['range']){let {startRow:_0x2c1d8c,startColumn:_0x2cfc2b}=_0x5cd0bf[_0x18db68(0x119)];_0x3c562a={'row':_0x2c1d8c,'rowOffset':0xa,'column':_0x2cfc2b,'columnOffset':0xa};let _0xc482a9=_0x546b78[_0x18db68(0x10b)](_0x2c1d8c,_0x2cfc2b);_0x9a4243=_0xc482a9['startX']+0xa,_0x24c521=_0xc482a9[_0x18db68(0x16c)]+0xa,_0x1ecad8=_0x546b78[_0x18db68(0x15d)](_0x9a4243+_0x41a1b9,_0x24c521+_0x1a81e0);}}let _0x5e46cf={'from':_0x3c562a,'to':_0x1ecad8},_0x1ff402={'unitId':_0x12ba5b,'subUnitId':_0x11558c,'drawingId':_0x37eb96,'drawingType':_0x4b689a[_0x18db68(0x15c)],'sheetTransform':_0x5e46cf,'transform':{'left':_0x9a4243,'top':_0x24c521,'width':_0x41a1b9,'height':_0x1a81e0},'data':{'shapeType':_0x555883,'shapeData':_0x3974b5},'axisAlignSheetTransform':_0x5e46cf,'allowTransform':!0x0};_0x2268cf(_0x555883)&&(_0x1ff402[_0x18db68(0x189)][_0x18db68(0x178)]=!0x1,_0x1ff402['data'][_0x18db68(0x117)]=!0x1,_0x1ff402['data'][_0x18db68(0x129)]=!0x1,_0x1ff402[_0x18db68(0x189)][_0x18db68(0x15f)]=!0x1,_0x1ff402[_0x18db68(0x175)][_0x18db68(0x117)]=!0x1,_0x1ff402[_0x18db68(0x175)][_0x18db68(0x129)]=!0x1,_0x1ff402[_0x18db68(0x175)][_0x18db68(0x15f)]=!0x1);let {undo:_0x590910,redo:_0x10d25c,objects:_0x4e6aec}=_0x28e0c3[_0x18db68(0x116)]([_0x1ff402]),_0x2bb722=_0x337d38[_0x18db68(0x188)]({'id':_0x481590['id'],'params':{'unitId':_0x12ba5b,'drawings':[_0x1ff402]}}),_0x5b06c6=[...(_0xdc0e6d=_0x2bb722[_0x18db68(0x158)])==null?[]:_0xdc0e6d,{'id':_0x42ee93['id'],'params':{'unitId':_0x12ba5b,'subUnitId':_0x11558c,'op':_0x10d25c,'objects':_0x4e6aec,'type':_0x34149e[_0x18db68(0x106)]}},{'id':_0x1c3205['id'],'params':[_0x12ba5b]},..._0x2bb722[_0x18db68(0x10a)],{'id':K['id'],'params':_0x505347}],_0x367bd1=[{'id':q['id'],'params':{'unitId':_0x12ba5b,'subUnitId':_0x11558c,'shapeId':_0x37eb96}},...(_0x34ec48=_0x2bb722[_0x18db68(0x140)])==null?[]:_0x34ec48,{'id':_0x42ee93['id'],'params':{'unitId':_0x12ba5b,'subUnitId':_0x11558c,'op':_0x590910,'objects':_0x4e6aec,'type':_0x34149e[_0x18db68(0x11a)]}},{'id':_0x1c3205['id'],'params':[_0x12ba5b]},..._0x2bb722[_0x18db68(0x196)]];return _0x618d40(_0x5b06c6,_0x18472c)[_0x18db68(0x191)]?(_0x11eb26[_0x18db68(0x124)]({'unitID':_0x12ba5b,'undoMutations':_0x367bd1,'redoMutations':_0x5b06c6}),!0x0):!0x1;}},Y={'id':'sheet.mutation.update-shape-data','type':_0x6a9665[_0x524b07(0x157)],'handler':(_0x25f21f,_0x18d761)=>{const _0x12b2e6=_0x524b07;let {unitId:_0x1e5816,subUnitId:_0x209c83,shapeType:_0x1268db,shapeId:_0x3945,shapeData:_0x45d495}=_0x18d761,_0x2e3022=_0x25f21f[_0x12b2e6(0x152)](G)['getShapeModel'](_0x1e5816,_0x209c83,_0x3945);return _0x2e3022&&(_0x1268db!==void 0x0&&_0x2e3022[_0x12b2e6(0x109)](_0x1268db),_0x45d495&&(_0x2e3022==null||_0x2e3022['setShapeData'](_0x45d495,!0x0))),!0x0;}},ee={'type':_0x6a9665[_0x524b07(0x135)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x42be71,_0x2a0296)=>{const _0x4c773e=_0x524b07;var _0x687608,_0x21ac6b;let _0x32a0ff=_0x12b758(_0x42be71[_0x4c773e(0x152)](_0x587f6e),_0x2a0296);if(!_0x32a0ff)return!0x1;let _0x45c464=_0x42be71[_0x4c773e(0x152)](_0x59bdce),{unitId:_0x238011,subUnitId:_0x25532c}=_0x32a0ff,_0x3ec5ac=_0x45c464['ensureSkeleton'](_0x238011,_0x25532c);if(!_0x3ec5ac)return!0x1;let _0x5d7748=_0x42be71[_0x4c773e(0x152)](G),{shapeId:_0x1b308b,shapeType:_0x5767cc,shapeData:_0x156a3f,position:_0x2df105,width:_0x291491,height:_0x321146}=_0x2a0296,_0x5704c4=_0x5d7748[_0x4c773e(0x156)](_0x238011,_0x25532c,_0x1b308b);if(!_0x5704c4)return!0x1;let _0x4abeb8=_0x42be71[_0x4c773e(0x152)](_0x42d311),_0xb0defe=_0x42be71[_0x4c773e(0x152)](_0x766309),_0x21eed1=_0x42be71[_0x4c773e(0x152)](_0x1967ce),_0x27d206=_0x42be71[_0x4c773e(0x152)](_0x478a50),_0x4172cb={'unitId':_0x238011,'subUnitId':_0x25532c,'shapeId':_0x1b308b,'shapeType':_0x5767cc,'shapeData':_0x156a3f},_0x12b9d9=_0x5704c4['getShapeType'](),_0x464098=_0x5704c4[_0x4c773e(0x12c)](),{x:_0x26d75b,y:_0x4b3234}=_0x2df105,_0x188b55={'from':_0x3ec5ac[_0x4c773e(0x15d)](_0x26d75b,_0x4b3234),'to':_0x3ec5ac[_0x4c773e(0x15d)](_0x26d75b+_0x291491,_0x4b3234+_0x321146)},_0x2a3304={'unitId':_0x238011,'subUnitId':_0x25532c,'drawingId':_0x1b308b,'drawingType':_0x4b689a[_0x4c773e(0x15c)],'sheetTransform':_0x188b55,'transform':{'left':_0x26d75b,'top':_0x4b3234,'width':_0x291491,'height':_0x321146},'data':{'shapeType':_0x5767cc,'shapeData':_0x156a3f},'axisAlignSheetTransform':_0x188b55,'allowTransform':!0x0};_0x2268cf(_0x5767cc)&&(_0x2a3304[_0x4c773e(0x189)]['fill']=!0x1,_0x2a3304[_0x4c773e(0x189)][_0x4c773e(0x117)]=!0x1,_0x2a3304[_0x4c773e(0x189)]['resizeEnabled']=!0x1,_0x2a3304['data'][_0x4c773e(0x15f)]=!0x1,_0x2a3304[_0x4c773e(0x175)]['rotateEnabled']=!0x1,_0x2a3304[_0x4c773e(0x175)]['resizeEnabled']=!0x1,_0x2a3304[_0x4c773e(0x175)][_0x4c773e(0x15f)]=!0x1);let {undo:_0xd36d67,redo:_0x52e76d,objects:_0x3865ae}=_0x27d206[_0x4c773e(0x166)]([_0x2a3304]),_0x5cd039=_0x21eed1[_0x4c773e(0x188)]({'id':_0x25cc72['id'],'params':{'unitId':_0x238011,'drawings':[_0x2a3304]}}),_0x215dc5=[...(_0x687608=_0x5cd039[_0x4c773e(0x158)])==null?[]:_0x687608,{'id':_0x42ee93['id'],'params':{'unitId':_0x238011,'subUnitId':_0x25532c,'op':_0x52e76d,'objects':_0x3865ae,'type':_0x34149e['UPDATE']}},{'id':_0x1c3205['id'],'params':[_0x238011]},..._0x5cd039[_0x4c773e(0x10a)],{'id':Y['id'],'params':_0x4172cb}],_0x295b18=[...(_0x21ac6b=_0x5cd039[_0x4c773e(0x140)])==null?[]:_0x21ac6b,{'id':_0x42ee93['id'],'params':{'unitId':_0x238011,'subUnitId':_0x25532c,'op':_0xd36d67,'objects':_0x3865ae,'type':_0x34149e['UPDATE']}},{'id':_0x1c3205['id'],'params':[_0x238011]},..._0x5cd039['undos'],{'id':Y['id'],'params':{'unitId':_0x238011,'subUnitId':_0x25532c,'shapeType':_0x12b9d9,'shapeId':_0x1b308b,'shapeData':_0x464098}}];return _0x618d40(_0x215dc5,_0x4abeb8)['result']?(_0xb0defe[_0x4c773e(0x124)]({'unitID':_0x238011,'undoMutations':_0x295b18,'redoMutations':_0x215dc5}),!0x0):!0x1;}},te={'type':_0x6a9665[_0x524b07(0x135)],'id':_0x524b07(0x172),'handler':(_0x369665,_0x5c86e6)=>{const _0x530ea9=_0x524b07;var _0x395f64,_0x5dae69;let _0x4507b1=_0x12b758(_0x369665['get'](_0x587f6e),_0x5c86e6);if(!_0x4507b1)return!0x1;let _0x5ec779=_0x369665[_0x530ea9(0x152)](_0x59bdce),{unitId:_0x29e7a5,subUnitId:_0x455ab5}=_0x4507b1,_0x1715fb=_0x5ec779[_0x530ea9(0x12b)](_0x29e7a5,_0x455ab5);if(!_0x1715fb)return!0x1;let _0x2e2117=_0x369665[_0x530ea9(0x152)](_0x478a50),{shapeId:_0x4fd770,flipH:_0x4d667b,flipV:_0x5f1f68}=_0x5c86e6,_0x53e5c3=_0x2e2117['getDrawingByParam']({'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'drawingId':_0x4fd770});if(!_0x53e5c3)return!0x1;let _0x5ad668=_0x369665[_0x530ea9(0x152)](G)[_0x530ea9(0x156)](_0x29e7a5,_0x455ab5,_0x4fd770);if(!_0x5ad668)return!0x1;let _0x50f2ae=_0x369665[_0x530ea9(0x152)](_0x42d311),_0x1cf651=_0x369665[_0x530ea9(0x152)](_0x766309),_0xf26296=_0x369665[_0x530ea9(0x152)](_0x1967ce),_0x2ca05d={..._0x53e5c3[_0x530ea9(0x175)]};_0x4d667b!==void 0x0&&(_0x2ca05d[_0x530ea9(0x14d)]=!_0x2ca05d[_0x530ea9(0x14d)]),_0x5f1f68!==void 0x0&&(_0x2ca05d[_0x530ea9(0x110)]=!_0x2ca05d[_0x530ea9(0x110)]);let _0x502abf=_0xc9c2ce(_0x2ca05d,_0x1715fb),_0x37e5fa=_0x2eabf8(_0x2ca05d,_0x1715fb),_0x4a5757=_0x5ad668[_0x530ea9(0x179)](),_0xdbf15e=_0x5ad668[_0x530ea9(0x12c)](),_0xbd89ce={'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'drawingId':_0x4fd770,'drawingType':_0x4b689a['DRAWING_SHAPE'],'sheetTransform':_0x502abf,'transform':_0x2ca05d,'data':{'shapeType':_0x4a5757,'shapeData':_0xdbf15e},'axisAlignSheetTransform':_0x37e5fa,'allowTransform':!0x0},{undo:_0x38545a,redo:_0x4b25a5,objects:_0x21b20e}=_0x2e2117[_0x530ea9(0x166)]([_0xbd89ce]),_0x23fce4=_0xf26296[_0x530ea9(0x188)]({'id':_0x25cc72['id'],'params':{'unitId':_0x29e7a5,'drawings':[_0xbd89ce]}}),_0xfb8f45=[...(_0x395f64=_0x23fce4[_0x530ea9(0x158)])==null?[]:_0x395f64,{'id':_0x42ee93['id'],'params':{'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'op':_0x4b25a5,'objects':_0x21b20e,'type':_0x34149e[_0x530ea9(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x29e7a5]},..._0x23fce4[_0x530ea9(0x10a)]],_0x3ba58a=[...(_0x5dae69=_0x23fce4[_0x530ea9(0x140)])==null?[]:_0x5dae69,{'id':_0x42ee93['id'],'params':{'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'op':_0x38545a,'objects':_0x21b20e,'type':_0x34149e[_0x530ea9(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x29e7a5]},..._0x23fce4[_0x530ea9(0x196)]];if(_0x2268cf(_0x4a5757)){let _0x19e412=_0x5ad668[_0x530ea9(0x102)]();if(_0x19e412){let _0x1c1a19={..._0x19e412};_0x1c1a19[_0x530ea9(0x16f)]=void 0x0,_0x1c1a19['to']=void 0x0,_0xfb8f45[_0x530ea9(0x17e)]({'id':Y['id'],'params':{'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'shapeId':_0x4fd770,'shapeType':_0x4a5757,'shapeData':{'relation':_0x1c1a19}}}),_0x3ba58a[_0x530ea9(0x17e)]({'id':Y['id'],'params':{'unitId':_0x29e7a5,'subUnitId':_0x455ab5,'shapeId':_0x4fd770,'shapeType':_0x4a5757,'shapeData':{'relation':_0x19e412}}});}}return _0x618d40(_0xfb8f45,_0x50f2ae)[_0x530ea9(0x191)]?(_0x1cf651[_0x530ea9(0x124)]({'unitID':_0x29e7a5,'undoMutations':_0x3ba58a,'redoMutations':_0xfb8f45}),!0x0):!0x1;}},X={'type':_0x6a9665[_0x524b07(0x135)],'id':_0x524b07(0x18a),'handler':(_0x11a251,_0x3af655)=>{const _0x1b9c1e=_0x524b07;var _0x22b7c4,_0x3474f3;let _0x593a40=_0x12b758(_0x11a251['get'](_0x587f6e),_0x3af655);if(!_0x593a40)return!0x1;let _0x3bbc04=_0x11a251[_0x1b9c1e(0x152)](_0x59bdce),{unitId:_0x94136b,subUnitId:_0x1edd4c}=_0x593a40,_0x5f009b=_0x3bbc04[_0x1b9c1e(0x12b)](_0x94136b,_0x1edd4c);if(!_0x5f009b)return!0x1;let _0x306a01=_0x11a251[_0x1b9c1e(0x152)](_0x478a50),{shapeId:_0x1a2dbb,rotate:_0x310beb}=_0x3af655,_0x24c02a=_0x306a01[_0x1b9c1e(0x174)]({'unitId':_0x94136b,'subUnitId':_0x1edd4c,'drawingId':_0x1a2dbb});if(!_0x24c02a)return!0x1;let _0x4d6efa=_0x11a251['get'](G)[_0x1b9c1e(0x156)](_0x94136b,_0x1edd4c,_0x1a2dbb);if(!_0x4d6efa)return!0x1;let _0x571817=_0x11a251[_0x1b9c1e(0x152)](_0x42d311),_0x2b20cd=_0x11a251[_0x1b9c1e(0x152)](_0x766309),_0x538f6f=_0x11a251[_0x1b9c1e(0x152)](_0x1967ce),_0x31b175={..._0x24c02a['transform']};_0x310beb!==void 0x0&&(_0x31b175[_0x1b9c1e(0x182)]=(_0x31b175['angle']||0x0)+_0x310beb);let _0x104c90=_0xc9c2ce(_0x31b175,_0x5f009b),_0x5bd297=_0x2eabf8(_0x31b175,_0x5f009b),_0x2be230=_0x4d6efa['getShapeType'](),_0x5edb8b=_0x4d6efa[_0x1b9c1e(0x12c)](),_0x46c0a0={'unitId':_0x94136b,'subUnitId':_0x1edd4c,'drawingId':_0x1a2dbb,'drawingType':_0x4b689a[_0x1b9c1e(0x15c)],'sheetTransform':_0x104c90,'transform':_0x31b175,'data':{'shapeType':_0x2be230,'shapeData':_0x5edb8b},'axisAlignSheetTransform':_0x5bd297,'allowTransform':!0x0},{undo:_0x38ece1,redo:_0x240492,objects:_0x1539a3}=_0x306a01[_0x1b9c1e(0x166)]([_0x46c0a0]),_0x468b9=_0x538f6f[_0x1b9c1e(0x188)]({'id':_0x25cc72['id'],'params':{'unitId':_0x94136b,'drawings':[_0x46c0a0]}}),_0x4e39ef=[...(_0x22b7c4=_0x468b9[_0x1b9c1e(0x158)])==null?[]:_0x22b7c4,{'id':_0x42ee93['id'],'params':{'unitId':_0x94136b,'subUnitId':_0x1edd4c,'op':_0x240492,'objects':_0x1539a3,'type':_0x34149e[_0x1b9c1e(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x94136b]},..._0x468b9[_0x1b9c1e(0x10a)]],_0x4ca1fb=[...(_0x3474f3=_0x468b9[_0x1b9c1e(0x140)])==null?[]:_0x3474f3,{'id':_0x42ee93['id'],'params':{'unitId':_0x94136b,'subUnitId':_0x1edd4c,'op':_0x38ece1,'objects':_0x1539a3,'type':_0x34149e['UPDATE']}},{'id':_0x1c3205['id'],'params':[_0x94136b]},..._0x468b9['undos']];return _0x618d40(_0x4e39ef,_0x571817)[_0x1b9c1e(0x191)]?(_0x2b20cd[_0x1b9c1e(0x124)]({'unitID':_0x94136b,'undoMutations':_0x4ca1fb,'redoMutations':_0x4e39ef}),!0x0):!0x1;}},Z={'type':_0x6a9665[_0x524b07(0x135)],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x1bb721,_0xa6ab78)=>{const _0x2f5202=_0x524b07;var _0x468301;let _0xdb49c3=_0x12b758(_0x1bb721[_0x2f5202(0x152)](_0x587f6e),_0xa6ab78);if(!_0xdb49c3)return!0x1;let {unitId:_0x177b96,subUnitId:_0x59d5c8}=_0xdb49c3,{shapeId:_0x4edc5c}=_0xa6ab78,_0x57b9c9=_0x1bb721[_0x2f5202(0x152)](G)[_0x2f5202(0x156)](_0x177b96,_0x59d5c8,_0x4edc5c);if(!_0x57b9c9)return!0x1;let _0xdffda1=_0x57b9c9[_0x2f5202(0x151)](),_0x36ebfd=(_0x468301=_0xdffda1==null?void 0x0:_0xdffda1[_0x2f5202(0x14c)])==null?!0x0:_0x468301,_0x1e43b7=!_0x36ebfd,_0x4f4013=_0x1bb721[_0x2f5202(0x152)](_0x42d311),_0x545b08=_0x1bb721[_0x2f5202(0x152)](_0x766309),_0x47b2ba={'unitId':_0x177b96,'subUnitId':_0x59d5c8,'shapeId':_0x4edc5c,'shapeData':{'shapeText':{'isHorizontal':_0x1e43b7}}},_0x4fee5f={'unitId':_0x177b96,'subUnitId':_0x59d5c8,'shapeId':_0x4edc5c,'shapeData':{'shapeText':{'isHorizontal':_0x36ebfd}}},_0x42ceca=[{'id':Y['id'],'params':_0x47b2ba}],_0x5a96da=[{'id':Y['id'],'params':_0x4fee5f}];return _0x618d40(_0x42ceca,_0x4f4013)[_0x2f5202(0x191)]?(_0x545b08[_0x2f5202(0x124)]({'unitID':_0x177b96,'undoMutations':_0x5a96da,'redoMutations':_0x42ceca}),!0x0):!0x1;}},ne={'type':_0x6a9665[_0x524b07(0x135)],'id':'sheet.command.update-connector-relation','handler':(_0xd02ff,_0x3266b8)=>{const _0x273fd3=_0x524b07;var _0x5c6b82,_0x5efdf8,_0x537bbd,_0x2f45a6;let _0x111ee3=_0x12b758(_0xd02ff[_0x273fd3(0x152)](_0x587f6e),_0x3266b8);if(!_0x111ee3)return!0x1;let _0x301f12=_0xd02ff[_0x273fd3(0x152)](_0x59bdce),{unitId:_0x51a4eb,subUnitId:_0x4d396b}=_0x111ee3,_0xaf2aec=_0x301f12[_0x273fd3(0x12b)](_0x51a4eb,_0x4d396b);if(!_0xaf2aec)return!0x1;let _0x4360db=_0xd02ff[_0x273fd3(0x152)](_0x478a50),{connectorShapeId:_0xd79ce0,width:_0x45c785,height:_0x41058d,left:_0x1f76fc,top:_0xd38776,flipX:_0x2a5295,flipY:_0x453f22,rotation:_0x193ab2,oldAdjustValues:_0x5593ad,newAdjustValues:_0x1a728b,oldLineType:_0x522ed8,newLineType:_0x3b1738,oldRelation:_0x51ee16,newRelation:_0x59511a}=_0x3266b8,_0x593d3f=_0x4360db[_0x273fd3(0x174)]({'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'drawingId':_0xd79ce0});if(!_0x593d3f)return!0x1;let _0x514ffc=_0xd02ff[_0x273fd3(0x152)](G)[_0x273fd3(0x156)](_0x51a4eb,_0x4d396b,_0xd79ce0);if(!_0x514ffc)return!0x1;let _0xe74fa0=_0xd02ff[_0x273fd3(0x152)](_0x42d311),_0x1c51cb=_0xd02ff[_0x273fd3(0x152)](_0x766309),_0x5c049a=_0xd02ff[_0x273fd3(0x152)](_0x1967ce),_0x3e7138={..._0x593d3f[_0x273fd3(0x175)],'width':_0x45c785,'height':_0x41058d,'left':_0x1f76fc,'top':_0xd38776,'flipX':_0x2a5295,'flipY':_0x453f22,'angle':(_0x5c6b82=_0x193ab2==null?(_0x5efdf8=_0x593d3f[_0x273fd3(0x175)])==null?void 0x0:_0x5efdf8[_0x273fd3(0x182)]:_0x193ab2)==null?0x0:_0x5c6b82},_0x168b44=_0xc9c2ce(_0x3e7138,_0xaf2aec),_0xd8294c=_0x2eabf8(_0x3e7138,_0xaf2aec),_0xecb6d3=_0x514ffc['getShapeType'](),_0xd1cd6a=_0x514ffc[_0x273fd3(0x12c)](),_0x51a272={'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'drawingId':_0xd79ce0,'drawingType':_0x4b689a[_0x273fd3(0x15c)],'sheetTransform':_0x168b44,'transform':_0x3e7138,'data':{'shapeType':_0x3b1738||_0x522ed8||_0xecb6d3,'shapeData':{..._0xd1cd6a,'adjustValues':_0x1a728b||_0x5593ad||(_0xd1cd6a==null?void 0x0:_0xd1cd6a[_0x273fd3(0x11e)]),'relation':_0x59511a||_0x51ee16||(_0xd1cd6a==null?void 0x0:_0xd1cd6a[_0x273fd3(0x148)])}},'axisAlignSheetTransform':_0xd8294c,'allowTransform':!0x0},{undo:_0x1680e7,redo:_0x416f29,objects:_0x117faa}=_0x4360db['getBatchUpdateOp']([_0x51a272]),_0x33f278=_0x5c049a[_0x273fd3(0x188)]({'id':_0x25cc72['id'],'params':{'unitId':_0x51a4eb,'drawings':[_0x51a272]}}),_0x55343f=[...(_0x537bbd=_0x33f278[_0x273fd3(0x158)])==null?[]:_0x537bbd,{'id':_0x42ee93['id'],'params':{'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'op':_0x416f29,'objects':_0x117faa,'type':_0x34149e[_0x273fd3(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x51a4eb]},..._0x33f278[_0x273fd3(0x10a)],{'id':Y['id'],'params':{'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'shapeId':_0xd79ce0,'shapeType':_0x3b1738,'shapeData':{'adjustValues':_0x1a728b,'relation':_0x59511a}}}],_0x11eb12=[...(_0x2f45a6=_0x33f278[_0x273fd3(0x140)])==null?[]:_0x2f45a6,{'id':_0x42ee93['id'],'params':{'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'op':_0x1680e7,'objects':_0x117faa,'type':_0x34149e[_0x273fd3(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x51a4eb]},..._0x33f278[_0x273fd3(0x196)],{'id':Y['id'],'params':{'unitId':_0x51a4eb,'subUnitId':_0x4d396b,'shapeId':_0xd79ce0,'shapeType':_0xecb6d3,'shapeData':{..._0xd1cd6a,'adjustValues':_0x5593ad||(_0xd1cd6a==null?void 0x0:_0xd1cd6a[_0x273fd3(0x11e)]),'relation':_0x51ee16||(_0xd1cd6a==null?void 0x0:_0xd1cd6a['relation'])}}}];return _0x618d40(_0x55343f,_0xe74fa0)[_0x273fd3(0x191)]?(_0x1c51cb[_0x273fd3(0x124)]({'unitID':_0x51a4eb,'undoMutations':_0x11eb12,'redoMutations':_0x55343f}),!0x0):!0x1;}},re={'type':_0x6a9665[_0x524b07(0x135)],'id':'sheet.command.update-line-shape-resize','handler':(_0x42d5c8,_0xa20814)=>{const _0x9937d5=_0x524b07;var _0x2e1fe1,_0x3e19e6;let _0x16476b=_0x12b758(_0x42d5c8['get'](_0x587f6e),_0xa20814);if(!_0x16476b)return!0x1;let _0xd18037=_0x42d5c8[_0x9937d5(0x152)](_0x59bdce),{unitId:_0x172ec6,subUnitId:_0x50f90c}=_0x16476b,_0x2754a0=_0xd18037[_0x9937d5(0x12b)](_0x172ec6,_0x50f90c);if(!_0x2754a0)return!0x1;let _0x2b22cd=_0x42d5c8[_0x9937d5(0x152)](_0x478a50),{shapeId:_0x5afa94,width:_0x224ec8,height:_0x9d9c4f,left:_0x329d2d,top:_0x2f0b13,flipX:_0x1c1791,flipY:_0x3afc3b,angle:_0x169d1f,oldAdjustValues:_0x15ae43,newAdjustValues:_0x596021,oldLineType:_0x3a0cec,newLineType:_0x61b3f7}=_0xa20814,_0x31cfd9=_0x2b22cd[_0x9937d5(0x174)]({'unitId':_0x172ec6,'subUnitId':_0x50f90c,'drawingId':_0x5afa94});if(!_0x31cfd9)return!0x1;let _0x31cb10=_0x42d5c8[_0x9937d5(0x152)](G)['getShapeModel'](_0x172ec6,_0x50f90c,_0x5afa94);if(!_0x31cb10)return!0x1;let _0xcec1c5=_0x42d5c8[_0x9937d5(0x152)](_0x42d311),_0x32dc1c=_0x42d5c8[_0x9937d5(0x152)](_0x766309),_0x4b8197=_0x42d5c8[_0x9937d5(0x152)](_0x1967ce),_0x169a5e={..._0x31cfd9['transform'],'width':_0x224ec8,'height':_0x9d9c4f,'left':_0x329d2d,'top':_0x2f0b13,'flipX':_0x1c1791,'flipY':_0x3afc3b,'angle':_0x169d1f},_0x2cb7bf=_0xc9c2ce(_0x169a5e,_0x2754a0),_0x4d1f2e=_0x2eabf8(_0x169a5e,_0x2754a0),_0x46da28=_0x31cb10['getShapeType'](),_0x9d77fc=_0x31cb10[_0x9937d5(0x12c)](),_0x292700={'unitId':_0x172ec6,'subUnitId':_0x50f90c,'drawingId':_0x5afa94,'drawingType':_0x4b689a['DRAWING_SHAPE'],'sheetTransform':_0x2cb7bf,'transform':_0x169a5e,'data':{'shapeType':_0x61b3f7||_0x3a0cec||_0x46da28,'shapeData':{..._0x9d77fc,'adjustValues':_0x596021||_0x15ae43||(_0x9d77fc==null?void 0x0:_0x9d77fc[_0x9937d5(0x11e)])}},'axisAlignSheetTransform':_0x4d1f2e,'allowTransform':!0x0},{undo:_0xe259d2,redo:_0x38a209,objects:_0x30c1df}=_0x2b22cd[_0x9937d5(0x166)]([_0x292700]),_0x21e725=_0x4b8197[_0x9937d5(0x188)]({'id':_0x25cc72['id'],'params':{'unitId':_0x172ec6,'drawings':[_0x292700]}}),_0x1acd13=[...(_0x2e1fe1=_0x21e725[_0x9937d5(0x158)])==null?[]:_0x2e1fe1,{'id':_0x42ee93['id'],'params':{'unitId':_0x172ec6,'subUnitId':_0x50f90c,'op':_0x38a209,'objects':_0x30c1df,'type':_0x34149e[_0x9937d5(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x172ec6]},..._0x21e725['redos'],{'id':Y['id'],'params':{'unitId':_0x172ec6,'subUnitId':_0x50f90c,'shapeId':_0x5afa94,'shapeType':_0x61b3f7,'shapeData':{'adjustValues':_0x596021}}}],_0x1fff1e=[...(_0x3e19e6=_0x21e725['preUndos'])==null?[]:_0x3e19e6,{'id':_0x42ee93['id'],'params':{'unitId':_0x172ec6,'subUnitId':_0x50f90c,'op':_0xe259d2,'objects':_0x30c1df,'type':_0x34149e[_0x9937d5(0x13f)]}},{'id':_0x1c3205['id'],'params':[_0x172ec6]},..._0x21e725[_0x9937d5(0x196)],{'id':Y['id'],'params':{'unitId':_0x172ec6,'subUnitId':_0x50f90c,'shapeId':_0x5afa94,'shapeType':_0x46da28,'shapeData':{..._0x9d77fc,'adjustValues':_0x15ae43||(_0x9d77fc==null?void 0x0:_0x9d77fc[_0x9937d5(0x11e)])}}}];return _0x618d40(_0x1acd13,_0xcec1c5)['result']?(_0x32dc1c[_0x9937d5(0x124)]({'unitID':_0x172ec6,'undoMutations':_0x1fff1e,'redoMutations':_0x1acd13}),!0x0):!0x1;}},Q={'id':_0x524b07(0x10d),'type':_0x6a9665['MUTATION'],'handler':(_0x387d4d,_0x3d9e55)=>{const _0x398169=_0x524b07;let {unitId:_0x4fe89a,subUnitId:_0xa26990,shapeType:_0x4c3a54,shapeId:_0x297eec,shapeData:_0x177f0a}=_0x3d9e55,_0x4b2acb=_0x387d4d[_0x398169(0x152)](G)[_0x398169(0x156)](_0x4fe89a,_0xa26990,_0x297eec);return _0x4b2acb&&(_0x4b2acb[_0x398169(0x109)](_0x4c3a54),_0x177f0a&&(_0x4b2acb==null||_0x4b2acb[_0x398169(0x14f)](_0x177f0a))),!0x0;}},ie={'id':'sheet.command.update-shape-type','type':_0x6a9665[_0x524b07(0x135)],'handler':(_0x19650c,_0x1a52be)=>{const _0x15be5e=_0x524b07;if(!_0x1a52be)return!0x1;let _0x31a125=_0x19650c['get'](_0x42d311),_0x3c0fdc=_0x19650c['get'](G),_0x3d11d7=_0x19650c[_0x15be5e(0x152)](_0x766309),_0x998093=[],_0x102d87=[],{unitId:_0x5535bf,subUnitId:_0xff1312,shapeId:_0x5901da,shapeType:_0xa124de,shapeData:_0x39cd39}=_0x1a52be,_0x400c9b=_0x3c0fdc[_0x15be5e(0x156)](_0x5535bf,_0xff1312,_0x5901da);if(_0x400c9b){let _0x406a7d=_0x400c9b['getShapeType'](),_0x595853=Object[_0x15be5e(0x121)]({},_0x400c9b[_0x15be5e(0x12c)]()),_0xc60b27={'unitId':_0x5535bf,'subUnitId':_0xff1312,'shapeId':_0x5901da,'shapeType':_0xa124de,'shapeData':_0x39cd39},_0x47b87d={'unitId':_0x5535bf,'subUnitId':_0xff1312,'shapeId':_0x5901da,'shapeType':_0x406a7d,'shapeData':_0x595853};return _0x998093['push']({'id':Q['id'],'params':_0xc60b27}),_0x102d87[_0x15be5e(0x17e)]({'id':Q['id'],'params':_0x47b87d}),_0x998093[_0x15be5e(0x147)](_0x2ca8f4=>_0x31a125[_0x15be5e(0x105)](_0x2ca8f4['id'],_0x2ca8f4[_0x15be5e(0x183)]))&&_0x3d11d7[_0x15be5e(0x124)]({'unitID':_0x5535bf,'redoMutations':[..._0x998093],'undoMutations':[..._0x102d87]}),!0x0;}return!0x1;}};var ae=_0x524b07(0x181),oe=_0x524b07(0xfd);const se=_0x524b07(0x15e);Symbol(se);function _0x36ec(){const _0x3a4fcf=['filter','ensureSkeleton','updateContext','insertShape','result','add','_initSnapshot','_deserializeShapeForUnit','getShapeDataById','undos','forEach','delete','1045142euSJjZ','0.23.0','_commandService','toJSON','UNIVER_SHEET','top','getShapeRelation','6AkENjM','991534GzRpfa','syncExecuteCommand','INSERT','_ensureShapeModelManager','_config','setShapeType','redos','getCellWithCoordByIndex','getLineShapeRelation','sheet.mutation.update-shape-type','getEndConnectInfo','getBasicShapeType','flipY','93004eessKp','sheet.mutation.insert-shape','getStartConnectInfo','index','cos','getBatchAddOp','rotateEnabled','height','range','REMOVE','cxnIndex','removeShape','isFrom','adjustValues','clear','_shapes','assign','symbol','find','pushUndoRedo','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','entries','SHEET_SHAPE_PLUGIN','_sheetInterceptorService','resizeEnabled','_resourcesManagerService','getSkeleton','getShapeData','getOwnPropertyDescriptor','_serializeShapeForUnit','dispose','getDrawingData','11050216YjePQA','getAdjustValueByName','removeLinePoints','_shapeModelManagerMap','COMMAND','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getAdjustNames','ang','shapeData','stringify','lineShapeId','_configService','getBasicShapeRelation','call','UPDATE','preUndos','function','length','object','decorate','_getConnectPointInfo','sheet.command.insert-shape','every','relation','_sheetsShapeService','drawingType','11356344vQDwDe','isHorizontal','flipX','_groupIds','setShapeData','_initCommands','getShapeTextData','get','disposeWithMe','addShape','toPrimitive','getShapeModel','MUTATION','preRedos','position','type','keys','DRAWING_SHAPE','getCellIndexAndOffsetByPosition','sheets-shape.config','borderEnabled','_linesIds','sheet.mutation.remove-shape','171JCUiST','_addLineRerouteUpdates','_injector','packageName','getBatchUpdateOp','10PSRypP','hasShape','fromJSON','defineProperty','prototype','startY','width','worldRect','from','setConfig','53141110bVXXoI','sheet.command.toggle-shape-flip','_sheetSkeletonService','getDrawingByParam','transform','has','3oXdMkY','fill','getShapeType','1543555PaUESQ','left','onStarting','string','push','getConnectionSiteList','iterator','@univerjs-pro/sheets-shape','angle','params','_disposed','_initCommandInterceptor','getShapeTypeById','_drawingManagerService','onCommandExecute','data','sheet.command.set-shape-rotate','set','shapeId'];_0x36ec=function(){return _0x3a4fcf;};return _0x36ec();}const ce={};let le=class extends _0xf366a6{constructor(_0x575e9d,_0x5caef0,_0x5875f0,_0x5ac707,_0x3a9b58){const _0x1dd6a8=_0x524b07;super(),this[_0x1dd6a8(0xfe)]=_0x575e9d,this[_0x1dd6a8(0x128)]=_0x5caef0,this[_0x1dd6a8(0x173)]=_0x5875f0,this[_0x1dd6a8(0x149)]=_0x5ac707,this[_0x1dd6a8(0x187)]=_0x3a9b58,this[_0x1dd6a8(0x150)](),this[_0x1dd6a8(0x185)]();}[_0x524b07(0x150)](){const _0x5021e5=_0x524b07;[J,ee,te,X,Z,ne,re,K,q,Q,Y][_0x5021e5(0x197)](_0x236dd4=>this[_0x5021e5(0x153)](this[_0x5021e5(0xfe)]['registerCommand'](_0x236dd4)));}[_0x524b07(0x185)](){const _0x5533ff=_0x524b07;this[_0x5533ff(0x153)](this[_0x5533ff(0x128)]['interceptCommand']({'getMutations':_0x355bd6=>{const _0x2fde7b=_0x5533ff;if(_0x355bd6['id']===_0x114f87['id']){let {drawings:_0x2c14f4}=_0x355bd6[_0x2fde7b(0x183)],_0x23185a=_0x2c14f4[_0x2fde7b(0x18d)](_0xe6af41=>_0xe6af41[_0x2fde7b(0x14a)]===_0x4b689a[_0x2fde7b(0x15c)]);if(_0x23185a[_0x2fde7b(0x142)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x45b84a=[],_0x50dbe3=[];return _0x23185a['forEach'](_0x316d83=>{const _0x58ab16=_0x2fde7b;let {unitId:_0x51b842,subUnitId:_0x4b123d,drawingId:_0xe3b9cb}=_0x316d83,_0x3e6454=this[_0x58ab16(0x149)]['getShapeModel'](_0x51b842,_0x4b123d,_0xe3b9cb);if(!_0x3e6454)throw TypeError(_0x58ab16(0x125)+_0x3e6454);_0x45b84a['push']({'id':q['id'],'params':{'unitId':_0x51b842,'subUnitId':_0x4b123d,'shapeId':_0xe3b9cb}}),_0x50dbe3[_0x58ab16(0x17e)]({'id':K['id'],'params':{'unitId':_0x51b842,'subUnitId':_0x4b123d,'shapeId':_0xe3b9cb,'shapeType':_0x3e6454[_0x58ab16(0x179)](),'shapeData':_0x3e6454[_0x58ab16(0x12c)]()}});let _0x40d2c6=this[_0x58ab16(0x149)][_0x58ab16(0x13d)](_0x51b842,_0x4b123d,_0xe3b9cb);if(_0x40d2c6)for(let _0x40d1f8 of _0x40d2c6){let _0x303ecd=_0x40d1f8[_0x58ab16(0x13b)],_0x26fff4=_0x40d1f8[_0x58ab16(0x11d)],_0x3e792c=_0x26fff4?{'from':void 0x0}:{'to':void 0x0},_0x166559=_0x26fff4?{'from':{'shapeId':_0x40d1f8['shapeId'],'cxnIndex':_0x40d1f8[_0x58ab16(0x11b)]}}:{'to':{'shapeId':_0x40d1f8[_0x58ab16(0x18c)],'cxnIndex':_0x40d1f8[_0x58ab16(0x11b)]}};_0x45b84a[_0x58ab16(0x17e)]({'id':Y['id'],'params':{'unitId':_0x51b842,'subUnitId':_0x4b123d,'shapeId':_0x303ecd,'shapeData':{'relation':_0x3e792c}}}),_0x50dbe3[_0x58ab16(0x17e)]({'id':Y['id'],'params':{'unitId':_0x51b842,'subUnitId':_0x4b123d,'shapeId':_0x303ecd,'shapeData':{'relation':_0x166559}}});}}),{'preRedos':_0x45b84a,'redos':[],'preUndos':[],'undos':_0x50dbe3};}if(_0x355bd6['id']===_0x25cc72['id']){let {drawings:_0x1ef98e}=_0x355bd6[_0x2fde7b(0x183)],_0x235896=_0x1ef98e[_0x2fde7b(0x18d)](_0x43a265=>_0x43a265[_0x2fde7b(0x14a)]===_0x4b689a['DRAWING_SHAPE']);if(_0x235896[_0x2fde7b(0x142)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x400de7=[],_0x308182=[];for(let _0x67d39e of _0x235896){let {unitId:_0x4f4417,subUnitId:_0x3cf43f,drawingId:_0x51f200,transform:_0x562abf}=_0x67d39e;if(!_0x4f4417||!_0x3cf43f||!_0x51f200||!_0x562abf)continue;let _0x2daf97=this[_0x2fde7b(0x149)]['getShapeModel'](_0x4f4417,_0x3cf43f,_0x51f200);if(!_0x2daf97)throw TypeError(_0x2fde7b(0x125)+_0x2daf97);if(_0x2268cf(_0x2daf97['getShapeType']())){let _0x86e9d8=this[_0x2fde7b(0x149)]['getLineShapeRelation'](_0x4f4417,_0x3cf43f,_0x51f200);_0x86e9d8&&(_0x400de7[_0x2fde7b(0x17e)]({'id':Y['id'],'params':{'unitId':_0x4f4417,'subUnitId':_0x3cf43f,'shapeId':_0x51f200,'shapeData':{'relation':{'from':void 0x0,'to':void 0x0}}}}),_0x308182['push']({'id':Y['id'],'params':{'unitId':_0x4f4417,'subUnitId':_0x3cf43f,'shapeId':_0x51f200,'shapeData':{'relation':_0x86e9d8}}}));}else{let _0x4a3547=this[_0x2fde7b(0x149)][_0x2fde7b(0x13d)](_0x4f4417,_0x3cf43f,_0x51f200);if(_0x4a3547&&_0x4a3547['length']>0x0)for(let _0x323c36 of _0x4a3547){let _0x2a595b=_0x323c36['lineShapeId'],_0x5f3aa8=_0x323c36['isFrom'],_0x40d3f3=this[_0x2fde7b(0x149)]['getShapeModel'](_0x4f4417,_0x3cf43f,_0x2a595b);if(!_0x40d3f3)continue;let _0x20ad6c=_0x40d3f3[_0x2fde7b(0x113)](),_0x4fd144=_0x40d3f3[_0x2fde7b(0x10e)]();_0x20ad6c&&_0x4fd144?this[_0x2fde7b(0x163)](_0x4f4417,_0x3cf43f,_0x2a595b,_0x40d3f3,_0x20ad6c,_0x4fd144,_0x400de7,_0x308182,_0x51f200,_0x562abf):this['_addLineFollowShapeUpdates'](_0x4f4417,_0x3cf43f,_0x2a595b,_0x40d3f3,_0x5f3aa8?_0x20ad6c:_0x4fd144,_0x5f3aa8,_0x400de7,_0x308182,_0x51f200,_0x562abf);}}}return{'preRedos':[],'redos':_0x400de7,'preUndos':_0x308182,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x33818b,_0x2d5867,_0x51dd07,_0x23a8b2,_0xb43d96){const _0x56d8e8=_0x524b07;if(!_0x2d5867||!_0x51dd07)return null;let {shapeId:_0x216f98,cxnIndex:_0x547581}=_0x33818b,_0xf7131b=this[_0x56d8e8(0x149)]['getShapeModel'](_0x2d5867,_0x51dd07,_0x216f98);if(!_0xf7131b)return null;let _0x3b473a=this[_0x56d8e8(0x187)]['getDrawingByParam']({'unitId':_0x2d5867,'subUnitId':_0x51dd07,'drawingId':_0x216f98});if(!(_0x3b473a!=null&&_0x3b473a[_0x56d8e8(0x175)]))return null;let {left:_0x25b467=0x0,top:_0x424c79=0x0,width:_0x298923=0x0,height:_0x13e534=0x0,flipX:_0x204d71=!0x1,flipY:_0x1fde0d=!0x1,angle:_0x177c2a}=_0x3b473a[_0x56d8e8(0x175)];if(_0xb43d96&&_0x23a8b2===_0x216f98){var _0x6b770b,_0x7cd2ad,_0x2b0a59,_0x2b7319,_0xbdbdf0,_0x1ac197,_0x57c256;_0x25b467=(_0x6b770b=_0xb43d96[_0x56d8e8(0x17b)])==null?_0x25b467:_0x6b770b,_0x424c79=(_0x7cd2ad=_0xb43d96['top'])==null?_0x424c79:_0x7cd2ad,_0x298923=(_0x2b0a59=_0xb43d96['width'])==null?_0x298923:_0x2b0a59,_0x13e534=(_0x2b7319=_0xb43d96[_0x56d8e8(0x118)])==null?_0x13e534:_0x2b7319,_0x204d71=(_0xbdbdf0=_0xb43d96['flipX'])==null?_0x204d71:_0xbdbdf0,_0x1fde0d=(_0x1ac197=_0xb43d96[_0x56d8e8(0x110)])==null?_0x1fde0d:_0x1ac197,_0x177c2a=(_0x57c256=_0xb43d96[_0x56d8e8(0x182)])==null?_0x177c2a:_0x57c256;}_0xf7131b[_0x56d8e8(0x18f)]({'width':_0x298923,'height':_0x13e534});let _0x24ab8f=_0xf7131b[_0x56d8e8(0x17f)]()[_0x56d8e8(0x123)](_0x27a46e=>_0x27a46e[_0x56d8e8(0x114)]===_0x547581);if(!_0x24ab8f)return null;let _0x1b141b=_0x204d71?_0x298923-_0x24ab8f['x']:_0x24ab8f['x'],_0x34eefb=_0x1fde0d?_0x13e534-_0x24ab8f['y']:_0x24ab8f['y'];if(_0x177c2a!==0x0&&_0x177c2a!=null){let _0x3dfcf7=_0x177c2a*Math['PI']/0xb4,_0x5f357b=Math[_0x56d8e8(0x115)](_0x3dfcf7),_0x5a2fec=Math['sin'](_0x3dfcf7),_0x2f4fb1=_0x298923/0x2,_0x2473e9=_0x13e534/0x2,_0x1e05b3=_0x1b141b-_0x2f4fb1,_0x2dfc9c=_0x34eefb-_0x2473e9;_0x1b141b=_0x2f4fb1+_0x1e05b3*_0x5f357b-_0x2dfc9c*_0x5a2fec,_0x34eefb=_0x2473e9+_0x1e05b3*_0x5a2fec+_0x2dfc9c*_0x5f357b;}_0x1b141b+=_0x25b467,_0x34eefb+=_0x424c79;let _0x9f62a5=_0x24ab8f[_0x56d8e8(0x138)]/0xea60;_0x204d71&&(_0x9f62a5=0xb4-_0x9f62a5),_0x1fde0d&&(_0x9f62a5=-_0x9f62a5),_0x9f62a5+=_0x177c2a||0x0,_0x9f62a5=(_0x9f62a5%0x168+0x168)%0x168;let _0x59b3d6=_0x99cd44({'left':_0x25b467,'top':_0x424c79,'width':_0x298923,'height':_0x13e534},_0x177c2a||0x0);return{'point':{'x':_0x1b141b,'y':_0x34eefb},'angle':_0x9f62a5,'bounds':_0x59b3d6};}['_addLineRerouteUpdates'](_0x31f4f4,_0x500bc2,_0x3b2270,_0x2edd2e,_0x4459d4,_0x72f95,_0x3bfd6f,_0x33ebe9,_0x260f0f,_0x3c9920){const _0x436338=_0x524b07;let _0x1c4c9d=this['_sheetSkeletonService'][_0x436338(0x12b)](_0x31f4f4,_0x500bc2);if(!_0x1c4c9d)return;let _0x2ab5e4=_0x2edd2e[_0x436338(0x102)](),_0x2e8cef=_0x2edd2e[_0x436338(0x137)](),_0x40bb45={},_0x1ad217={};_0x2e8cef['forEach'](_0x3d3530=>{const _0x391073=_0x436338;let _0x2bfff1=_0x2edd2e[_0x391073(0x132)](_0x3d3530);_0x1ad217[_0x3d3530]=_0x2bfff1==null?0x0:_0x2bfff1;});let _0x106ba7=this[_0x436338(0x145)](_0x4459d4,_0x31f4f4,_0x500bc2,_0x260f0f,_0x3c9920),_0x4bc8c4=this[_0x436338(0x145)](_0x72f95,_0x31f4f4,_0x500bc2,_0x260f0f,_0x3c9920);if(_0x106ba7&&_0x4bc8c4){let _0x5247ae=_0x2edd2e[_0x436338(0x179)](),_0x6e2e0d=_0x306e4f(_0x106ba7,_0x4bc8c4,_0x5247ae),_0x3ccea3=_0x5247ae;if(_0x6e2e0d){let _0x184ec2=_0x24d05d(_0x6e2e0d,_0x2edd2e[_0x436338(0x179)]()),_0xd4668f=this['_drawingManagerService'][_0x436338(0x130)](_0x31f4f4,_0x500bc2);if(_0xd4668f&&_0xd4668f[_0x3b2270]){let _0x591841=_0xd4668f[_0x3b2270];_0x3ccea3=_0x184ec2['lineType'];for(let [_0x51c7ef,_0x5ef5b3]of Object[_0x436338(0x126)](_0x184ec2[_0x436338(0x11e)]))_0x40bb45[_0x51c7ef]=_0x5ef5b3;let _0x5779cc={..._0x591841['transform'],'width':_0x184ec2[_0x436338(0x16e)][_0x436338(0x16d)],'height':_0x184ec2[_0x436338(0x16e)][_0x436338(0x118)],'left':_0x184ec2[_0x436338(0x16e)][_0x436338(0x17b)],'top':_0x184ec2[_0x436338(0x16e)][_0x436338(0x101)],'flipX':_0x184ec2[_0x436338(0x16e)]['flipX'],'flipY':_0x184ec2[_0x436338(0x16e)][_0x436338(0x110)],'angle':_0x184ec2['rotation']},_0x3079b6=_0xc9c2ce(_0x5779cc,_0x1c4c9d),_0x374473=_0x2eabf8(_0x5779cc,_0x1c4c9d),_0x1913c1={'unitId':_0x31f4f4,'subUnitId':_0x500bc2,'drawingType':_0x4b689a[_0x436338(0x15c)],'drawingId':_0x3b2270,'transform':_0x5779cc,'sheetTransform':_0x3079b6,'axisAlignSheetTransform':_0x374473},{unitId:_0x565fad,subUnitId:_0x47eead,undo:_0x5733b8,redo:_0x414a6f,objects:_0x46e853}=this['_drawingManagerService'][_0x436338(0x166)]([_0x1913c1]);_0x3bfd6f[_0x436338(0x17e)]({'id':_0x42ee93['id'],'params':{'unitId':_0x565fad,'subUnitId':_0x47eead,'op':_0x414a6f,'objects':_0x46e853,'type':_0x34149e[_0x436338(0x13f)]}}),_0x33ebe9['push']({'id':_0x42ee93['id'],'params':{'unitId':_0x565fad,'subUnitId':_0x47eead,'op':_0x5733b8,'objects':_0x46e853,'type':_0x34149e[_0x436338(0x13f)]}});}_0x2edd2e[_0x436338(0x133)]();}_0x3bfd6f['push']({'id':Y['id'],'params':{'unitId':_0x31f4f4,'subUnitId':_0x500bc2,'shapeId':_0x3b2270,'shapeType':_0x3ccea3,'shapeData':{'adjustValues':_0x40bb45,'relation':_0x2ab5e4}}}),_0x33ebe9['push']({'id':Y['id'],'params':{'unitId':_0x31f4f4,'subUnitId':_0x500bc2,'shapeId':_0x3b2270,'shapeType':_0x5247ae,'shapeData':{'adjustValues':_0x1ad217,'relation':_0x2ab5e4}}});}}['_addLineFollowShapeUpdates'](_0x4e6056,_0x21d4d3,_0x3699a6,_0x327044,_0x3d9dc9,_0x522280,_0x1bc867,_0x9c8cb5,_0x33f106,_0x5abbf1){const _0x40f1db=_0x524b07;var _0x3d3092;if(!_0x3d9dc9)return;let _0x4f2167=this[_0x40f1db(0x173)]['getSkeleton'](_0x4e6056,_0x21d4d3);if(!_0x4f2167)return;let _0x4efd1a=(_0x3d3092=this['_drawingManagerService'][_0x40f1db(0x174)]({'unitId':_0x4e6056,'subUnitId':_0x21d4d3,'drawingId':_0x33f106}))==null?void 0x0:_0x3d3092['transform'];if(!_0x4efd1a)return;let _0x11dd4e=_0x4efd1a[_0x40f1db(0x17b)]!==_0x5abbf1[_0x40f1db(0x17b)]||_0x4efd1a[_0x40f1db(0x101)]!==_0x5abbf1[_0x40f1db(0x101)],_0x2d8329=_0x4efd1a[_0x40f1db(0x16d)]!==_0x5abbf1[_0x40f1db(0x16d)]||_0x4efd1a['height']!==_0x5abbf1[_0x40f1db(0x118)],_0x58a868=_0x4efd1a[_0x40f1db(0x14d)]!==_0x5abbf1[_0x40f1db(0x14d)]||_0x4efd1a[_0x40f1db(0x110)]!==_0x5abbf1['flipY'],_0x3f858e=_0x4efd1a[_0x40f1db(0x182)]!==_0x5abbf1[_0x40f1db(0x182)];if(_0x11dd4e&&!_0x2d8329&&!_0x58a868&&!_0x3f858e){var _0x51a7fc,_0x1232e1,_0x42f8de,_0x53ef5d;let _0x5672c7=((_0x51a7fc=_0x5abbf1['left'])==null?0x0:_0x51a7fc)-((_0x1232e1=_0x4efd1a[_0x40f1db(0x17b)])==null?0x0:_0x1232e1),_0x205a64=((_0x42f8de=_0x5abbf1[_0x40f1db(0x101)])==null?0x0:_0x42f8de)-((_0x53ef5d=_0x4efd1a[_0x40f1db(0x101)])==null?0x0:_0x53ef5d),_0x3e6afe=this[_0x40f1db(0x187)][_0x40f1db(0x130)](_0x4e6056,_0x21d4d3);if(_0x3e6afe&&_0x3e6afe[_0x3699a6]){var _0x4db9f1,_0x4ed2f6,_0x1296a4,_0x2fd279;let _0x5681a3=_0x3e6afe[_0x3699a6],_0x13a391={..._0x5681a3[_0x40f1db(0x175)],'left':((_0x4db9f1=(_0x4ed2f6=_0x5681a3[_0x40f1db(0x175)])==null?void 0x0:_0x4ed2f6[_0x40f1db(0x17b)])==null?0x0:_0x4db9f1)+_0x5672c7,'top':((_0x1296a4=(_0x2fd279=_0x5681a3[_0x40f1db(0x175)])==null?void 0x0:_0x2fd279[_0x40f1db(0x101)])==null?0x0:_0x1296a4)+_0x205a64},_0x5ad5a9=_0xc9c2ce(_0x13a391,_0x4f2167),_0xfc29a0=_0x2eabf8(_0x13a391,_0x4f2167),_0x58d13f={'unitId':_0x4e6056,'subUnitId':_0x21d4d3,'drawingType':_0x4b689a[_0x40f1db(0x15c)],'drawingId':_0x3699a6,'transform':_0x13a391,'sheetTransform':_0x5ad5a9,'axisAlignSheetTransform':_0xfc29a0},{unitId:_0x43f636,subUnitId:_0x5ec14c,undo:_0x3540db,redo:_0x4a1011,objects:_0x111838}=this[_0x40f1db(0x187)]['getBatchUpdateOp']([_0x58d13f]);_0x1bc867[_0x40f1db(0x17e)]({'id':_0x42ee93['id'],'params':{'unitId':_0x43f636,'subUnitId':_0x5ec14c,'op':_0x4a1011,'objects':_0x111838,'type':_0x34149e['UPDATE']}}),_0x9c8cb5['push']({'id':_0x42ee93['id'],'params':{'unitId':_0x43f636,'subUnitId':_0x5ec14c,'op':_0x3540db,'objects':_0x111838,'type':_0x34149e[_0x40f1db(0x13f)]}});}}else{let _0x4068b5=_0x327044[_0x40f1db(0x113)](),_0x35db81=_0x327044['getEndConnectInfo']();this[_0x40f1db(0x163)](_0x4e6056,_0x21d4d3,_0x3699a6,_0x327044,_0x4068b5,_0x35db81,_0x1bc867,_0x9c8cb5,_0x33f106,_0x5abbf1);}}};le=W([U(0x0,_0x42d311),U(0x1,_0x1c1ea5(_0x1967ce)),U(0x2,_0x1c1ea5(_0x59bdce)),U(0x3,_0x1c1ea5(G)),U(0x4,_0x1c1ea5(_0x4b5bfb))],le);let $=class extends _0x1b8cd9{constructor(_0x200d28=ce,_0xd910e4,_0x5c1b28,_0x511397){const _0x2a2baa=_0x524b07;super(),this[_0x2a2baa(0x108)]=_0x200d28,this[_0x2a2baa(0x164)]=_0xd910e4,this['_commandService']=_0x5c1b28,this['_configService']=_0x511397;let {..._0x2b556b}=_0x508608({},ce,this[_0x2a2baa(0x108)]);this[_0x2a2baa(0x13c)][_0x2a2baa(0x170)](se,_0x2b556b);}[_0x524b07(0x17c)](){const _0x2d1cac=_0x524b07;let _0x4ab171=this['_injector'];[[H],[G],[le]][_0x2d1cac(0x197)](_0x83cf6f=>_0x4ab171[_0x2d1cac(0x192)](_0x83cf6f)),_0x44b044(_0x4ab171,[[G],[le]]);}};V($,_0x524b07(0x15a),_0x3d34e0[_0x524b07(0x100)]),V($,'pluginName','SHEET_SHAPE_PLUGIN'),V($,_0x524b07(0x165),ae),V($,'version',oe),$=W([_0x4d9764(_0x578903),U(0x1,_0x1c1ea5(_0x5373cb)),U(0x2,_0x42d311),U(0x3,_0xb915cd)],$);export{L as DEFAULT_SHAPE_HEIGHT,I as DEFAULT_SHAPE_WIDTH,J as InsertShapeCommand,K as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,ee as SetShapeDrawingDataCommand,X as SetSheetsShapeRotateCommand,Z as SetSheetsShapeTextVerticalToggleCommand,G as SheetsShapeService,te as ToggleSheetsShapeFlipCommand,$ as UniverSheetsShapePlugin,ne as UpdateConnectorRelationCommand,re as UpdateLineShapeResizeCommand,Y as UpdateSheetsShapeDataMutation,ie as UpdateSheetsShapeTypeCommand,Q as UpdateSheetsShapeTypeMutation};