@univerjs-pro/sheets-mcp 0.15.0 → 0.15.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/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x56f699=_0x45bb;(function(_0x41fa90,_0x10bd58){const _0x38ccc1=_0x45bb,_0x1f721a=_0x41fa90();while(!![]){try{const _0x494313=-parseInt(_0x38ccc1(0x1ac))/0x1+-parseInt(_0x38ccc1(0x1a9))/0x2*(-parseInt(_0x38ccc1(0x1a0))/0x3)+-parseInt(_0x38ccc1(0x1b6))/0x4+-parseInt(_0x38ccc1(0x193))/0x5*(-parseInt(_0x38ccc1(0x19b))/0x6)+parseInt(_0x38ccc1(0x1b2))/0x7+-parseInt(_0x38ccc1(0x196))/0x8+-parseInt(_0x38ccc1(0x1a7))/0x9*(-parseInt(_0x38ccc1(0x198))/0xa);if(_0x494313===_0x10bd58)break;else _0x1f721a['push'](_0x1f721a['shift']());}catch(_0x36bd33){_0x1f721a['push'](_0x1f721a['shift']());}}}(_0x3ad3,0x4c78e));const d=require('@univerjs/core/facade');require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade');const o=require('@univerjs/sheets/facade'),m=require('@univerjs-pro/sheets-mcp'),F=require('@univerjs/core');class C extends d['FUniver']{async[_0x56f699(0x1b3)](){const _0xe6531c=_0x56f699;return this[_0xe6531c(0x1ad)]()[_0xe6531c(0x1b3)]();}}d['FUniver'][_0x56f699(0x1a5)](C);class A extends o[_0x56f699(0x194)]{async[_0x56f699(0x1b3)](){const _0x3748db=_0x56f699,_0xd43b98=this[_0x3748db(0x199)](),_0x193b0c=await this[_0x3748db(0x1ae)]();return{'formulaErrors':_0xd43b98,'dataValidationErrors':_0x193b0c};}}function _0x45bb(_0x4fcd28,_0x52323c){_0x4fcd28=_0x4fcd28-0x192;const _0x3ad3d0=_0x3ad3();let _0x45bb9a=_0x3ad3d0[_0x4fcd28];return _0x45bb9a;}o[_0x56f699(0x194)][_0x56f699(0x1a5)](A);class k extends o[_0x56f699(0x1aa)]{async[_0x56f699(0x19d)](){const _0x2bf6e0=_0x56f699,_0xaa3bdb=this['_injector'][_0x2bf6e0(0x1a4)](m[_0x2bf6e0(0x1a2)]),_0x4286c4=this[_0x2bf6e0(0x1a8)](0x0,0x0,this[_0x2bf6e0(0x1b5)](),this['getMaxColumns']())[_0x2bf6e0(0x19f)]();return await _0xaa3bdb[_0x2bf6e0(0x195)](_0x4286c4);}async[_0x56f699(0x1a3)](){const _0x20ddc3=_0x56f699;return(await this[_0x20ddc3(0x19d)]())[_0x20ddc3(0x1a1)](m['toA1']);}}o[_0x56f699(0x1aa)][_0x56f699(0x1a5)](k);function _0x3ad3(){const _0x374ff7=['getAllDataValidationErrorAsync','getIntersectRange','firstOccurrence','FRange','2720620uHtPUc','getLintErrors','startColumn','getMaxRows','2159888RZhwgW','push','5jYzPfP','FWorkbook','getAllFormulaUsages','3405480LmzlsS','getMaxColumns','1167430NTKgDK','getAllFormulaError','formula','3618720fRgnif','startRow','getFormulaUsages','_worksheet','getCellDataGrid','3bkGANX','map','IFormulaUsageAnalyzer','getFormulaUsagesAsA1','get','extend','getCellRaw','27ApvHIR','getRange','800218XKuTMw','FWorksheet','length','463231bjZARL','getActiveWorkbook'];_0x3ad3=function(){return _0x374ff7;};return _0x3ad3();}class x extends o[_0x56f699(0x1b1)]{async[_0x56f699(0x19d)](){const _0xdccb88=_0x56f699,_0x58bfff=this['_injector'][_0xdccb88(0x1a4)](m['IFormulaUsageAnalyzer']),_0x4b24d1=(({startRow:_0xfe18f8,endRow:_0x5176ef,startColumn:_0x1b87c1,endColumn:_0x4a7d0f})=>{const _0xe2d63a=_0xdccb88,_0x254d4d=[];for(let _0xe9a6a3=_0xfe18f8;_0xe9a6a3<=_0x5176ef;_0xe9a6a3++){const _0x5a97ed=[];for(let _0x729967=_0x1b87c1;_0x729967<=_0x4a7d0f;_0x729967++)_0x5a97ed[_0xe2d63a(0x192)](this[_0xe2d63a(0x19e)][_0xe2d63a(0x1a6)](_0xe9a6a3,_0x729967));_0x254d4d[_0xe2d63a(0x192)](_0x5a97ed);}return _0x254d4d;})({'startRow':0x0,'endRow':this[_0xdccb88(0x19e)][_0xdccb88(0x1b5)](),'startColumn':0x0,'endColumn':this['_worksheet'][_0xdccb88(0x197)]()}),_0x4af0ce=await _0x58bfff[_0xdccb88(0x195)](_0x4b24d1),_0x46a923=this[_0xdccb88(0x1a8)](),_0x59c388=[];for(let _0x22678a=0x0;_0x22678a<_0x4af0ce['length'];_0x22678a++){const _0x56b022=_0x4af0ce[_0x22678a],_0x1f680f=_0x56b022['filledRanges'],_0x5c2243=[];for(let _0x466847=0x0;_0x466847<_0x1f680f['length'];_0x466847++){const _0x18913e=_0x1f680f[_0x466847],_0x314cd9=F[_0xdccb88(0x1af)](_0x18913e,_0x46a923);_0x314cd9&&_0x5c2243[_0xdccb88(0x192)](_0x314cd9);}if(_0x5c2243[_0xdccb88(0x1ab)]>0x0){if(_0x56b022['filledRanges']=_0x5c2243,!(_0x56b022[_0xdccb88(0x1b0)][_0xdccb88(0x19c)]>=_0x46a923[_0xdccb88(0x19c)]&&_0x56b022[_0xdccb88(0x1b0)][_0xdccb88(0x19c)]<=_0x46a923['endRow']&&_0x56b022['firstOccurrence'][_0xdccb88(0x1b4)]>=_0x46a923[_0xdccb88(0x1b4)]&&_0x56b022[_0xdccb88(0x1b0)][_0xdccb88(0x1b4)]<=_0x46a923['endColumn'])){const _0x5a031b=_0x5c2243[0x0],_0x160233=_0x5a031b['startRow']-_0x56b022['firstOccurrence'][_0xdccb88(0x19c)],_0x57b5a7=_0x5a031b[_0xdccb88(0x1b4)]-_0x56b022[_0xdccb88(0x1b0)]['startColumn'];_0x56b022[_0xdccb88(0x19a)]=await _0x58bfff['moveFormulaRefOffset'](_0x56b022[_0xdccb88(0x19a)],_0x57b5a7,_0x160233),_0x56b022[_0xdccb88(0x1b0)]={'startRow':_0x5a031b[_0xdccb88(0x19c)],'endRow':_0x5a031b['startRow'],'startColumn':_0x5a031b['startColumn'],'endColumn':_0x5a031b[_0xdccb88(0x1b4)]};}_0x59c388[_0xdccb88(0x192)](_0x56b022);}}return _0x59c388;}async['getFormulaUsagesAsA1'](){const _0x9ef2e2=_0x56f699;return(await this[_0x9ef2e2(0x19d)]())[_0x9ef2e2(0x1a1)](m['toA1']);}}o[_0x56f699(0x1b1)]['extend'](x);
1
+ 'use strict';const _0x4ce0f9=_0x3c0b;(function(_0x31b420,_0x158f28){const _0xae215f=_0x3c0b,_0x462eed=_0x31b420();while(!![]){try{const _0x5e4116=parseInt(_0xae215f(0x19d))/0x1+-parseInt(_0xae215f(0x1c4))/0x2+-parseInt(_0xae215f(0x1a7))/0x3+parseInt(_0xae215f(0x1b6))/0x4+parseInt(_0xae215f(0x1c5))/0x5*(parseInt(_0xae215f(0x19c))/0x6)+-parseInt(_0xae215f(0x1bd))/0x7+parseInt(_0xae215f(0x1bf))/0x8*(parseInt(_0xae215f(0x1b7))/0x9);if(_0x5e4116===_0x158f28)break;else _0x462eed['push'](_0x462eed['shift']());}catch(_0x4fd8f5){_0x462eed['push'](_0x462eed['shift']());}}}(_0x26a7,0x19cc0));function _0x26a7(){const _0x1af861=['get','FUniver','length','6DhIryq','125565YpVxpp','getCellDataGrid','getRange','updateConfig','formulaToA1','filledRanges','extend','toA1','getIntersectRange','getCellRaw','596403xNyBkp','_injector','_workbook','IFormulaUsageAnalyzer','ISizeUsageAnalyzer','getMaxRows','startRow','getAllFormulaUsages','getAllSizeUsages','IStyleUsageAnalyzer','getStyleUsagesAsA1','_worksheet','styleToA1','firstOccurrence','getSizeUsagesAsA1','663456tUnoam','90CeamEW','FWorksheet','FRange','push','endColumn','formula','106638NgNvVY','getFormulaUsages','56664yFHNAc','getFormulaUsagesAsA1','getLintErrors','map','getAllStyleUsages','355926JrQavD','677015kLUWjS','getAllFormulaError','moveFormulaRefOffset','getMaxColumns','getStyleUsages','endRow','startColumn','FWorkbook'];_0x26a7=function(){return _0x1af861;};return _0x26a7();}const U=require('@univerjs/core/facade');require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade');const f=require('@univerjs/sheets/facade'),g=require('@univerjs-pro/sheets-mcp'),m=require('@univerjs/core');function _0x3c0b(_0x243321,_0x6dbe1c){_0x243321=_0x243321-0x198;const _0x26a7c6=_0x26a7();let _0x3c0bf0=_0x26a7c6[_0x243321];return _0x3c0bf0;}class y extends U[_0x4ce0f9(0x19a)]{async[_0x4ce0f9(0x1c1)](){const _0x14854c=_0x4ce0f9;return this['getActiveWorkbook']()[_0x14854c(0x1c1)]();}}U[_0x4ce0f9(0x19a)][_0x4ce0f9(0x1a3)](y);class C extends f['FWorkbook']{async[_0x4ce0f9(0x1c1)](){const _0x4eb25a=_0x4ce0f9,_0x47cad0=this[_0x4eb25a(0x1c6)](),_0xee943d=await this['getAllDataValidationErrorAsync']();return{'formulaErrors':_0x47cad0,'dataValidationErrors':_0xee943d};}}f[_0x4ce0f9(0x198)][_0x4ce0f9(0x1a3)](C);class z extends f[_0x4ce0f9(0x1b8)]{async[_0x4ce0f9(0x1be)](){const _0x43ffc1=_0x4ce0f9,_0x78f223=this[_0x43ffc1(0x1a8)][_0x43ffc1(0x199)](g[_0x43ffc1(0x1aa)]),_0x20db5a=this['getRange'](0x0,0x0,this[_0x43ffc1(0x1ac)](),this['getMaxColumns']())[_0x43ffc1(0x19e)]();return await _0x78f223[_0x43ffc1(0x1ae)](_0x20db5a);}async[_0x4ce0f9(0x1c0)](){const _0x361eb6=_0x4ce0f9;return(await this[_0x361eb6(0x1be)]())['map'](g[_0x361eb6(0x1a1)]);}['getStyleUsages'](_0x586ba5){const _0x23c8ed=_0x4ce0f9,_0x351a08=this['_injector'][_0x23c8ed(0x199)](g[_0x23c8ed(0x1b0)]),_0x1a6225=this[_0x23c8ed(0x19f)](0x0,0x0,this['getMaxRows'](),this[_0x23c8ed(0x1c8)]())[_0x23c8ed(0x19e)]();return _0x351a08[_0x23c8ed(0x1a0)](_0x586ba5),_0x351a08[_0x23c8ed(0x1c3)](_0x1a6225,this[_0x23c8ed(0x1a9)],this[_0x23c8ed(0x1b2)]);}[_0x4ce0f9(0x1b1)](_0x3cb8f3){const _0x15d819=_0x4ce0f9;return this['getStyleUsages'](_0x3cb8f3)[_0x15d819(0x1c2)](g['styleToA1']);}['getSizeUsages'](_0x8c64cb){const _0x1759b1=_0x4ce0f9,_0x552387=this[_0x1759b1(0x1a8)][_0x1759b1(0x199)](g[_0x1759b1(0x1ab)]);return _0x552387[_0x1759b1(0x1a0)](_0x8c64cb),_0x552387[_0x1759b1(0x1af)](this[_0x1759b1(0x1b2)]);}['getSizeUsagesAsA1'](_0xe28315){const _0x13e395=_0x4ce0f9,_0x5b390f=this[_0x13e395(0x1a8)][_0x13e395(0x199)](g[_0x13e395(0x1ab)]);_0x5b390f[_0x13e395(0x1a0)](_0xe28315);const _0x23408f=_0x5b390f['getAllSizeUsages'](this['_worksheet']);return _0x5b390f[_0x13e395(0x1a4)](_0x23408f);}}f[_0x4ce0f9(0x1b8)][_0x4ce0f9(0x1a3)](z);class S extends f['FRange']{async[_0x4ce0f9(0x1be)](){const _0x202ff0=_0x4ce0f9,_0x1445ed=this[_0x202ff0(0x1a8)]['get'](g['IFormulaUsageAnalyzer']),_0x954e99=(({startRow:_0x3c8dce,endRow:_0x1120fb,startColumn:_0x5d9d37,endColumn:_0x190924})=>{const _0x42bfb4=_0x202ff0,_0x5373c1=[];for(let _0x594ef0=_0x3c8dce;_0x594ef0<=_0x1120fb;_0x594ef0++){const _0xeada5c=[];for(let _0x2d6a08=_0x5d9d37;_0x2d6a08<=_0x190924;_0x2d6a08++)_0xeada5c['push'](this['_worksheet']['getCellRaw'](_0x594ef0,_0x2d6a08));_0x5373c1[_0x42bfb4(0x1ba)](_0xeada5c);}return _0x5373c1;})({'startRow':0x0,'endRow':this['_worksheet'][_0x202ff0(0x1ac)](),'startColumn':0x0,'endColumn':this[_0x202ff0(0x1b2)][_0x202ff0(0x1c8)]()}),_0x246540=await _0x1445ed[_0x202ff0(0x1ae)](_0x954e99),_0x1f1568=this[_0x202ff0(0x19f)](),_0x46b5d7=[];for(let _0x4083bd=0x0;_0x4083bd<_0x246540['length'];_0x4083bd++){const _0x2829ea=_0x246540[_0x4083bd],_0x37e92f=_0x2829ea[_0x202ff0(0x1a2)],_0x4786fb=[];for(let _0x12bb53=0x0;_0x12bb53<_0x37e92f[_0x202ff0(0x19b)];_0x12bb53++){const _0x4a40aa=_0x37e92f[_0x12bb53],_0x38a956=m[_0x202ff0(0x1a5)](_0x4a40aa,_0x1f1568);_0x38a956&&_0x4786fb[_0x202ff0(0x1ba)](_0x38a956);}if(_0x4786fb[_0x202ff0(0x19b)]>0x0){if(_0x2829ea['filledRanges']=_0x4786fb,!(_0x2829ea['firstOccurrence'][_0x202ff0(0x1ad)]>=_0x1f1568['startRow']&&_0x2829ea[_0x202ff0(0x1b4)][_0x202ff0(0x1ad)]<=_0x1f1568['endRow']&&_0x2829ea[_0x202ff0(0x1b4)][_0x202ff0(0x1cb)]>=_0x1f1568[_0x202ff0(0x1cb)]&&_0x2829ea[_0x202ff0(0x1b4)][_0x202ff0(0x1cb)]<=_0x1f1568[_0x202ff0(0x1bb)])){const _0x1fa26e=_0x4786fb[0x0],_0x2c38cb=_0x1fa26e[_0x202ff0(0x1ad)]-_0x2829ea['firstOccurrence'][_0x202ff0(0x1ad)],_0x3f14af=_0x1fa26e[_0x202ff0(0x1cb)]-_0x2829ea['firstOccurrence'][_0x202ff0(0x1cb)];_0x2829ea[_0x202ff0(0x1bc)]=await _0x1445ed[_0x202ff0(0x1c7)](_0x2829ea[_0x202ff0(0x1bc)],_0x3f14af,_0x2c38cb),_0x2829ea[_0x202ff0(0x1b4)]={'startRow':_0x1fa26e[_0x202ff0(0x1ad)],'endRow':_0x1fa26e[_0x202ff0(0x1ad)],'startColumn':_0x1fa26e['startColumn'],'endColumn':_0x1fa26e[_0x202ff0(0x1cb)]};}_0x46b5d7['push'](_0x2829ea);}}return _0x46b5d7;}async[_0x4ce0f9(0x1c0)](){const _0x33c27f=_0x4ce0f9;return(await this[_0x33c27f(0x1be)]())['map'](g['formulaToA1']);}['getStyleUsages'](_0x1d7899){const _0x185ff3=_0x4ce0f9,_0x5214f8=this[_0x185ff3(0x1a8)][_0x185ff3(0x199)](g[_0x185ff3(0x1b0)]),_0x447377=(({startRow:_0x33af31,endRow:_0x48f75d,startColumn:_0x54b27e,endColumn:_0x13d624})=>{const _0x359d89=_0x185ff3,_0x25738f=[];for(let _0x1c39d1=_0x33af31;_0x1c39d1<=_0x48f75d;_0x1c39d1++){const _0x2817ee=[];for(let _0x62d47c=_0x54b27e;_0x62d47c<=_0x13d624;_0x62d47c++)_0x2817ee[_0x359d89(0x1ba)](this[_0x359d89(0x1b2)][_0x359d89(0x1a6)](_0x1c39d1,_0x62d47c));_0x25738f[_0x359d89(0x1ba)](_0x2817ee);}return _0x25738f;})({'startRow':0x0,'endRow':this[_0x185ff3(0x1b2)][_0x185ff3(0x1ac)](),'startColumn':0x0,'endColumn':this[_0x185ff3(0x1b2)][_0x185ff3(0x1c8)]()});_0x5214f8[_0x185ff3(0x1a0)](_0x1d7899);const _0x527715=_0x5214f8[_0x185ff3(0x1c3)](_0x447377,this['_workbook'],this[_0x185ff3(0x1b2)]),_0xe21eaa=this[_0x185ff3(0x19f)](),_0x295cab=[];for(let _0x2e9b76=0x0;_0x2e9b76<_0x527715[_0x185ff3(0x19b)];_0x2e9b76++){const _0x133e43=_0x527715[_0x2e9b76],_0x1272fb=_0x133e43[_0x185ff3(0x1a2)],_0x1d1edc=[];for(let _0x318c62=0x0;_0x318c62<_0x1272fb[_0x185ff3(0x19b)];_0x318c62++){const _0x127507=_0x1272fb[_0x318c62],_0x156135=m[_0x185ff3(0x1a5)](_0x127507,_0xe21eaa);_0x156135&&_0x1d1edc[_0x185ff3(0x1ba)](_0x156135);}_0x1d1edc[_0x185ff3(0x19b)]>0x0&&(_0x133e43[_0x185ff3(0x1a2)]=_0x1d1edc,_0x295cab[_0x185ff3(0x1ba)](_0x133e43));}return _0x295cab;}[_0x4ce0f9(0x1b1)](_0x5f567d){const _0x206e8a=_0x4ce0f9;return this[_0x206e8a(0x1c9)](_0x5f567d)[_0x206e8a(0x1c2)](g[_0x206e8a(0x1b3)]);}['getSizeUsages'](_0x150f76){const _0x175861=_0x4ce0f9,_0x4b1df6=this[_0x175861(0x1a8)][_0x175861(0x199)](g[_0x175861(0x1ab)]),_0x10b0c1=this[_0x175861(0x19f)]();return _0x4b1df6['updateConfig'](_0x150f76),_0x4b1df6[_0x175861(0x1af)](this[_0x175861(0x1b2)],_0x10b0c1[_0x175861(0x1ad)],_0x10b0c1[_0x175861(0x1ca)],_0x10b0c1[_0x175861(0x1cb)],_0x10b0c1[_0x175861(0x1bb)]);}[_0x4ce0f9(0x1b5)](_0x5e3531){const _0x6c0aee=_0x4ce0f9,_0x474a78=this['getSizeUsages'](_0x5e3531);return this[_0x6c0aee(0x1a8)]['get'](g[_0x6c0aee(0x1ab)])[_0x6c0aee(0x1a4)](_0x474a78);}}f[_0x4ce0f9(0x1b9)][_0x4ce0f9(0x1a3)](S);