@univerjs-pro/sheets-shape 0.19.0 → 0.20.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/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -0
- package/lib/index.js +1 -1
- package/lib/types/commands/command/add-shape-command.d.ts +16 -0
- package/lib/types/commands/command/set-shape-drawing-data-command.d.ts +15 -0
- package/lib/types/commands/command/set-shape-flip-command.d.ts +14 -0
- package/lib/types/commands/command/set-shape-rotate.command.d.ts +10 -0
- package/lib/types/commands/command/update-connector-relation.command.d.ts +56 -0
- package/lib/types/commands/command/update-line-shape-resize.command.d.ts +18 -0
- package/lib/types/commands/mutation/update-shape-data.mutation.d.ts +1 -1
- package/lib/types/common/const.d.ts +2 -0
- package/lib/types/common/types.d.ts +24 -0
- package/lib/types/controllers/sheets-shape.controller.d.ts +29 -0
- package/lib/types/facade/f-connector-shape.d.ts +181 -0
- package/lib/types/facade/f-enum.d.ts +194 -0
- package/lib/types/facade/f-shape.d.ts +642 -0
- package/lib/types/facade/f-worksheet.d.ts +232 -0
- package/lib/types/facade/index.d.ts +13 -0
- package/lib/types/index.d.ts +13 -10
- package/lib/types/plugin.d.ts +0 -2
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +18 -6
package/lib/facade.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x54b81e=_0x3e72;(function(_0x421603,_0x4f8401){const _0x1eedd8=_0x3e72,_0x326317=_0x421603();while(!![]){try{const _0x5d751c=parseInt(_0x1eedd8(0x191))/0x1*(-parseInt(_0x1eedd8(0x1ea))/0x2)+parseInt(_0x1eedd8(0x1e9))/0x3*(-parseInt(_0x1eedd8(0x1b9))/0x4)+-parseInt(_0x1eedd8(0x1f4))/0x5+parseInt(_0x1eedd8(0x1e0))/0x6*(-parseInt(_0x1eedd8(0x1ef))/0x7)+parseInt(_0x1eedd8(0x192))/0x8*(parseInt(_0x1eedd8(0x195))/0x9)+parseInt(_0x1eedd8(0x1a2))/0xa+parseInt(_0x1eedd8(0x1b0))/0xb*(parseInt(_0x1eedd8(0x1dd))/0xc);if(_0x5d751c===_0x4f8401)break;else _0x326317['push'](_0x326317['shift']());}catch(_0x4fb0cf){_0x326317['push'](_0x326317['shift']());}}}(_0x4630,0xa1b21));import{ConnectorCoordinateTransform as _0x1c99c4,ShapeArrowSizeEnum as _0x191895,ShapeArrowTypeEnum as _0x55a3c5,ShapeFillEnum as _0xef5bca,ShapeGradientTypeEnum as _0x20a053,ShapeLineCapEnum as _0x1aa24e,ShapeLineDashEnum as _0x1581f6,ShapeLineJoinEnum as _0xf529c4,ShapeLineTypeEnum as _0xe76dd1,ShapeTypeEnum as _0x15c825,computeConnectorRouteLayout as _0x2f7958,getBasicShapeRotateBound as _0x18b681,isConnectorShape as _0x105362,routeConnectorLineShape as _0x10e3b1}from'@univerjs-pro/engine-shape';import{FEnum as _0x3e6104}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT as _0x2d723d,DEFAULT_SHAPE_WIDTH as _0x465346,InsertShapeCommand as _0x323602,SetShapeDrawingDataCommand as _0x319a78,SheetsShapeService as _0x5ad4d6,UpdateConnectorRelationCommand as _0x1759cb}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum as _0x26e12b,generateRandomId as _0x21137f}from'@univerjs/core';import{IDrawingManagerService as _0x4a5a7c}from'@univerjs/drawing';import{SheetSkeletonService as _0x2d2634,convertPositionCellToSheetOverGrid as _0x559898}from'@univerjs/sheets';import{ISheetDrawingService as _0x3df9e3,RemoveSheetDrawingCommand as _0x409d03}from'@univerjs/sheets-drawing';import{FWorksheet as _0x5e6e8d}from'@univerjs/sheets/facade';var k=class extends _0x3e6104{get[_0x54b81e(0x1e6)](){return _0x15c825;}get[_0x54b81e(0x1c2)](){return _0xef5bca;}get[_0x54b81e(0x1ab)](){return _0x20a053;}get[_0x54b81e(0x1f1)](){return _0xe76dd1;}get[_0x54b81e(0x1ff)](){return _0x1581f6;}get[_0x54b81e(0x1f5)](){return _0x1aa24e;}get[_0x54b81e(0x194)](){return _0xf529c4;}get[_0x54b81e(0x1d1)](){return _0x55a3c5;}get[_0x54b81e(0x1da)](){return _0x191895;}};function _0x3e72(_0x39134c,_0x50ea08){_0x39134c=_0x39134c-0x187;const _0x4630fc=_0x4630();let _0x3e7217=_0x4630fc[_0x39134c];return _0x3e7217;}_0x3e6104[_0x54b81e(0x1c1)](k);function A(_0x2240f9){'@babel/helpers - typeof';const _0x32dd34=_0x54b81e;return A=typeof Symbol==_0x32dd34(0x1c4)&&typeof Symbol[_0x32dd34(0x1eb)]==_0x32dd34(0x1e8)?function(_0x2bc77d){return typeof _0x2bc77d;}:function(_0x242175){const _0x55e714=_0x32dd34;return _0x242175&&typeof Symbol==_0x55e714(0x1c4)&&_0x242175['constructor']===Symbol&&_0x242175!==Symbol[_0x55e714(0x19a)]?_0x55e714(0x1e8):typeof _0x242175;},A(_0x2240f9);}function j(_0x6e0e88,_0x209300){const _0x4dc525=_0x54b81e;if(A(_0x6e0e88)!='object'||!_0x6e0e88)return _0x6e0e88;var _0x48e565=_0x6e0e88[Symbol[_0x4dc525(0x1cd)]];if(_0x48e565!==void 0x0){var _0x272e79=_0x48e565['call'](_0x6e0e88,_0x209300||_0x4dc525(0x18b));if(A(_0x272e79)!=_0x4dc525(0x202))return _0x272e79;throw TypeError(_0x4dc525(0x1a1));}return(_0x209300==='string'?String:Number)(_0x6e0e88);}function M(_0x2d3265){const _0x4c15e8=_0x54b81e;var _0x3165a1=j(_0x2d3265,_0x4c15e8(0x1fe));return A(_0x3165a1)==_0x4c15e8(0x1e8)?_0x3165a1:_0x3165a1+'';}function N(_0x6df61f,_0xbb4db9,_0x4fa721){const _0x174cb4=_0x54b81e;return(_0xbb4db9=M(_0xbb4db9))in _0x6df61f?Object[_0x174cb4(0x1e3)](_0x6df61f,_0xbb4db9,{'value':_0x4fa721,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x6df61f[_0xbb4db9]=_0x4fa721,_0x6df61f;}var P=class{constructor(_0x118160,_0x400429,_0x952a99,_0x2877a7){const _0x2c179d=_0x54b81e;N(this,'unitId',void 0x0),N(this,'subUnitId',void 0x0),N(this,_0x2c179d(0x20d),void 0x0),N(this,'x',0x0),N(this,'y',0x0),N(this,'width',_0x465346),N(this,_0x2c179d(0x1fc),_0x2d723d),N(this,_0x2c179d(0x1d5),void 0x0),N(this,_0x2c179d(0x1a9),{}),N(this,_0x2c179d(0x1bd),void 0x0),this['unitId']=_0x118160,this[_0x2c179d(0x209)]=_0x400429,this[_0x2c179d(0x20d)]=_0x952a99||_0x21137f(),this['_injector']=_0x2877a7;}[_0x54b81e(0x1aa)](_0x318b8a,_0x3bc841,_0x38717e,_0x76451f){const _0x3728fb=_0x54b81e;let _0x1ff2a4=this[_0x3728fb(0x1bd)][_0x3728fb(0x1ed)](_0x2d2634)[_0x3728fb(0x1b1)](this[_0x3728fb(0x19b)],this[_0x3728fb(0x209)]);if(!_0x1ff2a4)throw Error(_0x3728fb(0x188)+this[_0x3728fb(0x19b)]+'\x20and\x20subUnitId\x20'+this[_0x3728fb(0x209)]+'\x20not\x20found');let {transform:_0x451b69}=_0x559898(this['unitId'],this[_0x3728fb(0x209)],{'row':_0x318b8a,'column':_0x3bc841,'rowOffset':_0x38717e,'columnOffset':_0x76451f},0x1,0x1,_0x1ff2a4);return this['x']=_0x451b69['left'],this['y']=_0x451b69[_0x3728fb(0x18d)],this;}[_0x54b81e(0x1e5)](_0x181e5e,_0x25e9be){return this['x']=_0x181e5e,this['y']=_0x25e9be,this;}[_0x54b81e(0x1d3)](_0x261f19){const _0x347df4=_0x54b81e;return this[_0x347df4(0x1d5)]=_0x261f19,this;}[_0x54b81e(0x1b6)](_0xf3004c,_0x18945b){const _0xdafb73=_0x54b81e;return this['shapeData'][_0xdafb73(0x1f2)]||(this[_0xdafb73(0x1a9)][_0xdafb73(0x1f2)]={}),this[_0xdafb73(0x1a9)][_0xdafb73(0x1f2)][_0xdafb73(0x1a0)]=_0xef5bca[_0xdafb73(0x1ba)],_0xf3004c!==void 0x0&&(this[_0xdafb73(0x1a9)][_0xdafb73(0x1f2)][_0xdafb73(0x1be)]=_0xf3004c),_0x18945b!==void 0x0&&(this[_0xdafb73(0x1a9)][_0xdafb73(0x1f2)][_0xdafb73(0x1bf)]=_0x18945b),this;}[_0x54b81e(0x1f8)](_0x737110,_0x517df4,_0x143830){const _0x26ee0d=_0x54b81e;if(_0x517df4===void 0x0||_0x517df4[_0x26ee0d(0x1f6)]===0x0)throw Error(_0x26ee0d(0x1f7));return this[_0x26ee0d(0x1a9)][_0x26ee0d(0x1f2)]||(this['shapeData']['fill']={}),this[_0x26ee0d(0x1a9)][_0x26ee0d(0x1f2)][_0x26ee0d(0x20e)]=_0x517df4,this[_0x26ee0d(0x1a9)][_0x26ee0d(0x1f2)][_0x26ee0d(0x1a0)]=_0xef5bca[_0x26ee0d(0x18c)],this[_0x26ee0d(0x1a9)]['fill'][_0x26ee0d(0x208)]=_0x737110,_0x143830!==void 0x0&&(this['shapeData'][_0x26ee0d(0x1f2)][_0x26ee0d(0x1af)]=_0x143830),this;}[_0x54b81e(0x1c3)](){const _0x4d6085=_0x54b81e;return this[_0x4d6085(0x1a9)][_0x4d6085(0x1f2)]={'fillType':_0xef5bca['NoFill']},this;}[_0x54b81e(0x193)](_0x59ac2b){const _0x409f8d=_0x54b81e;return this[_0x409f8d(0x1a9)][_0x409f8d(0x1f3)]||(this[_0x409f8d(0x1a9)][_0x409f8d(0x1f3)]={}),this[_0x409f8d(0x1a9)][_0x409f8d(0x1f3)]['color']=_0x59ac2b,this;}[_0x54b81e(0x1cb)](_0x4df7bf){const _0x5f2d4a=_0x54b81e;return this['shapeData'][_0x5f2d4a(0x1f3)]||(this['shapeData'][_0x5f2d4a(0x1f3)]={}),this[_0x5f2d4a(0x1a9)][_0x5f2d4a(0x1f3)][_0x5f2d4a(0x1b2)]=_0x4df7bf,this;}[_0x54b81e(0x19f)](_0x1a8925){const _0x41559f=_0x54b81e;return this[_0x41559f(0x1a9)][_0x41559f(0x1f3)]||(this[_0x41559f(0x1a9)][_0x41559f(0x1f3)]={}),this['shapeData'][_0x41559f(0x1f3)][_0x41559f(0x1c7)]=_0x1a8925,this;}[_0x54b81e(0x197)](_0x298243){const _0x160bb7=_0x54b81e;return this['shapeData']['stroke']||(this['shapeData'][_0x160bb7(0x1f3)]={}),this[_0x160bb7(0x1a9)]['stroke'][_0x160bb7(0x1b7)]=_0x298243,this;}[_0x54b81e(0x20c)](_0x5378c5){const _0x285055=_0x54b81e;return this[_0x285055(0x1a9)]['stroke']||(this[_0x285055(0x1a9)][_0x285055(0x1f3)]={}),this['shapeData']['stroke'][_0x285055(0x1f0)]=_0x5378c5,this;}[_0x54b81e(0x196)](_0x13ddb8){const _0x43458e=_0x54b81e;return this[_0x43458e(0x1a9)][_0x43458e(0x1f3)]||(this[_0x43458e(0x1a9)][_0x43458e(0x1f3)]={}),this['shapeData'][_0x43458e(0x1f3)][_0x43458e(0x1bf)]=_0x13ddb8,this;}['setStrokeLineType'](_0x5ca4d0){const _0x4424f8=_0x54b81e;return this[_0x4424f8(0x1a9)][_0x4424f8(0x1f3)]||(this[_0x4424f8(0x1a9)][_0x4424f8(0x1f3)]={}),this['shapeData'][_0x4424f8(0x1f3)][_0x4424f8(0x19d)]=_0x5ca4d0,this;}['setWidth'](_0x58c506){return this['width']=_0x58c506,this;}[_0x54b81e(0x187)](_0x35cb0c){const _0x23956e=_0x54b81e;return this[_0x23956e(0x1fc)]=_0x35cb0c,this;}[_0x54b81e(0x1bb)](){const _0xc44c3d=_0x54b81e;let _0x195d73=this[_0xc44c3d(0x1bd)]['get'](_0x5ad4d6)['getShapeModel'](this[_0xc44c3d(0x19b)],this[_0xc44c3d(0x209)],this[_0xc44c3d(0x20d)]);return _0x195d73?_0x105362(_0x195d73[_0xc44c3d(0x1bc)]()):this[_0xc44c3d(0x1d5)]?_0x105362(this['shapeType']):!0x1;}[_0x54b81e(0x20b)](){const _0x308856=_0x54b81e;let _0x3f7a81=this['_injector'][_0x308856(0x1ed)](_0x5ad4d6)[_0x308856(0x204)](this[_0x308856(0x19b)],this[_0x308856(0x209)],this[_0x308856(0x20d)]);if(!_0x3f7a81)return[];let _0x16853d=this['_injector']['get'](_0x4a5a7c)[_0x308856(0x1fa)]({'unitId':this['unitId'],'subUnitId':this[_0x308856(0x209)],'drawingId':this[_0x308856(0x20d)]});if(!(_0x16853d!=null&&_0x16853d['transform']))return[];let {width:_0x4005d4=0x0,height:_0x25ac89=0x0}=_0x16853d['transform'];return _0x3f7a81['updateContext']({'width':_0x4005d4,'height':_0x25ac89}),_0x3f7a81[_0x308856(0x1c6)]();}['getAdjustPoints'](){const _0x5c8451=_0x54b81e;let _0x5540b9=this[_0x5c8451(0x1bd)][_0x5c8451(0x1ed)](_0x5ad4d6)[_0x5c8451(0x204)](this[_0x5c8451(0x19b)],this['subUnitId'],this[_0x5c8451(0x20d)]);if(!_0x5540b9)return[];let _0x48cd12=this[_0x5c8451(0x1bd)]['get'](_0x4a5a7c)[_0x5c8451(0x1fa)]({'unitId':this[_0x5c8451(0x19b)],'subUnitId':this[_0x5c8451(0x209)],'drawingId':this[_0x5c8451(0x20d)]});if(!(_0x48cd12!=null&&_0x48cd12[_0x5c8451(0x1ee)]))return[];let {width:_0x53d328=0x0,height:_0x3e9d6a=0x0}=_0x48cd12[_0x5c8451(0x1ee)];return _0x5540b9[_0x5c8451(0x1c8)]({'width':_0x53d328,'height':_0x3e9d6a}),_0x5540b9['getDrawingPoints']();}[_0x54b81e(0x1c5)](){const _0xe5f003=_0x54b81e;let _0x455a7a=this[_0xe5f003(0x1bd)][_0xe5f003(0x1ed)](_0x5ad4d6)[_0xe5f003(0x204)](this[_0xe5f003(0x19b)],this[_0xe5f003(0x209)],this[_0xe5f003(0x20d)]);if(!_0x455a7a||!_0x105362(_0x455a7a[_0xe5f003(0x1bc)]()))return[];let _0x1b7794=this['_injector']['get'](_0x4a5a7c)[_0xe5f003(0x1fa)]({'unitId':this['unitId'],'subUnitId':this['subUnitId'],'drawingId':this[_0xe5f003(0x20d)]});if(!(_0x1b7794!=null&&_0x1b7794['transform']))return[];let {width:_0x51b234=0x0,height:_0x4c26b9=0x0}=_0x1b7794['transform'];return _0x455a7a[_0xe5f003(0x1c8)]({'width':_0x51b234,'height':_0x4c26b9}),_0x455a7a[_0xe5f003(0x1c5)]();}['getStartConnectInfo'](){const _0x34f2de=_0x54b81e;var _0x46e852;let _0x38a239=this[_0x34f2de(0x1bd)][_0x34f2de(0x1ed)](_0x5ad4d6)[_0x34f2de(0x204)](this[_0x34f2de(0x19b)],this[_0x34f2de(0x209)],this[_0x34f2de(0x20d)]);return _0x38a239?(_0x46e852=_0x38a239[_0x34f2de(0x190)]())==null?null:_0x46e852:null;}[_0x54b81e(0x18a)](){const _0x31f4f9=_0x54b81e;var _0x397d7b;let _0x2878fd=this[_0x31f4f9(0x1bd)][_0x31f4f9(0x1ed)](_0x5ad4d6)['getShapeModel'](this['unitId'],this[_0x31f4f9(0x209)],this[_0x31f4f9(0x20d)]);return _0x2878fd?(_0x397d7b=_0x2878fd[_0x31f4f9(0x18a)]())==null?null:_0x397d7b:null;}[_0x54b81e(0x18e)](){const _0x4646bd=_0x54b81e;var _0x349ded,_0x24237c;if(!this[_0x4646bd(0x1d5)])throw Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){let _0x351524=this[_0x4646bd(0x1bd)][_0x4646bd(0x1ed)](_0x2d2634)[_0x4646bd(0x1b1)](this['unitId'],this[_0x4646bd(0x209)]);if(!_0x351524)throw Error(_0x4646bd(0x188)+this[_0x4646bd(0x19b)]+_0x4646bd(0x1e7)+this[_0x4646bd(0x209)]+'\x20not\x20found');let {transform:_0xe08ca3}=_0x559898(this['unitId'],this[_0x4646bd(0x209)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x351524);this['x']=this['x']>0x0?this['x']:_0xe08ca3[_0x4646bd(0x19c)],this['y']=this['y']>0x0?this['y']:_0xe08ca3[_0x4646bd(0x18d)];}return this[_0x4646bd(0x1b2)]=(_0x349ded=this['width'])==null?_0x465346:_0x349ded,this[_0x4646bd(0x1fc)]=(_0x24237c=this[_0x4646bd(0x1fc)])==null?_0x2d723d:_0x24237c,{'unitId':this[_0x4646bd(0x19b)],'subUnitId':this[_0x4646bd(0x209)],'shapeId':this[_0x4646bd(0x20d)],'shapeType':this[_0x4646bd(0x1d5)],'shapeData':Object['keys'](this[_0x4646bd(0x1a9)])[_0x4646bd(0x1f6)]>0x0?this[_0x4646bd(0x1a9)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x4646bd(0x1b2)],'height':this['height']};}[_0x54b81e(0x189)](){return this['drawId'];}['getShapeType'](){const _0x4af4cc=_0x54b81e;return this[_0x4af4cc(0x1d5)];}[_0x54b81e(0x1d6)](){return this['shapeData'];}[_0x54b81e(0x18f)](){return{'x':this['x'],'y':this['y']};}['getSize'](){const _0x376e17=_0x54b81e;return{'width':this[_0x376e17(0x1b2)],'height':this['height']};}},F=class extends P{constructor(_0x1469cb,_0x56b468,_0x32ddc0,_0x38b56e){const _0x5223a8=_0x54b81e;super(_0x1469cb,_0x56b468,_0x32ddc0,_0x38b56e),N(this,_0x5223a8(0x1a9),{});}[_0x54b81e(0x1d3)](_0x1931d9){const _0xc88027=_0x54b81e;if(!_0x105362(_0x1931d9))throw Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x1931d9+_0xc88027(0x1ad));return super[_0xc88027(0x1d3)](_0x1931d9),this;}['setStartArrowType'](_0x5410b4){const _0x3a9580=_0x54b81e;var _0x445fae,_0x4c63ff;return(_0x445fae=this[_0x3a9580(0x1a9)])!=null&&_0x445fae['ln']||(this['shapeData']['ln']={}),!((_0x4c63ff=this['shapeData'])==null||(_0x4c63ff=_0x4c63ff['ln'])==null)&&_0x4c63ff[_0x3a9580(0x1ca)]||(this[_0x3a9580(0x1a9)]['ln'][_0x3a9580(0x1ca)]={}),this[_0x3a9580(0x1a9)]['ln'][_0x3a9580(0x1ca)][_0x3a9580(0x198)]=_0x5410b4,this;}[_0x54b81e(0x1de)](_0x2bcfa0){const _0x4f99fc=_0x54b81e;var _0x589847,_0x473ed2;return(_0x589847=this[_0x4f99fc(0x1a9)])!=null&&_0x589847['ln']||(this['shapeData']['ln']={}),!((_0x473ed2=this[_0x4f99fc(0x1a9)])==null||(_0x473ed2=_0x473ed2['ln'])==null)&&_0x473ed2[_0x4f99fc(0x1c9)]||(this[_0x4f99fc(0x1a9)]['ln'][_0x4f99fc(0x1c9)]={}),this['shapeData']['ln'][_0x4f99fc(0x1c9)][_0x4f99fc(0x198)]=_0x2bcfa0,this;}[_0x54b81e(0x200)](_0x854b38){const _0x3aedd5=_0x54b81e;var _0x3f667c,_0x446142;return(_0x3f667c=this[_0x3aedd5(0x1a9)])!=null&&_0x3f667c['ln']||(this[_0x3aedd5(0x1a9)]['ln']={}),!((_0x446142=this[_0x3aedd5(0x1a9)])==null||(_0x446142=_0x446142['ln'])==null)&&_0x446142[_0x3aedd5(0x1ca)]||(this[_0x3aedd5(0x1a9)]['ln']['startArrow']={}),this[_0x3aedd5(0x1a9)]['ln'][_0x3aedd5(0x1ca)]['size']=_0x854b38,this;}['setEndArrowSize'](_0x43230d){const _0x6c3623=_0x54b81e;var _0x4ba8c9,_0x10c265;return(_0x4ba8c9=this[_0x6c3623(0x1a9)])!=null&&_0x4ba8c9['ln']||(this['shapeData']['ln']={}),!((_0x10c265=this['shapeData'])==null||(_0x10c265=_0x10c265['ln'])==null)&&_0x10c265[_0x6c3623(0x1c9)]||(this[_0x6c3623(0x1a9)]['ln'][_0x6c3623(0x1c9)]={}),this[_0x6c3623(0x1a9)]['ln'][_0x6c3623(0x1c9)][_0x6c3623(0x1d7)]=_0x43230d,this;}[_0x54b81e(0x18e)](){const _0x461ce8=_0x54b81e;return super[_0x461ce8(0x18e)]();}[_0x54b81e(0x18a)](){const _0x3096c8=_0x54b81e;var _0x805345;return((_0x805345=this[_0x3096c8(0x1a9)])==null||(_0x805345=_0x805345['relation'])==null?void 0x0:_0x805345['to'])||null;}[_0x54b81e(0x190)](){const _0xb1bb60=_0x54b81e;var _0x20f0aa;return((_0x20f0aa=this[_0xb1bb60(0x1a9)])==null||(_0x20f0aa=_0x20f0aa[_0xb1bb60(0x1ac)])==null?void 0x0:_0x20f0aa['from'])||null;}};function I(_0x21d9e6,_0x4714cf,_0xf6def3,_0x33fa85,_0x42a00b,_0x3c9db4){const _0x5f41a8=_0x54b81e;let _0x353655=_0x42a00b['getShapeModel'](_0x21d9e6,_0x4714cf,_0xf6def3);if(!_0x353655)return null;let _0x2d2dc3=_0x3c9db4[_0x5f41a8(0x1fa)]({'unitId':_0x21d9e6,'subUnitId':_0x4714cf,'drawingId':_0xf6def3});if(!(_0x2d2dc3!=null&&_0x2d2dc3['transform']))return null;let {left:_0x44cdff=0x0,top:_0x36f51f=0x0,width:_0x152596=0x0,height:_0x3da4de=0x0,flipX:_0x152da3=!0x1,flipY:_0xf2ac95=!0x1,angle:_0x5a62bf}=_0x2d2dc3[_0x5f41a8(0x1ee)];_0x353655[_0x5f41a8(0x1c8)]({'width':_0x152596,'height':_0x3da4de});let _0x5d2060=_0x353655[_0x5f41a8(0x1c6)]()[_0x5f41a8(0x1a7)](_0x530fba=>_0x530fba[_0x5f41a8(0x1a5)]===_0x33fa85);if(!_0x5d2060)return null;let _0x4534b6=_0x152da3?_0x152596-_0x5d2060['x']:_0x5d2060['x'],_0x4bc27a=_0xf2ac95?_0x3da4de-_0x5d2060['y']:_0x5d2060['y'];if(_0x5a62bf&&_0x5a62bf!==0x0){let _0x4eedd5=_0x5a62bf*Math['PI']/0xb4,_0x5efbfa=Math[_0x5f41a8(0x199)](_0x4eedd5),_0x5085e1=Math[_0x5f41a8(0x1b8)](_0x4eedd5),_0x1bcdbd=_0x152596/0x2,_0x1bd527=_0x3da4de/0x2,_0x4fdda5=_0x4534b6-_0x1bcdbd,_0x2cf7f5=_0x4bc27a-_0x1bd527;_0x4534b6=_0x1bcdbd+_0x4fdda5*_0x5efbfa-_0x2cf7f5*_0x5085e1,_0x4bc27a=_0x1bd527+_0x4fdda5*_0x5085e1+_0x2cf7f5*_0x5efbfa;}_0x4534b6+=_0x44cdff,_0x4bc27a+=_0x36f51f;let _0x43e7e0=_0x5d2060['ang']/0xea60;_0x152da3&&(_0x43e7e0=0xb4-_0x43e7e0),_0xf2ac95&&(_0x43e7e0=-_0x43e7e0),_0x43e7e0+=_0x5a62bf||0x0,_0x43e7e0=(_0x43e7e0%0x168+0x168)%0x168;let _0xbf6f3d=_0x18b681({'left':_0x44cdff,'top':_0x36f51f,'width':_0x152596,'height':_0x3da4de},_0x5a62bf||0x0);return{'point':{'x':_0x4534b6,'y':_0x4bc27a},'angle':_0x43e7e0,'bounds':_0xbf6f3d};}function L(_0x4f13f4,_0x37ebaf){const _0x3346ce=_0x54b81e;let _0x17be9e=_0x37ebaf['x']-_0x4f13f4['x'],_0x49d0ea=_0x37ebaf['y']-_0x4f13f4['y'];return Math[_0x3346ce(0x1db)](_0x17be9e)>=Math['abs'](_0x49d0ea)?_0x17be9e>=0x0?0xb4:0x0:_0x49d0ea>=0x0?0x10e:0x5a;}function R(_0x5ce434,_0x30b722,_0x17d664,_0x354c05,_0x4185f4,_0x53dd57,_0x170dcb){const _0x53a1ca=_0x54b81e;let _0x4a8a60=_0x53dd57[_0x53a1ca(0x204)](_0x5ce434,_0x30b722,_0x17d664);if(!_0x4a8a60)return null;let _0x4d4db1=_0x170dcb[_0x53a1ca(0x1fa)]({'unitId':_0x5ce434,'subUnitId':_0x30b722,'drawingId':_0x17d664});if(!(_0x4d4db1!=null&&_0x4d4db1[_0x53a1ca(0x1ee)]))return null;let {left:_0x45b73e=0x0,top:_0x4c342c=0x0,width:_0x77f1e9=0x0,height:_0x64af1a=0x0,flipX:_0x3a7702=!0x1,flipY:_0x304454=!0x1}=_0x4d4db1[_0x53a1ca(0x1ee)];_0x4a8a60[_0x53a1ca(0x1c8)]({'width':_0x77f1e9,'height':_0x64af1a});let _0x2bb6e1=_0x4a8a60[_0x53a1ca(0x1c5)]();if(_0x2bb6e1[_0x53a1ca(0x1f6)]<0x2)return null;let _0x3ae722=_0x354c05?_0x2bb6e1[0x0]:_0x2bb6e1[_0x2bb6e1['length']-0x1],_0x2fafd6=new _0x1c99c4({'left':_0x45b73e,'top':_0x4c342c,'width':_0x77f1e9,'height':_0x64af1a,'flipX':_0x3a7702,'flipY':_0x304454})['localToWorld'](_0x3ae722);return{'point':_0x2fafd6,'angle':L(_0x4185f4[_0x53a1ca(0x206)],_0x2fafd6),'bounds':{'left':_0x2fafd6['x'],'top':_0x2fafd6['y'],'width':0x0,'height':0x0}};}var z=class extends _0x5e6e8d{async[_0x54b81e(0x1f9)](_0x4c89bd){const _0x12617c=_0x54b81e;let {unitId:_0x30415e,subUnitId:_0x49b68f,shapeId:_0x239849,shapeType:_0x24bb1a,shapeData:_0x4f9f19,x:_0x39d792,y:_0x3a9b28,width:_0x57eb45,height:_0x384b0b}=_0x4c89bd;return this[_0x12617c(0x1b4)][_0x12617c(0x1e2)](_0x323602['id'],{'unitId':_0x30415e,'subUnitId':_0x49b68f,'shapeId':_0x239849,'shapeType':_0x24bb1a,'shapeData':_0x4f9f19,'position':{'x':_0x39d792,'y':_0x3a9b28},'width':_0x57eb45,'height':_0x384b0b});}async[_0x54b81e(0x1cf)](_0x185bd3){const _0x964c4e=_0x54b81e;let {unitId:_0x5788fe,subUnitId:_0x299118,shapeId:_0x51952e,shapeType:_0x33ff36,shapeData:_0x55197e,x:_0xdd91d9,y:_0x1f207b,width:_0x42aba9,height:_0x52b1da}=_0x185bd3;return this[_0x964c4e(0x1b4)][_0x964c4e(0x1e2)](_0x319a78['id'],{'unitId':_0x5788fe,'subUnitId':_0x299118,'shapeId':_0x51952e,'shapeType':_0x33ff36,'shapeData':_0x55197e,'position':{'x':_0xdd91d9,'y':_0x1f207b},'width':_0x42aba9,'height':_0x52b1da});}[_0x54b81e(0x1fb)](_0x8575f6){const _0x15a2cb=_0x54b81e;let _0x358a38=this[_0x15a2cb(0x1df)]()[_0x15a2cb(0x205)](),_0x50f8be=this[_0x15a2cb(0x1d8)]();if(_0x8575f6){let _0x55ed05=new P(_0x358a38,_0x50f8be,_0x8575f6[_0x15a2cb(0x20d)],this[_0x15a2cb(0x1bd)]);return this[_0x15a2cb(0x1ae)](_0x55ed05,_0x358a38,_0x50f8be,_0x8575f6[_0x15a2cb(0x20d)]),_0x55ed05;}return new P(_0x358a38,_0x50f8be,_0x21137f(),this[_0x15a2cb(0x1bd)]);}[_0x54b81e(0x1b3)](_0x41864a){const _0x3c332c=_0x54b81e;let _0x10817f=this[_0x3c332c(0x1df)]()[_0x3c332c(0x205)](),_0x4cca60=this['getSheetId']();if(_0x41864a){let _0x16c254=new F(_0x10817f,_0x4cca60,_0x41864a[_0x3c332c(0x20d)],this[_0x3c332c(0x1bd)]);return this['_preloadShapeProperties'](_0x16c254,_0x10817f,_0x4cca60,_0x41864a[_0x3c332c(0x20d)]),_0x16c254;}return new F(_0x10817f,_0x4cca60,_0x21137f(),this[_0x3c332c(0x1bd)]);}[_0x54b81e(0x1cc)](){const _0x3932fb=_0x54b81e;let _0x4b2598=this[_0x3932fb(0x1bd)]['get'](_0x3df9e3),_0x3fd945=this[_0x3932fb(0x1df)]()[_0x3932fb(0x205)](),_0x42ce7d=this[_0x3932fb(0x1d8)](),_0x44f335=_0x4b2598[_0x3932fb(0x19e)](_0x3fd945,_0x42ce7d);if(!_0x44f335)return[];let _0x56e0d9=[];for(let [_0x4c8f31,_0x516086]of Object['entries'](_0x44f335))if(_0x516086&&_0x516086[_0x3932fb(0x1a4)]===_0x26e12b[_0x3932fb(0x1a6)]){let _0x26cde7=new P(_0x3fd945,_0x42ce7d,_0x4c8f31,this['_injector']);this[_0x3932fb(0x1ae)](_0x26cde7,_0x3fd945,_0x42ce7d,_0x4c8f31),_0x56e0d9[_0x3932fb(0x1e4)](_0x26cde7);}return _0x56e0d9;}[_0x54b81e(0x1ec)](_0x2f0ba8){const _0x399d93=_0x54b81e;let {unitId:_0x5d510c,subUnitId:_0x7fd1ba,drawId:_0x2957f4}=_0x2f0ba8;return this[_0x399d93(0x1b4)][_0x399d93(0x1e2)](_0x409d03['id'],{'unitId':_0x5d510c,'drawings':[{'unitId':_0x5d510c,'subUnitId':_0x7fd1ba,'drawingId':_0x2957f4,'drawingType':_0x26e12b[_0x399d93(0x1a6)]}]});}async[_0x54b81e(0x1a3)](_0x24067d){const _0x12c2d3=_0x54b81e;let {connector:_0x1beb45,startTarget:_0x16cea5,endTarget:_0xbb7992}=_0x24067d;if(!_0x16cea5&&!_0xbb7992)return!0x1;let _0x3bcbc9=this['getWorkbook']()[_0x12c2d3(0x205)](),_0x1f9d35=this[_0x12c2d3(0x1d8)](),_0x520d7e=this[_0x12c2d3(0x1bd)][_0x12c2d3(0x1ed)](_0x5ad4d6),_0xad06b2=this[_0x12c2d3(0x1bd)][_0x12c2d3(0x1ed)](_0x4a5a7c),_0x401eba=_0x520d7e[_0x12c2d3(0x204)](_0x3bcbc9,_0x1f9d35,_0x1beb45['drawId']);if(!_0x401eba)return!0x1;let _0x176b77=_0x401eba[_0x12c2d3(0x1bc)](),_0x2b8b8e=_0x401eba[_0x12c2d3(0x1ce)](),_0x3678af={};for(let _0x482089 of _0x401eba[_0x12c2d3(0x1d2)]()){let _0x116d59=_0x401eba[_0x12c2d3(0x1d4)](_0x482089);_0x116d59!==void 0x0&&(_0x3678af[_0x482089]=_0x116d59);}let {startInfo:_0x33ac67,endInfo:_0x2a6595}=this[_0x12c2d3(0x207)](_0x3bcbc9,_0x1f9d35,_0x1beb45,_0x401eba,_0x16cea5,_0xbb7992,_0x520d7e,_0xad06b2,_0x2b8b8e);if(!_0x33ac67||!_0x2a6595)return!0x1;let _0x4556b6=_0x2f7958(_0x10e3b1(_0x33ac67,_0x2a6595,_0x176b77),_0x176b77),_0x23931a={};return _0x16cea5?_0x23931a['from']={'shapeId':_0x16cea5[_0x12c2d3(0x1e1)][_0x12c2d3(0x20d)],'cxnIndex':_0x16cea5[_0x12c2d3(0x20a)]}:_0x2b8b8e!=null&&_0x2b8b8e[_0x12c2d3(0x1d0)]&&(_0x23931a[_0x12c2d3(0x1d0)]=_0x2b8b8e['from']),_0xbb7992?_0x23931a['to']={'shapeId':_0xbb7992[_0x12c2d3(0x1e1)]['drawId'],'cxnIndex':_0xbb7992['connectionSiteIndex']}:_0x2b8b8e!=null&&_0x2b8b8e['to']&&(_0x23931a['to']=_0x2b8b8e['to']),this[_0x12c2d3(0x1b4)][_0x12c2d3(0x1e2)](_0x1759cb['id'],{'unitId':_0x3bcbc9,'subUnitId':_0x1f9d35,'connectorShapeId':_0x1beb45[_0x12c2d3(0x20d)],'width':_0x4556b6[_0x12c2d3(0x1d9)]['width'],'height':_0x4556b6[_0x12c2d3(0x1d9)][_0x12c2d3(0x1fc)],'left':_0x4556b6[_0x12c2d3(0x1d9)][_0x12c2d3(0x19c)],'top':_0x4556b6[_0x12c2d3(0x1d9)][_0x12c2d3(0x18d)],'flipX':_0x4556b6[_0x12c2d3(0x1d9)][_0x12c2d3(0x1dc)]||!0x1,'flipY':_0x4556b6[_0x12c2d3(0x1d9)][_0x12c2d3(0x1a8)]||!0x1,'oldAdjustValues':_0x3678af,'newAdjustValues':_0x4556b6[_0x12c2d3(0x1b5)],'newLineType':_0x4556b6[_0x12c2d3(0x203)],'oldLineType':_0x176b77,'rotation':_0x4556b6['rotation'],'oldRelation':_0x2b8b8e,'newRelation':_0x23931a});}[_0x54b81e(0x1ae)](_0x23e528,_0x437ce0,_0x5a89cf,_0x5c3754){const _0x29f994=_0x54b81e;let _0x2fbc6e=this['_injector'][_0x29f994(0x1ed)](_0x4a5a7c)['getDrawingByParam']({'unitId':_0x437ce0,'subUnitId':_0x5a89cf,'drawingId':_0x5c3754});if(_0x2fbc6e!=null&&_0x2fbc6e[_0x29f994(0x1ee)]){var _0x4ef079,_0x29fc1f,_0x4cf964,_0x33afdb;_0x23e528['x']=(_0x4ef079=_0x2fbc6e['transform'][_0x29f994(0x19c)])==null?0x0:_0x4ef079,_0x23e528['y']=(_0x29fc1f=_0x2fbc6e['transform'][_0x29f994(0x18d)])==null?0x0:_0x29fc1f,_0x23e528['width']=(_0x4cf964=_0x2fbc6e[_0x29f994(0x1ee)][_0x29f994(0x1b2)])==null?_0x23e528[_0x29f994(0x1b2)]:_0x4cf964,_0x23e528[_0x29f994(0x1fc)]=(_0x33afdb=_0x2fbc6e[_0x29f994(0x1ee)][_0x29f994(0x1fc)])==null?_0x23e528[_0x29f994(0x1fc)]:_0x33afdb;}let _0x37a8c2=this[_0x29f994(0x1bd)]['get'](_0x5ad4d6)[_0x29f994(0x204)](_0x437ce0,_0x5a89cf,_0x5c3754);if(_0x37a8c2){_0x23e528[_0x29f994(0x1d5)]=_0x37a8c2[_0x29f994(0x1bc)]();let _0xa2be62=_0x37a8c2['getShapeData']();_0xa2be62&&(_0x23e528[_0x29f994(0x1a9)]=JSON['parse'](JSON['stringify'](_0xa2be62)));}}['_resolveEndpoints'](_0x48a0a4,_0x22ffa3,_0x592f26,_0x4ecb68,_0x23e82d,_0xda2dea,_0x7aa19c,_0x2ceed3,_0x2f5902){const _0x4c7673=_0x54b81e;let _0x485069=null,_0x1af934=null;return _0x23e82d&&(_0x485069=I(_0x48a0a4,_0x22ffa3,_0x23e82d[_0x4c7673(0x1e1)][_0x4c7673(0x20d)],_0x23e82d['connectionSiteIndex'],_0x7aa19c,_0x2ceed3)),_0xda2dea&&(_0x1af934=I(_0x48a0a4,_0x22ffa3,_0xda2dea[_0x4c7673(0x1e1)][_0x4c7673(0x20d)],_0xda2dea[_0x4c7673(0x20a)],_0x7aa19c,_0x2ceed3)),_0x485069||(_0x485069=this['_resolveExistingOrFreeEndpoint'](_0x48a0a4,_0x22ffa3,_0x592f26['drawId'],!0x0,_0x1af934,_0x2f5902==null?void 0x0:_0x2f5902['from'],_0x7aa19c,_0x2ceed3)),_0x1af934||(_0x1af934=this['_resolveExistingOrFreeEndpoint'](_0x48a0a4,_0x22ffa3,_0x592f26['drawId'],!0x1,_0x485069,_0x2f5902==null?void 0x0:_0x2f5902['to'],_0x7aa19c,_0x2ceed3)),{'startInfo':_0x485069,'endInfo':_0x1af934};}[_0x54b81e(0x201)](_0x5be75b,_0x2eac08,_0x1d5a4d,_0x1a8611,_0x12fa37,_0x4f744a,_0x1dcac8,_0xbff451){const _0x290951=_0x54b81e;if(_0x4f744a){let _0xf51e83=I(_0x5be75b,_0x2eac08,_0x4f744a[_0x290951(0x1fd)],_0x4f744a[_0x290951(0x1c0)],_0x1dcac8,_0xbff451);if(_0xf51e83)return _0xf51e83;}return _0x12fa37?R(_0x5be75b,_0x2eac08,_0x1d5a4d,_0x1a8611,_0x12fa37,_0x1dcac8,_0xbff451):null;}};function _0x4630(){const _0x526234=['setStrokeWidth','getShapes','toPrimitive','getShapeRelation','updateShape','from','ShapeArrowTypeEnum','getAdjustNames','setShapeType','getAdjustValueByName','shapeType','getShapeData','size','getSheetId','worldRect','ShapeArrowSizeEnum','abs','flipX','56652EnAEhg','setEndArrowType','getWorkbook','43062OlmgBO','shape','executeCommand','defineProperty','push','setAbsolutePosition','ShapeTypeEnum','\x20and\x20subUnitId\x20','symbol','3LWHVuy','2NossNV','iterator','removeShape','get','transform','371mTMdCV','capType','ShapeLineTypeEnum','fill','stroke','6227570xZXvNz','ShapeLineCapEnum','length','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','setShapeGradientFill','insertShape','getDrawingByParam','newShape','height','shapeId','string','ShapeLineDashEnum','setStartArrowSize','_resolveExistingOrFreeEndpoint','object','lineType','getShapeModel','getUnitId','point','_resolveEndpoints','gradientType','subUnitId','connectionSiteIndex','getConnectionSites','setStrokeLineCapType','drawId','gradientStops','setHeight','Skeleton\x20for\x20unitId\x20','getShapeId','getEndConnectInfo','default','GradientFill','top','build','getPosition','getStartConnectInfo','796557tXKeoR','128EBuNcO','setStrokeColor','ShapeLineJoinEnum','41589iDnJgw','setStrokeOpacity','setStrokeLineJoinType','type','cos','prototype','unitId','left','lineStrokeType','getDrawingData','setStrokeLineDashType','fillType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','10867580aIBTCb','connectShapes','drawingType','index','DRAWING_SHAPE','find','flipY','shapeData','setPosition','ShapeGradientTypeEnum','relation',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','_preloadShapeProperties','gradientAngle','7403coUqpD','ensureSkeleton','width','newConnector','_commandService','adjustValues','setShapeSolidFill','lineJoinType','sin','5012680CnzZzh','SolidFil','isLineShape','getShapeType','_injector','color','opacity','cxnIndex','extend','ShapeFillEnum','setNoneFill','function','getConnectorLinePoints','getConnectionSiteList','dashType','updateContext','endArrow','startArrow'];_0x4630=function(){return _0x526234;};return _0x4630();}_0x5e6e8d['extend'](z);export{F as FConnectorShape,P as FShape};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4c845f=_0x2c82;(function(_0x2eb0dd,_0x1252f7){const _0x550649=_0x2c82,_0x5e8956=_0x2eb0dd();while(!![]){try{const _0x232cd9=parseInt(_0x550649(0x1fe))/0x1*(parseInt(_0x550649(0x1ff))/0x2)+parseInt(_0x550649(0x1d0))/0x3*(-parseInt(_0x550649(0x208))/0x4)+parseInt(_0x550649(0x202))/0x5*(-parseInt(_0x550649(0x1eb))/0x6)+-parseInt(_0x550649(0x1f6))/0x7+-parseInt(_0x550649(0x1e3))/0x8*(-parseInt(_0x550649(0x1fc))/0x9)+parseInt(_0x550649(0x218))/0xa+-parseInt(_0x550649(0x1f0))/0xb*(-parseInt(_0x550649(0x1fb))/0xc);if(_0x232cd9===_0x1252f7)break;else _0x5e8956['push'](_0x5e8956['shift']());}catch(_0x3cb0cd){_0x5e8956['push'](_0x5e8956['shift']());}}}(_0x46f1,0xa2a81));import{CommandType as _0x564fb6,DependentOn as _0x4c3550,Disposable as _0x24c3c3,ICommandService as _0x23a80e,IConfigService as _0x344690,IResourceManagerService as _0x47ef38,IUndoRedoService as _0x340978,Inject as _0x299397,Injector as _0x441a1a,Plugin as _0xf3b44b,UniverInstanceType as _0x9e6c36,merge as _0x42bbf3,touchDependencies as _0x1601a1}from'@univerjs/core';import{ShapeModel as _0x244526,isConnectorShape as _0x41f54d}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x59912c}from'@univerjs-pro/license';function _0x2c82(_0x19c3ba,_0x4a7bad){_0x19c3ba=_0x19c3ba-0x1d0;const _0x46f1a2=_0x46f1();let _0x2c82be=_0x46f1a2[_0x19c3ba];return _0x2c82be;}function g(_0x215fe4){'@babel/helpers - typeof';const _0x34c62e=_0x2c82;return g=typeof Symbol==_0x34c62e(0x1da)&&typeof Symbol['iterator']==_0x34c62e(0x1d2)?function(_0x1f116d){return typeof _0x1f116d;}:function(_0x249510){const _0x2b6d34=_0x34c62e;return _0x249510&&typeof Symbol==_0x2b6d34(0x1da)&&_0x249510[_0x2b6d34(0x205)]===Symbol&&_0x249510!==Symbol[_0x2b6d34(0x20f)]?_0x2b6d34(0x1d2):typeof _0x249510;},g(_0x215fe4);}function _0x46f1(){const _0x204050=['parse','947548gJblkg','sheet.mutation.update-shape-type','version','getBasicShapeType','shapeData','1476EHwteo','9eINiba','setShapeType','4reqmif','5912YheLEz','getShapeData','MUTATION','15OBAOmQ','_linesIds','addShape','constructor','_initSnapshot','get','4334828bllqxk','toPrimitive','insertShape','onRendered','set','removeShape','COMMAND','prototype','from','_deserializeShapeForUnit','SHEET_SHAPE_PLUGIN','dispose','setConfig','pushUndoRedo','type','sheet.mutation.remove-shape','21040BJwiVP','_shapes','sheet.mutation.update-shape-data','add','toJSON','0.19.0','UNIVER_SHEET','_ensureShapeModelManager','_groupIds','_disposed','getShapeTypeById','keys','clear','string','3yqUsjH','delete','symbol','getShapeModel','has','_configService','length','fromJSON','registerCommand','every','function','push','hasShape','stringify','registerPluginResource','params','getBasicShapeRelation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','4182616YeMGKN','getShapeDataById','shapeId','getLineShapeRelation','forEach','sheets-shape.config','_config','object','1752042mkdUVR','sheet.command.update-shape-type','_initCommands','getOwnPropertyDescriptor','isLineShape','198946qlGrvF','getShapeType','_serializeShapeForUnit','decorate','_shapeModelManagerMap'];_0x46f1=function(){return _0x204050;};return _0x46f1();}function _(_0x4b42c1,_0x161b0d){const _0x5c39cf=_0x2c82;if(g(_0x4b42c1)!=_0x5c39cf(0x1ea)||!_0x4b42c1)return _0x4b42c1;var _0x30bfe8=_0x4b42c1[Symbol[_0x5c39cf(0x209)]];if(_0x30bfe8!==void 0x0){var _0x3f4d84=_0x30bfe8['call'](_0x4b42c1,_0x161b0d||_0x5c39cf(0x1e2));if(g(_0x3f4d84)!=_0x5c39cf(0x1ea))return _0x3f4d84;throw TypeError(_0x5c39cf(0x1e1));}return(_0x161b0d===_0x5c39cf(0x225)?String:Number)(_0x4b42c1);}function v(_0x4d8895){const _0x1fcfef=_0x2c82;var _0x5d939d=_(_0x4d8895,_0x1fcfef(0x225));return g(_0x5d939d)=='symbol'?_0x5d939d:_0x5d939d+'';}function y(_0x38045d,_0x2d6640,_0x247597){return(_0x2d6640=v(_0x2d6640))in _0x38045d?Object['defineProperty'](_0x38045d,_0x2d6640,{'value':_0x247597,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x38045d[_0x2d6640]=_0x247597,_0x38045d;}var b=class extends _0x24c3c3{constructor(){const _0x464829=_0x2c82;super(),y(this,_0x464829(0x219),new Map()),y(this,_0x464829(0x203),new Set()),y(this,_0x464829(0x220),new Set());}[_0x4c845f(0x204)](_0x17e1c5,_0xcf0d7e,_0x5d3356){const _0x5e4bad=_0x4c845f;let _0x14ef2a=new _0x244526(_0x17e1c5,_0xcf0d7e,_0x5d3356);return this[_0x5e4bad(0x219)][_0x5e4bad(0x20c)](_0xcf0d7e,_0x14ef2a),_0x41f54d(_0x17e1c5)&&this[_0x5e4bad(0x203)]['add'](_0xcf0d7e),_0x14ef2a;}[_0x4c845f(0x1e0)](_0x466171){const _0x199248=_0x4c845f;let _0x30a2b0=[];for(let _0x3c6af1 of this[_0x199248(0x203)]){let _0x4186af=this['_shapes'][_0x199248(0x207)](_0x3c6af1);if(_0x4186af){let _0xbfed16=_0x4186af['getShapeRelation']();if(_0xbfed16){var _0x1e92df,_0x4f5b63;((_0x1e92df=_0xbfed16[_0x199248(0x210)])==null?void 0x0:_0x1e92df[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['from'],'lineShapeId':_0x3c6af1,'isFrom':!0x0}),((_0x4f5b63=_0xbfed16['to'])==null?void 0x0:_0x4f5b63[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['to'],'lineShapeId':_0x3c6af1,'isFrom':!0x1});}}}return _0x30a2b0;}[_0x4c845f(0x1e6)](_0x1db441){const _0x562063=_0x4c845f;let _0x2cc54b=this[_0x562063(0x219)][_0x562063(0x207)](_0x1db441);if(_0x2cc54b)return _0x2cc54b['getShapeRelation']();}['getShapeType'](_0x52c98e){const _0x55d71b=_0x4c845f;let _0x4fed67=this[_0x55d71b(0x219)]['get'](_0x52c98e);if(_0x4fed67)return _0x4fed67[_0x55d71b(0x1f1)]();}[_0x4c845f(0x1dc)](_0x238ce5){const _0x27610d=_0x4c845f;return this['_shapes'][_0x27610d(0x1d4)](_0x238ce5);}['removeShape'](_0x43708e){const _0x2ad3d8=_0x4c845f;let _0x567c9c=this['_shapes'][_0x2ad3d8(0x207)](_0x43708e);_0x567c9c&&(_0x41f54d(_0x567c9c[_0x2ad3d8(0x1f1)]())&&this['_linesIds'][_0x2ad3d8(0x1d1)](_0x43708e),this['_shapes']['delete'](_0x43708e));}[_0x4c845f(0x21c)](){const _0x37bdb2=_0x4c845f;let _0x527913=[];return this[_0x37bdb2(0x219)]['forEach'](_0x2b14dc=>{const _0x4e63b4=_0x37bdb2;_0x527913[_0x4e63b4(0x1db)](_0x2b14dc[_0x4e63b4(0x21c)]());}),_0x527913;}[_0x4c845f(0x1d7)](_0x3092e5){const _0x5c64fd=_0x4c845f;for(let _0x3301c3 of _0x3092e5){let {id:_0x47bda6,shapeType:_0x30d750}=_0x3301c3,_0x1ab81e=this['addShape'](_0x30d750,_0x47bda6,_0x3301c3[_0x5c64fd(0x1fa)]);_0x1ab81e&&_0x1ab81e[_0x5c64fd(0x1ef)]()&&this['_linesIds'][_0x5c64fd(0x21b)](_0x47bda6);}}[_0x4c845f(0x213)](){const _0x4ee1c3=_0x4c845f;this[_0x4ee1c3(0x221)]||(this[_0x4ee1c3(0x219)][_0x4ee1c3(0x1e7)](_0x2e3414=>{_0x2e3414['dispose']();}),this[_0x4ee1c3(0x219)][_0x4ee1c3(0x224)](),this[_0x4ee1c3(0x203)][_0x4ee1c3(0x224)](),this['_groupIds'][_0x4ee1c3(0x224)](),super[_0x4ee1c3(0x213)]());}};function x(_0x19f025,_0x270324){return function(_0x3b36cb,_0x5b7f1c){_0x270324(_0x3b36cb,_0x5b7f1c,_0x19f025);};}function S(_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca){const _0x3d526c=_0x4c845f;var _0x1d7924=arguments[_0x3d526c(0x1d6)],_0x5bac77=_0x1d7924<0x3?_0x3edbf7:_0x56bca===null?_0x56bca=Object[_0x3d526c(0x1ee)](_0x3edbf7,_0x342e4c):_0x56bca,_0xe76073;if(typeof Reflect==_0x3d526c(0x1ea)&&typeof Reflect[_0x3d526c(0x1f3)]==_0x3d526c(0x1da))_0x5bac77=Reflect['decorate'](_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca);else{for(var _0x27f517=_0x4b128a['length']-0x1;_0x27f517>=0x0;_0x27f517--)(_0xe76073=_0x4b128a[_0x27f517])&&(_0x5bac77=(_0x1d7924<0x3?_0xe76073(_0x5bac77):_0x1d7924>0x3?_0xe76073(_0x3edbf7,_0x342e4c,_0x5bac77):_0xe76073(_0x3edbf7,_0x342e4c))||_0x5bac77);}return _0x1d7924>0x3&&_0x5bac77&&Object['defineProperty'](_0x3edbf7,_0x342e4c,_0x5bac77),_0x5bac77;}let C=class extends _0x24c3c3{constructor(_0x420774){const _0x23a4bc=_0x4c845f;super(),this['_resourcesManagerService']=_0x420774,y(this,_0x23a4bc(0x1f4),new Map()),this[_0x23a4bc(0x206)]();}[_0x4c845f(0x21f)](_0x4592ab,_0x49206c){const _0x553236=_0x4c845f;let _0x1a1ab8=this[_0x553236(0x1f4)][_0x553236(0x207)](_0x4592ab);_0x1a1ab8||(_0x1a1ab8=new Map(),this[_0x553236(0x1f4)][_0x553236(0x20c)](_0x4592ab,_0x1a1ab8));let _0x16ca84=_0x1a1ab8[_0x553236(0x207)](_0x49206c);return _0x16ca84||(_0x16ca84=new b(),_0x1a1ab8['set'](_0x49206c,_0x16ca84)),_0x16ca84;}[_0x4c845f(0x20a)](_0x56950e,_0x4015d2,_0x435642,_0x3720ef,_0x3bfe8b){const _0x5659e8=_0x4c845f;this[_0x5659e8(0x21f)](_0x56950e,_0x4015d2)['addShape'](_0x435642,_0x3720ef,_0x3bfe8b);}['removeShape'](_0x1c60b0,_0x37985c,_0x500fcc){const _0x37627d=_0x4c845f;this['_ensureShapeModelManager'](_0x1c60b0,_0x37985c)[_0x37627d(0x20d)](_0x500fcc);}[_0x4c845f(0x1f9)](_0x5933e6,_0x3c1428,_0x4c93f5){const _0x4d6bcd=_0x4c845f;return this[_0x4d6bcd(0x21f)](_0x5933e6,_0x3c1428)[_0x4d6bcd(0x1f1)](_0x4c93f5);}[_0x4c845f(0x1f1)](_0x3e68f7,_0x9ef5b4,_0x543d9e){const _0x1d90c2=_0x4c845f;return this[_0x1d90c2(0x21f)](_0x3e68f7,_0x9ef5b4)[_0x1d90c2(0x1f1)](_0x543d9e);}[_0x4c845f(0x1dc)](_0x35cf4c,_0x5a1672,_0x4022fd){const _0x106604=_0x4c845f;return this['_ensureShapeModelManager'](_0x35cf4c,_0x5a1672)[_0x106604(0x1dc)](_0x4022fd);}[_0x4c845f(0x222)](_0x144ac6,_0xd70bb8,_0x5510f){const _0x1c1321=_0x4c845f;return this['_ensureShapeModelManager'](_0x144ac6,_0xd70bb8)[_0x1c1321(0x1f1)](_0x5510f);}[_0x4c845f(0x1e4)](_0x2c734e,_0x485056,_0x562cb8){const _0x4f3c9f=_0x4c845f;let _0x2dfe4f=this[_0x4f3c9f(0x21f)](_0x2c734e,_0x485056);if(!_0x2dfe4f[_0x4f3c9f(0x1f1)](_0x562cb8))return;let _0x427f73=_0x2dfe4f[_0x4f3c9f(0x219)][_0x4f3c9f(0x207)](_0x562cb8);if(_0x427f73)return _0x427f73['getShapeData']();}[_0x4c845f(0x1d3)](_0x372886,_0x362a21,_0x4b7f38){const _0xf67317=_0x4c845f;return this[_0xf67317(0x21f)](_0x372886,_0x362a21)[_0xf67317(0x219)][_0xf67317(0x207)](_0x4b7f38);}[_0x4c845f(0x1e0)](_0x37be24,_0x1c4422,_0x2226d7){const _0x345ddf=_0x4c845f;return this[_0x345ddf(0x21f)](_0x37be24,_0x1c4422)[_0x345ddf(0x1e0)](_0x2226d7);}[_0x4c845f(0x1e6)](_0x29bb7c,_0x266e5d,_0x437fa5){const _0x5cf384=_0x4c845f;let _0x1a55e8=this[_0x5cf384(0x21f)](_0x29bb7c,_0x266e5d)['_shapes']['get'](_0x437fa5);if(_0x1a55e8)return _0x1a55e8['getShapeRelation']();}['setShapeType'](){}[_0x4c845f(0x1f2)](_0x4600ca){const _0x34d20e=_0x4c845f;let _0x5959bb={},_0x416405=this['_shapeModelManagerMap'][_0x34d20e(0x207)](_0x4600ca);return _0x416405&&_0x416405['forEach']((_0x328d69,_0x493b48)=>{const _0x1236c0=_0x34d20e;let _0x2d1dab=_0x328d69[_0x1236c0(0x21c)]();_0x2d1dab[_0x1236c0(0x1d6)]>0x0&&(_0x5959bb[_0x493b48]=_0x2d1dab);}),JSON[_0x34d20e(0x1dd)](_0x5959bb);}[_0x4c845f(0x211)](_0x1620e7,_0x13f346){const _0x33e6b5=_0x4c845f;Object[_0x33e6b5(0x223)](_0x13f346)[_0x33e6b5(0x1e7)](_0x59cc16=>{const _0x51ae2b=_0x33e6b5;this[_0x51ae2b(0x21f)](_0x1620e7,_0x59cc16)[_0x51ae2b(0x1d7)](_0x13f346[_0x59cc16]);});}[_0x4c845f(0x21c)](){let _0x192e3c={};return this['_shapeModelManagerMap']['forEach']((_0x17cfc1,_0x6c8c31)=>{const _0x20997d=_0x2c82;_0x192e3c[_0x6c8c31]={},_0x17cfc1[_0x20997d(0x1e7)]((_0x3eed93,_0x3dd647)=>{const _0x55b924=_0x20997d;_0x192e3c[_0x6c8c31][_0x3dd647]=_0x3eed93[_0x55b924(0x21c)]();});}),_0x192e3c;}['fromJSON'](_0x2b9aa6){const _0x3cb7c8=_0x4c845f;Object[_0x3cb7c8(0x223)](_0x2b9aa6)[_0x3cb7c8(0x1e7)](_0xa77f3f=>{const _0x2cac5c=_0x3cb7c8;let _0x23e50b=_0x2b9aa6[_0xa77f3f];Object[_0x2cac5c(0x223)](_0x23e50b)[_0x2cac5c(0x1e7)](_0x41faa0=>{const _0x4c2166=_0x2cac5c;this[_0x4c2166(0x21f)](_0xa77f3f,_0x41faa0)[_0x4c2166(0x1d7)](_0x23e50b[_0x41faa0]);});});}[_0x4c845f(0x206)](){const _0xd42709=_0x4c845f;this['_resourcesManagerService'][_0xd42709(0x1de)]({'pluginName':_0xd42709(0x212),'businesses':[_0x9e6c36[_0xd42709(0x21e)]],'toJson':_0x27902b=>this[_0xd42709(0x1f2)](_0x27902b),'parseJson':_0x5b474d=>JSON[_0xd42709(0x1f5)](_0x5b474d),'onLoad':(_0x4afaa7,_0x2bcbb4)=>{this['_deserializeShapeForUnit'](_0x4afaa7,_0x2bcbb4);},'onUnLoad':_0x29d896=>{const _0x19cf53=_0xd42709;let _0x464d69=this[_0x19cf53(0x1f4)][_0x19cf53(0x207)](_0x29d896);_0x464d69&&(_0x464d69[_0x19cf53(0x1e7)](_0x23fdd1=>{const _0x5694ee=_0x19cf53;_0x23fdd1[_0x5694ee(0x213)]();}),this[_0x19cf53(0x1f4)]['delete'](_0x29d896));}});}[_0x4c845f(0x213)](){const _0x5ad7c5=_0x4c845f;this[_0x5ad7c5(0x1f4)][_0x5ad7c5(0x1e7)](_0x48ea70=>{const _0x353834=_0x5ad7c5;_0x48ea70[_0x353834(0x1e7)](_0x22184d=>{const _0x156a55=_0x353834;_0x22184d[_0x156a55(0x213)]();});});}};C=S([x(0x0,_0x47ef38)],C);const w={'id':_0x4c845f(0x1f7),'type':_0x564fb6['MUTATION'],'handler':(_0x19f627,_0x2fa4ae)=>{const _0xa67d4=_0x4c845f;let {unitId:_0x5c5b50,subUnitId:_0x1a4108,shapeType:_0x38be1b,shapeId:_0x310cab,shapeData:_0x1c480d}=_0x2fa4ae,_0x196697=_0x19f627[_0xa67d4(0x207)](C)['getShapeModel'](_0x5c5b50,_0x1a4108,_0x310cab);return _0x196697&&(_0x196697[_0xa67d4(0x1fd)](_0x38be1b),_0x1c480d&&(_0x196697==null||_0x196697['setShapeData'](_0x1c480d))),!0x0;}},T={'id':_0x4c845f(0x1ec),'type':_0x564fb6[_0x4c845f(0x20e)],'handler':(_0x235e8f,_0x7afcd)=>{const _0x586bd8=_0x4c845f;if(!_0x7afcd)return!0x1;let _0x51c5e8=_0x235e8f[_0x586bd8(0x207)](_0x23a80e),_0x362d77=_0x235e8f[_0x586bd8(0x207)](C),_0x26d965=_0x235e8f[_0x586bd8(0x207)](_0x340978),_0x3a92bd=[],_0x5a0f12=[],{unitId:_0x1a8743,subUnitId:_0x5b5be2,shapeId:_0x2d0413,shapeType:_0x2f1e2e,shapeData:_0x166f31}=_0x7afcd,_0x2a0bde=_0x362d77[_0x586bd8(0x1d3)](_0x1a8743,_0x5b5be2,_0x2d0413);if(_0x2a0bde){let _0x413e8a=_0x2a0bde[_0x586bd8(0x1f1)](),_0x2c27ff=Object['assign']({},_0x2a0bde[_0x586bd8(0x200)]()),_0x139f33={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x2f1e2e,'shapeData':_0x166f31},_0x185109={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x413e8a,'shapeData':_0x2c27ff};return _0x3a92bd[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x139f33}),_0x5a0f12[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x185109}),_0x3a92bd[_0x586bd8(0x1d9)](_0x56780e=>_0x51c5e8['syncExecuteCommand'](_0x56780e['id'],_0x56780e[_0x586bd8(0x1df)]))&&_0x26d965[_0x586bd8(0x215)]({'unitID':_0x1a8743,'redoMutations':[..._0x3a92bd],'undoMutations':[..._0x5a0f12]}),!0x0;}return!0x1;}},E={'id':'sheet.mutation.insert-shape','type':_0x564fb6['MUTATION'],'handler':(_0x5e925d,_0x29ddfc)=>{const _0x226043=_0x4c845f;let {unitId:_0x4a0ef1,subUnitId:_0x5012ec,shapeType:_0x539523,shapeId:_0x42f62c,shapeData:_0x4dbbab}=_0x29ddfc;return _0x5e925d[_0x226043(0x207)](C)[_0x226043(0x20a)](_0x4a0ef1,_0x5012ec,_0x539523,_0x42f62c,_0x4dbbab),!0x0;}},D={'id':_0x4c845f(0x217),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0x2a3f4b,_0x430087)=>{const _0xc8cb31=_0x4c845f;let {unitId:_0x3b79a0,subUnitId:_0x590739,shapeId:_0x3fbe0c}=_0x430087;return _0x2a3f4b[_0xc8cb31(0x207)](C)[_0xc8cb31(0x20d)](_0x3b79a0,_0x590739,_0x3fbe0c),!0x0;}},O={'id':_0x4c845f(0x21a),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0xa6522b,_0x5c7482)=>{const _0x40d8d2=_0x4c845f;let {unitId:_0x1c0b11,subUnitId:_0x3b5680,shapeType:_0x470993,shapeId:_0x18298d,shapeData:_0x13bc42}=_0x5c7482,_0xef88e4=_0xa6522b['get'](C)[_0x40d8d2(0x1d3)](_0x1c0b11,_0x3b5680,_0x18298d);return _0xef88e4&&(_0x470993!==void 0x0&&_0xef88e4[_0x40d8d2(0x1fd)](_0x470993),_0x13bc42&&(_0xef88e4==null||_0xef88e4['setShapeData'](_0x13bc42,!0x0))),!0x0;}};var k='@univerjs-pro/sheets-shape',A=_0x4c845f(0x21d);const j=_0x4c845f(0x1e8);Symbol(j);const M={};let N=class extends _0xf3b44b{constructor(_0x53bb60=M,_0x215e7a,_0x2b5d5f,_0x2125a9){const _0x452f52=_0x4c845f;super(),this[_0x452f52(0x1e9)]=_0x53bb60,this['_injector']=_0x215e7a,this['_commandService']=_0x2b5d5f,this[_0x452f52(0x1d5)]=_0x2125a9;let {..._0x360859}=_0x42bbf3({},M,this[_0x452f52(0x1e9)]);this[_0x452f52(0x1d5)][_0x452f52(0x214)](j,_0x360859),this[_0x452f52(0x1ed)]();}[_0x4c845f(0x20b)](){_0x1601a1(this['_injector'],[]);}['onStarting'](){const _0x401c32=_0x4c845f;let _0x21791e=this['_injector'];[[b],[C]][_0x401c32(0x1e7)](_0x1e4e95=>_0x21791e[_0x401c32(0x21b)](_0x1e4e95));}[_0x4c845f(0x1ed)](){const _0x493396=_0x4c845f;[E,D,w,O][_0x493396(0x1e7)](_0x39080c=>this['disposeWithMe'](this['_commandService'][_0x493396(0x1d8)](_0x39080c)));}};y(N,_0x4c845f(0x216),_0x9e6c36[_0x4c845f(0x21e)]),y(N,'pluginName','SHEET_SHAPE_PLUGIN'),y(N,'packageName',k),y(N,_0x4c845f(0x1f8),A),N=S([_0x4c3550(_0x59912c),x(0x1,_0x299397(_0x441a1a)),x(0x2,_0x23a80e),x(0x3,_0x344690)],N);export{E as InsertSheetsShapeMutation,D as RemoveSheetsShapeMutation,C as SheetsShapeService,N as UniverSheetsShapePlugin,O as UpdateSheetsShapeDataMutation,T as UpdateSheetsShapeTypeCommand,w as UpdateSheetsShapeTypeMutation};
|
|
1
|
+
const _0x58a3d5=_0x1c4c;(function(_0x4460d8,_0x3d77a9){const _0x264d6e=_0x1c4c,_0x2cf037=_0x4460d8();while(!![]){try{const _0x36e53b=parseInt(_0x264d6e(0x178))/0x1*(parseInt(_0x264d6e(0x19a))/0x2)+parseInt(_0x264d6e(0x141))/0x3+-parseInt(_0x264d6e(0x180))/0x4*(-parseInt(_0x264d6e(0x16e))/0x5)+parseInt(_0x264d6e(0x129))/0x6+parseInt(_0x264d6e(0x19c))/0x7+parseInt(_0x264d6e(0x172))/0x8+-parseInt(_0x264d6e(0x13d))/0x9;if(_0x36e53b===_0x3d77a9)break;else _0x2cf037['push'](_0x2cf037['shift']());}catch(_0x42af7d){_0x2cf037['push'](_0x2cf037['shift']());}}}(_0x41a1,0xd5e58));import{ShapeModel as _0x29bfb6,computeConnectorRouteLayout as _0x1b7fa5,getBasicShapeRotateBound as _0x3b1527,isConnectorShape as _0x48f6a6,routeConnectorLineShape as _0x4bd7db}from'@univerjs-pro/engine-shape';import{CommandType as _0x2518e2,DependentOn as _0x1b6787,Disposable as _0x3e2f6c,DrawingTypeEnum as _0x29ca4c,ICommandService as _0x24fd18,IConfigService as _0x5a07f8,IResourceManagerService as _0x58972f,IUndoRedoService as _0xc84305,IUniverInstanceService as _0x53c869,Inject as _0x5d21b3,Injector as _0x2345ca,Plugin as _0x5bc10b,UniverInstanceType as _0x3a3817,generateRandomId as _0x501d12,merge as _0x1f668c,sequenceExecute as _0x46e0d2,touchDependencies as _0x253d80}from'@univerjs/core';import{SheetInterceptorService as _0x7a4d09,SheetSkeletonService as _0x1515ae,getSheetCommandTarget as _0x282dcd}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation as _0x10a6b0,DrawingApplyType as _0xafe5b9,ISheetDrawingService as _0x17ec86,InsertSheetDrawingCommand as _0x3694da,RemoveSheetDrawingCommand as _0x209cc8,SetDrawingApplyMutation as _0x3e02e5,SetSheetDrawingCommand as _0x2d8360,transformToAxisAlignPosition as _0xc67ff1,transformToDrawingPosition as _0x5d28ad}from'@univerjs/sheets-drawing';import{UniverLicensePlugin as _0x525d5e}from'@univerjs-pro/license';import{IDrawingManagerService as _0x579441}from'@univerjs/drawing';const I=0xc8,L=0xc8;function R(_0x2f6bdb){'@babel/helpers - typeof';const _0x1c44e3=_0x1c4c;return R=typeof Symbol==_0x1c44e3(0x120)&&typeof Symbol[_0x1c44e3(0x12c)]==_0x1c44e3(0x13c)?function(_0x44d96a){return typeof _0x44d96a;}:function(_0x29bfed){const _0x175434=_0x1c44e3;return _0x29bfed&&typeof Symbol==_0x175434(0x120)&&_0x29bfed[_0x175434(0x11e)]===Symbol&&_0x29bfed!==Symbol[_0x175434(0x160)]?_0x175434(0x13c):typeof _0x29bfed;},R(_0x2f6bdb);}function z(_0x56d929,_0x40402c){const _0x2cf117=_0x1c4c;if(R(_0x56d929)!=_0x2cf117(0x16f)||!_0x56d929)return _0x56d929;var _0x37ecec=_0x56d929[Symbol[_0x2cf117(0x114)]];if(_0x37ecec!==void 0x0){var _0x12f2f9=_0x37ecec[_0x2cf117(0x12b)](_0x56d929,_0x40402c||_0x2cf117(0x179));if(R(_0x12f2f9)!=_0x2cf117(0x16f))return _0x12f2f9;throw TypeError(_0x2cf117(0x12f));}return(_0x40402c===_0x2cf117(0x156)?String:Number)(_0x56d929);}function B(_0x365847){const _0x23e3e3=_0x1c4c;var _0x366739=z(_0x365847,_0x23e3e3(0x156));return R(_0x366739)=='symbol'?_0x366739:_0x366739+'';}function V(_0x4e06ac,_0x41d37d,_0x1d146e){const _0x1c4dc5=_0x1c4c;return(_0x41d37d=B(_0x41d37d))in _0x4e06ac?Object[_0x1c4dc5(0x194)](_0x4e06ac,_0x41d37d,{'value':_0x1d146e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4e06ac[_0x41d37d]=_0x1d146e,_0x4e06ac;}function _0x1c4c(_0x2674e0,_0x5ba4be){_0x2674e0=_0x2674e0-0x10d;const _0x41a1cf=_0x41a1();let _0x1c4c5b=_0x41a1cf[_0x2674e0];return _0x1c4c5b;}var H=class extends _0x3e2f6c{constructor(){const _0x556f5a=_0x1c4c;super(),V(this,'_shapes',new Map()),V(this,_0x556f5a(0x136),new Set()),V(this,_0x556f5a(0x12e),new Set());}[_0x58a3d5(0x170)](_0x56df8e,_0x1fc5cd,_0x48190d){const _0x256fdc=_0x58a3d5;let _0x185899=new _0x29bfb6(_0x56df8e,_0x1fc5cd,_0x48190d);return this[_0x256fdc(0x127)]['set'](_0x1fc5cd,_0x185899),_0x48f6a6(_0x56df8e)&&this[_0x256fdc(0x136)][_0x256fdc(0x159)](_0x1fc5cd),_0x185899;}[_0x58a3d5(0x14b)](_0x8dabe7){const _0x500904=_0x58a3d5;let _0x330df5=[];for(let _0x30bc62 of this[_0x500904(0x136)]){let _0x381461=this[_0x500904(0x127)]['get'](_0x30bc62);if(_0x381461){let _0x515249=_0x381461[_0x500904(0x138)]();if(_0x515249){var _0x21d0d7,_0x59c024;((_0x21d0d7=_0x515249[_0x500904(0x1a6)])==null?void 0x0:_0x21d0d7[_0x500904(0x149)])===_0x8dabe7&&_0x330df5[_0x500904(0x19b)]({..._0x515249[_0x500904(0x1a6)],'lineShapeId':_0x30bc62,'isFrom':!0x0}),((_0x59c024=_0x515249['to'])==null?void 0x0:_0x59c024[_0x500904(0x149)])===_0x8dabe7&&_0x330df5[_0x500904(0x19b)]({..._0x515249['to'],'lineShapeId':_0x30bc62,'isFrom':!0x1});}}}return _0x330df5;}[_0x58a3d5(0x124)](_0x58e279){const _0x5c85a4=_0x58a3d5;let _0x42e0a0=this[_0x5c85a4(0x127)][_0x5c85a4(0x118)](_0x58e279);if(_0x42e0a0)return _0x42e0a0[_0x5c85a4(0x138)]();}[_0x58a3d5(0x1a3)](_0xe09603){const _0x2e8775=_0x58a3d5;let _0x557f30=this[_0x2e8775(0x127)][_0x2e8775(0x118)](_0xe09603);if(_0x557f30)return _0x557f30[_0x2e8775(0x1a3)]();}[_0x58a3d5(0x157)](_0x3ddd61){const _0x70e2f4=_0x58a3d5;return this[_0x70e2f4(0x127)]['has'](_0x3ddd61);}[_0x58a3d5(0x128)](_0x3e6f17){const _0x2a91c6=_0x58a3d5;let _0x3fac13=this['_shapes'][_0x2a91c6(0x118)](_0x3e6f17);_0x3fac13&&(_0x48f6a6(_0x3fac13['getShapeType']())&&this[_0x2a91c6(0x136)][_0x2a91c6(0x15e)](_0x3e6f17),this[_0x2a91c6(0x127)]['delete'](_0x3e6f17));}[_0x58a3d5(0x11a)](){const _0x70328d=_0x58a3d5;let _0x2d74bc=[];return this['_shapes'][_0x70328d(0x197)](_0x18c60d=>{const _0x5db440=_0x70328d;_0x2d74bc[_0x5db440(0x19b)](_0x18c60d['toJSON']());}),_0x2d74bc;}[_0x58a3d5(0x1a4)](_0x1179ff){const _0x298f0d=_0x58a3d5;for(let _0x16edd1 of _0x1179ff){let {id:_0xcc37b,shapeType:_0x4d88e9}=_0x16edd1,_0x32991a=this[_0x298f0d(0x170)](_0x4d88e9,_0xcc37b,_0x16edd1['shapeData']);_0x32991a&&_0x32991a[_0x298f0d(0x16a)]()&&this['_linesIds'][_0x298f0d(0x159)](_0xcc37b);}}[_0x58a3d5(0x164)](){const _0x3ee3a1=_0x58a3d5;this[_0x3ee3a1(0x15f)]||(this[_0x3ee3a1(0x127)][_0x3ee3a1(0x197)](_0x670cd4=>{const _0xeaeea2=_0x3ee3a1;_0x670cd4[_0xeaeea2(0x164)]();}),this['_shapes'][_0x3ee3a1(0x15c)](),this[_0x3ee3a1(0x136)]['clear'](),this[_0x3ee3a1(0x12e)]['clear'](),super[_0x3ee3a1(0x164)]());}};function U(_0x559870,_0x1f613e){return function(_0x39b4c5,_0x27ed3a){_0x1f613e(_0x39b4c5,_0x27ed3a,_0x559870);};}function _0x41a1(){const _0x2c613a=['getShapeData','startX','2685078dgVzOY','_resourcesManagerService','UNIVER_SHEET','sheet.command.insert-shape','entries','REMOVE','rotation','getShapeDataById','shapeId','getAdjustNames','getBasicShapeRelation','getAdjustValueByName','sheet.mutation.remove-shape','width','getCellIndexAndOffsetByPosition','rotateEnabled','DRAWING_SHAPE','disposeWithMe','sheet.command.update-connector-relation','params','borderEnabled','string','hasShape','_ensureShapeModelManager','add','redos','_injector','clear','getBatchAddOp','delete','_disposed','prototype','sheet.mutation.update-shape-type','SHEET_SHAPE_PLUGIN','parse','dispose','getBasicShapeType','sheet.command.update-shape-type','sheet.command.set-shape-rotate','assign','_initCommands','isLineShape','version','worldRect','registerCommand','2230xVsNCA','object','addShape','left','11602536QiIUMl','pushUndoRedo','flipX','onStarting','preRedos','sin','6NeTblp','default','ensureSkeleton','_serializeShapeForUnit','cxnIndex','find','adjustValues','set','11260WgJvCf','getCellWithCoordByIndex','ang','setConfig','getBatchUpdateOp','onCommandExecute','getSkeleton','sheet.command.update-line-shape-resize','setShapeData','height','updateContext','cos','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','preUndos','_config','top','INSERT','resizeEnabled','undos','registerPluginResource','defineProperty','range','flipY','forEach','drawingType','_deserializeShapeForUnit','458642oRvcXz','push','10535651VLqhAZ','getDrawingByParam','_addLineRerouteUpdates','syncExecuteCommand','_configService','_shapeModelManagerMap','angle','getShapeType','fromJSON','getEndConnectInfo','from','getShapeTypeById','_initCommandInterceptor','keys','relation','lineType','0.20.0','isFrom','setShapeType','toPrimitive','_sheetsShapeService','packageName','lineShapeId','get','COMMAND','toJSON','insertShape','length','transform','constructor','UPDATE','function','MUTATION','_getConnectPointInfo','fill','getLineShapeRelation','getOwnPropertyDescriptor','_sheetInterceptorService','_shapes','removeShape','239940nRWTXr','_drawingManagerService','call','iterator','_sheetSkeletonService','_groupIds','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commandService','_addLineFollowShapeUpdates','data','interceptCommand','getShapeModel','@univerjs-pro/sheets-shape','_linesIds','filter','getShapeRelation','getDrawingData','sheet.mutation.update-shape-data','type','symbol','50811498RpJsRH','position'];_0x41a1=function(){return _0x2c613a;};return _0x41a1();}function W(_0x488c15,_0x5ade47,_0x150f1,_0x599680){const _0x4928ee=_0x58a3d5;var _0x4dcca=arguments[_0x4928ee(0x11c)],_0x12ec85=_0x4dcca<0x3?_0x5ade47:_0x599680===null?_0x599680=Object[_0x4928ee(0x125)](_0x5ade47,_0x150f1):_0x599680,_0x1212da;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x12ec85=Reflect['decorate'](_0x488c15,_0x5ade47,_0x150f1,_0x599680);else{for(var _0x2f90e0=_0x488c15[_0x4928ee(0x11c)]-0x1;_0x2f90e0>=0x0;_0x2f90e0--)(_0x1212da=_0x488c15[_0x2f90e0])&&(_0x12ec85=(_0x4dcca<0x3?_0x1212da(_0x12ec85):_0x4dcca>0x3?_0x1212da(_0x5ade47,_0x150f1,_0x12ec85):_0x1212da(_0x5ade47,_0x150f1))||_0x12ec85);}return _0x4dcca>0x3&&_0x12ec85&&Object[_0x4928ee(0x194)](_0x5ade47,_0x150f1,_0x12ec85),_0x12ec85;}let G=class extends _0x3e2f6c{constructor(_0x961285){const _0x30c409=_0x58a3d5;super(),this[_0x30c409(0x142)]=_0x961285,V(this,_0x30c409(0x1a1),new Map()),this['_initSnapshot']();}[_0x58a3d5(0x158)](_0x49422b,_0x37703a){const _0x1ef6ae=_0x58a3d5;let _0x4a04c2=this['_shapeModelManagerMap'][_0x1ef6ae(0x118)](_0x49422b);_0x4a04c2||(_0x4a04c2=new Map(),this[_0x1ef6ae(0x1a1)][_0x1ef6ae(0x17f)](_0x49422b,_0x4a04c2));let _0x4ab132=_0x4a04c2[_0x1ef6ae(0x118)](_0x37703a);return _0x4ab132||(_0x4ab132=new H(),_0x4a04c2[_0x1ef6ae(0x17f)](_0x37703a,_0x4ab132)),_0x4ab132;}[_0x58a3d5(0x11b)](_0x9af8eb,_0x1c9d5b,_0x572276,_0x4de439,_0x3cf932){const _0x22a2af=_0x58a3d5;this['_ensureShapeModelManager'](_0x9af8eb,_0x1c9d5b)[_0x22a2af(0x170)](_0x572276,_0x4de439,_0x3cf932);}[_0x58a3d5(0x128)](_0x270a7e,_0x1da99f,_0x432df2){const _0x54630c=_0x58a3d5;this[_0x54630c(0x158)](_0x270a7e,_0x1da99f)[_0x54630c(0x128)](_0x432df2);}[_0x58a3d5(0x165)](_0x3c7eb4,_0x5ab07b,_0x31a1bc){const _0x223fb3=_0x58a3d5;return this[_0x223fb3(0x158)](_0x3c7eb4,_0x5ab07b)['getShapeType'](_0x31a1bc);}['getShapeType'](_0x4a9394,_0x35f4ed,_0x38cc43){const _0x171aee=_0x58a3d5;return this[_0x171aee(0x158)](_0x4a9394,_0x35f4ed)['getShapeType'](_0x38cc43);}['hasShape'](_0x1878a7,_0x21089f,_0x3d245a){const _0x1ef3d6=_0x58a3d5;return this['_ensureShapeModelManager'](_0x1878a7,_0x21089f)[_0x1ef3d6(0x157)](_0x3d245a);}[_0x58a3d5(0x1a7)](_0x5f45d8,_0x4f07a5,_0x47ea77){const _0x55acca=_0x58a3d5;return this[_0x55acca(0x158)](_0x5f45d8,_0x4f07a5)[_0x55acca(0x1a3)](_0x47ea77);}[_0x58a3d5(0x148)](_0x4d159f,_0x6d2921,_0x373634){const _0x46f9f3=_0x58a3d5;let _0x528d52=this['_ensureShapeModelManager'](_0x4d159f,_0x6d2921);if(!_0x528d52[_0x46f9f3(0x1a3)](_0x373634))return;let _0x3570fc=_0x528d52['_shapes'][_0x46f9f3(0x118)](_0x373634);if(_0x3570fc)return _0x3570fc[_0x46f9f3(0x13f)]();}[_0x58a3d5(0x134)](_0x493274,_0x234dd0,_0x496eec){const _0x405786=_0x58a3d5;return this['_ensureShapeModelManager'](_0x493274,_0x234dd0)[_0x405786(0x127)][_0x405786(0x118)](_0x496eec);}[_0x58a3d5(0x14b)](_0x55134c,_0x1b7ccf,_0x3ea867){const _0x197e70=_0x58a3d5;return this[_0x197e70(0x158)](_0x55134c,_0x1b7ccf)['getBasicShapeRelation'](_0x3ea867);}[_0x58a3d5(0x124)](_0x121091,_0x2d2733,_0x30ae20){const _0x85d744=_0x58a3d5;let _0x27ebf9=this['_ensureShapeModelManager'](_0x121091,_0x2d2733)[_0x85d744(0x127)]['get'](_0x30ae20);if(_0x27ebf9)return _0x27ebf9[_0x85d744(0x138)]();}[_0x58a3d5(0x113)](){}[_0x58a3d5(0x17b)](_0x440191){const _0x431f67=_0x58a3d5;let _0x24ee40={},_0xe696ca=this[_0x431f67(0x1a1)][_0x431f67(0x118)](_0x440191);return _0xe696ca&&_0xe696ca[_0x431f67(0x197)]((_0x38c56c,_0xaace2e)=>{const _0x35fc12=_0x431f67;let _0x455249=_0x38c56c[_0x35fc12(0x11a)]();_0x455249[_0x35fc12(0x11c)]>0x0&&(_0x24ee40[_0xaace2e]=_0x455249);}),JSON['stringify'](_0x24ee40);}['_deserializeShapeForUnit'](_0x143d8d,_0x4b31dd){const _0x53d142=_0x58a3d5;Object[_0x53d142(0x10e)](_0x4b31dd)['forEach'](_0x387283=>{const _0x478352=_0x53d142;this[_0x478352(0x158)](_0x143d8d,_0x387283)[_0x478352(0x1a4)](_0x4b31dd[_0x387283]);});}[_0x58a3d5(0x11a)](){const _0x225d97=_0x58a3d5;let _0x4f8495={};return this[_0x225d97(0x1a1)][_0x225d97(0x197)]((_0x43ff1e,_0x1c218d)=>{const _0x32c685=_0x225d97;_0x4f8495[_0x1c218d]={},_0x43ff1e[_0x32c685(0x197)]((_0x453256,_0x2e110e)=>{const _0x287c30=_0x32c685;_0x4f8495[_0x1c218d][_0x2e110e]=_0x453256[_0x287c30(0x11a)]();});}),_0x4f8495;}[_0x58a3d5(0x1a4)](_0x1350ae){const _0x450c60=_0x58a3d5;Object[_0x450c60(0x10e)](_0x1350ae)[_0x450c60(0x197)](_0x1f1fc2=>{const _0x4e1158=_0x450c60;let _0x290771=_0x1350ae[_0x1f1fc2];Object['keys'](_0x290771)[_0x4e1158(0x197)](_0x14231b=>{const _0xec017d=_0x4e1158;this[_0xec017d(0x158)](_0x1f1fc2,_0x14231b)[_0xec017d(0x1a4)](_0x290771[_0x14231b]);});});}['_initSnapshot'](){const _0x55433b=_0x58a3d5;this[_0x55433b(0x142)][_0x55433b(0x193)]({'pluginName':_0x55433b(0x162),'businesses':[_0x3a3817['UNIVER_SHEET']],'toJson':_0x4a0def=>this[_0x55433b(0x17b)](_0x4a0def),'parseJson':_0x1b09c8=>JSON[_0x55433b(0x163)](_0x1b09c8),'onLoad':(_0x237f84,_0x3d1b7e)=>{const _0x1bbf76=_0x55433b;this[_0x1bbf76(0x199)](_0x237f84,_0x3d1b7e);},'onUnLoad':_0x1c45a2=>{const _0x5f5b5d=_0x55433b;let _0x302f87=this[_0x5f5b5d(0x1a1)][_0x5f5b5d(0x118)](_0x1c45a2);_0x302f87&&(_0x302f87[_0x5f5b5d(0x197)](_0x44c1a2=>{const _0x153b9e=_0x5f5b5d;_0x44c1a2[_0x153b9e(0x164)]();}),this['_shapeModelManagerMap'][_0x5f5b5d(0x15e)](_0x1c45a2));}});}[_0x58a3d5(0x164)](){const _0xf8fa91=_0x58a3d5;this[_0xf8fa91(0x1a1)][_0xf8fa91(0x197)](_0x2e2f87=>{const _0x5e14d4=_0xf8fa91;_0x2e2f87[_0x5e14d4(0x197)](_0x16b82b=>{const _0xcdca50=_0x5e14d4;_0x16b82b[_0xcdca50(0x164)]();});});}};G=W([U(0x0,_0x58972f)],G);const K={'id':'sheet.mutation.insert-shape','type':_0x2518e2['MUTATION'],'handler':(_0x19d78c,_0x2b7e49)=>{let {unitId:_0x1b464d,subUnitId:_0x421d66,shapeType:_0x35e30a,shapeId:_0x32c470,shapeData:_0x1b75a2}=_0x2b7e49;return _0x19d78c['get'](G)['insertShape'](_0x1b464d,_0x421d66,_0x35e30a,_0x32c470,_0x1b75a2),!0x0;}},q={'id':_0x58a3d5(0x14d),'type':_0x2518e2[_0x58a3d5(0x121)],'handler':(_0x420c51,_0x3879b4)=>{const _0x2fe685=_0x58a3d5;let {unitId:_0x747947,subUnitId:_0x160d2b,shapeId:_0xb69999}=_0x3879b4;return _0x420c51[_0x2fe685(0x118)](G)[_0x2fe685(0x128)](_0x747947,_0x160d2b,_0xb69999),!0x0;}},J={'type':_0x2518e2['COMMAND'],'id':_0x58a3d5(0x144),'handler':(_0x5e6221,_0x44d8d8)=>{const _0x2ec394=_0x58a3d5;var _0x400e38,_0xb22f4a;let _0xa7b70d=_0x282dcd(_0x5e6221['get'](_0x53c869),_0x44d8d8);if(!_0xa7b70d)return!0x1;let _0x375dad=_0x5e6221[_0x2ec394(0x118)](_0x1515ae),{unitId:_0x16aac0,subUnitId:_0x155ed0}=_0xa7b70d,_0x561e37=_0x375dad[_0x2ec394(0x17a)](_0x16aac0,_0x155ed0);if(!_0x561e37)return!0x1;let _0x437f35=_0x5e6221[_0x2ec394(0x118)](_0x24fd18),_0x600420=_0x5e6221[_0x2ec394(0x118)](_0xc84305),_0x2cd723=_0x5e6221['get'](_0x7a4d09),_0x31ee62=_0x5e6221['get'](_0x17ec86),{shapeType:_0x43c9af,shapeData:_0x4bbfd9}=_0x44d8d8,_0x178e35=_0x44d8d8[_0x2ec394(0x149)]||_0x501d12(),_0x1379c9={'unitId':_0x16aac0,'subUnitId':_0x155ed0,'shapeId':_0x178e35,'shapeType':_0x43c9af,'shapeData':_0x4bbfd9},_0x27838f=_0x44d8d8[_0x2ec394(0x14e)]||0xc8,_0x281804=_0x44d8d8['height']||0xc8,_0x185c73=0x0,_0x4bf671=0x0,_0x206221={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x4b5eed={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x44d8d8[_0x2ec394(0x13e)]){let {x:_0x58ec93,y:_0x3e4bbc}=_0x44d8d8[_0x2ec394(0x13e)];_0x185c73=_0x58ec93,_0x4bf671=_0x3e4bbc,_0x206221=_0x561e37['getCellIndexAndOffsetByPosition'](_0x58ec93,_0x3e4bbc),_0x4b5eed=_0x561e37[_0x2ec394(0x14f)](_0x58ec93+_0x27838f,_0x3e4bbc+_0x281804);}else{if(_0x44d8d8[_0x2ec394(0x195)]){let {startRow:_0x1e139d,startColumn:_0x530684}=_0x44d8d8[_0x2ec394(0x195)];_0x206221={'row':_0x1e139d,'rowOffset':0xa,'column':_0x530684,'columnOffset':0xa};let _0x59a8f9=_0x561e37[_0x2ec394(0x181)](_0x1e139d,_0x530684);_0x185c73=_0x59a8f9[_0x2ec394(0x140)]+0xa,_0x4bf671=_0x59a8f9['startY']+0xa,_0x4b5eed=_0x561e37[_0x2ec394(0x14f)](_0x185c73+_0x27838f,_0x4bf671+_0x281804);}}let _0x2e95be={'from':_0x206221,'to':_0x4b5eed},_0x21f4b8={'unitId':_0x16aac0,'subUnitId':_0x155ed0,'drawingId':_0x178e35,'drawingType':_0x29ca4c[_0x2ec394(0x151)],'sheetTransform':_0x2e95be,'transform':{'left':_0x185c73,'top':_0x4bf671,'width':_0x27838f,'height':_0x281804},'data':{'shapeType':_0x43c9af,'shapeData':_0x4bbfd9},'axisAlignSheetTransform':_0x2e95be,'allowTransform':!0x0};_0x48f6a6(_0x43c9af)&&(_0x21f4b8[_0x2ec394(0x132)]['fill']=!0x1,_0x21f4b8['data'][_0x2ec394(0x150)]=!0x1,_0x21f4b8['data'][_0x2ec394(0x191)]=!0x1,_0x21f4b8[_0x2ec394(0x132)][_0x2ec394(0x155)]=!0x1,_0x21f4b8[_0x2ec394(0x11d)][_0x2ec394(0x150)]=!0x1,_0x21f4b8[_0x2ec394(0x11d)]['resizeEnabled']=!0x1,_0x21f4b8[_0x2ec394(0x11d)][_0x2ec394(0x155)]=!0x1);let {undo:_0x256435,redo:_0x4032cc,objects:_0x4419d6}=_0x31ee62[_0x2ec394(0x15d)]([_0x21f4b8]),_0x4da468=_0x2cd723['onCommandExecute']({'id':_0x3694da['id'],'params':{'unitId':_0x16aac0,'drawings':[_0x21f4b8]}}),_0x46a1ee=[...(_0x400e38=_0x4da468[_0x2ec394(0x176)])==null?[]:_0x400e38,{'id':_0x3e02e5['id'],'params':{'unitId':_0x16aac0,'subUnitId':_0x155ed0,'op':_0x4032cc,'objects':_0x4419d6,'type':_0xafe5b9[_0x2ec394(0x190)]}},{'id':_0x10a6b0['id'],'params':[_0x16aac0]},..._0x4da468[_0x2ec394(0x15a)],{'id':K['id'],'params':_0x1379c9}],_0x4906ab=[{'id':q['id'],'params':{'unitId':_0x16aac0,'subUnitId':_0x155ed0,'shapeId':_0x178e35}},...(_0xb22f4a=_0x4da468[_0x2ec394(0x18d)])==null?[]:_0xb22f4a,{'id':_0x3e02e5['id'],'params':{'unitId':_0x16aac0,'subUnitId':_0x155ed0,'op':_0x256435,'objects':_0x4419d6,'type':_0xafe5b9[_0x2ec394(0x146)]}},{'id':_0x10a6b0['id'],'params':[_0x16aac0]},..._0x4da468['undos']];return _0x46e0d2(_0x46a1ee,_0x437f35)?(_0x600420[_0x2ec394(0x173)]({'unitID':_0x16aac0,'undoMutations':_0x4906ab,'redoMutations':_0x46a1ee}),!0x0):!0x1;}},Y={'id':_0x58a3d5(0x13a),'type':_0x2518e2[_0x58a3d5(0x121)],'handler':(_0x281a99,_0x4b3742)=>{const _0x44cb7c=_0x58a3d5;let {unitId:_0x4d06d,subUnitId:_0x1b0d28,shapeType:_0x2d40b2,shapeId:_0x3d19cc,shapeData:_0x1be5bd}=_0x4b3742,_0xaa7416=_0x281a99[_0x44cb7c(0x118)](G)['getShapeModel'](_0x4d06d,_0x1b0d28,_0x3d19cc);return _0xaa7416&&(_0x2d40b2!==void 0x0&&_0xaa7416[_0x44cb7c(0x113)](_0x2d40b2),_0x1be5bd&&(_0xaa7416==null||_0xaa7416['setShapeData'](_0x1be5bd,!0x0))),!0x0;}},ee={'type':_0x2518e2[_0x58a3d5(0x119)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x3e6b0f,_0x39bdee)=>{const _0x48ff1b=_0x58a3d5;var _0x44dcf5,_0x470d3e;let _0x2c35df=_0x282dcd(_0x3e6b0f['get'](_0x53c869),_0x39bdee);if(!_0x2c35df)return!0x1;let _0x1c97f9=_0x3e6b0f[_0x48ff1b(0x118)](_0x1515ae),{unitId:_0x418c92,subUnitId:_0x329748}=_0x2c35df,_0x2e8375=_0x1c97f9[_0x48ff1b(0x17a)](_0x418c92,_0x329748);if(!_0x2e8375)return!0x1;let _0x5d3092=_0x3e6b0f[_0x48ff1b(0x118)](G),{shapeId:_0x1f23a9,shapeType:_0x59ea5a,shapeData:_0x1ab06f,position:_0x3f44ce,width:_0x1dd5e0,height:_0x2f8766}=_0x39bdee,_0x192a93=_0x5d3092[_0x48ff1b(0x134)](_0x418c92,_0x329748,_0x1f23a9);if(!_0x192a93)return!0x1;let _0x5a7c8d=_0x3e6b0f[_0x48ff1b(0x118)](_0x24fd18),_0x1efd10=_0x3e6b0f[_0x48ff1b(0x118)](_0xc84305),_0x62b312=_0x3e6b0f[_0x48ff1b(0x118)](_0x7a4d09),_0x1abf3f=_0x3e6b0f[_0x48ff1b(0x118)](_0x17ec86),_0x33bcf8={'unitId':_0x418c92,'subUnitId':_0x329748,'shapeId':_0x1f23a9,'shapeType':_0x59ea5a,'shapeData':_0x1ab06f},_0x18aaa4=_0x192a93[_0x48ff1b(0x1a3)](),_0x78f988=_0x192a93[_0x48ff1b(0x13f)](),{x:_0x3f1894,y:_0x54d4a9}=_0x3f44ce,_0x4e6cb4={'from':_0x2e8375[_0x48ff1b(0x14f)](_0x3f1894,_0x54d4a9),'to':_0x2e8375['getCellIndexAndOffsetByPosition'](_0x3f1894+_0x1dd5e0,_0x54d4a9+_0x2f8766)},_0x1faf60={'unitId':_0x418c92,'subUnitId':_0x329748,'drawingId':_0x1f23a9,'drawingType':_0x29ca4c[_0x48ff1b(0x151)],'sheetTransform':_0x4e6cb4,'transform':{'left':_0x3f1894,'top':_0x54d4a9,'width':_0x1dd5e0,'height':_0x2f8766},'data':{'shapeType':_0x59ea5a,'shapeData':_0x1ab06f},'axisAlignSheetTransform':_0x4e6cb4,'allowTransform':!0x0};_0x48f6a6(_0x59ea5a)&&(_0x1faf60[_0x48ff1b(0x132)][_0x48ff1b(0x123)]=!0x1,_0x1faf60['data']['rotateEnabled']=!0x1,_0x1faf60[_0x48ff1b(0x132)][_0x48ff1b(0x191)]=!0x1,_0x1faf60[_0x48ff1b(0x132)][_0x48ff1b(0x155)]=!0x1,_0x1faf60[_0x48ff1b(0x11d)][_0x48ff1b(0x150)]=!0x1,_0x1faf60[_0x48ff1b(0x11d)]['resizeEnabled']=!0x1,_0x1faf60['transform']['borderEnabled']=!0x1);let {undo:_0xbf21a5,redo:_0x53fb3d,objects:_0x2360a1}=_0x1abf3f[_0x48ff1b(0x184)]([_0x1faf60]),_0xa21a60=_0x62b312[_0x48ff1b(0x185)]({'id':_0x2d8360['id'],'params':{'unitId':_0x418c92,'drawings':[_0x1faf60]}}),_0x566dcb=[...(_0x44dcf5=_0xa21a60[_0x48ff1b(0x176)])==null?[]:_0x44dcf5,{'id':_0x3e02e5['id'],'params':{'unitId':_0x418c92,'subUnitId':_0x329748,'op':_0x53fb3d,'objects':_0x2360a1,'type':_0xafe5b9[_0x48ff1b(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x418c92]},..._0xa21a60[_0x48ff1b(0x15a)],{'id':Y['id'],'params':_0x33bcf8}],_0x1390cf=[...(_0x470d3e=_0xa21a60[_0x48ff1b(0x18d)])==null?[]:_0x470d3e,{'id':_0x3e02e5['id'],'params':{'unitId':_0x418c92,'subUnitId':_0x329748,'op':_0xbf21a5,'objects':_0x2360a1,'type':_0xafe5b9[_0x48ff1b(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x418c92]},..._0xa21a60[_0x48ff1b(0x192)],{'id':Y['id'],'params':{'unitId':_0x418c92,'subUnitId':_0x329748,'shapeType':_0x18aaa4,'shapeId':_0x1f23a9,'shapeData':_0x78f988}}];return _0x46e0d2(_0x566dcb,_0x5a7c8d)?(_0x1efd10[_0x48ff1b(0x173)]({'unitID':_0x418c92,'undoMutations':_0x1390cf,'redoMutations':_0x566dcb}),!0x0):!0x1;}},te={'type':_0x2518e2[_0x58a3d5(0x119)],'id':'sheet.command.toggle-shape-flip','handler':(_0x51aa23,_0x2c7499)=>{const _0x233b40=_0x58a3d5;var _0x75ea29,_0x5d4a70;let _0x60bf76=_0x282dcd(_0x51aa23['get'](_0x53c869),_0x2c7499);if(!_0x60bf76)return!0x1;let _0x1fd10e=_0x51aa23['get'](_0x1515ae),{unitId:_0x31fa13,subUnitId:_0xb04e41}=_0x60bf76,_0x478042=_0x1fd10e['getSkeleton'](_0x31fa13,_0xb04e41);if(!_0x478042)return!0x1;let _0x1595ea=_0x51aa23[_0x233b40(0x118)](_0x17ec86),{shapeId:_0x4883c,flipH:_0x311a2e,flipV:_0x3b26ff}=_0x2c7499,_0x29abe7=_0x1595ea['getDrawingByParam']({'unitId':_0x31fa13,'subUnitId':_0xb04e41,'drawingId':_0x4883c});if(!_0x29abe7)return!0x1;let _0x289685=_0x51aa23[_0x233b40(0x118)](G)[_0x233b40(0x134)](_0x31fa13,_0xb04e41,_0x4883c);if(!_0x289685)return!0x1;let _0x22a9eb=_0x51aa23[_0x233b40(0x118)](_0x24fd18),_0x3d6a77=_0x51aa23[_0x233b40(0x118)](_0xc84305),_0x16ba43=_0x51aa23[_0x233b40(0x118)](_0x7a4d09),_0x210f56={..._0x29abe7[_0x233b40(0x11d)]};_0x311a2e!==void 0x0&&(_0x210f56['flipX']=!_0x210f56[_0x233b40(0x174)]),_0x3b26ff!==void 0x0&&(_0x210f56[_0x233b40(0x196)]=!_0x210f56[_0x233b40(0x196)]);let _0x1ab517=_0x5d28ad(_0x210f56,_0x478042),_0x2c462b=_0xc67ff1(_0x210f56,_0x478042),_0x407f4e=_0x289685[_0x233b40(0x1a3)](),_0x120e6c=_0x289685['getShapeData'](),_0x526f66={'unitId':_0x31fa13,'subUnitId':_0xb04e41,'drawingId':_0x4883c,'drawingType':_0x29ca4c[_0x233b40(0x151)],'sheetTransform':_0x1ab517,'transform':_0x210f56,'data':{'shapeType':_0x407f4e,'shapeData':_0x120e6c},'axisAlignSheetTransform':_0x2c462b,'allowTransform':!0x0},{undo:_0x56343e,redo:_0x147db6,objects:_0x3bf05f}=_0x1595ea[_0x233b40(0x184)]([_0x526f66]),_0x49aa33=_0x16ba43[_0x233b40(0x185)]({'id':_0x2d8360['id'],'params':{'unitId':_0x31fa13,'drawings':[_0x526f66]}}),_0x232170=[...(_0x75ea29=_0x49aa33[_0x233b40(0x176)])==null?[]:_0x75ea29,{'id':_0x3e02e5['id'],'params':{'unitId':_0x31fa13,'subUnitId':_0xb04e41,'op':_0x147db6,'objects':_0x3bf05f,'type':_0xafe5b9[_0x233b40(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x31fa13]},..._0x49aa33[_0x233b40(0x15a)]],_0x23d1dd=[...(_0x5d4a70=_0x49aa33[_0x233b40(0x18d)])==null?[]:_0x5d4a70,{'id':_0x3e02e5['id'],'params':{'unitId':_0x31fa13,'subUnitId':_0xb04e41,'op':_0x56343e,'objects':_0x3bf05f,'type':_0xafe5b9['UPDATE']}},{'id':_0x10a6b0['id'],'params':[_0x31fa13]},..._0x49aa33[_0x233b40(0x192)]];if(_0x48f6a6(_0x407f4e)){let _0x4c52d6=_0x289685[_0x233b40(0x138)]();if(_0x4c52d6){let _0x2645f7={..._0x4c52d6};_0x2645f7['from']=void 0x0,_0x2645f7['to']=void 0x0,_0x232170[_0x233b40(0x19b)]({'id':Y['id'],'params':{'unitId':_0x31fa13,'subUnitId':_0xb04e41,'shapeId':_0x4883c,'shapeType':_0x407f4e,'shapeData':{'relation':_0x2645f7}}}),_0x23d1dd['push']({'id':Y['id'],'params':{'unitId':_0x31fa13,'subUnitId':_0xb04e41,'shapeId':_0x4883c,'shapeType':_0x407f4e,'shapeData':{'relation':_0x4c52d6}}});}}return _0x46e0d2(_0x232170,_0x22a9eb)?(_0x3d6a77[_0x233b40(0x173)]({'unitID':_0x31fa13,'undoMutations':_0x23d1dd,'redoMutations':_0x232170}),!0x0):!0x1;}},X={'type':_0x2518e2[_0x58a3d5(0x119)],'id':_0x58a3d5(0x167),'handler':(_0x119202,_0x36677f)=>{const _0xc522e5=_0x58a3d5;var _0x468404,_0x8458de;let _0x1d43b7=_0x282dcd(_0x119202['get'](_0x53c869),_0x36677f);if(!_0x1d43b7)return!0x1;let _0x430c76=_0x119202[_0xc522e5(0x118)](_0x1515ae),{unitId:_0x26651f,subUnitId:_0x39229b}=_0x1d43b7,_0x694e78=_0x430c76[_0xc522e5(0x186)](_0x26651f,_0x39229b);if(!_0x694e78)return!0x1;let _0x249b40=_0x119202[_0xc522e5(0x118)](_0x17ec86),{shapeId:_0x520773,rotate:_0x1df3af}=_0x36677f,_0x2f84cc=_0x249b40[_0xc522e5(0x19d)]({'unitId':_0x26651f,'subUnitId':_0x39229b,'drawingId':_0x520773});if(!_0x2f84cc)return!0x1;let _0x3ec19e=_0x119202[_0xc522e5(0x118)](G)[_0xc522e5(0x134)](_0x26651f,_0x39229b,_0x520773);if(!_0x3ec19e)return!0x1;let _0x564489=_0x119202['get'](_0x24fd18),_0x1414a5=_0x119202[_0xc522e5(0x118)](_0xc84305),_0x5e1cc5=_0x119202[_0xc522e5(0x118)](_0x7a4d09),_0x31d0c0={..._0x2f84cc[_0xc522e5(0x11d)]};_0x1df3af!==void 0x0&&(_0x31d0c0[_0xc522e5(0x1a2)]=(_0x31d0c0['angle']||0x0)+_0x1df3af);let _0x314c1d=_0x5d28ad(_0x31d0c0,_0x694e78),_0x568c12=_0xc67ff1(_0x31d0c0,_0x694e78),_0x3ba1c0=_0x3ec19e[_0xc522e5(0x1a3)](),_0x5594a2=_0x3ec19e['getShapeData'](),_0x5e1fb5={'unitId':_0x26651f,'subUnitId':_0x39229b,'drawingId':_0x520773,'drawingType':_0x29ca4c[_0xc522e5(0x151)],'sheetTransform':_0x314c1d,'transform':_0x31d0c0,'data':{'shapeType':_0x3ba1c0,'shapeData':_0x5594a2},'axisAlignSheetTransform':_0x568c12,'allowTransform':!0x0},{undo:_0x1065c3,redo:_0x22a394,objects:_0x37adfd}=_0x249b40['getBatchUpdateOp']([_0x5e1fb5]),_0x5dbd29=_0x5e1cc5[_0xc522e5(0x185)]({'id':_0x2d8360['id'],'params':{'unitId':_0x26651f,'drawings':[_0x5e1fb5]}}),_0x2310e0=[...(_0x468404=_0x5dbd29[_0xc522e5(0x176)])==null?[]:_0x468404,{'id':_0x3e02e5['id'],'params':{'unitId':_0x26651f,'subUnitId':_0x39229b,'op':_0x22a394,'objects':_0x37adfd,'type':_0xafe5b9[_0xc522e5(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x26651f]},..._0x5dbd29[_0xc522e5(0x15a)]],_0x4a3a7d=[...(_0x8458de=_0x5dbd29['preUndos'])==null?[]:_0x8458de,{'id':_0x3e02e5['id'],'params':{'unitId':_0x26651f,'subUnitId':_0x39229b,'op':_0x1065c3,'objects':_0x37adfd,'type':_0xafe5b9[_0xc522e5(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x26651f]},..._0x5dbd29[_0xc522e5(0x192)]];return _0x46e0d2(_0x2310e0,_0x564489)?(_0x1414a5[_0xc522e5(0x173)]({'unitID':_0x26651f,'undoMutations':_0x4a3a7d,'redoMutations':_0x2310e0}),!0x0):!0x1;}},Z={'type':_0x2518e2[_0x58a3d5(0x119)],'id':_0x58a3d5(0x153),'handler':(_0x49c66c,_0x54e104)=>{const _0x29981e=_0x58a3d5;var _0x284545,_0x116890,_0x310128,_0x2a61c7;let _0xff931c=_0x282dcd(_0x49c66c[_0x29981e(0x118)](_0x53c869),_0x54e104);if(!_0xff931c)return!0x1;let _0x1e223f=_0x49c66c['get'](_0x1515ae),{unitId:_0x522cab,subUnitId:_0x3b9d7e}=_0xff931c,_0x5d023e=_0x1e223f[_0x29981e(0x186)](_0x522cab,_0x3b9d7e);if(!_0x5d023e)return!0x1;let _0x3ef353=_0x49c66c[_0x29981e(0x118)](_0x17ec86),{connectorShapeId:_0x4839cd,width:_0x46eafb,height:_0x58a9fa,left:_0x2d15fc,top:_0x53be00,flipX:_0x154ee8,flipY:_0x3617d3,rotation:_0x376faf,oldAdjustValues:_0x170058,newAdjustValues:_0x247940,oldLineType:_0x15d384,newLineType:_0x3c42e6,oldRelation:_0x52731f,newRelation:_0x58586d}=_0x54e104,_0x599046=_0x3ef353[_0x29981e(0x19d)]({'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'drawingId':_0x4839cd});if(!_0x599046)return!0x1;let _0x274cf0=_0x49c66c[_0x29981e(0x118)](G)[_0x29981e(0x134)](_0x522cab,_0x3b9d7e,_0x4839cd);if(!_0x274cf0)return!0x1;let _0x22a54a=_0x49c66c['get'](_0x24fd18),_0x362417=_0x49c66c[_0x29981e(0x118)](_0xc84305),_0x51c38b=_0x49c66c[_0x29981e(0x118)](_0x7a4d09),_0x48d1f3={..._0x599046[_0x29981e(0x11d)],'width':_0x46eafb,'height':_0x58a9fa,'left':_0x2d15fc,'top':_0x53be00,'flipX':_0x154ee8,'flipY':_0x3617d3,'angle':(_0x284545=_0x376faf==null?(_0x116890=_0x599046[_0x29981e(0x11d)])==null?void 0x0:_0x116890['angle']:_0x376faf)==null?0x0:_0x284545},_0x1ec7fb=_0x5d28ad(_0x48d1f3,_0x5d023e),_0x5c6315=_0xc67ff1(_0x48d1f3,_0x5d023e),_0x290d97=_0x274cf0['getShapeType'](),_0x528c80=_0x274cf0[_0x29981e(0x13f)](),_0x2f4b57={'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'drawingId':_0x4839cd,'drawingType':_0x29ca4c['DRAWING_SHAPE'],'sheetTransform':_0x1ec7fb,'transform':_0x48d1f3,'data':{'shapeType':_0x3c42e6||_0x15d384||_0x290d97,'shapeData':{..._0x528c80,'adjustValues':_0x247940||_0x170058||(_0x528c80==null?void 0x0:_0x528c80[_0x29981e(0x17e)]),'relation':_0x58586d||_0x52731f||(_0x528c80==null?void 0x0:_0x528c80['relation'])}},'axisAlignSheetTransform':_0x5c6315,'allowTransform':!0x0},{undo:_0x59bf6c,redo:_0x1739be,objects:_0x152a17}=_0x3ef353[_0x29981e(0x184)]([_0x2f4b57]),_0x903d94=_0x51c38b[_0x29981e(0x185)]({'id':_0x2d8360['id'],'params':{'unitId':_0x522cab,'drawings':[_0x2f4b57]}}),_0xc88e7a=[...(_0x310128=_0x903d94[_0x29981e(0x176)])==null?[]:_0x310128,{'id':_0x3e02e5['id'],'params':{'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'op':_0x1739be,'objects':_0x152a17,'type':_0xafe5b9[_0x29981e(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x522cab]},..._0x903d94[_0x29981e(0x15a)],{'id':Y['id'],'params':{'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'shapeId':_0x4839cd,'shapeType':_0x3c42e6,'shapeData':{'adjustValues':_0x247940,'relation':_0x58586d}}}],_0x32d0cf=[...(_0x2a61c7=_0x903d94['preUndos'])==null?[]:_0x2a61c7,{'id':_0x3e02e5['id'],'params':{'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'op':_0x59bf6c,'objects':_0x152a17,'type':_0xafe5b9[_0x29981e(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x522cab]},..._0x903d94[_0x29981e(0x192)],{'id':Y['id'],'params':{'unitId':_0x522cab,'subUnitId':_0x3b9d7e,'shapeId':_0x4839cd,'shapeType':_0x290d97,'shapeData':{..._0x528c80,'adjustValues':_0x170058||(_0x528c80==null?void 0x0:_0x528c80[_0x29981e(0x17e)]),'relation':_0x52731f||(_0x528c80==null?void 0x0:_0x528c80[_0x29981e(0x10f)])}}}];return _0x46e0d2(_0xc88e7a,_0x22a54a)?(_0x362417[_0x29981e(0x173)]({'unitID':_0x522cab,'undoMutations':_0x32d0cf,'redoMutations':_0xc88e7a}),!0x0):!0x1;}},ne={'type':_0x2518e2[_0x58a3d5(0x119)],'id':_0x58a3d5(0x187),'handler':(_0x18546f,_0x1c9b5c)=>{const _0x33b8c3=_0x58a3d5;var _0x5ba75f,_0x7c5829;let _0x404e88=_0x282dcd(_0x18546f[_0x33b8c3(0x118)](_0x53c869),_0x1c9b5c);if(!_0x404e88)return!0x1;let _0xe43e4b=_0x18546f[_0x33b8c3(0x118)](_0x1515ae),{unitId:_0x477b86,subUnitId:_0x2209f1}=_0x404e88,_0x5886e6=_0xe43e4b['getSkeleton'](_0x477b86,_0x2209f1);if(!_0x5886e6)return!0x1;let _0x3d14ae=_0x18546f['get'](_0x17ec86),{shapeId:_0x587228,width:_0x301f31,height:_0x1f0b98,left:_0x113e14,top:_0xe97a36,flipX:_0x4a3fc1,flipY:_0x1bc0bc,angle:_0x36be41,oldAdjustValues:_0x2d7946,newAdjustValues:_0x32c347,oldLineType:_0x52eedb,newLineType:_0x2c82bf}=_0x1c9b5c,_0xadb785=_0x3d14ae[_0x33b8c3(0x19d)]({'unitId':_0x477b86,'subUnitId':_0x2209f1,'drawingId':_0x587228});if(!_0xadb785)return!0x1;let _0x23f626=_0x18546f['get'](G)[_0x33b8c3(0x134)](_0x477b86,_0x2209f1,_0x587228);if(!_0x23f626)return!0x1;let _0x58ea63=_0x18546f[_0x33b8c3(0x118)](_0x24fd18),_0x2803d8=_0x18546f['get'](_0xc84305),_0x40ba97=_0x18546f[_0x33b8c3(0x118)](_0x7a4d09),_0xf4dfab={..._0xadb785[_0x33b8c3(0x11d)],'width':_0x301f31,'height':_0x1f0b98,'left':_0x113e14,'top':_0xe97a36,'flipX':_0x4a3fc1,'flipY':_0x1bc0bc,'angle':_0x36be41},_0x307fae=_0x5d28ad(_0xf4dfab,_0x5886e6),_0x47115d=_0xc67ff1(_0xf4dfab,_0x5886e6),_0x4b6508=_0x23f626[_0x33b8c3(0x1a3)](),_0x584b94=_0x23f626[_0x33b8c3(0x13f)](),_0x544644={'unitId':_0x477b86,'subUnitId':_0x2209f1,'drawingId':_0x587228,'drawingType':_0x29ca4c[_0x33b8c3(0x151)],'sheetTransform':_0x307fae,'transform':_0xf4dfab,'data':{'shapeType':_0x2c82bf||_0x52eedb||_0x4b6508,'shapeData':{..._0x584b94,'adjustValues':_0x32c347||_0x2d7946||(_0x584b94==null?void 0x0:_0x584b94[_0x33b8c3(0x17e)])}},'axisAlignSheetTransform':_0x47115d,'allowTransform':!0x0},{undo:_0x5c3d8b,redo:_0x23495e,objects:_0x4c15ec}=_0x3d14ae[_0x33b8c3(0x184)]([_0x544644]),_0x410c5f=_0x40ba97[_0x33b8c3(0x185)]({'id':_0x2d8360['id'],'params':{'unitId':_0x477b86,'drawings':[_0x544644]}}),_0x194187=[...(_0x5ba75f=_0x410c5f[_0x33b8c3(0x176)])==null?[]:_0x5ba75f,{'id':_0x3e02e5['id'],'params':{'unitId':_0x477b86,'subUnitId':_0x2209f1,'op':_0x23495e,'objects':_0x4c15ec,'type':_0xafe5b9['UPDATE']}},{'id':_0x10a6b0['id'],'params':[_0x477b86]},..._0x410c5f[_0x33b8c3(0x15a)],{'id':Y['id'],'params':{'unitId':_0x477b86,'subUnitId':_0x2209f1,'shapeId':_0x587228,'shapeType':_0x2c82bf,'shapeData':{'adjustValues':_0x32c347}}}],_0x4d8fd9=[...(_0x7c5829=_0x410c5f[_0x33b8c3(0x18d)])==null?[]:_0x7c5829,{'id':_0x3e02e5['id'],'params':{'unitId':_0x477b86,'subUnitId':_0x2209f1,'op':_0x5c3d8b,'objects':_0x4c15ec,'type':_0xafe5b9[_0x33b8c3(0x11f)]}},{'id':_0x10a6b0['id'],'params':[_0x477b86]},..._0x410c5f['undos'],{'id':Y['id'],'params':{'unitId':_0x477b86,'subUnitId':_0x2209f1,'shapeId':_0x587228,'shapeType':_0x4b6508,'shapeData':{..._0x584b94,'adjustValues':_0x2d7946||(_0x584b94==null?void 0x0:_0x584b94['adjustValues'])}}}];return _0x46e0d2(_0x194187,_0x58ea63)?(_0x2803d8['pushUndoRedo']({'unitID':_0x477b86,'undoMutations':_0x4d8fd9,'redoMutations':_0x194187}),!0x0):!0x1;}},Q={'id':_0x58a3d5(0x161),'type':_0x2518e2[_0x58a3d5(0x121)],'handler':(_0x3eab56,_0x263575)=>{const _0x4a487f=_0x58a3d5;let {unitId:_0x539cf2,subUnitId:_0x6a7e65,shapeType:_0x18e9c8,shapeId:_0x3afbcb,shapeData:_0x237828}=_0x263575,_0x5e6f77=_0x3eab56[_0x4a487f(0x118)](G)[_0x4a487f(0x134)](_0x539cf2,_0x6a7e65,_0x3afbcb);return _0x5e6f77&&(_0x5e6f77['setShapeType'](_0x18e9c8),_0x237828&&(_0x5e6f77==null||_0x5e6f77[_0x4a487f(0x188)](_0x237828))),!0x0;}},re={'id':_0x58a3d5(0x166),'type':_0x2518e2[_0x58a3d5(0x119)],'handler':(_0xfcb1ee,_0x359de5)=>{const _0x29938a=_0x58a3d5;if(!_0x359de5)return!0x1;let _0x259422=_0xfcb1ee[_0x29938a(0x118)](_0x24fd18),_0x49fea7=_0xfcb1ee[_0x29938a(0x118)](G),_0x1cebcc=_0xfcb1ee[_0x29938a(0x118)](_0xc84305),_0x57bfcb=[],_0x38fa9b=[],{unitId:_0x37b10c,subUnitId:_0x5901cf,shapeId:_0x47a178,shapeType:_0x843178,shapeData:_0x5ac971}=_0x359de5,_0x5d0654=_0x49fea7[_0x29938a(0x134)](_0x37b10c,_0x5901cf,_0x47a178);if(_0x5d0654){let _0x1a4de1=_0x5d0654['getShapeType'](),_0x15ceae=Object[_0x29938a(0x168)]({},_0x5d0654[_0x29938a(0x13f)]()),_0x31cb12={'unitId':_0x37b10c,'subUnitId':_0x5901cf,'shapeId':_0x47a178,'shapeType':_0x843178,'shapeData':_0x5ac971},_0x253d9b={'unitId':_0x37b10c,'subUnitId':_0x5901cf,'shapeId':_0x47a178,'shapeType':_0x1a4de1,'shapeData':_0x15ceae};return _0x57bfcb[_0x29938a(0x19b)]({'id':Q['id'],'params':_0x31cb12}),_0x38fa9b['push']({'id':Q['id'],'params':_0x253d9b}),_0x57bfcb['every'](_0x4c8be5=>_0x259422[_0x29938a(0x19f)](_0x4c8be5['id'],_0x4c8be5[_0x29938a(0x154)]))&&_0x1cebcc[_0x29938a(0x173)]({'unitID':_0x37b10c,'redoMutations':[..._0x57bfcb],'undoMutations':[..._0x38fa9b]}),!0x0;}return!0x1;}};var ie=_0x58a3d5(0x135),ae=_0x58a3d5(0x111);const oe='sheets-shape.config';Symbol(oe);const se={};let ce=class extends _0x3e2f6c{constructor(_0x67317f,_0x1f433c,_0x13c9fc,_0x38b90f,_0x1bb1e7){const _0x2246b9=_0x58a3d5;super(),this[_0x2246b9(0x130)]=_0x67317f,this[_0x2246b9(0x126)]=_0x1f433c,this[_0x2246b9(0x12d)]=_0x13c9fc,this['_sheetsShapeService']=_0x38b90f,this[_0x2246b9(0x12a)]=_0x1bb1e7,this[_0x2246b9(0x169)](),this[_0x2246b9(0x10d)]();}[_0x58a3d5(0x169)](){const _0x3fea22=_0x58a3d5;[J,ee,te,X,Z,ne,K,q,Q,Y][_0x3fea22(0x197)](_0x188dd1=>this[_0x3fea22(0x152)](this[_0x3fea22(0x130)][_0x3fea22(0x16d)](_0x188dd1)));}[_0x58a3d5(0x10d)](){const _0x1d7543=_0x58a3d5;this[_0x1d7543(0x152)](this[_0x1d7543(0x126)][_0x1d7543(0x133)]({'getMutations':_0x931ad=>{const _0x3844a8=_0x1d7543;if(_0x931ad['id']===_0x209cc8['id']){let {drawings:_0x281f42}=_0x931ad[_0x3844a8(0x154)],_0x8615a9=_0x281f42[_0x3844a8(0x137)](_0x191dfc=>_0x191dfc[_0x3844a8(0x198)]===_0x29ca4c[_0x3844a8(0x151)]);if(_0x8615a9[_0x3844a8(0x11c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x340f3a=[],_0x386560=[];return _0x8615a9['forEach'](_0x1661cf=>{const _0x4340f7=_0x3844a8;let {unitId:_0x4915fa,subUnitId:_0x507e02,drawingId:_0x2c4dba}=_0x1661cf,_0x48e1ab=this[_0x4340f7(0x115)]['getShapeModel'](_0x4915fa,_0x507e02,_0x2c4dba);if(!_0x48e1ab)throw TypeError(_0x4340f7(0x18c)+_0x48e1ab);_0x340f3a['push']({'id':q['id'],'params':{'unitId':_0x4915fa,'subUnitId':_0x507e02,'shapeId':_0x2c4dba}}),_0x386560[_0x4340f7(0x19b)]({'id':K['id'],'params':{'unitId':_0x4915fa,'subUnitId':_0x507e02,'shapeId':_0x2c4dba,'shapeType':_0x48e1ab['getShapeType'](),'shapeData':_0x48e1ab['getShapeData']()}});let _0x41515d=this[_0x4340f7(0x115)][_0x4340f7(0x14b)](_0x4915fa,_0x507e02,_0x2c4dba);if(_0x41515d)for(let _0x2af016 of _0x41515d){let _0x5e4b5d=_0x2af016[_0x4340f7(0x117)],_0x123cde=_0x2af016[_0x4340f7(0x112)],_0x554151=_0x123cde?{'from':void 0x0}:{'to':void 0x0},_0x127404=_0x123cde?{'from':{'shapeId':_0x2af016['shapeId'],'cxnIndex':_0x2af016[_0x4340f7(0x17c)]}}:{'to':{'shapeId':_0x2af016[_0x4340f7(0x149)],'cxnIndex':_0x2af016[_0x4340f7(0x17c)]}};_0x340f3a['push']({'id':Y['id'],'params':{'unitId':_0x4915fa,'subUnitId':_0x507e02,'shapeId':_0x5e4b5d,'shapeData':{'relation':_0x554151}}}),_0x386560['push']({'id':Y['id'],'params':{'unitId':_0x4915fa,'subUnitId':_0x507e02,'shapeId':_0x5e4b5d,'shapeData':{'relation':_0x127404}}});}}),{'preRedos':_0x340f3a,'redos':[],'preUndos':[],'undos':_0x386560};}if(_0x931ad['id']===_0x2d8360['id']){let {drawings:_0x4d092a}=_0x931ad['params'],_0x1eab57=_0x4d092a[_0x3844a8(0x137)](_0x412544=>_0x412544['drawingType']===_0x29ca4c['DRAWING_SHAPE']);if(_0x1eab57[_0x3844a8(0x11c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x1ff8ed=[],_0x42b86e=[];for(let _0x209b60 of _0x1eab57){let {unitId:_0x2a3f22,subUnitId:_0x46c857,drawingId:_0xb3f2f8,transform:_0x368627}=_0x209b60;if(!_0x2a3f22||!_0x46c857||!_0xb3f2f8||!_0x368627)continue;let _0xbff2b1=this[_0x3844a8(0x115)][_0x3844a8(0x134)](_0x2a3f22,_0x46c857,_0xb3f2f8);if(!_0xbff2b1)throw TypeError(_0x3844a8(0x18c)+_0xbff2b1);if(_0x48f6a6(_0xbff2b1[_0x3844a8(0x1a3)]())){let _0x494a4c=this['_sheetsShapeService'][_0x3844a8(0x124)](_0x2a3f22,_0x46c857,_0xb3f2f8);_0x494a4c&&(_0x1ff8ed[_0x3844a8(0x19b)]({'id':Y['id'],'params':{'unitId':_0x2a3f22,'subUnitId':_0x46c857,'shapeId':_0xb3f2f8,'shapeData':{'relation':{'from':void 0x0,'to':void 0x0}}}}),_0x42b86e[_0x3844a8(0x19b)]({'id':Y['id'],'params':{'unitId':_0x2a3f22,'subUnitId':_0x46c857,'shapeId':_0xb3f2f8,'shapeData':{'relation':_0x494a4c}}}));}else{let _0x2ba994=this[_0x3844a8(0x115)][_0x3844a8(0x14b)](_0x2a3f22,_0x46c857,_0xb3f2f8);if(_0x2ba994&&_0x2ba994[_0x3844a8(0x11c)]>0x0)for(let _0x24f611 of _0x2ba994){let _0x11234d=_0x24f611[_0x3844a8(0x117)],_0x5f4401=_0x24f611['isFrom'],_0x2c0ce0=this[_0x3844a8(0x115)]['getShapeModel'](_0x2a3f22,_0x46c857,_0x11234d);if(!_0x2c0ce0)continue;let _0x58ab7c=_0x2c0ce0['getStartConnectInfo'](),_0x1713e3=_0x2c0ce0[_0x3844a8(0x1a5)]();_0x58ab7c&&_0x1713e3?this[_0x3844a8(0x19e)](_0x2a3f22,_0x46c857,_0x11234d,_0x2c0ce0,_0x58ab7c,_0x1713e3,_0x1ff8ed,_0x42b86e,_0xb3f2f8,_0x368627):this[_0x3844a8(0x131)](_0x2a3f22,_0x46c857,_0x11234d,_0x2c0ce0,_0x5f4401?_0x58ab7c:_0x1713e3,_0x5f4401,_0x1ff8ed,_0x42b86e,_0xb3f2f8,_0x368627);}}}return{'preRedos':[],'redos':_0x1ff8ed,'preUndos':_0x42b86e,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x18ee14,_0x536a93,_0x209c9f,_0x123b21,_0x392fb8){const _0x3ed24d=_0x58a3d5;if(!_0x536a93||!_0x209c9f)return null;let {shapeId:_0x1aa46a,cxnIndex:_0x1700a9}=_0x18ee14,_0x1e1f71=this[_0x3ed24d(0x115)][_0x3ed24d(0x134)](_0x536a93,_0x209c9f,_0x1aa46a);if(!_0x1e1f71)return null;let _0x361d6c=this[_0x3ed24d(0x12a)][_0x3ed24d(0x19d)]({'unitId':_0x536a93,'subUnitId':_0x209c9f,'drawingId':_0x1aa46a});if(!(_0x361d6c!=null&&_0x361d6c['transform']))return null;let {left:_0x156cbf=0x0,top:_0x2ce0fa=0x0,width:_0x1ccd40=0x0,height:_0x33608d=0x0,flipX:_0x4b3767=!0x1,flipY:_0x87f49b=!0x1,angle:_0x528115}=_0x361d6c['transform'];if(_0x392fb8&&_0x123b21===_0x1aa46a){var _0x2312f7,_0x4c40de,_0x3e113e,_0x17fb56,_0x4c85e9,_0x2635a0,_0x3326df;_0x156cbf=(_0x2312f7=_0x392fb8[_0x3ed24d(0x171)])==null?_0x156cbf:_0x2312f7,_0x2ce0fa=(_0x4c40de=_0x392fb8[_0x3ed24d(0x18f)])==null?_0x2ce0fa:_0x4c40de,_0x1ccd40=(_0x3e113e=_0x392fb8[_0x3ed24d(0x14e)])==null?_0x1ccd40:_0x3e113e,_0x33608d=(_0x17fb56=_0x392fb8[_0x3ed24d(0x189)])==null?_0x33608d:_0x17fb56,_0x4b3767=(_0x4c85e9=_0x392fb8[_0x3ed24d(0x174)])==null?_0x4b3767:_0x4c85e9,_0x87f49b=(_0x2635a0=_0x392fb8[_0x3ed24d(0x196)])==null?_0x87f49b:_0x2635a0,_0x528115=(_0x3326df=_0x392fb8[_0x3ed24d(0x1a2)])==null?_0x528115:_0x3326df;}_0x1e1f71[_0x3ed24d(0x18a)]({'width':_0x1ccd40,'height':_0x33608d});let _0x34eed7=_0x1e1f71['getConnectionSiteList']()[_0x3ed24d(0x17d)](_0x5e5bd9=>_0x5e5bd9['index']===_0x1700a9);if(!_0x34eed7)return null;let _0x2f7dc2=_0x4b3767?_0x1ccd40-_0x34eed7['x']:_0x34eed7['x'],_0x4f915a=_0x87f49b?_0x33608d-_0x34eed7['y']:_0x34eed7['y'];if(_0x528115!==0x0&&_0x528115!=null){let _0x2eebad=_0x528115*Math['PI']/0xb4,_0x199116=Math[_0x3ed24d(0x18b)](_0x2eebad),_0x100c9c=Math[_0x3ed24d(0x177)](_0x2eebad),_0xfafac2=_0x1ccd40/0x2,_0x1bf3bf=_0x33608d/0x2,_0x954c36=_0x2f7dc2-_0xfafac2,_0x213c8e=_0x4f915a-_0x1bf3bf;_0x2f7dc2=_0xfafac2+_0x954c36*_0x199116-_0x213c8e*_0x100c9c,_0x4f915a=_0x1bf3bf+_0x954c36*_0x100c9c+_0x213c8e*_0x199116;}_0x2f7dc2+=_0x156cbf,_0x4f915a+=_0x2ce0fa;let _0x5a30f5=_0x34eed7[_0x3ed24d(0x182)]/0xea60;_0x4b3767&&(_0x5a30f5=0xb4-_0x5a30f5),_0x87f49b&&(_0x5a30f5=-_0x5a30f5),_0x5a30f5+=_0x528115||0x0,_0x5a30f5=(_0x5a30f5%0x168+0x168)%0x168;let _0xaf12fa=_0x3b1527({'left':_0x156cbf,'top':_0x2ce0fa,'width':_0x1ccd40,'height':_0x33608d},_0x528115||0x0);return{'point':{'x':_0x2f7dc2,'y':_0x4f915a},'angle':_0x5a30f5,'bounds':_0xaf12fa};}['_addLineRerouteUpdates'](_0x1ddc14,_0x5958ce,_0x157c18,_0x2dd649,_0xfa3fc,_0x2af084,_0xb829be,_0x4dbfe5,_0x1f0774,_0x557218){const _0x487a6c=_0x58a3d5;let _0x306e50=this[_0x487a6c(0x12d)][_0x487a6c(0x186)](_0x1ddc14,_0x5958ce);if(!_0x306e50)return;let _0x1a7216=_0x2dd649[_0x487a6c(0x138)](),_0x463a8d=_0x2dd649[_0x487a6c(0x14a)](),_0x2fac22={},_0x533656={};_0x463a8d[_0x487a6c(0x197)](_0x43dade=>{const _0x10e177=_0x487a6c;let _0x5065b7=_0x2dd649[_0x10e177(0x14c)](_0x43dade);_0x533656[_0x43dade]=_0x5065b7==null?0x0:_0x5065b7;});let _0x3420ef=this['_getConnectPointInfo'](_0xfa3fc,_0x1ddc14,_0x5958ce,_0x1f0774,_0x557218),_0x19b4cb=this[_0x487a6c(0x122)](_0x2af084,_0x1ddc14,_0x5958ce,_0x1f0774,_0x557218);if(_0x3420ef&&_0x19b4cb){let _0x140f6a=_0x2dd649['getShapeType'](),_0x46c7c7=_0x4bd7db(_0x3420ef,_0x19b4cb,_0x140f6a),_0x2b273a=_0x140f6a;if(_0x46c7c7){let _0x283dc6=_0x1b7fa5(_0x46c7c7,_0x2dd649[_0x487a6c(0x1a3)]()),_0x259eff=this['_drawingManagerService'][_0x487a6c(0x139)](_0x1ddc14,_0x5958ce);if(_0x259eff&&_0x259eff[_0x157c18]){let _0x240867=_0x259eff[_0x157c18];_0x2b273a=_0x283dc6[_0x487a6c(0x110)];for(let [_0x4f17ca,_0x21b64d]of Object[_0x487a6c(0x145)](_0x283dc6['adjustValues']))_0x2fac22[_0x4f17ca]=_0x21b64d;let _0x4c0996={..._0x240867[_0x487a6c(0x11d)],'width':_0x283dc6[_0x487a6c(0x16c)][_0x487a6c(0x14e)],'height':_0x283dc6['worldRect'][_0x487a6c(0x189)],'left':_0x283dc6[_0x487a6c(0x16c)][_0x487a6c(0x171)],'top':_0x283dc6[_0x487a6c(0x16c)][_0x487a6c(0x18f)],'flipX':_0x283dc6['worldRect']['flipX'],'flipY':_0x283dc6[_0x487a6c(0x16c)]['flipY'],'angle':_0x283dc6[_0x487a6c(0x147)]},_0x3e71ee=_0x5d28ad(_0x4c0996,_0x306e50),_0x22d04c=_0xc67ff1(_0x4c0996,_0x306e50),_0x247c51={'unitId':_0x1ddc14,'subUnitId':_0x5958ce,'drawingType':_0x29ca4c[_0x487a6c(0x151)],'drawingId':_0x157c18,'transform':_0x4c0996,'sheetTransform':_0x3e71ee,'axisAlignSheetTransform':_0x22d04c},{unitId:_0x4a0b61,subUnitId:_0x194fec,undo:_0x2796e1,redo:_0xb8de88,objects:_0x1e4055}=this[_0x487a6c(0x12a)][_0x487a6c(0x184)]([_0x247c51]);_0xb829be[_0x487a6c(0x19b)]({'id':_0x3e02e5['id'],'params':{'unitId':_0x4a0b61,'subUnitId':_0x194fec,'op':_0xb8de88,'objects':_0x1e4055,'type':_0xafe5b9['UPDATE']}}),_0x4dbfe5['push']({'id':_0x3e02e5['id'],'params':{'unitId':_0x4a0b61,'subUnitId':_0x194fec,'op':_0x2796e1,'objects':_0x1e4055,'type':_0xafe5b9['UPDATE']}});}_0x2dd649['removeLinePoints']();}_0xb829be['push']({'id':Y['id'],'params':{'unitId':_0x1ddc14,'subUnitId':_0x5958ce,'shapeId':_0x157c18,'shapeType':_0x2b273a,'shapeData':{'adjustValues':_0x2fac22,'relation':_0x1a7216}}}),_0x4dbfe5[_0x487a6c(0x19b)]({'id':Y['id'],'params':{'unitId':_0x1ddc14,'subUnitId':_0x5958ce,'shapeId':_0x157c18,'shapeType':_0x140f6a,'shapeData':{'adjustValues':_0x533656,'relation':_0x1a7216}}});}}[_0x58a3d5(0x131)](_0x2029a7,_0x154d82,_0x759adc,_0x381e5e,_0x1a9a9c,_0xf9d317,_0x12d952,_0xc53907,_0x5cb0f3,_0x507254){const _0x502e8a=_0x58a3d5;var _0x552f26;if(!_0x1a9a9c)return;let _0x35d2e0=this['_sheetSkeletonService']['getSkeleton'](_0x2029a7,_0x154d82);if(!_0x35d2e0)return;let _0x40a818=(_0x552f26=this[_0x502e8a(0x12a)][_0x502e8a(0x19d)]({'unitId':_0x2029a7,'subUnitId':_0x154d82,'drawingId':_0x5cb0f3}))==null?void 0x0:_0x552f26['transform'];if(!_0x40a818)return;let _0x2de8d8=_0x40a818[_0x502e8a(0x171)]!==_0x507254[_0x502e8a(0x171)]||_0x40a818[_0x502e8a(0x18f)]!==_0x507254[_0x502e8a(0x18f)],_0x471b79=_0x40a818[_0x502e8a(0x14e)]!==_0x507254['width']||_0x40a818[_0x502e8a(0x189)]!==_0x507254['height'],_0x3fd39d=_0x40a818[_0x502e8a(0x174)]!==_0x507254[_0x502e8a(0x174)]||_0x40a818['flipY']!==_0x507254[_0x502e8a(0x196)],_0x19130e=_0x40a818[_0x502e8a(0x1a2)]!==_0x507254[_0x502e8a(0x1a2)];if(_0x2de8d8&&!_0x471b79&&!_0x3fd39d&&!_0x19130e){var _0x266a47,_0x5eb58d,_0x327c3d,_0x52ffa6;let _0x5af631=((_0x266a47=_0x507254[_0x502e8a(0x171)])==null?0x0:_0x266a47)-((_0x5eb58d=_0x40a818['left'])==null?0x0:_0x5eb58d),_0xd77616=((_0x327c3d=_0x507254[_0x502e8a(0x18f)])==null?0x0:_0x327c3d)-((_0x52ffa6=_0x40a818[_0x502e8a(0x18f)])==null?0x0:_0x52ffa6),_0x3d52a2=this[_0x502e8a(0x12a)][_0x502e8a(0x139)](_0x2029a7,_0x154d82);if(_0x3d52a2&&_0x3d52a2[_0x759adc]){var _0x26e833,_0x1b4430,_0x4af14a,_0x451b40;let _0x13779c=_0x3d52a2[_0x759adc],_0x9d9ab2={..._0x13779c[_0x502e8a(0x11d)],'left':((_0x26e833=(_0x1b4430=_0x13779c['transform'])==null?void 0x0:_0x1b4430['left'])==null?0x0:_0x26e833)+_0x5af631,'top':((_0x4af14a=(_0x451b40=_0x13779c[_0x502e8a(0x11d)])==null?void 0x0:_0x451b40[_0x502e8a(0x18f)])==null?0x0:_0x4af14a)+_0xd77616},_0x2df642=_0x5d28ad(_0x9d9ab2,_0x35d2e0),_0x5c786e=_0xc67ff1(_0x9d9ab2,_0x35d2e0),_0x2001e7={'unitId':_0x2029a7,'subUnitId':_0x154d82,'drawingType':_0x29ca4c[_0x502e8a(0x151)],'drawingId':_0x759adc,'transform':_0x9d9ab2,'sheetTransform':_0x2df642,'axisAlignSheetTransform':_0x5c786e},{unitId:_0x1d8ba0,subUnitId:_0x562c15,undo:_0x4b2019,redo:_0x2309e8,objects:_0x3798c1}=this[_0x502e8a(0x12a)]['getBatchUpdateOp']([_0x2001e7]);_0x12d952[_0x502e8a(0x19b)]({'id':_0x3e02e5['id'],'params':{'unitId':_0x1d8ba0,'subUnitId':_0x562c15,'op':_0x2309e8,'objects':_0x3798c1,'type':_0xafe5b9['UPDATE']}}),_0xc53907[_0x502e8a(0x19b)]({'id':_0x3e02e5['id'],'params':{'unitId':_0x1d8ba0,'subUnitId':_0x562c15,'op':_0x4b2019,'objects':_0x3798c1,'type':_0xafe5b9[_0x502e8a(0x11f)]}});}}else{let _0x130717=_0x381e5e['getStartConnectInfo'](),_0x3b6497=_0x381e5e[_0x502e8a(0x1a5)]();this['_addLineRerouteUpdates'](_0x2029a7,_0x154d82,_0x759adc,_0x381e5e,_0x130717,_0x3b6497,_0x12d952,_0xc53907,_0x5cb0f3,_0x507254);}}};ce=W([U(0x0,_0x24fd18),U(0x1,_0x5d21b3(_0x7a4d09)),U(0x2,_0x5d21b3(_0x1515ae)),U(0x3,_0x5d21b3(G)),U(0x4,_0x5d21b3(_0x579441))],ce);let $=class extends _0x5bc10b{constructor(_0x3f9157=se,_0x3d477c,_0xd8a824,_0x30363b){const _0x29580f=_0x58a3d5;super(),this[_0x29580f(0x18e)]=_0x3f9157,this['_injector']=_0x3d477c,this[_0x29580f(0x130)]=_0xd8a824,this[_0x29580f(0x1a0)]=_0x30363b;let {..._0x96ba95}=_0x1f668c({},se,this[_0x29580f(0x18e)]);this['_configService'][_0x29580f(0x183)](oe,_0x96ba95);}[_0x58a3d5(0x175)](){const _0x20ec3a=_0x58a3d5;let _0x490d10=this[_0x20ec3a(0x15b)];[[H],[G],[ce]][_0x20ec3a(0x197)](_0x487585=>_0x490d10[_0x20ec3a(0x159)](_0x487585)),_0x253d80(_0x490d10,[[G],[ce]]);}};V($,_0x58a3d5(0x13b),_0x3a3817[_0x58a3d5(0x143)]),V($,'pluginName',_0x58a3d5(0x162)),V($,_0x58a3d5(0x116),ie),V($,_0x58a3d5(0x16b),ae),$=W([_0x1b6787(_0x525d5e),U(0x1,_0x5d21b3(_0x2345ca)),U(0x2,_0x24fd18),U(0x3,_0x5a07f8)],$);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,G as SheetsShapeService,te as ToggleSheetsShapeFlipCommand,$ as UniverSheetsShapePlugin,Z as UpdateConnectorRelationCommand,ne as UpdateLineShapeResizeCommand,Y as UpdateSheetsShapeDataMutation,re as UpdateSheetsShapeTypeCommand,Q as UpdateSheetsShapeTypeMutation};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
4
|
+
export interface IInsertSheetsShapeCommandParams extends ISheetCommandSharedParams {
|
|
5
|
+
shapeType: ShapeTypeEnum;
|
|
6
|
+
range?: IRange;
|
|
7
|
+
position?: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
shapeId?: string;
|
|
12
|
+
shapeData?: IShapeData;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const InsertShapeCommand: ICommand;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ICommand } from '@univerjs/core';
|
|
3
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
4
|
+
export interface ISetShapeDrawingDataCommandParams extends ISheetCommandSharedParams {
|
|
5
|
+
shapeId: string;
|
|
6
|
+
shapeType: ShapeTypeEnum;
|
|
7
|
+
shapeData?: IShapeData;
|
|
8
|
+
position: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const SetShapeDrawingDataCommand: ICommand;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ICommand } from '@univerjs/core';
|
|
2
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
3
|
+
export interface IUpdateSheetsShapeFlipCommandParams extends ISheetCommandSharedParams {
|
|
4
|
+
shapeId: string;
|
|
5
|
+
/**
|
|
6
|
+
* is toggle horizontal flip
|
|
7
|
+
*/
|
|
8
|
+
flipH?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* is toggle vertical flip
|
|
11
|
+
*/
|
|
12
|
+
flipV?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const ToggleSheetsShapeFlipCommand: ICommand;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICommand } from '@univerjs/core';
|
|
2
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
3
|
+
export interface IUpdateSheetsShapeRotateCommandParams extends ISheetCommandSharedParams {
|
|
4
|
+
shapeId: string;
|
|
5
|
+
/**
|
|
6
|
+
* is toggle horizontal flip
|
|
7
|
+
*/
|
|
8
|
+
rotate: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const SetSheetsShapeRotateCommand: ICommand;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { ILineType, IShapeRelation } from '@univerjs-pro/engine-shape';
|
|
17
|
+
import type { ICommand } from '@univerjs/core';
|
|
18
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
19
|
+
export interface IUpdateConnectorRelationCommandParams extends ISheetCommandSharedParams {
|
|
20
|
+
/** The connector shape ID */
|
|
21
|
+
connectorShapeId: string;
|
|
22
|
+
/** New width of the connector */
|
|
23
|
+
width: number;
|
|
24
|
+
/** New height of the connector */
|
|
25
|
+
height: number;
|
|
26
|
+
/** New left position of the connector */
|
|
27
|
+
left: number;
|
|
28
|
+
/** New top position of the connector */
|
|
29
|
+
top: number;
|
|
30
|
+
/** Flip X state */
|
|
31
|
+
flipX: boolean;
|
|
32
|
+
/** Flip Y state */
|
|
33
|
+
flipY: boolean;
|
|
34
|
+
/** Old adjust values for undo */
|
|
35
|
+
oldAdjustValues: Record<string, number>;
|
|
36
|
+
/** New adjust values to set (if provided, uses these instead of clearing) */
|
|
37
|
+
newAdjustValues?: Record<string, number>;
|
|
38
|
+
/** New line type to set (if connector type changed during routing) */
|
|
39
|
+
newLineType?: ILineType;
|
|
40
|
+
oldLineType?: ILineType;
|
|
41
|
+
/** Rotation in degrees (0, 90, 180, 270) for flip + rotation scenarios */
|
|
42
|
+
rotation?: number;
|
|
43
|
+
/** Old relation for undo */
|
|
44
|
+
oldRelation?: IShapeRelation;
|
|
45
|
+
/** New relation to set */
|
|
46
|
+
newRelation?: IShapeRelation;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Command to update a connector's relation (connection to shapes).
|
|
50
|
+
*
|
|
51
|
+
* This command:
|
|
52
|
+
* 1. Updates the connector's transform (position, size, flip)
|
|
53
|
+
* 2. Clears the adjust values (for automatic routing)
|
|
54
|
+
* 3. Updates the relation property to connect to target shapes
|
|
55
|
+
*/
|
|
56
|
+
export declare const UpdateConnectorRelationCommand: ICommand;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ILineType } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ICommand } from '@univerjs/core';
|
|
3
|
+
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
4
|
+
export interface IUpdateSheetsShapeResizeCommandParams extends ISheetCommandSharedParams {
|
|
5
|
+
shapeId: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
flipX: boolean;
|
|
11
|
+
flipY: boolean;
|
|
12
|
+
angle: number;
|
|
13
|
+
newAdjustValues: Record<string, number>;
|
|
14
|
+
oldAdjustValues: Record<string, number>;
|
|
15
|
+
newLineType: ILineType;
|
|
16
|
+
oldLineType: ILineType;
|
|
17
|
+
}
|
|
18
|
+
export declare const UpdateLineShapeResizeCommand: ICommand;
|
|
@@ -3,7 +3,7 @@ import type { IMutation } from '@univerjs/core';
|
|
|
3
3
|
import type { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
4
4
|
export interface IUpdateSheetsShapeDataMutationParams extends ISheetCommandSharedParams {
|
|
5
5
|
shapeId: string;
|
|
6
|
-
shapeType
|
|
6
|
+
shapeType?: ShapeTypeEnum;
|
|
7
7
|
shapeData?: IShapeData;
|
|
8
8
|
}
|
|
9
9
|
export declare const UpdateSheetsShapeDataMutation: IMutation<IUpdateSheetsShapeDataMutationParams>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDrawingParam, ISrcRect, Nullable, PresetGeometryType } from '@univerjs/core';
|
|
3
|
+
import type { ISheetShape } from '@univerjs/sheets-drawing';
|
|
4
|
+
export type ISheetShapeDrawingParam = ISheetShape & {
|
|
5
|
+
data: {
|
|
6
|
+
shapeType: ShapeTypeEnum;
|
|
7
|
+
shapeData?: IShapeData;
|
|
8
|
+
disablePopup?: boolean;
|
|
9
|
+
fill?: boolean;
|
|
10
|
+
rotateEnabled?: boolean;
|
|
11
|
+
resizeEnabled?: boolean;
|
|
12
|
+
borderEnabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export interface IDrawingShapeData extends IDrawingParam {
|
|
16
|
+
/**
|
|
17
|
+
* 20.1.8.55 srcRect (Source Rectangle)
|
|
18
|
+
*/
|
|
19
|
+
srcRect?: Nullable<ISrcRect>;
|
|
20
|
+
/**
|
|
21
|
+
* 20.1.9.18 prstGeom (Preset geometry)
|
|
22
|
+
*/
|
|
23
|
+
prstGeom?: Nullable<PresetGeometryType>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
3
|
+
import { SheetInterceptorService, SheetSkeletonService } from '@univerjs/sheets';
|
|
4
|
+
import { SheetsShapeService } from '../services/sheet-shape-services';
|
|
5
|
+
export declare class SheetsShapeController extends Disposable {
|
|
6
|
+
private readonly _commandService;
|
|
7
|
+
private readonly _sheetInterceptorService;
|
|
8
|
+
private readonly _sheetSkeletonService;
|
|
9
|
+
private readonly _sheetsShapeService;
|
|
10
|
+
private readonly _drawingManagerService;
|
|
11
|
+
constructor(_commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService, _sheetSkeletonService: SheetSkeletonService, _sheetsShapeService: SheetsShapeService, _drawingManagerService: IDrawingManagerService);
|
|
12
|
+
private _initCommands;
|
|
13
|
+
private _initCommandInterceptor;
|
|
14
|
+
/**
|
|
15
|
+
* Get the IConnectPointInfo for a connected shape based on the relation item.
|
|
16
|
+
* This retrieves the world coordinates, angle, and bounds of the connection point.
|
|
17
|
+
*/
|
|
18
|
+
private _getConnectPointInfo;
|
|
19
|
+
/**
|
|
20
|
+
* Add mutations for updating a connector line when it has both ends connected.
|
|
21
|
+
* Re-routes the line based on the connected shapes' positions.
|
|
22
|
+
*/
|
|
23
|
+
private _addLineRerouteUpdates;
|
|
24
|
+
/**
|
|
25
|
+
* Add mutations for updating a connector line when only one end is connected.
|
|
26
|
+
* The line follows the connected shape's movement.
|
|
27
|
+
*/
|
|
28
|
+
private _addLineFollowShapeUpdates;
|
|
29
|
+
}
|