@univerjs-pro/docs-formula 1.3.1 → 1.4.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 CHANGED
@@ -1 +1 @@
1
- const _0x3617b1=_0x864f;(function(_0x55025d,_0x252a1a){const _0x424668=_0x864f,_0x15fec7=_0x55025d();while(!![]){try{const _0x36db13=parseInt(_0x424668(0x1d6))/0x1+parseInt(_0x424668(0x1c2))/0x2+parseInt(_0x424668(0x1b7))/0x3*(parseInt(_0x424668(0x1a9))/0x4)+-parseInt(_0x424668(0x1a3))/0x5+parseInt(_0x424668(0x1b2))/0x6+-parseInt(_0x424668(0x19d))/0x7*(parseInt(_0x424668(0x1cf))/0x8)+-parseInt(_0x424668(0x1dc))/0x9;if(_0x36db13===_0x252a1a)break;else _0x15fec7['push'](_0x15fec7['shift']());}catch(_0x478d86){_0x15fec7['push'](_0x15fec7['shift']());}}}(_0x5da3,0xa9e91),Object[_0x3617b1(0x1ac)](exports,Symbol[_0x3617b1(0x1bc)],{'value':_0x3617b1(0x193)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function _0x864f(_0x106c79,_0x3e3d0c){_0x106c79=_0x106c79-0x18a;const _0x5da3b5=_0x5da3();let _0x864f2b=_0x5da3b5[_0x106c79];return _0x864f2b;}function r(_0x329875,_0x3e7810){return function(_0x3eb7ed,_0x228124){_0x3e7810(_0x3eb7ed,_0x228124,_0x329875);};}function i(_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19){const _0x3e8fc1=_0x3617b1;var _0x1aee8c=arguments[_0x3e8fc1(0x1e2)],_0x31b1c3=_0x1aee8c<0x3?_0x1ab442:_0x110c19===null?_0x110c19=Object['getOwnPropertyDescriptor'](_0x1ab442,_0x548fbf):_0x110c19,_0x2ed32f;if(typeof Reflect==_0x3e8fc1(0x192)&&typeof Reflect[_0x3e8fc1(0x1c9)]==_0x3e8fc1(0x19e))_0x31b1c3=Reflect['decorate'](_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19);else{for(var _0x50d1f7=_0x14a0bf[_0x3e8fc1(0x1e2)]-0x1;_0x50d1f7>=0x0;_0x50d1f7--)(_0x2ed32f=_0x14a0bf[_0x50d1f7])&&(_0x31b1c3=(_0x1aee8c<0x3?_0x2ed32f(_0x31b1c3):_0x1aee8c>0x3?_0x2ed32f(_0x1ab442,_0x548fbf,_0x31b1c3):_0x2ed32f(_0x1ab442,_0x548fbf))||_0x31b1c3);}return _0x1aee8c>0x3&&_0x31b1c3&&Object[_0x3e8fc1(0x1ac)](_0x1ab442,_0x548fbf,_0x31b1c3),_0x31b1c3;}let a=class{constructor(_0x16a283,_0xa8f61f,_0x18d708,_0x11d7d3,_0x2dc8b8,_0x59a17c){const _0x5e6fe8=_0x3617b1;this['_unitId']=_0x16a283,this['_rangeId']=_0xa8f61f,this[_0x5e6fe8(0x197)]=_0x18d708,this[_0x5e6fe8(0x1a6)]=_0x11d7d3,this['_service']=_0x2dc8b8,this[_0x5e6fe8(0x1c6)]=_0x59a17c;}['getId'](){const _0x21a1d0=_0x3617b1;return this[_0x21a1d0(0x1cd)];}[_0x3617b1(0x1a8)](){const _0x45f24d=_0x3617b1;let _0x1ce2e7=this[_0x45f24d(0x1d2)]();return _0x1ce2e7?{'endOffset':_0x1ce2e7[_0x45f24d(0x1a2)]+0x1,'rangeId':_0x1ce2e7[_0x45f24d(0x1e0)],'startOffset':_0x1ce2e7[_0x45f24d(0x1c0)]}:null;}['getFormula'](){const _0x363ceb=_0x3617b1;var _0x1da745;return((_0x1da745=this[_0x363ceb(0x1a6)][_0x363ceb(0x1b9)](this['_unitId'],this[_0x363ceb(0x1cd)]))==null?void 0x0:_0x1da745['formula'])??'';}[_0x3617b1(0x1c5)](){const _0xab2613=_0x3617b1;return this[_0xab2613(0x1a6)][_0xab2613(0x1b9)](this['_unitId'],this[_0xab2613(0x1cd)])??null;}['getResult'](){const _0x5ca197=_0x3617b1;return this[_0x5ca197(0x1ab)][_0x5ca197(0x1a7)]({'unitId':this['_unitId'],'rangeId':this[_0x5ca197(0x1cd)]})??null;}[_0x3617b1(0x1df)](){const _0x332b2b=_0x3617b1;let _0x33bba2=this[_0x332b2b(0x1a8)](),_0x170e30=this[_0x332b2b(0x1c5)](),_0xb81b4d=this[_0x332b2b(0x1a7)]();return!_0x33bba2||!_0x170e30||!_0xb81b4d?null:{..._0x33bba2,'config':_0x170e30,'formula':_0x170e30['formula'],'result':_0xb81b4d,'type':_0x332b2b(0x1db)};}['update'](_0x40ec96){const _0x8384c4=_0x3617b1;return this[_0x8384c4(0x197)][_0x8384c4(0x1c8)](e[_0x8384c4(0x1ae)]['id'],{'externalReferences':_0x40ec96['externalReferences'],'formula':_0x40ec96[_0x8384c4(0x1db)],'numberFormat':_0x40ec96[_0x8384c4(0x1ce)],'rangeId':this[_0x8384c4(0x1cd)],'unitId':this[_0x8384c4(0x1a0)]});}[_0x3617b1(0x1ad)](_0x4c516f){const _0x1c4bfd=_0x3617b1;return this[_0x1c4bfd(0x197)]['syncExecuteCommand'](e[_0x1c4bfd(0x1c4)]['id'],{'numberFormat':_0x4c516f,'rangeId':this['_rangeId'],'unitId':this[_0x1c4bfd(0x1a0)]});}[_0x3617b1(0x1b1)](){const _0x379059=_0x3617b1;return this[_0x379059(0x197)][_0x379059(0x1c8)](e[_0x379059(0x199)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x379059(0x1a0)]});}['replaceWithText'](_0x16de30){const _0x49b723=_0x3617b1;return this[_0x49b723(0x197)][_0x49b723(0x1c8)](e[_0x49b723(0x1ca)]['id'],{'rangeId':this[_0x49b723(0x1cd)],'text':_0x16de30,'unitId':this['_unitId']});}[_0x3617b1(0x1d8)](){const _0x42abf4=_0x3617b1;return this[_0x42abf4(0x197)][_0x42abf4(0x1c8)](e[_0x42abf4(0x1d4)]['id'],{'rangeId':this[_0x42abf4(0x1cd)],'unitId':this['_unitId']});}[_0x3617b1(0x1d2)](){const _0x36fc41=_0x3617b1;var _0x101c79;let _0x28681=this[_0x36fc41(0x1c6)][_0x36fc41(0x1b3)](this[_0x36fc41(0x1a0)],t['UniverInstanceType']['UNIVER_DOC']);return _0x28681==null||(_0x101c79=_0x28681[_0x36fc41(0x1d1)]()[_0x36fc41(0x1d5)])==null||(_0x101c79=_0x101c79['customRanges'])==null?void 0x0:_0x101c79[_0x36fc41(0x1be)](_0x150fe9=>_0x150fe9[_0x36fc41(0x1e0)]===this[_0x36fc41(0x1cd)]&&(0x0,e[_0x36fc41(0x1dd)])(_0x150fe9));}};a=i([r(0x2,t[_0x3617b1(0x1aa)]),r(0x3,(0x0,t['Inject'])(e[_0x3617b1(0x1b4)])),r(0x4,(0x0,t[_0x3617b1(0x191)])(e[_0x3617b1(0x19a)])),r(0x5,t[_0x3617b1(0x1d3)])],a);function o(_0x14a26b){'@babel/helpers - typeof';const _0x538487=_0x3617b1;return o=typeof Symbol==_0x538487(0x19e)&&typeof Symbol[_0x538487(0x1af)]==_0x538487(0x190)?function(_0x2c8783){return typeof _0x2c8783;}:function(_0x1e04cc){const _0x5c8584=_0x538487;return _0x1e04cc&&typeof Symbol==_0x5c8584(0x19e)&&_0x1e04cc[_0x5c8584(0x1a4)]===Symbol&&_0x1e04cc!==Symbol[_0x5c8584(0x19c)]?_0x5c8584(0x190):typeof _0x1e04cc;},o(_0x14a26b);}function s(_0x20813e,_0x46d305){const _0x33625a=_0x3617b1;if(o(_0x20813e)!=_0x33625a(0x192)||!_0x20813e)return _0x20813e;var _0x6b3902=_0x20813e[Symbol['toPrimitive']];if(_0x6b3902!==void 0x0){var _0x35f7a8=_0x6b3902['call'](_0x20813e,_0x46d305||_0x33625a(0x1b6));if(o(_0x35f7a8)!=_0x33625a(0x192))return _0x35f7a8;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x46d305===_0x33625a(0x1ba)?String:Number)(_0x20813e);}function c(_0x11762f){const _0x2dc5d5=_0x3617b1;var _0x2cae8e=s(_0x11762f,'string');return o(_0x2cae8e)==_0x2dc5d5(0x190)?_0x2cae8e:_0x2cae8e+'';}function l(_0x2c248e,_0x535a47,_0x5be253){const _0x2ad50f=_0x3617b1;return(_0x535a47=c(_0x535a47))in _0x2c248e?Object[_0x2ad50f(0x1ac)](_0x2c248e,_0x535a47,{'value':_0x5be253,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2c248e[_0x535a47]=_0x5be253,_0x2c248e;}var u=class extends n[_0x3617b1(0x1bf)]{constructor(..._0x2f585c){const _0x57eba2=_0x3617b1;super(..._0x2f585c),l(this,_0x57eba2(0x196),void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x3617b1(0x198)](_0x44bb84){const _0x40c20d=_0x3617b1;this[_0x40c20d(0x196)]=_0x44bb84['get'](t['ICommandService']),this['_docsFormulaDisplayTextService']=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1e3)]),this[_0x40c20d(0x1a5)]=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1b4)]),this[_0x40c20d(0x1a1)]=_0x44bb84[_0x40c20d(0x1da)](t['IResourceLoaderService']);}[_0x3617b1(0x19f)](){const _0x33a947=_0x3617b1;return this[_0x33a947(0x1bb)]()[_0x33a947(0x1e1)](_0x59a18f=>this[_0x33a947(0x18f)](_0x59a18f[_0x33a947(0x1e0)]));}[_0x3617b1(0x1b9)](_0x5a11cf){const _0xef22f1=_0x3617b1;return this[_0xef22f1(0x1bb)]()[_0xef22f1(0x1e5)](_0x4e53f3=>_0x4e53f3['rangeId']===_0x5a11cf)?this[_0xef22f1(0x18f)](_0x5a11cf):null;}['getFormulaAt'](_0x1020d9){const _0x9928a2=_0x3617b1;let _0x4ffa4e=this[_0x9928a2(0x1bb)]()['find'](_0x524f67=>_0x524f67['startIndex']<=_0x1020d9&&_0x1020d9<=_0x524f67[_0x9928a2(0x1a2)]);return _0x4ffa4e?this[_0x9928a2(0x18f)](_0x4ffa4e[_0x9928a2(0x1e0)]):null;}['saveFormulaDisplayTextSnapshot'](){const _0x3d3dc8=_0x3617b1;let _0x2ca50f=this[_0x3d3dc8(0x1a1)]['saveUnit'](this['id']);if(!_0x2ca50f)throw Error(_0x3d3dc8(0x1e4)+this['id']+_0x3d3dc8(0x18c));return this[_0x3d3dc8(0x18d)][_0x3d3dc8(0x1de)](_0x2ca50f);}['insertFormula'](_0x9c0d42){const _0x3f69c4=_0x3617b1;return this[_0x3f69c4(0x1d0)]({'externalReferences':_0x9c0d42['externalReferences'],'formula':_0x9c0d42[_0x3f69c4(0x1db)],'numberFormat':_0x9c0d42[_0x3f69c4(0x1ce)],'target':{'type':'range','startOffset':_0x9c0d42['startOffset'],'endOffset':_0x9c0d42[_0x3f69c4(0x1cc)]},'unitId':this[_0x3f69c4(0x1c7)]()});}[_0x3617b1(0x1d0)](_0x329841){const _0x37017e=_0x3617b1;let _0x2a9d70=this[_0x37017e(0x196)]['syncExecuteCommand'](e[_0x37017e(0x1c3)]['id'],_0x329841);return _0x2a9d70?this[_0x37017e(0x18f)](_0x2a9d70['rangeId']):null;}[_0x3617b1(0x1bb)](){const _0x4cb166=_0x3617b1;var _0x30c8b2;let _0x3e5f71=this['_docsFormulaModel'][_0x4cb166(0x19f)](this[_0x4cb166(0x1c7)]());return((_0x30c8b2=this[_0x4cb166(0x1b5)]('')['customRanges'])==null?void 0x0:_0x30c8b2[_0x4cb166(0x1b8)](_0x3902c2=>(0x0,e[_0x4cb166(0x1dd)])(_0x3902c2)&&_0x3e5f71[_0x3902c2['rangeId']]!=null))??[];}[_0x3617b1(0x18f)](_0x252c95){const _0xcd600a=_0x3617b1;return this[_0xcd600a(0x1c1)][_0xcd600a(0x1cb)](a,this[_0xcd600a(0x1c7)](),_0x252c95);}};n[_0x3617b1(0x1bf)][_0x3617b1(0x1b0)](u);var d=class extends n[_0x3617b1(0x18e)]{constructor(..._0x57a73f){const _0x5b3d85=_0x3617b1;super(..._0x57a73f),l(this,_0x5b3d85(0x196),void 0x0);}[_0x3617b1(0x198)](_0x208a65){const _0x24749d=_0x3617b1;this[_0x24749d(0x196)]=_0x208a65[_0x24749d(0x1da)](t[_0x24749d(0x1aa)]);}[_0x3617b1(0x1bd)](_0x5a1269,_0x5030e6,_0x2deb8e={}){const _0x1ae5b9=_0x3617b1;return this[_0x1ae5b9(0x1d0)](_0x5a1269,_0x5030e6,_0x2deb8e);}[_0x3617b1(0x195)](_0x2aa429,_0x5f1748={}){const _0x154e68=_0x3617b1;return this[_0x154e68(0x1d0)](_0x154e68(0x1d9),_0x2aa429,_0x5f1748);}[_0x3617b1(0x1d0)](_0xbcf0b8,_0x1064f1,_0x2af73a){const _0xc88842=_0x3617b1;if(this[_0xc88842(0x194)]())return null;let _0xb6b11a={'externalReferences':_0x2af73a[_0xc88842(0x18b)],'formula':_0x1064f1,'numberFormat':_0x2af73a['numberFormat'],'target':{'type':'paragraph','paragraphId':this[_0xc88842(0x1c7)](),'position':_0xbcf0b8},'unitId':this['_document'][_0xc88842(0x1c7)]()},_0x263918=this[_0xc88842(0x196)][_0xc88842(0x1c8)](e[_0xc88842(0x1c3)]['id'],_0xb6b11a);return _0x263918?this['_injector'][_0xc88842(0x1cb)](a,this[_0xc88842(0x1d7)]['getId'](),_0x263918[_0xc88842(0x1e0)]):null;}};n[_0x3617b1(0x18e)][_0x3617b1(0x1b0)](d);var f=class extends n[_0x3617b1(0x19b)]{constructor(..._0xcf07ac){super(..._0xcf07ac),l(this,'_docsFormulaCommandService',void 0x0);}[_0x3617b1(0x198)](_0x1f3680){const _0x3995b1=_0x3617b1;this[_0x3995b1(0x196)]=_0x1f3680[_0x3995b1(0x1da)](t[_0x3995b1(0x1aa)]);}[_0x3617b1(0x18a)](_0x28dea5,_0x514ddb={}){const _0x30535a=_0x3617b1;let {endOffset:_0x268b7f,segmentId:_0x21945e,startOffset:_0x15b996}=this[_0x30535a(0x1a8)]();return _0x21945e?null:this['_insert'](_0x15b996,_0x268b7f,_0x28dea5,_0x514ddb);}[_0x3617b1(0x1d0)](_0x5a3526,_0x433ba6,_0x33aff0,_0x1044ce){const _0x1d44e8=_0x3617b1;let _0x57a768={'externalReferences':_0x1044ce[_0x1d44e8(0x18b)],'formula':_0x33aff0,'numberFormat':_0x1044ce[_0x1d44e8(0x1ce)],'target':{'type':'range','startOffset':_0x5a3526,'endOffset':_0x433ba6},'unitId':this['_document'][_0x1d44e8(0x1c7)]()},_0x358b98=this[_0x1d44e8(0x196)][_0x1d44e8(0x1c8)](e[_0x1d44e8(0x1c3)]['id'],_0x57a768);return _0x358b98?this[_0x1d44e8(0x1c1)][_0x1d44e8(0x1cb)](a,this[_0x1d44e8(0x1d7)][_0x1d44e8(0x1c7)](),_0x358b98[_0x1d44e8(0x1e0)]):null;}};function _0x5da3(){const _0x48a75b=['_getCustomRange','IUniverInstanceService','ConvertDocFormulaToTextCommand','body','764458oFuijQ','_document','convertToText','end','get','formula','9921537mODWpM','isDocFormulaRange','degradeDocumentData','describe','rangeId','map','length','DocFormulaDisplayTextService','Document\x20','some','replaceWithFormula','externalReferences','\x20could\x20not\x20be\x20serialized.','_docsFormulaDisplayTextService','FDocumentParagraph','_createFormula','symbol','Inject','object','Module','getSegmentId','appendFormula','_docsFormulaCommandService','_commandService','_initialize','RemoveDocFormulaCommand','DocFormulaService','FDocumentTextRange','prototype','228557FMKfXb','function','getFormulas','_unitId','_docsFormulaResourceLoaderService','endIndex','4326880HIWirr','constructor','_docsFormulaModel','_model','getResult','getRange','427436NTEYzw','ICommandService','_service','defineProperty','setNumberFormat','UpdateDocFormulaCommand','iterator','extend','remove','7218504pukdhv','getUnit','DocFormulaModel','getBody','default','30oAaGHV','filter','getFormula','string','_getCompleteRanges','toStringTag','insertFormula','find','FDocument','startIndex','_injector','365314MmXufg','InsertDocFormulaCommand','SetDocFormulaNumberFormatCommand','getConfig','_univerInstanceService','getId','syncExecuteCommand','decorate','ReplaceDocFormulaWithTextCommand','createInstance','endOffset','_rangeId','numberFormat','136aQsIZx','_insert','getSnapshot'];_0x5da3=function(){return _0x48a75b;};return _0x5da3();}n[_0x3617b1(0x19b)][_0x3617b1(0x1b0)](f),Object[_0x3617b1(0x1ac)](exports,'FDocumentFormula',{'enumerable':!0x0,'get':function(){return a;}});
1
+ const _0x4643a2=_0x2369;(function(_0x2f2c25,_0x271c15){const _0x2632d0=_0x2369,_0x4750ee=_0x2f2c25();while(!![]){try{const _0x83fef2=parseInt(_0x2632d0(0xad))/0x1*(-parseInt(_0x2632d0(0xe6))/0x2)+parseInt(_0x2632d0(0xd8))/0x3+-parseInt(_0x2632d0(0xe1))/0x4*(parseInt(_0x2632d0(0xc3))/0x5)+-parseInt(_0x2632d0(0xdb))/0x6*(-parseInt(_0x2632d0(0xb8))/0x7)+parseInt(_0x2632d0(0xd9))/0x8*(-parseInt(_0x2632d0(0x100))/0x9)+-parseInt(_0x2632d0(0xfe))/0xa*(-parseInt(_0x2632d0(0xfc))/0xb)+parseInt(_0x2632d0(0xc7))/0xc;if(_0x83fef2===_0x271c15)break;else _0x4750ee['push'](_0x4750ee['shift']());}catch(_0x1b74d5){_0x4750ee['push'](_0x4750ee['shift']());}}}(_0x595f,0xe5457),Object[_0x4643a2(0xe4)](exports,Symbol[_0x4643a2(0xde)],{'value':_0x4643a2(0xb3)}));function _0x595f(){const _0x29b753=['_insert','_commandService','rangeId','\x20could\x20not\x20be\x20serialized.','map','getResult','IUniverInstanceService','find','_service','2279010PsPsDc','3002272oAxXhu','IResourceLoaderService','996CQvtZj','formula','decorate','toStringTag','_docsFormulaModel','_rangeId','6917840jxTYeD','DocFormulaModel','paragraph','defineProperty','endIndex','3103602PTfeVt','convertToText','_createFormula','ICommandService','replaceWithFormula','length','getRange','startIndex','getSnapshot','startOffset','symbol','_unitId','_univerInstanceService','endOffset','isDocFormulaRange','get','getFormula','end','_injector','UpdateDocFormulaCommand','_document','_initialize','11ENNiQj','FDocumentFormula','7829450thhEOA','getFormulas','18lsbfPk','default','iterator','FDocument','customRanges','_getCustomRange','_docsFormulaResourceLoaderService','_docsFormulaCommandService','function','saveUnit','getConfig','DocFormulaService','remove','numberFormat','constructor','1HOkWrj','saveFormulaDisplayTextSnapshot','DocFormulaDisplayTextService','getSegmentId','SetDocFormulaNumberFormatCommand','range','Module','Inject','insertFormula','object','FDocumentTextRange','76937suvEyr','FDocumentParagraph','externalReferences','getId','UNIVER_DOC','call','ReplaceDocFormulaWithTextCommand','createInstance','RemoveDocFormulaCommand','getFormulaAt','_docsFormulaDisplayTextService','5LmJbLR','string','_getCompleteRanges','getOwnPropertyDescriptor','19245636RzfKlg','_model','describe','syncExecuteCommand','UniverInstanceType','extend','degradeDocumentData','InsertDocFormulaCommand'];_0x595f=function(){return _0x29b753;};return _0x595f();}let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x5c8156,_0x123349){return function(_0x2dbfb2,_0x135729){_0x123349(_0x2dbfb2,_0x135729,_0x5c8156);};}function i(_0x15574c,_0x5155b3,_0x3eacd5,_0x58b042){const _0x329cde=_0x4643a2;var _0x114ff0=arguments[_0x329cde(0xeb)],_0x20b1e4=_0x114ff0<0x3?_0x5155b3:_0x58b042===null?_0x58b042=Object[_0x329cde(0xc6)](_0x5155b3,_0x3eacd5):_0x58b042,_0x1a3f9f;if(typeof Reflect==_0x329cde(0xb6)&&typeof Reflect[_0x329cde(0xdd)]==_0x329cde(0xa6))_0x20b1e4=Reflect[_0x329cde(0xdd)](_0x15574c,_0x5155b3,_0x3eacd5,_0x58b042);else{for(var _0x559fbe=_0x15574c['length']-0x1;_0x559fbe>=0x0;_0x559fbe--)(_0x1a3f9f=_0x15574c[_0x559fbe])&&(_0x20b1e4=(_0x114ff0<0x3?_0x1a3f9f(_0x20b1e4):_0x114ff0>0x3?_0x1a3f9f(_0x5155b3,_0x3eacd5,_0x20b1e4):_0x1a3f9f(_0x5155b3,_0x3eacd5))||_0x20b1e4);}return _0x114ff0>0x3&&_0x20b1e4&&Object[_0x329cde(0xe4)](_0x5155b3,_0x3eacd5,_0x20b1e4),_0x20b1e4;}let a=class{constructor(_0x3f53d6,_0x1843cf,_0x54890e,_0x58428a,_0x2bec04,_0x103c8f){const _0x35b52d=_0x4643a2;this[_0x35b52d(0xf1)]=_0x3f53d6,this[_0x35b52d(0xe0)]=_0x1843cf,this[_0x35b52d(0xd0)]=_0x54890e,this[_0x35b52d(0xc8)]=_0x58428a,this[_0x35b52d(0xd7)]=_0x2bec04,this[_0x35b52d(0xf2)]=_0x103c8f;}[_0x4643a2(0xbb)](){return this['_rangeId'];}['getRange'](){const _0x2e9bef=_0x4643a2;let _0x15286=this[_0x2e9bef(0x105)]();return _0x15286?{'endOffset':_0x15286['endIndex']+0x1,'rangeId':_0x15286['rangeId'],'startOffset':_0x15286[_0x2e9bef(0xed)]}:null;}[_0x4643a2(0xf6)](){const _0x7822a=_0x4643a2;var _0x39c604;return((_0x39c604=this['_model']['getFormula'](this['_unitId'],this[_0x7822a(0xe0)]))==null?void 0x0:_0x39c604[_0x7822a(0xdc)])??'';}[_0x4643a2(0xa8)](){const _0x2ee095=_0x4643a2;return this['_model']['getFormula'](this[_0x2ee095(0xf1)],this[_0x2ee095(0xe0)])??null;}[_0x4643a2(0xd4)](){const _0x371527=_0x4643a2;return this[_0x371527(0xd7)]['getResult']({'unitId':this[_0x371527(0xf1)],'rangeId':this[_0x371527(0xe0)]})??null;}[_0x4643a2(0xc9)](){const _0x3b59d6=_0x4643a2;let _0x2f2243=this[_0x3b59d6(0xec)](),_0x5ebf70=this[_0x3b59d6(0xa8)](),_0x25ab31=this[_0x3b59d6(0xd4)]();return!_0x2f2243||!_0x5ebf70||!_0x25ab31?null:{..._0x2f2243,'config':_0x5ebf70,'formula':_0x5ebf70[_0x3b59d6(0xdc)],'result':_0x25ab31,'type':_0x3b59d6(0xdc)};}['update'](_0x12810c){const _0x1833b4=_0x4643a2;return this[_0x1833b4(0xd0)][_0x1833b4(0xca)](e[_0x1833b4(0xf9)]['id'],{'externalReferences':_0x12810c['externalReferences'],'formula':_0x12810c[_0x1833b4(0xdc)],'numberFormat':_0x12810c[_0x1833b4(0xab)],'rangeId':this['_rangeId'],'unitId':this[_0x1833b4(0xf1)]});}['setNumberFormat'](_0xabf427){const _0x5c2999=_0x4643a2;return this['_commandService'][_0x5c2999(0xca)](e[_0x5c2999(0xb1)]['id'],{'numberFormat':_0xabf427,'rangeId':this[_0x5c2999(0xe0)],'unitId':this[_0x5c2999(0xf1)]});}[_0x4643a2(0xaa)](){const _0x3630a6=_0x4643a2;return this[_0x3630a6(0xd0)][_0x3630a6(0xca)](e[_0x3630a6(0xc0)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x3630a6(0xf1)]});}['replaceWithText'](_0x1fece7){const _0x5db265=_0x4643a2;return this[_0x5db265(0xd0)][_0x5db265(0xca)](e[_0x5db265(0xbe)]['id'],{'rangeId':this[_0x5db265(0xe0)],'text':_0x1fece7,'unitId':this[_0x5db265(0xf1)]});}[_0x4643a2(0xe7)](){const _0x383cb5=_0x4643a2;return this['_commandService'][_0x383cb5(0xca)](e['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this[_0x383cb5(0xe0)],'unitId':this[_0x383cb5(0xf1)]});}[_0x4643a2(0x105)](){const _0x22c819=_0x4643a2;var _0x5aebb1;let _0x5efe4f=this[_0x22c819(0xf2)]['getUnit'](this[_0x22c819(0xf1)],t[_0x22c819(0xcb)][_0x22c819(0xbc)]);return _0x5efe4f==null||(_0x5aebb1=_0x5efe4f[_0x22c819(0xee)]()['body'])==null||(_0x5aebb1=_0x5aebb1[_0x22c819(0x104)])==null?void 0x0:_0x5aebb1['find'](_0x1d349c=>_0x1d349c['rangeId']===this[_0x22c819(0xe0)]&&(0x0,e[_0x22c819(0xf4)])(_0x1d349c));}};a=i([r(0x2,t[_0x4643a2(0xe9)]),r(0x3,(0x0,t[_0x4643a2(0xb4)])(e[_0x4643a2(0xe2)])),r(0x4,(0x0,t[_0x4643a2(0xb4)])(e[_0x4643a2(0xa9)])),r(0x5,t[_0x4643a2(0xd5)])],a);function o(_0x49cfc1){'@babel/helpers - typeof';const _0x7b7d74=_0x4643a2;return o=typeof Symbol==_0x7b7d74(0xa6)&&typeof Symbol[_0x7b7d74(0x102)]==_0x7b7d74(0xf0)?function(_0x5d298a){return typeof _0x5d298a;}:function(_0xf3aa7c){const _0x4c1284=_0x7b7d74;return _0xf3aa7c&&typeof Symbol==_0x4c1284(0xa6)&&_0xf3aa7c[_0x4c1284(0xac)]===Symbol&&_0xf3aa7c!==Symbol['prototype']?'symbol':typeof _0xf3aa7c;},o(_0x49cfc1);}function s(_0x1022a,_0x38d43d){const _0x13adb7=_0x4643a2;if(o(_0x1022a)!='object'||!_0x1022a)return _0x1022a;var _0x489a97=_0x1022a[Symbol['toPrimitive']];if(_0x489a97!==void 0x0){var _0x3d2700=_0x489a97[_0x13adb7(0xbd)](_0x1022a,_0x38d43d||_0x13adb7(0x101));if(o(_0x3d2700)!=_0x13adb7(0xb6))return _0x3d2700;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x38d43d===_0x13adb7(0xc4)?String:Number)(_0x1022a);}function c(_0x39bfe0){const _0x170c06=_0x4643a2;var _0x587f3e=s(_0x39bfe0,'string');return o(_0x587f3e)==_0x170c06(0xf0)?_0x587f3e:_0x587f3e+'';}function l(_0x43135a,_0x2bb039,_0x283fed){const _0x57370f=_0x4643a2;return(_0x2bb039=c(_0x2bb039))in _0x43135a?Object[_0x57370f(0xe4)](_0x43135a,_0x2bb039,{'value':_0x283fed,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43135a[_0x2bb039]=_0x283fed,_0x43135a;}var u=class extends n['FDocument']{constructor(..._0x1d9a5a){const _0x52fc85=_0x4643a2;super(..._0x1d9a5a),l(this,_0x52fc85(0x107),void 0x0),l(this,_0x52fc85(0xc2),void 0x0),l(this,_0x52fc85(0xdf),void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x4643a2(0xfb)](_0x3e12cb){const _0x29cecd=_0x4643a2;this[_0x29cecd(0x107)]=_0x3e12cb[_0x29cecd(0xf5)](t[_0x29cecd(0xe9)]),this[_0x29cecd(0xc2)]=_0x3e12cb[_0x29cecd(0xf5)](e[_0x29cecd(0xaf)]),this[_0x29cecd(0xdf)]=_0x3e12cb[_0x29cecd(0xf5)](e['DocFormulaModel']),this[_0x29cecd(0x106)]=_0x3e12cb[_0x29cecd(0xf5)](t[_0x29cecd(0xda)]);}[_0x4643a2(0xff)](){const _0x1b456d=_0x4643a2;return this[_0x1b456d(0xc5)]()[_0x1b456d(0xd3)](_0x2a10da=>this[_0x1b456d(0xe8)](_0x2a10da[_0x1b456d(0xd1)]));}['getFormula'](_0x272930){const _0x4366d8=_0x4643a2;return this[_0x4366d8(0xc5)]()['some'](_0x33cb8f=>_0x33cb8f['rangeId']===_0x272930)?this['_createFormula'](_0x272930):null;}[_0x4643a2(0xc1)](_0x217e08){const _0x878192=_0x4643a2;let _0x460d57=this[_0x878192(0xc5)]()[_0x878192(0xd6)](_0x88dc79=>_0x88dc79['startIndex']<=_0x217e08&&_0x217e08<=_0x88dc79[_0x878192(0xe5)]);return _0x460d57?this['_createFormula'](_0x460d57[_0x878192(0xd1)]):null;}[_0x4643a2(0xae)](){const _0x3d2590=_0x4643a2;let _0x474044=this[_0x3d2590(0x106)][_0x3d2590(0xa7)](this['id']);if(!_0x474044)throw Error('Document\x20'+this['id']+_0x3d2590(0xd2));return this[_0x3d2590(0xc2)][_0x3d2590(0xcd)](_0x474044);}[_0x4643a2(0xb5)](_0x1c0c63){const _0x1e3088=_0x4643a2;return this[_0x1e3088(0xcf)]({'externalReferences':_0x1c0c63[_0x1e3088(0xba)],'formula':_0x1c0c63[_0x1e3088(0xdc)],'numberFormat':_0x1c0c63[_0x1e3088(0xab)],'target':{'type':'range','startOffset':_0x1c0c63[_0x1e3088(0xef)],'endOffset':_0x1c0c63[_0x1e3088(0xf3)]},'unitId':this[_0x1e3088(0xbb)]()});}[_0x4643a2(0xcf)](_0x204fcc){const _0x4dd2f3=_0x4643a2;let _0x1cfbc9=this[_0x4dd2f3(0x107)][_0x4dd2f3(0xca)](e['InsertDocFormulaCommand']['id'],_0x204fcc);return _0x1cfbc9?this[_0x4dd2f3(0xe8)](_0x1cfbc9[_0x4dd2f3(0xd1)]):null;}[_0x4643a2(0xc5)](){const _0x4026c9=_0x4643a2;var _0x57adcb;let _0x45e907=this[_0x4026c9(0xdf)]['getFormulas'](this[_0x4026c9(0xbb)]());return((_0x57adcb=this['getBody']('')[_0x4026c9(0x104)])==null?void 0x0:_0x57adcb['filter'](_0x2c06b2=>(0x0,e[_0x4026c9(0xf4)])(_0x2c06b2)&&_0x45e907[_0x2c06b2['rangeId']]!=null))??[];}[_0x4643a2(0xe8)](_0x58d520){const _0x3d2424=_0x4643a2;return this[_0x3d2424(0xf8)][_0x3d2424(0xbf)](a,this[_0x3d2424(0xbb)](),_0x58d520);}};n[_0x4643a2(0x103)]['extend'](u);function _0x2369(_0x3e6191,_0x3a67b5){_0x3e6191=_0x3e6191-0xa6;const _0x595fc8=_0x595f();let _0x2369f3=_0x595fc8[_0x3e6191];return _0x2369f3;}var d=class extends n[_0x4643a2(0xb9)]{constructor(..._0x5edfc4){super(..._0x5edfc4),l(this,'_docsFormulaCommandService',void 0x0);}['_initialize'](_0x3eefb9){const _0x19089c=_0x4643a2;this[_0x19089c(0x107)]=_0x3eefb9[_0x19089c(0xf5)](t[_0x19089c(0xe9)]);}[_0x4643a2(0xb5)](_0x4b3638,_0x3f14a9,_0x256c39={}){const _0x45dbfc=_0x4643a2;return this[_0x45dbfc(0xcf)](_0x4b3638,_0x3f14a9,_0x256c39);}['appendFormula'](_0x3508d6,_0x2a0613={}){const _0x5a3145=_0x4643a2;return this[_0x5a3145(0xcf)](_0x5a3145(0xf7),_0x3508d6,_0x2a0613);}[_0x4643a2(0xcf)](_0x52b236,_0x49b965,_0x18d09d){const _0x386658=_0x4643a2;if(this[_0x386658(0xb0)]())return null;let _0x386a99={'externalReferences':_0x18d09d[_0x386658(0xba)],'formula':_0x49b965,'numberFormat':_0x18d09d[_0x386658(0xab)],'target':{'type':_0x386658(0xe3),'paragraphId':this[_0x386658(0xbb)](),'position':_0x52b236},'unitId':this[_0x386658(0xfa)][_0x386658(0xbb)]()},_0x2c0df1=this[_0x386658(0x107)][_0x386658(0xca)](e[_0x386658(0xce)]['id'],_0x386a99);return _0x2c0df1?this[_0x386658(0xf8)][_0x386658(0xbf)](a,this[_0x386658(0xfa)][_0x386658(0xbb)](),_0x2c0df1[_0x386658(0xd1)]):null;}};n[_0x4643a2(0xb9)][_0x4643a2(0xcc)](d);var f=class extends n['FDocumentTextRange']{constructor(..._0x247ded){const _0x11b153=_0x4643a2;super(..._0x247ded),l(this,_0x11b153(0x107),void 0x0);}[_0x4643a2(0xfb)](_0x632d20){const _0x40dd4e=_0x4643a2;this[_0x40dd4e(0x107)]=_0x632d20['get'](t[_0x40dd4e(0xe9)]);}[_0x4643a2(0xea)](_0x3634c5,_0x2064cf={}){const _0x5d271e=_0x4643a2;let {endOffset:_0x2d8c82,segmentId:_0x34740d,startOffset:_0x120a0a}=this['getRange']();return _0x34740d?null:this[_0x5d271e(0xcf)](_0x120a0a,_0x2d8c82,_0x3634c5,_0x2064cf);}[_0x4643a2(0xcf)](_0xa7be89,_0x3c3024,_0x387c7b,_0x47a8f4){const _0x2e98fe=_0x4643a2;let _0x44cf71={'externalReferences':_0x47a8f4[_0x2e98fe(0xba)],'formula':_0x387c7b,'numberFormat':_0x47a8f4[_0x2e98fe(0xab)],'target':{'type':_0x2e98fe(0xb2),'startOffset':_0xa7be89,'endOffset':_0x3c3024},'unitId':this[_0x2e98fe(0xfa)][_0x2e98fe(0xbb)]()},_0x22a96d=this['_docsFormulaCommandService'][_0x2e98fe(0xca)](e[_0x2e98fe(0xce)]['id'],_0x44cf71);return _0x22a96d?this['_injector'][_0x2e98fe(0xbf)](a,this[_0x2e98fe(0xfa)]['getId'](),_0x22a96d[_0x2e98fe(0xd1)]):null;}};n[_0x4643a2(0xb7)][_0x4643a2(0xcc)](f),Object['defineProperty'](exports,_0x4643a2(0xfd),{'enumerable':!0x0,'get':function(){return a;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4136c9=_0x44d8;(function(_0x3e5984,_0x38f9f5){const _0x22882d=_0x44d8,_0x14de2f=_0x3e5984();while(!![]){try{const _0x1d7ed1=parseInt(_0x22882d(0x10f))/0x1*(-parseInt(_0x22882d(0x184))/0x2)+parseInt(_0x22882d(0x1b6))/0x3+parseInt(_0x22882d(0x12d))/0x4*(-parseInt(_0x22882d(0x1b2))/0x5)+parseInt(_0x22882d(0x17a))/0x6+parseInt(_0x22882d(0x22d))/0x7+-parseInt(_0x22882d(0x15b))/0x8+parseInt(_0x22882d(0x158))/0x9;if(_0x1d7ed1===_0x38f9f5)break;else _0x14de2f['push'](_0x14de2f['shift']());}catch(_0x501898){_0x14de2f['push'](_0x14de2f['shift']());}}}(_0xa4cb,0xc8069),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4136c9(0x119)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0x4136c9(0x116),s=_0x4136c9(0x111);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x48aa19){const _0x431d20=_0x4136c9;return!_0x48aa19||typeof _0x48aa19!='object'||!f(_0x48aa19,['schemaVersion','formulas'])||!('schemaVersion'in _0x48aa19)||_0x48aa19[_0x431d20(0x13f)]!==0x1||!(_0x431d20(0x1e2)in _0x48aa19)||!_0x48aa19[_0x431d20(0x1e2)]||typeof _0x48aa19['formulas']!=_0x431d20(0x217)||Array[_0x431d20(0x139)](_0x48aa19[_0x431d20(0x1e2)])?!0x1:Object[_0x431d20(0x176)](_0x48aa19[_0x431d20(0x1e2)])[_0x431d20(0x123)](([_0x2c0f29,_0x1f87e2])=>_0x2c0f29[_0x431d20(0x13a)]>0x0&&u(_0x1f87e2));}function u(_0x4722b4){const _0x161dbb=_0x4136c9;return!_0x4722b4||typeof _0x4722b4!='object'||!f(_0x4722b4,[_0x161dbb(0x220),_0x161dbb(0x20b),_0x161dbb(0x145)])||!('formula'in _0x4722b4)||typeof _0x4722b4[_0x161dbb(0x220)]!='string'||!_0x4722b4['formula']['trim']()||'numberFormat'in _0x4722b4&&_0x4722b4[_0x161dbb(0x20b)]!=null&&(typeof _0x4722b4[_0x161dbb(0x20b)]!=_0x161dbb(0x217)||!f(_0x4722b4[_0x161dbb(0x20b)],[_0x161dbb(0x168)])||!(_0x161dbb(0x168)in _0x4722b4[_0x161dbb(0x20b)])||typeof _0x4722b4[_0x161dbb(0x20b)][_0x161dbb(0x168)]!=_0x161dbb(0x122))?!0x1:!(_0x161dbb(0x145)in _0x4722b4)||_0x4722b4[_0x161dbb(0x145)]==null||d(_0x4722b4[_0x161dbb(0x145)]);}function d(_0x2d63d3){const _0x2a56ff=_0x4136c9;return!_0x2d63d3||typeof _0x2d63d3!='object'||!f(_0x2d63d3,['v','t',_0x2a56ff(0x168)])||!('v'in _0x2d63d3)||_0x2d63d3['v']!==null&&typeof _0x2d63d3['v']!=_0x2a56ff(0x122)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x12e)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x199)||'t'in _0x2d63d3&&_0x2d63d3['t']!=null&&!ee(_0x2d63d3['t'])?!0x1:!('pattern'in _0x2d63d3)||_0x2d63d3[_0x2a56ff(0x168)]==null||typeof _0x2d63d3[_0x2a56ff(0x168)]==_0x2a56ff(0x122);}function f(_0x1db214,_0x5a53b7){const _0x1d578f=_0x4136c9;let _0x42d851=new Set(_0x5a53b7);return Object['keys'](_0x1db214)[_0x1d578f(0x123)](_0x5e5070=>_0x42d851[_0x1d578f(0x156)](_0x5e5070));}function ee(_0x205d1f){const _0x1df62a=_0x4136c9;return typeof _0x205d1f==_0x1df62a(0x12e)&&Object[_0x1df62a(0x14d)](t[_0x1df62a(0x204)])['includes'](_0x205d1f);}const p=new Set([t[_0x4136c9(0x1a8)][_0x4136c9(0x104)],t[_0x4136c9(0x1a8)][_0x4136c9(0x142)],t[_0x4136c9(0x1a8)][_0x4136c9(0x170)],t[_0x4136c9(0x1a8)][_0x4136c9(0x130)],t[_0x4136c9(0x1a8)]['TABLE_CELL_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x140)],t['DataStreamTreeTokenType'][_0x4136c9(0x102)],t['DataStreamTreeTokenType'][_0x4136c9(0x18a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x214)],t[_0x4136c9(0x1a8)][_0x4136c9(0xf6)],t['DataStreamTreeTokenType']['COLUMN_GROUP_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x118)],t['DataStreamTreeTokenType'][_0x4136c9(0x10a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x1b0)]]);var m=class extends Error{constructor(){const _0x20dd4a=_0x4136c9;super(_0x20dd4a(0x162));}};function te(_0x4f3603){const _0x1d859d=_0x4136c9;var _0x4ff60d,_0x123cf3;let _0x2230c7=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603[_0x1d859d(0x1bd)]),_0x184c70=T(_0x2230c7),{startOffset:_0x532163,endOffset:_0x18bce5}=oe(_0x184c70,_0x4f3603[_0x1d859d(0x16f)],_0x4f3603['endOffset']);ie(_0x184c70,_0x532163,_0x18bce5);let _0x429675=((_0x4ff60d=_0x184c70['customRanges'])==null?void 0x0:_0x4ff60d[_0x1d859d(0x1e1)](_0x2593cc=>{const _0x283782=_0x1d859d;if(!g(_0x2593cc))return!0x1;let _0x32963b=(0x0,t[_0x283782(0x1d7)])(_0x2593cc);return _0x32963b[_0x283782(0x22e)]>_0x532163&&_0x32963b['startOffset']<_0x18bce5;})['map'](_0x386667=>_0x386667['rangeId']))??[];ce(_0x184c70,_0x532163,_0x18bce5,''),_0x184c70[_0x1d859d(0x103)]=[...((_0x123cf3=_0x184c70[_0x1d859d(0x103)])==null?void 0x0:_0x123cf3['filter'](_0x145b56=>!_0x429675[_0x1d859d(0x18d)](_0x145b56[_0x1d859d(0xf3)])&&_0x145b56[_0x1d859d(0xf3)]!==_0x4f3603[_0x1d859d(0xf3)]))??[],ae(_0x4f3603[_0x1d859d(0xf3)],_0x532163)][_0x1d859d(0x1e4)]((_0xe409bd,_0x7049ad)=>_0xe409bd[_0x1d859d(0x1fe)]-_0x7049ad['startIndex']);let _0x29776a=v(_0x4f3603[_0x1d859d(0x148)]);return _0x429675['forEach'](_0x265f99=>{const _0x462d16=_0x1d859d;delete _0x29776a[_0x462d16(0x1e2)][_0x265f99];}),_0x29776a[_0x1d859d(0x1e2)][_0x4f3603[_0x1d859d(0xf3)]]=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603['config']),{'nextDocumentData':_0x2230c7,'nextResource':_0x29776a,'cursorOffset':_0x532163+0x1};}function ne(_0x7771c7){const _0x18145c=_0x4136c9;var _0x4a619e,_0x401c8a;let _0x787051=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1bd)]),_0x27618b=(_0x4a619e=T(_0x787051)['customRanges'])==null?void 0x0:_0x4a619e[_0x18145c(0x124)](_0x5beaa8=>_0x5beaa8[_0x18145c(0xf3)]===_0x7771c7[_0x18145c(0xf3)]&&g(_0x5beaa8));if(!_0x27618b||!((_0x401c8a=_0x7771c7[_0x18145c(0x148)])!=null&&_0x401c8a[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]))return null;let _0x1813e7=v(_0x7771c7[_0x18145c(0x148)]);return _0x1813e7[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1ab)]),{'nextDocumentData':_0x787051,'nextResource':_0x1813e7,'cursorOffset':_0x27618b['endIndex']+0x1};}function h(_0x171fa9){const _0x23d607=_0x4136c9;let _0x182109=t['Tools'][_0x23d607(0x187)](_0x171fa9[_0x23d607(0x1bd)]),_0x304647=le(_0x182109,_0x171fa9['rangeId'],_0x171fa9['text']??'');if(_0x304647==null)return null;let _0x565ff7=v(_0x171fa9[_0x23d607(0x148)]);return delete _0x565ff7[_0x23d607(0x1e2)][_0x171fa9[_0x23d607(0xf3)]],{'nextDocumentData':_0x182109,'nextResource':_0x565ff7,'cursorOffset':_0x304647};}function re(_0x6313b4,_0x4d82de){const _0x4554a8=_0x4136c9;var _0x5b0461;let _0x15b81a=t[_0x4554a8(0x21e)]['deepClone'](_0x6313b4),_0x22e464=_0x15b81a[_0x4554a8(0x1f5)];if(!_0x22e464)return _0x15b81a;let _0x1be1d9=new Map(_0x4d82de['map'](_0x5db669=>[_0x5db669[_0x4554a8(0xf3)],_0x5db669[_0x4554a8(0x137)]])),_0x7bfa42=((_0x5b0461=_0x22e464[_0x4554a8(0x103)])==null?void 0x0:_0x5b0461[_0x4554a8(0x1e1)](_0x264c02=>g(_0x264c02)&&_0x1be1d9[_0x4554a8(0x156)](_0x264c02['rangeId']))[_0x4554a8(0x1e4)]((_0x29e20e,_0x368894)=>_0x368894[_0x4554a8(0x1fe)]-_0x29e20e[_0x4554a8(0x1fe)]))??[];for(let _0x5d0feb of _0x7bfa42)le(_0x15b81a,_0x5d0feb[_0x4554a8(0xf3)],_0x1be1d9[_0x4554a8(0xfc)](_0x5d0feb['rangeId'])??'');return _0x15b81a;}function g(_0x3b6627){const _0x371d0f=_0x4136c9;var _0x17a584;return(_0x3b6627==null?void 0x0:_0x3b6627[_0x371d0f(0x1b8)])===t['CustomRangeType'][_0x371d0f(0x1c0)]&&_0x3b6627[_0x371d0f(0x117)]===!0x0&&((_0x17a584=_0x3b6627[_0x371d0f(0x19e)])==null?void 0x0:_0x17a584[_0x371d0f(0x164)])===_0x371d0f(0x111);}function _(_0x4a1284,_0x574b0c){const _0x4a4713=_0x4136c9;var _0x2f952b;return _0x4a1284==null||(_0x2f952b=_0x4a1284[_0x4a4713(0x103)])==null?void 0x0:_0x2f952b[_0x4a4713(0x124)](_0x5ea98c=>_0x5ea98c['rangeId']===_0x574b0c&&g(_0x5ea98c));}function _0xa4cb(){const _0xe8d34b=['default','previousResource','decorate','replaceDocRanges','registerProvider','accessor','getRevision','name','deleteLength','referenceRevision','createEmptyDocFormulaResource','_docFormulaModel','invalid-resource','onCommandExecuted','empty','set','unregister','resources','pending','min','getFormula','error','getCustomRangeInterval','eligible','constructor','presentationChanged$','disabled','CommandType','data','DOC_SELECTION_OPTION_PRESERVE_CARET','UniverProFormulaEnginePlugin','trim','filter','formulas','identity','sort','_commandService','HostExternalReferenceModel','asObservable','SetDocFormulaResourceMutation','_univerInstanceService','resolveFormula','getSnapshot','RichTextEditingMutation','ConvertDocFormulaToTextCommand','paragraph','Subject','getParagraphContentStartOffset','touchDependencies','docs-formula.config','pluginName','SetDocFormulaNumberFormatCommand','body','undoMutation','ReplaceDocFormulaWithTextCommand','SUCCESS','docs-formula.command.remove','complete','document','dispose','_hostExternalReferenceModel','startIndex','type','slice','buildUpdateDocFormulaActions','_service','assign','CellValueType','delete','serialize','expectedReferenceRevision','Disposable','fromEntries','docs-formula.command.replace-with-text','numberFormat','_setPresentation','docs-formula.mutation.set-formula','presentation','endIndex','getRegisteredFormulas','defineProperty','getPresentation','clear','COLUMN_START','color','DocTextResolverService','object','redoMutation','unregisterUnit','subscribe','from','cell','parse','Tools','getScalarFormulaResultCell','formula','success','registerFormulaWithRange','DependentOn','UniverLicensePlugin','unsupported-version','trigger','_change$','docs-formula.mutation.remove-formula','degradeDocFormulaDocumentData','SetDocFormulaMutation','nextResource','removeUnit','1201284NGmlhx','endOffset','insertLength','dataStream','assertSafeDocFormulaInsertRange','_model','rangeId','syncUnit','previousDocumentData','COLUMN_END','FormulaResultStatus','model','getTextRanges','degradeDocumentData','_preserveInvalid','get','LexerTreeBuilder','liveResult','COMMAND','_formulaKeys','IUndoRedoService','TABLE_END','customRanges','SECTION_BREAK','source','call','degradeBody','UniverDocsPlugin','getResource','BLOCK_END','add','resolveBinding','RemoveDocFormulaCommand','resolveFormulaResultPresentation','14533uNSvxe','UniverInstanceType','univer-docs-formula','EMPTY','_deleteRegistration','externalMutations','DocFormulaService','DOC_FORMULA_PLUGIN','wholeEntity','BLOCK_START','Module','getBody','getRichTextEditPath','_cacheEligibilityService','docs-formula.command.insert','isFormulaLastValue','keys','_rawResources','columnGroups','string','every','find','range','formulaId','buildUpsertHostExternalReferenceMutations','InvalidDocFormulaInsertRangeError','_resources','change$','PARAGRAPH','setResource','650472kSdXUh','number','CustomRangeType','TABLE_CELL_START','_injector','MUTATION','_isDisposed','expectedFormula','shiftExclusiveRangeOnDelete','PENDING','text','load','isArray','length','docs-formula.mutation.set-resource','docs-formula.command.convert-to-text','tables','getLoadError','schemaVersion','TABLE_ROW_END','version','TABLE_START','_registrations','IUniverInstanceService','lastValue','shiftInclusiveRangeOnDelete','end','resource','nextDocumentData','getFormulas','DocFormulaDisplayTextService','getUnitId','values','_syncUnit','1.3.1','segmentId','documentRedo','buildInsertDocFormulaActions','JSONX','SetDocFormulaLastValuesMutation','UpdateDocFormulaCommand','has','blockRanges','2848005UQDdwR','_configService','updates','2057552kDIbqF','toPrimitive','unitId','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','_loadErrors','merge','function','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','UNIVER_DOC','kind','notifyTextChanged','map','isInteger','pattern','docs-formula.command.set-number-format','position','getUnit','isDocFormulaResource','resolveText','resourceRedo','startOffset','TABLE_ROW_START','iterator','Inject','DocSelectionManagerService','DocFormulaLifecycleController','_presentationChanged$','entries','toFormulaLastValue','prototype','insert','3194172lhhEsG','_registrationService','max','UniverDocsFormulaPlugin','unitDisposed$','paragraphId','endsWith','resolved','symbol','ERROR','2cCBZYu','Plugin','start','deepClone','customBlocks','_resourceManagerService','COLUMN_GROUP_START','getResult','push','includes','findDocFormulaRange','InsertDocFormulaCommand','DocFormulaResultStatus','paragraphs','ICommandService','stale','setFormula','customDecorations','getFormulaValueSync','RegisterOtherFormulaService','_syncScheduled','boolean','_instanceService','docs-formula.mutation.set-last-values','assess','resolveHostFormulaExternalReferences','properties','references','_queueSync','forEach','resourceUndo','FormulaCacheEligibilityService','retain','_pendingUnitIds','registerPluginResource','sectionBreaks','DataStreamTreeTokenType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','config','packageName','next','DOC_FORMULA_CUSTOM_RANGE_KIND','removeFormula','CUSTOM_BLOCK','register','20wiMDeT','_formulaService','status','generateRandomId','2163255ZkMLbX','cursorOffset','rangeType','externalReferences','selection','disposeWithMe','textRuns','documentData','params','startsWith','CUSTOM'];_0xa4cb=function(){return _0xe8d34b;};return _0xa4cb();}function ie(_0x419752,_0x1f6cdd,_0x45fce8){const _0x152432=_0x4136c9;if(_0x1f6cdd===_0x45fce8){if(p['has'](_0x419752['dataStream'][_0x1f6cdd]))throw new m();}else{for(let _0x7edd6e=_0x1f6cdd;_0x7edd6e<_0x45fce8;_0x7edd6e++)if(_0x419752['dataStream'][_0x7edd6e]===t[_0x152432(0x1a8)][_0x152432(0x12b)]||p[_0x152432(0x156)](_0x419752[_0x152432(0xf0)][_0x7edd6e]))throw new m();}}function ae(_0x186ad7,_0x4fc158){const _0xbb9349=_0x4136c9;return{'startIndex':_0x4fc158,'endIndex':_0x4fc158,'rangeId':_0x186ad7,'rangeType':t[_0xbb9349(0x12f)][_0xbb9349(0x1c0)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x1c888a){const _0xb0612d=_0x4136c9;return _0x1c888a?t[_0xb0612d(0x21e)][_0xb0612d(0x187)](_0x1c888a):c();}function oe(_0x5b8508,_0x2b9c9d,_0x4b38db){const _0x4be517=_0x4136c9;let _0x44153c=se(_0x5b8508),_0x480bec=_0x2b9c9d??_0x44153c,_0x2fdf0e=_0x4b38db??_0x480bec;return{'startOffset':y(Math[_0x4be517(0x1d4)](_0x480bec,_0x2fdf0e),_0x44153c),'endOffset':y(Math[_0x4be517(0x17c)](_0x480bec,_0x2fdf0e),_0x44153c)};}function y(_0x189425,_0x3332c3){const _0x68b0ce=_0x4136c9;return Math[_0x68b0ce(0x17c)](0x0,Math[_0x68b0ce(0x1d4)](_0x189425,_0x3332c3));}function _0x44d8(_0x32ff33,_0x3c9752){_0x32ff33=_0x32ff33-0xf0;const _0xa4cb44=_0xa4cb();let _0x44d83c=_0xa4cb44[_0x32ff33];return _0x44d83c;}function se(_0x2eb1ff){const _0x4d2058=_0x4136c9;return _0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](''+t[_0x4d2058(0x1a8)]['PARAGRAPH']+t[_0x4d2058(0x1a8)]['SECTION_BREAK'])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x2):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](t[_0x4d2058(0x1a8)][_0x4d2058(0x104)])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x1):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)];}function ce(_0x200f19,_0x257676,_0x278ad8,_0x513db6){_0x278ad8>_0x257676&&de(_0x200f19,_0x257676,_0x278ad8),ue(_0x200f19,_0x257676,_0x513db6);}function le(_0x4b03e0,_0x450b36,_0xb695c2){const _0x198b7f=_0x4136c9;var _0x4447d5,_0x2e1dbb;let _0x15e690=T(_0x4b03e0),_0x32d0db=(_0x4447d5=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x4447d5['find'](_0x140d40=>_0x140d40[_0x198b7f(0xf3)]===_0x450b36&&g(_0x140d40));if(!_0x32d0db)return null;let _0x5ac8ae=(0x0,t[_0x198b7f(0x1d7)])(_0x32d0db);return ce(_0x15e690,_0x5ac8ae[_0x198b7f(0x16f)],_0x5ac8ae[_0x198b7f(0x22e)],_0xb695c2),_0x15e690[_0x198b7f(0x103)]=(_0x2e1dbb=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x2e1dbb[_0x198b7f(0x1e1)](_0x40e9ce=>_0x40e9ce['rangeId']!==_0x450b36),_0x5ac8ae[_0x198b7f(0x16f)]+_0xb695c2['length'];}function ue(_0x4a996d,_0x56e7c8,_0x3edf38){const _0x28b539=_0x4136c9;_0x3edf38&&(_0x4a996d[_0x28b539(0xf0)]=''+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](0x0,_0x56e7c8)+_0x3edf38+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](_0x56e7c8),fe(_0x4a996d,_0x56e7c8,_0x3edf38[_0x28b539(0x13a)]));}function de(_0xba8461,_0x189a7e,_0x47a98e){const _0x577423=_0x4136c9;let _0x17e1e9=_0x47a98e-_0x189a7e;_0xba8461[_0x577423(0xf0)]=''+_0xba8461[_0x577423(0xf0)][_0x577423(0x200)](0x0,_0x189a7e)+_0xba8461['dataStream'][_0x577423(0x200)](_0x47a98e),pe(_0xba8461,_0x189a7e,_0x17e1e9);}function fe(_0x53d7a3,_0x5afe9d,_0x18f427){const _0x414032=_0x4136c9;_0x53d7a3[_0x414032(0x191)]=b(_0x53d7a3[_0x414032(0x191)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1a7)]=b(_0x53d7a3[_0x414032(0x1a7)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x188)]=b(_0x53d7a3['customBlocks'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1bc)]=me(_0x53d7a3['textRuns'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x13d)]=he(_0x53d7a3[_0x414032(0x13d)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x121)]=S(_0x53d7a3[_0x414032(0x121)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x103)]=S(_0x53d7a3[_0x414032(0x103)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x195)]=S(_0x53d7a3[_0x414032(0x195)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x157)]=S(_0x53d7a3['blockRanges'],_0x5afe9d,_0x18f427);}function pe(_0x58d4c7,_0x13abb0,_0x27aead){const _0x48fcaf=_0x4136c9;var _0xe34f0d,_0x21d36d;_0x58d4c7[_0x48fcaf(0x191)]=x(_0x58d4c7['paragraphs'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x1a7)]=x(_0x58d4c7['sectionBreaks'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x188)]=x(_0x58d4c7[_0x48fcaf(0x188)],_0x13abb0,_0x27aead),_0x58d4c7['textRuns']=(_0xe34f0d=w((_0x21d36d=_0x58d4c7[_0x48fcaf(0x1bc)])==null?void 0x0:_0x21d36d[_0x48fcaf(0x166)](_0x119060=>({..._0x119060,'startIndex':_0x119060['st'],'endIndex':_0x119060['ed']})),_0x13abb0,_0x27aead))==null?void 0x0:_0xe34f0d[_0x48fcaf(0x166)](_0x54191a=>{let {startIndex:_0xb8775f,endIndex:_0xb6a0d,..._0x38ddde}=_0x54191a;return{..._0x38ddde,'st':_0xb8775f,'ed':_0xb6a0d};}),_0x58d4c7[_0x48fcaf(0x13d)]=w(_0x58d4c7['tables'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x121)]=C(_0x58d4c7['columnGroups'],_0x13abb0,_0x27aead),_0x58d4c7['customRanges']=C(_0x58d4c7[_0x48fcaf(0x103)],_0x13abb0,_0x27aead),_0x58d4c7['customDecorations']=C(_0x58d4c7[_0x48fcaf(0x195)],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x157)]=C(_0x58d4c7[_0x48fcaf(0x157)],_0x13abb0,_0x27aead);}function b(_0x59a7df,_0x3d0377,_0x293006){const _0x14035f=_0x4136c9;return _0x59a7df==null?void 0x0:_0x59a7df['map'](_0xccb6ca=>_0xccb6ca[_0x14035f(0x1fe)]>=_0x3d0377?{..._0xccb6ca,'startIndex':_0xccb6ca[_0x14035f(0x1fe)]+_0x293006}:_0xccb6ca);}function x(_0x1f134a,_0x2b2b72,_0x48a445){const _0x36c38d=_0x4136c9;let _0x3aa001=_0x2b2b72+_0x48a445;return _0x1f134a==null?void 0x0:_0x1f134a[_0x36c38d(0x166)](_0x28b69e=>_0x28b69e[_0x36c38d(0x1fe)]>=_0x2b2b72&&_0x28b69e[_0x36c38d(0x1fe)]<_0x3aa001?null:_0x28b69e[_0x36c38d(0x1fe)]>=_0x3aa001?{..._0x28b69e,'startIndex':_0x28b69e[_0x36c38d(0x1fe)]-_0x48a445}:_0x28b69e)['filter'](_0x3f023f=>_0x3f023f!=null);}function me(_0x1f3a81,_0x433aae,_0x39d0c1){const _0x52d4c7=_0x4136c9;return _0x1f3a81==null?void 0x0:_0x1f3a81[_0x52d4c7(0x166)](_0x2ccd6e=>_0x2ccd6e['st']>=_0x433aae?{..._0x2ccd6e,'st':_0x2ccd6e['st']+_0x39d0c1,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e['ed']>_0x433aae?{..._0x2ccd6e,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e);}function S(_0x28eeb6,_0x1cc37e,_0x18d218){const _0x1ffcfd=_0x4136c9;return _0x28eeb6==null?void 0x0:_0x28eeb6[_0x1ffcfd(0x166)](_0x3675d7=>(0x0,t['shiftInclusiveRangeOnInsert'])(_0x3675d7,_0x1cc37e,_0x18d218));}function he(_0x5760e4,_0xc05fb7,_0x3ff06){const _0x242ec8=_0x4136c9;return _0x5760e4==null?void 0x0:_0x5760e4[_0x242ec8(0x166)](_0x17da42=>(0x0,t['shiftExclusiveRangeOnInsert'])(_0x17da42,_0xc05fb7,_0x3ff06));}function C(_0x5e3fca,_0x4f25a3,_0xab582a){const _0x4f466a=_0x4136c9;return _0x5e3fca==null?void 0x0:_0x5e3fca['map'](_0x5dacba=>(0x0,t[_0x4f466a(0x146)])(_0x5dacba,_0x4f25a3,_0xab582a))[_0x4f466a(0x1e1)](_0xd1df59=>_0xd1df59!=null);}function w(_0xd6cc10,_0x33e713,_0x556778){const _0x1b5842=_0x4136c9;return _0xd6cc10==null?void 0x0:_0xd6cc10['map'](_0x20c2fb=>(0x0,t[_0x1b5842(0x135)])(_0x20c2fb,_0x33e713,_0x556778))[_0x1b5842(0x1e1)](_0x29a542=>_0x29a542!=null);}function T(_0x420b23){const _0x3df3eb=_0x4136c9;if(!_0x420b23[_0x3df3eb(0x1f5)])throw Error(_0x3df3eb(0x15e));return _0x420b23[_0x3df3eb(0x1f5)];}function E(_0x5079ff){'@babel/helpers - typeof';const _0x541b47=_0x4136c9;return E=typeof Symbol==_0x541b47(0x161)&&typeof Symbol[_0x541b47(0x171)]==_0x541b47(0x182)?function(_0x52e7c8){return typeof _0x52e7c8;}:function(_0x364c4f){const _0x3c1da2=_0x541b47;return _0x364c4f&&typeof Symbol==_0x3c1da2(0x161)&&_0x364c4f[_0x3c1da2(0x1d9)]===Symbol&&_0x364c4f!==Symbol[_0x3c1da2(0x178)]?_0x3c1da2(0x182):typeof _0x364c4f;},E(_0x5079ff);}function ge(_0x2fc47e,_0x1d45b2){const _0x564cb7=_0x4136c9;if(E(_0x2fc47e)!=_0x564cb7(0x217)||!_0x2fc47e)return _0x2fc47e;var _0x23d968=_0x2fc47e[Symbol[_0x564cb7(0x15c)]];if(_0x23d968!==void 0x0){var _0x3037ef=_0x23d968[_0x564cb7(0x106)](_0x2fc47e,_0x1d45b2||_0x564cb7(0x1c1));if(E(_0x3037ef)!=_0x564cb7(0x217))return _0x3037ef;throw TypeError(_0x564cb7(0x1a9));}return(_0x1d45b2===_0x564cb7(0x122)?String:Number)(_0x2fc47e);}function _e(_0x1764fe){const _0x449fe4=_0x4136c9;var _0x4a6c5c=ge(_0x1764fe,_0x449fe4(0x122));return E(_0x4a6c5c)==_0x449fe4(0x182)?_0x4a6c5c:_0x4a6c5c+'';}function D(_0x4c59eb,_0x134003,_0x5a2562){const _0x1d77cb=_0x4136c9;return(_0x134003=_e(_0x134003))in _0x4c59eb?Object[_0x1d77cb(0x211)](_0x4c59eb,_0x134003,{'value':_0x5a2562,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4c59eb[_0x134003]=_0x5a2562,_0x4c59eb;}var O=class extends t[_0x4136c9(0x208)]{constructor(..._0x5703ca){const _0x2faeb1=_0x4136c9;super(..._0x5703ca),D(this,_0x2faeb1(0x129),new Map()),D(this,_0x2faeb1(0x120),new Map()),D(this,'_loadErrors',new Map()),D(this,_0x2faeb1(0x227),new i[(_0x2faeb1(0x1ef))]()),D(this,'change$',this['_change$'][_0x2faeb1(0x1e7)]());}[_0x4136c9(0x1d5)](_0x397915,_0x1f0f9a){const _0x249ad2=_0x4136c9;var _0x8e77c1;let _0x1cdb50=(_0x8e77c1=this['_resources'][_0x249ad2(0xfc)](_0x397915))==null?void 0x0:_0x8e77c1[_0x249ad2(0x1e2)][_0x1f0f9a];return _0x1cdb50?t[_0x249ad2(0x21e)][_0x249ad2(0x187)](_0x1cdb50):void 0x0;}[_0x4136c9(0x14a)](_0x348d75){const _0x2be6a5=_0x4136c9;var _0x2819de;return t[_0x2be6a5(0x21e)][_0x2be6a5(0x187)](((_0x2819de=this[_0x2be6a5(0x129)]['get'](_0x348d75))==null?void 0x0:_0x2819de[_0x2be6a5(0x1e2)])??{});}[_0x4136c9(0x109)](_0xbafebd){const _0x40683b=_0x4136c9;let _0x3d56a7=this[_0x40683b(0x129)][_0x40683b(0xfc)](_0xbafebd);return _0x3d56a7?t['Tools'][_0x40683b(0x187)](_0x3d56a7):void 0x0;}[_0x4136c9(0x194)](_0x583367,_0xddfc86,_0x1b3e0d){return this['setFormulas'](_0x583367,{[_0xddfc86]:_0x1b3e0d});}[_0x4136c9(0x12c)](_0x3e546d,_0x37f16f){const _0x2525c3=_0x4136c9;return this[_0x2525c3(0x15f)]['has'](_0x3e546d)||!l(_0x37f16f)?!0x1:(this[_0x2525c3(0x129)][_0x2525c3(0x1d0)](_0x3e546d,t[_0x2525c3(0x21e)][_0x2525c3(0x187)](_0x37f16f)),this[_0x2525c3(0x227)][_0x2525c3(0x1ad)]({'unitId':_0x3e546d}),!0x0);}['setFormulas'](_0x1b9e03,_0x4e115b){const _0xe065dc=_0x4136c9;if(this[_0xe065dc(0x15f)][_0xe065dc(0x156)](_0x1b9e03)||!Object[_0xe065dc(0x11f)](_0x4e115b)[_0xe065dc(0x13a)]||!l({'schemaVersion':0x1,'formulas':_0x4e115b}))return!0x1;let _0xb3346f=this[_0xe065dc(0x129)][_0xe065dc(0xfc)](_0x1b9e03)??c(),_0x1a2cf9=t['Tools'][_0xe065dc(0x187)](_0xb3346f);return Object[_0xe065dc(0x203)](_0x1a2cf9[_0xe065dc(0x1e2)],t['Tools']['deepClone'](_0x4e115b)),this[_0xe065dc(0x129)][_0xe065dc(0x1d0)](_0x1b9e03,_0x1a2cf9),this[_0xe065dc(0x227)][_0xe065dc(0x1ad)]({'unitId':_0x1b9e03,'rangeIds':Object[_0xe065dc(0x11f)](_0x4e115b)}),!0x0;}[_0x4136c9(0x1af)](_0x109a83,_0x5e4d92){const _0x31dc67=_0x4136c9;if(this[_0x31dc67(0x15f)][_0x31dc67(0x156)](_0x109a83))return!0x1;let _0x2f09fb=this[_0x31dc67(0x129)]['get'](_0x109a83);if(!(_0x2f09fb!=null&&_0x2f09fb[_0x31dc67(0x1e2)][_0x5e4d92]))return!0x1;let _0x3a223d=t[_0x31dc67(0x21e)][_0x31dc67(0x187)](_0x2f09fb);return delete _0x3a223d['formulas'][_0x5e4d92],this['_resources'][_0x31dc67(0x1d0)](_0x109a83,_0x3a223d),this[_0x31dc67(0x227)][_0x31dc67(0x1ad)]({'unitId':_0x109a83,'rangeIds':[_0x5e4d92]}),!0x0;}[_0x4136c9(0x138)](_0x2bfef3,_0x2671b0){const _0x235b38=_0x4136c9;return _0x2671b0&&typeof _0x2671b0==_0x235b38(0x217)&&_0x235b38(0x13f)in _0x2671b0&&_0x2671b0[_0x235b38(0x13f)]!==0x1?(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x225)),!0x1):l(_0x2671b0)?(this['_resources']['set'](_0x2bfef3,t[_0x235b38(0x21e)][_0x235b38(0x187)](_0x2671b0)),this[_0x235b38(0x120)][_0x235b38(0x205)](_0x2bfef3),this['_loadErrors'][_0x235b38(0x205)](_0x2bfef3),this[_0x235b38(0x227)][_0x235b38(0x1ad)]({'unitId':_0x2bfef3}),!0x0):(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x1cd)),!0x1);}[_0x4136c9(0x206)](_0x5762b7){const _0x4f66eb=_0x4136c9;let _0x41879b=this[_0x4f66eb(0x129)][_0x4f66eb(0xfc)](_0x5762b7);return _0x41879b?t[_0x4f66eb(0x21e)][_0x4f66eb(0x187)](_0x41879b):this[_0x4f66eb(0x120)]['has'](_0x5762b7)?t['Tools']['deepClone'](this['_rawResources'][_0x4f66eb(0xfc)](_0x5762b7)):c();}[_0x4136c9(0x13e)](_0x379775){const _0x128f18=_0x4136c9;return this[_0x128f18(0x15f)][_0x128f18(0xfc)](_0x379775);}[_0x4136c9(0x22c)](_0x16ed3a){const _0x53f0d5=_0x4136c9;this[_0x53f0d5(0x129)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x120)]['delete'](_0x16ed3a),this[_0x53f0d5(0x15f)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x227)]['next']({'unitId':_0x16ed3a});}['dispose'](){const _0x2d58cc=_0x4136c9;this[_0x2d58cc(0x129)]['clear'](),this[_0x2d58cc(0x120)]['clear'](),this[_0x2d58cc(0x15f)][_0x2d58cc(0x213)](),this[_0x2d58cc(0x227)][_0x2d58cc(0x1fa)](),super[_0x2d58cc(0x1fc)]();}[_0x4136c9(0xfb)](_0x1993c7,_0x174f0f,_0x1dadea){const _0x1e7233=_0x4136c9;this[_0x1e7233(0x129)]['delete'](_0x1993c7),this['_rawResources'][_0x1e7233(0x1d0)](_0x1993c7,t['Tools'][_0x1e7233(0x187)](_0x174f0f)),this[_0x1e7233(0x15f)][_0x1e7233(0x1d0)](_0x1993c7,_0x1dadea),this[_0x1e7233(0x227)][_0x1e7233(0x1ad)]({'unitId':_0x1993c7});}};let ve=function(_0x1ab16c){const _0x108bf1=_0x4136c9;return _0x1ab16c[_0x108bf1(0x112)]='empty',_0x1ab16c[_0x108bf1(0x136)]=_0x108bf1(0x1d3),_0x1ab16c[_0x108bf1(0x1f8)]=_0x108bf1(0x221),_0x1ab16c[_0x108bf1(0x183)]=_0x108bf1(0x1d6),_0x1ab16c;}({});function k(_0xfd9171,_0x590f97){return function(_0x3141b0,_0x3498e3){_0x590f97(_0x3141b0,_0x3498e3,_0xfd9171);};}function A(_0xb28121,_0x35677b,_0x17a412,_0x115b5e){const _0x540f56=_0x4136c9;var _0x245e88=arguments[_0x540f56(0x13a)],_0x329a14=_0x245e88<0x3?_0x35677b:_0x115b5e===null?_0x115b5e=Object['getOwnPropertyDescriptor'](_0x35677b,_0x17a412):_0x115b5e,_0xbd9777;if(typeof Reflect==_0x540f56(0x217)&&typeof Reflect['decorate']==_0x540f56(0x161))_0x329a14=Reflect[_0x540f56(0x1c3)](_0xb28121,_0x35677b,_0x17a412,_0x115b5e);else{for(var _0xed2bba=_0xb28121[_0x540f56(0x13a)]-0x1;_0xed2bba>=0x0;_0xed2bba--)(_0xbd9777=_0xb28121[_0xed2bba])&&(_0x329a14=(_0x245e88<0x3?_0xbd9777(_0x329a14):_0x245e88>0x3?_0xbd9777(_0x35677b,_0x17a412,_0x329a14):_0xbd9777(_0x35677b,_0x17a412))||_0x329a14);}return _0x245e88>0x3&&_0x329a14&&Object[_0x540f56(0x211)](_0x35677b,_0x17a412,_0x329a14),_0x329a14;}let j=class extends t[_0x4136c9(0x208)]{constructor(_0x455dd1,_0x1ca43e,_0x3722f2){const _0x4e1798=_0x4136c9;super(),this[_0x4e1798(0xf2)]=_0x455dd1,this[_0x4e1798(0x17b)]=_0x1ca43e,this[_0x4e1798(0x1fd)]=_0x3722f2,D(this,_0x4e1798(0x143),new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x4e1798(0x175),new i['Subject']()),D(this,_0x4e1798(0x1da),this['_presentationChanged$']['asObservable']()),this[_0x4e1798(0x1bb)](this[_0x4e1798(0x17b)]['formulaResult$'][_0x4e1798(0x21a)](_0x4b5afc=>{const _0x1f87df=_0x4e1798;for(let _0xf6092b of Object[_0x1f87df(0x14d)](_0x4b5afc))for(let _0x38c703 of Object[_0x1f87df(0x14d)](_0xf6092b))_0x38c703['forEach'](_0x370874=>this['_updateFormulaResult'](_0x370874));}));}[_0x4136c9(0xf4)](_0x3cf136){const _0x9993a1=_0x4136c9;var _0x84b361;let _0x286558=_0x3cf136[_0x9993a1(0x14c)](),_0x306c2b=((_0x84b361=_0x3cf136[_0x9993a1(0x1eb)]()[_0x9993a1(0x1f5)])==null||(_0x84b361=_0x84b361[_0x9993a1(0x103)])==null?void 0x0:_0x84b361[_0x9993a1(0x1e1)](g))??[],_0x1de419=this[_0x9993a1(0xf2)]['getFormulas'](_0x286558),_0x1dee00=new Set();for(let _0x230d03 of _0x306c2b){let _0x54ed58=_0x1de419[_0x230d03['rangeId']];_0x54ed58&&(_0x1dee00[_0x9993a1(0x10b)](M(_0x286558,_0x230d03[_0x9993a1(0xf3)])),this['register']({'unitId':_0x286558,'rangeId':_0x230d03[_0x9993a1(0xf3)]},_0x54ed58));}for(let _0x4a2578 of Array[_0x9993a1(0x21b)](this[_0x9993a1(0x143)][_0x9993a1(0x14d)]()))_0x4a2578[_0x9993a1(0x15d)]===_0x286558&&!_0x1dee00[_0x9993a1(0x156)](M(_0x4a2578[_0x9993a1(0x15d)],_0x4a2578['rangeId']))&&this[_0x9993a1(0x1d1)](_0x4a2578);}['register'](_0x529387,_0x3765e9){const _0x5dbb02=_0x4136c9;let _0x2157b9=M(_0x529387[_0x5dbb02(0x15d)],_0x529387['rangeId']),_0x3b6fd9=this[_0x5dbb02(0x143)][_0x5dbb02(0xfc)](_0x2157b9),_0x5d25c0=this[_0x5dbb02(0x1fd)]['getRevision'](_0x529387['unitId']);if(_0x3b6fd9&&_0x3b6fd9[_0x5dbb02(0x1ab)][_0x5dbb02(0x220)]===_0x3765e9[_0x5dbb02(0x220)]&&_0x3b6fd9[_0x5dbb02(0x1ca)]===_0x5d25c0){_0x3b6fd9['config']=_0x3765e9;let _0x53bf6d=_0x3b6fd9[_0x5dbb02(0x126)]?this['_registrationService'][_0x5dbb02(0x196)](_0x3b6fd9['unitId'],_0x3b6fd9[_0x5dbb02(0x15d)],_0x3b6fd9[_0x5dbb02(0x126)])??void 0x0:void 0x0;_0x3b6fd9[_0x5dbb02(0xfe)]=_0x53bf6d,this['_setPresentation'](_0x2157b9,N(_0x3765e9,_0x53bf6d));return;}_0x3b6fd9!=null&&_0x3b6fd9['formulaId']&&this[_0x5dbb02(0x113)](_0x3b6fd9);let _0x4ebee0={..._0x529387,'config':_0x3765e9,'referenceRevision':_0x5d25c0,'presentation':N(_0x3765e9,void 0x0)};if(this[_0x5dbb02(0x143)][_0x5dbb02(0x1d0)](_0x2157b9,_0x4ebee0),!_0x3765e9[_0x5dbb02(0x220)][_0x5dbb02(0x1e0)]())return;let _0x554119=this[_0x5dbb02(0x17b)][_0x5dbb02(0x222)](_0x529387['unitId'],_0x529387[_0x5dbb02(0x15d)],_0x3765e9[_0x5dbb02(0x220)],void 0x0,{'rangeId':_0x529387[_0x5dbb02(0xf3)]},r['OtherFormulaBizType']['DOC'],_0x529387[_0x5dbb02(0xf3)]);_0x4ebee0[_0x5dbb02(0x126)]=_0x554119,this[_0x5dbb02(0x100)][_0x5dbb02(0x1d0)](_0x554119,_0x2157b9);}['unregister'](_0xd81a4f){const _0x2a8f21=_0x4136c9;let _0x1d82bd=M(_0xd81a4f[_0x2a8f21(0x15d)],_0xd81a4f[_0x2a8f21(0xf3)]),_0xb29512=this[_0x2a8f21(0x143)][_0x2a8f21(0xfc)](_0x1d82bd);_0xb29512&&(this['_deleteRegistration'](_0xb29512),this[_0x2a8f21(0x143)]['delete'](_0x1d82bd));}[_0x4136c9(0x219)](_0xfa4e82){const _0x3917db=_0x4136c9;for(let _0x53cf90 of Array[_0x3917db(0x21b)](this[_0x3917db(0x143)][_0x3917db(0x14d)]()))_0x53cf90[_0x3917db(0x15d)]===_0xfa4e82&&this[_0x3917db(0x1d1)](_0x53cf90);}[_0x4136c9(0x212)](_0x56f1a9){const _0x223f25=_0x4136c9;var _0x31d2f2;return(_0x31d2f2=this[_0x223f25(0x143)][_0x223f25(0xfc)](M(_0x56f1a9['unitId'],_0x56f1a9[_0x223f25(0xf3)])))==null?void 0x0:_0x31d2f2[_0x223f25(0x20e)];}[_0x4136c9(0x18b)](_0x1f3f73){const _0x16f5c0=_0x4136c9;let _0xfe70b9=this[_0x16f5c0(0x143)]['get'](M(_0x1f3f73[_0x16f5c0(0x15d)],_0x1f3f73[_0x16f5c0(0xf3)]));return _0xfe70b9?P(_0xfe70b9):void 0x0;}[_0x4136c9(0x210)](){const _0x22953e=_0x4136c9;return Array['from'](this[_0x22953e(0x143)][_0x22953e(0x14d)](),_0x2b8812=>({'identity':{'unitId':_0x2b8812[_0x22953e(0x15d)],'rangeId':_0x2b8812['rangeId']},'config':_0x2b8812['config'],'referenceRevision':_0x2b8812[_0x22953e(0x1ca)],..._0x2b8812[_0x22953e(0xfe)]?{'liveResult':_0x2b8812['liveResult']}:null}));}['dispose'](){const _0x4fb51c=_0x4136c9;for(let _0x37ef8d of this[_0x4fb51c(0x143)][_0x4fb51c(0x14d)]())this[_0x4fb51c(0x113)](_0x37ef8d);this[_0x4fb51c(0x143)]['clear'](),this[_0x4fb51c(0x100)][_0x4fb51c(0x213)](),this[_0x4fb51c(0x175)][_0x4fb51c(0x1fa)](),super[_0x4fb51c(0x1fc)]();}['_updateFormulaResult'](_0x3f31f0){const _0x10336e=_0x4136c9;let _0x5682ff=this[_0x10336e(0x100)][_0x10336e(0xfc)](_0x3f31f0['formulaId']),_0x1b4a8e=_0x5682ff?this[_0x10336e(0x143)][_0x10336e(0xfc)](_0x5682ff):void 0x0;_0x5682ff&&_0x1b4a8e&&(_0x1b4a8e['liveResult']=_0x3f31f0,this[_0x10336e(0x20c)](_0x5682ff,N(_0x1b4a8e[_0x10336e(0x1ab)],_0x3f31f0)));}[_0x4136c9(0x20c)](_0x5f447e,_0x5ba95a){const _0x57760f=_0x4136c9;var _0x1efbaf,_0x82c6cc;let _0x21d875=this[_0x57760f(0x143)][_0x57760f(0xfc)](_0x5f447e);if(!_0x21d875||ye(_0x21d875[_0x57760f(0x20e)],_0x5ba95a))return;let _0x4205b3=_0x21d875[_0x57760f(0x20e)],_0x56f037=P(_0x21d875);_0x21d875[_0x57760f(0x20e)]=_0x5ba95a,this[_0x57760f(0x175)][_0x57760f(0x1ad)]({'unitId':_0x21d875[_0x57760f(0x15d)],'rangeId':_0x21d875['rangeId'],'presentation':_0x5ba95a,'previousPresentation':_0x4205b3,'result':P(_0x21d875),'previousResult':{..._0x56f037,..._0x4205b3,'value':(_0x1efbaf=_0x4205b3['cell'])==null?void 0x0:_0x1efbaf['v'],'valueType':((_0x82c6cc=_0x4205b3['cell'])==null?void 0x0:_0x82c6cc['t'])??void 0x0}});}['_deleteRegistration'](_0x17cd7d){const _0x36f21e=_0x4136c9;_0x17cd7d['formulaId']&&(this[_0x36f21e(0x17b)]['deleteFormula'](_0x17cd7d[_0x36f21e(0x15d)],_0x17cd7d['unitId'],[_0x17cd7d['formulaId']]),this[_0x36f21e(0x100)][_0x36f21e(0x205)](_0x17cd7d[_0x36f21e(0x126)]));}};j=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x4136c9(0x197)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1e6)]))],j);function M(_0x42b4e5,_0x4dd9f1){return _0x42b4e5+'\x00'+_0x4dd9f1;}function N(_0x5a9378,_0x509cf0){const _0x1fcc46=_0x4136c9;return(0x0,e['resolveFormulaResultPresentation'])({'numberFormat':_0x5a9378['numberFormat'],'lastValue':_0x5a9378[_0x1fcc46(0x145)],'result':_0x509cf0});}function P(_0x19a063){const _0x5ce060=_0x4136c9;var _0x18e637,_0x451c99,_0x41091b;let _0x589fe1=_0x19a063[_0x5ce060(0x20e)],_0x1a6feb=_0x19a063[_0x5ce060(0x1ab)]['formula'][_0x5ce060(0x1e0)]()?_0x589fe1[_0x5ce060(0x193)]||_0x589fe1[_0x5ce060(0x21c)]==null?'pending':((_0x18e637=_0x19a063[_0x5ce060(0xfe)])==null?void 0x0:_0x18e637['status'])===r[_0x5ce060(0xf7)][_0x5ce060(0x183)]?_0x5ce060(0x1d6):_0x5ce060(0x221):_0x5ce060(0x1cf);return{..._0x589fe1,'status':_0x1a6feb,'value':(_0x451c99=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x451c99['v'],'valueType':((_0x41091b=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x41091b['t'])??void 0x0};}function ye(_0x522e9f,_0xab45f8){const _0x599d32=_0x4136c9;var _0x4e23a5,_0x350cc1,_0x358783,_0x5f1115;return _0x522e9f['text']===_0xab45f8[_0x599d32(0x137)]&&_0x522e9f['color']===_0xab45f8[_0x599d32(0x215)]&&_0x522e9f[_0x599d32(0x168)]===_0xab45f8['pattern']&&_0x522e9f[_0x599d32(0x105)]===_0xab45f8[_0x599d32(0x105)]&&_0x522e9f[_0x599d32(0x193)]===_0xab45f8[_0x599d32(0x193)]&&((_0x4e23a5=_0x522e9f['cell'])==null?void 0x0:_0x4e23a5['t'])===((_0x350cc1=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x350cc1['t'])&&Object['is']((_0x358783=_0x522e9f[_0x599d32(0x21c)])==null?void 0x0:_0x358783['v'],(_0x5f1115=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x5f1115['v']);}const F={'id':_0x4136c9(0x20d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x2c1f8a,_0x55197a)=>!(_0x55197a!=null&&_0x55197a[_0x4136c9(0x15d)])||!_0x55197a[_0x4136c9(0xf3)]||!_0x55197a['config']?!0x1:_0x2c1f8a['get'](O)[_0x4136c9(0x194)](_0x55197a[_0x4136c9(0x15d)],_0x55197a[_0x4136c9(0xf3)],_0x55197a['config'])},I={'id':_0x4136c9(0x228),'type':t[_0x4136c9(0x1dc)]['MUTATION'],'handler':(_0x29345f,_0x455f48)=>!(_0x455f48!=null&&_0x455f48[_0x4136c9(0x15d)])||!_0x455f48[_0x4136c9(0xf3)]?!0x1:_0x29345f[_0x4136c9(0xfc)](O)[_0x4136c9(0x1af)](_0x455f48['unitId'],_0x455f48[_0x4136c9(0xf3)])},L={'id':_0x4136c9(0x13b),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x5f0216,_0x34ed4a)=>!(_0x34ed4a!=null&&_0x34ed4a[_0x4136c9(0x15d)])||!_0x34ed4a[_0x4136c9(0x148)]?!0x1:_0x5f0216[_0x4136c9(0xfc)](O)[_0x4136c9(0x12c)](_0x34ed4a['unitId'],_0x34ed4a[_0x4136c9(0x148)])},R={'id':_0x4136c9(0x19b),'type':t['CommandType']['MUTATION'],'handler':(_0x3a278c,_0x644878)=>{const _0x4c7d40=_0x4136c9;if(!(_0x644878!=null&&_0x644878[_0x4c7d40(0x15d)])||!_0x644878[_0x4c7d40(0x15a)][_0x4c7d40(0x13a)])return!0x1;let _0x5859c7=_0x3a278c[_0x4c7d40(0xfc)](O),_0x14a26a=_0x3a278c[_0x4c7d40(0xfc)](e[_0x4c7d40(0x1e6)]),_0x3a4a61=_0x5859c7['getResource'](_0x644878[_0x4c7d40(0x15d)]);if(!_0x3a4a61)return!0x1;let _0x307728=t[_0x4c7d40(0x21e)][_0x4c7d40(0x187)](_0x3a4a61),_0x4c0829=!0x1;for(let _0x1c958b of _0x644878[_0x4c7d40(0x15a)]){var _0xc9a8eb,_0x28b28e,_0x1654dd,_0x12cd1c;let _0x3a2f18=_0x307728[_0x4c7d40(0x1e2)][_0x1c958b[_0x4c7d40(0xf3)]];_0x3a2f18&&_0x3a2f18[_0x4c7d40(0x220)]===_0x1c958b[_0x4c7d40(0x134)]&&((_0xc9a8eb=_0x3a2f18[_0x4c7d40(0x20b)])==null?void 0x0:_0xc9a8eb[_0x4c7d40(0x168)])===_0x1c958b['expectedNumberFormat']&&_0x14a26a[_0x4c7d40(0x1c7)](_0x644878[_0x4c7d40(0x15d)])===_0x1c958b[_0x4c7d40(0x207)]&&(((_0x28b28e=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x28b28e['v'])!==_0x1c958b[_0x4c7d40(0x145)]['v']||((_0x1654dd=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x1654dd['t'])!==_0x1c958b['lastValue']['t']||((_0x12cd1c=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x12cd1c[_0x4c7d40(0x168)])!==_0x1c958b[_0x4c7d40(0x145)][_0x4c7d40(0x168)])&&(_0x3a2f18[_0x4c7d40(0x145)]=t['Tools'][_0x4c7d40(0x187)](_0x1c958b[_0x4c7d40(0x145)]),_0x4c0829=!0x0);}return!_0x4c0829||_0x5859c7['setResource'](_0x644878['unitId'],_0x307728);}},z={'id':_0x4136c9(0x11d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x1525f8,_0x20155b)=>{const _0x599377=_0x4136c9;if(!(_0x20155b!=null&&_0x20155b[_0x599377(0x220)][_0x599377(0x1e0)]()))return!0x1;let _0x218d2f=K(_0x1525f8,_0x20155b['unitId'],'');if(!_0x218d2f)return!0x1;let _0x44e536=xe(_0x20155b['target'],_0x218d2f['body'],be(_0x1525f8,_0x218d2f[_0x599377(0x15d)]));if(!_0x44e536)return!0x1;let _0x1e3d18=Se(_0x1525f8,_0x218d2f['unitId'],_0x20155b['formula'],_0x20155b[_0x599377(0x1b9)]??[]);if(!_0x1e3d18)return!0x1;let _0x29979a=Ce(_0x218d2f[_0x599377(0x1f5)],_0x218d2f['model'],_0x218d2f['unitId']),_0x1f33c4=we({'documentData':_0x218d2f['documentData'],'resource':_0x218d2f[_0x599377(0x148)],'rangeId':_0x29979a,'config':{'formula':_0x20155b[_0x599377(0x220)],..._0x20155b['numberFormat']?{'numberFormat':_0x20155b[_0x599377(0x20b)]}:null},'startOffset':_0x44e536[_0x599377(0x16f)],'endOffset':_0x44e536['endOffset']});if(!_0x1f33c4)return!0x1;let _0x19f95c=(0x0,e[_0x599377(0x127)])(_0x1525f8,_0x218d2f[_0x599377(0x15d)],_0x1e3d18);return!_0x19f95c||!q({'accessor':_0x1525f8,'document':_0x218d2f[_0x599377(0x1fb)],'unitId':_0x218d2f[_0x599377(0x15d)],'trigger':z['id'],'rangeId':_0x29979a,'previousResource':_0x218d2f[_0x599377(0x148)],'nextResource':_0x1f33c4[_0x599377(0x22b)],'previousDocumentData':_0x218d2f[_0x599377(0x1bd)],'nextDocumentData':_0x1f33c4[_0x599377(0x149)],'cursorOffset':_0x1f33c4[_0x599377(0x1b7)],'externalMutations':_0x19f95c})?!0x1:{'rangeId':_0x29979a,'startOffset':_0x1f33c4[_0x599377(0x1b7)]-0x1,'endOffset':_0x1f33c4[_0x599377(0x1b7)]};}},B={'id':'docs-formula.command.update','type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x171447,_0x51c6d8)=>{const _0x40d10d=_0x4136c9;if(!(_0x51c6d8!=null&&_0x51c6d8['rangeId'])||!_0x51c6d8[_0x40d10d(0x220)]['trim']())return!0x1;let _0x2d64a5=K(_0x171447,_0x51c6d8['unitId'],''),_0x3cc3bf=_0x2d64a5==null?void 0x0:_0x2d64a5['model'][_0x40d10d(0x1d5)](_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0xf3)]),_0x1140ec=_0x2d64a5?_(_0x2d64a5[_0x40d10d(0x1bd)]['body'],_0x51c6d8[_0x40d10d(0xf3)]):void 0x0;if(!_0x2d64a5||!_0x3cc3bf||!_0x1140ec)return!0x1;let _0x2f0908=Se(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0x220)],_0x51c6d8[_0x40d10d(0x1b9)]??[]);if(!_0x2f0908)return!0x1;let _0x365b2c=(0x0,e[_0x40d10d(0x127)])(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x2f0908);if(!_0x365b2c)return!0x1;let _0x186c01=je(_0x2d64a5['resource']);return _0x186c01[_0x40d10d(0x1e2)][_0x51c6d8[_0x40d10d(0xf3)]]={'formula':_0x51c6d8[_0x40d10d(0x220)],..._0x51c6d8[_0x40d10d(0x20b)]?{'numberFormat':_0x51c6d8[_0x40d10d(0x20b)]}:_0x3cc3bf[_0x40d10d(0x20b)]?{'numberFormat':_0x3cc3bf[_0x40d10d(0x20b)]}:null},q({'accessor':_0x171447,'document':_0x2d64a5[_0x40d10d(0x1fb)],'unitId':_0x2d64a5[_0x40d10d(0x15d)],'trigger':B['id'],'rangeId':_0x51c6d8['rangeId'],'previousResource':_0x2d64a5[_0x40d10d(0x148)],'nextResource':_0x186c01,'cursorOffset':_0x1140ec[_0x40d10d(0x20f)]+0x1,'externalMutations':_0x365b2c});}},V={'id':_0x4136c9(0x169),'type':t[_0x4136c9(0x1dc)]['COMMAND'],'handler':(_0x5c12f,_0x5afc6f)=>{const _0x2a4f35=_0x4136c9;if(!(_0x5afc6f!=null&&_0x5afc6f[_0x2a4f35(0xf3)]))return!0x1;let _0x3ed5c6=K(_0x5c12f,_0x5afc6f[_0x2a4f35(0x15d)],''),_0x5b7929=_0x3ed5c6==null?void 0x0:_0x3ed5c6[_0x2a4f35(0xf8)][_0x2a4f35(0x1d5)](_0x3ed5c6[_0x2a4f35(0x15d)],_0x5afc6f[_0x2a4f35(0xf3)]),_0x44d3ed=_0x3ed5c6?_(_0x3ed5c6[_0x2a4f35(0x1bd)][_0x2a4f35(0x1f5)],_0x5afc6f[_0x2a4f35(0xf3)]):void 0x0;if(!_0x3ed5c6||!_0x5b7929||!_0x44d3ed)return!0x1;let _0x36a215=je(_0x3ed5c6[_0x2a4f35(0x148)]);return _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]]={..._0x5b7929,..._0x5afc6f[_0x2a4f35(0x20b)]?{'numberFormat':_0x5afc6f['numberFormat']}:null},_0x5afc6f[_0x2a4f35(0x20b)]||delete _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]][_0x2a4f35(0x20b)],q({'accessor':_0x5c12f,'document':_0x3ed5c6[_0x2a4f35(0x1fb)],'unitId':_0x3ed5c6[_0x2a4f35(0x15d)],'trigger':V['id'],'rangeId':_0x5afc6f[_0x2a4f35(0xf3)],'previousResource':_0x3ed5c6[_0x2a4f35(0x148)],'nextResource':_0x36a215,'cursorOffset':_0x44d3ed['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x4136c9(0x1f9),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x518ca0,_0x2782f1)=>G(_0x518ca0,_0x2782f1,'',H['id'])},U={'id':_0x4136c9(0x20a),'type':t['CommandType'][_0x4136c9(0xff)],'handler':(_0x19e0c0,_0x144f6f)=>G(_0x19e0c0,_0x144f6f,(_0x144f6f==null?void 0x0:_0x144f6f[_0x4136c9(0x137)])??'',U['id'])},W={'id':_0x4136c9(0x13c),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x32dcb8,_0x38e17d)=>{const _0x3f9184=_0x4136c9;if(!(_0x38e17d!=null&&_0x38e17d['rangeId']))return!0x1;let _0x16623e=K(_0x32dcb8,_0x38e17d[_0x3f9184(0x15d)],'');if(!_0x16623e)return!0x1;let _0x48c49c=_0x32dcb8['get'](j)[_0x3f9184(0x18b)]({'unitId':_0x16623e[_0x3f9184(0x15d)],'rangeId':_0x38e17d[_0x3f9184(0xf3)]});return _0x48c49c?G(_0x32dcb8,_0x38e17d,_0x48c49c[_0x3f9184(0x137)],W['id']):!0x1;}};function G(_0x1d3fd6,_0x33d2b0,_0x5d23c1,_0x576f5d){const _0x353db2=_0x4136c9;if(!(_0x33d2b0!=null&&_0x33d2b0[_0x353db2(0xf3)]))return!0x1;let _0x3d0c66=K(_0x1d3fd6,_0x33d2b0[_0x353db2(0x15d)],'');if(!_0x3d0c66)return!0x1;let _0x3c3a0d=h({'documentData':_0x3d0c66[_0x353db2(0x1bd)],'resource':_0x3d0c66['resource'],'rangeId':_0x33d2b0[_0x353db2(0xf3)],'text':_0x5d23c1});return _0x3c3a0d?q({'accessor':_0x1d3fd6,'document':_0x3d0c66[_0x353db2(0x1fb)],'unitId':_0x3d0c66[_0x353db2(0x15d)],'trigger':_0x576f5d,'rangeId':_0x33d2b0[_0x353db2(0xf3)],'previousResource':_0x3d0c66[_0x353db2(0x148)],'nextResource':_0x3c3a0d[_0x353db2(0x22b)],'previousDocumentData':_0x3d0c66[_0x353db2(0x1bd)],'nextDocumentData':_0x3c3a0d[_0x353db2(0x149)],'cursorOffset':_0x3c3a0d[_0x353db2(0x1b7)],'externalMutations':{}}):!0x1;}function K(_0x238528,_0x1eeb4d,_0x4c4141){const _0x54cde0=_0x4136c9;if(_0x4c4141)return null;let _0x22c8ee=_0x238528['get'](t['IUniverInstanceService']),_0x38f689=(_0x1eeb4d?_0x22c8ee[_0x54cde0(0x16b)](_0x1eeb4d,t['UniverInstanceType'][_0x54cde0(0x163)]):_0x22c8ee['getCurrentUnitOfType'](t[_0x54cde0(0x110)][_0x54cde0(0x163)]))??null;if(!_0x38f689)return null;let _0x2251ee=_0x38f689[_0x54cde0(0x1eb)](),_0x3d2d37=_0x2251ee[_0x54cde0(0x1f5)];if(_0x2251ee[_0x54cde0(0x1db)]||!_0x3d2d37)return null;let _0x1cd282=_0x238528[_0x54cde0(0xfc)](O);return _0x1cd282[_0x54cde0(0x13e)](_0x38f689[_0x54cde0(0x14c)]())?null:{'document':_0x38f689,'body':_0x3d2d37,'documentData':_0x2251ee,'model':_0x1cd282,'resource':_0x1cd282[_0x54cde0(0x109)](_0x38f689[_0x54cde0(0x14c)]())??c(),'unitId':_0x38f689[_0x54cde0(0x14c)]()};}function be(_0x1b3364,_0x1e9c6a){const _0x5c658c=_0x4136c9;var _0x57a419;return(_0x57a419=_0x1b3364[_0x5c658c(0xfc)](n[_0x5c658c(0x173)])[_0x5c658c(0xf9)]({'subUnitId':_0x1e9c6a,'unitId':_0x1e9c6a}))==null?void 0x0:_0x57a419[0x0];}function xe(_0x44f283,_0xfb75ce,_0x5a87e7){const _0x50084b=_0x4136c9;if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x1ee)){var _0x1df23a;let _0xa17099=((_0x1df23a=_0xfb75ce[_0x50084b(0x191)])==null?void 0x0:_0x1df23a[_0x50084b(0x1e1)](_0x349a75=>_0x349a75['paragraphId']===_0x44f283[_0x50084b(0x17f)]))??[];if(_0xa17099[_0x50084b(0x13a)]!==0x1)return null;let _0x1735a4=_0xa17099[0x0],_0x4fa515=(0x0,t[_0x50084b(0x1f0)])(_0xfb75ce,_0x1735a4),_0x578f23=_0x1735a4['startIndex']-_0x4fa515,_0x3e9e19=_0x44f283[_0x50084b(0x16a)]===_0x50084b(0x147)?_0x578f23:_0x44f283[_0x50084b(0x16a)];if(!Number['isInteger'](_0x3e9e19)||_0x3e9e19<0x0||_0x3e9e19>_0x578f23)return null;let _0x95e009=_0x4fa515+_0x3e9e19;return{'startOffset':_0x95e009,'endOffset':_0x95e009};}if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x125))return!Number[_0x50084b(0x167)](_0x44f283[_0x50084b(0x16f)])||!Number['isInteger'](_0x44f283[_0x50084b(0x22e)])?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x44f283['startOffset'],_0x44f283[_0x50084b(0x22e)]),'endOffset':Math[_0x50084b(0x17c)](_0x44f283[_0x50084b(0x16f)],_0x44f283[_0x50084b(0x22e)])};let _0x497772=(_0x44f283==null?void 0x0:_0x44f283[_0x50084b(0x1ff)])===_0x50084b(0x1ba)?_0x44f283[_0x50084b(0x1ba)]:_0x5a87e7;return!_0x497772||_0x497772[_0x50084b(0x150)]?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x497772[_0x50084b(0x16f)],_0x497772['endOffset']),'endOffset':Math[_0x50084b(0x17c)](_0x497772[_0x50084b(0x16f)],_0x497772[_0x50084b(0x22e)])};}function Se(_0x4f9074,_0x49b196,_0x3aeadb,_0x252683){const _0x4abcfc=_0x4136c9;let _0x45144a=_0x4f9074[_0x4abcfc(0xfc)](r[_0x4abcfc(0xfd)]),_0xa17bbe=_0x3aeadb[_0x4abcfc(0x1bf)]('=')?_0x3aeadb[_0x4abcfc(0x200)](0x1):_0x3aeadb,_0x1af408=_0x45144a['sequenceNodesBuilder'](_0xa17bbe);if(!_0x1af408)return null;let _0x3a2065=_0x4f9074[_0x4abcfc(0xfc)](e['HostExternalReferenceModel']),_0x3d4a61=(0x0,e[_0x4abcfc(0x19d)])({'qualifiers':(0x0,e['collectFormulaExternalReferenceQualifiers'])(_0x1af408),'explicitReferences':_0x252683??[],'resolveBinding':_0xf321ed=>_0x3a2065[_0x4abcfc(0x10c)](_0x49b196,_0xf321ed)});return _0x3d4a61[_0x4abcfc(0x1b4)]===_0x4abcfc(0x181)?_0x3d4a61[_0x4abcfc(0x19f)]:null;}function Ce(_0x9f8668,_0x489570,_0xaf196d){const _0x5bfb81=_0x4136c9;var _0xb90fef;let _0x57cf1f=(0x0,t[_0x5bfb81(0x1b5)])(0x6);for(;_0x9f8668!=null&&(_0xb90fef=_0x9f8668[_0x5bfb81(0x103)])!=null&&_0xb90fef['some'](_0x48dd82=>_0x48dd82[_0x5bfb81(0xf3)]===_0x57cf1f)||_0x489570[_0x5bfb81(0x1d5)](_0xaf196d,_0x57cf1f);)_0x57cf1f=(0x0,t['generateRandomId'])(0x6);return _0x57cf1f;}function we(_0x940fd4){try{return te(_0x940fd4);}catch(_0x35a542){if(_0x35a542 instanceof m)return null;throw _0x35a542;}}function Te(_0x32b8a8){const _0x4938c4=_0x4136c9;let _0x29e9fa=_0x32b8a8['previousDocumentData']&&_0x32b8a8[_0x4938c4(0x149)]?De(_0x32b8a8[_0x4938c4(0x1fb)],_0x32b8a8['unitId'],_0x32b8a8[_0x4938c4(0xf5)],_0x32b8a8[_0x4938c4(0x149)],_0x32b8a8[_0x4938c4(0x1b7)],_0x32b8a8[_0x4938c4(0x226)]):null;return _0x32b8a8[_0x4938c4(0xf5)]&&_0x32b8a8['nextDocumentData']&&!_0x29e9fa?null:{'documentRedo':_0x29e9fa,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x22b)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x1c2)]}}};}function Ee(_0x2e2d18,_0x54164e,_0xfa144e,_0x19f9b7){const _0x20747=_0x4136c9;_0x19f9b7['pushUndoRedo']({'id':_0x2e2d18[_0x20747(0x226)]+':'+_0x2e2d18['rangeId'],'unitID':_0x2e2d18[_0x20747(0x15d)],'redoMutations':[..._0x2e2d18['externalMutations'][_0x20747(0x218)]?[_0x2e2d18['externalMutations']['redoMutation']]:[],..._0x54164e[_0x20747(0x151)]?[_0x54164e[_0x20747(0x151)]]:[],_0x54164e[_0x20747(0x16e)]],'undoMutations':[_0x54164e[_0x20747(0x1a2)],..._0xfa144e?[_0xfa144e]:[],..._0x2e2d18[_0x20747(0x114)][_0x20747(0x1f6)]?[_0x2e2d18[_0x20747(0x114)]['undoMutation']]:[]]});}function q(_0xce4ebf){const _0x4308ef=_0x4136c9;let _0xff7027=_0xce4ebf[_0x4308ef(0x1c6)]['get'](t[_0x4308ef(0x192)]),_0x7d8434=_0xce4ebf[_0x4308ef(0x1c6)][_0x4308ef(0xfc)](t[_0x4308ef(0x101)]),_0x22041e=_0xce4ebf[_0x4308ef(0x1c6)]['get'](n['DocSelectionManagerService']),_0x2262b0=Te(_0xce4ebf);if(!_0x2262b0)return!0x1;let _0x66684=!0x1,_0x46e40a=null,_0x5360a9=!0x1;try{if(_0xce4ebf['externalMutations'][_0x4308ef(0x218)]){if(!_0xff7027[_0x4308ef(0x1aa)](_0xce4ebf[_0x4308ef(0x114)][_0x4308ef(0x218)]['id'],_0xce4ebf['externalMutations'][_0x4308ef(0x218)][_0x4308ef(0x1be)]))return!0x1;_0x66684=!0x0;}if(_0x2262b0['documentRedo']){let _0x257469=_0xff7027[_0x4308ef(0x1aa)](_0x2262b0['documentRedo']['id'],_0x2262b0['documentRedo'][_0x4308ef(0x1be)]);if(!_0x257469)return J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x46e40a={'id':n['RichTextEditingMutation']['id'],'params':{..._0x257469,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x16e)]['id'],_0x2262b0[_0x4308ef(0x16e)][_0x4308ef(0x1be)]))return Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x5360a9=!0x0,Ee(_0xce4ebf,_0x2262b0,_0x46e40a,_0x7d8434);}catch(_0x210e00){throw _0x5360a9&&_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x1a2)]['id'],_0x2262b0[_0x4308ef(0x1a2)][_0x4308ef(0x1be)]),Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),_0x210e00;}return _0x22041e[_0x4308ef(0x1c4)]([{'startOffset':_0xce4ebf['cursorOffset'],'endOffset':_0xce4ebf['cursorOffset'],'segmentId':''}],{'unitId':_0xce4ebf[_0x4308ef(0x15d)],'subUnitId':_0xce4ebf[_0x4308ef(0x15d)]},!0x1,{[n[_0x4308ef(0x1de)]]:!0x0}),!0x0;}function De(_0x321e03,_0x32b96d,_0x5cd652,_0x348d18,_0x140365,_0x1fd783){const _0x5c8f30=_0x4136c9;let _0x4ef001=ke(_0x5cd652,_0x348d18,(0x0,t[_0x5c8f30(0x11b)])(_0x321e03,''));return _0x4ef001?{'id':n[_0x5c8f30(0x1ec)]['id'],'params':{'unitId':_0x32b96d,'actions':_0x4ef001,'segmentId':'','textRanges':[{'startOffset':_0x140365,'endOffset':_0x140365,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x1fd783}}:null;}function Oe(_0x3e6a9d,_0x107345){const _0x3865ff=_0x4136c9;_0x107345&&_0x3e6a9d[_0x3865ff(0x1aa)](_0x107345['id'],_0x107345[_0x3865ff(0x1be)]);}function J(_0x584c4a,_0x56bb66,_0x4e3c6f){const _0x3cbca1=_0x4136c9;_0x4e3c6f&&_0x56bb66[_0x3cbca1(0x1f6)]&&_0x584c4a[_0x3cbca1(0x1aa)](_0x56bb66[_0x3cbca1(0x1f6)]['id'],_0x56bb66[_0x3cbca1(0x1f6)]['params']);}function ke(_0xb2dea5,_0x284eba,_0x1f8932){const _0x2f21b9=_0x4136c9;let _0x46e83f=_0xb2dea5['body'],_0x51df84=_0x284eba[_0x2f21b9(0x1f5)],_0x58a87f=Ae(_0x46e83f==null?void 0x0:_0x46e83f[_0x2f21b9(0xf0)],_0x51df84==null?void 0x0:_0x51df84[_0x2f21b9(0xf0)]);if(!_0x58a87f||!_0x51df84)return null;let _0x5adb7c=new t['TextX']();return _0x5adb7c[_0x2f21b9(0x1a4)](_0x58a87f[_0x2f21b9(0x186)]),_0x58a87f[_0x2f21b9(0x22f)]>0x0&&_0x5adb7c[_0x2f21b9(0x179)](_0x58a87f[_0x2f21b9(0x22f)],(0x0,t['getBodySliceForTextXAction'])(_0x51df84,_0x58a87f[_0x2f21b9(0x186)],_0x58a87f[_0x2f21b9(0x186)]+_0x58a87f['insertLength'],!0x1)),_0x58a87f[_0x2f21b9(0x1c9)]>0x0&&_0x5adb7c['delete'](_0x58a87f[_0x2f21b9(0x1c9)]),t[_0x2f21b9(0x153)]['getInstance']()['editOp'](_0x5adb7c[_0x2f21b9(0x206)](),_0x1f8932);}function Ae(_0x2780b6,_0x312fd3){const _0x2675a3=_0x4136c9;if(_0x2780b6==null||_0x312fd3==null||_0x2780b6===_0x312fd3)return null;let _0x40eb16=0x0;for(;_0x40eb16<_0x2780b6[_0x2675a3(0x13a)]&&_0x40eb16<_0x312fd3[_0x2675a3(0x13a)]&&_0x2780b6[_0x40eb16]===_0x312fd3[_0x40eb16];)_0x40eb16+=0x1;let _0x1a2f15=_0x2780b6[_0x2675a3(0x13a)],_0x513fd8=_0x312fd3[_0x2675a3(0x13a)];for(;_0x1a2f15>_0x40eb16&&_0x513fd8>_0x40eb16&&_0x2780b6[_0x1a2f15-0x1]===_0x312fd3[_0x513fd8-0x1];)--_0x1a2f15,--_0x513fd8;return{'start':_0x40eb16,'deleteLength':_0x1a2f15-_0x40eb16,'insertLength':_0x513fd8-_0x40eb16};}function je(_0x161713){const _0x26904f=_0x4136c9;return{'schemaVersion':0x1,'formulas':Object[_0x26904f(0x209)](Object[_0x26904f(0x176)](_0x161713[_0x26904f(0x1e2)])[_0x26904f(0x166)](([_0x2686a6,_0x414fff])=>[_0x2686a6,{..._0x414fff,..._0x414fff[_0x26904f(0x20b)]?{'numberFormat':{..._0x414fff[_0x26904f(0x20b)]}}:null,..._0x414fff['lastValue']?{'lastValue':{..._0x414fff[_0x26904f(0x145)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x3df394,_0x16d376,_0x537328,_0x34aee8){const _0x1c2cf5=_0x4136c9;super(),this[_0x1c2cf5(0x19a)]=_0x3df394,this[_0x1c2cf5(0x1e5)]=_0x16d376,this[_0x1c2cf5(0xf2)]=_0x537328,this[_0x1c2cf5(0x202)]=_0x34aee8,D(this,_0x1c2cf5(0x1a5),new Set()),D(this,'_syncScheduled',!0x1),D(this,_0x1c2cf5(0x133),!0x1),this[_0x1c2cf5(0x19a)]['getAllUnitsForType'](t[_0x1c2cf5(0x110)][_0x1c2cf5(0x163)])[_0x1c2cf5(0x1a1)](_0x44d67a=>this[_0x1c2cf5(0x202)][_0x1c2cf5(0xf4)](_0x44d67a)),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0xf2)][_0x1c2cf5(0x12a)][_0x1c2cf5(0x21a)](({unitId:_0x50b220})=>this[_0x1c2cf5(0x14e)](_0x50b220))),this['disposeWithMe'](this[_0x1c2cf5(0x19a)]['unitAdded$'][_0x1c2cf5(0x21a)](({unit:_0x43a644})=>{const _0x559b2b=_0x1c2cf5;_0x43a644['type']===t[_0x559b2b(0x110)][_0x559b2b(0x163)]&&this[_0x559b2b(0x1a0)](_0x43a644['getUnitId']());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x19a)][_0x1c2cf5(0x17e)]['subscribe'](_0x58c6aa=>{const _0x1c77e7=_0x1c2cf5;this[_0x1c77e7(0x202)][_0x1c77e7(0x219)](_0x58c6aa[_0x1c77e7(0x14c)]());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x1e5)][_0x1c2cf5(0x1ce)](_0x14a8c1=>{const _0x2ce598=_0x1c2cf5;if(_0x14a8c1['id']===n['RichTextEditingMutation']['id']&&Me(_0x14a8c1[_0x2ce598(0x1be)])){let _0x241738=_0x14a8c1[_0x2ce598(0x1be)];_0x241738[_0x2ce598(0x150)]||this[_0x2ce598(0x14e)](_0x241738['unitId']);}}));}[_0x4136c9(0x1fc)](){const _0x5c2a17=_0x4136c9;this['_isDisposed']=!0x0,super[_0x5c2a17(0x1fc)]();}[_0x4136c9(0x1a0)](_0x2d1038){const _0x238633=_0x4136c9;this[_0x238633(0x1a5)][_0x238633(0x10b)](_0x2d1038),!this[_0x238633(0x198)]&&(this[_0x238633(0x198)]=!0x0,queueMicrotask(()=>{const _0x461301=_0x238633;if(this[_0x461301(0x198)]=!0x1,this['_isDisposed'])return;let _0x5770b2=Array[_0x461301(0x21b)](this[_0x461301(0x1a5)]);this['_pendingUnitIds'][_0x461301(0x213)](),_0x5770b2[_0x461301(0x1a1)](_0x2aef85=>this['_syncUnit'](_0x2aef85));}));}[_0x4136c9(0x14e)](_0x1f16e5){const _0x4e9d3f=_0x4136c9;let _0x4f6b43=this[_0x4e9d3f(0x19a)][_0x4e9d3f(0x16b)](_0x1f16e5,t['UniverInstanceType'][_0x4e9d3f(0x163)]);_0x4f6b43&&this[_0x4e9d3f(0x202)][_0x4e9d3f(0xf4)](_0x4f6b43);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x4136c9(0x192)]),k(0x2,(0x0,t[_0x4136c9(0x172)])(O)),k(0x3,(0x0,t[_0x4136c9(0x172)])(j))],Y);function Me(_0x32d9cb){const _0x1355ed=_0x4136c9;return typeof _0x32d9cb==_0x1355ed(0x217)&&!!_0x32d9cb&&_0x1355ed(0x15d)in _0x32d9cb&&typeof _0x32d9cb[_0x1355ed(0x15d)]==_0x1355ed(0x122)&&(!(_0x1355ed(0x150)in _0x32d9cb)||_0x32d9cb[_0x1355ed(0x150)]===void 0x0||typeof _0x32d9cb[_0x1355ed(0x150)]==_0x1355ed(0x122));}let X=class extends t[_0x4136c9(0x208)]{constructor(_0x192be5,_0x33c170){const _0xf190e4=_0x4136c9;super(),this[_0xf190e4(0x189)]=_0x192be5,this['_docFormulaModel']=_0x33c170,this[_0xf190e4(0x1bb)](this[_0xf190e4(0x189)][_0xf190e4(0x1a6)]({'pluginName':o,'businesses':[t[_0xf190e4(0x110)][_0xf190e4(0x163)]],'toJson':_0x57c662=>JSON['stringify'](this[_0xf190e4(0x1cc)][_0xf190e4(0x206)](_0x57c662)),'parseJson':_0x36a906=>JSON[_0xf190e4(0x21d)](_0x36a906),'onLoad':(_0x45d560,_0x26328b)=>{const _0xb9c2a0=_0xf190e4;this[_0xb9c2a0(0x1cc)]['load'](_0x45d560,_0x26328b);},'onUnLoad':_0x34ffde=>this[_0xf190e4(0x1cc)]['removeUnit'](_0x34ffde)}));}};X=A([k(0x0,t['IResourceManagerService']),k(0x1,(0x0,t[_0x4136c9(0x172)])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x4136c9(0x14f);const Fe={};let Z=class extends t[_0x4136c9(0x208)]{constructor(_0x103a66,_0x21ab71,_0x49291f){const _0x29b623=_0x4136c9;super(),this[_0x29b623(0x1e9)]=_0x103a66,this['_formulaService']=_0x21ab71,this[_0x29b623(0x1bb)](_0x49291f[_0x29b623(0x1b1)]({'resolve':(_0x3f7cd8,_0x21e500)=>{const _0x434c9f=_0x29b623;var _0x112eb6;return((_0x112eb6=_0x21e500[_0x434c9f(0x103)])==null?void 0x0:_0x112eb6['filter'](g)[_0x434c9f(0x166)](_0x5d904c=>({'startOffset':_0x5d904c[_0x434c9f(0x1fe)],'endOffset':_0x5d904c['endIndex']+0x1,'text':this['resolveFormula'](_0x3f7cd8,_0x5d904c[_0x434c9f(0xf3)])})))??[];}})),this[_0x29b623(0x1bb)](this[_0x29b623(0x1b3)][_0x29b623(0x1da)][_0x29b623(0x21a)](({unitId:_0x2b8fd7})=>{const _0x2927df=_0x29b623;_0x49291f[_0x2927df(0x165)](_0x2b8fd7);}));}[_0x4136c9(0x1ea)](_0x3b2fb5,_0xeab22f){const _0x1f8efd=_0x4136c9;var _0x71aefd;return((_0x71aefd=this[_0x1f8efd(0x1b3)][_0x1f8efd(0x18b)]({'unitId':_0x3b2fb5,'rangeId':_0xeab22f}))==null?void 0x0:_0x71aefd[_0x1f8efd(0x137)])??'';}[_0x4136c9(0x16d)](_0x19cd77,_0x2ca7d2,_0xfa185b){const _0x29e26b=_0x4136c9;var _0x19d577;let _0x6f54b3=this['_univerInstanceService'][_0x29e26b(0x16b)](_0x19cd77,t[_0x29e26b(0x110)][_0x29e26b(0x163)]),_0x124251=_0x6f54b3==null?void 0x0:_0x6f54b3[_0x29e26b(0x11a)]();if(!_0x124251)return'';let _0x16d5f4=_0x124251['dataStream'][_0x29e26b(0x200)](_0x2ca7d2,_0xfa185b),_0x3143bb=((_0x19d577=_0x124251[_0x29e26b(0x103)])==null?void 0x0:_0x19d577[_0x29e26b(0x1e1)](_0x44bf06=>g(_0x44bf06)&&_0x44bf06[_0x29e26b(0x1fe)]>=_0x2ca7d2&&_0x44bf06[_0x29e26b(0x20f)]<_0xfa185b)[_0x29e26b(0x1e4)]((_0x4f9b94,_0x3a9025)=>_0x3a9025[_0x29e26b(0x1fe)]-_0x4f9b94[_0x29e26b(0x1fe)]))??[];for(let _0x53113a of _0x3143bb){let _0x47a57b=_0x53113a[_0x29e26b(0x1fe)]-_0x2ca7d2,_0x107300=_0x53113a['endIndex']-_0x2ca7d2+0x1;_0x16d5f4=''+_0x16d5f4[_0x29e26b(0x200)](0x0,_0x47a57b)+this[_0x29e26b(0x1ea)](_0x19cd77,_0x53113a[_0x29e26b(0xf3)])+_0x16d5f4[_0x29e26b(0x200)](_0x107300);}return _0x16d5f4;}[_0x4136c9(0xfa)](_0x382dba){return Ie(_0x382dba);}[_0x4136c9(0x107)](_0x1077fa,_0x3f8a67,_0x523294={}){const _0x2f9798=_0x4136c9;var _0x1eb81b;return re({'id':_0x1077fa,'body':_0x3f8a67,'documentStyle':{}},(((_0x1eb81b=_0x3f8a67['customRanges'])==null?void 0x0:_0x1eb81b[_0x2f9798(0x1e1)](g))??[])['map'](_0x1adec7=>({'rangeId':_0x1adec7['rangeId'],'text':_0x523294[_0x1adec7[_0x2f9798(0xf3)]]??this[_0x2f9798(0x1ea)](_0x1077fa,_0x1adec7[_0x2f9798(0xf3)])})))[_0x2f9798(0x1f5)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x4136c9(0x144)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x4136c9(0x216)]))],Z);function Ie(_0x7c15ae){const _0x6ad3e2=_0x4136c9;var _0x3ccb43,_0x55ef02;let _0x5df77d=Le(_0x7c15ae),_0xefeb35=re(_0x7c15ae,(((_0x3ccb43=_0x7c15ae[_0x6ad3e2(0x1f5)])==null||(_0x3ccb43=_0x3ccb43['customRanges'])==null?void 0x0:_0x3ccb43['filter'](g))??[])[_0x6ad3e2(0x166)](_0x16326c=>({'rangeId':_0x16326c['rangeId'],'text':Re(_0x5df77d==null?void 0x0:_0x5df77d[_0x6ad3e2(0x1e2)][_0x16326c[_0x6ad3e2(0xf3)]])})));return _0xefeb35[_0x6ad3e2(0x1d2)]=(_0x55ef02=_0xefeb35['resources'])==null?void 0x0:_0x55ef02[_0x6ad3e2(0x1e1)](_0x39bfda=>_0x39bfda['name']!==o),_0xefeb35;}function Le(_0x28b1d1){const _0x3e9459=_0x4136c9;var _0x3fe929;let _0xd5029f=(_0x3fe929=_0x28b1d1[_0x3e9459(0x1d2)])==null||(_0x3fe929=_0x3fe929[_0x3e9459(0x124)](_0x44ab29=>_0x44ab29[_0x3e9459(0x1c8)]===_0x3e9459(0x116)))==null?void 0x0:_0x3fe929[_0x3e9459(0x1dd)];if(_0xd5029f)try{let _0x4af4a7=JSON[_0x3e9459(0x21d)](_0xd5029f);return l(_0x4af4a7)?_0x4af4a7:void 0x0;}catch{return;}}function Re(_0x2494fb){const _0xa07cb3=_0x4136c9;return _0x2494fb?(0x0,e[_0xa07cb3(0x10e)])({'lastValue':_0x2494fb[_0xa07cb3(0x145)],'numberFormat':_0x2494fb[_0xa07cb3(0x20b)]})[_0xa07cb3(0x137)]:'';}let Q=class extends t['Disposable']{constructor(_0x4cb7d4,_0x5a799f,_0x4355de){const _0x120a06=_0x4136c9;super(),this[_0x120a06(0x1b3)]=_0x4cb7d4,this[_0x120a06(0x11c)]=_0x5a799f,this[_0x120a06(0x1bb)](_0x4355de[_0x120a06(0x1c5)](this));}['collectMutations'](_0x40ce32){const _0x564847=_0x4136c9;let _0x272cbc=new Map();for(let _0x29296f of this['_formulaService'][_0x564847(0x210)]()){var _0x2215b0;if(!this[_0x564847(0x11c)][_0x564847(0x19c)](_0x29296f['config'][_0x564847(0x220)],_0x29296f[_0x564847(0xfe)])[_0x564847(0x1d8)])continue;let _0xf492ec=(0x0,e[_0x564847(0x21f)])(_0x29296f[_0x564847(0xfe)]),_0x32e529=_0xf492ec?(0x0,e[_0x564847(0x177)])(_0xf492ec):null;if(!_0x32e529||ze(_0x29296f[_0x564847(0x1ab)][_0x564847(0x145)],_0x32e529))continue;let _0x5866d6=_0x272cbc[_0x564847(0xfc)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)])??[];_0x5866d6[_0x564847(0x18c)]({'rangeId':_0x29296f[_0x564847(0x1e3)][_0x564847(0xf3)],'expectedFormula':_0x29296f[_0x564847(0x1ab)][_0x564847(0x220)],'expectedNumberFormat':(_0x2215b0=_0x29296f[_0x564847(0x1ab)][_0x564847(0x20b)])==null?void 0x0:_0x2215b0['pattern'],'expectedReferenceRevision':_0x29296f['referenceRevision'],'lastValue':_0x32e529}),_0x272cbc[_0x564847(0x1d0)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)],_0x5866d6);}return Array[_0x564847(0x21b)](_0x272cbc,([_0x26fd66,_0x47d124])=>({'id':R['id'],'params':{'unitId':_0x26fd66,'updates':_0x47d124}}));}};Q=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(j)),k(0x1,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1a3)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x480a9e,_0x85b674){const _0x46ee50=_0x4136c9;return(_0x480a9e==null?void 0x0:_0x480a9e['v'])===_0x85b674['v']&&(_0x480a9e==null?void 0x0:_0x480a9e['t'])===_0x85b674['t']&&(_0x480a9e==null?void 0x0:_0x480a9e[_0x46ee50(0x168)])===_0x85b674[_0x46ee50(0x168)];}let $=class extends t[_0x4136c9(0x185)]{constructor(_0x35655f=Fe,_0x59b549,_0x41fc24,_0x40e3c8){const _0x26f9ae=_0x4136c9;super(),this['_config']=_0x35655f,this[_0x26f9ae(0x131)]=_0x59b549,this['_commandService']=_0x41fc24,this[_0x26f9ae(0x159)]=_0x40e3c8;let {..._0x1e8557}=(0x0,t[_0x26f9ae(0x160)])({},Fe,this['_config']);this[_0x26f9ae(0x159)]['setConfig'](_0x26f9ae(0x1f2),_0x1e8557);}['onStarting'](){const _0x4fccd0=_0x4136c9;this[_0x4fccd0(0x131)]['add']([O]),this[_0x4fccd0(0x131)]['add']([j]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([X]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Y]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Q]),this['_injector'][_0x4fccd0(0x10b)]([Z]),(0x0,t[_0x4fccd0(0x1f1)])(this[_0x4fccd0(0x131)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x18aecb=>this['disposeWithMe'](this[_0x4fccd0(0x1e5)]['registerCommand'](_0x18aecb)));}};D($,_0x4136c9(0x1f3),o),D($,_0x4136c9(0x1ac),Ne),D($,_0x4136c9(0x141),Pe),D($,'type',t[_0x4136c9(0x110)][_0x4136c9(0x163)]),$=A([(0x0,t[_0x4136c9(0x223)])(a[_0x4136c9(0x224)],e[_0x4136c9(0x1df)],n[_0x4136c9(0x108)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(t['Injector'])),k(0x2,t[_0x4136c9(0x192)]),k(0x3,t['IConfigService'])],$),exports[_0x4136c9(0x1ed)]=W,exports[_0x4136c9(0x1ae)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x4136c9(0x116)]=o,exports['DOC_FORMULA_SCHEMA_VERSION']=0x1,Object['defineProperty'](exports,_0x4136c9(0x14b),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x4136c9(0x211)](exports,_0x4136c9(0x174),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object[_0x4136c9(0x211)](exports,'DocFormulaResourceController',{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x4136c9(0x190)]=ve,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x115),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x4136c9(0x18f)]=z,exports[_0x4136c9(0x128)]=m,exports[_0x4136c9(0x10d)]=H,exports['RemoveDocFormulaMutation']=I,exports[_0x4136c9(0x1f7)]=U,exports[_0x4136c9(0x154)]=R,exports[_0x4136c9(0x22a)]=F,exports[_0x4136c9(0x1f4)]=V,exports[_0x4136c9(0x1e8)]=L,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x17d),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x4136c9(0x155)]=B,exports[_0x4136c9(0xf1)]=ie,exports[_0x4136c9(0x152)]=te,exports['buildRemoveDocFormulaActions']=h,exports[_0x4136c9(0x201)]=ne,exports[_0x4136c9(0x1cb)]=c,exports[_0x4136c9(0x229)]=Ie,exports[_0x4136c9(0x18e)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x4136c9(0x16c)]=l,exports[_0x4136c9(0x11e)]=d;
1
+ const _0x57036f=_0x2b8a;(function(_0x254e82,_0xf71dc){const _0x4e3b04=_0x2b8a,_0x3098e5=_0x254e82();while(!![]){try{const _0x4b9f08=parseInt(_0x4e3b04(0x129))/0x1*(parseInt(_0x4e3b04(0x1cb))/0x2)+parseInt(_0x4e3b04(0x17c))/0x3*(parseInt(_0x4e3b04(0x22f))/0x4)+parseInt(_0x4e3b04(0x154))/0x5+-parseInt(_0x4e3b04(0x13a))/0x6+parseInt(_0x4e3b04(0x212))/0x7*(parseInt(_0x4e3b04(0x20b))/0x8)+-parseInt(_0x4e3b04(0x13f))/0x9+-parseInt(_0x4e3b04(0x11b))/0xa;if(_0x4b9f08===_0xf71dc)break;else _0x3098e5['push'](_0x3098e5['shift']());}catch(_0x1c88f7){_0x3098e5['push'](_0x3098e5['shift']());}}}(_0x28b6,0x67869),Object[_0x57036f(0x165)](exports,Symbol[_0x57036f(0x199)],{'value':_0x57036f(0x158)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0x57036f(0x1a5),s='univer-docs-formula';function c(){return{'formulas':{}};}function l(_0x198848){const _0x2bf5a5=_0x57036f;return!_0x198848||typeof _0x198848!='object'||!(_0x2bf5a5(0x1f8)in _0x198848)||!_0x198848[_0x2bf5a5(0x1f8)]||typeof _0x198848[_0x2bf5a5(0x1f8)]!=_0x2bf5a5(0x190)||Array[_0x2bf5a5(0x18f)](_0x198848['formulas'])?!0x1:Object[_0x2bf5a5(0x217)](_0x198848['formulas'])[_0x2bf5a5(0x198)](([_0x28f63f,_0x39f4da])=>_0x28f63f[_0x2bf5a5(0x1e9)]>0x0&&u(_0x39f4da));}function _0x28b6(){const _0x19b437=['ConvertDocFormulaToTextCommand','set','UniverLicensePlugin','getCustomRangeInterval','getRegisteredFormulas','RichTextEditingMutation','docs-formula.mutation.set-resource','deleteFormula','lastValue','findDocFormulaRange','collectMutations','retain','formulaResult$','updates','position','type','get','_injector','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','expectedNumberFormat','max','segmentId','pending','assign','previousResource','CustomRangeType','DocFormulaResourceController','endsWith','expectedReferenceRevision','RemoveDocFormulaCommand','LexerTreeBuilder','PENDING','accessor','insert','presentationChanged$','_configService','getPresentation','2247390QzowrK','getUnit','identity','DocTextResolverService','registerPluginResource','boolean','_deleteRegistration','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_syncUnit','success','univer-docs-formula','formula','constructor','customRanges','168275PIgWxR','COLUMN_GROUP_START','resolveFormula','sort','touchDependencies','_formulaService','InsertDocFormulaCommand','getFormula','previousDocumentData','docs-formula.command.remove','invalid-resource','clear','OtherFormulaBizType','Inject','documentRedo','tables','RemoveDocFormulaMutation','2567304SHPjmK','DataStreamTreeTokenType','BLOCK_END','startOffset','next','6551631OlscJR','collectFormulaExternalReferenceQualifiers','resources','keys','FormulaCacheEligibilityService','getResource','_preserveInvalid','default','stringify','setConfig','degradeBody','startIndex','shiftInclusiveRangeOnInsert','function','_pendingUnitIds','syncUnit','status','redoMutation','insertLength','removeUnit','dataStream','560595emzXGc','_resources','_updateFormulaResult','disposeWithMe','Module','assertSafeDocFormulaInsertRange','ICommandService','_change$','subscribe','_service','symbol','resolveHostFormulaExternalReferences','docs-formula.mutation.set-formula','SetDocFormulaNumberFormatCommand','sectionBreaks','getCurrentUnitOfType','UniverProFormulaEnginePlugin','defineProperty','endOffset','DocFormulaResultStatus','Subject','getAllUnitsForType','UniverDocsPlugin','UniverInstanceType','_resourceManagerService','COLUMN_START','TextX','add','body','getSnapshot','error','serialize','values','start','resourceRedo','TABLE_START','docs-formula.mutation.set-last-values','COLUMN_GROUP_END','_instanceService','formulaId','3jrIWcV','documentData','_model','_syncScheduled','_formulaKeys','getFormulas','getScalarFormulaResultCell','text','Plugin','number','_setPresentation','COLUMN_END','syncExecuteCommand','endIndex','asObservable','docs-formula.command.update','shiftExclusiveRangeOnDelete','unregisterUnit','unitId','isArray','object','ERROR','paragraphId','_univerInstanceService','IResourceManagerService','_registrations','externalReferences','UniverDocsFormulaPlugin','every','toStringTag','COMMAND','_queueSync','liveResult','setFormulas','_config','deleteLength','customDecorations','buildUpdateDocFormulaActions','degradeDocumentData','source','Tools','DOC_FORMULA_PLUGIN','_rawResources','_isDisposed','end','getBody','docs-formula.command.convert-to-text','rangeId','find','selection','trim','columnGroups','_docFormulaModel','resolveFormulaResultPresentation','range','string','createEmptyDocFormulaResource','DocSelectionManagerService','decorate','setResource','register','@univerjs-pro/docs-formula','change$','target','UNIVER_DOC','disabled','paragraphs','document','EMPTY','resource','SetDocFormulaResourceMutation','eligible','stale','docs-formula.command.insert','nextDocumentData','docs-formula.command.set-number-format','pattern','cursorOffset','dispose','10LCQJyp','slice','removeFormula','textRuns','config','params','_commandService','undoMutation','trigger','TABLE_ROW_START','load','pluginName','customBlocks','HostExternalReferenceModel','from','degradeDocFormulaDocumentData','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','isDocFormulaResource','unitDisposed$','getLoadError','wholeEntity','buildInsertDocFormulaActions','TABLE_CELL_END','TABLE_CELL_START','DOC_FORMULA_OBJECT_REPLACEMENT','docs-formula.config','numberFormat','_hostExternalReferenceModel','CUSTOM_BLOCK','startsWith','length','onCommandExecuted','empty','toFormulaLastValue','referenceRevision','registerFormulaWithRange','presentation','blockRanges','externalMutations','DocFormulaDisplayTextService','expectedFormula','1.4.0','delete','_registrationService','setFormula','formulas','TABLE_END','PARAGRAPH','push','registerProvider','JSONX','references','deepClone','isFormulaLastValue','Disposable','docs-formula.mutation.remove-formula','includes','Injector','filter','cell','resolveText','packageName','nextResource','DOC_FORMULA_CUSTOM_RANGE_KIND','32DyeNow','assess','SUCCESS','unregister','TABLE_ROW_END','name','_loadErrors','165151wgKbHb','DocFormulaModel','IUniverInstanceService','shiftExclusiveRangeOnInsert','DocFormulaService','entries','resolved','BLOCK_START','fromEntries','resolveBinding','getBodySliceForTextXAction','merge','_cacheEligibilityService','forEach','buildUpsertHostExternalReferenceMutations','getInstance','_presentationChanged$','RegisterOtherFormulaService','DOC','CommandType','shiftInclusiveRangeOnDelete','resourceUndo','has','docs-formula.command.replace-with-text','MUTATION','registerCommand','min','color','getUnitId','3027028jkQOVp','parse','SECTION_BREAK','call','model','InvalidDocFormulaInsertRangeError','map','getResult','isInteger','complete'];_0x28b6=function(){return _0x19b437;};return _0x28b6();}function u(_0x3689fe){const _0x2797da=_0x57036f;return!_0x3689fe||typeof _0x3689fe!=_0x2797da(0x190)||!f(_0x3689fe,[_0x2797da(0x126),_0x2797da(0x1e5),_0x2797da(0x241)])||!(_0x2797da(0x126)in _0x3689fe)||typeof _0x3689fe['formula']!='string'||!_0x3689fe[_0x2797da(0x126)]['trim']()||'numberFormat'in _0x3689fe&&_0x3689fe['numberFormat']!=null&&(typeof _0x3689fe[_0x2797da(0x1e5)]!=_0x2797da(0x190)||!f(_0x3689fe[_0x2797da(0x1e5)],[_0x2797da(0x1c8)])||!(_0x2797da(0x1c8)in _0x3689fe[_0x2797da(0x1e5)])||typeof _0x3689fe[_0x2797da(0x1e5)][_0x2797da(0x1c8)]!=_0x2797da(0x1b3))?!0x1:!('lastValue'in _0x3689fe)||_0x3689fe[_0x2797da(0x241)]==null||d(_0x3689fe[_0x2797da(0x241)]);}function d(_0x4a0ca2){const _0x2f250c=_0x57036f;return!_0x4a0ca2||typeof _0x4a0ca2!=_0x2f250c(0x190)||!f(_0x4a0ca2,['v','t',_0x2f250c(0x1c8)])||!('v'in _0x4a0ca2)||_0x4a0ca2['v']!==null&&typeof _0x4a0ca2['v']!=_0x2f250c(0x1b3)&&typeof _0x4a0ca2['v']!=_0x2f250c(0x185)&&typeof _0x4a0ca2['v']!=_0x2f250c(0x120)||'t'in _0x4a0ca2&&_0x4a0ca2['t']!=null&&!ee(_0x4a0ca2['t'])?!0x1:!(_0x2f250c(0x1c8)in _0x4a0ca2)||_0x4a0ca2[_0x2f250c(0x1c8)]==null||typeof _0x4a0ca2[_0x2f250c(0x1c8)]==_0x2f250c(0x1b3);}function f(_0x2b0787,_0x5ddd13){const _0x1459f6=_0x57036f;let _0x263dee=new Set(_0x5ddd13);return Object[_0x1459f6(0x142)](_0x2b0787)[_0x1459f6(0x198)](_0x25acbb=>_0x263dee[_0x1459f6(0x228)](_0x25acbb));}function ee(_0x43067f){const _0x1ae784=_0x57036f;return typeof _0x43067f==_0x1ae784(0x185)&&Object['values'](t['CellValueType'])[_0x1ae784(0x203)](_0x43067f);}const p=new Set([t[_0x57036f(0x13b)][_0x57036f(0x231)],t[_0x57036f(0x13b)][_0x57036f(0x177)],t[_0x57036f(0x13b)][_0x57036f(0x1d4)],t[_0x57036f(0x13b)][_0x57036f(0x1e2)],t[_0x57036f(0x13b)][_0x57036f(0x1e1)],t[_0x57036f(0x13b)][_0x57036f(0x20f)],t[_0x57036f(0x13b)][_0x57036f(0x1f9)],t['DataStreamTreeTokenType'][_0x57036f(0x12a)],t['DataStreamTreeTokenType'][_0x57036f(0x16d)],t[_0x57036f(0x13b)][_0x57036f(0x187)],t[_0x57036f(0x13b)][_0x57036f(0x179)],t['DataStreamTreeTokenType'][_0x57036f(0x219)],t['DataStreamTreeTokenType'][_0x57036f(0x13c)],t['DataStreamTreeTokenType'][_0x57036f(0x1e7)]]);var m=class extends Error{constructor(){const _0x388150=_0x57036f;super(_0x388150(0x1db));}};function te(_0x20a7c1){const _0x543f2e=_0x57036f;var _0x12709f,_0x6ea5fa;let _0xa2c206=t[_0x543f2e(0x1a4)][_0x543f2e(0x1ff)](_0x20a7c1[_0x543f2e(0x17d)]),_0x5a9912=T(_0xa2c206),{startOffset:_0x41a206,endOffset:_0x1a70bb}=oe(_0x5a9912,_0x20a7c1[_0x543f2e(0x13d)],_0x20a7c1[_0x543f2e(0x166)]);ie(_0x5a9912,_0x41a206,_0x1a70bb);let _0x5a47a5=((_0x12709f=_0x5a9912[_0x543f2e(0x128)])==null?void 0x0:_0x12709f[_0x543f2e(0x205)](_0x3aac3d=>{const _0x21b535=_0x543f2e;if(!g(_0x3aac3d))return!0x1;let _0x1f9967=(0x0,t[_0x21b535(0x23c)])(_0x3aac3d);return _0x1f9967['endOffset']>_0x41a206&&_0x1f9967['startOffset']<_0x1a70bb;})[_0x543f2e(0x235)](_0x1719ef=>_0x1719ef[_0x543f2e(0x1ab)]))??[];ce(_0x5a9912,_0x41a206,_0x1a70bb,''),_0x5a9912[_0x543f2e(0x128)]=[...((_0x6ea5fa=_0x5a9912[_0x543f2e(0x128)])==null?void 0x0:_0x6ea5fa[_0x543f2e(0x205)](_0x12a73d=>!_0x5a47a5[_0x543f2e(0x203)](_0x12a73d['rangeId'])&&_0x12a73d[_0x543f2e(0x1ab)]!==_0x20a7c1[_0x543f2e(0x1ab)]))??[],ae(_0x20a7c1['rangeId'],_0x41a206)][_0x543f2e(0x12c)]((_0x35eafc,_0x2ce919)=>_0x35eafc[_0x543f2e(0x14a)]-_0x2ce919['startIndex']);let _0x4d21c6=v(_0x20a7c1[_0x543f2e(0x1c1)]);return _0x5a47a5['forEach'](_0x1960b4=>{const _0x467023=_0x543f2e;delete _0x4d21c6[_0x467023(0x1f8)][_0x1960b4];}),_0x4d21c6['formulas'][_0x20a7c1['rangeId']]=t['Tools'][_0x543f2e(0x1ff)](_0x20a7c1[_0x543f2e(0x1cf)]),{'nextDocumentData':_0xa2c206,'nextResource':_0x4d21c6,'cursorOffset':_0x41a206+0x1};}function ne(_0x585bcd){const _0x37b904=_0x57036f;var _0xc1a636,_0x57ab45;let _0x42587b=t[_0x37b904(0x1a4)][_0x37b904(0x1ff)](_0x585bcd['documentData']),_0x5f4e97=(_0xc1a636=T(_0x42587b)['customRanges'])==null?void 0x0:_0xc1a636[_0x37b904(0x1ac)](_0x5b5f00=>_0x5b5f00[_0x37b904(0x1ab)]===_0x585bcd[_0x37b904(0x1ab)]&&g(_0x5b5f00));if(!_0x5f4e97||!((_0x57ab45=_0x585bcd['resource'])!=null&&_0x57ab45[_0x37b904(0x1f8)][_0x585bcd[_0x37b904(0x1ab)]]))return null;let _0x174420=v(_0x585bcd[_0x37b904(0x1c1)]);return _0x174420[_0x37b904(0x1f8)][_0x585bcd[_0x37b904(0x1ab)]]=t['Tools'][_0x37b904(0x1ff)](_0x585bcd[_0x37b904(0x1cf)]),{'nextDocumentData':_0x42587b,'nextResource':_0x174420,'cursorOffset':_0x5f4e97[_0x37b904(0x189)]+0x1};}function h(_0x501a93){const _0x1c750b=_0x57036f;let _0x4ab006=t[_0x1c750b(0x1a4)][_0x1c750b(0x1ff)](_0x501a93[_0x1c750b(0x17d)]),_0xf96224=le(_0x4ab006,_0x501a93[_0x1c750b(0x1ab)],_0x501a93['text']??'');if(_0xf96224==null)return null;let _0x2a903a=v(_0x501a93[_0x1c750b(0x1c1)]);return delete _0x2a903a[_0x1c750b(0x1f8)][_0x501a93[_0x1c750b(0x1ab)]],{'nextDocumentData':_0x4ab006,'nextResource':_0x2a903a,'cursorOffset':_0xf96224};}function re(_0x1d8fbc,_0x255c79){const _0x2bf1d1=_0x57036f;var _0x5a6013;let _0x48ddd4=t[_0x2bf1d1(0x1a4)][_0x2bf1d1(0x1ff)](_0x1d8fbc),_0x14f1f4=_0x48ddd4[_0x2bf1d1(0x170)];if(!_0x14f1f4)return _0x48ddd4;let _0x26019e=new Map(_0x255c79[_0x2bf1d1(0x235)](_0x14def8=>[_0x14def8[_0x2bf1d1(0x1ab)],_0x14def8[_0x2bf1d1(0x183)]])),_0x98ae75=((_0x5a6013=_0x14f1f4['customRanges'])==null?void 0x0:_0x5a6013[_0x2bf1d1(0x205)](_0x59aa1d=>g(_0x59aa1d)&&_0x26019e[_0x2bf1d1(0x228)](_0x59aa1d[_0x2bf1d1(0x1ab)]))[_0x2bf1d1(0x12c)]((_0x18d5eb,_0x19e7bd)=>_0x19e7bd['startIndex']-_0x18d5eb['startIndex']))??[];for(let _0x5727bd of _0x98ae75)le(_0x48ddd4,_0x5727bd[_0x2bf1d1(0x1ab)],_0x26019e[_0x2bf1d1(0x249)](_0x5727bd[_0x2bf1d1(0x1ab)])??'');return _0x48ddd4;}function g(_0x1921fb){const _0x2b9ddb=_0x57036f;var _0x522439;return(_0x1921fb==null?void 0x0:_0x1921fb['rangeType'])===t[_0x2b9ddb(0x252)]['CUSTOM']&&_0x1921fb[_0x2b9ddb(0x1df)]===!0x0&&((_0x522439=_0x1921fb['properties'])==null?void 0x0:_0x522439['kind'])===_0x2b9ddb(0x125);}function _(_0xa3f44f,_0xd31e3e){const _0x2be0e1=_0x57036f;var _0x9e9408;return _0xa3f44f==null||(_0x9e9408=_0xa3f44f[_0x2be0e1(0x128)])==null?void 0x0:_0x9e9408[_0x2be0e1(0x1ac)](_0x139bdc=>_0x139bdc[_0x2be0e1(0x1ab)]===_0xd31e3e&&g(_0x139bdc));}function ie(_0x65d671,_0x4c7179,_0xbbc528){const _0x36c2f9=_0x57036f;if(_0x4c7179===_0xbbc528){if(p['has'](_0x65d671[_0x36c2f9(0x153)][_0x4c7179]))throw new m();}else{for(let _0x2d02ce=_0x4c7179;_0x2d02ce<_0xbbc528;_0x2d02ce++)if(_0x65d671[_0x36c2f9(0x153)][_0x2d02ce]===t[_0x36c2f9(0x13b)][_0x36c2f9(0x1fa)]||p[_0x36c2f9(0x228)](_0x65d671[_0x36c2f9(0x153)][_0x2d02ce]))throw new m();}}function ae(_0x5d52ae,_0x462e67){const _0x5b4847=_0x57036f;return{'startIndex':_0x462e67,'endIndex':_0x462e67,'rangeId':_0x5d52ae,'rangeType':t[_0x5b4847(0x252)]['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x572b97){const _0x2a671f=_0x57036f;return _0x572b97?t['Tools'][_0x2a671f(0x1ff)](_0x572b97):c();}function oe(_0x4d01b0,_0x14b20f,_0xb5c155){const _0x499d6e=_0x57036f;let _0x28120f=se(_0x4d01b0),_0x245430=_0x14b20f??_0x28120f,_0x1f064f=_0xb5c155??_0x245430;return{'startOffset':y(Math[_0x499d6e(0x22c)](_0x245430,_0x1f064f),_0x28120f),'endOffset':y(Math[_0x499d6e(0x24d)](_0x245430,_0x1f064f),_0x28120f)};}function y(_0xfbc597,_0x5e34a3){const _0x20ae45=_0x57036f;return Math['max'](0x0,Math[_0x20ae45(0x22c)](_0xfbc597,_0x5e34a3));}function se(_0x5b0eec){const _0x1730dd=_0x57036f;return _0x5b0eec[_0x1730dd(0x153)][_0x1730dd(0x254)](''+t[_0x1730dd(0x13b)][_0x1730dd(0x1fa)]+t['DataStreamTreeTokenType']['SECTION_BREAK'])?Math[_0x1730dd(0x24d)](0x0,_0x5b0eec[_0x1730dd(0x153)]['length']-0x2):_0x5b0eec['dataStream'][_0x1730dd(0x254)](t[_0x1730dd(0x13b)][_0x1730dd(0x231)])?Math[_0x1730dd(0x24d)](0x0,_0x5b0eec['dataStream'][_0x1730dd(0x1e9)]-0x1):_0x5b0eec['dataStream']['length'];}function ce(_0x59e646,_0x4b6749,_0x3e9f67,_0x5b823b){_0x3e9f67>_0x4b6749&&de(_0x59e646,_0x4b6749,_0x3e9f67),ue(_0x59e646,_0x4b6749,_0x5b823b);}function le(_0x49899b,_0x2e73ad,_0x353c3f){const _0x1512c9=_0x57036f;var _0x55696f,_0x39bd5c;let _0x4aaab0=T(_0x49899b),_0x24cf10=(_0x55696f=_0x4aaab0[_0x1512c9(0x128)])==null?void 0x0:_0x55696f[_0x1512c9(0x1ac)](_0x196762=>_0x196762[_0x1512c9(0x1ab)]===_0x2e73ad&&g(_0x196762));if(!_0x24cf10)return null;let _0x44c534=(0x0,t['getCustomRangeInterval'])(_0x24cf10);return ce(_0x4aaab0,_0x44c534['startOffset'],_0x44c534[_0x1512c9(0x166)],_0x353c3f),_0x4aaab0['customRanges']=(_0x39bd5c=_0x4aaab0['customRanges'])==null?void 0x0:_0x39bd5c[_0x1512c9(0x205)](_0x2fff54=>_0x2fff54[_0x1512c9(0x1ab)]!==_0x2e73ad),_0x44c534[_0x1512c9(0x13d)]+_0x353c3f['length'];}function ue(_0x4758ad,_0x108af6,_0x2b9727){const _0x32f0d6=_0x57036f;_0x2b9727&&(_0x4758ad[_0x32f0d6(0x153)]=''+_0x4758ad['dataStream']['slice'](0x0,_0x108af6)+_0x2b9727+_0x4758ad[_0x32f0d6(0x153)][_0x32f0d6(0x1cc)](_0x108af6),fe(_0x4758ad,_0x108af6,_0x2b9727[_0x32f0d6(0x1e9)]));}function de(_0x38e62f,_0x293c2c,_0x50e01a){const _0x524b61=_0x57036f;let _0x578f93=_0x50e01a-_0x293c2c;_0x38e62f[_0x524b61(0x153)]=''+_0x38e62f[_0x524b61(0x153)][_0x524b61(0x1cc)](0x0,_0x293c2c)+_0x38e62f[_0x524b61(0x153)][_0x524b61(0x1cc)](_0x50e01a),pe(_0x38e62f,_0x293c2c,_0x578f93);}function fe(_0x50a0fd,_0x4da0d7,_0xa07a2){const _0x33ca2b=_0x57036f;_0x50a0fd[_0x33ca2b(0x1be)]=b(_0x50a0fd[_0x33ca2b(0x1be)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x162)]=b(_0x50a0fd[_0x33ca2b(0x162)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1d7)]=b(_0x50a0fd[_0x33ca2b(0x1d7)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1ce)]=me(_0x50a0fd[_0x33ca2b(0x1ce)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x138)]=he(_0x50a0fd[_0x33ca2b(0x138)],_0x4da0d7,_0xa07a2),_0x50a0fd['columnGroups']=S(_0x50a0fd[_0x33ca2b(0x1af)],_0x4da0d7,_0xa07a2),_0x50a0fd['customRanges']=S(_0x50a0fd[_0x33ca2b(0x128)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1a0)]=S(_0x50a0fd['customDecorations'],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1f0)]=S(_0x50a0fd[_0x33ca2b(0x1f0)],_0x4da0d7,_0xa07a2);}function pe(_0x353ea7,_0x1de379,_0x5a7eb4){const _0x45c2be=_0x57036f;var _0x22f075,_0x635ac6;_0x353ea7['paragraphs']=x(_0x353ea7[_0x45c2be(0x1be)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x162)]=x(_0x353ea7[_0x45c2be(0x162)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1d7)]=x(_0x353ea7[_0x45c2be(0x1d7)],_0x1de379,_0x5a7eb4),_0x353ea7['textRuns']=(_0x22f075=w((_0x635ac6=_0x353ea7[_0x45c2be(0x1ce)])==null?void 0x0:_0x635ac6[_0x45c2be(0x235)](_0x5d7f25=>({..._0x5d7f25,'startIndex':_0x5d7f25['st'],'endIndex':_0x5d7f25['ed']})),_0x1de379,_0x5a7eb4))==null?void 0x0:_0x22f075[_0x45c2be(0x235)](_0x1fc7c8=>{let {startIndex:_0x529b86,endIndex:_0x488f4f,..._0x5021d7}=_0x1fc7c8;return{..._0x5021d7,'st':_0x529b86,'ed':_0x488f4f};}),_0x353ea7[_0x45c2be(0x138)]=w(_0x353ea7[_0x45c2be(0x138)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1af)]=C(_0x353ea7[_0x45c2be(0x1af)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x128)]=C(_0x353ea7[_0x45c2be(0x128)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1a0)]=C(_0x353ea7[_0x45c2be(0x1a0)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1f0)]=C(_0x353ea7['blockRanges'],_0x1de379,_0x5a7eb4);}function b(_0x51b54f,_0x374355,_0x2d334d){const _0x2960b9=_0x57036f;return _0x51b54f==null?void 0x0:_0x51b54f[_0x2960b9(0x235)](_0x4d250b=>_0x4d250b[_0x2960b9(0x14a)]>=_0x374355?{..._0x4d250b,'startIndex':_0x4d250b[_0x2960b9(0x14a)]+_0x2d334d}:_0x4d250b);}function x(_0x321983,_0x5bb277,_0x255241){const _0x142753=_0x57036f;let _0x3f4a86=_0x5bb277+_0x255241;return _0x321983==null?void 0x0:_0x321983[_0x142753(0x235)](_0xe484e4=>_0xe484e4[_0x142753(0x14a)]>=_0x5bb277&&_0xe484e4[_0x142753(0x14a)]<_0x3f4a86?null:_0xe484e4['startIndex']>=_0x3f4a86?{..._0xe484e4,'startIndex':_0xe484e4['startIndex']-_0x255241}:_0xe484e4)['filter'](_0x2c3edb=>_0x2c3edb!=null);}function me(_0x5f260a,_0x5bf876,_0x4f581d){const _0x332f4a=_0x57036f;return _0x5f260a==null?void 0x0:_0x5f260a[_0x332f4a(0x235)](_0x1614ca=>_0x1614ca['st']>=_0x5bf876?{..._0x1614ca,'st':_0x1614ca['st']+_0x4f581d,'ed':_0x1614ca['ed']+_0x4f581d}:_0x1614ca['ed']>_0x5bf876?{..._0x1614ca,'ed':_0x1614ca['ed']+_0x4f581d}:_0x1614ca);}function S(_0x2ff8d8,_0x32a097,_0x3ca3c3){const _0x245bfb=_0x57036f;return _0x2ff8d8==null?void 0x0:_0x2ff8d8[_0x245bfb(0x235)](_0x5991d4=>(0x0,t[_0x245bfb(0x14b)])(_0x5991d4,_0x32a097,_0x3ca3c3));}function he(_0x3ec9be,_0x3c1938,_0x57fda0){const _0x4e71bc=_0x57036f;return _0x3ec9be==null?void 0x0:_0x3ec9be[_0x4e71bc(0x235)](_0x404e48=>(0x0,t[_0x4e71bc(0x215)])(_0x404e48,_0x3c1938,_0x57fda0));}function C(_0x2e1e72,_0x10921c,_0x569044){const _0x4caaa9=_0x57036f;return _0x2e1e72==null?void 0x0:_0x2e1e72[_0x4caaa9(0x235)](_0x55c876=>(0x0,t[_0x4caaa9(0x226)])(_0x55c876,_0x10921c,_0x569044))['filter'](_0x4eeae8=>_0x4eeae8!=null);}function w(_0x26e8fb,_0x2180c6,_0x2a021f){const _0x3763b7=_0x57036f;return _0x26e8fb==null?void 0x0:_0x26e8fb[_0x3763b7(0x235)](_0x2c6d6b=>(0x0,t[_0x3763b7(0x18c)])(_0x2c6d6b,_0x2180c6,_0x2a021f))[_0x3763b7(0x205)](_0x2da3a4=>_0x2da3a4!=null);}function T(_0x1e75fa){const _0x9d0866=_0x57036f;if(!_0x1e75fa[_0x9d0866(0x170)])throw Error(_0x9d0866(0x24b));return _0x1e75fa[_0x9d0866(0x170)];}function E(_0xa5edae){'@babel/helpers - typeof';const _0x37774a=_0x57036f;return E=typeof Symbol==_0x37774a(0x14c)&&typeof Symbol['iterator']==_0x37774a(0x15e)?function(_0x525b26){return typeof _0x525b26;}:function(_0x2e2623){const _0x58daeb=_0x37774a;return _0x2e2623&&typeof Symbol=='function'&&_0x2e2623[_0x58daeb(0x127)]===Symbol&&_0x2e2623!==Symbol['prototype']?_0x58daeb(0x15e):typeof _0x2e2623;},E(_0xa5edae);}function ge(_0x1b49fa,_0x28159b){const _0x213627=_0x57036f;if(E(_0x1b49fa)!=_0x213627(0x190)||!_0x1b49fa)return _0x1b49fa;var _0x3f6eba=_0x1b49fa[Symbol['toPrimitive']];if(_0x3f6eba!==void 0x0){var _0x48a12e=_0x3f6eba[_0x213627(0x232)](_0x1b49fa,_0x28159b||_0x213627(0x146));if(E(_0x48a12e)!=_0x213627(0x190))return _0x48a12e;throw TypeError(_0x213627(0x122));}return(_0x28159b==='string'?String:Number)(_0x1b49fa);}function _e(_0x1ab8d1){const _0x3c3002=_0x57036f;var _0x47d9a9=ge(_0x1ab8d1,_0x3c3002(0x1b3));return E(_0x47d9a9)=='symbol'?_0x47d9a9:_0x47d9a9+'';}function D(_0x5ad5a9,_0x258f6b,_0x202e56){return(_0x258f6b=_e(_0x258f6b))in _0x5ad5a9?Object['defineProperty'](_0x5ad5a9,_0x258f6b,{'value':_0x202e56,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5ad5a9[_0x258f6b]=_0x202e56,_0x5ad5a9;}var O=class extends t[_0x57036f(0x201)]{constructor(..._0x2c2c01){const _0x5d8079=_0x57036f;super(..._0x2c2c01),D(this,_0x5d8079(0x155),new Map()),D(this,_0x5d8079(0x1a6),new Map()),D(this,_0x5d8079(0x211),new Map()),D(this,_0x5d8079(0x15b),new i[(_0x5d8079(0x168))]()),D(this,'change$',this[_0x5d8079(0x15b)][_0x5d8079(0x18a)]());}['getFormula'](_0x540e47,_0x5bebc1){const _0x372990=_0x57036f;var _0x475be9;let _0x437f5e=(_0x475be9=this[_0x372990(0x155)][_0x372990(0x249)](_0x540e47))==null?void 0x0:_0x475be9[_0x372990(0x1f8)][_0x5bebc1];return _0x437f5e?t[_0x372990(0x1a4)][_0x372990(0x1ff)](_0x437f5e):void 0x0;}[_0x57036f(0x181)](_0x3c3a99){const _0xe18170=_0x57036f;var _0x526763;return t[_0xe18170(0x1a4)][_0xe18170(0x1ff)](((_0x526763=this[_0xe18170(0x155)][_0xe18170(0x249)](_0x3c3a99))==null?void 0x0:_0x526763['formulas'])??{});}[_0x57036f(0x144)](_0x112162){const _0x523252=_0x57036f;let _0xf56fda=this['_resources']['get'](_0x112162);return _0xf56fda?t[_0x523252(0x1a4)][_0x523252(0x1ff)](_0xf56fda):void 0x0;}[_0x57036f(0x1f7)](_0x518f1d,_0x268a64,_0x295e65){const _0xd4a836=_0x57036f;return this[_0xd4a836(0x19d)](_0x518f1d,{[_0x268a64]:_0x295e65});}['setResource'](_0x3fe90f,_0x18076f){const _0x21f06a=_0x57036f;return this[_0x21f06a(0x211)][_0x21f06a(0x228)](_0x3fe90f)||!l(_0x18076f)?!0x1:(this[_0x21f06a(0x155)][_0x21f06a(0x23a)](_0x3fe90f,{'formulas':t[_0x21f06a(0x1a4)]['deepClone'](_0x18076f['formulas'])}),this[_0x21f06a(0x15b)]['next']({'unitId':_0x3fe90f}),!0x0);}[_0x57036f(0x19d)](_0x2f7f81,_0x126cb2){const _0x257199=_0x57036f;if(this[_0x257199(0x211)][_0x257199(0x228)](_0x2f7f81)||!Object[_0x257199(0x142)](_0x126cb2)[_0x257199(0x1e9)]||!l({'formulas':_0x126cb2}))return!0x1;let _0x462345=this[_0x257199(0x155)][_0x257199(0x249)](_0x2f7f81)??c(),_0xa7028c=t[_0x257199(0x1a4)]['deepClone'](_0x462345);return Object[_0x257199(0x250)](_0xa7028c[_0x257199(0x1f8)],t[_0x257199(0x1a4)][_0x257199(0x1ff)](_0x126cb2)),this[_0x257199(0x155)][_0x257199(0x23a)](_0x2f7f81,_0xa7028c),this[_0x257199(0x15b)]['next']({'unitId':_0x2f7f81,'rangeIds':Object[_0x257199(0x142)](_0x126cb2)}),!0x0;}[_0x57036f(0x1cd)](_0x13a8bc,_0x5abf5c){const _0x206efc=_0x57036f;if(this[_0x206efc(0x211)]['has'](_0x13a8bc))return!0x1;let _0x95e74e=this[_0x206efc(0x155)][_0x206efc(0x249)](_0x13a8bc);if(!(_0x95e74e!=null&&_0x95e74e[_0x206efc(0x1f8)][_0x5abf5c]))return!0x1;let _0x234122=t['Tools'][_0x206efc(0x1ff)](_0x95e74e);return delete _0x234122[_0x206efc(0x1f8)][_0x5abf5c],this[_0x206efc(0x155)]['set'](_0x13a8bc,_0x234122),this[_0x206efc(0x15b)][_0x206efc(0x13e)]({'unitId':_0x13a8bc,'rangeIds':[_0x5abf5c]}),!0x0;}[_0x57036f(0x1d5)](_0x26e8cd,_0x2de6eb){const _0x3da554=_0x57036f;return l(_0x2de6eb)?(this[_0x3da554(0x155)][_0x3da554(0x23a)](_0x26e8cd,{'formulas':t['Tools'][_0x3da554(0x1ff)](_0x2de6eb[_0x3da554(0x1f8)])}),this['_rawResources']['delete'](_0x26e8cd),this[_0x3da554(0x211)][_0x3da554(0x1f5)](_0x26e8cd),this[_0x3da554(0x15b)][_0x3da554(0x13e)]({'unitId':_0x26e8cd}),!0x0):(this['_preserveInvalid'](_0x26e8cd,_0x2de6eb,_0x3da554(0x133)),!0x1);}[_0x57036f(0x173)](_0x3e3820){const _0xf8b306=_0x57036f;let _0xd937d0=this[_0xf8b306(0x155)][_0xf8b306(0x249)](_0x3e3820);return _0xd937d0?t[_0xf8b306(0x1a4)][_0xf8b306(0x1ff)](_0xd937d0):this['_rawResources']['has'](_0x3e3820)?t[_0xf8b306(0x1a4)][_0xf8b306(0x1ff)](this[_0xf8b306(0x1a6)]['get'](_0x3e3820)):c();}[_0x57036f(0x1de)](_0x558248){const _0x57d5a6=_0x57036f;return this[_0x57d5a6(0x211)][_0x57d5a6(0x249)](_0x558248);}[_0x57036f(0x152)](_0x21e4f6){const _0x1a0e27=_0x57036f;this[_0x1a0e27(0x155)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x1a6)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x211)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x15b)][_0x1a0e27(0x13e)]({'unitId':_0x21e4f6});}['dispose'](){const _0x327a64=_0x57036f;this[_0x327a64(0x155)][_0x327a64(0x134)](),this['_rawResources']['clear'](),this[_0x327a64(0x211)][_0x327a64(0x134)](),this[_0x327a64(0x15b)][_0x327a64(0x238)](),super[_0x327a64(0x1ca)]();}[_0x57036f(0x145)](_0x41b389,_0x569187,_0x19b8f8){const _0x3b6546=_0x57036f;this[_0x3b6546(0x155)]['delete'](_0x41b389),this[_0x3b6546(0x1a6)][_0x3b6546(0x23a)](_0x41b389,t[_0x3b6546(0x1a4)][_0x3b6546(0x1ff)](_0x569187)),this[_0x3b6546(0x211)][_0x3b6546(0x23a)](_0x41b389,_0x19b8f8),this[_0x3b6546(0x15b)][_0x3b6546(0x13e)]({'unitId':_0x41b389});}};let ve=function(_0x759e82){const _0x429321=_0x57036f;return _0x759e82[_0x429321(0x1c0)]=_0x429321(0x1eb),_0x759e82[_0x429321(0x115)]=_0x429321(0x24f),_0x759e82[_0x429321(0x20d)]='success',_0x759e82['ERROR']=_0x429321(0x172),_0x759e82;}({});function k(_0x4751df,_0x1405c7){return function(_0x24fa9f,_0x3e3294){_0x1405c7(_0x24fa9f,_0x3e3294,_0x4751df);};}function A(_0x3c9b42,_0xc966a0,_0x3f7cc0,_0xb8a2be){const _0x5ce6de=_0x57036f;var _0x1fb7fd=arguments[_0x5ce6de(0x1e9)],_0x4282b4=_0x1fb7fd<0x3?_0xc966a0:_0xb8a2be===null?_0xb8a2be=Object['getOwnPropertyDescriptor'](_0xc966a0,_0x3f7cc0):_0xb8a2be,_0x4ea11d;if(typeof Reflect==_0x5ce6de(0x190)&&typeof Reflect[_0x5ce6de(0x1b6)]==_0x5ce6de(0x14c))_0x4282b4=Reflect[_0x5ce6de(0x1b6)](_0x3c9b42,_0xc966a0,_0x3f7cc0,_0xb8a2be);else{for(var _0x50e500=_0x3c9b42[_0x5ce6de(0x1e9)]-0x1;_0x50e500>=0x0;_0x50e500--)(_0x4ea11d=_0x3c9b42[_0x50e500])&&(_0x4282b4=(_0x1fb7fd<0x3?_0x4ea11d(_0x4282b4):_0x1fb7fd>0x3?_0x4ea11d(_0xc966a0,_0x3f7cc0,_0x4282b4):_0x4ea11d(_0xc966a0,_0x3f7cc0))||_0x4282b4);}return _0x1fb7fd>0x3&&_0x4282b4&&Object[_0x5ce6de(0x165)](_0xc966a0,_0x3f7cc0,_0x4282b4),_0x4282b4;}let j=class extends t[_0x57036f(0x201)]{constructor(_0x112aca,_0x27e2f8,_0x1ac8c4){const _0x5bd68e=_0x57036f;super(),this[_0x5bd68e(0x17e)]=_0x112aca,this[_0x5bd68e(0x1f6)]=_0x27e2f8,this['_hostExternalReferenceModel']=_0x1ac8c4,D(this,'_registrations',new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x5bd68e(0x222),new i['Subject']()),D(this,_0x5bd68e(0x118),this[_0x5bd68e(0x222)][_0x5bd68e(0x18a)]()),this['disposeWithMe'](this[_0x5bd68e(0x1f6)][_0x5bd68e(0x245)][_0x5bd68e(0x15c)](_0x1a751a=>{const _0x333721=_0x5bd68e;for(let _0x3e9c75 of Object[_0x333721(0x174)](_0x1a751a))for(let _0x5ac20b of Object['values'](_0x3e9c75))_0x5ac20b['forEach'](_0x2cefa1=>this[_0x333721(0x156)](_0x2cefa1));}));}[_0x57036f(0x14e)](_0x21461f){const _0x27068b=_0x57036f;var _0x4bfaf6;let _0xc4f55b=_0x21461f['getUnitId'](),_0xf1061b=((_0x4bfaf6=_0x21461f['getSnapshot']()[_0x27068b(0x170)])==null||(_0x4bfaf6=_0x4bfaf6[_0x27068b(0x128)])==null?void 0x0:_0x4bfaf6[_0x27068b(0x205)](g))??[],_0x2fdea=this[_0x27068b(0x17e)][_0x27068b(0x181)](_0xc4f55b),_0x41a968=new Set();for(let _0x1257ef of _0xf1061b){let _0x564b40=_0x2fdea[_0x1257ef[_0x27068b(0x1ab)]];_0x564b40&&(_0x41a968[_0x27068b(0x16f)](M(_0xc4f55b,_0x1257ef[_0x27068b(0x1ab)])),this[_0x27068b(0x1b8)]({'unitId':_0xc4f55b,'rangeId':_0x1257ef['rangeId']},_0x564b40));}for(let _0x1ad50b of Array[_0x27068b(0x1d9)](this[_0x27068b(0x195)][_0x27068b(0x174)]()))_0x1ad50b['unitId']===_0xc4f55b&&!_0x41a968['has'](M(_0x1ad50b[_0x27068b(0x18e)],_0x1ad50b[_0x27068b(0x1ab)]))&&this['unregister'](_0x1ad50b);}[_0x57036f(0x1b8)](_0x5d15ff,_0x36be16){const _0x398c27=_0x57036f;let _0x1a7f20=M(_0x5d15ff[_0x398c27(0x18e)],_0x5d15ff[_0x398c27(0x1ab)]),_0x46e28d=this[_0x398c27(0x195)][_0x398c27(0x249)](_0x1a7f20),_0x39af1b=this[_0x398c27(0x1e6)]['getRevision'](_0x5d15ff[_0x398c27(0x18e)]);if(_0x46e28d&&_0x46e28d[_0x398c27(0x1cf)][_0x398c27(0x126)]===_0x36be16[_0x398c27(0x126)]&&_0x46e28d[_0x398c27(0x1ed)]===_0x39af1b){_0x46e28d['config']=_0x36be16;let _0x29a91e=_0x46e28d['formulaId']?this['_registrationService']['getFormulaValueSync'](_0x46e28d[_0x398c27(0x18e)],_0x46e28d[_0x398c27(0x18e)],_0x46e28d[_0x398c27(0x17b)])??void 0x0:void 0x0;_0x46e28d[_0x398c27(0x19c)]=_0x29a91e,this[_0x398c27(0x186)](_0x1a7f20,N(_0x36be16,_0x29a91e));return;}_0x46e28d!=null&&_0x46e28d[_0x398c27(0x17b)]&&this['_deleteRegistration'](_0x46e28d);let _0x54097d={..._0x5d15ff,'config':_0x36be16,'referenceRevision':_0x39af1b,'presentation':N(_0x36be16,void 0x0)};if(this[_0x398c27(0x195)]['set'](_0x1a7f20,_0x54097d),!_0x36be16[_0x398c27(0x126)]['trim']())return;let _0x56a902=this[_0x398c27(0x1f6)][_0x398c27(0x1ee)](_0x5d15ff[_0x398c27(0x18e)],_0x5d15ff['unitId'],_0x36be16[_0x398c27(0x126)],void 0x0,{'rangeId':_0x5d15ff['rangeId']},r[_0x398c27(0x135)][_0x398c27(0x224)],_0x5d15ff[_0x398c27(0x1ab)]);_0x54097d['formulaId']=_0x56a902,this['_formulaKeys']['set'](_0x56a902,_0x1a7f20);}[_0x57036f(0x20e)](_0x50b045){const _0x216c83=_0x57036f;let _0x2b808e=M(_0x50b045[_0x216c83(0x18e)],_0x50b045[_0x216c83(0x1ab)]),_0x2d901e=this['_registrations']['get'](_0x2b808e);_0x2d901e&&(this[_0x216c83(0x121)](_0x2d901e),this[_0x216c83(0x195)][_0x216c83(0x1f5)](_0x2b808e));}['unregisterUnit'](_0x5d4fa0){const _0x26475f=_0x57036f;for(let _0x5927d4 of Array[_0x26475f(0x1d9)](this[_0x26475f(0x195)]['values']()))_0x5927d4[_0x26475f(0x18e)]===_0x5d4fa0&&this[_0x26475f(0x20e)](_0x5927d4);}[_0x57036f(0x11a)](_0x172833){const _0x277857=_0x57036f;var _0x384959;return(_0x384959=this[_0x277857(0x195)][_0x277857(0x249)](M(_0x172833[_0x277857(0x18e)],_0x172833[_0x277857(0x1ab)])))==null?void 0x0:_0x384959[_0x277857(0x1ef)];}[_0x57036f(0x236)](_0x1f1da8){const _0x11fb5d=_0x57036f;let _0x28b34f=this[_0x11fb5d(0x195)][_0x11fb5d(0x249)](M(_0x1f1da8[_0x11fb5d(0x18e)],_0x1f1da8['rangeId']));return _0x28b34f?P(_0x28b34f):void 0x0;}['getRegisteredFormulas'](){const _0x2325df=_0x57036f;return Array[_0x2325df(0x1d9)](this[_0x2325df(0x195)][_0x2325df(0x174)](),_0x311f88=>({'identity':{'unitId':_0x311f88['unitId'],'rangeId':_0x311f88[_0x2325df(0x1ab)]},'config':_0x311f88['config'],'referenceRevision':_0x311f88['referenceRevision'],..._0x311f88[_0x2325df(0x19c)]?{'liveResult':_0x311f88['liveResult']}:null}));}[_0x57036f(0x1ca)](){const _0x5b4056=_0x57036f;for(let _0x3753d3 of this[_0x5b4056(0x195)][_0x5b4056(0x174)]())this['_deleteRegistration'](_0x3753d3);this[_0x5b4056(0x195)][_0x5b4056(0x134)](),this['_formulaKeys'][_0x5b4056(0x134)](),this[_0x5b4056(0x222)][_0x5b4056(0x238)](),super[_0x5b4056(0x1ca)]();}['_updateFormulaResult'](_0x220ab8){const _0xc8ad2a=_0x57036f;let _0x45ec69=this[_0xc8ad2a(0x180)][_0xc8ad2a(0x249)](_0x220ab8[_0xc8ad2a(0x17b)]),_0x3ceeb0=_0x45ec69?this[_0xc8ad2a(0x195)]['get'](_0x45ec69):void 0x0;_0x45ec69&&_0x3ceeb0&&(_0x3ceeb0['liveResult']=_0x220ab8,this[_0xc8ad2a(0x186)](_0x45ec69,N(_0x3ceeb0[_0xc8ad2a(0x1cf)],_0x220ab8)));}[_0x57036f(0x186)](_0x140253,_0x131055){const _0xf2a2be=_0x57036f;var _0x3dac4e,_0x15189e;let _0x34c049=this[_0xf2a2be(0x195)]['get'](_0x140253);if(!_0x34c049||ye(_0x34c049['presentation'],_0x131055))return;let _0x2a9a63=_0x34c049[_0xf2a2be(0x1ef)],_0x2d8393=P(_0x34c049);_0x34c049[_0xf2a2be(0x1ef)]=_0x131055,this[_0xf2a2be(0x222)][_0xf2a2be(0x13e)]({'unitId':_0x34c049[_0xf2a2be(0x18e)],'rangeId':_0x34c049['rangeId'],'presentation':_0x131055,'previousPresentation':_0x2a9a63,'result':P(_0x34c049),'previousResult':{..._0x2d8393,..._0x2a9a63,'value':(_0x3dac4e=_0x2a9a63[_0xf2a2be(0x206)])==null?void 0x0:_0x3dac4e['v'],'valueType':((_0x15189e=_0x2a9a63[_0xf2a2be(0x206)])==null?void 0x0:_0x15189e['t'])??void 0x0}});}[_0x57036f(0x121)](_0x4cdce1){const _0x4a4c48=_0x57036f;_0x4cdce1[_0x4a4c48(0x17b)]&&(this['_registrationService'][_0x4a4c48(0x240)](_0x4cdce1[_0x4a4c48(0x18e)],_0x4cdce1['unitId'],[_0x4cdce1['formulaId']]),this['_formulaKeys']['delete'](_0x4cdce1['formulaId']));}};function _0x2b8a(_0x3c17b4,_0x2011be){_0x3c17b4=_0x3c17b4-0x114;const _0x28b605=_0x28b6();let _0x2b8ab7=_0x28b605[_0x3c17b4];return _0x2b8ab7;}j=A([k(0x0,(0x0,t[_0x57036f(0x136)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x57036f(0x223)])),k(0x2,(0x0,t[_0x57036f(0x136)])(e['HostExternalReferenceModel']))],j);function M(_0x55b324,_0xf3d7d1){return _0x55b324+'\x00'+_0xf3d7d1;}function N(_0x15ab1f,_0x11fbcf){const _0x69e002=_0x57036f;return(0x0,e[_0x69e002(0x1b1)])({'numberFormat':_0x15ab1f[_0x69e002(0x1e5)],'lastValue':_0x15ab1f[_0x69e002(0x241)],'result':_0x11fbcf});}function P(_0x30ee74){const _0x10752f=_0x57036f;var _0x1144db,_0x2773e7,_0x486267;let _0x17fca4=_0x30ee74[_0x10752f(0x1ef)],_0x25b9fd=_0x30ee74[_0x10752f(0x1cf)][_0x10752f(0x126)]['trim']()?_0x17fca4[_0x10752f(0x1c4)]||_0x17fca4['cell']==null?_0x10752f(0x24f):((_0x1144db=_0x30ee74[_0x10752f(0x19c)])==null?void 0x0:_0x1144db[_0x10752f(0x14f)])===r['FormulaResultStatus'][_0x10752f(0x191)]?_0x10752f(0x172):_0x10752f(0x124):_0x10752f(0x1eb);return{..._0x17fca4,'status':_0x25b9fd,'value':(_0x2773e7=_0x17fca4[_0x10752f(0x206)])==null?void 0x0:_0x2773e7['v'],'valueType':((_0x486267=_0x17fca4['cell'])==null?void 0x0:_0x486267['t'])??void 0x0};}function ye(_0x4f5217,_0x542940){const _0x2233d8=_0x57036f;var _0x7fe80c,_0x256302,_0x22c2af,_0x429fe5;return _0x4f5217[_0x2233d8(0x183)]===_0x542940[_0x2233d8(0x183)]&&_0x4f5217[_0x2233d8(0x22d)]===_0x542940[_0x2233d8(0x22d)]&&_0x4f5217[_0x2233d8(0x1c8)]===_0x542940['pattern']&&_0x4f5217['source']===_0x542940[_0x2233d8(0x1a3)]&&_0x4f5217[_0x2233d8(0x1c4)]===_0x542940['stale']&&((_0x7fe80c=_0x4f5217['cell'])==null?void 0x0:_0x7fe80c['t'])===((_0x256302=_0x542940[_0x2233d8(0x206)])==null?void 0x0:_0x256302['t'])&&Object['is']((_0x22c2af=_0x4f5217[_0x2233d8(0x206)])==null?void 0x0:_0x22c2af['v'],(_0x429fe5=_0x542940[_0x2233d8(0x206)])==null?void 0x0:_0x429fe5['v']);}const F={'id':_0x57036f(0x160),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x4e9206,_0x5b9afe)=>!(_0x5b9afe!=null&&_0x5b9afe[_0x57036f(0x18e)])||!_0x5b9afe[_0x57036f(0x1ab)]||!_0x5b9afe[_0x57036f(0x1cf)]?!0x1:_0x4e9206[_0x57036f(0x249)](O)[_0x57036f(0x1f7)](_0x5b9afe['unitId'],_0x5b9afe['rangeId'],_0x5b9afe['config'])},I={'id':_0x57036f(0x202),'type':t[_0x57036f(0x225)]['MUTATION'],'handler':(_0x3e5fc6,_0x1fc0a5)=>!(_0x1fc0a5!=null&&_0x1fc0a5[_0x57036f(0x18e)])||!_0x1fc0a5['rangeId']?!0x1:_0x3e5fc6[_0x57036f(0x249)](O)[_0x57036f(0x1cd)](_0x1fc0a5[_0x57036f(0x18e)],_0x1fc0a5[_0x57036f(0x1ab)])},L={'id':_0x57036f(0x23f),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x1ed5e5,_0x545aae)=>!(_0x545aae!=null&&_0x545aae[_0x57036f(0x18e)])||!_0x545aae[_0x57036f(0x1c1)]?!0x1:_0x1ed5e5[_0x57036f(0x249)](O)[_0x57036f(0x1b7)](_0x545aae[_0x57036f(0x18e)],_0x545aae[_0x57036f(0x1c1)])},R={'id':_0x57036f(0x178),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x266ea6,_0xdd0f18)=>{const _0xdbc335=_0x57036f;if(!(_0xdd0f18!=null&&_0xdd0f18['unitId'])||!_0xdd0f18[_0xdbc335(0x246)]['length'])return!0x1;let _0x467bf0=_0x266ea6[_0xdbc335(0x249)](O),_0x416199=_0x266ea6[_0xdbc335(0x249)](e[_0xdbc335(0x1d8)]),_0x327702=_0x467bf0[_0xdbc335(0x144)](_0xdd0f18[_0xdbc335(0x18e)]);if(!_0x327702)return!0x1;let _0x56893f=t[_0xdbc335(0x1a4)][_0xdbc335(0x1ff)](_0x327702),_0x5c4beb=!0x1;for(let _0x533de5 of _0xdd0f18['updates']){var _0x5b49fe,_0x5df55e,_0x5a730c,_0x4344cb;let _0x59e4a2=_0x56893f['formulas'][_0x533de5['rangeId']];_0x59e4a2&&_0x59e4a2['formula']===_0x533de5[_0xdbc335(0x1f3)]&&((_0x5b49fe=_0x59e4a2[_0xdbc335(0x1e5)])==null?void 0x0:_0x5b49fe[_0xdbc335(0x1c8)])===_0x533de5[_0xdbc335(0x24c)]&&_0x416199['getRevision'](_0xdd0f18[_0xdbc335(0x18e)])===_0x533de5[_0xdbc335(0x255)]&&(((_0x5df55e=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x5df55e['v'])!==_0x533de5['lastValue']['v']||((_0x5a730c=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x5a730c['t'])!==_0x533de5['lastValue']['t']||((_0x4344cb=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x4344cb[_0xdbc335(0x1c8)])!==_0x533de5[_0xdbc335(0x241)][_0xdbc335(0x1c8)])&&(_0x59e4a2[_0xdbc335(0x241)]=t[_0xdbc335(0x1a4)][_0xdbc335(0x1ff)](_0x533de5[_0xdbc335(0x241)]),_0x5c4beb=!0x0);}return!_0x5c4beb||_0x467bf0[_0xdbc335(0x1b7)](_0xdd0f18[_0xdbc335(0x18e)],_0x56893f);}},z={'id':_0x57036f(0x1c5),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x5db4f7,_0x314213)=>{const _0x2a6d6d=_0x57036f;if(!(_0x314213!=null&&_0x314213[_0x2a6d6d(0x126)][_0x2a6d6d(0x1ae)]()))return!0x1;let _0x1b9730=K(_0x5db4f7,_0x314213[_0x2a6d6d(0x18e)],'');if(!_0x1b9730)return!0x1;let _0x47ca6a=xe(_0x314213[_0x2a6d6d(0x1bb)],_0x1b9730[_0x2a6d6d(0x170)],be(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)]));if(!_0x47ca6a)return!0x1;let _0x21e0f2=Se(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)],_0x314213[_0x2a6d6d(0x126)],_0x314213[_0x2a6d6d(0x196)]??[]);if(!_0x21e0f2)return!0x1;let _0x236c0e=Ce(_0x1b9730[_0x2a6d6d(0x170)],_0x1b9730[_0x2a6d6d(0x233)],_0x1b9730[_0x2a6d6d(0x18e)]),_0x1ed2e1=we({'documentData':_0x1b9730[_0x2a6d6d(0x17d)],'resource':_0x1b9730['resource'],'rangeId':_0x236c0e,'config':{'formula':_0x314213['formula'],..._0x314213[_0x2a6d6d(0x1e5)]?{'numberFormat':_0x314213['numberFormat']}:null},'startOffset':_0x47ca6a['startOffset'],'endOffset':_0x47ca6a[_0x2a6d6d(0x166)]});if(!_0x1ed2e1)return!0x1;let _0x4ceb4a=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)],_0x21e0f2);return!_0x4ceb4a||!q({'accessor':_0x5db4f7,'document':_0x1b9730[_0x2a6d6d(0x1bf)],'unitId':_0x1b9730[_0x2a6d6d(0x18e)],'trigger':z['id'],'rangeId':_0x236c0e,'previousResource':_0x1b9730[_0x2a6d6d(0x1c1)],'nextResource':_0x1ed2e1[_0x2a6d6d(0x209)],'previousDocumentData':_0x1b9730[_0x2a6d6d(0x17d)],'nextDocumentData':_0x1ed2e1[_0x2a6d6d(0x1c6)],'cursorOffset':_0x1ed2e1[_0x2a6d6d(0x1c9)],'externalMutations':_0x4ceb4a})?!0x1:{'rangeId':_0x236c0e,'startOffset':_0x1ed2e1['cursorOffset']-0x1,'endOffset':_0x1ed2e1[_0x2a6d6d(0x1c9)]};}},B={'id':_0x57036f(0x18b),'type':t[_0x57036f(0x225)]['COMMAND'],'handler':(_0x2a465f,_0xa06e8d)=>{const _0x347957=_0x57036f;if(!(_0xa06e8d!=null&&_0xa06e8d[_0x347957(0x1ab)])||!_0xa06e8d['formula']['trim']())return!0x1;let _0x2226a8=K(_0x2a465f,_0xa06e8d[_0x347957(0x18e)],''),_0x279dfc=_0x2226a8==null?void 0x0:_0x2226a8['model'][_0x347957(0x130)](_0x2226a8[_0x347957(0x18e)],_0xa06e8d[_0x347957(0x1ab)]),_0x1177e5=_0x2226a8?_(_0x2226a8[_0x347957(0x17d)]['body'],_0xa06e8d[_0x347957(0x1ab)]):void 0x0;if(!_0x2226a8||!_0x279dfc||!_0x1177e5)return!0x1;let _0x30e5ff=Se(_0x2a465f,_0x2226a8[_0x347957(0x18e)],_0xa06e8d[_0x347957(0x126)],_0xa06e8d['externalReferences']??[]);if(!_0x30e5ff)return!0x1;let _0x5d448b=(0x0,e[_0x347957(0x220)])(_0x2a465f,_0x2226a8[_0x347957(0x18e)],_0x30e5ff);if(!_0x5d448b)return!0x1;let _0x93f6cb=je(_0x2226a8[_0x347957(0x1c1)]);return _0x93f6cb[_0x347957(0x1f8)][_0xa06e8d[_0x347957(0x1ab)]]={'formula':_0xa06e8d['formula'],..._0xa06e8d[_0x347957(0x1e5)]?{'numberFormat':_0xa06e8d[_0x347957(0x1e5)]}:_0x279dfc[_0x347957(0x1e5)]?{'numberFormat':_0x279dfc[_0x347957(0x1e5)]}:null},q({'accessor':_0x2a465f,'document':_0x2226a8[_0x347957(0x1bf)],'unitId':_0x2226a8[_0x347957(0x18e)],'trigger':B['id'],'rangeId':_0xa06e8d[_0x347957(0x1ab)],'previousResource':_0x2226a8[_0x347957(0x1c1)],'nextResource':_0x93f6cb,'cursorOffset':_0x1177e5[_0x347957(0x189)]+0x1,'externalMutations':_0x5d448b});}},V={'id':_0x57036f(0x1c7),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x1ec844,_0x1ed215)=>{const _0x286d7b=_0x57036f;if(!(_0x1ed215!=null&&_0x1ed215[_0x286d7b(0x1ab)]))return!0x1;let _0x440544=K(_0x1ec844,_0x1ed215['unitId'],''),_0x8cf1bc=_0x440544==null?void 0x0:_0x440544[_0x286d7b(0x233)][_0x286d7b(0x130)](_0x440544[_0x286d7b(0x18e)],_0x1ed215[_0x286d7b(0x1ab)]),_0x28aa89=_0x440544?_(_0x440544['documentData'][_0x286d7b(0x170)],_0x1ed215['rangeId']):void 0x0;if(!_0x440544||!_0x8cf1bc||!_0x28aa89)return!0x1;let _0x5088cd=je(_0x440544[_0x286d7b(0x1c1)]);return _0x5088cd[_0x286d7b(0x1f8)][_0x1ed215['rangeId']]={..._0x8cf1bc,..._0x1ed215[_0x286d7b(0x1e5)]?{'numberFormat':_0x1ed215[_0x286d7b(0x1e5)]}:null},_0x1ed215[_0x286d7b(0x1e5)]||delete _0x5088cd['formulas'][_0x1ed215[_0x286d7b(0x1ab)]][_0x286d7b(0x1e5)],q({'accessor':_0x1ec844,'document':_0x440544[_0x286d7b(0x1bf)],'unitId':_0x440544[_0x286d7b(0x18e)],'trigger':V['id'],'rangeId':_0x1ed215[_0x286d7b(0x1ab)],'previousResource':_0x440544[_0x286d7b(0x1c1)],'nextResource':_0x5088cd,'cursorOffset':_0x28aa89[_0x286d7b(0x189)]+0x1,'externalMutations':{}});}},H={'id':_0x57036f(0x132),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x62c754,_0x515bd6)=>G(_0x62c754,_0x515bd6,'',H['id'])},U={'id':_0x57036f(0x229),'type':t[_0x57036f(0x225)]['COMMAND'],'handler':(_0x597685,_0x4eca79)=>G(_0x597685,_0x4eca79,(_0x4eca79==null?void 0x0:_0x4eca79[_0x57036f(0x183)])??'',U['id'])},W={'id':_0x57036f(0x1aa),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x1d07a3,_0x3f0237)=>{const _0x550c2f=_0x57036f;if(!(_0x3f0237!=null&&_0x3f0237[_0x550c2f(0x1ab)]))return!0x1;let _0x4018f7=K(_0x1d07a3,_0x3f0237[_0x550c2f(0x18e)],'');if(!_0x4018f7)return!0x1;let _0x2c7868=_0x1d07a3[_0x550c2f(0x249)](j)[_0x550c2f(0x236)]({'unitId':_0x4018f7[_0x550c2f(0x18e)],'rangeId':_0x3f0237[_0x550c2f(0x1ab)]});return _0x2c7868?G(_0x1d07a3,_0x3f0237,_0x2c7868[_0x550c2f(0x183)],W['id']):!0x1;}};function G(_0x1324bc,_0x1e2def,_0x4c1af5,_0x33b0dc){const _0x531a32=_0x57036f;if(!(_0x1e2def!=null&&_0x1e2def[_0x531a32(0x1ab)]))return!0x1;let _0x1704ce=K(_0x1324bc,_0x1e2def['unitId'],'');if(!_0x1704ce)return!0x1;let _0x182477=h({'documentData':_0x1704ce[_0x531a32(0x17d)],'resource':_0x1704ce[_0x531a32(0x1c1)],'rangeId':_0x1e2def[_0x531a32(0x1ab)],'text':_0x4c1af5});return _0x182477?q({'accessor':_0x1324bc,'document':_0x1704ce[_0x531a32(0x1bf)],'unitId':_0x1704ce[_0x531a32(0x18e)],'trigger':_0x33b0dc,'rangeId':_0x1e2def[_0x531a32(0x1ab)],'previousResource':_0x1704ce[_0x531a32(0x1c1)],'nextResource':_0x182477[_0x531a32(0x209)],'previousDocumentData':_0x1704ce[_0x531a32(0x17d)],'nextDocumentData':_0x182477[_0x531a32(0x1c6)],'cursorOffset':_0x182477[_0x531a32(0x1c9)],'externalMutations':{}}):!0x1;}function K(_0x57c4e1,_0x334b17,_0x2e0da5){const _0x5202d6=_0x57036f;if(_0x2e0da5)return null;let _0x2a8500=_0x57c4e1[_0x5202d6(0x249)](t[_0x5202d6(0x214)]),_0x105854=(_0x334b17?_0x2a8500['getUnit'](_0x334b17,t[_0x5202d6(0x16b)][_0x5202d6(0x1bc)]):_0x2a8500[_0x5202d6(0x163)](t[_0x5202d6(0x16b)][_0x5202d6(0x1bc)]))??null;if(!_0x105854)return null;let _0x54c260=_0x105854[_0x5202d6(0x171)](),_0x1ac85c=_0x54c260[_0x5202d6(0x170)];if(_0x54c260[_0x5202d6(0x1bd)]||!_0x1ac85c)return null;let _0x535d5e=_0x57c4e1[_0x5202d6(0x249)](O);return _0x535d5e[_0x5202d6(0x1de)](_0x105854['getUnitId']())?null:{'document':_0x105854,'body':_0x1ac85c,'documentData':_0x54c260,'model':_0x535d5e,'resource':_0x535d5e[_0x5202d6(0x144)](_0x105854[_0x5202d6(0x22e)]())??c(),'unitId':_0x105854[_0x5202d6(0x22e)]()};}function be(_0x36e6c9,_0x408ba5){const _0x58baf4=_0x57036f;var _0x5bf9f0;return(_0x5bf9f0=_0x36e6c9[_0x58baf4(0x249)](n[_0x58baf4(0x1b5)])['getTextRanges']({'subUnitId':_0x408ba5,'unitId':_0x408ba5}))==null?void 0x0:_0x5bf9f0[0x0];}function xe(_0x58a5d7,_0x1c39cd,_0x29e614){const _0x14495f=_0x57036f;if((_0x58a5d7==null?void 0x0:_0x58a5d7['type'])==='paragraph'){var _0x2bffdf;let _0x5b67e7=((_0x2bffdf=_0x1c39cd['paragraphs'])==null?void 0x0:_0x2bffdf['filter'](_0x54f143=>_0x54f143[_0x14495f(0x192)]===_0x58a5d7[_0x14495f(0x192)]))??[];if(_0x5b67e7[_0x14495f(0x1e9)]!==0x1)return null;let _0x4799df=_0x5b67e7[0x0],_0x4d245a=(0x0,t['getParagraphContentStartOffset'])(_0x1c39cd,_0x4799df),_0x17bebf=_0x4799df[_0x14495f(0x14a)]-_0x4d245a,_0x5eab05=_0x58a5d7['position']===_0x14495f(0x1a8)?_0x17bebf:_0x58a5d7[_0x14495f(0x247)];if(!Number[_0x14495f(0x237)](_0x5eab05)||_0x5eab05<0x0||_0x5eab05>_0x17bebf)return null;let _0x5f2ef8=_0x4d245a+_0x5eab05;return{'startOffset':_0x5f2ef8,'endOffset':_0x5f2ef8};}if((_0x58a5d7==null?void 0x0:_0x58a5d7[_0x14495f(0x248)])===_0x14495f(0x1b2))return!Number[_0x14495f(0x237)](_0x58a5d7[_0x14495f(0x13d)])||!Number[_0x14495f(0x237)](_0x58a5d7[_0x14495f(0x166)])?null:{'startOffset':Math[_0x14495f(0x22c)](_0x58a5d7[_0x14495f(0x13d)],_0x58a5d7[_0x14495f(0x166)]),'endOffset':Math['max'](_0x58a5d7[_0x14495f(0x13d)],_0x58a5d7[_0x14495f(0x166)])};let _0x22d938=(_0x58a5d7==null?void 0x0:_0x58a5d7[_0x14495f(0x248)])===_0x14495f(0x1ad)?_0x58a5d7[_0x14495f(0x1ad)]:_0x29e614;return!_0x22d938||_0x22d938[_0x14495f(0x24e)]?null:{'startOffset':Math['min'](_0x22d938[_0x14495f(0x13d)],_0x22d938[_0x14495f(0x166)]),'endOffset':Math[_0x14495f(0x24d)](_0x22d938['startOffset'],_0x22d938[_0x14495f(0x166)])};}function Se(_0x35231b,_0x5c8cbb,_0x21d73b,_0x3bd143){const _0x46a225=_0x57036f;let _0x19a53f=_0x35231b[_0x46a225(0x249)](r[_0x46a225(0x114)]),_0x57c024=_0x21d73b[_0x46a225(0x1e8)]('=')?_0x21d73b[_0x46a225(0x1cc)](0x1):_0x21d73b,_0x2afda0=_0x19a53f['sequenceNodesBuilder'](_0x57c024);if(!_0x2afda0)return null;let _0x4e383a=_0x35231b[_0x46a225(0x249)](e[_0x46a225(0x1d8)]),_0x3069f9=(0x0,e[_0x46a225(0x15f)])({'qualifiers':(0x0,e[_0x46a225(0x140)])(_0x2afda0),'explicitReferences':_0x3bd143??[],'resolveBinding':_0x2e9c63=>_0x4e383a[_0x46a225(0x21b)](_0x5c8cbb,_0x2e9c63)});return _0x3069f9[_0x46a225(0x14f)]===_0x46a225(0x218)?_0x3069f9[_0x46a225(0x1fe)]:null;}function Ce(_0x33004e,_0x1a6185,_0x36b2f0){const _0x16c8b4=_0x57036f;var _0x5eaa81;let _0x154d3f=(0x0,t['generateRandomId'])(0x6);for(;_0x33004e!=null&&(_0x5eaa81=_0x33004e['customRanges'])!=null&&_0x5eaa81['some'](_0x4c3e5c=>_0x4c3e5c[_0x16c8b4(0x1ab)]===_0x154d3f)||_0x1a6185[_0x16c8b4(0x130)](_0x36b2f0,_0x154d3f);)_0x154d3f=(0x0,t['generateRandomId'])(0x6);return _0x154d3f;}function we(_0x41af35){try{return te(_0x41af35);}catch(_0xf2da2b){if(_0xf2da2b instanceof m)return null;throw _0xf2da2b;}}function Te(_0x5dc78b){const _0x365405=_0x57036f;let _0x16eae1=_0x5dc78b[_0x365405(0x131)]&&_0x5dc78b['nextDocumentData']?De(_0x5dc78b['document'],_0x5dc78b['unitId'],_0x5dc78b[_0x365405(0x131)],_0x5dc78b[_0x365405(0x1c6)],_0x5dc78b['cursorOffset'],_0x5dc78b['trigger']):null;return _0x5dc78b[_0x365405(0x131)]&&_0x5dc78b[_0x365405(0x1c6)]&&!_0x16eae1?null:{'documentRedo':_0x16eae1,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x5dc78b[_0x365405(0x18e)],'resource':_0x5dc78b[_0x365405(0x209)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x5dc78b[_0x365405(0x18e)],'resource':_0x5dc78b[_0x365405(0x251)]}}};}function Ee(_0x143b9d,_0x16428d,_0x3aa2ac,_0x136a44){const _0x11b4b7=_0x57036f;_0x136a44['pushUndoRedo']({'id':_0x143b9d[_0x11b4b7(0x1d3)]+':'+_0x143b9d[_0x11b4b7(0x1ab)],'unitID':_0x143b9d['unitId'],'redoMutations':[..._0x143b9d['externalMutations'][_0x11b4b7(0x150)]?[_0x143b9d[_0x11b4b7(0x1f1)][_0x11b4b7(0x150)]]:[],..._0x16428d[_0x11b4b7(0x137)]?[_0x16428d[_0x11b4b7(0x137)]]:[],_0x16428d[_0x11b4b7(0x176)]],'undoMutations':[_0x16428d[_0x11b4b7(0x227)],..._0x3aa2ac?[_0x3aa2ac]:[],..._0x143b9d['externalMutations'][_0x11b4b7(0x1d2)]?[_0x143b9d[_0x11b4b7(0x1f1)][_0x11b4b7(0x1d2)]]:[]]});}function q(_0x34800a){const _0x1e8474=_0x57036f;let _0x1b4e95=_0x34800a['accessor']['get'](t[_0x1e8474(0x15a)]),_0x5a39c8=_0x34800a[_0x1e8474(0x116)][_0x1e8474(0x249)](t['IUndoRedoService']),_0x400e81=_0x34800a[_0x1e8474(0x116)][_0x1e8474(0x249)](n[_0x1e8474(0x1b5)]),_0x1c7e38=Te(_0x34800a);if(!_0x1c7e38)return!0x1;let _0x43f578=!0x1,_0x4ad47d=null,_0x4eab39=!0x1;try{if(_0x34800a[_0x1e8474(0x1f1)]['redoMutation']){if(!_0x1b4e95[_0x1e8474(0x188)](_0x34800a['externalMutations']['redoMutation']['id'],_0x34800a[_0x1e8474(0x1f1)][_0x1e8474(0x150)][_0x1e8474(0x1d0)]))return!0x1;_0x43f578=!0x0;}if(_0x1c7e38[_0x1e8474(0x137)]){let _0x5bf8f6=_0x1b4e95['syncExecuteCommand'](_0x1c7e38[_0x1e8474(0x137)]['id'],_0x1c7e38[_0x1e8474(0x137)]['params']);if(!_0x5bf8f6)return J(_0x1b4e95,_0x34800a[_0x1e8474(0x1f1)],_0x43f578),!0x1;_0x4ad47d={'id':n['RichTextEditingMutation']['id'],'params':{..._0x5bf8f6,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x1b4e95[_0x1e8474(0x188)](_0x1c7e38[_0x1e8474(0x176)]['id'],_0x1c7e38[_0x1e8474(0x176)][_0x1e8474(0x1d0)]))return Oe(_0x1b4e95,_0x4ad47d),J(_0x1b4e95,_0x34800a['externalMutations'],_0x43f578),!0x1;_0x4eab39=!0x0,Ee(_0x34800a,_0x1c7e38,_0x4ad47d,_0x5a39c8);}catch(_0x554836){throw _0x4eab39&&_0x1b4e95['syncExecuteCommand'](_0x1c7e38['resourceUndo']['id'],_0x1c7e38[_0x1e8474(0x227)][_0x1e8474(0x1d0)]),Oe(_0x1b4e95,_0x4ad47d),J(_0x1b4e95,_0x34800a[_0x1e8474(0x1f1)],_0x43f578),_0x554836;}return _0x400e81['replaceDocRanges']([{'startOffset':_0x34800a['cursorOffset'],'endOffset':_0x34800a[_0x1e8474(0x1c9)],'segmentId':''}],{'unitId':_0x34800a[_0x1e8474(0x18e)],'subUnitId':_0x34800a['unitId']},!0x1,{[n['DOC_SELECTION_OPTION_PRESERVE_CARET']]:!0x0}),!0x0;}function De(_0x5a4b42,_0x1ca09c,_0x29a878,_0x44c7d5,_0xe8738e,_0x3d4cfc){let _0x3978c8=ke(_0x29a878,_0x44c7d5,(0x0,t['getRichTextEditPath'])(_0x5a4b42,''));return _0x3978c8?{'id':n['RichTextEditingMutation']['id'],'params':{'unitId':_0x1ca09c,'actions':_0x3978c8,'segmentId':'','textRanges':[{'startOffset':_0xe8738e,'endOffset':_0xe8738e,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x3d4cfc}}:null;}function Oe(_0x7e325a,_0x46dff2){const _0x9cc519=_0x57036f;_0x46dff2&&_0x7e325a[_0x9cc519(0x188)](_0x46dff2['id'],_0x46dff2['params']);}function J(_0x26571e,_0xd840be,_0x430e1e){const _0x3d071e=_0x57036f;_0x430e1e&&_0xd840be['undoMutation']&&_0x26571e[_0x3d071e(0x188)](_0xd840be[_0x3d071e(0x1d2)]['id'],_0xd840be[_0x3d071e(0x1d2)][_0x3d071e(0x1d0)]);}function ke(_0x4da3d6,_0x2c59eb,_0x1ba4a3){const _0xe27ffd=_0x57036f;let _0x86b9eb=_0x4da3d6['body'],_0x29af13=_0x2c59eb[_0xe27ffd(0x170)],_0x8ef916=Ae(_0x86b9eb==null?void 0x0:_0x86b9eb['dataStream'],_0x29af13==null?void 0x0:_0x29af13[_0xe27ffd(0x153)]);if(!_0x8ef916||!_0x29af13)return null;let _0x508708=new t[(_0xe27ffd(0x16e))]();return _0x508708[_0xe27ffd(0x244)](_0x8ef916[_0xe27ffd(0x175)]),_0x8ef916[_0xe27ffd(0x151)]>0x0&&_0x508708[_0xe27ffd(0x117)](_0x8ef916[_0xe27ffd(0x151)],(0x0,t[_0xe27ffd(0x21c)])(_0x29af13,_0x8ef916[_0xe27ffd(0x175)],_0x8ef916[_0xe27ffd(0x175)]+_0x8ef916[_0xe27ffd(0x151)],!0x1)),_0x8ef916[_0xe27ffd(0x19f)]>0x0&&_0x508708[_0xe27ffd(0x1f5)](_0x8ef916[_0xe27ffd(0x19f)]),t[_0xe27ffd(0x1fd)][_0xe27ffd(0x221)]()['editOp'](_0x508708[_0xe27ffd(0x173)](),_0x1ba4a3);}function Ae(_0x4c08e9,_0x43c1af){const _0x5ee3e6=_0x57036f;if(_0x4c08e9==null||_0x43c1af==null||_0x4c08e9===_0x43c1af)return null;let _0x4d3d00=0x0;for(;_0x4d3d00<_0x4c08e9[_0x5ee3e6(0x1e9)]&&_0x4d3d00<_0x43c1af['length']&&_0x4c08e9[_0x4d3d00]===_0x43c1af[_0x4d3d00];)_0x4d3d00+=0x1;let _0x17be3c=_0x4c08e9[_0x5ee3e6(0x1e9)],_0xdd18bb=_0x43c1af[_0x5ee3e6(0x1e9)];for(;_0x17be3c>_0x4d3d00&&_0xdd18bb>_0x4d3d00&&_0x4c08e9[_0x17be3c-0x1]===_0x43c1af[_0xdd18bb-0x1];)--_0x17be3c,--_0xdd18bb;return{'start':_0x4d3d00,'deleteLength':_0x17be3c-_0x4d3d00,'insertLength':_0xdd18bb-_0x4d3d00};}function je(_0x72d382){const _0x2f16ec=_0x57036f;return{'formulas':Object[_0x2f16ec(0x21a)](Object[_0x2f16ec(0x217)](_0x72d382[_0x2f16ec(0x1f8)])[_0x2f16ec(0x235)](([_0x2aacdb,_0x4d1bb1])=>[_0x2aacdb,{..._0x4d1bb1,..._0x4d1bb1['numberFormat']?{'numberFormat':{..._0x4d1bb1[_0x2f16ec(0x1e5)]}}:null,..._0x4d1bb1[_0x2f16ec(0x241)]?{'lastValue':{..._0x4d1bb1['lastValue']}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x15510b,_0x3deafa,_0x2bd4f5,_0x5007c3){const _0x16257b=_0x57036f;super(),this['_instanceService']=_0x15510b,this[_0x16257b(0x1d1)]=_0x3deafa,this[_0x16257b(0x17e)]=_0x2bd4f5,this[_0x16257b(0x15d)]=_0x5007c3,D(this,_0x16257b(0x14d),new Set()),D(this,_0x16257b(0x17f),!0x1),D(this,_0x16257b(0x1a7),!0x1),this[_0x16257b(0x17a)][_0x16257b(0x169)](t[_0x16257b(0x16b)][_0x16257b(0x1bc)])[_0x16257b(0x21f)](_0x2e2ed2=>this[_0x16257b(0x15d)][_0x16257b(0x14e)](_0x2e2ed2)),this[_0x16257b(0x157)](this['_model'][_0x16257b(0x1ba)][_0x16257b(0x15c)](({unitId:_0x4a0811})=>this[_0x16257b(0x123)](_0x4a0811))),this[_0x16257b(0x157)](this['_instanceService']['unitAdded$'][_0x16257b(0x15c)](({unit:_0x507160})=>{const _0x58ce50=_0x16257b;_0x507160['type']===t[_0x58ce50(0x16b)][_0x58ce50(0x1bc)]&&this[_0x58ce50(0x19b)](_0x507160[_0x58ce50(0x22e)]());})),this[_0x16257b(0x157)](this[_0x16257b(0x17a)][_0x16257b(0x1dd)][_0x16257b(0x15c)](_0x5ecf6f=>{const _0x3df91d=_0x16257b;this[_0x3df91d(0x15d)][_0x3df91d(0x18d)](_0x5ecf6f[_0x3df91d(0x22e)]());})),this[_0x16257b(0x157)](this['_commandService'][_0x16257b(0x1ea)](_0x3c6cdc=>{const _0x218763=_0x16257b;if(_0x3c6cdc['id']===n[_0x218763(0x23e)]['id']&&Me(_0x3c6cdc[_0x218763(0x1d0)])){let _0x39f8f7=_0x3c6cdc[_0x218763(0x1d0)];_0x39f8f7['segmentId']||this['_syncUnit'](_0x39f8f7[_0x218763(0x18e)]);}}));}[_0x57036f(0x1ca)](){const _0x1785a1=_0x57036f;this[_0x1785a1(0x1a7)]=!0x0,super[_0x1785a1(0x1ca)]();}[_0x57036f(0x19b)](_0x573440){const _0x5e394f=_0x57036f;this[_0x5e394f(0x14d)][_0x5e394f(0x16f)](_0x573440),this[_0x5e394f(0x17f)]||(this[_0x5e394f(0x17f)]=!0x0,queueMicrotask(()=>{const _0x2c1204=_0x5e394f;if(this['_syncScheduled']=!0x1,this[_0x2c1204(0x1a7)])return;let _0x5bbc86=Array['from'](this['_pendingUnitIds']);this[_0x2c1204(0x14d)][_0x2c1204(0x134)](),_0x5bbc86[_0x2c1204(0x21f)](_0x50ad15=>this[_0x2c1204(0x123)](_0x50ad15));}));}[_0x57036f(0x123)](_0x4a8bf8){const _0x33e0bd=_0x57036f;let _0x27438c=this[_0x33e0bd(0x17a)]['getUnit'](_0x4a8bf8,t[_0x33e0bd(0x16b)]['UNIVER_DOC']);_0x27438c&&this[_0x33e0bd(0x15d)][_0x33e0bd(0x14e)](_0x27438c);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x57036f(0x15a)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t[_0x57036f(0x136)])(j))],Y);function Me(_0x40348b){const _0x3014f7=_0x57036f;return typeof _0x40348b==_0x3014f7(0x190)&&!!_0x40348b&&_0x3014f7(0x18e)in _0x40348b&&typeof _0x40348b['unitId']==_0x3014f7(0x1b3)&&(!(_0x3014f7(0x24e)in _0x40348b)||_0x40348b['segmentId']===void 0x0||typeof _0x40348b[_0x3014f7(0x24e)]==_0x3014f7(0x1b3));}let X=class extends t[_0x57036f(0x201)]{constructor(_0x43844c,_0x1fd9ec){const _0x3b3b1e=_0x57036f;super(),this[_0x3b3b1e(0x16c)]=_0x43844c,this[_0x3b3b1e(0x1b0)]=_0x1fd9ec,this[_0x3b3b1e(0x157)](this[_0x3b3b1e(0x16c)][_0x3b3b1e(0x11f)]({'pluginName':o,'businesses':[t[_0x3b3b1e(0x16b)][_0x3b3b1e(0x1bc)]],'toJson':_0x2dbfcf=>JSON[_0x3b3b1e(0x147)](this[_0x3b3b1e(0x1b0)][_0x3b3b1e(0x173)](_0x2dbfcf)),'parseJson':_0x559406=>JSON['parse'](_0x559406),'onLoad':(_0x5470f6,_0xc836b7)=>{const _0x50b117=_0x3b3b1e;this[_0x50b117(0x1b0)][_0x50b117(0x1d5)](_0x5470f6,_0xc836b7);},'onUnLoad':_0x1c2dd4=>this['_docFormulaModel'][_0x3b3b1e(0x152)](_0x1c2dd4)}));}};X=A([k(0x0,t[_0x57036f(0x194)]),k(0x1,(0x0,t[_0x57036f(0x136)])(O))],X);var Ne=_0x57036f(0x1b9),Pe=_0x57036f(0x1f4);const Fe={};let Z=class extends t[_0x57036f(0x201)]{constructor(_0x305462,_0x22e0d4,_0x461b2d){const _0xf37adf=_0x57036f;super(),this[_0xf37adf(0x193)]=_0x305462,this[_0xf37adf(0x12e)]=_0x22e0d4,this['disposeWithMe'](_0x461b2d['register']({'resolve':(_0x4e936e,_0x9cb95b)=>{const _0xb16bbd=_0xf37adf;var _0x805e91;return((_0x805e91=_0x9cb95b['customRanges'])==null?void 0x0:_0x805e91['filter'](g)['map'](_0x4afd0f=>({'startOffset':_0x4afd0f[_0xb16bbd(0x14a)],'endOffset':_0x4afd0f[_0xb16bbd(0x189)]+0x1,'text':this[_0xb16bbd(0x12b)](_0x4e936e,_0x4afd0f[_0xb16bbd(0x1ab)])})))??[];}})),this[_0xf37adf(0x157)](this[_0xf37adf(0x12e)][_0xf37adf(0x118)][_0xf37adf(0x15c)](({unitId:_0x37088a})=>{_0x461b2d['notifyTextChanged'](_0x37088a);}));}[_0x57036f(0x12b)](_0x4ec3fb,_0x276e57){const _0x1589d2=_0x57036f;var _0x57a985;return((_0x57a985=this[_0x1589d2(0x12e)][_0x1589d2(0x236)]({'unitId':_0x4ec3fb,'rangeId':_0x276e57}))==null?void 0x0:_0x57a985[_0x1589d2(0x183)])??'';}[_0x57036f(0x207)](_0x58b78f,_0x77ab1a,_0x2c0fca){const _0xaa7a5a=_0x57036f;var _0x57caad;let _0x181a30=this[_0xaa7a5a(0x193)][_0xaa7a5a(0x11c)](_0x58b78f,t[_0xaa7a5a(0x16b)][_0xaa7a5a(0x1bc)]),_0x5d7ef4=_0x181a30==null?void 0x0:_0x181a30[_0xaa7a5a(0x1a9)]();if(!_0x5d7ef4)return'';let _0x2954db=_0x5d7ef4['dataStream'][_0xaa7a5a(0x1cc)](_0x77ab1a,_0x2c0fca),_0x495083=((_0x57caad=_0x5d7ef4[_0xaa7a5a(0x128)])==null?void 0x0:_0x57caad[_0xaa7a5a(0x205)](_0x11e48c=>g(_0x11e48c)&&_0x11e48c['startIndex']>=_0x77ab1a&&_0x11e48c[_0xaa7a5a(0x189)]<_0x2c0fca)[_0xaa7a5a(0x12c)]((_0x2239e1,_0x5661c0)=>_0x5661c0[_0xaa7a5a(0x14a)]-_0x2239e1['startIndex']))??[];for(let _0x2f3b32 of _0x495083){let _0x34f6cb=_0x2f3b32[_0xaa7a5a(0x14a)]-_0x77ab1a,_0x47a4e3=_0x2f3b32[_0xaa7a5a(0x189)]-_0x77ab1a+0x1;_0x2954db=''+_0x2954db['slice'](0x0,_0x34f6cb)+this[_0xaa7a5a(0x12b)](_0x58b78f,_0x2f3b32[_0xaa7a5a(0x1ab)])+_0x2954db[_0xaa7a5a(0x1cc)](_0x47a4e3);}return _0x2954db;}[_0x57036f(0x1a2)](_0x1feab2){return Ie(_0x1feab2);}[_0x57036f(0x149)](_0x4af771,_0x29b3fc,_0x5dbf91={}){const _0x26f0a6=_0x57036f;var _0x5ecc0b;return re({'id':_0x4af771,'body':_0x29b3fc,'documentStyle':{}},(((_0x5ecc0b=_0x29b3fc[_0x26f0a6(0x128)])==null?void 0x0:_0x5ecc0b['filter'](g))??[])[_0x26f0a6(0x235)](_0x1833df=>({'rangeId':_0x1833df['rangeId'],'text':_0x5dbf91[_0x1833df[_0x26f0a6(0x1ab)]]??this[_0x26f0a6(0x12b)](_0x4af771,_0x1833df[_0x26f0a6(0x1ab)])})))[_0x26f0a6(0x170)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x57036f(0x214)]),k(0x1,(0x0,t[_0x57036f(0x136)])(j)),k(0x2,(0x0,t[_0x57036f(0x136)])(n[_0x57036f(0x11e)]))],Z);function Ie(_0x163168){const _0x3341bf=_0x57036f;var _0x46bb01,_0xebcd1e;let _0x3135d8=Le(_0x163168),_0x19000b=re(_0x163168,(((_0x46bb01=_0x163168[_0x3341bf(0x170)])==null||(_0x46bb01=_0x46bb01[_0x3341bf(0x128)])==null?void 0x0:_0x46bb01[_0x3341bf(0x205)](g))??[])[_0x3341bf(0x235)](_0x98c41e=>({'rangeId':_0x98c41e[_0x3341bf(0x1ab)],'text':Re(_0x3135d8==null?void 0x0:_0x3135d8[_0x3341bf(0x1f8)][_0x98c41e['rangeId']])})));return _0x19000b[_0x3341bf(0x141)]=(_0xebcd1e=_0x19000b[_0x3341bf(0x141)])==null?void 0x0:_0xebcd1e[_0x3341bf(0x205)](_0x3de98f=>_0x3de98f[_0x3341bf(0x210)]!==o),_0x19000b;}function Le(_0x1f3a95){const _0x48c51e=_0x57036f;var _0x23271c;let _0x7117d1=(_0x23271c=_0x1f3a95[_0x48c51e(0x141)])==null||(_0x23271c=_0x23271c[_0x48c51e(0x1ac)](_0x1bee1b=>_0x1bee1b[_0x48c51e(0x210)]===_0x48c51e(0x1a5)))==null?void 0x0:_0x23271c['data'];if(_0x7117d1)try{let _0x132789=JSON[_0x48c51e(0x230)](_0x7117d1);return l(_0x132789)?_0x132789:void 0x0;}catch{return;}}function Re(_0x31d018){const _0x5cb1d9=_0x57036f;return _0x31d018?(0x0,e['resolveFormulaResultPresentation'])({'lastValue':_0x31d018[_0x5cb1d9(0x241)],'numberFormat':_0x31d018[_0x5cb1d9(0x1e5)]})[_0x5cb1d9(0x183)]:'';}let Q=class extends t[_0x57036f(0x201)]{constructor(_0x1c1db0,_0x3d13ca,_0x53ce0b){const _0xc471bc=_0x57036f;super(),this[_0xc471bc(0x12e)]=_0x1c1db0,this[_0xc471bc(0x21e)]=_0x3d13ca,this[_0xc471bc(0x157)](_0x53ce0b[_0xc471bc(0x1fc)](this));}[_0x57036f(0x243)](_0x390fd3){const _0xf61944=_0x57036f;let _0x28e86a=new Map();for(let _0x5a3708 of this[_0xf61944(0x12e)][_0xf61944(0x23d)]()){var _0x3b0b9e;if(!this[_0xf61944(0x21e)][_0xf61944(0x20c)](_0x5a3708[_0xf61944(0x1cf)][_0xf61944(0x126)],_0x5a3708[_0xf61944(0x19c)])[_0xf61944(0x1c3)])continue;let _0x13cf88=(0x0,e[_0xf61944(0x182)])(_0x5a3708[_0xf61944(0x19c)]),_0x5c77ba=_0x13cf88?(0x0,e[_0xf61944(0x1ec)])(_0x13cf88):null;if(!_0x5c77ba||ze(_0x5a3708[_0xf61944(0x1cf)]['lastValue'],_0x5c77ba))continue;let _0x2d0dda=_0x28e86a[_0xf61944(0x249)](_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x18e)])??[];_0x2d0dda[_0xf61944(0x1fb)]({'rangeId':_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x1ab)],'expectedFormula':_0x5a3708[_0xf61944(0x1cf)][_0xf61944(0x126)],'expectedNumberFormat':(_0x3b0b9e=_0x5a3708['config']['numberFormat'])==null?void 0x0:_0x3b0b9e[_0xf61944(0x1c8)],'expectedReferenceRevision':_0x5a3708['referenceRevision'],'lastValue':_0x5c77ba}),_0x28e86a[_0xf61944(0x23a)](_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x18e)],_0x2d0dda);}return Array[_0xf61944(0x1d9)](_0x28e86a,([_0x379a02,_0x19656a])=>({'id':R['id'],'params':{'unitId':_0x379a02,'updates':_0x19656a}}));}};Q=A([k(0x0,(0x0,t[_0x57036f(0x136)])(j)),k(0x1,(0x0,t['Inject'])(e[_0x57036f(0x143)])),k(0x2,(0x0,t[_0x57036f(0x136)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x1f7288,_0x710845){const _0x30271b=_0x57036f;return(_0x1f7288==null?void 0x0:_0x1f7288['v'])===_0x710845['v']&&(_0x1f7288==null?void 0x0:_0x1f7288['t'])===_0x710845['t']&&(_0x1f7288==null?void 0x0:_0x1f7288[_0x30271b(0x1c8)])===_0x710845[_0x30271b(0x1c8)];}let $=class extends t[_0x57036f(0x184)]{constructor(_0x36ea3d=Fe,_0x9038ae,_0x382b80,_0x1daf87){const _0x2d0f7d=_0x57036f;super(),this['_config']=_0x36ea3d,this['_injector']=_0x9038ae,this[_0x2d0f7d(0x1d1)]=_0x382b80,this[_0x2d0f7d(0x119)]=_0x1daf87;let {..._0x26ec24}=(0x0,t[_0x2d0f7d(0x21d)])({},Fe,this[_0x2d0f7d(0x19e)]);this[_0x2d0f7d(0x119)][_0x2d0f7d(0x148)](_0x2d0f7d(0x1e4),_0x26ec24);}['onStarting'](){const _0x513e71=_0x57036f;this[_0x513e71(0x24a)]['add']([O]),this['_injector'][_0x513e71(0x16f)]([j]),this['_injector'][_0x513e71(0x16f)]([X]),this[_0x513e71(0x24a)][_0x513e71(0x16f)]([Y]),this[_0x513e71(0x24a)][_0x513e71(0x16f)]([Q]),this['_injector'][_0x513e71(0x16f)]([Z]),(0x0,t[_0x513e71(0x12d)])(this[_0x513e71(0x24a)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x1f0aae=>this[_0x513e71(0x157)](this[_0x513e71(0x1d1)][_0x513e71(0x22b)](_0x1f0aae)));}};D($,_0x57036f(0x1d6),o),D($,_0x57036f(0x208),Ne),D($,'version',Pe),D($,'type',t[_0x57036f(0x16b)][_0x57036f(0x1bc)]),$=A([(0x0,t['DependentOn'])(a[_0x57036f(0x23b)],e[_0x57036f(0x164)],n[_0x57036f(0x16a)]),k(0x1,(0x0,t[_0x57036f(0x136)])(t[_0x57036f(0x204)])),k(0x2,t[_0x57036f(0x15a)]),k(0x3,t['IConfigService'])],$),exports[_0x57036f(0x239)]=W,exports[_0x57036f(0x20a)]=s,exports[_0x57036f(0x1e3)]='',exports[_0x57036f(0x1a5)]=o,Object[_0x57036f(0x165)](exports,_0x57036f(0x1f2),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x57036f(0x165)](exports,'DocFormulaLifecycleController',{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x57036f(0x213)]=O,Object[_0x57036f(0x165)](exports,_0x57036f(0x253),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x57036f(0x167)]=ve,Object[_0x57036f(0x165)](exports,_0x57036f(0x216),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x57036f(0x12f)]=z,exports[_0x57036f(0x234)]=m,exports[_0x57036f(0x256)]=H,exports[_0x57036f(0x139)]=I,exports['ReplaceDocFormulaWithTextCommand']=U,exports['SetDocFormulaLastValuesMutation']=R,exports['SetDocFormulaMutation']=F,exports[_0x57036f(0x161)]=V,exports[_0x57036f(0x1c2)]=L,Object[_0x57036f(0x165)](exports,_0x57036f(0x197),{'enumerable':!0x0,'get':function(){return $;}}),exports['UpdateDocFormulaCommand']=B,exports[_0x57036f(0x159)]=ie,exports[_0x57036f(0x1e0)]=te,exports['buildRemoveDocFormulaActions']=h,exports[_0x57036f(0x1a1)]=ne,exports[_0x57036f(0x1b4)]=c,exports[_0x57036f(0x1da)]=Ie,exports[_0x57036f(0x242)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x57036f(0x1dc)]=l,exports[_0x57036f(0x200)]=d;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x2b355b=_0x3a44;(function(_0x3b99bc,_0x4a9c94){var _0x205c82=_0x3a44,_0x4bf381=_0x3b99bc();while(!![]){try{var _0x3785b0=-parseInt(_0x205c82(0x1d2))/0x1*(-parseInt(_0x205c82(0x190))/0x2)+-parseInt(_0x205c82(0x19f))/0x3+parseInt(_0x205c82(0x1ac))/0x4+-parseInt(_0x205c82(0x18a))/0x5+parseInt(_0x205c82(0x1b3))/0x6+parseInt(_0x205c82(0x192))/0x7+-parseInt(_0x205c82(0x193))/0x8;if(_0x3785b0===_0x4a9c94)break;else _0x4bf381['push'](_0x4bf381['shift']());}catch(_0x4d233e){_0x4bf381['push'](_0x4bf381['shift']());}}}(_0x3b5e,0x58081));import{ConvertDocFormulaToTextCommand as _0x2d4520,DocFormulaDisplayTextService as _0xb17991,DocFormulaModel as _0x32fc45,DocFormulaService as _0x5bf394,InsertDocFormulaCommand as _0x3e5dad,RemoveDocFormulaCommand as _0x3eeb8c,ReplaceDocFormulaWithTextCommand as _0x497f52,SetDocFormulaNumberFormatCommand as _0x5dba3c,UpdateDocFormulaCommand as _0x9bf949,isDocFormulaRange as _0x3a1bb9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x128e28,IResourceLoaderService as _0xcfcf25,IUniverInstanceService as _0x23abd6,Inject as _0x2f2ecf,UniverInstanceType as _0x5a4427}from'@univerjs/core';import{FDocument as _0x1cb9b3,FDocumentParagraph as _0x477006,FDocumentTextRange as _0xe94339}from'@univerjs/docs/facade';function v(_0x558cab,_0x40a1cc){return function(_0x4af14b,_0x55fda7){_0x40a1cc(_0x4af14b,_0x55fda7,_0x558cab);};}function y(_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30){var _0xef8a6c=_0x3a44,_0x3016e6=arguments['length'],_0x36f69a=_0x3016e6<0x3?_0x507c35:_0x1aaa30===null?_0x1aaa30=Object['getOwnPropertyDescriptor'](_0x507c35,_0x2038e8):_0x1aaa30,_0x217356;if(typeof Reflect==_0xef8a6c(0x1b1)&&typeof Reflect[_0xef8a6c(0x1c7)]==_0xef8a6c(0x1bf))_0x36f69a=Reflect['decorate'](_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30);else{for(var _0x48fc6d=_0x3795b2[_0xef8a6c(0x1c5)]-0x1;_0x48fc6d>=0x0;_0x48fc6d--)(_0x217356=_0x3795b2[_0x48fc6d])&&(_0x36f69a=(_0x3016e6<0x3?_0x217356(_0x36f69a):_0x3016e6>0x3?_0x217356(_0x507c35,_0x2038e8,_0x36f69a):_0x217356(_0x507c35,_0x2038e8))||_0x36f69a);}return _0x3016e6>0x3&&_0x36f69a&&Object[_0xef8a6c(0x1a3)](_0x507c35,_0x2038e8,_0x36f69a),_0x36f69a;}let b=class{constructor(_0x533d09,_0x2d879f,_0x2451b0,_0x3272f3,_0x280091,_0x1d3e0e){var _0x2e43d7=_0x3a44;this[_0x2e43d7(0x1a8)]=_0x533d09,this[_0x2e43d7(0x1c1)]=_0x2d879f,this[_0x2e43d7(0x1ab)]=_0x2451b0,this['_model']=_0x3272f3,this['_service']=_0x280091,this[_0x2e43d7(0x1b9)]=_0x1d3e0e;}[_0x2b355b(0x1b2)](){var _0x524c58=_0x2b355b;return this[_0x524c58(0x1c1)];}[_0x2b355b(0x19c)](){var _0x59abd3=_0x2b355b;let _0x321151=this[_0x59abd3(0x18b)]();return _0x321151?{'endOffset':_0x321151['endIndex']+0x1,'rangeId':_0x321151[_0x59abd3(0x195)],'startOffset':_0x321151[_0x59abd3(0x199)]}:null;}[_0x2b355b(0x1b8)](){var _0x2e643a=_0x2b355b,_0x1b162e;return((_0x1b162e=this[_0x2e643a(0x1cf)][_0x2e643a(0x1b8)](this[_0x2e643a(0x1a8)],this[_0x2e643a(0x1c1)]))==null?void 0x0:_0x1b162e[_0x2e643a(0x19e)])??'';}[_0x2b355b(0x197)](){var _0x351545=_0x2b355b;return this[_0x351545(0x1cf)][_0x351545(0x1b8)](this[_0x351545(0x1a8)],this[_0x351545(0x1c1)])??null;}['getResult'](){var _0x469f77=_0x2b355b;return this['_service'][_0x469f77(0x1ae)]({'unitId':this[_0x469f77(0x1a8)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x42f651=_0x2b355b;let _0x147ae0=this[_0x42f651(0x19c)](),_0x187639=this[_0x42f651(0x197)](),_0x3f2874=this['getResult']();return!_0x147ae0||!_0x187639||!_0x3f2874?null:{..._0x147ae0,'config':_0x187639,'formula':_0x187639[_0x42f651(0x19e)],'result':_0x3f2874,'type':_0x42f651(0x19e)};}['update'](_0x45ecf7){var _0x23646f=_0x2b355b;return this['_commandService'][_0x23646f(0x18c)](_0x9bf949['id'],{'externalReferences':_0x45ecf7['externalReferences'],'formula':_0x45ecf7[_0x23646f(0x19e)],'numberFormat':_0x45ecf7['numberFormat'],'rangeId':this[_0x23646f(0x1c1)],'unitId':this[_0x23646f(0x1a8)]});}[_0x2b355b(0x1a5)](_0x2ae9e6){var _0x1acf0f=_0x2b355b;return this[_0x1acf0f(0x1ab)][_0x1acf0f(0x18c)](_0x5dba3c['id'],{'numberFormat':_0x2ae9e6,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2b355b(0x19a)](){var _0x349c08=_0x2b355b;return this[_0x349c08(0x1ab)]['syncExecuteCommand'](_0x3eeb8c['id'],{'rangeId':this[_0x349c08(0x1c1)],'unitId':this[_0x349c08(0x1a8)]});}[_0x2b355b(0x1c9)](_0x3d05f6){var _0x55f668=_0x2b355b;return this[_0x55f668(0x1ab)][_0x55f668(0x18c)](_0x497f52['id'],{'rangeId':this[_0x55f668(0x1c1)],'text':_0x3d05f6,'unitId':this[_0x55f668(0x1a8)]});}[_0x2b355b(0x1cc)](){var _0x4a2b0a=_0x2b355b;return this[_0x4a2b0a(0x1ab)]['syncExecuteCommand'](_0x2d4520['id'],{'rangeId':this[_0x4a2b0a(0x1c1)],'unitId':this[_0x4a2b0a(0x1a8)]});}['_getCustomRange'](){var _0x4b8c6e=_0x2b355b,_0x18a5d5;let _0x161d28=this[_0x4b8c6e(0x1b9)][_0x4b8c6e(0x1c2)](this[_0x4b8c6e(0x1a8)],_0x5a4427[_0x4b8c6e(0x1b4)]);return _0x161d28==null||(_0x18a5d5=_0x161d28['getSnapshot']()['body'])==null||(_0x18a5d5=_0x18a5d5[_0x4b8c6e(0x1cd)])==null?void 0x0:_0x18a5d5[_0x4b8c6e(0x1d1)](_0x1f7d5e=>_0x1f7d5e[_0x4b8c6e(0x195)]===this[_0x4b8c6e(0x1c1)]&&_0x3a1bb9(_0x1f7d5e));}};b=y([v(0x2,_0x128e28),v(0x3,_0x2f2ecf(_0x32fc45)),v(0x4,_0x2f2ecf(_0x5bf394)),v(0x5,_0x23abd6)],b);function x(_0x32b2e8){'@babel/helpers - typeof';var _0x2b02d8=_0x2b355b;return x=typeof Symbol=='function'&&typeof Symbol[_0x2b02d8(0x1a1)]=='symbol'?function(_0x396b3e){return typeof _0x396b3e;}:function(_0x504d0f){var _0x12042d=_0x2b02d8;return _0x504d0f&&typeof Symbol==_0x12042d(0x1bf)&&_0x504d0f[_0x12042d(0x1b7)]===Symbol&&_0x504d0f!==Symbol[_0x12042d(0x18f)]?_0x12042d(0x1a6):typeof _0x504d0f;},x(_0x32b2e8);}function S(_0x395844,_0x4f7aa0){var _0x8dafe9=_0x2b355b;if(x(_0x395844)!=_0x8dafe9(0x1b1)||!_0x395844)return _0x395844;var _0x5d5e5e=_0x395844[Symbol[_0x8dafe9(0x198)]];if(_0x5d5e5e!==void 0x0){var _0x59d213=_0x5d5e5e[_0x8dafe9(0x1ce)](_0x395844,_0x4f7aa0||_0x8dafe9(0x191));if(x(_0x59d213)!='object')return _0x59d213;throw TypeError(_0x8dafe9(0x1c6));}return(_0x4f7aa0===_0x8dafe9(0x1c0)?String:Number)(_0x395844);}function C(_0x38fd36){var _0x3fff0d=_0x2b355b,_0x3e2604=S(_0x38fd36,_0x3fff0d(0x1c0));return x(_0x3e2604)==_0x3fff0d(0x1a6)?_0x3e2604:_0x3e2604+'';}function w(_0x1313de,_0x2c3e53,_0x5b5c4f){var _0x27a84d=_0x2b355b;return(_0x2c3e53=C(_0x2c3e53))in _0x1313de?Object[_0x27a84d(0x1a3)](_0x1313de,_0x2c3e53,{'value':_0x5b5c4f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1313de[_0x2c3e53]=_0x5b5c4f,_0x1313de;}var T=class extends _0x1cb9b3{constructor(..._0x2d01d5){var _0x77f48a=_0x2b355b;super(..._0x2d01d5),w(this,_0x77f48a(0x1bd),void 0x0),w(this,_0x77f48a(0x1b6),void 0x0),w(this,_0x77f48a(0x1ca),void 0x0),w(this,_0x77f48a(0x18e),void 0x0);}['_initialize'](_0x1bc0b6){var _0x6493a8=_0x2b355b;this[_0x6493a8(0x1bd)]=_0x1bc0b6[_0x6493a8(0x196)](_0x128e28),this[_0x6493a8(0x1b6)]=_0x1bc0b6[_0x6493a8(0x196)](_0xb17991),this[_0x6493a8(0x1ca)]=_0x1bc0b6[_0x6493a8(0x196)](_0x32fc45),this['_docsFormulaResourceLoaderService']=_0x1bc0b6[_0x6493a8(0x196)](_0xcfcf25);}[_0x2b355b(0x1b0)](){var _0x488e46=_0x2b355b;return this[_0x488e46(0x1d0)]()[_0x488e46(0x1c4)](_0x3cdc72=>this[_0x488e46(0x1aa)](_0x3cdc72['rangeId']));}[_0x2b355b(0x1b8)](_0x2efd01){var _0x38170d=_0x2b355b;return this[_0x38170d(0x1d0)]()[_0x38170d(0x1a9)](_0x29dc0d=>_0x29dc0d[_0x38170d(0x195)]===_0x2efd01)?this[_0x38170d(0x1aa)](_0x2efd01):null;}[_0x2b355b(0x19b)](_0x3febe2){var _0x167dad=_0x2b355b;let _0x431509=this[_0x167dad(0x1d0)]()['find'](_0x560648=>_0x560648['startIndex']<=_0x3febe2&&_0x3febe2<=_0x560648['endIndex']);return _0x431509?this[_0x167dad(0x1aa)](_0x431509[_0x167dad(0x195)]):null;}[_0x2b355b(0x1be)](){var _0x4aa8c1=_0x2b355b;let _0x28a557=this[_0x4aa8c1(0x18e)][_0x4aa8c1(0x1d4)](this['id']);if(!_0x28a557)throw Error(_0x4aa8c1(0x18d)+this['id']+_0x4aa8c1(0x1d5));return this['_docsFormulaDisplayTextService'][_0x4aa8c1(0x1af)](_0x28a557);}[_0x2b355b(0x1c8)](_0x41d33d){var _0x191160=_0x2b355b;return this[_0x191160(0x1a2)]({'externalReferences':_0x41d33d[_0x191160(0x1bb)],'formula':_0x41d33d['formula'],'numberFormat':_0x41d33d[_0x191160(0x1b5)],'target':{'type':_0x191160(0x1a7),'startOffset':_0x41d33d[_0x191160(0x1ba)],'endOffset':_0x41d33d['endOffset']},'unitId':this[_0x191160(0x1b2)]()});}[_0x2b355b(0x1a2)](_0x46ed4e){var _0x120a7d=_0x2b355b;let _0x132226=this['_docsFormulaCommandService'][_0x120a7d(0x18c)](_0x3e5dad['id'],_0x46ed4e);return _0x132226?this[_0x120a7d(0x1aa)](_0x132226['rangeId']):null;}[_0x2b355b(0x1d0)](){var _0x1d58c3=_0x2b355b,_0x116043;let _0xb34047=this[_0x1d58c3(0x1ca)]['getFormulas'](this[_0x1d58c3(0x1b2)]());return((_0x116043=this[_0x1d58c3(0x1c3)]('')[_0x1d58c3(0x1cd)])==null?void 0x0:_0x116043['filter'](_0x258602=>_0x3a1bb9(_0x258602)&&_0xb34047[_0x258602[_0x1d58c3(0x195)]]!=null))??[];}['_createFormula'](_0x3cadc1){var _0x59c9da=_0x2b355b;return this[_0x59c9da(0x1a0)]['createInstance'](b,this[_0x59c9da(0x1b2)](),_0x3cadc1);}};_0x1cb9b3['extend'](T);function _0x3b5e(){var _0x290e25=['_insert','defineProperty','createInstance','setNumberFormat','symbol','range','_unitId','some','_createFormula','_commandService','2256652GmuLhb','end','getResult','degradeDocumentData','getFormulas','object','getId','794124FRKoMV','UNIVER_DOC','numberFormat','_docsFormulaDisplayTextService','constructor','getFormula','_univerInstanceService','startOffset','externalReferences','_document','_docsFormulaCommandService','saveFormulaDisplayTextSnapshot','function','string','_rangeId','getUnit','getBody','map','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','decorate','insertFormula','replaceWithText','_docsFormulaModel','getSegmentId','convertToText','customRanges','call','_model','_getCompleteRanges','find','5VqnOuw','replaceWithFormula','saveUnit','\x20could\x20not\x20be\x20serialized.','365840jGNHzE','_getCustomRange','syncExecuteCommand','Document\x20','_docsFormulaResourceLoaderService','prototype','106250feYDGj','default','2654498EkXvZH','6966968rLuuwy','_initialize','rangeId','get','getConfig','toPrimitive','startIndex','remove','getFormulaAt','getRange','extend','formula','110220RQLZiJ','_injector','iterator'];_0x3b5e=function(){return _0x290e25;};return _0x3b5e();}var E=class extends _0x477006{constructor(..._0x13cc1b){var _0x23ef8e=_0x2b355b;super(..._0x13cc1b),w(this,_0x23ef8e(0x1bd),void 0x0);}['_initialize'](_0x374214){var _0x5e1903=_0x2b355b;this[_0x5e1903(0x1bd)]=_0x374214[_0x5e1903(0x196)](_0x128e28);}[_0x2b355b(0x1c8)](_0x4ddb55,_0x1026ca,_0x1c34e6={}){return this['_insert'](_0x4ddb55,_0x1026ca,_0x1c34e6);}['appendFormula'](_0x560153,_0x1392d0={}){var _0x40d68b=_0x2b355b;return this['_insert'](_0x40d68b(0x1ad),_0x560153,_0x1392d0);}[_0x2b355b(0x1a2)](_0x1b3211,_0x5a92bb,_0x22039c){var _0x11d99d=_0x2b355b;if(this[_0x11d99d(0x1cb)]())return null;let _0x1f8ec8={'externalReferences':_0x22039c[_0x11d99d(0x1bb)],'formula':_0x5a92bb,'numberFormat':_0x22039c[_0x11d99d(0x1b5)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x1b3211},'unitId':this['_document']['getId']()},_0x33cff7=this[_0x11d99d(0x1bd)][_0x11d99d(0x18c)](_0x3e5dad['id'],_0x1f8ec8);return _0x33cff7?this['_injector'][_0x11d99d(0x1a4)](b,this[_0x11d99d(0x1bc)][_0x11d99d(0x1b2)](),_0x33cff7[_0x11d99d(0x195)]):null;}};function _0x3a44(_0x3dbffd,_0xdf1336){_0x3dbffd=_0x3dbffd-0x18a;var _0x3b5e39=_0x3b5e();var _0x3a44fe=_0x3b5e39[_0x3dbffd];return _0x3a44fe;}_0x477006[_0x2b355b(0x19d)](E);var D=class extends _0xe94339{constructor(..._0x4a40e1){var _0x610aa9=_0x2b355b;super(..._0x4a40e1),w(this,_0x610aa9(0x1bd),void 0x0);}[_0x2b355b(0x194)](_0x280f5d){var _0x37780b=_0x2b355b;this[_0x37780b(0x1bd)]=_0x280f5d['get'](_0x128e28);}[_0x2b355b(0x1d3)](_0x36cb09,_0x40b437={}){var _0x6b855b=_0x2b355b;let {endOffset:_0x32b929,segmentId:_0x353e47,startOffset:_0x2d07d4}=this[_0x6b855b(0x19c)]();return _0x353e47?null:this[_0x6b855b(0x1a2)](_0x2d07d4,_0x32b929,_0x36cb09,_0x40b437);}[_0x2b355b(0x1a2)](_0x5c1fcd,_0xac1fe0,_0x121cff,_0x1afa9a){var _0x1306de=_0x2b355b;let _0x8edbb6={'externalReferences':_0x1afa9a[_0x1306de(0x1bb)],'formula':_0x121cff,'numberFormat':_0x1afa9a[_0x1306de(0x1b5)],'target':{'type':_0x1306de(0x1a7),'startOffset':_0x5c1fcd,'endOffset':_0xac1fe0},'unitId':this[_0x1306de(0x1bc)]['getId']()},_0x3b6c94=this[_0x1306de(0x1bd)][_0x1306de(0x18c)](_0x3e5dad['id'],_0x8edbb6);return _0x3b6c94?this[_0x1306de(0x1a0)][_0x1306de(0x1a4)](b,this[_0x1306de(0x1bc)][_0x1306de(0x1b2)](),_0x3b6c94['rangeId']):null;}};_0xe94339[_0x2b355b(0x19d)](D);export{b as FDocumentFormula};
1
+ var _0x20d659=_0xb20e;(function(_0x14e544,_0x219eb4){var _0x3091fd=_0xb20e,_0x45f06e=_0x14e544();while(!![]){try{var _0x130610=parseInt(_0x3091fd(0x163))/0x1+-parseInt(_0x3091fd(0x172))/0x2+-parseInt(_0x3091fd(0x187))/0x3*(-parseInt(_0x3091fd(0x16f))/0x4)+parseInt(_0x3091fd(0x17c))/0x5*(-parseInt(_0x3091fd(0x181))/0x6)+parseInt(_0x3091fd(0x14a))/0x7*(-parseInt(_0x3091fd(0x183))/0x8)+-parseInt(_0x3091fd(0x152))/0x9*(parseInt(_0x3091fd(0x176))/0xa)+parseInt(_0x3091fd(0x18c))/0xb;if(_0x130610===_0x219eb4)break;else _0x45f06e['push'](_0x45f06e['shift']());}catch(_0x45ee2a){_0x45f06e['push'](_0x45f06e['shift']());}}}(_0x5f3d,0x52a74));import{ConvertDocFormulaToTextCommand as _0x4caa07,DocFormulaDisplayTextService as _0x1d4bd8,DocFormulaModel as _0x189be6,DocFormulaService as _0x31512b,InsertDocFormulaCommand as _0x31330d,RemoveDocFormulaCommand as _0x1a9573,ReplaceDocFormulaWithTextCommand as _0x4c9eaf,SetDocFormulaNumberFormatCommand as _0x375602,UpdateDocFormulaCommand as _0xd65571,isDocFormulaRange as _0x16147b}from'@univerjs-pro/docs-formula';import{ICommandService as _0x4c28f3,IResourceLoaderService as _0x5b8a61,IUniverInstanceService as _0x4bd504,Inject as _0x46f8a8,UniverInstanceType as _0x419927}from'@univerjs/core';import{FDocument as _0x43ca7f,FDocumentParagraph as _0x57efe3,FDocumentTextRange as _0x19ea5f}from'@univerjs/docs/facade';function v(_0x2a4c99,_0x178377){return function(_0x3a9876,_0x30bcb2){_0x178377(_0x3a9876,_0x30bcb2,_0x2a4c99);};}function y(_0x55f846,_0x3aec45,_0x4b77af,_0x810172){var _0x104fd8=_0xb20e,_0x33662c=arguments[_0x104fd8(0x192)],_0x36fe5c=_0x33662c<0x3?_0x3aec45:_0x810172===null?_0x810172=Object[_0x104fd8(0x190)](_0x3aec45,_0x4b77af):_0x810172,_0x3127c7;if(typeof Reflect==_0x104fd8(0x150)&&typeof Reflect[_0x104fd8(0x151)]==_0x104fd8(0x185))_0x36fe5c=Reflect['decorate'](_0x55f846,_0x3aec45,_0x4b77af,_0x810172);else{for(var _0x3d1fba=_0x55f846[_0x104fd8(0x192)]-0x1;_0x3d1fba>=0x0;_0x3d1fba--)(_0x3127c7=_0x55f846[_0x3d1fba])&&(_0x36fe5c=(_0x33662c<0x3?_0x3127c7(_0x36fe5c):_0x33662c>0x3?_0x3127c7(_0x3aec45,_0x4b77af,_0x36fe5c):_0x3127c7(_0x3aec45,_0x4b77af))||_0x36fe5c);}return _0x33662c>0x3&&_0x36fe5c&&Object[_0x104fd8(0x197)](_0x3aec45,_0x4b77af,_0x36fe5c),_0x36fe5c;}let b=class{constructor(_0x4476eb,_0x2bf561,_0x616419,_0x3a9f10,_0x1c3f7e,_0x299373){var _0x29f7de=_0xb20e;this[_0x29f7de(0x18b)]=_0x4476eb,this[_0x29f7de(0x15b)]=_0x2bf561,this[_0x29f7de(0x156)]=_0x616419,this[_0x29f7de(0x154)]=_0x3a9f10,this[_0x29f7de(0x18e)]=_0x1c3f7e,this[_0x29f7de(0x169)]=_0x299373;}['getId'](){return this['_rangeId'];}[_0x20d659(0x184)](){var _0x3adf4b=_0x20d659;let _0x24b999=this[_0x3adf4b(0x155)]();return _0x24b999?{'endOffset':_0x24b999[_0x3adf4b(0x16a)]+0x1,'rangeId':_0x24b999[_0x3adf4b(0x16c)],'startOffset':_0x24b999['startIndex']}:null;}[_0x20d659(0x189)](){var _0x36ef22=_0x20d659,_0xdd72e7;return((_0xdd72e7=this['_model'][_0x36ef22(0x189)](this[_0x36ef22(0x18b)],this[_0x36ef22(0x15b)]))==null?void 0x0:_0xdd72e7['formula'])??'';}[_0x20d659(0x193)](){var _0x24f05f=_0x20d659;return this[_0x24f05f(0x154)][_0x24f05f(0x189)](this[_0x24f05f(0x18b)],this['_rangeId'])??null;}['getResult'](){var _0x1147ae=_0x20d659;return this[_0x1147ae(0x18e)]['getResult']({'unitId':this['_unitId'],'rangeId':this[_0x1147ae(0x15b)]})??null;}[_0x20d659(0x14c)](){var _0x361ec1=_0x20d659;let _0x496166=this[_0x361ec1(0x184)](),_0x5a4af9=this[_0x361ec1(0x193)](),_0x207041=this[_0x361ec1(0x165)]();return!_0x496166||!_0x5a4af9||!_0x207041?null:{..._0x496166,'config':_0x5a4af9,'formula':_0x5a4af9[_0x361ec1(0x18a)],'result':_0x207041,'type':_0x361ec1(0x18a)};}[_0x20d659(0x191)](_0x22156e){var _0x41f4f6=_0x20d659;return this[_0x41f4f6(0x156)]['syncExecuteCommand'](_0xd65571['id'],{'externalReferences':_0x22156e[_0x41f4f6(0x17f)],'formula':_0x22156e[_0x41f4f6(0x18a)],'numberFormat':_0x22156e[_0x41f4f6(0x158)],'rangeId':this[_0x41f4f6(0x15b)],'unitId':this[_0x41f4f6(0x18b)]});}[_0x20d659(0x195)](_0xb10cfd){var _0x396f50=_0x20d659;return this[_0x396f50(0x156)][_0x396f50(0x17d)](_0x375602['id'],{'numberFormat':_0xb10cfd,'rangeId':this['_rangeId'],'unitId':this[_0x396f50(0x18b)]});}[_0x20d659(0x159)](){var _0x205c95=_0x20d659;return this[_0x205c95(0x156)][_0x205c95(0x17d)](_0x1a9573['id'],{'rangeId':this[_0x205c95(0x15b)],'unitId':this[_0x205c95(0x18b)]});}['replaceWithText'](_0x455d44){var _0x20497a=_0x20d659;return this[_0x20497a(0x156)][_0x20497a(0x17d)](_0x4c9eaf['id'],{'rangeId':this[_0x20497a(0x15b)],'text':_0x455d44,'unitId':this[_0x20497a(0x18b)]});}[_0x20d659(0x18f)](){var _0x7c98d2=_0x20d659;return this['_commandService']['syncExecuteCommand'](_0x4caa07['id'],{'rangeId':this[_0x7c98d2(0x15b)],'unitId':this[_0x7c98d2(0x18b)]});}[_0x20d659(0x155)](){var _0x36fbca=_0x20d659,_0x130a20;let _0x5b62e4=this[_0x36fbca(0x169)][_0x36fbca(0x15a)](this[_0x36fbca(0x18b)],_0x419927[_0x36fbca(0x153)]);return _0x5b62e4==null||(_0x130a20=_0x5b62e4['getSnapshot']()['body'])==null||(_0x130a20=_0x130a20[_0x36fbca(0x164)])==null?void 0x0:_0x130a20[_0x36fbca(0x16d)](_0x1b5733=>_0x1b5733[_0x36fbca(0x16c)]===this['_rangeId']&&_0x16147b(_0x1b5733));}};b=y([v(0x2,_0x4c28f3),v(0x3,_0x46f8a8(_0x189be6)),v(0x4,_0x46f8a8(_0x31512b)),v(0x5,_0x4bd504)],b);function x(_0x4dd03c){'@babel/helpers - typeof';var _0x1374d1=_0x20d659;return x=typeof Symbol=='function'&&typeof Symbol[_0x1374d1(0x160)]=='symbol'?function(_0x2a09ef){return typeof _0x2a09ef;}:function(_0x719f2){var _0x1a73ef=_0x1374d1;return _0x719f2&&typeof Symbol=='function'&&_0x719f2[_0x1a73ef(0x15c)]===Symbol&&_0x719f2!==Symbol[_0x1a73ef(0x177)]?_0x1a73ef(0x161):typeof _0x719f2;},x(_0x4dd03c);}function S(_0x231e2a,_0x328ca1){var _0x4f0bea=_0x20d659;if(x(_0x231e2a)!=_0x4f0bea(0x150)||!_0x231e2a)return _0x231e2a;var _0xfb6c1b=_0x231e2a[Symbol['toPrimitive']];if(_0xfb6c1b!==void 0x0){var _0x108374=_0xfb6c1b[_0x4f0bea(0x149)](_0x231e2a,_0x328ca1||'default');if(x(_0x108374)!='object')return _0x108374;throw TypeError(_0x4f0bea(0x16b));}return(_0x328ca1===_0x4f0bea(0x174)?String:Number)(_0x231e2a);}function C(_0x432abc){var _0x2c3b18=_0x20d659,_0x5b6f43=S(_0x432abc,_0x2c3b18(0x174));return x(_0x5b6f43)==_0x2c3b18(0x161)?_0x5b6f43:_0x5b6f43+'';}function w(_0x1fd4ef,_0x352afd,_0x43da99){var _0x4b1911=_0x20d659;return(_0x352afd=C(_0x352afd))in _0x1fd4ef?Object[_0x4b1911(0x197)](_0x1fd4ef,_0x352afd,{'value':_0x43da99,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1fd4ef[_0x352afd]=_0x43da99,_0x1fd4ef;}var T=class extends _0x43ca7f{constructor(..._0x186015){var _0x46a76f=_0x20d659;super(..._0x186015),w(this,_0x46a76f(0x180),void 0x0),w(this,_0x46a76f(0x182),void 0x0),w(this,'_docsFormulaModel',void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}['_initialize'](_0x4c7ccb){var _0x85283b=_0x20d659;this[_0x85283b(0x180)]=_0x4c7ccb[_0x85283b(0x162)](_0x4c28f3),this[_0x85283b(0x182)]=_0x4c7ccb['get'](_0x1d4bd8),this[_0x85283b(0x166)]=_0x4c7ccb[_0x85283b(0x162)](_0x189be6),this[_0x85283b(0x14d)]=_0x4c7ccb['get'](_0x5b8a61);}[_0x20d659(0x15f)](){var _0xdf6f6c=_0x20d659;return this['_getCompleteRanges']()[_0xdf6f6c(0x17b)](_0x1e87ec=>this[_0xdf6f6c(0x14b)](_0x1e87ec[_0xdf6f6c(0x16c)]));}[_0x20d659(0x189)](_0x431a36){var _0x36770a=_0x20d659;return this['_getCompleteRanges']()['some'](_0x5c9692=>_0x5c9692[_0x36770a(0x16c)]===_0x431a36)?this[_0x36770a(0x14b)](_0x431a36):null;}['getFormulaAt'](_0x51cc17){var _0x2edc91=_0x20d659;let _0xfd8b2d=this[_0x2edc91(0x15e)]()[_0x2edc91(0x16d)](_0x3e79ac=>_0x3e79ac[_0x2edc91(0x148)]<=_0x51cc17&&_0x51cc17<=_0x3e79ac[_0x2edc91(0x16a)]);return _0xfd8b2d?this['_createFormula'](_0xfd8b2d[_0x2edc91(0x16c)]):null;}[_0x20d659(0x17a)](){var _0x132ff7=_0x20d659;let _0x441a5a=this[_0x132ff7(0x14d)][_0x132ff7(0x167)](this['id']);if(!_0x441a5a)throw Error('Document\x20'+this['id']+_0x132ff7(0x17e));return this['_docsFormulaDisplayTextService'][_0x132ff7(0x18d)](_0x441a5a);}[_0x20d659(0x168)](_0x8a15a4){var _0x384f60=_0x20d659;return this['_insert']({'externalReferences':_0x8a15a4[_0x384f60(0x17f)],'formula':_0x8a15a4[_0x384f60(0x18a)],'numberFormat':_0x8a15a4[_0x384f60(0x158)],'target':{'type':'range','startOffset':_0x8a15a4['startOffset'],'endOffset':_0x8a15a4[_0x384f60(0x194)]},'unitId':this[_0x384f60(0x188)]()});}[_0x20d659(0x14f)](_0x2b7520){var _0x116763=_0x20d659;let _0x14695c=this[_0x116763(0x180)][_0x116763(0x17d)](_0x31330d['id'],_0x2b7520);return _0x14695c?this[_0x116763(0x14b)](_0x14695c[_0x116763(0x16c)]):null;}['_getCompleteRanges'](){var _0xc35746=_0x20d659,_0x30167a;let _0x4b419d=this[_0xc35746(0x166)][_0xc35746(0x15f)](this['getId']());return((_0x30167a=this[_0xc35746(0x179)]('')[_0xc35746(0x164)])==null?void 0x0:_0x30167a[_0xc35746(0x157)](_0x10f21e=>_0x16147b(_0x10f21e)&&_0x4b419d[_0x10f21e[_0xc35746(0x16c)]]!=null))??[];}[_0x20d659(0x14b)](_0x3b1138){var _0x213477=_0x20d659;return this[_0x213477(0x178)][_0x213477(0x14e)](b,this[_0x213477(0x188)](),_0x3b1138);}};function _0xb20e(_0xfecdfa,_0x1661ff){_0xfecdfa=_0xfecdfa-0x148;var _0x5f3d13=_0x5f3d();var _0xb20e0b=_0x5f3d13[_0xfecdfa];return _0xb20e0b;}_0x43ca7f[_0x20d659(0x173)](T);var E=class extends _0x57efe3{constructor(..._0x4d7126){super(..._0x4d7126),w(this,'_docsFormulaCommandService',void 0x0);}[_0x20d659(0x175)](_0x2a763f){var _0x293b80=_0x20d659;this[_0x293b80(0x180)]=_0x2a763f[_0x293b80(0x162)](_0x4c28f3);}[_0x20d659(0x168)](_0x3852fd,_0x4ad99f,_0x1b96dd={}){var _0x26a57f=_0x20d659;return this[_0x26a57f(0x14f)](_0x3852fd,_0x4ad99f,_0x1b96dd);}[_0x20d659(0x16e)](_0x34038f,_0x5eb7c4={}){var _0x155e3f=_0x20d659;return this['_insert'](_0x155e3f(0x196),_0x34038f,_0x5eb7c4);}['_insert'](_0x5932fc,_0x561d0b,_0x1e5b6f){var _0x3d89cc=_0x20d659;if(this[_0x3d89cc(0x171)]())return null;let _0x4b1da6={'externalReferences':_0x1e5b6f[_0x3d89cc(0x17f)],'formula':_0x561d0b,'numberFormat':_0x1e5b6f[_0x3d89cc(0x158)],'target':{'type':_0x3d89cc(0x170),'paragraphId':this['getId'](),'position':_0x5932fc},'unitId':this[_0x3d89cc(0x186)]['getId']()},_0x1b61a3=this['_docsFormulaCommandService'][_0x3d89cc(0x17d)](_0x31330d['id'],_0x4b1da6);return _0x1b61a3?this[_0x3d89cc(0x178)]['createInstance'](b,this[_0x3d89cc(0x186)][_0x3d89cc(0x188)](),_0x1b61a3['rangeId']):null;}};_0x57efe3[_0x20d659(0x173)](E);var D=class extends _0x19ea5f{constructor(..._0x3a74d0){var _0xad80c9=_0x20d659;super(..._0x3a74d0),w(this,_0xad80c9(0x180),void 0x0);}[_0x20d659(0x175)](_0x278be9){this['_docsFormulaCommandService']=_0x278be9['get'](_0x4c28f3);}[_0x20d659(0x15d)](_0x54550e,_0x2b4315={}){var _0x28c48d=_0x20d659;let {endOffset:_0x4ce5e6,segmentId:_0x5288e6,startOffset:_0xd1ee8e}=this[_0x28c48d(0x184)]();return _0x5288e6?null:this['_insert'](_0xd1ee8e,_0x4ce5e6,_0x54550e,_0x2b4315);}[_0x20d659(0x14f)](_0x50dca8,_0x10f1d8,_0x4e69f2,_0x3a25bd){var _0x411c37=_0x20d659;let _0x2b2c4f={'externalReferences':_0x3a25bd[_0x411c37(0x17f)],'formula':_0x4e69f2,'numberFormat':_0x3a25bd[_0x411c37(0x158)],'target':{'type':'range','startOffset':_0x50dca8,'endOffset':_0x10f1d8},'unitId':this[_0x411c37(0x186)][_0x411c37(0x188)]()},_0x31ac43=this['_docsFormulaCommandService'][_0x411c37(0x17d)](_0x31330d['id'],_0x2b2c4f);return _0x31ac43?this['_injector']['createInstance'](b,this['_document'][_0x411c37(0x188)](),_0x31ac43[_0x411c37(0x16c)]):null;}};_0x19ea5f[_0x20d659(0x173)](D);export{b as FDocumentFormula};function _0x5f3d(){var _0x1c1eac=['filter','numberFormat','remove','getUnit','_rangeId','constructor','replaceWithFormula','_getCompleteRanges','getFormulas','iterator','symbol','get','156347NZbTwj','customRanges','getResult','_docsFormulaModel','saveUnit','insertFormula','_univerInstanceService','endIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','rangeId','find','appendFormula','2892CGOSFt','paragraph','getSegmentId','1096224ZVUNnD','extend','string','_initialize','260nFEbnv','prototype','_injector','getBody','saveFormulaDisplayTextSnapshot','map','2542745GdgtUF','syncExecuteCommand','\x20could\x20not\x20be\x20serialized.','externalReferences','_docsFormulaCommandService','6phSubx','_docsFormulaDisplayTextService','304888wVSxfl','getRange','function','_document','570drBZCV','getId','getFormula','formula','_unitId','14823347pIKzxt','degradeDocumentData','_service','convertToText','getOwnPropertyDescriptor','update','length','getConfig','endOffset','setNumberFormat','end','defineProperty','startIndex','call','7QXOdOe','_createFormula','describe','_docsFormulaResourceLoaderService','createInstance','_insert','object','decorate','71991jevcNd','UNIVER_DOC','_model','_getCustomRange','_commandService'];_0x5f3d=function(){return _0x1c1eac;};return _0x5f3d();}