@univerjs-pro/sheets-mcp 1.0.0-alpha.0 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x21c4e3=_0x4c77;function _0x56c5(){const _0x4a66ac=['displayValue','getColVisible','includes','_injector','getCellMatrix','extend','getLintErrors','defineProperty','getRange','getAllFormulaUsages','_workbook','firstOccurrence','filter','trim','getMaxColumns','546651kwyKxI','_collectRectAreaData','indexOf','endRow','1690985MgUURg','body','getSizeUsagesAsA1','4117608jlypvl','_worksheet','toA1','getRectAreaData','getName','getColumnWidth','getFormulaStringByCell','getAllSizeUsages','formula','219hZMYQl','filledRanges','map','visibleOnly','toLowerCase','getFormulaUsages','updateConfig','29860KawbQQ','startRow','6JNmaeS','get','_formulaDataModel','getColumnManager','length','150qKFpXB','Sheet\x20with\x20ID\x20','getCellDataGrid','getMaxRows','5460ctVQQk','toString','getCell','getRowVisible','_cellMatchesSearch','getSheetBySheetId','every','getAllStyleUsages','some','getSizeUsages','810568jRJPXS','rawValue','getSheetId','getCellRaw','getRowHeight','isArray','_isMatch','getFormulaUsagesAsA1','getStyleUsagesAsA1','push','forValue','moveFormulaRefOffset','getActiveWorkbook','getAllFormulaError','startColumn','searchCells','getWorkbook','endColumn','11420iUrRKU','getAllDataValidationErrorAsync','getStyleUsages','60okNvIw','getSheets','AND'];_0x56c5=function(){return _0x4a66ac;};return _0x56c5();}(function(_0x436ff5,_0x30d970){const _0x3f51fb=_0x4c77,_0x3c0af8=_0x436ff5();while(!![]){try{const _0x356930=parseInt(_0x3f51fb(0x163))/0x1*(parseInt(_0x3f51fb(0x166))/0x2)+-parseInt(_0x3f51fb(0x135))/0x3*(parseInt(_0x3f51fb(0x13c))/0x4)+parseInt(_0x3f51fb(0x17c))/0x5*(parseInt(_0x3f51fb(0x13e))/0x6)+parseInt(_0x3f51fb(0x147))/0x7+parseInt(_0x3f51fb(0x151))/0x8+parseInt(_0x3f51fb(0x178))/0x9*(parseInt(_0x3f51fb(0x143))/0xa)+-parseInt(_0x3f51fb(0x17f))/0xb;if(_0x356930===_0x30d970)break;else _0x3c0af8['push'](_0x3c0af8['shift']());}catch(_0x2680ae){_0x3c0af8['push'](_0x3c0af8['shift']());}}}(_0x56c5,0xbd236));import{FUniver as _0x318f1b}from'@univerjs/core/facade';import'@univerjs/sheets-formula/facade';import'@univerjs/sheets-data-validation/facade';import{FRange as _0x1d0793,FWorkbook as _0x379632,FWorksheet as _0x5a92b0}from'@univerjs/sheets/facade';import{FormulaDataModel as _0x317cc0,serializeRangeWithSheet as _0x3ccf82}from'@univerjs/engine-formula';import{IFormulaUsageAnalyzer as _0x742142,ISizeUsageAnalyzer as _0x5fd34e,IStyleUsageAnalyzer as _0x18e256,formulaToA1 as _0x3b57ce,styleToA1 as _0x42800d}from'@univerjs-pro/sheets-mcp';import{getIntersectRange as _0x16e3bf}from'@univerjs/core';var f=class extends _0x318f1b{async[_0x21c4e3(0x16f)](){const _0x44d096=_0x21c4e3;return this[_0x44d096(0x15d)]()[_0x44d096(0x16f)]();}};_0x318f1b[_0x21c4e3(0x16e)](f);var p=class extends _0x379632{['_initialize'](){const _0x50b7bd=_0x21c4e3;Object[_0x50b7bd(0x170)](this,_0x50b7bd(0x140),{'get'(){const _0x4ac8ba=_0x50b7bd;return this['_injector'][_0x4ac8ba(0x13f)](_0x317cc0);}});}[_0x21c4e3(0x160)](_0xc999f5,_0x1d02c5={}){const _0x44bcf1=_0x21c4e3;let {caseSensitive:_0x393882=!0x1,matchEntireCell:_0x357ccc=!0x1,specificRanges:_0x3bc81a,specificTypes:_0x198fa2,searchMultipleTextsCondition:_0x3e504a='OR'}=_0x1d02c5,_0x12d696=(Array[_0x44bcf1(0x156)](_0xc999f5)?_0xc999f5:[_0xc999f5])[_0x44bcf1(0x137)](_0x5550aa=>_0x5550aa[_0x44bcf1(0x176)]())[_0x44bcf1(0x175)](_0x2faa6f=>_0x2faa6f);if(_0x393882||(_0x12d696=_0x12d696[_0x44bcf1(0x137)](_0x58dfba=>_0x58dfba['toLowerCase']())),_0x12d696[_0x44bcf1(0x142)]===0x0)return[];let _0x5331db={'caseSensitive':_0x393882,'matchEntireCell':_0x357ccc,'searchMultipleTextsCondition':_0x3e504a,'isSearchByRawValue':!_0x198fa2||_0x198fa2[_0x44bcf1(0x16b)](_0x44bcf1(0x152)),'isSearchByDisplayValue':!_0x198fa2||_0x198fa2[_0x44bcf1(0x16b)](_0x44bcf1(0x169)),'isSearchByFormula':!_0x198fa2||_0x198fa2[_0x44bcf1(0x16b)]('formula')},_0x1f10e0=this[_0x44bcf1(0x161)](),_0x6c4e83=[];if(_0x3bc81a)for(let {sheetId:_0x444ca9,ranges:_0x489e9c}of _0x3bc81a){let _0x44df95=_0x1f10e0[_0x44bcf1(0x14c)](_0x444ca9);if(!_0x44df95){console['warn'](_0x44bcf1(0x144)+_0x444ca9+'\x20not\x20found.\x20Skipping.');continue;}let _0x4a7ee8=_0x44df95[_0x44bcf1(0x16d)]();if(_0x489e9c&&_0x489e9c['length']>0x0){for(let _0x393b67 of _0x489e9c)for(let _0x176ad6=_0x393b67[_0x44bcf1(0x13d)];_0x176ad6<=_0x393b67[_0x44bcf1(0x17b)];_0x176ad6++)for(let _0x540d07=_0x393b67[_0x44bcf1(0x15f)];_0x540d07<=_0x393b67[_0x44bcf1(0x162)];_0x540d07++){let _0x1ca353=_0x4a7ee8['getValue'](_0x176ad6,_0x540d07);if(!_0x1ca353)continue;let _0x118e50=this[_0x44bcf1(0x14b)](_0x1ca353,_0x12d696,{..._0x5331db,'worksheet':_0x44df95,'row':_0x176ad6,'col':_0x540d07});_0x118e50&&_0x6c4e83[_0x44bcf1(0x15a)]({..._0x118e50,'sheetId':_0x44df95[_0x44bcf1(0x153)]()});}}else _0x4a7ee8[_0x44bcf1(0x15b)]((_0x33cb5a,_0x36921e,_0x38db97)=>{if(_0x38db97){let _0x225c46=this['_cellMatchesSearch'](_0x38db97,_0x12d696,{..._0x5331db,'worksheet':_0x44df95,'row':_0x33cb5a,'col':_0x36921e});_0x225c46&&_0x6c4e83['push']({..._0x225c46,'sheetId':_0x44df95['getSheetId']()});}});}else{let _0x2e2d0b=_0x1f10e0[_0x44bcf1(0x167)]();for(let _0x429168 of _0x2e2d0b)_0x429168[_0x44bcf1(0x16d)]()[_0x44bcf1(0x15b)]((_0x1201b0,_0x79b3c6,_0xda2e6c)=>{const _0x1934ad=_0x44bcf1;if(_0xda2e6c){let _0x2fc784=this['_cellMatchesSearch'](_0xda2e6c,_0x12d696,{..._0x5331db,'worksheet':_0x429168,'row':_0x1201b0,'col':_0x79b3c6});_0x2fc784&&_0x6c4e83[_0x1934ad(0x15a)]({..._0x2fc784,'sheetId':_0x429168[_0x1934ad(0x153)]()});}});}return _0x6c4e83;}['_cellMatchesSearch'](_0x304600,_0x294141,_0x462070){const _0x4126f3=_0x21c4e3;let {caseSensitive:_0x176b87,matchEntireCell:_0x4beb49,searchMultipleTextsCondition:_0x8e268e,isSearchByRawValue:_0x286908,isSearchByDisplayValue:_0x2826ab,isSearchByFormula:_0x17e2cc,worksheet:_0xc7f5e4,row:_0x54b560,col:_0x1b2d82}=_0x462070;if(_0x286908){var _0x4b12a9;let _0x5f0e01=((_0x4b12a9=_0x304600['p'])==null||(_0x4b12a9=_0x4b12a9[_0x4126f3(0x17d)])==null?void 0x0:_0x4b12a9['dataStream'])||_0x304600['v'];if(_0x5f0e01){let _0x3769c4=_0x176b87?_0x5f0e01[_0x4126f3(0x148)]():_0x5f0e01[_0x4126f3(0x148)]()[_0x4126f3(0x139)]();if(this[_0x4126f3(0x157)](_0x3769c4,_0x294141,_0x4beb49,_0x8e268e))return{'row':_0x54b560,'col':_0x1b2d82,'reference':_0x3ccf82(_0xc7f5e4[_0x4126f3(0x130)](),{'startRow':_0x54b560,'endRow':_0x54b560,'startColumn':_0x1b2d82,'endColumn':_0x1b2d82}),'cellData':{..._0x304600,'rawValue':_0x5f0e01}};}}if(_0x17e2cc&&(_0x304600['f']||_0x304600['si'])){let _0x23babd=this[_0x4126f3(0x140)][_0x4126f3(0x132)](_0x54b560,_0x1b2d82,_0xc7f5e4['getSheetId'](),this[_0x4126f3(0x161)]()['getUnitId']());if(_0x23babd){let _0x20caad=_0x176b87?_0x23babd:_0x23babd[_0x4126f3(0x139)]();if(this[_0x4126f3(0x157)](_0x20caad,_0x294141,_0x4beb49,_0x8e268e))return{'row':_0x54b560,'col':_0x1b2d82,'reference':_0x3ccf82(_0xc7f5e4[_0x4126f3(0x130)](),{'startRow':_0x54b560,'endRow':_0x54b560,'startColumn':_0x1b2d82,'endColumn':_0x1b2d82}),'cellData':{..._0x304600,'formulaString':_0x23babd}};}}if(_0x2826ab){var _0x3e8d12;let _0x24b697=(_0x3e8d12=_0x304600['p'])==null||(_0x3e8d12=_0x3e8d12[_0x4126f3(0x17d)])==null?void 0x0:_0x3e8d12['dataStream'];if(!_0x24b697){var _0x5bab4b;_0x24b697=(_0x5bab4b=_0xc7f5e4[_0x4126f3(0x149)](_0x54b560,_0x1b2d82))==null?void 0x0:_0x5bab4b['v'];}if(_0x24b697){let _0x41a075=_0x176b87?_0x24b697[_0x4126f3(0x148)]():_0x24b697['toString']()['toLowerCase']();if(this[_0x4126f3(0x157)](_0x41a075,_0x294141,_0x4beb49,_0x8e268e))return{'row':_0x54b560,'col':_0x1b2d82,'reference':_0x3ccf82(_0xc7f5e4[_0x4126f3(0x130)](),{'startRow':_0x54b560,'endRow':_0x54b560,'startColumn':_0x1b2d82,'endColumn':_0x1b2d82}),'cellData':{..._0x304600,'displayValue':_0x24b697[_0x4126f3(0x148)]()}};}}return!0x1;}[_0x21c4e3(0x157)](_0x5bbe30,_0xa1c449,_0x22dcaf,_0x656ded){const _0x5ac005=_0x21c4e3;return _0xa1c449['length']>0x1&&_0x656ded===_0x5ac005(0x168)?_0xa1c449[_0x5ac005(0x14d)](_0x25e562=>_0x22dcaf?_0x5bbe30===_0x25e562:_0x5bbe30[_0x5ac005(0x17a)](_0x25e562)>-0x1):_0xa1c449[_0x5ac005(0x14f)](_0x2eae4d=>_0x22dcaf?_0x5bbe30===_0x2eae4d:_0x5bbe30['indexOf'](_0x2eae4d)>-0x1);}};_0x379632[_0x21c4e3(0x16e)](p);function _0x4c77(_0x4dc111,_0x302837){_0x4dc111=_0x4dc111-0x12d;const _0x56c5b7=_0x56c5();let _0x4c77b3=_0x56c5b7[_0x4dc111];return _0x4c77b3;}var m=class extends _0x379632{async[_0x21c4e3(0x16f)](){const _0x2cfcec=_0x21c4e3;return{'formulaErrors':this[_0x2cfcec(0x15e)](),'dataValidationErrors':await this[_0x2cfcec(0x164)]()};}};_0x379632[_0x21c4e3(0x16e)](m);var h=class extends _0x5a92b0{async['getFormulaUsages'](){const _0x2cdffd=_0x21c4e3;let _0x437ed6=this[_0x2cdffd(0x16c)][_0x2cdffd(0x13f)](_0x742142),_0x5c803d=this[_0x2cdffd(0x171)](0x0,0x0,this['getMaxRows'](),this[_0x2cdffd(0x177)]())[_0x2cdffd(0x145)]();return await _0x437ed6[_0x2cdffd(0x172)](_0x5c803d);}async[_0x21c4e3(0x158)](){const _0x4acde7=_0x21c4e3;return(await this[_0x4acde7(0x13a)]())['map'](_0x3b57ce);}[_0x21c4e3(0x165)](_0x9bfcf1){const _0x32f2ce=_0x21c4e3;let _0x59af6f=this[_0x32f2ce(0x16c)][_0x32f2ce(0x13f)](_0x18e256),_0x2b9bdd=this[_0x32f2ce(0x171)](0x0,0x0,this[_0x32f2ce(0x146)](),this[_0x32f2ce(0x177)]())[_0x32f2ce(0x145)]();return _0x59af6f[_0x32f2ce(0x13b)](_0x9bfcf1),_0x59af6f[_0x32f2ce(0x14e)](_0x2b9bdd,this[_0x32f2ce(0x173)],this['_worksheet']);}[_0x21c4e3(0x159)](_0xd6b29e){const _0xcabcec=_0x21c4e3;return this['getStyleUsages'](_0xd6b29e)[_0xcabcec(0x137)](_0x42800d);}[_0x21c4e3(0x150)](_0x47f4d3){const _0x31fb82=_0x21c4e3;let _0x2355dc=this[_0x31fb82(0x16c)][_0x31fb82(0x13f)](_0x5fd34e);return _0x2355dc[_0x31fb82(0x13b)](_0x47f4d3),_0x2355dc[_0x31fb82(0x133)](this['_worksheet']);}['getSizeUsagesAsA1'](_0x4b7d98){const _0x458ef2=_0x21c4e3;let _0x8304c3=this[_0x458ef2(0x16c)][_0x458ef2(0x13f)](_0x5fd34e);_0x8304c3[_0x458ef2(0x13b)](_0x4b7d98);let _0x3c5671=_0x8304c3[_0x458ef2(0x133)](this[_0x458ef2(0x12d)]);return _0x8304c3[_0x458ef2(0x12e)](_0x3c5671);}};_0x5a92b0[_0x21c4e3(0x16e)](h);var g=class extends _0x1d0793{[_0x21c4e3(0x179)](_0x52344c){const _0x5d0aa9=_0x21c4e3;var _0x5a96e5;let _0xfdbe8f=(_0x5a96e5=_0x52344c==null?void 0x0:_0x52344c[_0x5d0aa9(0x138)])==null?!0x0:_0x5a96e5,_0x18189d=this[_0x5d0aa9(0x171)](),_0xc1d33a=this[_0x5d0aa9(0x12d)]['getRowManager'](),_0x2bfe29=this[_0x5d0aa9(0x12d)][_0x5d0aa9(0x141)](),_0x3d8455={},_0x55a4c6=0x0;for(let _0x117222=_0x18189d[_0x5d0aa9(0x13d)];_0x117222<=_0x18189d[_0x5d0aa9(0x17b)];_0x117222++){let _0x626b0c=_0xc1d33a[_0x5d0aa9(0x155)](_0x117222),_0x47996a=!_0xfdbe8f||this[_0x5d0aa9(0x12d)][_0x5d0aa9(0x14a)](_0x117222)?_0x626b0c:0x0;_0x55a4c6+=_0x47996a,_0x3d8455[_0x117222]={'h':_0x47996a};}let _0x59bca9={},_0x1383c0=0x0;for(let _0xec8646=_0x18189d[_0x5d0aa9(0x15f)];_0xec8646<=_0x18189d[_0x5d0aa9(0x162)];_0xec8646++){let _0xe7eea=_0x2bfe29[_0x5d0aa9(0x131)](_0xec8646),_0x134ebc=!_0xfdbe8f||this[_0x5d0aa9(0x12d)][_0x5d0aa9(0x16a)](_0xec8646)?_0xe7eea:0x0;_0x1383c0+=_0x134ebc,_0x59bca9[_0xec8646]={'w':_0x134ebc};}return{'w':_0x1383c0,'h':_0x55a4c6,'rowData':_0x3d8455,'columnData':_0x59bca9};}async[_0x21c4e3(0x13a)](){const _0x5c2a22=_0x21c4e3;let _0x13bac2=this['_injector'][_0x5c2a22(0x13f)](_0x742142),_0xf6c013=(({startRow:_0x54c1e1,endRow:_0x39f287,startColumn:_0x2c08ee,endColumn:_0x21d5ba})=>{const _0x2fa382=_0x5c2a22;let _0x38f1c9=[];for(let _0x33543c=_0x54c1e1;_0x33543c<=_0x39f287;_0x33543c++){let _0x1edf9d=[];for(let _0x3e0105=_0x2c08ee;_0x3e0105<=_0x21d5ba;_0x3e0105++)_0x1edf9d[_0x2fa382(0x15a)](this[_0x2fa382(0x12d)]['getCellRaw'](_0x33543c,_0x3e0105));_0x38f1c9[_0x2fa382(0x15a)](_0x1edf9d);}return _0x38f1c9;})({'startRow':0x0,'endRow':this[_0x5c2a22(0x12d)][_0x5c2a22(0x146)](),'startColumn':0x0,'endColumn':this[_0x5c2a22(0x12d)][_0x5c2a22(0x177)]()}),_0x579427=await _0x13bac2['getAllFormulaUsages'](_0xf6c013),_0x108338=this['getRange'](),_0xf4b5e4=[];for(let _0x438c2d=0x0;_0x438c2d<_0x579427[_0x5c2a22(0x142)];_0x438c2d++){let _0x319ba6=_0x579427[_0x438c2d],_0x3caf9e=_0x319ba6['filledRanges'],_0x470184=[];for(let _0x4c972c=0x0;_0x4c972c<_0x3caf9e[_0x5c2a22(0x142)];_0x4c972c++){let _0x386f17=_0x3caf9e[_0x4c972c],_0x1138fc=_0x16e3bf(_0x386f17,_0x108338);_0x1138fc&&_0x470184['push'](_0x1138fc);}if(_0x470184['length']>0x0){if(_0x319ba6[_0x5c2a22(0x136)]=_0x470184,!(_0x319ba6['firstOccurrence']['startRow']>=_0x108338['startRow']&&_0x319ba6[_0x5c2a22(0x174)][_0x5c2a22(0x13d)]<=_0x108338['endRow']&&_0x319ba6[_0x5c2a22(0x174)]['startColumn']>=_0x108338[_0x5c2a22(0x15f)]&&_0x319ba6['firstOccurrence'][_0x5c2a22(0x15f)]<=_0x108338[_0x5c2a22(0x162)])){let _0x11a1c8=_0x470184[0x0],_0x2d5a99=_0x11a1c8[_0x5c2a22(0x13d)]-_0x319ba6[_0x5c2a22(0x174)][_0x5c2a22(0x13d)],_0x577d49=_0x11a1c8[_0x5c2a22(0x15f)]-_0x319ba6['firstOccurrence'][_0x5c2a22(0x15f)];_0x319ba6['formula']=await _0x13bac2[_0x5c2a22(0x15c)](_0x319ba6[_0x5c2a22(0x134)],_0x577d49,_0x2d5a99),_0x319ba6['firstOccurrence']={'startRow':_0x11a1c8[_0x5c2a22(0x13d)],'endRow':_0x11a1c8[_0x5c2a22(0x13d)],'startColumn':_0x11a1c8[_0x5c2a22(0x15f)],'endColumn':_0x11a1c8['startColumn']};}_0xf4b5e4['push'](_0x319ba6);}}return _0xf4b5e4;}async[_0x21c4e3(0x158)](){const _0x14b4c6=_0x21c4e3;return(await this[_0x14b4c6(0x13a)]())[_0x14b4c6(0x137)](_0x3b57ce);}[_0x21c4e3(0x165)](_0x4445be){const _0x46059a=_0x21c4e3;let _0x2406dc=this['_injector'][_0x46059a(0x13f)](_0x18e256),_0xe5e3d2=(({startRow:_0x344ca4,endRow:_0x5d999c,startColumn:_0x711615,endColumn:_0x4d61e5})=>{const _0x4f2829=_0x46059a;let _0x3c175d=[];for(let _0x265d6f=_0x344ca4;_0x265d6f<=_0x5d999c;_0x265d6f++){let _0x52f860=[];for(let _0x2a3156=_0x711615;_0x2a3156<=_0x4d61e5;_0x2a3156++)_0x52f860[_0x4f2829(0x15a)](this[_0x4f2829(0x12d)][_0x4f2829(0x154)](_0x265d6f,_0x2a3156));_0x3c175d[_0x4f2829(0x15a)](_0x52f860);}return _0x3c175d;})({'startRow':0x0,'endRow':this[_0x46059a(0x12d)][_0x46059a(0x146)](),'startColumn':0x0,'endColumn':this[_0x46059a(0x12d)]['getMaxColumns']()});_0x2406dc[_0x46059a(0x13b)](_0x4445be);let _0x534b85=_0x2406dc[_0x46059a(0x14e)](_0xe5e3d2,this['_workbook'],this[_0x46059a(0x12d)]),_0x48c844=this[_0x46059a(0x171)](),_0x4e9786=[];for(let _0x1ff04c=0x0;_0x1ff04c<_0x534b85[_0x46059a(0x142)];_0x1ff04c++){let _0x34c21b=_0x534b85[_0x1ff04c],_0x53e141=_0x34c21b[_0x46059a(0x136)],_0xe73a3a=[];for(let _0x131e39=0x0;_0x131e39<_0x53e141[_0x46059a(0x142)];_0x131e39++){let _0x5ca755=_0x53e141[_0x131e39],_0x4d5495=_0x16e3bf(_0x5ca755,_0x48c844);_0x4d5495&&_0xe73a3a[_0x46059a(0x15a)](_0x4d5495);}_0xe73a3a['length']>0x0&&(_0x34c21b[_0x46059a(0x136)]=_0xe73a3a,_0x4e9786[_0x46059a(0x15a)](_0x34c21b));}return _0x4e9786;}[_0x21c4e3(0x159)](_0x5b08e0){const _0x412d93=_0x21c4e3;return this[_0x412d93(0x165)](_0x5b08e0)['map'](_0x42800d);}[_0x21c4e3(0x150)](_0x2e764d){const _0x517a92=_0x21c4e3;let _0x36e362=this['_injector']['get'](_0x5fd34e),_0x258e8d=this[_0x517a92(0x171)]();return _0x36e362[_0x517a92(0x13b)](_0x2e764d),_0x36e362[_0x517a92(0x133)](this[_0x517a92(0x12d)],_0x258e8d['startRow'],_0x258e8d[_0x517a92(0x17b)],_0x258e8d[_0x517a92(0x15f)],_0x258e8d[_0x517a92(0x162)]);}[_0x21c4e3(0x17e)](_0x159f20){const _0x5e2c63=_0x21c4e3;let _0x54a989=this[_0x5e2c63(0x150)](_0x159f20);return this[_0x5e2c63(0x16c)][_0x5e2c63(0x13f)](_0x5fd34e)['toA1'](_0x54a989);}['getRectArea'](_0x3bd858){const _0x14fc73=_0x21c4e3;let _0x3bdc74=this[_0x14fc73(0x179)](_0x3bd858);return{'w':_0x3bdc74['w'],'h':_0x3bdc74['h']};}[_0x21c4e3(0x12f)](_0x2854ab){const _0x29ffe0=_0x21c4e3;return this[_0x29ffe0(0x179)](_0x2854ab);}};_0x1d0793['extend'](g);export{};
1
+ const _0x468bf4=_0x10be;(function(_0x5aab05,_0x376aec){const _0x273452=_0x10be,_0x484bf0=_0x5aab05();while(!![]){try{const _0x510602=parseInt(_0x273452(0x1f8))/0x1*(parseInt(_0x273452(0x1ea))/0x2)+parseInt(_0x273452(0x216))/0x3*(-parseInt(_0x273452(0x205))/0x4)+-parseInt(_0x273452(0x207))/0x5+-parseInt(_0x273452(0x1f5))/0x6*(parseInt(_0x273452(0x202))/0x7)+parseInt(_0x273452(0x221))/0x8+parseInt(_0x273452(0x1eb))/0x9+parseInt(_0x273452(0x219))/0xa;if(_0x510602===_0x376aec)break;else _0x484bf0['push'](_0x484bf0['shift']());}catch(_0x5cd698){_0x484bf0['push'](_0x484bf0['shift']());}}}(_0xc20c,0x1ee08));import{FUniver as _0x348eea}from'@univerjs/core/facade';import'@univerjs/sheets-formula/facade';import'@univerjs/sheets-data-validation/facade';import{FRange as _0x104a62,FWorkbook as _0x1db477,FWorksheet as _0x1dc84d}from'@univerjs/sheets/facade';import{FormulaDataModel as _0x107ca9,serializeRangeWithSheet as _0x1ecd6f}from'@univerjs/engine-formula';import{IFormulaUsageAnalyzer as _0x329834,ISizeUsageAnalyzer as _0x151c6d,IStyleUsageAnalyzer as _0x2cc0bc,formulaToA1 as _0x227383,styleToA1 as _0x5cac53}from'@univerjs-pro/sheets-mcp';import{getIntersectRange as _0xacd82e}from'@univerjs/core';function _0xc20c(){const _0x5a180b=['endColumn','5689050BmugJL','filledRanges','getCellDataGrid','defineProperty','AND','length','getAllSizeUsages','searchCells','425496thIKlu','getRowHeight','extend','toA1','formula','visibleOnly','getCellRaw','map','get','getColumnWidth','getAllDataValidationErrorAsync','getName','getRectAreaData','getAllStyleUsages','getUnitId','getStyleUsages','getCellMatrix','warn','toLowerCase','forValue','indexOf','rawValue','startRow','getAllFormulaUsages','getSheets','getSheetId','182njObLb','865458cSbZqK','getSizeUsagesAsA1','getRange','body','getAllFormulaError','firstOccurrence','displayValue','_formulaDataModel','filter','\x20not\x20found.\x20Skipping.','11922CqFeRB','getLintErrors','_worksheet','292MpVfrj','getValue','getSizeUsages','_workbook','_cellMatchesSearch','getMaxColumns','moveFormulaRefOffset','getMaxRows','getWorkbook','every','742tTCPay','getFormulaUsagesAsA1','toString','24tnkLpe','endRow','832630OHuUwv','_collectRectAreaData','getRectArea','getRowManager','updateConfig','Sheet\x20with\x20ID\x20','trim','getColVisible','getFormulaUsages','_isMatch','includes','_injector','startColumn','getStyleUsagesAsA1','dataStream','120603raFnYA','push'];_0xc20c=function(){return _0x5a180b;};return _0xc20c();}var f=class extends _0x348eea{async[_0x468bf4(0x1f6)](){const _0x46061f=_0x468bf4;return this['getActiveWorkbook']()[_0x46061f(0x1f6)]();}};_0x348eea['extend'](f);var p=class extends _0x1db477{['_initialize'](){const _0x554927=_0x468bf4;Object[_0x554927(0x21c)](this,_0x554927(0x1f2),{'get'(){const _0xeb9b40=_0x554927;return this[_0xeb9b40(0x212)][_0xeb9b40(0x229)](_0x107ca9);}});}[_0x468bf4(0x220)](_0x1dfacf,_0x45c50a={}){const _0x2185f4=_0x468bf4;let {caseSensitive:_0x42555d=!0x1,matchEntireCell:_0x4561db=!0x1,specificRanges:_0x5fdf1b,specificTypes:_0x592a98,searchMultipleTextsCondition:_0x28b487='OR'}=_0x45c50a,_0x23ea69=(Array['isArray'](_0x1dfacf)?_0x1dfacf:[_0x1dfacf])['map'](_0x184137=>_0x184137[_0x2185f4(0x20d)]())[_0x2185f4(0x1f3)](_0x5be2bb=>_0x5be2bb);if(_0x42555d||(_0x23ea69=_0x23ea69['map'](_0x4deedb=>_0x4deedb['toLowerCase']())),_0x23ea69[_0x2185f4(0x21e)]===0x0)return[];let _0x27114f={'caseSensitive':_0x42555d,'matchEntireCell':_0x4561db,'searchMultipleTextsCondition':_0x28b487,'isSearchByRawValue':!_0x592a98||_0x592a98['includes'](_0x2185f4(0x1e5)),'isSearchByDisplayValue':!_0x592a98||_0x592a98[_0x2185f4(0x211)](_0x2185f4(0x1f1)),'isSearchByFormula':!_0x592a98||_0x592a98[_0x2185f4(0x211)](_0x2185f4(0x225))},_0x2e6cee=this[_0x2185f4(0x200)](),_0x5623ce=[];if(_0x5fdf1b)for(let {sheetId:_0x2e0102,ranges:_0x226a51}of _0x5fdf1b){let _0x143b79=_0x2e6cee['getSheetBySheetId'](_0x2e0102);if(!_0x143b79){console[_0x2185f4(0x1e1)](_0x2185f4(0x20c)+_0x2e0102+_0x2185f4(0x1f4));continue;}let _0x40b598=_0x143b79['getCellMatrix']();if(_0x226a51&&_0x226a51[_0x2185f4(0x21e)]>0x0){for(let _0x1d14b1 of _0x226a51)for(let _0x57d526=_0x1d14b1[_0x2185f4(0x1e6)];_0x57d526<=_0x1d14b1[_0x2185f4(0x206)];_0x57d526++)for(let _0x58b231=_0x1d14b1['startColumn'];_0x58b231<=_0x1d14b1[_0x2185f4(0x218)];_0x58b231++){let _0x4a7339=_0x40b598[_0x2185f4(0x1f9)](_0x57d526,_0x58b231);if(!_0x4a7339)continue;let _0x4fcce9=this[_0x2185f4(0x1fc)](_0x4a7339,_0x23ea69,{..._0x27114f,'worksheet':_0x143b79,'row':_0x57d526,'col':_0x58b231});_0x4fcce9&&_0x5623ce[_0x2185f4(0x217)]({..._0x4fcce9,'sheetId':_0x143b79['getSheetId']()});}}else _0x40b598[_0x2185f4(0x1e3)]((_0x569b94,_0x2e1f6b,_0x1c4b6c)=>{const _0x5f592d=_0x2185f4;if(_0x1c4b6c){let _0x309b95=this[_0x5f592d(0x1fc)](_0x1c4b6c,_0x23ea69,{..._0x27114f,'worksheet':_0x143b79,'row':_0x569b94,'col':_0x2e1f6b});_0x309b95&&_0x5623ce['push']({..._0x309b95,'sheetId':_0x143b79[_0x5f592d(0x1e9)]()});}});}else{let _0x47f80c=_0x2e6cee[_0x2185f4(0x1e8)]();for(let _0x33bfec of _0x47f80c)_0x33bfec[_0x2185f4(0x1e0)]()['forValue']((_0x5279d5,_0x4a07de,_0x5a7e62)=>{const _0x535430=_0x2185f4;if(_0x5a7e62){let _0x261bf0=this[_0x535430(0x1fc)](_0x5a7e62,_0x23ea69,{..._0x27114f,'worksheet':_0x33bfec,'row':_0x5279d5,'col':_0x4a07de});_0x261bf0&&_0x5623ce['push']({..._0x261bf0,'sheetId':_0x33bfec[_0x535430(0x1e9)]()});}});}return _0x5623ce;}[_0x468bf4(0x1fc)](_0x2d0efe,_0x11fe3f,_0x6c6202){const _0x41e7a8=_0x468bf4;let {caseSensitive:_0x3c682d,matchEntireCell:_0x3d3f8b,searchMultipleTextsCondition:_0x234cb2,isSearchByRawValue:_0x3cec13,isSearchByDisplayValue:_0x22a2de,isSearchByFormula:_0x108924,worksheet:_0x36fbc6,row:_0x46d074,col:_0x4b0f5e}=_0x6c6202;if(_0x3cec13){var _0x42b341;let _0x36f664=((_0x42b341=_0x2d0efe['p'])==null||(_0x42b341=_0x42b341[_0x41e7a8(0x1ee)])==null?void 0x0:_0x42b341[_0x41e7a8(0x215)])||_0x2d0efe['v'];if(_0x36f664){let _0x196a43=_0x3c682d?_0x36f664['toString']():_0x36f664[_0x41e7a8(0x204)]()[_0x41e7a8(0x1e2)]();if(this['_isMatch'](_0x196a43,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6['getName'](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'rawValue':_0x36f664}};}}if(_0x108924&&(_0x2d0efe['f']||_0x2d0efe['si'])){let _0x2911d2=this[_0x41e7a8(0x1f2)]['getFormulaStringByCell'](_0x46d074,_0x4b0f5e,_0x36fbc6[_0x41e7a8(0x1e9)](),this[_0x41e7a8(0x200)]()[_0x41e7a8(0x1de)]());if(_0x2911d2){let _0x5d45aa=_0x3c682d?_0x2911d2:_0x2911d2['toLowerCase']();if(this[_0x41e7a8(0x210)](_0x5d45aa,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6['getName'](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'formulaString':_0x2911d2}};}}if(_0x22a2de){var _0x51ef17;let _0x46fc75=(_0x51ef17=_0x2d0efe['p'])==null||(_0x51ef17=_0x51ef17[_0x41e7a8(0x1ee)])==null?void 0x0:_0x51ef17['dataStream'];if(!_0x46fc75){var _0x506b2f;_0x46fc75=(_0x506b2f=_0x36fbc6['getCell'](_0x46d074,_0x4b0f5e))==null?void 0x0:_0x506b2f['v'];}if(_0x46fc75){let _0x3499d1=_0x3c682d?_0x46fc75[_0x41e7a8(0x204)]():_0x46fc75[_0x41e7a8(0x204)]()[_0x41e7a8(0x1e2)]();if(this[_0x41e7a8(0x210)](_0x3499d1,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6[_0x41e7a8(0x22c)](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'displayValue':_0x46fc75[_0x41e7a8(0x204)]()}};}}return!0x1;}[_0x468bf4(0x210)](_0x244850,_0x4c793c,_0x47a1a9,_0x4d3532){const _0x36ff9e=_0x468bf4;return _0x4c793c[_0x36ff9e(0x21e)]>0x1&&_0x4d3532===_0x36ff9e(0x21d)?_0x4c793c[_0x36ff9e(0x201)](_0x524635=>_0x47a1a9?_0x244850===_0x524635:_0x244850[_0x36ff9e(0x1e4)](_0x524635)>-0x1):_0x4c793c['some'](_0x3c8d7d=>_0x47a1a9?_0x244850===_0x3c8d7d:_0x244850['indexOf'](_0x3c8d7d)>-0x1);}};_0x1db477['extend'](p);var m=class extends _0x1db477{async[_0x468bf4(0x1f6)](){const _0x21fa6f=_0x468bf4;return{'formulaErrors':this[_0x21fa6f(0x1ef)](),'dataValidationErrors':await this[_0x21fa6f(0x22b)]()};}};_0x1db477[_0x468bf4(0x223)](m);var h=class extends _0x1dc84d{async[_0x468bf4(0x20f)](){const _0x44ac84=_0x468bf4;let _0x345ed2=this[_0x44ac84(0x212)]['get'](_0x329834),_0x5cfb4c=this[_0x44ac84(0x1ed)](0x0,0x0,this[_0x44ac84(0x1ff)](),this[_0x44ac84(0x1fd)]())[_0x44ac84(0x21b)]();return await _0x345ed2[_0x44ac84(0x1e7)](_0x5cfb4c);}async[_0x468bf4(0x203)](){const _0x31de5f=_0x468bf4;return(await this[_0x31de5f(0x20f)]())['map'](_0x227383);}[_0x468bf4(0x1df)](_0x2abeb3){const _0x30e1d7=_0x468bf4;let _0x328d09=this['_injector']['get'](_0x2cc0bc),_0x2504fd=this[_0x30e1d7(0x1ed)](0x0,0x0,this[_0x30e1d7(0x1ff)](),this[_0x30e1d7(0x1fd)]())[_0x30e1d7(0x21b)]();return _0x328d09[_0x30e1d7(0x20b)](_0x2abeb3),_0x328d09[_0x30e1d7(0x1dd)](_0x2504fd,this[_0x30e1d7(0x1fb)],this['_worksheet']);}[_0x468bf4(0x214)](_0x55e8e1){const _0x5485c5=_0x468bf4;return this[_0x5485c5(0x1df)](_0x55e8e1)['map'](_0x5cac53);}['getSizeUsages'](_0x8a8618){const _0x582379=_0x468bf4;let _0x209476=this['_injector'][_0x582379(0x229)](_0x151c6d);return _0x209476['updateConfig'](_0x8a8618),_0x209476[_0x582379(0x21f)](this[_0x582379(0x1f7)]);}[_0x468bf4(0x1ec)](_0x4e4bb3){const _0x347d5f=_0x468bf4;let _0x2c16cb=this[_0x347d5f(0x212)]['get'](_0x151c6d);_0x2c16cb['updateConfig'](_0x4e4bb3);let _0x5dfdd9=_0x2c16cb['getAllSizeUsages'](this[_0x347d5f(0x1f7)]);return _0x2c16cb[_0x347d5f(0x224)](_0x5dfdd9);}};_0x1dc84d[_0x468bf4(0x223)](h);var g=class extends _0x104a62{[_0x468bf4(0x208)](_0x547f0a){const _0x2582b5=_0x468bf4;var _0x415bbf;let _0x22e1fa=(_0x415bbf=_0x547f0a==null?void 0x0:_0x547f0a[_0x2582b5(0x226)])==null?!0x0:_0x415bbf,_0x2d14f7=this[_0x2582b5(0x1ed)](),_0x30f3c6=this['_worksheet'][_0x2582b5(0x20a)](),_0x526f6b=this[_0x2582b5(0x1f7)]['getColumnManager'](),_0x2cf057={},_0x119abd=0x0;for(let _0x3d0e55=_0x2d14f7[_0x2582b5(0x1e6)];_0x3d0e55<=_0x2d14f7[_0x2582b5(0x206)];_0x3d0e55++){let _0x49dd0e=_0x30f3c6[_0x2582b5(0x222)](_0x3d0e55),_0x167bb1=!_0x22e1fa||this[_0x2582b5(0x1f7)]['getRowVisible'](_0x3d0e55)?_0x49dd0e:0x0;_0x119abd+=_0x167bb1,_0x2cf057[_0x3d0e55]={'h':_0x167bb1};}let _0x30bff6={},_0x3e66c3=0x0;for(let _0x15f508=_0x2d14f7[_0x2582b5(0x213)];_0x15f508<=_0x2d14f7['endColumn'];_0x15f508++){let _0x265947=_0x526f6b[_0x2582b5(0x22a)](_0x15f508),_0x376e40=!_0x22e1fa||this['_worksheet'][_0x2582b5(0x20e)](_0x15f508)?_0x265947:0x0;_0x3e66c3+=_0x376e40,_0x30bff6[_0x15f508]={'w':_0x376e40};}return{'w':_0x3e66c3,'h':_0x119abd,'rowData':_0x2cf057,'columnData':_0x30bff6};}async['getFormulaUsages'](){const _0x4c2a0e=_0x468bf4;let _0x2f328c=this[_0x4c2a0e(0x212)]['get'](_0x329834),_0x47eb8c=(({startRow:_0x32bd96,endRow:_0x1f0b34,startColumn:_0x2c169a,endColumn:_0x43bc9f})=>{const _0x4f7cbb=_0x4c2a0e;let _0x56cfcb=[];for(let _0x1c9c6f=_0x32bd96;_0x1c9c6f<=_0x1f0b34;_0x1c9c6f++){let _0x36a37f=[];for(let _0x21d7e2=_0x2c169a;_0x21d7e2<=_0x43bc9f;_0x21d7e2++)_0x36a37f[_0x4f7cbb(0x217)](this[_0x4f7cbb(0x1f7)][_0x4f7cbb(0x227)](_0x1c9c6f,_0x21d7e2));_0x56cfcb['push'](_0x36a37f);}return _0x56cfcb;})({'startRow':0x0,'endRow':this[_0x4c2a0e(0x1f7)]['getMaxRows'](),'startColumn':0x0,'endColumn':this[_0x4c2a0e(0x1f7)][_0x4c2a0e(0x1fd)]()}),_0x3655c3=await _0x2f328c['getAllFormulaUsages'](_0x47eb8c),_0x2d4c83=this[_0x4c2a0e(0x1ed)](),_0x31226d=[];for(let _0x453179=0x0;_0x453179<_0x3655c3[_0x4c2a0e(0x21e)];_0x453179++){let _0x2bf560=_0x3655c3[_0x453179],_0x3ffcd0=_0x2bf560[_0x4c2a0e(0x21a)],_0x9e3b92=[];for(let _0x250cd1=0x0;_0x250cd1<_0x3ffcd0['length'];_0x250cd1++){let _0x37add4=_0x3ffcd0[_0x250cd1],_0x2c4aa6=_0xacd82e(_0x37add4,_0x2d4c83);_0x2c4aa6&&_0x9e3b92['push'](_0x2c4aa6);}if(_0x9e3b92[_0x4c2a0e(0x21e)]>0x0){if(_0x2bf560['filledRanges']=_0x9e3b92,!(_0x2bf560['firstOccurrence']['startRow']>=_0x2d4c83['startRow']&&_0x2bf560['firstOccurrence'][_0x4c2a0e(0x1e6)]<=_0x2d4c83['endRow']&&_0x2bf560['firstOccurrence'][_0x4c2a0e(0x213)]>=_0x2d4c83[_0x4c2a0e(0x213)]&&_0x2bf560['firstOccurrence']['startColumn']<=_0x2d4c83['endColumn'])){let _0x117355=_0x9e3b92[0x0],_0x2ccd3b=_0x117355[_0x4c2a0e(0x1e6)]-_0x2bf560['firstOccurrence'][_0x4c2a0e(0x1e6)],_0xaa4d1f=_0x117355[_0x4c2a0e(0x213)]-_0x2bf560[_0x4c2a0e(0x1f0)]['startColumn'];_0x2bf560[_0x4c2a0e(0x225)]=await _0x2f328c[_0x4c2a0e(0x1fe)](_0x2bf560[_0x4c2a0e(0x225)],_0xaa4d1f,_0x2ccd3b),_0x2bf560[_0x4c2a0e(0x1f0)]={'startRow':_0x117355['startRow'],'endRow':_0x117355[_0x4c2a0e(0x1e6)],'startColumn':_0x117355[_0x4c2a0e(0x213)],'endColumn':_0x117355[_0x4c2a0e(0x213)]};}_0x31226d[_0x4c2a0e(0x217)](_0x2bf560);}}return _0x31226d;}async['getFormulaUsagesAsA1'](){const _0x38edbb=_0x468bf4;return(await this[_0x38edbb(0x20f)]())[_0x38edbb(0x228)](_0x227383);}['getStyleUsages'](_0x344072){const _0x13253d=_0x468bf4;let _0x4baa31=this[_0x13253d(0x212)][_0x13253d(0x229)](_0x2cc0bc),_0x303a9a=(({startRow:_0x287e9e,endRow:_0x2e7ca6,startColumn:_0x2635f1,endColumn:_0x11b5c3})=>{const _0x10ce83=_0x13253d;let _0x2c4a29=[];for(let _0x3d2fde=_0x287e9e;_0x3d2fde<=_0x2e7ca6;_0x3d2fde++){let _0x499780=[];for(let _0x39c898=_0x2635f1;_0x39c898<=_0x11b5c3;_0x39c898++)_0x499780['push'](this[_0x10ce83(0x1f7)][_0x10ce83(0x227)](_0x3d2fde,_0x39c898));_0x2c4a29['push'](_0x499780);}return _0x2c4a29;})({'startRow':0x0,'endRow':this[_0x13253d(0x1f7)][_0x13253d(0x1ff)](),'startColumn':0x0,'endColumn':this[_0x13253d(0x1f7)][_0x13253d(0x1fd)]()});_0x4baa31['updateConfig'](_0x344072);let _0x4fa918=_0x4baa31[_0x13253d(0x1dd)](_0x303a9a,this[_0x13253d(0x1fb)],this[_0x13253d(0x1f7)]),_0xc77ea8=this['getRange'](),_0x3f14ad=[];for(let _0x1086cc=0x0;_0x1086cc<_0x4fa918[_0x13253d(0x21e)];_0x1086cc++){let _0x4738df=_0x4fa918[_0x1086cc],_0x5c7381=_0x4738df[_0x13253d(0x21a)],_0x590e92=[];for(let _0x418118=0x0;_0x418118<_0x5c7381[_0x13253d(0x21e)];_0x418118++){let _0x194b5b=_0x5c7381[_0x418118],_0x4c18bd=_0xacd82e(_0x194b5b,_0xc77ea8);_0x4c18bd&&_0x590e92[_0x13253d(0x217)](_0x4c18bd);}_0x590e92[_0x13253d(0x21e)]>0x0&&(_0x4738df[_0x13253d(0x21a)]=_0x590e92,_0x3f14ad['push'](_0x4738df));}return _0x3f14ad;}[_0x468bf4(0x214)](_0x200841){const _0x28310d=_0x468bf4;return this[_0x28310d(0x1df)](_0x200841)[_0x28310d(0x228)](_0x5cac53);}[_0x468bf4(0x1fa)](_0x458bc8){const _0x511aa4=_0x468bf4;let _0x1d21c5=this['_injector'][_0x511aa4(0x229)](_0x151c6d),_0x573806=this[_0x511aa4(0x1ed)]();return _0x1d21c5[_0x511aa4(0x20b)](_0x458bc8),_0x1d21c5[_0x511aa4(0x21f)](this[_0x511aa4(0x1f7)],_0x573806['startRow'],_0x573806[_0x511aa4(0x206)],_0x573806[_0x511aa4(0x213)],_0x573806['endColumn']);}['getSizeUsagesAsA1'](_0x2b7214){const _0x4ef488=_0x468bf4;let _0x27a9b3=this[_0x4ef488(0x1fa)](_0x2b7214);return this[_0x4ef488(0x212)]['get'](_0x151c6d)[_0x4ef488(0x224)](_0x27a9b3);}[_0x468bf4(0x209)](_0x3ea427){const _0x5a2a3a=_0x468bf4;let _0x1b3f4b=this[_0x5a2a3a(0x208)](_0x3ea427);return{'w':_0x1b3f4b['w'],'h':_0x1b3f4b['h']};}[_0x468bf4(0x1dc)](_0x238809){return this['_collectRectAreaData'](_0x238809);}};function _0x10be(_0x28e2d0,_0x2a9aaa){_0x28e2d0=_0x28e2d0-0x1dc;const _0xc20c23=_0xc20c();let _0x10beca=_0xc20c23[_0x28e2d0];return _0x10beca;}_0x104a62['extend'](g);export{};