@univerjs-pro/docs-formula 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3a7f13=_0x53b8;(function(_0x9328e1,_0x131692){const _0x1e12e8=_0x53b8,_0x5c827a=_0x9328e1();while(!![]){try{const _0x31ada3=-parseInt(_0x1e12e8(0x187))/0x1*(-parseInt(_0x1e12e8(0x1c3))/0x2)+parseInt(_0x1e12e8(0x22d))/0x3+parseInt(_0x1e12e8(0x196))/0x4*(-parseInt(_0x1e12e8(0x1e3))/0x5)+parseInt(_0x1e12e8(0x1c8))/0x6*(-parseInt(_0x1e12e8(0x263))/0x7)+parseInt(_0x1e12e8(0x1f2))/0x8*(-parseInt(_0x1e12e8(0x26b))/0x9)+-parseInt(_0x1e12e8(0x24c))/0xa*(-parseInt(_0x1e12e8(0x19b))/0xb)+parseInt(_0x1e12e8(0x1b8))/0xc;if(_0x31ada3===_0x131692)break;else _0x5c827a['push'](_0x5c827a['shift']());}catch(_0x2dfca3){_0x5c827a['push'](_0x5c827a['shift']());}}}(_0x52b2,0x5549a));import{FormulaCacheEligibilityService as _0x13ac3a,FormulaLastValuePersistenceService as _0x416b1f,HostExternalReferenceModel as _0xceeb38,UniverProFormulaEnginePlugin as _0x513513,buildUpsertHostExternalReferenceMutations as _0x3b0f43,collectFormulaExternalReferenceQualifiers as _0x48d68a,getScalarFormulaResultCell as _0x3ee924,resolveFormulaResultPresentation as _0x12221e,resolveHostFormulaExternalReferences as _0x5d5293,toFormulaLastValue as _0x5a1b13}from'@univerjs-pro/engine-formula';import{CellValueType as _0x320583,CommandType as _0x16d163,CustomRangeType as _0x38abe7,DataStreamTreeTokenType as _0x3c59f5,DependentOn as _0x37da81,Disposable as _0x533030,ICommandService as _0x9a0954,IConfigService as _0x4226f8,IResourceManagerService as _0x164b3f,IUndoRedoService as _0x16e8d6,IUniverInstanceService as _0x2629d5,Inject as _0x5d6038,Injector as _0x2a8248,JSONX as _0x5e930b,Plugin as _0x26195d,TextX as _0x556769,Tools as _0x5a1e4f,UniverInstanceType as _0x4aa394,generateRandomId as _0x32ab18,getBodySliceForTextXAction as _0x282876,getCustomRangeInterval as _0x4f97d4,getParagraphContentStartOffset as _0x19d939,getRichTextEditPath as _0x410a7f,merge as _0x4e3800,shiftExclusiveRangeOnDelete as _0x422036,shiftExclusiveRangeOnInsert as _0x514d4f,shiftInclusiveRangeOnDelete as _0x433aa0,shiftInclusiveRangeOnInsert as _0x4b4cb7,touchDependencies as _0xddcf97}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x5393de,DocSelectionManagerService as _0x3d26b2,DocTextResolverService as _0x2459b3,RichTextEditingMutation as _0xd26f03,UniverDocsPlugin as _0x46761e}from'@univerjs/docs';import{FormulaResultStatus as _0x2c8d51,LexerTreeBuilder as _0x9fae86,OtherFormulaBizType as _0x2b96ca,RegisterOtherFormulaService as _0x16b5f1}from'@univerjs/engine-formula';import{Subject as _0x52ee64}from'rxjs';import{UniverLicensePlugin as _0x3344bd}from'@univerjs-pro/license';const y=_0x3a7f13(0x232),je=_0x3a7f13(0x1b3),Me='';function b(){return{'formulas':{}};}function x(_0x468856){const _0x21a001=_0x3a7f13;return!_0x468856||typeof _0x468856!='object'||!(_0x21a001(0x264)in _0x468856)||!_0x468856['formulas']||typeof _0x468856[_0x21a001(0x264)]!='object'||Array['isArray'](_0x468856[_0x21a001(0x264)])?!0x1:Object[_0x21a001(0x249)](_0x468856[_0x21a001(0x264)])[_0x21a001(0x186)](([_0x5bc57c,_0x5bb470])=>_0x5bc57c[_0x21a001(0x218)]>0x0&&Ne(_0x5bb470));}function _0x53b8(_0x2201e4,_0x55d4b0){_0x2201e4=_0x2201e4-0x180;const _0x52b22e=_0x52b2();let _0x53b8d2=_0x52b22e[_0x2201e4];return _0x53b8d2;}function Ne(_0x3b9f52){const _0x1751a0=_0x3a7f13;return!_0x3b9f52||typeof _0x3b9f52!='object'||!S(_0x3b9f52,[_0x1751a0(0x24d),_0x1751a0(0x230),_0x1751a0(0x1ff)])||!('formula'in _0x3b9f52)||typeof _0x3b9f52['formula']!='string'||!_0x3b9f52[_0x1751a0(0x24d)]['trim']()||_0x1751a0(0x230)in _0x3b9f52&&_0x3b9f52['numberFormat']!=null&&(typeof _0x3b9f52['numberFormat']!='object'||!S(_0x3b9f52[_0x1751a0(0x230)],[_0x1751a0(0x229)])||!(_0x1751a0(0x229)in _0x3b9f52[_0x1751a0(0x230)])||typeof _0x3b9f52[_0x1751a0(0x230)][_0x1751a0(0x229)]!='string')?!0x1:!('lastValue'in _0x3b9f52)||_0x3b9f52[_0x1751a0(0x1ff)]==null||Pe(_0x3b9f52[_0x1751a0(0x1ff)]);}function Pe(_0x2df729){const _0x43ed20=_0x3a7f13;return!_0x2df729||typeof _0x2df729!=_0x43ed20(0x247)||!S(_0x2df729,['v','t',_0x43ed20(0x229)])||!('v'in _0x2df729)||_0x2df729['v']!==null&&typeof _0x2df729['v']!=_0x43ed20(0x25f)&&typeof _0x2df729['v']!='number'&&typeof _0x2df729['v']!=_0x43ed20(0x1a2)||'t'in _0x2df729&&_0x2df729['t']!=null&&!Fe(_0x2df729['t'])?!0x1:!(_0x43ed20(0x229)in _0x2df729)||_0x2df729[_0x43ed20(0x229)]==null||typeof _0x2df729[_0x43ed20(0x229)]==_0x43ed20(0x25f);}function S(_0x4f7174,_0x249d11){const _0x22d68f=_0x3a7f13;let _0x5076cd=new Set(_0x249d11);return Object[_0x22d68f(0x241)](_0x4f7174)['every'](_0x1b71e1=>_0x5076cd[_0x22d68f(0x260)](_0x1b71e1));}function Fe(_0x25cf79){const _0x3c817f=_0x3a7f13;return typeof _0x25cf79=='number'&&Object['values'](_0x320583)[_0x3c817f(0x21f)](_0x25cf79);}const Ie=new Set([_0x3c59f5[_0x3a7f13(0x1d5)],_0x3c59f5[_0x3a7f13(0x1dd)],_0x3c59f5[_0x3a7f13(0x22c)],_0x3c59f5[_0x3a7f13(0x1ec)],_0x3c59f5[_0x3a7f13(0x279)],_0x3c59f5[_0x3a7f13(0x246)],_0x3c59f5[_0x3a7f13(0x185)],_0x3c59f5[_0x3a7f13(0x1ba)],_0x3c59f5['COLUMN_START'],_0x3c59f5[_0x3a7f13(0x18b)],_0x3c59f5[_0x3a7f13(0x1bb)],_0x3c59f5[_0x3a7f13(0x1c2)],_0x3c59f5[_0x3a7f13(0x1fa)],_0x3c59f5['CUSTOM_BLOCK']]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Le(_0x3cff8b){const _0x178960=_0x3a7f13;var _0x4f1467,_0x3c367c;let _0x3ffeab=_0x5a1e4f[_0x178960(0x201)](_0x3cff8b[_0x178960(0x1c6)]),_0x2c9849=O(_0x3ffeab),{startOffset:_0x5842c4,endOffset:_0x2617a6}=We(_0x2c9849,_0x3cff8b[_0x178960(0x23e)],_0x3cff8b[_0x178960(0x21d)]);Ve(_0x2c9849,_0x5842c4,_0x2617a6);let _0x23bc8c=((_0x4f1467=_0x2c9849['customRanges'])==null?void 0x0:_0x4f1467['filter'](_0x31d1ca=>{const _0x3a3cb6=_0x178960;if(!w(_0x31d1ca))return!0x1;let _0x576375=_0x4f97d4(_0x31d1ca);return _0x576375[_0x3a3cb6(0x21d)]>_0x5842c4&&_0x576375[_0x3a3cb6(0x23e)]<_0x2617a6;})[_0x178960(0x266)](_0x1af40c=>_0x1af40c[_0x178960(0x23f)]))??[];qe(_0x2c9849,_0x5842c4,_0x2617a6,''),_0x2c9849[_0x178960(0x182)]=[...((_0x3c367c=_0x2c9849[_0x178960(0x182)])==null?void 0x0:_0x3c367c[_0x178960(0x280)](_0x2d4851=>!_0x23bc8c['includes'](_0x2d4851['rangeId'])&&_0x2d4851['rangeId']!==_0x3cff8b[_0x178960(0x23f)]))??[],He(_0x3cff8b[_0x178960(0x23f)],_0x5842c4)][_0x178960(0x20e)]((_0x26a2ab,_0x3d3052)=>_0x26a2ab['startIndex']-_0x3d3052[_0x178960(0x254)]);let _0x251d51=Ue(_0x3cff8b[_0x178960(0x1a5)]);return _0x23bc8c['forEach'](_0x52de0e=>{delete _0x251d51['formulas'][_0x52de0e];}),_0x251d51[_0x178960(0x264)][_0x3cff8b['rangeId']]=_0x5a1e4f['deepClone'](_0x3cff8b[_0x178960(0x270)]),{'nextDocumentData':_0x3ffeab,'nextResource':_0x251d51,'cursorOffset':_0x5842c4+0x1};}function Re(_0x9e9209){const _0x66310b=_0x3a7f13;var _0x2c6cd7,_0x5bf3d5;let _0x5d9611=_0x5a1e4f['deepClone'](_0x9e9209[_0x66310b(0x1c6)]),_0x5d175e=(_0x2c6cd7=O(_0x5d9611)['customRanges'])==null?void 0x0:_0x2c6cd7[_0x66310b(0x19d)](_0x5adfc2=>_0x5adfc2[_0x66310b(0x23f)]===_0x9e9209[_0x66310b(0x23f)]&&w(_0x5adfc2));if(!_0x5d175e||!((_0x5bf3d5=_0x9e9209[_0x66310b(0x1a5)])!=null&&_0x5bf3d5[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]))return null;let _0x3f9a1d=Ue(_0x9e9209['resource']);return _0x3f9a1d[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]=_0x5a1e4f[_0x66310b(0x201)](_0x9e9209[_0x66310b(0x270)]),{'nextDocumentData':_0x5d9611,'nextResource':_0x3f9a1d,'cursorOffset':_0x5d175e[_0x66310b(0x221)]+0x1};}function ze(_0x8008f9){const _0x5ab265=_0x3a7f13;let _0x5e6d1c=_0x5a1e4f[_0x5ab265(0x201)](_0x8008f9[_0x5ab265(0x1c6)]),_0x5a7e08=Je(_0x5e6d1c,_0x8008f9[_0x5ab265(0x23f)],_0x8008f9['text']??'');if(_0x5a7e08==null)return null;let _0x2f32cc=Ue(_0x8008f9[_0x5ab265(0x1a5)]);return delete _0x2f32cc['formulas'][_0x8008f9[_0x5ab265(0x23f)]],{'nextDocumentData':_0x5e6d1c,'nextResource':_0x2f32cc,'cursorOffset':_0x5a7e08};}function Be(_0x112710,_0x28abb6){const _0x447d65=_0x3a7f13;var _0x3ef21c;let _0x5dfc4a=_0x5a1e4f[_0x447d65(0x201)](_0x112710),_0x4268a4=_0x5dfc4a[_0x447d65(0x1b4)];if(!_0x4268a4)return _0x5dfc4a;let _0x134355=new Map(_0x28abb6[_0x447d65(0x266)](_0x40f755=>[_0x40f755['rangeId'],_0x40f755[_0x447d65(0x192)]])),_0x171177=((_0x3ef21c=_0x4268a4[_0x447d65(0x182)])==null?void 0x0:_0x3ef21c[_0x447d65(0x280)](_0x4445a2=>w(_0x4445a2)&&_0x134355[_0x447d65(0x260)](_0x4445a2['rangeId']))[_0x447d65(0x20e)]((_0x26c3ff,_0x219773)=>_0x219773[_0x447d65(0x254)]-_0x26c3ff['startIndex']))??[];for(let _0x229a8a of _0x171177)Je(_0x5dfc4a,_0x229a8a[_0x447d65(0x23f)],_0x134355[_0x447d65(0x1b1)](_0x229a8a[_0x447d65(0x23f)])??'');return _0x5dfc4a;}function w(_0x3fc54e){const _0x4d30ae=_0x3a7f13;var _0x394916;return(_0x3fc54e==null?void 0x0:_0x3fc54e[_0x4d30ae(0x213)])===_0x38abe7[_0x4d30ae(0x1cc)]&&_0x3fc54e[_0x4d30ae(0x20d)]===!0x0&&((_0x394916=_0x3fc54e[_0x4d30ae(0x1a0)])==null?void 0x0:_0x394916['kind'])===_0x4d30ae(0x1b3);}function T(_0x2361f6,_0x5a3446){const _0x328429=_0x3a7f13;var _0x5e8934;return _0x2361f6==null||(_0x5e8934=_0x2361f6[_0x328429(0x182)])==null?void 0x0:_0x5e8934[_0x328429(0x19d)](_0x552181=>_0x552181[_0x328429(0x23f)]===_0x5a3446&&w(_0x552181));}function Ve(_0x3dcf85,_0x315322,_0x1cc193){const _0x1a283c=_0x3a7f13;if(_0x315322===_0x1cc193){if(Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x315322]))throw new C();}else{for(let _0x2e763c=_0x315322;_0x2e763c<_0x1cc193;_0x2e763c++)if(_0x3dcf85[_0x1a283c(0x1f4)][_0x2e763c]===_0x3c59f5[_0x1a283c(0x18c)]||Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x2e763c]))throw new C();}}function He(_0x5c2062,_0xe42fc7){return{'startIndex':_0xe42fc7,'endIndex':_0xe42fc7,'rangeId':_0x5c2062,'rangeType':_0x38abe7['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x37ebe4){const _0x53b378=_0x3a7f13;return _0x37ebe4?_0x5a1e4f[_0x53b378(0x201)](_0x37ebe4):b();}function We(_0x19cd40,_0xe0eefd,_0x5bd9f9){const _0xcc8a8a=_0x3a7f13;let _0x17ca85=Ke(_0x19cd40),_0xd8f963=_0xe0eefd??_0x17ca85,_0x17ee48=_0x5bd9f9??_0xd8f963;return{'startOffset':Ge(Math[_0xcc8a8a(0x211)](_0xd8f963,_0x17ee48),_0x17ca85),'endOffset':Ge(Math[_0xcc8a8a(0x222)](_0xd8f963,_0x17ee48),_0x17ca85)};}function Ge(_0x375055,_0x4718fa){const _0x31e305=_0x3a7f13;return Math[_0x31e305(0x222)](0x0,Math[_0x31e305(0x211)](_0x375055,_0x4718fa));}function Ke(_0xed0bce){const _0x1abdcc=_0x3a7f13;return _0xed0bce['dataStream'][_0x1abdcc(0x27a)](''+_0x3c59f5[_0x1abdcc(0x18c)]+_0x3c59f5[_0x1abdcc(0x1d5)])?Math['max'](0x0,_0xed0bce[_0x1abdcc(0x1f4)]['length']-0x2):_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x27a)](_0x3c59f5[_0x1abdcc(0x1d5)])?Math[_0x1abdcc(0x222)](0x0,_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x218)]-0x1):_0xed0bce['dataStream'][_0x1abdcc(0x218)];}function qe(_0x5cc2e5,_0x5271f2,_0x101cf0,_0x5079dc){_0x101cf0>_0x5271f2&&Xe(_0x5cc2e5,_0x5271f2,_0x101cf0),Ye(_0x5cc2e5,_0x5271f2,_0x5079dc);}function Je(_0x2694db,_0x20623e,_0x20552e){const _0x49e854=_0x3a7f13;var _0x37d030,_0x5a301e;let _0x519733=O(_0x2694db),_0x2d86a1=(_0x37d030=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x37d030[_0x49e854(0x19d)](_0x3c66de=>_0x3c66de[_0x49e854(0x23f)]===_0x20623e&&w(_0x3c66de));if(!_0x2d86a1)return null;let _0x124735=_0x4f97d4(_0x2d86a1);return qe(_0x519733,_0x124735[_0x49e854(0x23e)],_0x124735[_0x49e854(0x21d)],_0x20552e),_0x519733[_0x49e854(0x182)]=(_0x5a301e=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x5a301e[_0x49e854(0x280)](_0x93718f=>_0x93718f[_0x49e854(0x23f)]!==_0x20623e),_0x124735['startOffset']+_0x20552e[_0x49e854(0x218)];}function Ye(_0x215332,_0x1f4b18,_0x1ddf31){const _0x26c1d5=_0x3a7f13;_0x1ddf31&&(_0x215332[_0x26c1d5(0x1f4)]=''+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](0x0,_0x1f4b18)+_0x1ddf31+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](_0x1f4b18),Ze(_0x215332,_0x1f4b18,_0x1ddf31[_0x26c1d5(0x218)]));}function Xe(_0x23d4ee,_0x314c40,_0xff27ca){const _0x5216d9=_0x3a7f13;let _0x5ca488=_0xff27ca-_0x314c40;_0x23d4ee[_0x5216d9(0x1f4)]=''+_0x23d4ee[_0x5216d9(0x1f4)]['slice'](0x0,_0x314c40)+_0x23d4ee[_0x5216d9(0x1f4)][_0x5216d9(0x1f7)](_0xff27ca),Qe(_0x23d4ee,_0x314c40,_0x5ca488);}function Ze(_0x494cea,_0x2a682d,_0x1fff30){const _0x5a88d3=_0x3a7f13;_0x494cea[_0x5a88d3(0x23b)]=$e(_0x494cea[_0x5a88d3(0x23b)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x188)]=$e(_0x494cea[_0x5a88d3(0x188)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x281)]=$e(_0x494cea[_0x5a88d3(0x281)],_0x2a682d,_0x1fff30),_0x494cea['textRuns']=tt(_0x494cea[_0x5a88d3(0x267)],_0x2a682d,_0x1fff30),_0x494cea['tables']=nt(_0x494cea['tables'],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x1fb)]=E(_0x494cea[_0x5a88d3(0x1fb)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x182)]=E(_0x494cea[_0x5a88d3(0x182)],_0x2a682d,_0x1fff30),_0x494cea['customDecorations']=E(_0x494cea[_0x5a88d3(0x21c)],_0x2a682d,_0x1fff30),_0x494cea['blockRanges']=E(_0x494cea['blockRanges'],_0x2a682d,_0x1fff30);}function Qe(_0x1c32c3,_0x4c0acc,_0x533786){const _0x4eee09=_0x3a7f13;var _0x2413c7,_0x39b461;_0x1c32c3[_0x4eee09(0x23b)]=et(_0x1c32c3['paragraphs'],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x188)]=et(_0x1c32c3[_0x4eee09(0x188)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x281)]=et(_0x1c32c3[_0x4eee09(0x281)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x267)]=(_0x2413c7=rt((_0x39b461=_0x1c32c3[_0x4eee09(0x267)])==null?void 0x0:_0x39b461[_0x4eee09(0x266)](_0x167081=>({..._0x167081,'startIndex':_0x167081['st'],'endIndex':_0x167081['ed']})),_0x4c0acc,_0x533786))==null?void 0x0:_0x2413c7[_0x4eee09(0x266)](_0x36fa90=>{let {startIndex:_0x150cbe,endIndex:_0x5c92c7,..._0x535f04}=_0x36fa90;return{..._0x535f04,'st':_0x150cbe,'ed':_0x5c92c7};}),_0x1c32c3[_0x4eee09(0x243)]=rt(_0x1c32c3[_0x4eee09(0x243)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1fb)]=D(_0x1c32c3[_0x4eee09(0x1fb)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x182)]=D(_0x1c32c3[_0x4eee09(0x182)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x21c)]=D(_0x1c32c3[_0x4eee09(0x21c)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1e4)]=D(_0x1c32c3[_0x4eee09(0x1e4)],_0x4c0acc,_0x533786);}function $e(_0xf83adb,_0x110626,_0x593862){const _0xb96096=_0x3a7f13;return _0xf83adb==null?void 0x0:_0xf83adb[_0xb96096(0x266)](_0x3bc5ce=>_0x3bc5ce[_0xb96096(0x254)]>=_0x110626?{..._0x3bc5ce,'startIndex':_0x3bc5ce[_0xb96096(0x254)]+_0x593862}:_0x3bc5ce);}function et(_0x45acd5,_0x39370c,_0x152a8f){const _0x156842=_0x3a7f13;let _0x49ec48=_0x39370c+_0x152a8f;return _0x45acd5==null?void 0x0:_0x45acd5['map'](_0x18e184=>_0x18e184['startIndex']>=_0x39370c&&_0x18e184[_0x156842(0x254)]<_0x49ec48?null:_0x18e184['startIndex']>=_0x49ec48?{..._0x18e184,'startIndex':_0x18e184[_0x156842(0x254)]-_0x152a8f}:_0x18e184)[_0x156842(0x280)](_0x3f34eb=>_0x3f34eb!=null);}function tt(_0x43e6c0,_0x5831a6,_0x55b2f1){const _0x5876cc=_0x3a7f13;return _0x43e6c0==null?void 0x0:_0x43e6c0[_0x5876cc(0x266)](_0x120e3b=>_0x120e3b['st']>=_0x5831a6?{..._0x120e3b,'st':_0x120e3b['st']+_0x55b2f1,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b['ed']>_0x5831a6?{..._0x120e3b,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b);}function E(_0x175ab9,_0x5c4fbd,_0x26c0f2){const _0x99762b=_0x3a7f13;return _0x175ab9==null?void 0x0:_0x175ab9[_0x99762b(0x266)](_0x4a7d94=>_0x4b4cb7(_0x4a7d94,_0x5c4fbd,_0x26c0f2));}function nt(_0x24643c,_0x398c06,_0x1728e8){const _0x42ed0a=_0x3a7f13;return _0x24643c==null?void 0x0:_0x24643c[_0x42ed0a(0x266)](_0x4956e1=>_0x514d4f(_0x4956e1,_0x398c06,_0x1728e8));}function D(_0x4d60be,_0x5ae3f2,_0x4bbc37){const _0x457a57=_0x3a7f13;return _0x4d60be==null?void 0x0:_0x4d60be[_0x457a57(0x266)](_0x547e2b=>_0x433aa0(_0x547e2b,_0x5ae3f2,_0x4bbc37))[_0x457a57(0x280)](_0x5e4d29=>_0x5e4d29!=null);}function rt(_0x21f9ba,_0x2322e7,_0x14a817){return _0x21f9ba==null?void 0x0:_0x21f9ba['map'](_0x21536f=>_0x422036(_0x21536f,_0x2322e7,_0x14a817))['filter'](_0x542859=>_0x542859!=null);}function O(_0x1059ad){const _0x20addd=_0x3a7f13;if(!_0x1059ad['body'])throw Error(_0x20addd(0x1f9));return _0x1059ad['body'];}function k(_0x1fbdd5){'@babel/helpers - typeof';const _0x337872=_0x3a7f13;return k=typeof Symbol==_0x337872(0x271)&&typeof Symbol['iterator']=='symbol'?function(_0x372c70){return typeof _0x372c70;}:function(_0x36bf6a){const _0x500d43=_0x337872;return _0x36bf6a&&typeof Symbol==_0x500d43(0x271)&&_0x36bf6a[_0x500d43(0x23c)]===Symbol&&_0x36bf6a!==Symbol['prototype']?'symbol':typeof _0x36bf6a;},k(_0x1fbdd5);}function it(_0x5e1b3c,_0x12ec0e){const _0x1cb036=_0x3a7f13;if(k(_0x5e1b3c)!=_0x1cb036(0x247)||!_0x5e1b3c)return _0x5e1b3c;var _0x1fec30;if(typeof Symbol<'u'&&(_0x1fec30=_0x5e1b3c[Symbol[_0x1cb036(0x18e)]])!==void 0x0){var _0x7cfe0a=_0x1fec30['call'](_0x5e1b3c,_0x12ec0e||_0x1cb036(0x1f1));if(k(_0x7cfe0a)!=_0x1cb036(0x247))return _0x7cfe0a;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x12ec0e===_0x1cb036(0x25f)?String:Number)(_0x5e1b3c);}function at(_0x1862cb){const _0x3125bb=_0x3a7f13;var _0x59373b=it(_0x1862cb,'string');return k(_0x59373b)==_0x3125bb(0x1fd)?_0x59373b:_0x59373b+'';}function A(_0x563bcb,_0x1e8ede,_0x280132){const _0x1cc6d6=_0x3a7f13;return(_0x1e8ede=at(_0x1e8ede))in _0x563bcb?Object[_0x1cc6d6(0x24f)](_0x563bcb,_0x1e8ede,{'value':_0x280132,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x563bcb[_0x1e8ede]=_0x280132,_0x563bcb;}var j=class extends _0x533030{constructor(..._0x10f52f){const _0x34b0c3=_0x3a7f13;super(..._0x10f52f),A(this,_0x34b0c3(0x1e8),new Map()),A(this,_0x34b0c3(0x216),new Map()),A(this,_0x34b0c3(0x235),new Map()),A(this,'_change$',new _0x52ee64()),A(this,_0x34b0c3(0x282),this[_0x34b0c3(0x245)][_0x34b0c3(0x200)]());}[_0x3a7f13(0x238)](_0x389a59,_0x4d0067){const _0x431714=_0x3a7f13;var _0x31c8ac;let _0x319ab7=(_0x31c8ac=this['_resources']['get'](_0x389a59))==null?void 0x0:_0x31c8ac['formulas'][_0x4d0067];return _0x319ab7?_0x5a1e4f[_0x431714(0x201)](_0x319ab7):void 0x0;}[_0x3a7f13(0x1c5)](_0x24562c){const _0x2ab601=_0x3a7f13;var _0x5114a3;return _0x5a1e4f[_0x2ab601(0x201)](((_0x5114a3=this[_0x2ab601(0x1e8)][_0x2ab601(0x1b1)](_0x24562c))==null?void 0x0:_0x5114a3['formulas'])??{});}[_0x3a7f13(0x239)](_0x2e6aff){const _0x1491e0=_0x3a7f13;let _0x372fd5=this[_0x1491e0(0x1e8)][_0x1491e0(0x1b1)](_0x2e6aff);return _0x372fd5?_0x5a1e4f[_0x1491e0(0x201)](_0x372fd5):void 0x0;}[_0x3a7f13(0x209)](_0x14dd5a,_0x133fef,_0x4f28fb){const _0x398aaa=_0x3a7f13;return this[_0x398aaa(0x1cf)](_0x14dd5a,{[_0x133fef]:_0x4f28fb});}[_0x3a7f13(0x226)](_0x6bf61e,_0x276d51){const _0x29f65a=_0x3a7f13;return this[_0x29f65a(0x235)]['has'](_0x6bf61e)||!x(_0x276d51)?!0x1:(this[_0x29f65a(0x1e8)][_0x29f65a(0x22f)](_0x6bf61e,{'formulas':_0x5a1e4f[_0x29f65a(0x201)](_0x276d51[_0x29f65a(0x264)])}),this[_0x29f65a(0x245)][_0x29f65a(0x27f)]({'unitId':_0x6bf61e}),!0x0);}[_0x3a7f13(0x1cf)](_0x5551fa,_0x1fbb64){const _0x34225b=_0x3a7f13;if(this['_loadErrors'][_0x34225b(0x260)](_0x5551fa)||!Object[_0x34225b(0x241)](_0x1fbb64)[_0x34225b(0x218)]||!x({'formulas':_0x1fbb64}))return!0x1;let _0x159bf1=this[_0x34225b(0x1e8)][_0x34225b(0x1b1)](_0x5551fa)??b(),_0x17bae8=_0x5a1e4f[_0x34225b(0x201)](_0x159bf1);return Object[_0x34225b(0x1da)](_0x17bae8['formulas'],_0x5a1e4f['deepClone'](_0x1fbb64)),this['_resources'][_0x34225b(0x22f)](_0x5551fa,_0x17bae8),this['_change$'][_0x34225b(0x27f)]({'unitId':_0x5551fa,'rangeIds':Object['keys'](_0x1fbb64)}),!0x0;}[_0x3a7f13(0x1f0)](_0xdb9045,_0x238171){const _0x423364=_0x3a7f13;if(this[_0x423364(0x235)]['has'](_0xdb9045))return!0x1;let _0x2f6dc9=this['_resources'][_0x423364(0x1b1)](_0xdb9045);if(!(_0x2f6dc9!=null&&_0x2f6dc9[_0x423364(0x264)][_0x238171]))return!0x1;let _0x260950=_0x5a1e4f[_0x423364(0x201)](_0x2f6dc9);return delete _0x260950[_0x423364(0x264)][_0x238171],this[_0x423364(0x1e8)]['set'](_0xdb9045,_0x260950),this[_0x423364(0x245)][_0x423364(0x27f)]({'unitId':_0xdb9045,'rangeIds':[_0x238171]}),!0x0;}[_0x3a7f13(0x283)](_0x559ebc,_0x1faafb){const _0x6bc25a=_0x3a7f13;return x(_0x1faafb)?(this[_0x6bc25a(0x1e8)][_0x6bc25a(0x22f)](_0x559ebc,{'formulas':_0x5a1e4f[_0x6bc25a(0x201)](_0x1faafb[_0x6bc25a(0x264)])}),this[_0x6bc25a(0x216)][_0x6bc25a(0x25c)](_0x559ebc),this['_loadErrors']['delete'](_0x559ebc),this[_0x6bc25a(0x245)]['next']({'unitId':_0x559ebc}),!0x0):(this['_preserveInvalid'](_0x559ebc,_0x1faafb,_0x6bc25a(0x223)),!0x1);}[_0x3a7f13(0x27e)](_0x213760){const _0x4ffc23=_0x3a7f13;let _0x1792e7=this[_0x4ffc23(0x1e8)]['get'](_0x213760);return _0x1792e7?_0x5a1e4f[_0x4ffc23(0x201)](_0x1792e7):this[_0x4ffc23(0x216)][_0x4ffc23(0x260)](_0x213760)?_0x5a1e4f[_0x4ffc23(0x201)](this[_0x4ffc23(0x216)][_0x4ffc23(0x1b1)](_0x213760)):b();}[_0x3a7f13(0x251)](_0x7f0ce7){const _0x58b5dd=_0x3a7f13;return this['_loadErrors'][_0x58b5dd(0x1b1)](_0x7f0ce7);}['removeUnit'](_0xeba3c8){const _0xce816a=_0x3a7f13;this[_0xce816a(0x1e8)]['delete'](_0xeba3c8),this[_0xce816a(0x216)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x235)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x245)][_0xce816a(0x27f)]({'unitId':_0xeba3c8});}['dispose'](){const _0x4ccb4d=_0x3a7f13;this['_resources'][_0x4ccb4d(0x220)](),this[_0x4ccb4d(0x216)]['clear'](),this['_loadErrors']['clear'](),this['_change$']['complete'](),super['dispose']();}[_0x3a7f13(0x1e2)](_0x3806d9,_0x11a1e0,_0x702353){const _0x38318c=_0x3a7f13;this[_0x38318c(0x1e8)][_0x38318c(0x25c)](_0x3806d9),this['_rawResources']['set'](_0x3806d9,_0x5a1e4f[_0x38318c(0x201)](_0x11a1e0)),this[_0x38318c(0x235)][_0x38318c(0x22f)](_0x3806d9,_0x702353),this[_0x38318c(0x245)]['next']({'unitId':_0x3806d9});}};let ot=function(_0x1fd8bb){const _0xee6cd8=_0x3a7f13;return _0x1fd8bb[_0xee6cd8(0x1dc)]=_0xee6cd8(0x269),_0x1fd8bb[_0xee6cd8(0x219)]=_0xee6cd8(0x203),_0x1fd8bb[_0xee6cd8(0x1c1)]=_0xee6cd8(0x1f3),_0x1fd8bb['ERROR']=_0xee6cd8(0x227),_0x1fd8bb;}({});function M(_0x4ca6b7,_0x5b1915){return function(_0x1ccec8,_0x148296){_0x5b1915(_0x1ccec8,_0x148296,_0x4ca6b7);};}function N(_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2){const _0x31b3bb=_0x3a7f13;var _0x5a10cb=arguments[_0x31b3bb(0x218)],_0x1a8278=_0x5a10cb<0x3?_0x5f0660:_0x2901f2===null?_0x2901f2=Object['getOwnPropertyDescriptor'](_0x5f0660,_0x3fbf81):_0x2901f2,_0x315626;if(typeof Reflect==_0x31b3bb(0x247)&&typeof Reflect[_0x31b3bb(0x252)]==_0x31b3bb(0x271))_0x1a8278=Reflect[_0x31b3bb(0x252)](_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2);else{for(var _0x43c37c=_0x1596fb[_0x31b3bb(0x218)]-0x1;_0x43c37c>=0x0;_0x43c37c--)(_0x315626=_0x1596fb[_0x43c37c])&&(_0x1a8278=(_0x5a10cb<0x3?_0x315626(_0x1a8278):_0x5a10cb>0x3?_0x315626(_0x5f0660,_0x3fbf81,_0x1a8278):_0x315626(_0x5f0660,_0x3fbf81))||_0x1a8278);}return _0x5a10cb>0x3&&_0x1a8278&&Object['defineProperty'](_0x5f0660,_0x3fbf81,_0x1a8278),_0x1a8278;}let P=class extends _0x533030{constructor(_0x1c3223,_0x19aa41,_0x39ad8c){const _0x4ae415=_0x3a7f13;super(),this['_model']=_0x1c3223,this[_0x4ae415(0x25d)]=_0x19aa41,this[_0x4ae415(0x199)]=_0x39ad8c,A(this,_0x4ae415(0x1d8),new Map()),A(this,'_formulaKeys',new Map()),A(this,_0x4ae415(0x1c0),new _0x52ee64()),A(this,_0x4ae415(0x197),this['_presentationChanged$'][_0x4ae415(0x200)]()),this[_0x4ae415(0x25a)](this[_0x4ae415(0x25d)]['formulaResult$'][_0x4ae415(0x1b0)](_0x59a15d=>{const _0x49c3e8=_0x4ae415;for(let _0x14c843 of Object['values'](_0x59a15d))for(let _0x412c7e of Object['values'](_0x14c843))_0x412c7e['forEach'](_0x589992=>this[_0x49c3e8(0x1e5)](_0x589992));}));}[_0x3a7f13(0x184)](_0x47c11f){const _0x10006c=_0x3a7f13;var _0x56ccfc;let _0x5b6070=_0x47c11f['getUnitId'](),_0x19f1f7=((_0x56ccfc=_0x47c11f[_0x10006c(0x1d2)]()['body'])==null||(_0x56ccfc=_0x56ccfc['customRanges'])==null?void 0x0:_0x56ccfc['filter'](w))??[],_0x2fdb00=this[_0x10006c(0x1f8)]['getFormulas'](_0x5b6070),_0x1331e6=new Set();for(let _0x213788 of _0x19f1f7){let _0x421708=_0x2fdb00[_0x213788[_0x10006c(0x23f)]];_0x421708&&(_0x1331e6[_0x10006c(0x1e0)](F(_0x5b6070,_0x213788[_0x10006c(0x23f)])),this['register']({'unitId':_0x5b6070,'rangeId':_0x213788['rangeId']},_0x421708));}for(let _0xf60416 of Array['from'](this['_registrations'][_0x10006c(0x1ea)]()))_0xf60416[_0x10006c(0x206)]===_0x5b6070&&!_0x1331e6[_0x10006c(0x260)](F(_0xf60416[_0x10006c(0x206)],_0xf60416[_0x10006c(0x23f)]))&&this['unregister'](_0xf60416);}['register'](_0x1a3460,_0x3d52f6){const _0x16bb10=_0x3a7f13;let _0x52e69b=F(_0x1a3460['unitId'],_0x1a3460[_0x16bb10(0x23f)]),_0x23e986=this['_registrations']['get'](_0x52e69b),_0x5f58c3=this['_hostExternalReferenceModel'][_0x16bb10(0x210)](_0x1a3460['unitId']);if(_0x23e986&&_0x23e986[_0x16bb10(0x270)][_0x16bb10(0x24d)]===_0x3d52f6[_0x16bb10(0x24d)]&&_0x23e986[_0x16bb10(0x1e7)]===_0x5f58c3){_0x23e986['config']=_0x3d52f6;let _0x41b795=_0x23e986[_0x16bb10(0x274)]?this[_0x16bb10(0x25d)][_0x16bb10(0x208)](_0x23e986['unitId'],_0x23e986['unitId'],_0x23e986[_0x16bb10(0x274)])??void 0x0:void 0x0;_0x23e986[_0x16bb10(0x1a3)]=_0x41b795,this[_0x16bb10(0x214)](_0x52e69b,st(_0x3d52f6,_0x41b795));return;}_0x23e986!=null&&_0x23e986[_0x16bb10(0x274)]&&this['_deleteRegistration'](_0x23e986);let _0x254961={..._0x1a3460,'config':_0x3d52f6,'referenceRevision':_0x5f58c3,'presentation':st(_0x3d52f6,void 0x0)};if(this[_0x16bb10(0x1d8)][_0x16bb10(0x22f)](_0x52e69b,_0x254961),!_0x3d52f6['formula'][_0x16bb10(0x1d7)]())return;let _0xb6d969=this['_registrationService'][_0x16bb10(0x26f)](_0x1a3460[_0x16bb10(0x206)],_0x1a3460[_0x16bb10(0x206)],_0x3d52f6['formula'],void 0x0,{'rangeId':_0x1a3460['rangeId']},_0x2b96ca[_0x16bb10(0x193)],_0x1a3460['rangeId']);_0x254961['formulaId']=_0xb6d969,this[_0x16bb10(0x27c)][_0x16bb10(0x22f)](_0xb6d969,_0x52e69b);}[_0x3a7f13(0x26a)](_0x4fadaf){const _0x5ad03a=_0x3a7f13;let _0x4413a0=F(_0x4fadaf[_0x5ad03a(0x206)],_0x4fadaf['rangeId']),_0x1b99d2=this[_0x5ad03a(0x1d8)]['get'](_0x4413a0);_0x1b99d2&&(this['_deleteRegistration'](_0x1b99d2),this['_registrations'][_0x5ad03a(0x25c)](_0x4413a0));}[_0x3a7f13(0x231)](_0x82cc37){const _0x2f037f=_0x3a7f13;for(let _0x1fe814 of Array[_0x2f037f(0x1d0)](this['_registrations'][_0x2f037f(0x1ea)]()))_0x1fe814[_0x2f037f(0x206)]===_0x82cc37&&this[_0x2f037f(0x26a)](_0x1fe814);}[_0x3a7f13(0x1df)](_0xbf4167){const _0x4c8692=_0x3a7f13;var _0x3e1ff7;return(_0x3e1ff7=this[_0x4c8692(0x1d8)]['get'](F(_0xbf4167[_0x4c8692(0x206)],_0xbf4167[_0x4c8692(0x23f)])))==null?void 0x0:_0x3e1ff7[_0x4c8692(0x225)];}[_0x3a7f13(0x244)](_0x595b1f){const _0x31d06e=_0x3a7f13;let _0x2a4b4b=this[_0x31d06e(0x1d8)][_0x31d06e(0x1b1)](F(_0x595b1f[_0x31d06e(0x206)],_0x595b1f[_0x31d06e(0x23f)]));return _0x2a4b4b?I(_0x2a4b4b):void 0x0;}[_0x3a7f13(0x255)](){const _0x1f8ed2=_0x3a7f13;return Array[_0x1f8ed2(0x1d0)](this[_0x1f8ed2(0x1d8)][_0x1f8ed2(0x1ea)](),_0x4e837e=>({'identity':{'unitId':_0x4e837e[_0x1f8ed2(0x206)],'rangeId':_0x4e837e[_0x1f8ed2(0x23f)]},'config':_0x4e837e[_0x1f8ed2(0x270)],'referenceRevision':_0x4e837e[_0x1f8ed2(0x1e7)],..._0x4e837e[_0x1f8ed2(0x1a3)]?{'liveResult':_0x4e837e[_0x1f8ed2(0x1a3)]}:null}));}[_0x3a7f13(0x1eb)](){const _0x109a97=_0x3a7f13;for(let _0x1d5f72 of this[_0x109a97(0x1d8)][_0x109a97(0x1ea)]())this[_0x109a97(0x261)](_0x1d5f72);this[_0x109a97(0x1d8)][_0x109a97(0x220)](),this[_0x109a97(0x27c)][_0x109a97(0x220)](),this[_0x109a97(0x1c0)][_0x109a97(0x19f)](),super[_0x109a97(0x1eb)]();}[_0x3a7f13(0x1e5)](_0x10f5ce){const _0x412a05=_0x3a7f13;let _0x5d6f3c=this['_formulaKeys'][_0x412a05(0x1b1)](_0x10f5ce[_0x412a05(0x274)]),_0x80fa5b=_0x5d6f3c?this[_0x412a05(0x1d8)][_0x412a05(0x1b1)](_0x5d6f3c):void 0x0;_0x5d6f3c&&_0x80fa5b&&(_0x80fa5b[_0x412a05(0x1a3)]=_0x10f5ce,this['_setPresentation'](_0x5d6f3c,st(_0x80fa5b[_0x412a05(0x270)],_0x10f5ce)));}[_0x3a7f13(0x214)](_0x3b1900,_0x2cc545){const _0x40dcd5=_0x3a7f13;var _0x33de5f,_0x20a68a;let _0x5c6da4=this[_0x40dcd5(0x1d8)][_0x40dcd5(0x1b1)](_0x3b1900);if(!_0x5c6da4||ct(_0x5c6da4['presentation'],_0x2cc545))return;let _0x160b0f=_0x5c6da4[_0x40dcd5(0x225)],_0x2b2520=I(_0x5c6da4);_0x5c6da4['presentation']=_0x2cc545,this[_0x40dcd5(0x1c0)][_0x40dcd5(0x27f)]({'unitId':_0x5c6da4[_0x40dcd5(0x206)],'rangeId':_0x5c6da4['rangeId'],'presentation':_0x2cc545,'previousPresentation':_0x160b0f,'result':I(_0x5c6da4),'previousResult':{..._0x2b2520,..._0x160b0f,'value':(_0x33de5f=_0x160b0f[_0x40dcd5(0x276)])==null?void 0x0:_0x33de5f['v'],'valueType':((_0x20a68a=_0x160b0f['cell'])==null?void 0x0:_0x20a68a['t'])??void 0x0}});}[_0x3a7f13(0x261)](_0xb7799e){const _0x7851e8=_0x3a7f13;_0xb7799e[_0x7851e8(0x274)]&&(this[_0x7851e8(0x25d)][_0x7851e8(0x248)](_0xb7799e['unitId'],_0xb7799e[_0x7851e8(0x206)],[_0xb7799e['formulaId']]),this[_0x7851e8(0x27c)][_0x7851e8(0x25c)](_0xb7799e[_0x7851e8(0x274)]));}};P=N([M(0x0,_0x5d6038(j)),M(0x1,_0x5d6038(_0x16b5f1)),M(0x2,_0x5d6038(_0xceeb38))],P);function F(_0x3bb3c6,_0x2e77eb){return _0x3bb3c6+'\x00'+_0x2e77eb;}function st(_0x5b4328,_0x321f1d){const _0x1fadda=_0x3a7f13;return _0x12221e({'numberFormat':_0x5b4328[_0x1fadda(0x230)],'lastValue':_0x5b4328[_0x1fadda(0x1ff)],'result':_0x321f1d});}function I(_0x244496){const _0x1cc26a=_0x3a7f13;var _0x110964,_0x344aae,_0x1c2e37;let _0x274407=_0x244496[_0x1cc26a(0x225)],_0x3a544e=_0x244496[_0x1cc26a(0x270)]['formula'][_0x1cc26a(0x1d7)]()?_0x274407['stale']||_0x274407[_0x1cc26a(0x276)]==null?_0x1cc26a(0x203):((_0x110964=_0x244496[_0x1cc26a(0x1a3)])==null?void 0x0:_0x110964['status'])===_0x2c8d51[_0x1cc26a(0x1b2)]?'error':_0x1cc26a(0x1f3):'empty';return{..._0x274407,'status':_0x3a544e,'value':(_0x344aae=_0x274407['cell'])==null?void 0x0:_0x344aae['v'],'valueType':((_0x1c2e37=_0x274407['cell'])==null?void 0x0:_0x1c2e37['t'])??void 0x0};}function ct(_0x43daef,_0x43594d){const _0x302905=_0x3a7f13;var _0x55679b,_0x30c3c9,_0x170459,_0x562ddd;return _0x43daef[_0x302905(0x192)]===_0x43594d[_0x302905(0x192)]&&_0x43daef[_0x302905(0x1b5)]===_0x43594d['color']&&_0x43daef[_0x302905(0x229)]===_0x43594d[_0x302905(0x229)]&&_0x43daef[_0x302905(0x224)]===_0x43594d['source']&&_0x43daef[_0x302905(0x19c)]===_0x43594d[_0x302905(0x19c)]&&((_0x55679b=_0x43daef['cell'])==null?void 0x0:_0x55679b['t'])===((_0x30c3c9=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x30c3c9['t'])&&Object['is']((_0x170459=_0x43daef[_0x302905(0x276)])==null?void 0x0:_0x170459['v'],(_0x562ddd=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x562ddd['v']);}const lt={'id':'docs-formula.mutation.set-formula','type':_0x16d163['MUTATION'],'handler':(_0x2ca9f2,_0x2e209d)=>!(_0x2e209d!=null&&_0x2e209d[_0x3a7f13(0x206)])||!_0x2e209d['rangeId']||!_0x2e209d[_0x3a7f13(0x270)]?!0x1:_0x2ca9f2[_0x3a7f13(0x1b1)](j)[_0x3a7f13(0x209)](_0x2e209d[_0x3a7f13(0x206)],_0x2e209d[_0x3a7f13(0x23f)],_0x2e209d['config'])},ut={'id':_0x3a7f13(0x259),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x5d840b,_0x3d969e)=>!(_0x3d969e!=null&&_0x3d969e['unitId'])||!_0x3d969e[_0x3a7f13(0x23f)]?!0x1:_0x5d840b[_0x3a7f13(0x1b1)](j)['removeFormula'](_0x3d969e[_0x3a7f13(0x206)],_0x3d969e[_0x3a7f13(0x23f)])},L={'id':_0x3a7f13(0x23a),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x61cf5a,_0x195145)=>!(_0x195145!=null&&_0x195145[_0x3a7f13(0x206)])||!_0x195145[_0x3a7f13(0x1a5)]?!0x1:_0x61cf5a['get'](j)[_0x3a7f13(0x226)](_0x195145[_0x3a7f13(0x206)],_0x195145[_0x3a7f13(0x1a5)])},R={'id':_0x3a7f13(0x1bc),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x39cf48,_0x53e433)=>{const _0x384ae3=_0x3a7f13;if(!(_0x53e433!=null&&_0x53e433[_0x384ae3(0x206)])||!_0x53e433[_0x384ae3(0x1a1)][_0x384ae3(0x218)])return!0x1;let _0x116d59=_0x39cf48[_0x384ae3(0x1b1)](j),_0x364837=_0x39cf48[_0x384ae3(0x1b1)](_0xceeb38),_0x1567cd=_0x116d59[_0x384ae3(0x239)](_0x53e433[_0x384ae3(0x206)]);if(!_0x1567cd)return!0x1;let _0x42f6d9=_0x5a1e4f[_0x384ae3(0x201)](_0x1567cd),_0x3a806c=!0x1;for(let _0x43365e of _0x53e433[_0x384ae3(0x1a1)]){var _0x290f58,_0x4904e1,_0x52f376,_0x248539;let _0x5bf630=_0x42f6d9[_0x384ae3(0x264)][_0x43365e['rangeId']];_0x5bf630&&_0x5bf630[_0x384ae3(0x24d)]===_0x43365e[_0x384ae3(0x25e)]&&((_0x290f58=_0x5bf630[_0x384ae3(0x230)])==null?void 0x0:_0x290f58[_0x384ae3(0x229)])===_0x43365e[_0x384ae3(0x265)]&&_0x364837[_0x384ae3(0x210)](_0x53e433[_0x384ae3(0x206)])===_0x43365e['expectedReferenceRevision']&&(((_0x4904e1=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x4904e1['v'])!==_0x43365e['lastValue']['v']||((_0x52f376=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x52f376['t'])!==_0x43365e[_0x384ae3(0x1ff)]['t']||((_0x248539=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x248539[_0x384ae3(0x229)])!==_0x43365e[_0x384ae3(0x1ff)][_0x384ae3(0x229)])&&(_0x5bf630[_0x384ae3(0x1ff)]=_0x5a1e4f[_0x384ae3(0x201)](_0x43365e[_0x384ae3(0x1ff)]),_0x3a806c=!0x0);}return!_0x3a806c||_0x116d59['setResource'](_0x53e433[_0x384ae3(0x206)],_0x42f6d9);}},z={'id':_0x3a7f13(0x1bd),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x28c526,_0x1ea680)=>{const _0x2d4ec7=_0x3a7f13;if(!(_0x1ea680!=null&&_0x1ea680[_0x2d4ec7(0x24d)][_0x2d4ec7(0x1d7)]()))return!0x1;let _0x45232e=K(_0x28c526,_0x1ea680[_0x2d4ec7(0x206)],'');if(!_0x45232e)return!0x1;let _0x42d844=ft(_0x1ea680[_0x2d4ec7(0x181)],_0x45232e[_0x2d4ec7(0x1b4)],dt(_0x28c526,_0x45232e[_0x2d4ec7(0x206)]));if(!_0x42d844)return!0x1;let _0x167a52=pt(_0x28c526,_0x45232e['unitId'],_0x1ea680['formula'],_0x1ea680[_0x2d4ec7(0x204)]??[]);if(!_0x167a52)return!0x1;let _0x3af86e=mt(_0x45232e[_0x2d4ec7(0x1b4)],_0x45232e['model'],_0x45232e['unitId']),_0x342ecc=ht({'documentData':_0x45232e[_0x2d4ec7(0x1c6)],'resource':_0x45232e[_0x2d4ec7(0x1a5)],'rangeId':_0x3af86e,'config':{'formula':_0x1ea680['formula'],..._0x1ea680[_0x2d4ec7(0x230)]?{'numberFormat':_0x1ea680[_0x2d4ec7(0x230)]}:null},'startOffset':_0x42d844[_0x2d4ec7(0x23e)],'endOffset':_0x42d844['endOffset']});if(!_0x342ecc)return!0x1;let _0x5a255e=_0x3b0f43(_0x28c526,_0x45232e[_0x2d4ec7(0x206)],_0x167a52);return!_0x5a255e||!q({'accessor':_0x28c526,'document':_0x45232e[_0x2d4ec7(0x272)],'unitId':_0x45232e[_0x2d4ec7(0x206)],'trigger':z['id'],'rangeId':_0x3af86e,'previousResource':_0x45232e['resource'],'nextResource':_0x342ecc[_0x2d4ec7(0x22e)],'previousDocumentData':_0x45232e['documentData'],'nextDocumentData':_0x342ecc[_0x2d4ec7(0x180)],'cursorOffset':_0x342ecc[_0x2d4ec7(0x1aa)],'externalMutations':_0x5a255e})?!0x1:{'rangeId':_0x3af86e,'startOffset':_0x342ecc[_0x2d4ec7(0x1aa)]-0x1,'endOffset':_0x342ecc['cursorOffset']};}},B={'id':_0x3a7f13(0x1b7),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x4e34cb,_0x5adb8c)=>{const _0x27d748=_0x3a7f13;if(!(_0x5adb8c!=null&&_0x5adb8c[_0x27d748(0x23f)])||!_0x5adb8c['formula'][_0x27d748(0x1d7)]())return!0x1;let _0x23cccd=K(_0x4e34cb,_0x5adb8c[_0x27d748(0x206)],''),_0x58a798=_0x23cccd==null?void 0x0:_0x23cccd[_0x27d748(0x194)]['getFormula'](_0x23cccd[_0x27d748(0x206)],_0x5adb8c['rangeId']),_0xf6b006=_0x23cccd?T(_0x23cccd[_0x27d748(0x1c6)][_0x27d748(0x1b4)],_0x5adb8c[_0x27d748(0x23f)]):void 0x0;if(!_0x23cccd||!_0x58a798||!_0xf6b006)return!0x1;let _0x4a70b4=pt(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x5adb8c[_0x27d748(0x24d)],_0x5adb8c[_0x27d748(0x204)]??[]);if(!_0x4a70b4)return!0x1;let _0x3a835c=_0x3b0f43(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x4a70b4);if(!_0x3a835c)return!0x1;let _0x367c04=St(_0x23cccd[_0x27d748(0x1a5)]);return _0x367c04[_0x27d748(0x264)][_0x5adb8c[_0x27d748(0x23f)]]={'formula':_0x5adb8c[_0x27d748(0x24d)],..._0x5adb8c[_0x27d748(0x230)]?{'numberFormat':_0x5adb8c['numberFormat']}:_0x58a798[_0x27d748(0x230)]?{'numberFormat':_0x58a798[_0x27d748(0x230)]}:null},q({'accessor':_0x4e34cb,'document':_0x23cccd['document'],'unitId':_0x23cccd[_0x27d748(0x206)],'trigger':B['id'],'rangeId':_0x5adb8c['rangeId'],'previousResource':_0x23cccd[_0x27d748(0x1a5)],'nextResource':_0x367c04,'cursorOffset':_0xf6b006[_0x27d748(0x221)]+0x1,'externalMutations':_0x3a835c});}},V={'id':_0x3a7f13(0x1e9),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x337305,_0xc63fe1)=>{const _0x1f1371=_0x3a7f13;if(!(_0xc63fe1!=null&&_0xc63fe1['rangeId']))return!0x1;let _0x1bf27d=K(_0x337305,_0xc63fe1[_0x1f1371(0x206)],''),_0x47f81d=_0x1bf27d==null?void 0x0:_0x1bf27d[_0x1f1371(0x194)][_0x1f1371(0x238)](_0x1bf27d[_0x1f1371(0x206)],_0xc63fe1['rangeId']),_0x227120=_0x1bf27d?T(_0x1bf27d[_0x1f1371(0x1c6)][_0x1f1371(0x1b4)],_0xc63fe1[_0x1f1371(0x23f)]):void 0x0;if(!_0x1bf27d||!_0x47f81d||!_0x227120)return!0x1;let _0x5bc900=St(_0x1bf27d['resource']);return _0x5bc900[_0x1f1371(0x264)][_0xc63fe1[_0x1f1371(0x23f)]]={..._0x47f81d,..._0xc63fe1['numberFormat']?{'numberFormat':_0xc63fe1[_0x1f1371(0x230)]}:null},_0xc63fe1[_0x1f1371(0x230)]||delete _0x5bc900[_0x1f1371(0x264)][_0xc63fe1['rangeId']][_0x1f1371(0x230)],q({'accessor':_0x337305,'document':_0x1bf27d[_0x1f1371(0x272)],'unitId':_0x1bf27d['unitId'],'trigger':V['id'],'rangeId':_0xc63fe1[_0x1f1371(0x23f)],'previousResource':_0x1bf27d['resource'],'nextResource':_0x5bc900,'cursorOffset':_0x227120['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x3a7f13(0x22a),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x2dda94,_0x8fbc3b)=>G(_0x2dda94,_0x8fbc3b,'',H['id'])},U={'id':_0x3a7f13(0x212),'type':_0x16d163['COMMAND'],'handler':(_0x258b86,_0x251b4d)=>G(_0x258b86,_0x251b4d,(_0x251b4d==null?void 0x0:_0x251b4d[_0x3a7f13(0x192)])??'',U['id'])},W={'id':'docs-formula.command.convert-to-text','type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x72e575,_0x4cacbd)=>{const _0x5cdc72=_0x3a7f13;if(!(_0x4cacbd!=null&&_0x4cacbd[_0x5cdc72(0x23f)]))return!0x1;let _0x5b76a1=K(_0x72e575,_0x4cacbd[_0x5cdc72(0x206)],'');if(!_0x5b76a1)return!0x1;let _0x4e8698=_0x72e575['get'](P)[_0x5cdc72(0x244)]({'unitId':_0x5b76a1[_0x5cdc72(0x206)],'rangeId':_0x4cacbd[_0x5cdc72(0x23f)]});return _0x4e8698?G(_0x72e575,_0x4cacbd,_0x4e8698[_0x5cdc72(0x192)],W['id']):!0x1;}};function G(_0x45b525,_0x17e3e2,_0x3696ad,_0x2b91a8){const _0x54c800=_0x3a7f13;if(!(_0x17e3e2!=null&&_0x17e3e2[_0x54c800(0x23f)]))return!0x1;let _0x17fee3=K(_0x45b525,_0x17e3e2['unitId'],'');if(!_0x17fee3)return!0x1;let _0x18ed3d=ze({'documentData':_0x17fee3[_0x54c800(0x1c6)],'resource':_0x17fee3[_0x54c800(0x1a5)],'rangeId':_0x17e3e2['rangeId'],'text':_0x3696ad});return _0x18ed3d?q({'accessor':_0x45b525,'document':_0x17fee3['document'],'unitId':_0x17fee3[_0x54c800(0x206)],'trigger':_0x2b91a8,'rangeId':_0x17e3e2[_0x54c800(0x23f)],'previousResource':_0x17fee3[_0x54c800(0x1a5)],'nextResource':_0x18ed3d['nextResource'],'previousDocumentData':_0x17fee3[_0x54c800(0x1c6)],'nextDocumentData':_0x18ed3d[_0x54c800(0x180)],'cursorOffset':_0x18ed3d['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x28f982,_0x2afc0e,_0x431aae){const _0x2b2b92=_0x3a7f13;if(_0x431aae)return null;let _0xbc0da2=_0x28f982['get'](_0x2629d5),_0x3055ed=(_0x2afc0e?_0xbc0da2[_0x2b2b92(0x1cb)](_0x2afc0e,_0x4aa394['UNIVER_DOC']):_0xbc0da2[_0x2b2b92(0x268)](_0x4aa394['UNIVER_DOC']))??null;if(!_0x3055ed)return null;let _0x11e464=_0x3055ed[_0x2b2b92(0x1d2)](),_0xd5a113=_0x11e464[_0x2b2b92(0x1b4)];if(_0x11e464[_0x2b2b92(0x1ac)]||!_0xd5a113)return null;let _0x4ed736=_0x28f982[_0x2b2b92(0x1b1)](j);return _0x4ed736[_0x2b2b92(0x251)](_0x3055ed[_0x2b2b92(0x1e6)]())?null:{'document':_0x3055ed,'body':_0xd5a113,'documentData':_0x11e464,'model':_0x4ed736,'resource':_0x4ed736['getResource'](_0x3055ed[_0x2b2b92(0x1e6)]())??b(),'unitId':_0x3055ed[_0x2b2b92(0x1e6)]()};}function dt(_0x405bac,_0xc1fa0e){const _0x1f9151=_0x3a7f13;var _0x5d71d5;return(_0x5d71d5=_0x405bac['get'](_0x3d26b2)[_0x1f9151(0x22b)]({'subUnitId':_0xc1fa0e,'unitId':_0xc1fa0e}))==null?void 0x0:_0x5d71d5[0x0];}function ft(_0x4e8538,_0xdf932e,_0x4902b3){const _0x522e23=_0x3a7f13;if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x1ce)){var _0x53c8e9;let _0xa68ad5=((_0x53c8e9=_0xdf932e['paragraphs'])==null?void 0x0:_0x53c8e9[_0x522e23(0x280)](_0x30def1=>_0x30def1[_0x522e23(0x236)]===_0x4e8538[_0x522e23(0x236)]))??[];if(_0xa68ad5['length']!==0x1)return null;let _0x85c1fe=_0xa68ad5[0x0],_0xfbba6f=_0x19d939(_0xdf932e,_0x85c1fe),_0xe74219=_0x85c1fe['startIndex']-_0xfbba6f,_0x4138b6=_0x4e8538[_0x522e23(0x1b6)]===_0x522e23(0x20f)?_0xe74219:_0x4e8538[_0x522e23(0x1b6)];if(!Number[_0x522e23(0x240)](_0x4138b6)||_0x4138b6<0x0||_0x4138b6>_0xe74219)return null;let _0x5617c1=_0xfbba6f+_0x4138b6;return{'startOffset':_0x5617c1,'endOffset':_0x5617c1};}if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x18d))return!Number[_0x522e23(0x240)](_0x4e8538[_0x522e23(0x23e)])||!Number['isInteger'](_0x4e8538[_0x522e23(0x21d)])?null:{'startOffset':Math[_0x522e23(0x211)](_0x4e8538[_0x522e23(0x23e)],_0x4e8538[_0x522e23(0x21d)]),'endOffset':Math['max'](_0x4e8538['startOffset'],_0x4e8538['endOffset'])};let _0x4f17d3=(_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])==='selection'?_0x4e8538[_0x522e23(0x21a)]:_0x4902b3;return!_0x4f17d3||_0x4f17d3[_0x522e23(0x1fe)]?null:{'startOffset':Math[_0x522e23(0x211)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)]),'endOffset':Math[_0x522e23(0x222)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)])};}function pt(_0x156d4f,_0x5300a4,_0x314260,_0x2ed2b4){const _0x1e44a3=_0x3a7f13;let _0x1a5a24=_0x156d4f[_0x1e44a3(0x1b1)](_0x9fae86),_0x531966=_0x314260['startsWith']('=')?_0x314260['slice'](0x1):_0x314260,_0x56d72a=_0x1a5a24[_0x1e44a3(0x205)](_0x531966);if(!_0x56d72a)return null;let _0x5a84ba=_0x156d4f[_0x1e44a3(0x1b1)](_0xceeb38),_0x2e6c7a=_0x5d5293({'qualifiers':_0x48d68a(_0x56d72a),'explicitReferences':_0x2ed2b4??[],'resolveBinding':_0x2bea7a=>_0x5a84ba[_0x1e44a3(0x278)](_0x5300a4,_0x2bea7a)});return _0x2e6c7a['status']===_0x1e44a3(0x26c)?_0x2e6c7a[_0x1e44a3(0x1a8)]:null;}function mt(_0x515a1f,_0x542e13,_0x3ea200){const _0x336295=_0x3a7f13;var _0x26ff3b;let _0x55c654=_0x32ab18(0x6);for(;_0x515a1f!=null&&(_0x26ff3b=_0x515a1f[_0x336295(0x182)])!=null&&_0x26ff3b[_0x336295(0x1ee)](_0x5d939d=>_0x5d939d[_0x336295(0x23f)]===_0x55c654)||_0x542e13[_0x336295(0x238)](_0x3ea200,_0x55c654);)_0x55c654=_0x32ab18(0x6);return _0x55c654;}function ht(_0x4564f1){try{return Le(_0x4564f1);}catch(_0x3db6eb){if(_0x3db6eb instanceof C)return null;throw _0x3db6eb;}}function gt(_0x117061){const _0x4eb578=_0x3a7f13;let _0x485311=_0x117061['previousDocumentData']&&_0x117061[_0x4eb578(0x180)]?vt(_0x117061['document'],_0x117061['unitId'],_0x117061['previousDocumentData'],_0x117061[_0x4eb578(0x180)],_0x117061['cursorOffset'],_0x117061['trigger']):null;return _0x117061[_0x4eb578(0x1a6)]&&_0x117061[_0x4eb578(0x180)]&&!_0x485311?null:{'documentRedo':_0x485311,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061[_0x4eb578(0x22e)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061['previousResource']}}};}function _0x52b2(){const _0x30d63c=['params','SECTION_BREAK','push','trim','_registrations','degradeDocumentData','assign','getInstance','EMPTY','TABLE_START','registerPluginResource','getPresentation','add','_instanceService','_preserveInvalid','165ALWzCP','blockRanges','_updateFormulaResult','getUnitId','referenceRevision','_resources','docs-formula.command.set-number-format','values','dispose','TABLE_CELL_START','1.5.0','some','degradeBody','removeFormula','default','80FgbGBK','success','dataStream','forEach','registerProvider','slice','_model','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','BLOCK_END','columnGroups','documentRedo','symbol','segmentId','lastValue','asObservable','deepClone','resources','pending','externalReferences','sequenceNodesBuilder','unitId','insertLength','getFormulaValueSync','setFormula','_commandService','trigger','identity','wholeEntity','sort','end','getRevision','min','docs-formula.command.replace-with-text','rangeType','_setPresentation','name','_rawResources','notifyTextChanged','length','PENDING','selection','resourceUndo','customDecorations','endOffset','unitDisposed$','includes','clear','endIndex','max','invalid-resource','source','presentation','setResource','error','_resourceManagerService','pattern','docs-formula.command.remove','getTextRanges','TABLE_ROW_START','563001LcmOIV','nextResource','set','numberFormat','unregisterUnit','DOC_FORMULA_PLUGIN','pluginName','resolveFormula','_loadErrors','paragraphId','@univerjs-pro/docs-formula','getFormula','getResource','docs-formula.mutation.set-resource','paragraphs','constructor','parse','startOffset','rangeId','isInteger','keys','externalMutations','tables','getResult','_change$','TABLE_ROW_END','object','deleteFormula','entries','_config','_queueSync','2837630TmjOji','formula','docs-formula.config','defineProperty','deleteLength','getLoadError','decorate','_syncUnit','startIndex','getRegisteredFormulas','type','_injector','_service','docs-formula.mutation.remove-formula','disposeWithMe','resourceRedo','delete','_registrationService','expectedFormula','string','has','_deleteRegistration','data','154kDYsyE','formulas','expectedNumberFormat','map','textRuns','getCurrentUnitOfType','empty','unregister','446031mfmjEB','resolved','_isDisposed','unitAdded$','registerFormulaWithRange','config','function','document','packageName','formulaId','_docFormulaModel','cell','setConfig','resolveBinding','TABLE_CELL_END','endsWith','stringify','_formulaKeys','_configService','serialize','next','filter','customBlocks','change$','load','nextDocumentData','target','customRanges','fromEntries','syncUnit','TABLE_END','every','370BUhnqR','sectionBreaks','version','getAllUnitsForType','COLUMN_END','PARAGRAPH','range','toPrimitive','start','UNIVER_DOC','accessor','text','DOC','model','register','72748ticsoS','presentationChanged$','getBody','_hostExternalReferenceModel','undoMutation','11XOCcEg','stale','find','insert','complete','properties','updates','boolean','liveResult','_formulaService','resource','previousDocumentData','_cacheEligibilityService','references','MUTATION','cursorOffset','redoMutation','disabled','registerCommand','syncExecuteCommand','pushUndoRedo','subscribe','get','ERROR','univer-docs-formula','body','color','position','docs-formula.command.update','6899604zhXAbo','onStarting','COLUMN_GROUP_START','COLUMN_GROUP_END','docs-formula.mutation.set-last-values','docs-formula.command.insert','_pendingUnitIds','editOp','_presentationChanged$','SUCCESS','BLOCK_START','3236nCsbXX','COMMAND','getFormulas','documentData','assess','54534fZstZX','resolveText','_univerInstanceService','getUnit','CUSTOM','collectMutations','paragraph','setFormulas','from','retain','getSnapshot','_syncScheduled'];_0x52b2=function(){return _0x30d63c;};return _0x52b2();}function _t(_0x431627,_0x30f6d3,_0x336e2f,_0x401707){const _0x894fcf=_0x3a7f13;_0x401707[_0x894fcf(0x1af)]({'id':_0x431627[_0x894fcf(0x20b)]+':'+_0x431627[_0x894fcf(0x23f)],'unitID':_0x431627['unitId'],'redoMutations':[..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]?[_0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]]:[],..._0x30f6d3[_0x894fcf(0x1fc)]?[_0x30f6d3[_0x894fcf(0x1fc)]]:[],_0x30f6d3[_0x894fcf(0x25b)]],'undoMutations':[_0x30f6d3['resourceUndo'],..._0x336e2f?[_0x336e2f]:[],..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x19a)]?[_0x431627['externalMutations'][_0x894fcf(0x19a)]]:[]]});}function q(_0x3bd7cd){const _0x36aa96=_0x3a7f13;let _0x256ad9=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x9a0954),_0x455749=_0x3bd7cd[_0x36aa96(0x191)]['get'](_0x16e8d6),_0x57df78=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x3d26b2),_0x8c6220=gt(_0x3bd7cd);if(!_0x8c6220)return!0x1;let _0x5cf53f=!0x1,_0x5069f3=null,_0x59afb0=!0x1;try{if(_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)]){if(!_0x256ad9[_0x36aa96(0x1ae)](_0x3bd7cd['externalMutations'][_0x36aa96(0x1ab)]['id'],_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)][_0x36aa96(0x1d4)]))return!0x1;_0x5cf53f=!0x0;}if(_0x8c6220['documentRedo']){let _0x3bf014=_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x1fc)]['id'],_0x8c6220[_0x36aa96(0x1fc)][_0x36aa96(0x1d4)]);if(!_0x3bf014)return J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x5069f3={'id':_0xd26f03['id'],'params':{..._0x3bf014,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x256ad9['syncExecuteCommand'](_0x8c6220[_0x36aa96(0x25b)]['id'],_0x8c6220[_0x36aa96(0x25b)][_0x36aa96(0x1d4)]))return yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x59afb0=!0x0,_t(_0x3bd7cd,_0x8c6220,_0x5069f3,_0x455749);}catch(_0x39dd4b){throw _0x59afb0&&_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x21b)]['id'],_0x8c6220[_0x36aa96(0x21b)][_0x36aa96(0x1d4)]),yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),_0x39dd4b;}return _0x57df78['replaceDocRanges']([{'startOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'endOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'segmentId':''}],{'unitId':_0x3bd7cd[_0x36aa96(0x206)],'subUnitId':_0x3bd7cd[_0x36aa96(0x206)]},!0x1,{[_0x5393de]:!0x0}),!0x0;}function vt(_0x2ec114,_0x12cde7,_0x4ddc10,_0x18d255,_0x3c7af9,_0x196c3d){let _0x352fd4=bt(_0x4ddc10,_0x18d255,_0x410a7f(_0x2ec114,''));return _0x352fd4?{'id':_0xd26f03['id'],'params':{'unitId':_0x12cde7,'actions':_0x352fd4,'segmentId':'','textRanges':[{'startOffset':_0x3c7af9,'endOffset':_0x3c7af9,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x196c3d}}:null;}function yt(_0x1fe23f,_0x58b3e1){const _0x5451d2=_0x3a7f13;_0x58b3e1&&_0x1fe23f[_0x5451d2(0x1ae)](_0x58b3e1['id'],_0x58b3e1['params']);}function J(_0x4a41c5,_0x1d20a0,_0x1f9c7f){const _0x2542bb=_0x3a7f13;_0x1f9c7f&&_0x1d20a0[_0x2542bb(0x19a)]&&_0x4a41c5[_0x2542bb(0x1ae)](_0x1d20a0['undoMutation']['id'],_0x1d20a0['undoMutation'][_0x2542bb(0x1d4)]);}function bt(_0x4d0b83,_0x15197b,_0x22ccc4){const _0x13ebd3=_0x3a7f13;let _0x11e4ae=_0x4d0b83[_0x13ebd3(0x1b4)],_0xecd30b=_0x15197b[_0x13ebd3(0x1b4)],_0x42bc2a=xt(_0x11e4ae==null?void 0x0:_0x11e4ae['dataStream'],_0xecd30b==null?void 0x0:_0xecd30b[_0x13ebd3(0x1f4)]);if(!_0x42bc2a||!_0xecd30b)return null;let _0x177fcb=new _0x556769();return _0x177fcb[_0x13ebd3(0x1d1)](_0x42bc2a[_0x13ebd3(0x18f)]),_0x42bc2a[_0x13ebd3(0x207)]>0x0&&_0x177fcb[_0x13ebd3(0x19e)](_0x42bc2a[_0x13ebd3(0x207)],_0x282876(_0xecd30b,_0x42bc2a['start'],_0x42bc2a['start']+_0x42bc2a[_0x13ebd3(0x207)],!0x1)),_0x42bc2a['deleteLength']>0x0&&_0x177fcb[_0x13ebd3(0x25c)](_0x42bc2a[_0x13ebd3(0x250)]),_0x5e930b[_0x13ebd3(0x1db)]()[_0x13ebd3(0x1bf)](_0x177fcb[_0x13ebd3(0x27e)](),_0x22ccc4);}function xt(_0x329017,_0x11208b){const _0x51bfe4=_0x3a7f13;if(_0x329017==null||_0x11208b==null||_0x329017===_0x11208b)return null;let _0x34df1a=0x0;for(;_0x34df1a<_0x329017['length']&&_0x34df1a<_0x11208b[_0x51bfe4(0x218)]&&_0x329017[_0x34df1a]===_0x11208b[_0x34df1a];)_0x34df1a+=0x1;let _0x4b47b9=_0x329017[_0x51bfe4(0x218)],_0x1b1f56=_0x11208b[_0x51bfe4(0x218)];for(;_0x4b47b9>_0x34df1a&&_0x1b1f56>_0x34df1a&&_0x329017[_0x4b47b9-0x1]===_0x11208b[_0x1b1f56-0x1];)--_0x4b47b9,--_0x1b1f56;return{'start':_0x34df1a,'deleteLength':_0x4b47b9-_0x34df1a,'insertLength':_0x1b1f56-_0x34df1a};}function St(_0x1c4e9f){const _0x31d240=_0x3a7f13;return{'formulas':Object[_0x31d240(0x183)](Object[_0x31d240(0x249)](_0x1c4e9f[_0x31d240(0x264)])[_0x31d240(0x266)](([_0x3cf782,_0x2e71d6])=>[_0x3cf782,{..._0x2e71d6,..._0x2e71d6[_0x31d240(0x230)]?{'numberFormat':{..._0x2e71d6[_0x31d240(0x230)]}}:null,..._0x2e71d6[_0x31d240(0x1ff)]?{'lastValue':{..._0x2e71d6[_0x31d240(0x1ff)]}}:null}]))};}let Y=class extends _0x533030{constructor(_0x26bee7,_0x41c06f,_0x6f9606,_0x36d6af){const _0xcca16b=_0x3a7f13;super(),this[_0xcca16b(0x1e1)]=_0x26bee7,this[_0xcca16b(0x20a)]=_0x41c06f,this[_0xcca16b(0x1f8)]=_0x6f9606,this[_0xcca16b(0x258)]=_0x36d6af,A(this,_0xcca16b(0x1be),new Set()),A(this,_0xcca16b(0x1d3),!0x1),A(this,_0xcca16b(0x26d),!0x1),this['_instanceService'][_0xcca16b(0x18a)](_0x4aa394['UNIVER_DOC'])[_0xcca16b(0x1f5)](_0x5da29b=>this[_0xcca16b(0x258)][_0xcca16b(0x184)](_0x5da29b)),this['disposeWithMe'](this[_0xcca16b(0x1f8)][_0xcca16b(0x282)][_0xcca16b(0x1b0)](({unitId:_0x1c7c1a})=>this['_syncUnit'](_0x1c7c1a))),this['disposeWithMe'](this[_0xcca16b(0x1e1)][_0xcca16b(0x26e)][_0xcca16b(0x1b0)](({unit:_0x2c442a})=>{const _0xc8e41f=_0xcca16b;_0x2c442a[_0xc8e41f(0x256)]===_0x4aa394[_0xc8e41f(0x190)]&&this[_0xc8e41f(0x24b)](_0x2c442a[_0xc8e41f(0x1e6)]());})),this[_0xcca16b(0x25a)](this['_instanceService'][_0xcca16b(0x21e)][_0xcca16b(0x1b0)](_0x3e6f8a=>{const _0xa9cf35=_0xcca16b;this[_0xa9cf35(0x258)][_0xa9cf35(0x231)](_0x3e6f8a['getUnitId']());})),this[_0xcca16b(0x25a)](this[_0xcca16b(0x20a)]['onCommandExecuted'](_0x301cf4=>{const _0x4f3d0e=_0xcca16b;if(_0x301cf4['id']===_0xd26f03['id']&&Ct(_0x301cf4[_0x4f3d0e(0x1d4)])){let _0x570046=_0x301cf4['params'];_0x570046[_0x4f3d0e(0x1fe)]||this[_0x4f3d0e(0x253)](_0x570046[_0x4f3d0e(0x206)]);}}));}[_0x3a7f13(0x1eb)](){const _0x19f2b4=_0x3a7f13;this['_isDisposed']=!0x0,super[_0x19f2b4(0x1eb)]();}['_queueSync'](_0x17afe2){const _0x4620df=_0x3a7f13;this[_0x4620df(0x1be)][_0x4620df(0x1e0)](_0x17afe2),this['_syncScheduled']||(this[_0x4620df(0x1d3)]=!0x0,queueMicrotask(()=>{const _0x30007d=_0x4620df;if(this['_syncScheduled']=!0x1,this[_0x30007d(0x26d)])return;let _0x929ec8=Array[_0x30007d(0x1d0)](this['_pendingUnitIds']);this[_0x30007d(0x1be)][_0x30007d(0x220)](),_0x929ec8[_0x30007d(0x1f5)](_0x3687cb=>this[_0x30007d(0x253)](_0x3687cb));}));}[_0x3a7f13(0x253)](_0x3a9813){const _0x5c1636=_0x3a7f13;let _0x286405=this[_0x5c1636(0x1e1)][_0x5c1636(0x1cb)](_0x3a9813,_0x4aa394['UNIVER_DOC']);_0x286405&&this[_0x5c1636(0x258)][_0x5c1636(0x184)](_0x286405);}};Y=N([M(0x0,_0x2629d5),M(0x1,_0x9a0954),M(0x2,_0x5d6038(j)),M(0x3,_0x5d6038(P))],Y);function Ct(_0x4a9f91){const _0x3df4d5=_0x3a7f13;return typeof _0x4a9f91==_0x3df4d5(0x247)&&!!_0x4a9f91&&'unitId'in _0x4a9f91&&typeof _0x4a9f91[_0x3df4d5(0x206)]==_0x3df4d5(0x25f)&&(!(_0x3df4d5(0x1fe)in _0x4a9f91)||_0x4a9f91[_0x3df4d5(0x1fe)]===void 0x0||typeof _0x4a9f91[_0x3df4d5(0x1fe)]==_0x3df4d5(0x25f));}let X=class extends _0x533030{constructor(_0x1ad25e,_0x47c758){const _0x5924f3=_0x3a7f13;super(),this[_0x5924f3(0x228)]=_0x1ad25e,this[_0x5924f3(0x275)]=_0x47c758,this[_0x5924f3(0x25a)](this['_resourceManagerService'][_0x5924f3(0x1de)]({'pluginName':y,'businesses':[_0x4aa394['UNIVER_DOC']],'toJson':_0x11ce79=>JSON[_0x5924f3(0x27b)](this[_0x5924f3(0x275)][_0x5924f3(0x27e)](_0x11ce79)),'parseJson':_0x5e42cb=>JSON[_0x5924f3(0x23d)](_0x5e42cb),'onLoad':(_0x70f3d0,_0x58efcd)=>{const _0x40de33=_0x5924f3;this[_0x40de33(0x275)][_0x40de33(0x283)](_0x70f3d0,_0x58efcd);},'onUnLoad':_0x1fe4e8=>this[_0x5924f3(0x275)]['removeUnit'](_0x1fe4e8)}));}};X=N([M(0x0,_0x164b3f),M(0x1,_0x5d6038(j))],X);var wt=_0x3a7f13(0x237),Tt=_0x3a7f13(0x1ed);const Et={};let Z=class extends _0x533030{constructor(_0xd158c5,_0x266105,_0x20383e){const _0x43b0cf=_0x3a7f13;super(),this[_0x43b0cf(0x1ca)]=_0xd158c5,this[_0x43b0cf(0x1a4)]=_0x266105,this[_0x43b0cf(0x25a)](_0x20383e[_0x43b0cf(0x195)]({'resolve':(_0xacd81d,_0x1d5d9d)=>{const _0x5b2e18=_0x43b0cf;var _0x504e8c;return((_0x504e8c=_0x1d5d9d[_0x5b2e18(0x182)])==null?void 0x0:_0x504e8c[_0x5b2e18(0x280)](w)[_0x5b2e18(0x266)](_0x3f5902=>({'startOffset':_0x3f5902[_0x5b2e18(0x254)],'endOffset':_0x3f5902[_0x5b2e18(0x221)]+0x1,'text':this['resolveFormula'](_0xacd81d,_0x3f5902[_0x5b2e18(0x23f)])})))??[];}})),this[_0x43b0cf(0x25a)](this[_0x43b0cf(0x1a4)]['presentationChanged$'][_0x43b0cf(0x1b0)](({unitId:_0x46eac9})=>{const _0x5c55b9=_0x43b0cf;_0x20383e[_0x5c55b9(0x217)](_0x46eac9);}));}[_0x3a7f13(0x234)](_0x3b91ad,_0x8c6a1c){const _0xe57e5c=_0x3a7f13;var _0x474428;return((_0x474428=this['_formulaService'][_0xe57e5c(0x244)]({'unitId':_0x3b91ad,'rangeId':_0x8c6a1c}))==null?void 0x0:_0x474428[_0xe57e5c(0x192)])??'';}[_0x3a7f13(0x1c9)](_0x54cad1,_0x2c003f,_0x307e62){const _0xf2a59d=_0x3a7f13;var _0x231baa;let _0x241966=this[_0xf2a59d(0x1ca)][_0xf2a59d(0x1cb)](_0x54cad1,_0x4aa394[_0xf2a59d(0x190)]),_0x712023=_0x241966==null?void 0x0:_0x241966[_0xf2a59d(0x198)]();if(!_0x712023)return'';let _0x1576f4=_0x712023['dataStream'][_0xf2a59d(0x1f7)](_0x2c003f,_0x307e62),_0x38849c=((_0x231baa=_0x712023[_0xf2a59d(0x182)])==null?void 0x0:_0x231baa[_0xf2a59d(0x280)](_0x499359=>w(_0x499359)&&_0x499359[_0xf2a59d(0x254)]>=_0x2c003f&&_0x499359['endIndex']<_0x307e62)['sort']((_0x35cf0e,_0x3e7b35)=>_0x3e7b35['startIndex']-_0x35cf0e[_0xf2a59d(0x254)]))??[];for(let _0x4323d5 of _0x38849c){let _0x172811=_0x4323d5[_0xf2a59d(0x254)]-_0x2c003f,_0xf51724=_0x4323d5[_0xf2a59d(0x221)]-_0x2c003f+0x1;_0x1576f4=''+_0x1576f4[_0xf2a59d(0x1f7)](0x0,_0x172811)+this[_0xf2a59d(0x234)](_0x54cad1,_0x4323d5[_0xf2a59d(0x23f)])+_0x1576f4[_0xf2a59d(0x1f7)](_0xf51724);}return _0x1576f4;}[_0x3a7f13(0x1d9)](_0x4a1ebe){return Dt(_0x4a1ebe);}[_0x3a7f13(0x1ef)](_0x49eed3,_0x45e9dd,_0x634093={}){const _0x2a6d37=_0x3a7f13;var _0x4e27b1;return Be({'id':_0x49eed3,'body':_0x45e9dd,'documentStyle':{}},(((_0x4e27b1=_0x45e9dd[_0x2a6d37(0x182)])==null?void 0x0:_0x4e27b1[_0x2a6d37(0x280)](w))??[])['map'](_0x1a0977=>({'rangeId':_0x1a0977['rangeId'],'text':_0x634093[_0x1a0977['rangeId']]??this[_0x2a6d37(0x234)](_0x49eed3,_0x1a0977[_0x2a6d37(0x23f)])})))[_0x2a6d37(0x1b4)]??{'dataStream':''};}};Z=N([M(0x0,_0x2629d5),M(0x1,_0x5d6038(P)),M(0x2,_0x5d6038(_0x2459b3))],Z);function Dt(_0x426647){const _0x18efad=_0x3a7f13;var _0x4ee8a6,_0x3de727;let _0x2a7704=Ot(_0x426647),_0x19d859=Be(_0x426647,(((_0x4ee8a6=_0x426647[_0x18efad(0x1b4)])==null||(_0x4ee8a6=_0x4ee8a6[_0x18efad(0x182)])==null?void 0x0:_0x4ee8a6['filter'](w))??[])[_0x18efad(0x266)](_0x2cecf1=>({'rangeId':_0x2cecf1['rangeId'],'text':kt(_0x2a7704==null?void 0x0:_0x2a7704[_0x18efad(0x264)][_0x2cecf1[_0x18efad(0x23f)]])})));return _0x19d859[_0x18efad(0x202)]=(_0x3de727=_0x19d859[_0x18efad(0x202)])==null?void 0x0:_0x3de727[_0x18efad(0x280)](_0x4689d2=>_0x4689d2[_0x18efad(0x215)]!==y),_0x19d859;}function Ot(_0x5c2187){const _0x4a282b=_0x3a7f13;var _0x2734a3;let _0x322ed5=(_0x2734a3=_0x5c2187[_0x4a282b(0x202)])==null||(_0x2734a3=_0x2734a3[_0x4a282b(0x19d)](_0x4c22ff=>_0x4c22ff[_0x4a282b(0x215)]===_0x4a282b(0x232)))==null?void 0x0:_0x2734a3[_0x4a282b(0x262)];if(_0x322ed5)try{let _0x5da19e=JSON[_0x4a282b(0x23d)](_0x322ed5);return x(_0x5da19e)?_0x5da19e:void 0x0;}catch{return;}}function kt(_0x13f512){const _0xc3c338=_0x3a7f13;return _0x13f512?_0x12221e({'lastValue':_0x13f512['lastValue'],'numberFormat':_0x13f512[_0xc3c338(0x230)]})[_0xc3c338(0x192)]:'';}let Q=class extends _0x533030{constructor(_0x67af32,_0x1ce97c,_0x26a5a0){const _0x1776a3=_0x3a7f13;super(),this[_0x1776a3(0x1a4)]=_0x67af32,this['_cacheEligibilityService']=_0x1ce97c,this[_0x1776a3(0x25a)](_0x26a5a0[_0x1776a3(0x1f6)](this));}[_0x3a7f13(0x1cd)](_0x71c7a3){const _0x15fd12=_0x3a7f13;let _0x5d2570=new Map();for(let _0x2c6b50 of this[_0x15fd12(0x1a4)]['getRegisteredFormulas']()){var _0x47912c;if(!this[_0x15fd12(0x1a7)][_0x15fd12(0x1c7)](_0x2c6b50['config'][_0x15fd12(0x24d)],_0x2c6b50[_0x15fd12(0x1a3)])['eligible'])continue;let _0x30e212=_0x3ee924(_0x2c6b50[_0x15fd12(0x1a3)]),_0x49e9f1=_0x30e212?_0x5a1b13(_0x30e212):null;if(!_0x49e9f1||At(_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x1ff)],_0x49e9f1))continue;let _0xdbfeb8=_0x5d2570['get'](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)])??[];_0xdbfeb8[_0x15fd12(0x1d6)]({'rangeId':_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x23f)],'expectedFormula':_0x2c6b50['config'][_0x15fd12(0x24d)],'expectedNumberFormat':(_0x47912c=_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x230)])==null?void 0x0:_0x47912c[_0x15fd12(0x229)],'expectedReferenceRevision':_0x2c6b50[_0x15fd12(0x1e7)],'lastValue':_0x49e9f1}),_0x5d2570[_0x15fd12(0x22f)](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)],_0xdbfeb8);}return Array[_0x15fd12(0x1d0)](_0x5d2570,([_0x96eb3e,_0x24f314])=>({'id':R['id'],'params':{'unitId':_0x96eb3e,'updates':_0x24f314}}));}};Q=N([M(0x0,_0x5d6038(P)),M(0x1,_0x5d6038(_0x13ac3a)),M(0x2,_0x5d6038(_0x416b1f))],Q);function At(_0xf0585,_0x5d1307){const _0xa18be=_0x3a7f13;return(_0xf0585==null?void 0x0:_0xf0585['v'])===_0x5d1307['v']&&(_0xf0585==null?void 0x0:_0xf0585['t'])===_0x5d1307['t']&&(_0xf0585==null?void 0x0:_0xf0585['pattern'])===_0x5d1307[_0xa18be(0x229)];}let $=class extends _0x26195d{constructor(_0x4f157c=Et,_0x17dac8,_0x2d617f,_0x4fe1d9){const _0x31b2c5=_0x3a7f13;super(),this[_0x31b2c5(0x24a)]=_0x4f157c,this['_injector']=_0x17dac8,this['_commandService']=_0x2d617f,this['_configService']=_0x4fe1d9;let {..._0x43a95a}=_0x4e3800({},Et,this[_0x31b2c5(0x24a)]);this[_0x31b2c5(0x27d)][_0x31b2c5(0x277)](_0x31b2c5(0x24e),_0x43a95a);}[_0x3a7f13(0x1b9)](){const _0x5218fd=_0x3a7f13;this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([j]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([P]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([X]),this[_0x5218fd(0x257)]['add']([Y]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Q]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Z]),_0xddcf97(this[_0x5218fd(0x257)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W]['forEach'](_0x399fbb=>this[_0x5218fd(0x25a)](this[_0x5218fd(0x20a)][_0x5218fd(0x1ad)](_0x399fbb)));}};A($,_0x3a7f13(0x233),y),A($,_0x3a7f13(0x273),wt),A($,_0x3a7f13(0x189),Tt),A($,_0x3a7f13(0x256),_0x4aa394[_0x3a7f13(0x190)]),$=N([_0x37da81(_0x3344bd,_0x513513,_0x46761e),M(0x1,_0x5d6038(_0x2a8248)),M(0x2,_0x9a0954),M(0x3,_0x4226f8)],$);export{W as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,j as DocFormulaModel,X as DocFormulaResourceController,ot as DocFormulaResultStatus,P as DocFormulaService,z as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,H as RemoveDocFormulaCommand,ut as RemoveDocFormulaMutation,U as ReplaceDocFormulaWithTextCommand,R as SetDocFormulaLastValuesMutation,lt as SetDocFormulaMutation,V as SetDocFormulaNumberFormatCommand,L as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,B as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Dt as degradeDocFormulaDocumentData,T as findDocFormulaRange,Ne as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Pe as isFormulaLastValue};
1
+ const _0xb81d4c=_0x43e1;(function(_0x287216,_0x47b045){const _0xd3e7f0=_0x43e1,_0x557293=_0x287216();while(!![]){try{const _0x436cc8=parseInt(_0xd3e7f0(0x1ce))/0x1+parseInt(_0xd3e7f0(0x1d5))/0x2+-parseInt(_0xd3e7f0(0x1a4))/0x3*(-parseInt(_0xd3e7f0(0x17e))/0x4)+parseInt(_0xd3e7f0(0x1ee))/0x5+-parseInt(_0xd3e7f0(0x1b6))/0x6+parseInt(_0xd3e7f0(0x203))/0x7+parseInt(_0xd3e7f0(0x226))/0x8*(-parseInt(_0xd3e7f0(0x181))/0x9);if(_0x436cc8===_0x47b045)break;else _0x557293['push'](_0x557293['shift']());}catch(_0x3f6d10){_0x557293['push'](_0x557293['shift']());}}}(_0x3d4a,0x97885));import{FormulaCacheEligibilityService as _0x5bfff4,FormulaLastValuePersistenceService as _0x21c0ca,HostExternalReferenceModel as _0x2be22c,UniverProFormulaEnginePlugin as _0x3c9e4a,buildUpsertHostExternalReferenceMutations as _0x5f5499,collectFormulaExternalReferenceQualifiers as _0x1bd1bb,getScalarFormulaResultCell as _0xfa1663,resolveFormulaResultPresentation as _0x157ca0,resolveHostFormulaExternalReferences as _0x1fc472,toFormulaLastValue as _0x4884df}from'@univerjs-pro/engine-formula';import{CellValueType as _0x1d3a7a,CommandType as _0x599208,CustomRangeType as _0x4e4035,DataStreamTreeTokenType as _0x4bf61f,DependentOn as _0x415d13,Disposable as _0xf99196,ICommandService as _0x41ce44,IConfigService as _0x212f05,IResourceManagerService as _0x85b6e7,IUndoRedoService as _0x5273cf,IUniverInstanceService as _0x1616da,Inject as _0x3abf00,Injector as _0x38221f,JSONX as _0x5b1be5,Plugin as _0x4cfe43,TextX as _0x7ff3ce,Tools as _0x541130,UniverInstanceType as _0x19d9b2,generateRandomId as _0x5d3298,getBodySliceForTextXAction as _0x312eb6,getCustomRangeInterval as _0x128c46,getParagraphContentStartOffset as _0x13c716,getRichTextEditPath as _0x197963,merge as _0x57fe01,shiftExclusiveRangeOnDelete as _0x463586,shiftExclusiveRangeOnInsert as _0x190d1a,shiftInclusiveRangeOnDelete as _0x4ab3ac,shiftInclusiveRangeOnInsert as _0x21d172,touchDependencies as _0x59a954}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x507f67,DocSelectionManagerService as _0x3e1e9b,DocTextResolverService as _0x5a38c7,RichTextEditingMutation as _0x3ff622,UniverDocsPlugin as _0x59ac81}from'@univerjs/docs';import{FormulaResultStatus as _0xd61d8b,LexerTreeBuilder as _0x276a14,OtherFormulaBizType as _0x5593a7,RegisterOtherFormulaService as _0x3b74c8}from'@univerjs/engine-formula';import{Subject as _0x45c46f}from'rxjs';import{UniverLicensePlugin as _0x46999f}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je='univer-docs-formula',Me='';function b(){return{'formulas':{}};}function x(_0x5b91c6){const _0x56550d=_0x43e1;return!_0x5b91c6||typeof _0x5b91c6!=_0x56550d(0x234)||!(_0x56550d(0x18d)in _0x5b91c6)||!_0x5b91c6[_0x56550d(0x18d)]||typeof _0x5b91c6[_0x56550d(0x18d)]!='object'||Array[_0x56550d(0x215)](_0x5b91c6[_0x56550d(0x18d)])?!0x1:Object[_0x56550d(0x18e)](_0x5b91c6['formulas'])['every'](([_0x32e913,_0x11d7ae])=>_0x32e913[_0x56550d(0x1f2)]>0x0&&Ne(_0x11d7ae));}function Ne(_0x270303){const _0xf52ab0=_0x43e1;return!_0x270303||typeof _0x270303!=_0xf52ab0(0x234)||!S(_0x270303,[_0xf52ab0(0x1f0),_0xf52ab0(0x19e),_0xf52ab0(0x1ed)])||!(_0xf52ab0(0x1f0)in _0x270303)||typeof _0x270303[_0xf52ab0(0x1f0)]!=_0xf52ab0(0x1fc)||!_0x270303['formula']['trim']()||_0xf52ab0(0x19e)in _0x270303&&_0x270303[_0xf52ab0(0x19e)]!=null&&(typeof _0x270303[_0xf52ab0(0x19e)]!=_0xf52ab0(0x234)||!S(_0x270303['numberFormat'],['pattern'])||!(_0xf52ab0(0x168)in _0x270303[_0xf52ab0(0x19e)])||typeof _0x270303['numberFormat'][_0xf52ab0(0x168)]!='string')?!0x1:!(_0xf52ab0(0x1ed)in _0x270303)||_0x270303[_0xf52ab0(0x1ed)]==null||Pe(_0x270303[_0xf52ab0(0x1ed)]);}function Pe(_0x182fd1){const _0x60b7aa=_0x43e1;return!_0x182fd1||typeof _0x182fd1!=_0x60b7aa(0x234)||!S(_0x182fd1,['v','t',_0x60b7aa(0x168)])||!('v'in _0x182fd1)||_0x182fd1['v']!==null&&typeof _0x182fd1['v']!=_0x60b7aa(0x1fc)&&typeof _0x182fd1['v']!=_0x60b7aa(0x1eb)&&typeof _0x182fd1['v']!=_0x60b7aa(0x1b0)||'t'in _0x182fd1&&_0x182fd1['t']!=null&&!Fe(_0x182fd1['t'])?!0x1:!(_0x60b7aa(0x168)in _0x182fd1)||_0x182fd1['pattern']==null||typeof _0x182fd1[_0x60b7aa(0x168)]=='string';}function S(_0x47a6b8,_0x42f8ba){const _0x4c2983=_0x43e1;let _0x580b3c=new Set(_0x42f8ba);return Object[_0x4c2983(0x1a6)](_0x47a6b8)[_0x4c2983(0x175)](_0x398190=>_0x580b3c[_0x4c2983(0x22f)](_0x398190));}function Fe(_0x1c887c){const _0x2d31dd=_0x43e1;return typeof _0x1c887c==_0x2d31dd(0x1eb)&&Object['values'](_0x1d3a7a)[_0x2d31dd(0x222)](_0x1c887c);}const Ie=new Set([_0x4bf61f['SECTION_BREAK'],_0x4bf61f[_0xb81d4c(0x216)],_0x4bf61f['TABLE_ROW_START'],_0x4bf61f[_0xb81d4c(0x19c)],_0x4bf61f[_0xb81d4c(0x1e9)],_0x4bf61f[_0xb81d4c(0x1ef)],_0x4bf61f[_0xb81d4c(0x238)],_0x4bf61f['COLUMN_GROUP_START'],_0x4bf61f[_0xb81d4c(0x1f4)],_0x4bf61f[_0xb81d4c(0x251)],_0x4bf61f[_0xb81d4c(0x1e1)],_0x4bf61f['BLOCK_START'],_0x4bf61f['BLOCK_END'],_0x4bf61f[_0xb81d4c(0x1b4)]]);var C=class extends Error{constructor(){const _0x3619f5=_0xb81d4c;super(_0x3619f5(0x209));}};function Le(_0x45ed8f){const _0x2ee9bc=_0xb81d4c;var _0x5788d1,_0x227bf7;let _0x2b2b46=_0x541130[_0x2ee9bc(0x211)](_0x45ed8f[_0x2ee9bc(0x1ba)]),_0x5d5f37=O(_0x2b2b46),{startOffset:_0x57ace2,endOffset:_0x3aaf2c}=We(_0x5d5f37,_0x45ed8f[_0x2ee9bc(0x1b9)],_0x45ed8f['endOffset']);Ve(_0x5d5f37,_0x57ace2,_0x3aaf2c);let _0x20aa1f=((_0x5788d1=_0x5d5f37[_0x2ee9bc(0x1c4)])==null?void 0x0:_0x5788d1['filter'](_0xd8bdcb=>{const _0x18863e=_0x2ee9bc;if(!w(_0xd8bdcb))return!0x1;let _0x8a560d=_0x128c46(_0xd8bdcb);return _0x8a560d[_0x18863e(0x253)]>_0x57ace2&&_0x8a560d[_0x18863e(0x1b9)]<_0x3aaf2c;})[_0x2ee9bc(0x259)](_0x3e9489=>_0x3e9489[_0x2ee9bc(0x1dd)]))??[];qe(_0x5d5f37,_0x57ace2,_0x3aaf2c,''),_0x5d5f37[_0x2ee9bc(0x1c4)]=[...((_0x227bf7=_0x5d5f37[_0x2ee9bc(0x1c4)])==null?void 0x0:_0x227bf7[_0x2ee9bc(0x21d)](_0x850227=>!_0x20aa1f[_0x2ee9bc(0x222)](_0x850227[_0x2ee9bc(0x1dd)])&&_0x850227[_0x2ee9bc(0x1dd)]!==_0x45ed8f[_0x2ee9bc(0x1dd)]))??[],He(_0x45ed8f[_0x2ee9bc(0x1dd)],_0x57ace2)][_0x2ee9bc(0x18f)]((_0xfb2d83,_0x4c6306)=>_0xfb2d83['startIndex']-_0x4c6306[_0x2ee9bc(0x23b)]);let _0x6334ce=Ue(_0x45ed8f[_0x2ee9bc(0x1e3)]);return _0x20aa1f[_0x2ee9bc(0x171)](_0x389326=>{delete _0x6334ce['formulas'][_0x389326];}),_0x6334ce[_0x2ee9bc(0x18d)][_0x45ed8f[_0x2ee9bc(0x1dd)]]=_0x541130['deepClone'](_0x45ed8f['config']),{'nextDocumentData':_0x2b2b46,'nextResource':_0x6334ce,'cursorOffset':_0x57ace2+0x1};}function Re(_0x243588){const _0x40287f=_0xb81d4c;var _0x1b2074,_0x4d03e4;let _0x36999c=_0x541130['deepClone'](_0x243588[_0x40287f(0x1ba)]),_0x261e50=(_0x1b2074=O(_0x36999c)['customRanges'])==null?void 0x0:_0x1b2074[_0x40287f(0x1bb)](_0x1dd6ed=>_0x1dd6ed[_0x40287f(0x1dd)]===_0x243588[_0x40287f(0x1dd)]&&w(_0x1dd6ed));if(!_0x261e50||!((_0x4d03e4=_0x243588['resource'])!=null&&_0x4d03e4[_0x40287f(0x18d)][_0x243588[_0x40287f(0x1dd)]]))return null;let _0xbfbc05=Ue(_0x243588[_0x40287f(0x1e3)]);return _0xbfbc05[_0x40287f(0x18d)][_0x243588[_0x40287f(0x1dd)]]=_0x541130[_0x40287f(0x211)](_0x243588[_0x40287f(0x1c1)]),{'nextDocumentData':_0x36999c,'nextResource':_0xbfbc05,'cursorOffset':_0x261e50[_0x40287f(0x218)]+0x1};}function ze(_0x375611){const _0xc9000f=_0xb81d4c;let _0x24067b=_0x541130[_0xc9000f(0x211)](_0x375611[_0xc9000f(0x1ba)]),_0x5e9e0c=Je(_0x24067b,_0x375611[_0xc9000f(0x1dd)],_0x375611[_0xc9000f(0x24e)]??'');if(_0x5e9e0c==null)return null;let _0x2e0b14=Ue(_0x375611[_0xc9000f(0x1e3)]);return delete _0x2e0b14['formulas'][_0x375611[_0xc9000f(0x1dd)]],{'nextDocumentData':_0x24067b,'nextResource':_0x2e0b14,'cursorOffset':_0x5e9e0c};}function _0x3d4a(){const _0x337d9c=['blockRanges','customRanges','degradeDocumentData','slice','body','next','_injector','getAllUnitsForType','dataStream','getRegisteredFormulas','docs-formula.mutation.set-resource','833049UHbRqv','getOwnPropertyDescriptor','removeFormula','docs-formula.mutation.set-last-values','docs-formula.command.remove','add','resolveText','1038854TMBjdi','document','getBody','prototype','getFormula','sequenceNodesBuilder','getResource','externalMutations','rangeId','paragraphs','_service','_formulaKeys','COLUMN_GROUP_END','_queueSync','resource','selection','getSnapshot','_registrationService','UNIVER_DOC','degradeBody','TABLE_CELL_END','resourceRedo','number','nextResource','lastValue','2486270CpEqQK','TABLE_ROW_END','formula','docs-formula.command.convert-to-text','length','getInstance','COLUMN_START','replaceDocRanges','_setPresentation','unregister','docs-formula.mutation.remove-formula','function','_cacheEligibilityService','paragraph','string','editOp','params','_deleteRegistration','nextDocumentData','disabled','get','8270633EWhgXj','subscribe','end','start','delete','clear','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','cell','getLoadError','EMPTY','tables','setFormulas','expectedNumberFormat','previousResource','deepClone','deleteFormula','getPresentation','values','isArray','TABLE_START','DOC','endIndex','_formulaService','notifyTextChanged','max','collectMutations','filter','documentRedo','dispose','textRuns','_preserveInvalid','includes','_change$','undoMutation','success','9307072nvFKFx','getResult','_registrations','expectedReferenceRevision','getUnitId','color','PENDING','trigger','_configService','has','model','onCommandExecuted','set','toPrimitive','object','resourceUndo','registerPluginResource','COMMAND','TABLE_END','_presentationChanged$','defineProperty','startIndex','presentation','_commandService','wholeEntity','docs-formula.config','complete','removeUnit','_updateFormulaResult','registerFormulaWithRange','columnGroups','customDecorations','startsWith','PARAGRAPH','expectedFormula','CUSTOM','liveResult','unitAdded$','target','trim','text','unitDisposed$','onStarting','COLUMN_END','stale','endOffset','_docFormulaModel','MUTATION','segmentId','registerProvider','getRevision','map','_loadErrors','empty','resolveFormula','syncExecuteCommand','_isDisposed','DOC_FORMULA_PLUGIN','SUCCESS','_instanceService','assess','pattern','packageName','previousDocumentData','kind','unregisterUnit','resolveBinding','disposeWithMe','status','invalid-resource','forEach','_resourceManagerService','cursorOffset','formulaResult$','every','externalReferences','insertLength','type','getTextRanges','docs-formula.mutation.set-formula','position','error','getUnit','20ffScPR','symbol','retain','18bLJhgZ','syncUnit','assign','formulaId','serialize','_univerInstanceService','properties','insert','_config','pluginName','push','presentationChanged$','formulas','entries','sort','references','_hostExternalReferenceModel','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','source','sectionBreaks','register','1.5.1','isInteger','SECTION_BREAK','data','name','resolved','TABLE_CELL_START','setConfig','numberFormat','registerCommand','referenceRevision','unitId','_syncScheduled','accessor','529350EQsRqz','pending','keys','from','customBlocks','resources','min','stringify','change$','_syncUnit','parse','docs-formula.command.insert','boolean','_model','setResource','redoMutation','CUSTOM_BLOCK','paragraphId','5796324VnKJHt','_rawResources','asObservable','startOffset','documentData','find','load','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','endsWith','iterator','identity','config','_resources'];_0x3d4a=function(){return _0x337d9c;};return _0x3d4a();}function Be(_0x5c55df,_0x49eed3){const _0x38b5da=_0xb81d4c;var _0x349626;let _0x42ed82=_0x541130[_0x38b5da(0x211)](_0x5c55df),_0xee2c13=_0x42ed82[_0x38b5da(0x1c7)];if(!_0xee2c13)return _0x42ed82;let _0x9ab5df=new Map(_0x49eed3[_0x38b5da(0x259)](_0x45c857=>[_0x45c857[_0x38b5da(0x1dd)],_0x45c857[_0x38b5da(0x24e)]])),_0x4e1093=((_0x349626=_0xee2c13['customRanges'])==null?void 0x0:_0x349626[_0x38b5da(0x21d)](_0x1d3152=>w(_0x1d3152)&&_0x9ab5df[_0x38b5da(0x22f)](_0x1d3152['rangeId']))['sort']((_0x6bb730,_0x1472d1)=>_0x1472d1[_0x38b5da(0x23b)]-_0x6bb730[_0x38b5da(0x23b)]))??[];for(let _0xe1f924 of _0x4e1093)Je(_0x42ed82,_0xe1f924[_0x38b5da(0x1dd)],_0x9ab5df[_0x38b5da(0x202)](_0xe1f924['rangeId'])??'');return _0x42ed82;}function w(_0x3757ce){const _0x825f04=_0xb81d4c;var _0x44e4e5;return(_0x3757ce==null?void 0x0:_0x3757ce['rangeType'])===_0x4e4035[_0x825f04(0x249)]&&_0x3757ce[_0x825f04(0x23e)]===!0x0&&((_0x44e4e5=_0x3757ce[_0x825f04(0x187)])==null?void 0x0:_0x44e4e5[_0x825f04(0x16b)])==='univer-docs-formula';}function T(_0x39d642,_0x299675){const _0x369be2=_0xb81d4c;var _0x4fd87d;return _0x39d642==null||(_0x4fd87d=_0x39d642[_0x369be2(0x1c4)])==null?void 0x0:_0x4fd87d[_0x369be2(0x1bb)](_0x4eb271=>_0x4eb271[_0x369be2(0x1dd)]===_0x299675&&w(_0x4eb271));}function Ve(_0x2109ad,_0x3209ca,_0x2de806){const _0x4a07a5=_0xb81d4c;if(_0x3209ca===_0x2de806){if(Ie[_0x4a07a5(0x22f)](_0x2109ad['dataStream'][_0x3209ca]))throw new C();}else{for(let _0x1de862=_0x3209ca;_0x1de862<_0x2de806;_0x1de862++)if(_0x2109ad['dataStream'][_0x1de862]===_0x4bf61f[_0x4a07a5(0x247)]||Ie[_0x4a07a5(0x22f)](_0x2109ad[_0x4a07a5(0x1cb)][_0x1de862]))throw new C();}}function He(_0x490723,_0x41cf50){const _0x59da89=_0xb81d4c;return{'startIndex':_0x41cf50,'endIndex':_0x41cf50,'rangeId':_0x490723,'rangeType':_0x4e4035[_0x59da89(0x249)],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x2e2184){const _0x4c1576=_0xb81d4c;return _0x2e2184?_0x541130[_0x4c1576(0x211)](_0x2e2184):b();}function We(_0x27ce4f,_0x3179a5,_0x3aa9ab){const _0x1cc2aa=_0xb81d4c;let _0x46ea58=Ke(_0x27ce4f),_0x134f5b=_0x3179a5??_0x46ea58,_0x104fea=_0x3aa9ab??_0x134f5b;return{'startOffset':Ge(Math[_0x1cc2aa(0x1aa)](_0x134f5b,_0x104fea),_0x46ea58),'endOffset':Ge(Math[_0x1cc2aa(0x21b)](_0x134f5b,_0x104fea),_0x46ea58)};}function Ge(_0x16ca31,_0x4cbf61){const _0xb057b9=_0xb81d4c;return Math[_0xb057b9(0x21b)](0x0,Math['min'](_0x16ca31,_0x4cbf61));}function Ke(_0x161d6d){const _0x1db2d0=_0xb81d4c;return _0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1be)](''+_0x4bf61f[_0x1db2d0(0x247)]+_0x4bf61f['SECTION_BREAK'])?Math[_0x1db2d0(0x21b)](0x0,_0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1f2)]-0x2):_0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1be)](_0x4bf61f[_0x1db2d0(0x198)])?Math[_0x1db2d0(0x21b)](0x0,_0x161d6d['dataStream']['length']-0x1):_0x161d6d['dataStream'][_0x1db2d0(0x1f2)];}function qe(_0xa328aa,_0x4d1020,_0x30bac2,_0x39139d){_0x30bac2>_0x4d1020&&Xe(_0xa328aa,_0x4d1020,_0x30bac2),Ye(_0xa328aa,_0x4d1020,_0x39139d);}function Je(_0x134655,_0x416f06,_0x4a85db){const _0x5d070b=_0xb81d4c;var _0xe0c63e,_0x5334e6;let _0x358ef7=O(_0x134655),_0x35e499=(_0xe0c63e=_0x358ef7[_0x5d070b(0x1c4)])==null?void 0x0:_0xe0c63e[_0x5d070b(0x1bb)](_0x1aa972=>_0x1aa972[_0x5d070b(0x1dd)]===_0x416f06&&w(_0x1aa972));if(!_0x35e499)return null;let _0x37da4d=_0x128c46(_0x35e499);return qe(_0x358ef7,_0x37da4d[_0x5d070b(0x1b9)],_0x37da4d['endOffset'],_0x4a85db),_0x358ef7[_0x5d070b(0x1c4)]=(_0x5334e6=_0x358ef7[_0x5d070b(0x1c4)])==null?void 0x0:_0x5334e6['filter'](_0x111b5e=>_0x111b5e['rangeId']!==_0x416f06),_0x37da4d[_0x5d070b(0x1b9)]+_0x4a85db[_0x5d070b(0x1f2)];}function Ye(_0x505bb9,_0x3a4161,_0x278a91){const _0x443dd7=_0xb81d4c;_0x278a91&&(_0x505bb9['dataStream']=''+_0x505bb9['dataStream']['slice'](0x0,_0x3a4161)+_0x278a91+_0x505bb9[_0x443dd7(0x1cb)][_0x443dd7(0x1c6)](_0x3a4161),Ze(_0x505bb9,_0x3a4161,_0x278a91[_0x443dd7(0x1f2)]));}function Xe(_0x738ddd,_0x15963b,_0x2d1fb1){const _0x31610b=_0xb81d4c;let _0x5c12dd=_0x2d1fb1-_0x15963b;_0x738ddd['dataStream']=''+_0x738ddd[_0x31610b(0x1cb)]['slice'](0x0,_0x15963b)+_0x738ddd[_0x31610b(0x1cb)][_0x31610b(0x1c6)](_0x2d1fb1),Qe(_0x738ddd,_0x15963b,_0x5c12dd);}function Ze(_0x315792,_0x599bfe,_0x2596f0){const _0x336321=_0xb81d4c;_0x315792['paragraphs']=$e(_0x315792[_0x336321(0x1de)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x194)]=$e(_0x315792[_0x336321(0x194)],_0x599bfe,_0x2596f0),_0x315792['customBlocks']=$e(_0x315792[_0x336321(0x1a8)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x220)]=tt(_0x315792[_0x336321(0x220)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x20d)]=nt(_0x315792[_0x336321(0x20d)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x244)]=E(_0x315792[_0x336321(0x244)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x1c4)]=E(_0x315792['customRanges'],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x245)]=E(_0x315792[_0x336321(0x245)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x1c3)]=E(_0x315792['blockRanges'],_0x599bfe,_0x2596f0);}function Qe(_0x435349,_0x22f04c,_0x302aed){const _0x47806b=_0xb81d4c;var _0x512d60,_0x4c5d81;_0x435349[_0x47806b(0x1de)]=et(_0x435349['paragraphs'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x194)]=et(_0x435349['sectionBreaks'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x1a8)]=et(_0x435349['customBlocks'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x220)]=(_0x512d60=rt((_0x4c5d81=_0x435349[_0x47806b(0x220)])==null?void 0x0:_0x4c5d81[_0x47806b(0x259)](_0x1284f9=>({..._0x1284f9,'startIndex':_0x1284f9['st'],'endIndex':_0x1284f9['ed']})),_0x22f04c,_0x302aed))==null?void 0x0:_0x512d60[_0x47806b(0x259)](_0x3953f7=>{let {startIndex:_0x16bdaa,endIndex:_0x4740da,..._0x3ed05c}=_0x3953f7;return{..._0x3ed05c,'st':_0x16bdaa,'ed':_0x4740da};}),_0x435349[_0x47806b(0x20d)]=rt(_0x435349[_0x47806b(0x20d)],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x244)]=D(_0x435349['columnGroups'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x1c4)]=D(_0x435349[_0x47806b(0x1c4)],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x245)]=D(_0x435349['customDecorations'],_0x22f04c,_0x302aed),_0x435349['blockRanges']=D(_0x435349[_0x47806b(0x1c3)],_0x22f04c,_0x302aed);}function $e(_0x1c0d9e,_0x357c9e,_0xb6cd01){const _0x594658=_0xb81d4c;return _0x1c0d9e==null?void 0x0:_0x1c0d9e[_0x594658(0x259)](_0x2b1e62=>_0x2b1e62['startIndex']>=_0x357c9e?{..._0x2b1e62,'startIndex':_0x2b1e62['startIndex']+_0xb6cd01}:_0x2b1e62);}function et(_0x35c7ca,_0x4f3954,_0x19dd5f){const _0x484e0c=_0xb81d4c;let _0x2d4610=_0x4f3954+_0x19dd5f;return _0x35c7ca==null?void 0x0:_0x35c7ca[_0x484e0c(0x259)](_0x462a3b=>_0x462a3b[_0x484e0c(0x23b)]>=_0x4f3954&&_0x462a3b[_0x484e0c(0x23b)]<_0x2d4610?null:_0x462a3b[_0x484e0c(0x23b)]>=_0x2d4610?{..._0x462a3b,'startIndex':_0x462a3b[_0x484e0c(0x23b)]-_0x19dd5f}:_0x462a3b)[_0x484e0c(0x21d)](_0x32ff70=>_0x32ff70!=null);}function tt(_0xede946,_0x5ad772,_0x519a4a){return _0xede946==null?void 0x0:_0xede946['map'](_0x408d6f=>_0x408d6f['st']>=_0x5ad772?{..._0x408d6f,'st':_0x408d6f['st']+_0x519a4a,'ed':_0x408d6f['ed']+_0x519a4a}:_0x408d6f['ed']>_0x5ad772?{..._0x408d6f,'ed':_0x408d6f['ed']+_0x519a4a}:_0x408d6f);}function E(_0x3a7734,_0x2bde18,_0x480011){const _0x477aa4=_0xb81d4c;return _0x3a7734==null?void 0x0:_0x3a7734[_0x477aa4(0x259)](_0x549af3=>_0x21d172(_0x549af3,_0x2bde18,_0x480011));}function nt(_0x4c63cb,_0x4fb8,_0x236e1b){const _0x20ba95=_0xb81d4c;return _0x4c63cb==null?void 0x0:_0x4c63cb[_0x20ba95(0x259)](_0x38f569=>_0x190d1a(_0x38f569,_0x4fb8,_0x236e1b));}function D(_0x5e162c,_0x57bc7a,_0xa07f8d){const _0x20bb09=_0xb81d4c;return _0x5e162c==null?void 0x0:_0x5e162c['map'](_0x4e4111=>_0x4ab3ac(_0x4e4111,_0x57bc7a,_0xa07f8d))[_0x20bb09(0x21d)](_0x5a9d75=>_0x5a9d75!=null);}function rt(_0x2957d5,_0x4231ba,_0x5e0141){const _0x38e6b1=_0xb81d4c;return _0x2957d5==null?void 0x0:_0x2957d5[_0x38e6b1(0x259)](_0x2c24a5=>_0x463586(_0x2c24a5,_0x4231ba,_0x5e0141))[_0x38e6b1(0x21d)](_0xe282a=>_0xe282a!=null);}function O(_0x3fb3f4){const _0x49b8d6=_0xb81d4c;if(!_0x3fb3f4[_0x49b8d6(0x1c7)])throw Error(_0x49b8d6(0x192));return _0x3fb3f4[_0x49b8d6(0x1c7)];}function k(_0x49d5ba){'@babel/helpers - typeof';const _0x569560=_0xb81d4c;return k=typeof Symbol==_0x569560(0x1f9)&&typeof Symbol[_0x569560(0x1bf)]==_0x569560(0x17f)?function(_0x4f3f0d){return typeof _0x4f3f0d;}:function(_0x57823b){const _0x888a46=_0x569560;return _0x57823b&&typeof Symbol=='function'&&_0x57823b['constructor']===Symbol&&_0x57823b!==Symbol[_0x888a46(0x1d8)]?_0x888a46(0x17f):typeof _0x57823b;},k(_0x49d5ba);}function it(_0x2786f5,_0x258a9e){const _0x53ec01=_0xb81d4c;if(k(_0x2786f5)!=_0x53ec01(0x234)||!_0x2786f5)return _0x2786f5;var _0xe56c7e;if(typeof Symbol<'u'&&(_0xe56c7e=_0x2786f5[Symbol[_0x53ec01(0x233)]])!==void 0x0){var _0x55369e=_0xe56c7e['call'](_0x2786f5,_0x258a9e||'default');if(k(_0x55369e)!=_0x53ec01(0x234))return _0x55369e;throw TypeError(_0x53ec01(0x1bd));}return(_0x258a9e===_0x53ec01(0x1fc)?String:Number)(_0x2786f5);}function at(_0x6a4a1a){const _0x58d84d=_0xb81d4c;var _0xa1395=it(_0x6a4a1a,_0x58d84d(0x1fc));return k(_0xa1395)==_0x58d84d(0x17f)?_0xa1395:_0xa1395+'';}function A(_0x2e633d,_0x137df1,_0x1da17a){const _0x53a73e=_0xb81d4c;return(_0x137df1=at(_0x137df1))in _0x2e633d?Object[_0x53a73e(0x23a)](_0x2e633d,_0x137df1,{'value':_0x1da17a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2e633d[_0x137df1]=_0x1da17a,_0x2e633d;}var j=class extends _0xf99196{constructor(..._0x199dd4){const _0x5e8a35=_0xb81d4c;super(..._0x199dd4),A(this,_0x5e8a35(0x1c2),new Map()),A(this,_0x5e8a35(0x1b7),new Map()),A(this,'_loadErrors',new Map()),A(this,_0x5e8a35(0x223),new _0x45c46f()),A(this,_0x5e8a35(0x1ac),this[_0x5e8a35(0x223)][_0x5e8a35(0x1b8)]());}[_0xb81d4c(0x1d9)](_0x5a8645,_0xd5e0f6){const _0x435d9c=_0xb81d4c;var _0x36d223;let _0x290c31=(_0x36d223=this[_0x435d9c(0x1c2)][_0x435d9c(0x202)](_0x5a8645))==null?void 0x0:_0x36d223[_0x435d9c(0x18d)][_0xd5e0f6];return _0x290c31?_0x541130[_0x435d9c(0x211)](_0x290c31):void 0x0;}['getFormulas'](_0x556c20){const _0x31b166=_0xb81d4c;var _0x49dbae;return _0x541130[_0x31b166(0x211)](((_0x49dbae=this[_0x31b166(0x1c2)]['get'](_0x556c20))==null?void 0x0:_0x49dbae['formulas'])??{});}[_0xb81d4c(0x1db)](_0x38513f){const _0x4a52a0=_0xb81d4c;let _0x1929ab=this[_0x4a52a0(0x1c2)][_0x4a52a0(0x202)](_0x38513f);return _0x1929ab?_0x541130['deepClone'](_0x1929ab):void 0x0;}['setFormula'](_0x42b353,_0x4907ed,_0x1f8281){const _0x2aadfc=_0xb81d4c;return this[_0x2aadfc(0x20e)](_0x42b353,{[_0x4907ed]:_0x1f8281});}[_0xb81d4c(0x1b2)](_0x19cbe6,_0x243e2b){const _0x344b05=_0xb81d4c;return this[_0x344b05(0x25a)][_0x344b05(0x22f)](_0x19cbe6)||!x(_0x243e2b)?!0x1:(this[_0x344b05(0x1c2)][_0x344b05(0x232)](_0x19cbe6,{'formulas':_0x541130['deepClone'](_0x243e2b[_0x344b05(0x18d)])}),this[_0x344b05(0x223)][_0x344b05(0x1c8)]({'unitId':_0x19cbe6}),!0x0);}['setFormulas'](_0x29a05c,_0x58d572){const _0xc06b82=_0xb81d4c;if(this[_0xc06b82(0x25a)]['has'](_0x29a05c)||!Object['keys'](_0x58d572)[_0xc06b82(0x1f2)]||!x({'formulas':_0x58d572}))return!0x1;let _0x6807e4=this[_0xc06b82(0x1c2)][_0xc06b82(0x202)](_0x29a05c)??b(),_0x1ee37c=_0x541130[_0xc06b82(0x211)](_0x6807e4);return Object[_0xc06b82(0x183)](_0x1ee37c[_0xc06b82(0x18d)],_0x541130[_0xc06b82(0x211)](_0x58d572)),this[_0xc06b82(0x1c2)][_0xc06b82(0x232)](_0x29a05c,_0x1ee37c),this[_0xc06b82(0x223)]['next']({'unitId':_0x29a05c,'rangeIds':Object[_0xc06b82(0x1a6)](_0x58d572)}),!0x0;}[_0xb81d4c(0x1d0)](_0x2592e2,_0xe20e11){const _0x4b0976=_0xb81d4c;if(this[_0x4b0976(0x25a)][_0x4b0976(0x22f)](_0x2592e2))return!0x1;let _0x20a284=this['_resources']['get'](_0x2592e2);if(!(_0x20a284!=null&&_0x20a284[_0x4b0976(0x18d)][_0xe20e11]))return!0x1;let _0x2fc32a=_0x541130[_0x4b0976(0x211)](_0x20a284);return delete _0x2fc32a[_0x4b0976(0x18d)][_0xe20e11],this[_0x4b0976(0x1c2)]['set'](_0x2592e2,_0x2fc32a),this['_change$'][_0x4b0976(0x1c8)]({'unitId':_0x2592e2,'rangeIds':[_0xe20e11]}),!0x0;}[_0xb81d4c(0x1bc)](_0x373bea,_0x2aa023){const _0xa9ca41=_0xb81d4c;return x(_0x2aa023)?(this[_0xa9ca41(0x1c2)][_0xa9ca41(0x232)](_0x373bea,{'formulas':_0x541130['deepClone'](_0x2aa023[_0xa9ca41(0x18d)])}),this['_rawResources'][_0xa9ca41(0x207)](_0x373bea),this[_0xa9ca41(0x25a)][_0xa9ca41(0x207)](_0x373bea),this[_0xa9ca41(0x223)][_0xa9ca41(0x1c8)]({'unitId':_0x373bea}),!0x0):(this[_0xa9ca41(0x221)](_0x373bea,_0x2aa023,_0xa9ca41(0x170)),!0x1);}['serialize'](_0x1a4ff4){const _0x39ede2=_0xb81d4c;let _0x674110=this[_0x39ede2(0x1c2)][_0x39ede2(0x202)](_0x1a4ff4);return _0x674110?_0x541130[_0x39ede2(0x211)](_0x674110):this[_0x39ede2(0x1b7)][_0x39ede2(0x22f)](_0x1a4ff4)?_0x541130[_0x39ede2(0x211)](this[_0x39ede2(0x1b7)][_0x39ede2(0x202)](_0x1a4ff4)):b();}[_0xb81d4c(0x20b)](_0xcd0641){const _0x1546d8=_0xb81d4c;return this[_0x1546d8(0x25a)]['get'](_0xcd0641);}[_0xb81d4c(0x241)](_0x1484a4){const _0x37ada4=_0xb81d4c;this[_0x37ada4(0x1c2)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x1b7)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x25a)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x223)][_0x37ada4(0x1c8)]({'unitId':_0x1484a4});}['dispose'](){const _0x3d6541=_0xb81d4c;this[_0x3d6541(0x1c2)][_0x3d6541(0x208)](),this[_0x3d6541(0x1b7)][_0x3d6541(0x208)](),this[_0x3d6541(0x25a)][_0x3d6541(0x208)](),this['_change$'][_0x3d6541(0x240)](),super[_0x3d6541(0x21f)]();}['_preserveInvalid'](_0x2b188f,_0x2b41ea,_0x289765){const _0x4cbce1=_0xb81d4c;this[_0x4cbce1(0x1c2)][_0x4cbce1(0x207)](_0x2b188f),this[_0x4cbce1(0x1b7)][_0x4cbce1(0x232)](_0x2b188f,_0x541130[_0x4cbce1(0x211)](_0x2b41ea)),this[_0x4cbce1(0x25a)][_0x4cbce1(0x232)](_0x2b188f,_0x289765),this['_change$'][_0x4cbce1(0x1c8)]({'unitId':_0x2b188f});}};let ot=function(_0x1e79df){const _0x57ce53=_0xb81d4c;return _0x1e79df[_0x57ce53(0x20c)]='empty',_0x1e79df[_0x57ce53(0x22c)]='pending',_0x1e79df[_0x57ce53(0x165)]=_0x57ce53(0x225),_0x1e79df['ERROR']=_0x57ce53(0x17c),_0x1e79df;}({});function M(_0x483d95,_0x11c4c2){return function(_0x10bef2,_0x5b66b9){_0x11c4c2(_0x10bef2,_0x5b66b9,_0x483d95);};}function N(_0x1b1c2d,_0x5c1815,_0x227afb,_0x3d816b){const _0x53728d=_0xb81d4c;var _0x3ed342=arguments[_0x53728d(0x1f2)],_0x11b751=_0x3ed342<0x3?_0x5c1815:_0x3d816b===null?_0x3d816b=Object[_0x53728d(0x1cf)](_0x5c1815,_0x227afb):_0x3d816b,_0x1fd928;if(typeof Reflect==_0x53728d(0x234)&&typeof Reflect['decorate']==_0x53728d(0x1f9))_0x11b751=Reflect['decorate'](_0x1b1c2d,_0x5c1815,_0x227afb,_0x3d816b);else{for(var _0xbe674d=_0x1b1c2d[_0x53728d(0x1f2)]-0x1;_0xbe674d>=0x0;_0xbe674d--)(_0x1fd928=_0x1b1c2d[_0xbe674d])&&(_0x11b751=(_0x3ed342<0x3?_0x1fd928(_0x11b751):_0x3ed342>0x3?_0x1fd928(_0x5c1815,_0x227afb,_0x11b751):_0x1fd928(_0x5c1815,_0x227afb))||_0x11b751);}return _0x3ed342>0x3&&_0x11b751&&Object[_0x53728d(0x23a)](_0x5c1815,_0x227afb,_0x11b751),_0x11b751;}let P=class extends _0xf99196{constructor(_0x53a403,_0x3c79e3,_0x26bf7f){const _0x5e24ef=_0xb81d4c;super(),this[_0x5e24ef(0x1b1)]=_0x53a403,this[_0x5e24ef(0x1e6)]=_0x3c79e3,this[_0x5e24ef(0x191)]=_0x26bf7f,A(this,_0x5e24ef(0x228),new Map()),A(this,_0x5e24ef(0x1e0),new Map()),A(this,_0x5e24ef(0x239),new _0x45c46f()),A(this,'presentationChanged$',this[_0x5e24ef(0x239)]['asObservable']()),this[_0x5e24ef(0x16e)](this[_0x5e24ef(0x1e6)][_0x5e24ef(0x174)][_0x5e24ef(0x204)](_0x4ebe76=>{const _0x508896=_0x5e24ef;for(let _0x278a36 of Object['values'](_0x4ebe76))for(let _0x558980 of Object[_0x508896(0x214)](_0x278a36))_0x558980[_0x508896(0x171)](_0x5479eb=>this['_updateFormulaResult'](_0x5479eb));}));}['syncUnit'](_0x45a940){const _0x533696=_0xb81d4c;var _0x54cab7;let _0x349a33=_0x45a940[_0x533696(0x22a)](),_0x19f1f3=((_0x54cab7=_0x45a940[_0x533696(0x1e5)]()['body'])==null||(_0x54cab7=_0x54cab7[_0x533696(0x1c4)])==null?void 0x0:_0x54cab7['filter'](w))??[],_0x310f8c=this[_0x533696(0x1b1)]['getFormulas'](_0x349a33),_0x10f5b6=new Set();for(let _0xa85a8f of _0x19f1f3){let _0x14648a=_0x310f8c[_0xa85a8f[_0x533696(0x1dd)]];_0x14648a&&(_0x10f5b6['add'](F(_0x349a33,_0xa85a8f[_0x533696(0x1dd)])),this[_0x533696(0x195)]({'unitId':_0x349a33,'rangeId':_0xa85a8f[_0x533696(0x1dd)]},_0x14648a));}for(let _0x3ed150 of Array['from'](this['_registrations']['values']()))_0x3ed150[_0x533696(0x1a1)]===_0x349a33&&!_0x10f5b6[_0x533696(0x22f)](F(_0x3ed150[_0x533696(0x1a1)],_0x3ed150[_0x533696(0x1dd)]))&&this[_0x533696(0x1f7)](_0x3ed150);}[_0xb81d4c(0x195)](_0x221098,_0x442d54){const _0x3e8559=_0xb81d4c;let _0x1b5499=F(_0x221098[_0x3e8559(0x1a1)],_0x221098['rangeId']),_0x4d9aa1=this[_0x3e8559(0x228)][_0x3e8559(0x202)](_0x1b5499),_0x35b757=this[_0x3e8559(0x191)][_0x3e8559(0x258)](_0x221098[_0x3e8559(0x1a1)]);if(_0x4d9aa1&&_0x4d9aa1[_0x3e8559(0x1c1)][_0x3e8559(0x1f0)]===_0x442d54[_0x3e8559(0x1f0)]&&_0x4d9aa1['referenceRevision']===_0x35b757){_0x4d9aa1['config']=_0x442d54;let _0x5f0606=_0x4d9aa1[_0x3e8559(0x184)]?this[_0x3e8559(0x1e6)]['getFormulaValueSync'](_0x4d9aa1[_0x3e8559(0x1a1)],_0x4d9aa1['unitId'],_0x4d9aa1[_0x3e8559(0x184)])??void 0x0:void 0x0;_0x4d9aa1['liveResult']=_0x5f0606,this[_0x3e8559(0x1f6)](_0x1b5499,st(_0x442d54,_0x5f0606));return;}_0x4d9aa1!=null&&_0x4d9aa1['formulaId']&&this['_deleteRegistration'](_0x4d9aa1);let _0x212fb6={..._0x221098,'config':_0x442d54,'referenceRevision':_0x35b757,'presentation':st(_0x442d54,void 0x0)};if(this[_0x3e8559(0x228)][_0x3e8559(0x232)](_0x1b5499,_0x212fb6),!_0x442d54[_0x3e8559(0x1f0)][_0x3e8559(0x24d)]())return;let _0x312f01=this['_registrationService'][_0x3e8559(0x243)](_0x221098[_0x3e8559(0x1a1)],_0x221098[_0x3e8559(0x1a1)],_0x442d54[_0x3e8559(0x1f0)],void 0x0,{'rangeId':_0x221098[_0x3e8559(0x1dd)]},_0x5593a7[_0x3e8559(0x217)],_0x221098[_0x3e8559(0x1dd)]);_0x212fb6[_0x3e8559(0x184)]=_0x312f01,this[_0x3e8559(0x1e0)][_0x3e8559(0x232)](_0x312f01,_0x1b5499);}[_0xb81d4c(0x1f7)](_0x18c02d){const _0x4129de=_0xb81d4c;let _0x47e2af=F(_0x18c02d[_0x4129de(0x1a1)],_0x18c02d[_0x4129de(0x1dd)]),_0x4792c2=this[_0x4129de(0x228)][_0x4129de(0x202)](_0x47e2af);_0x4792c2&&(this[_0x4129de(0x1ff)](_0x4792c2),this[_0x4129de(0x228)][_0x4129de(0x207)](_0x47e2af));}[_0xb81d4c(0x16c)](_0x488548){const _0x406cf8=_0xb81d4c;for(let _0x5dd8ed of Array[_0x406cf8(0x1a7)](this[_0x406cf8(0x228)][_0x406cf8(0x214)]()))_0x5dd8ed[_0x406cf8(0x1a1)]===_0x488548&&this['unregister'](_0x5dd8ed);}[_0xb81d4c(0x213)](_0x570e32){const _0x4b000d=_0xb81d4c;var _0x33ee7d;return(_0x33ee7d=this[_0x4b000d(0x228)][_0x4b000d(0x202)](F(_0x570e32[_0x4b000d(0x1a1)],_0x570e32[_0x4b000d(0x1dd)])))==null?void 0x0:_0x33ee7d[_0x4b000d(0x23c)];}[_0xb81d4c(0x227)](_0x44078b){const _0x21e32f=_0xb81d4c;let _0x33639f=this[_0x21e32f(0x228)]['get'](F(_0x44078b[_0x21e32f(0x1a1)],_0x44078b['rangeId']));return _0x33639f?I(_0x33639f):void 0x0;}['getRegisteredFormulas'](){const _0x573795=_0xb81d4c;return Array['from'](this[_0x573795(0x228)][_0x573795(0x214)](),_0x406a3e=>({'identity':{'unitId':_0x406a3e['unitId'],'rangeId':_0x406a3e['rangeId']},'config':_0x406a3e[_0x573795(0x1c1)],'referenceRevision':_0x406a3e[_0x573795(0x1a0)],..._0x406a3e[_0x573795(0x24a)]?{'liveResult':_0x406a3e['liveResult']}:null}));}[_0xb81d4c(0x21f)](){const _0x1b2b09=_0xb81d4c;for(let _0x352099 of this['_registrations']['values']())this['_deleteRegistration'](_0x352099);this[_0x1b2b09(0x228)]['clear'](),this[_0x1b2b09(0x1e0)][_0x1b2b09(0x208)](),this[_0x1b2b09(0x239)]['complete'](),super[_0x1b2b09(0x21f)]();}[_0xb81d4c(0x242)](_0x665f40){const _0x147fb7=_0xb81d4c;let _0x56db0c=this[_0x147fb7(0x1e0)][_0x147fb7(0x202)](_0x665f40[_0x147fb7(0x184)]),_0x412b97=_0x56db0c?this[_0x147fb7(0x228)][_0x147fb7(0x202)](_0x56db0c):void 0x0;_0x56db0c&&_0x412b97&&(_0x412b97[_0x147fb7(0x24a)]=_0x665f40,this[_0x147fb7(0x1f6)](_0x56db0c,st(_0x412b97[_0x147fb7(0x1c1)],_0x665f40)));}['_setPresentation'](_0x26cc11,_0x385169){const _0x270d6d=_0xb81d4c;var _0x23bfd0,_0x129b0b;let _0x598434=this[_0x270d6d(0x228)][_0x270d6d(0x202)](_0x26cc11);if(!_0x598434||ct(_0x598434[_0x270d6d(0x23c)],_0x385169))return;let _0x378708=_0x598434[_0x270d6d(0x23c)],_0x477f7a=I(_0x598434);_0x598434[_0x270d6d(0x23c)]=_0x385169,this[_0x270d6d(0x239)][_0x270d6d(0x1c8)]({'unitId':_0x598434[_0x270d6d(0x1a1)],'rangeId':_0x598434[_0x270d6d(0x1dd)],'presentation':_0x385169,'previousPresentation':_0x378708,'result':I(_0x598434),'previousResult':{..._0x477f7a,..._0x378708,'value':(_0x23bfd0=_0x378708[_0x270d6d(0x20a)])==null?void 0x0:_0x23bfd0['v'],'valueType':((_0x129b0b=_0x378708['cell'])==null?void 0x0:_0x129b0b['t'])??void 0x0}});}[_0xb81d4c(0x1ff)](_0x3c4204){const _0x2e9203=_0xb81d4c;_0x3c4204[_0x2e9203(0x184)]&&(this['_registrationService'][_0x2e9203(0x212)](_0x3c4204[_0x2e9203(0x1a1)],_0x3c4204[_0x2e9203(0x1a1)],[_0x3c4204[_0x2e9203(0x184)]]),this['_formulaKeys'][_0x2e9203(0x207)](_0x3c4204[_0x2e9203(0x184)]));}};P=N([M(0x0,_0x3abf00(j)),M(0x1,_0x3abf00(_0x3b74c8)),M(0x2,_0x3abf00(_0x2be22c))],P);function F(_0x1a5cae,_0x7d250){return _0x1a5cae+'\x00'+_0x7d250;}function st(_0x31402a,_0xcfc749){const _0x3fbbf0=_0xb81d4c;return _0x157ca0({'numberFormat':_0x31402a[_0x3fbbf0(0x19e)],'lastValue':_0x31402a[_0x3fbbf0(0x1ed)],'result':_0xcfc749});}function I(_0x31b3a2){const _0x271cf5=_0xb81d4c;var _0x57ebaf,_0x508093,_0x5674b9;let _0x126091=_0x31b3a2[_0x271cf5(0x23c)],_0x2de832=_0x31b3a2[_0x271cf5(0x1c1)][_0x271cf5(0x1f0)][_0x271cf5(0x24d)]()?_0x126091['stale']||_0x126091[_0x271cf5(0x20a)]==null?_0x271cf5(0x1a5):((_0x57ebaf=_0x31b3a2[_0x271cf5(0x24a)])==null?void 0x0:_0x57ebaf[_0x271cf5(0x16f)])===_0xd61d8b['ERROR']?'error':_0x271cf5(0x225):_0x271cf5(0x25b);return{..._0x126091,'status':_0x2de832,'value':(_0x508093=_0x126091[_0x271cf5(0x20a)])==null?void 0x0:_0x508093['v'],'valueType':((_0x5674b9=_0x126091[_0x271cf5(0x20a)])==null?void 0x0:_0x5674b9['t'])??void 0x0};}function ct(_0x2bb7a7,_0x455e94){const _0x116f58=_0xb81d4c;var _0x1cd48d,_0x3112c5,_0x1ad937,_0x16f10b;return _0x2bb7a7[_0x116f58(0x24e)]===_0x455e94[_0x116f58(0x24e)]&&_0x2bb7a7[_0x116f58(0x22b)]===_0x455e94[_0x116f58(0x22b)]&&_0x2bb7a7['pattern']===_0x455e94['pattern']&&_0x2bb7a7[_0x116f58(0x193)]===_0x455e94[_0x116f58(0x193)]&&_0x2bb7a7[_0x116f58(0x252)]===_0x455e94['stale']&&((_0x1cd48d=_0x2bb7a7[_0x116f58(0x20a)])==null?void 0x0:_0x1cd48d['t'])===((_0x3112c5=_0x455e94[_0x116f58(0x20a)])==null?void 0x0:_0x3112c5['t'])&&Object['is']((_0x1ad937=_0x2bb7a7[_0x116f58(0x20a)])==null?void 0x0:_0x1ad937['v'],(_0x16f10b=_0x455e94[_0x116f58(0x20a)])==null?void 0x0:_0x16f10b['v']);}const lt={'id':_0xb81d4c(0x17a),'type':_0x599208[_0xb81d4c(0x255)],'handler':(_0x2d7335,_0x4f8636)=>!(_0x4f8636!=null&&_0x4f8636['unitId'])||!_0x4f8636[_0xb81d4c(0x1dd)]||!_0x4f8636[_0xb81d4c(0x1c1)]?!0x1:_0x2d7335[_0xb81d4c(0x202)](j)['setFormula'](_0x4f8636['unitId'],_0x4f8636[_0xb81d4c(0x1dd)],_0x4f8636['config'])},ut={'id':_0xb81d4c(0x1f8),'type':_0x599208['MUTATION'],'handler':(_0x153242,_0x5c3073)=>!(_0x5c3073!=null&&_0x5c3073[_0xb81d4c(0x1a1)])||!_0x5c3073['rangeId']?!0x1:_0x153242[_0xb81d4c(0x202)](j)[_0xb81d4c(0x1d0)](_0x5c3073[_0xb81d4c(0x1a1)],_0x5c3073[_0xb81d4c(0x1dd)])},L={'id':_0xb81d4c(0x1cd),'type':_0x599208[_0xb81d4c(0x255)],'handler':(_0x3b672b,_0x1db447)=>!(_0x1db447!=null&&_0x1db447[_0xb81d4c(0x1a1)])||!_0x1db447[_0xb81d4c(0x1e3)]?!0x1:_0x3b672b['get'](j)[_0xb81d4c(0x1b2)](_0x1db447[_0xb81d4c(0x1a1)],_0x1db447['resource'])},R={'id':_0xb81d4c(0x1d1),'type':_0x599208['MUTATION'],'handler':(_0x17f836,_0x43ebe7)=>{const _0x3fa37c=_0xb81d4c;if(!(_0x43ebe7!=null&&_0x43ebe7['unitId'])||!_0x43ebe7['updates'][_0x3fa37c(0x1f2)])return!0x1;let _0x5bc5a1=_0x17f836[_0x3fa37c(0x202)](j),_0x3f0f0a=_0x17f836[_0x3fa37c(0x202)](_0x2be22c),_0x3978f9=_0x5bc5a1[_0x3fa37c(0x1db)](_0x43ebe7[_0x3fa37c(0x1a1)]);if(!_0x3978f9)return!0x1;let _0x3bdff3=_0x541130[_0x3fa37c(0x211)](_0x3978f9),_0x3d7541=!0x1;for(let _0x446995 of _0x43ebe7['updates']){var _0x587c3f,_0x2ec82a,_0x4c477a,_0x38e441;let _0x110b6a=_0x3bdff3[_0x3fa37c(0x18d)][_0x446995[_0x3fa37c(0x1dd)]];_0x110b6a&&_0x110b6a[_0x3fa37c(0x1f0)]===_0x446995[_0x3fa37c(0x248)]&&((_0x587c3f=_0x110b6a[_0x3fa37c(0x19e)])==null?void 0x0:_0x587c3f[_0x3fa37c(0x168)])===_0x446995[_0x3fa37c(0x20f)]&&_0x3f0f0a[_0x3fa37c(0x258)](_0x43ebe7[_0x3fa37c(0x1a1)])===_0x446995[_0x3fa37c(0x229)]&&(((_0x2ec82a=_0x110b6a[_0x3fa37c(0x1ed)])==null?void 0x0:_0x2ec82a['v'])!==_0x446995['lastValue']['v']||((_0x4c477a=_0x110b6a[_0x3fa37c(0x1ed)])==null?void 0x0:_0x4c477a['t'])!==_0x446995[_0x3fa37c(0x1ed)]['t']||((_0x38e441=_0x110b6a['lastValue'])==null?void 0x0:_0x38e441[_0x3fa37c(0x168)])!==_0x446995[_0x3fa37c(0x1ed)][_0x3fa37c(0x168)])&&(_0x110b6a[_0x3fa37c(0x1ed)]=_0x541130[_0x3fa37c(0x211)](_0x446995['lastValue']),_0x3d7541=!0x0);}return!_0x3d7541||_0x5bc5a1[_0x3fa37c(0x1b2)](_0x43ebe7[_0x3fa37c(0x1a1)],_0x3bdff3);}},z={'id':_0xb81d4c(0x1af),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x1094f5,_0x5b3ba8)=>{const _0x3951eb=_0xb81d4c;if(!(_0x5b3ba8!=null&&_0x5b3ba8[_0x3951eb(0x1f0)][_0x3951eb(0x24d)]()))return!0x1;let _0x9220f6=K(_0x1094f5,_0x5b3ba8[_0x3951eb(0x1a1)],'');if(!_0x9220f6)return!0x1;let _0x46f302=ft(_0x5b3ba8[_0x3951eb(0x24c)],_0x9220f6[_0x3951eb(0x1c7)],dt(_0x1094f5,_0x9220f6[_0x3951eb(0x1a1)]));if(!_0x46f302)return!0x1;let _0x433bd6=pt(_0x1094f5,_0x9220f6[_0x3951eb(0x1a1)],_0x5b3ba8[_0x3951eb(0x1f0)],_0x5b3ba8[_0x3951eb(0x176)]??[]);if(!_0x433bd6)return!0x1;let _0xd5f0f=mt(_0x9220f6[_0x3951eb(0x1c7)],_0x9220f6[_0x3951eb(0x230)],_0x9220f6[_0x3951eb(0x1a1)]),_0x22f9bb=ht({'documentData':_0x9220f6[_0x3951eb(0x1ba)],'resource':_0x9220f6[_0x3951eb(0x1e3)],'rangeId':_0xd5f0f,'config':{'formula':_0x5b3ba8['formula'],..._0x5b3ba8[_0x3951eb(0x19e)]?{'numberFormat':_0x5b3ba8[_0x3951eb(0x19e)]}:null},'startOffset':_0x46f302[_0x3951eb(0x1b9)],'endOffset':_0x46f302['endOffset']});if(!_0x22f9bb)return!0x1;let _0x54df7f=_0x5f5499(_0x1094f5,_0x9220f6['unitId'],_0x433bd6);return!_0x54df7f||!q({'accessor':_0x1094f5,'document':_0x9220f6[_0x3951eb(0x1d6)],'unitId':_0x9220f6['unitId'],'trigger':z['id'],'rangeId':_0xd5f0f,'previousResource':_0x9220f6[_0x3951eb(0x1e3)],'nextResource':_0x22f9bb[_0x3951eb(0x1ec)],'previousDocumentData':_0x9220f6['documentData'],'nextDocumentData':_0x22f9bb[_0x3951eb(0x200)],'cursorOffset':_0x22f9bb[_0x3951eb(0x173)],'externalMutations':_0x54df7f})?!0x1:{'rangeId':_0xd5f0f,'startOffset':_0x22f9bb['cursorOffset']-0x1,'endOffset':_0x22f9bb[_0x3951eb(0x173)]};}},B={'id':'docs-formula.command.update','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x6de73,_0x41ef41)=>{const _0x44f417=_0xb81d4c;if(!(_0x41ef41!=null&&_0x41ef41[_0x44f417(0x1dd)])||!_0x41ef41[_0x44f417(0x1f0)][_0x44f417(0x24d)]())return!0x1;let _0xab7eb=K(_0x6de73,_0x41ef41[_0x44f417(0x1a1)],''),_0x34569a=_0xab7eb==null?void 0x0:_0xab7eb['model']['getFormula'](_0xab7eb[_0x44f417(0x1a1)],_0x41ef41[_0x44f417(0x1dd)]),_0x55c09f=_0xab7eb?T(_0xab7eb[_0x44f417(0x1ba)][_0x44f417(0x1c7)],_0x41ef41[_0x44f417(0x1dd)]):void 0x0;if(!_0xab7eb||!_0x34569a||!_0x55c09f)return!0x1;let _0x2ceccc=pt(_0x6de73,_0xab7eb[_0x44f417(0x1a1)],_0x41ef41['formula'],_0x41ef41['externalReferences']??[]);if(!_0x2ceccc)return!0x1;let _0x2d8d91=_0x5f5499(_0x6de73,_0xab7eb[_0x44f417(0x1a1)],_0x2ceccc);if(!_0x2d8d91)return!0x1;let _0x477b8d=St(_0xab7eb[_0x44f417(0x1e3)]);return _0x477b8d[_0x44f417(0x18d)][_0x41ef41[_0x44f417(0x1dd)]]={'formula':_0x41ef41['formula'],..._0x41ef41[_0x44f417(0x19e)]?{'numberFormat':_0x41ef41[_0x44f417(0x19e)]}:_0x34569a['numberFormat']?{'numberFormat':_0x34569a['numberFormat']}:null},q({'accessor':_0x6de73,'document':_0xab7eb['document'],'unitId':_0xab7eb[_0x44f417(0x1a1)],'trigger':B['id'],'rangeId':_0x41ef41['rangeId'],'previousResource':_0xab7eb[_0x44f417(0x1e3)],'nextResource':_0x477b8d,'cursorOffset':_0x55c09f[_0x44f417(0x218)]+0x1,'externalMutations':_0x2d8d91});}},V={'id':'docs-formula.command.set-number-format','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x220b6e,_0x1e5374)=>{const _0x4016bf=_0xb81d4c;if(!(_0x1e5374!=null&&_0x1e5374[_0x4016bf(0x1dd)]))return!0x1;let _0x2bcae1=K(_0x220b6e,_0x1e5374[_0x4016bf(0x1a1)],''),_0x428977=_0x2bcae1==null?void 0x0:_0x2bcae1[_0x4016bf(0x230)][_0x4016bf(0x1d9)](_0x2bcae1[_0x4016bf(0x1a1)],_0x1e5374[_0x4016bf(0x1dd)]),_0x3a4079=_0x2bcae1?T(_0x2bcae1[_0x4016bf(0x1ba)][_0x4016bf(0x1c7)],_0x1e5374[_0x4016bf(0x1dd)]):void 0x0;if(!_0x2bcae1||!_0x428977||!_0x3a4079)return!0x1;let _0x143eb7=St(_0x2bcae1[_0x4016bf(0x1e3)]);return _0x143eb7[_0x4016bf(0x18d)][_0x1e5374[_0x4016bf(0x1dd)]]={..._0x428977,..._0x1e5374[_0x4016bf(0x19e)]?{'numberFormat':_0x1e5374[_0x4016bf(0x19e)]}:null},_0x1e5374[_0x4016bf(0x19e)]||delete _0x143eb7[_0x4016bf(0x18d)][_0x1e5374[_0x4016bf(0x1dd)]][_0x4016bf(0x19e)],q({'accessor':_0x220b6e,'document':_0x2bcae1[_0x4016bf(0x1d6)],'unitId':_0x2bcae1[_0x4016bf(0x1a1)],'trigger':V['id'],'rangeId':_0x1e5374[_0x4016bf(0x1dd)],'previousResource':_0x2bcae1[_0x4016bf(0x1e3)],'nextResource':_0x143eb7,'cursorOffset':_0x3a4079[_0x4016bf(0x218)]+0x1,'externalMutations':{}});}},H={'id':_0xb81d4c(0x1d2),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x29ac9a,_0x589338)=>G(_0x29ac9a,_0x589338,'',H['id'])},U={'id':'docs-formula.command.replace-with-text','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x3d550d,_0x3f60a5)=>G(_0x3d550d,_0x3f60a5,(_0x3f60a5==null?void 0x0:_0x3f60a5[_0xb81d4c(0x24e)])??'',U['id'])},W={'id':_0xb81d4c(0x1f1),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x4a7557,_0x599aba)=>{const _0x58e830=_0xb81d4c;if(!(_0x599aba!=null&&_0x599aba[_0x58e830(0x1dd)]))return!0x1;let _0x473bc8=K(_0x4a7557,_0x599aba[_0x58e830(0x1a1)],'');if(!_0x473bc8)return!0x1;let _0x32bf70=_0x4a7557[_0x58e830(0x202)](P)[_0x58e830(0x227)]({'unitId':_0x473bc8['unitId'],'rangeId':_0x599aba[_0x58e830(0x1dd)]});return _0x32bf70?G(_0x4a7557,_0x599aba,_0x32bf70[_0x58e830(0x24e)],W['id']):!0x1;}};function G(_0x43e2ec,_0x54b02d,_0x527baa,_0x1b8b90){const _0x50eb7b=_0xb81d4c;if(!(_0x54b02d!=null&&_0x54b02d[_0x50eb7b(0x1dd)]))return!0x1;let _0x4ee9b3=K(_0x43e2ec,_0x54b02d[_0x50eb7b(0x1a1)],'');if(!_0x4ee9b3)return!0x1;let _0x231770=ze({'documentData':_0x4ee9b3[_0x50eb7b(0x1ba)],'resource':_0x4ee9b3[_0x50eb7b(0x1e3)],'rangeId':_0x54b02d[_0x50eb7b(0x1dd)],'text':_0x527baa});return _0x231770?q({'accessor':_0x43e2ec,'document':_0x4ee9b3[_0x50eb7b(0x1d6)],'unitId':_0x4ee9b3[_0x50eb7b(0x1a1)],'trigger':_0x1b8b90,'rangeId':_0x54b02d[_0x50eb7b(0x1dd)],'previousResource':_0x4ee9b3['resource'],'nextResource':_0x231770[_0x50eb7b(0x1ec)],'previousDocumentData':_0x4ee9b3[_0x50eb7b(0x1ba)],'nextDocumentData':_0x231770[_0x50eb7b(0x200)],'cursorOffset':_0x231770[_0x50eb7b(0x173)],'externalMutations':{}}):!0x1;}function K(_0x32e53e,_0xb502f3,_0x1388b6){const _0x3a0124=_0xb81d4c;if(_0x1388b6)return null;let _0x18ac5f=_0x32e53e[_0x3a0124(0x202)](_0x1616da),_0x2c75ea=(_0xb502f3?_0x18ac5f[_0x3a0124(0x17d)](_0xb502f3,_0x19d9b2[_0x3a0124(0x1e7)]):_0x18ac5f['getCurrentUnitOfType'](_0x19d9b2['UNIVER_DOC']))??null;if(!_0x2c75ea)return null;let _0x33de2a=_0x2c75ea[_0x3a0124(0x1e5)](),_0x32978c=_0x33de2a['body'];if(_0x33de2a[_0x3a0124(0x201)]||!_0x32978c)return null;let _0x2acddf=_0x32e53e[_0x3a0124(0x202)](j);return _0x2acddf[_0x3a0124(0x20b)](_0x2c75ea[_0x3a0124(0x22a)]())?null:{'document':_0x2c75ea,'body':_0x32978c,'documentData':_0x33de2a,'model':_0x2acddf,'resource':_0x2acddf[_0x3a0124(0x1db)](_0x2c75ea[_0x3a0124(0x22a)]())??b(),'unitId':_0x2c75ea[_0x3a0124(0x22a)]()};}function dt(_0x4bb60a,_0x8ebef4){const _0x2f5d8b=_0xb81d4c;var _0x26dbe2;return(_0x26dbe2=_0x4bb60a[_0x2f5d8b(0x202)](_0x3e1e9b)[_0x2f5d8b(0x179)]({'subUnitId':_0x8ebef4,'unitId':_0x8ebef4}))==null?void 0x0:_0x26dbe2[0x0];}function ft(_0x2b9bff,_0x20e555,_0x333c11){const _0x2ef887=_0xb81d4c;if((_0x2b9bff==null?void 0x0:_0x2b9bff[_0x2ef887(0x178)])===_0x2ef887(0x1fb)){var _0x4d2b6c;let _0x4feb8d=((_0x4d2b6c=_0x20e555[_0x2ef887(0x1de)])==null?void 0x0:_0x4d2b6c['filter'](_0x273f5b=>_0x273f5b[_0x2ef887(0x1b5)]===_0x2b9bff[_0x2ef887(0x1b5)]))??[];if(_0x4feb8d['length']!==0x1)return null;let _0x59505c=_0x4feb8d[0x0],_0x1f63f8=_0x13c716(_0x20e555,_0x59505c),_0x509174=_0x59505c['startIndex']-_0x1f63f8,_0xbdf274=_0x2b9bff[_0x2ef887(0x17b)]===_0x2ef887(0x205)?_0x509174:_0x2b9bff[_0x2ef887(0x17b)];if(!Number[_0x2ef887(0x197)](_0xbdf274)||_0xbdf274<0x0||_0xbdf274>_0x509174)return null;let _0x2e5e44=_0x1f63f8+_0xbdf274;return{'startOffset':_0x2e5e44,'endOffset':_0x2e5e44};}if((_0x2b9bff==null?void 0x0:_0x2b9bff[_0x2ef887(0x178)])==='range')return!Number[_0x2ef887(0x197)](_0x2b9bff[_0x2ef887(0x1b9)])||!Number[_0x2ef887(0x197)](_0x2b9bff[_0x2ef887(0x253)])?null:{'startOffset':Math[_0x2ef887(0x1aa)](_0x2b9bff[_0x2ef887(0x1b9)],_0x2b9bff[_0x2ef887(0x253)]),'endOffset':Math['max'](_0x2b9bff[_0x2ef887(0x1b9)],_0x2b9bff['endOffset'])};let _0x35133e=(_0x2b9bff==null?void 0x0:_0x2b9bff['type'])===_0x2ef887(0x1e4)?_0x2b9bff[_0x2ef887(0x1e4)]:_0x333c11;return!_0x35133e||_0x35133e[_0x2ef887(0x256)]?null:{'startOffset':Math[_0x2ef887(0x1aa)](_0x35133e[_0x2ef887(0x1b9)],_0x35133e['endOffset']),'endOffset':Math['max'](_0x35133e[_0x2ef887(0x1b9)],_0x35133e[_0x2ef887(0x253)])};}function pt(_0xaa7eb1,_0x433895,_0x3774ff,_0x5e0386){const _0x2d59df=_0xb81d4c;let _0x49bc2e=_0xaa7eb1['get'](_0x276a14),_0x233cf7=_0x3774ff[_0x2d59df(0x246)]('=')?_0x3774ff['slice'](0x1):_0x3774ff,_0x529c02=_0x49bc2e[_0x2d59df(0x1da)](_0x233cf7);if(!_0x529c02)return null;let _0xcba271=_0xaa7eb1[_0x2d59df(0x202)](_0x2be22c),_0xb07ebf=_0x1fc472({'qualifiers':_0x1bd1bb(_0x529c02),'explicitReferences':_0x5e0386??[],'resolveBinding':_0x19f523=>_0xcba271[_0x2d59df(0x16d)](_0x433895,_0x19f523)});return _0xb07ebf[_0x2d59df(0x16f)]===_0x2d59df(0x19b)?_0xb07ebf[_0x2d59df(0x190)]:null;}function mt(_0x20eb7f,_0x4c0947,_0x42ad43){const _0x20fd64=_0xb81d4c;var _0x7ad084;let _0x138a90=_0x5d3298(0x6);for(;_0x20eb7f!=null&&(_0x7ad084=_0x20eb7f['customRanges'])!=null&&_0x7ad084['some'](_0x5671b4=>_0x5671b4[_0x20fd64(0x1dd)]===_0x138a90)||_0x4c0947[_0x20fd64(0x1d9)](_0x42ad43,_0x138a90);)_0x138a90=_0x5d3298(0x6);return _0x138a90;}function ht(_0x31bc57){try{return Le(_0x31bc57);}catch(_0x4d477c){if(_0x4d477c instanceof C)return null;throw _0x4d477c;}}function gt(_0xaa4a08){const _0x180734=_0xb81d4c;let _0x227f62=_0xaa4a08[_0x180734(0x16a)]&&_0xaa4a08[_0x180734(0x200)]?vt(_0xaa4a08[_0x180734(0x1d6)],_0xaa4a08[_0x180734(0x1a1)],_0xaa4a08['previousDocumentData'],_0xaa4a08['nextDocumentData'],_0xaa4a08['cursorOffset'],_0xaa4a08[_0x180734(0x22d)]):null;return _0xaa4a08[_0x180734(0x16a)]&&_0xaa4a08[_0x180734(0x200)]&&!_0x227f62?null:{'documentRedo':_0x227f62,'resourceRedo':{'id':L['id'],'params':{'unitId':_0xaa4a08['unitId'],'resource':_0xaa4a08['nextResource']}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0xaa4a08['unitId'],'resource':_0xaa4a08[_0x180734(0x210)]}}};}function _t(_0x2125ee,_0xeb1641,_0x2c64d2,_0x4d0128){const _0x245032=_0xb81d4c;_0x4d0128['pushUndoRedo']({'id':_0x2125ee[_0x245032(0x22d)]+':'+_0x2125ee['rangeId'],'unitID':_0x2125ee['unitId'],'redoMutations':[..._0x2125ee['externalMutations'][_0x245032(0x1b3)]?[_0x2125ee[_0x245032(0x1dc)][_0x245032(0x1b3)]]:[],..._0xeb1641[_0x245032(0x21e)]?[_0xeb1641['documentRedo']]:[],_0xeb1641[_0x245032(0x1ea)]],'undoMutations':[_0xeb1641[_0x245032(0x235)],..._0x2c64d2?[_0x2c64d2]:[],..._0x2125ee[_0x245032(0x1dc)]['undoMutation']?[_0x2125ee[_0x245032(0x1dc)]['undoMutation']]:[]]});}function q(_0x41ea6f){const _0x5bcade=_0xb81d4c;let _0x437d28=_0x41ea6f[_0x5bcade(0x1a3)][_0x5bcade(0x202)](_0x41ce44),_0x213c04=_0x41ea6f['accessor'][_0x5bcade(0x202)](_0x5273cf),_0x12c581=_0x41ea6f[_0x5bcade(0x1a3)]['get'](_0x3e1e9b),_0xeffec4=gt(_0x41ea6f);if(!_0xeffec4)return!0x1;let _0x43c927=!0x1,_0x217c2a=null,_0x25b60d=!0x1;try{if(_0x41ea6f[_0x5bcade(0x1dc)][_0x5bcade(0x1b3)]){if(!_0x437d28['syncExecuteCommand'](_0x41ea6f['externalMutations'][_0x5bcade(0x1b3)]['id'],_0x41ea6f[_0x5bcade(0x1dc)][_0x5bcade(0x1b3)][_0x5bcade(0x1fe)]))return!0x1;_0x43c927=!0x0;}if(_0xeffec4['documentRedo']){let _0x2b6d28=_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x21e)]['id'],_0xeffec4[_0x5bcade(0x21e)][_0x5bcade(0x1fe)]);if(!_0x2b6d28)return J(_0x437d28,_0x41ea6f[_0x5bcade(0x1dc)],_0x43c927),!0x1;_0x217c2a={'id':_0x3ff622['id'],'params':{..._0x2b6d28,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x1ea)]['id'],_0xeffec4[_0x5bcade(0x1ea)][_0x5bcade(0x1fe)]))return yt(_0x437d28,_0x217c2a),J(_0x437d28,_0x41ea6f['externalMutations'],_0x43c927),!0x1;_0x25b60d=!0x0,_t(_0x41ea6f,_0xeffec4,_0x217c2a,_0x213c04);}catch(_0x4c527c){throw _0x25b60d&&_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x235)]['id'],_0xeffec4[_0x5bcade(0x235)][_0x5bcade(0x1fe)]),yt(_0x437d28,_0x217c2a),J(_0x437d28,_0x41ea6f[_0x5bcade(0x1dc)],_0x43c927),_0x4c527c;}return _0x12c581[_0x5bcade(0x1f5)]([{'startOffset':_0x41ea6f[_0x5bcade(0x173)],'endOffset':_0x41ea6f['cursorOffset'],'segmentId':''}],{'unitId':_0x41ea6f[_0x5bcade(0x1a1)],'subUnitId':_0x41ea6f[_0x5bcade(0x1a1)]},!0x1,{[_0x507f67]:!0x0}),!0x0;}function vt(_0x4178dc,_0x595ebb,_0x2c72dd,_0x5e0dcb,_0x3026c5,_0x3aeb31){let _0x50468b=bt(_0x2c72dd,_0x5e0dcb,_0x197963(_0x4178dc,''));return _0x50468b?{'id':_0x3ff622['id'],'params':{'unitId':_0x595ebb,'actions':_0x50468b,'segmentId':'','textRanges':[{'startOffset':_0x3026c5,'endOffset':_0x3026c5,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x3aeb31}}:null;}function yt(_0x4c8cd5,_0x58cb31){const _0x3ba71a=_0xb81d4c;_0x58cb31&&_0x4c8cd5[_0x3ba71a(0x162)](_0x58cb31['id'],_0x58cb31[_0x3ba71a(0x1fe)]);}function J(_0x1e1c3e,_0x90ee72,_0x37cd79){const _0x424323=_0xb81d4c;_0x37cd79&&_0x90ee72['undoMutation']&&_0x1e1c3e[_0x424323(0x162)](_0x90ee72[_0x424323(0x224)]['id'],_0x90ee72[_0x424323(0x224)][_0x424323(0x1fe)]);}function bt(_0x52a999,_0x2f59b3,_0x120365){const _0x39924e=_0xb81d4c;let _0x2441bc=_0x52a999[_0x39924e(0x1c7)],_0x2db7f3=_0x2f59b3['body'],_0x4fa2cf=xt(_0x2441bc==null?void 0x0:_0x2441bc[_0x39924e(0x1cb)],_0x2db7f3==null?void 0x0:_0x2db7f3[_0x39924e(0x1cb)]);if(!_0x4fa2cf||!_0x2db7f3)return null;let _0xd58b1a=new _0x7ff3ce();return _0xd58b1a[_0x39924e(0x180)](_0x4fa2cf[_0x39924e(0x206)]),_0x4fa2cf[_0x39924e(0x177)]>0x0&&_0xd58b1a[_0x39924e(0x188)](_0x4fa2cf[_0x39924e(0x177)],_0x312eb6(_0x2db7f3,_0x4fa2cf[_0x39924e(0x206)],_0x4fa2cf[_0x39924e(0x206)]+_0x4fa2cf['insertLength'],!0x1)),_0x4fa2cf['deleteLength']>0x0&&_0xd58b1a[_0x39924e(0x207)](_0x4fa2cf['deleteLength']),_0x5b1be5[_0x39924e(0x1f3)]()[_0x39924e(0x1fd)](_0xd58b1a[_0x39924e(0x185)](),_0x120365);}function xt(_0xafd00e,_0x3c0d71){const _0x251ee8=_0xb81d4c;if(_0xafd00e==null||_0x3c0d71==null||_0xafd00e===_0x3c0d71)return null;let _0x8f1c1d=0x0;for(;_0x8f1c1d<_0xafd00e[_0x251ee8(0x1f2)]&&_0x8f1c1d<_0x3c0d71['length']&&_0xafd00e[_0x8f1c1d]===_0x3c0d71[_0x8f1c1d];)_0x8f1c1d+=0x1;let _0x5b59bb=_0xafd00e[_0x251ee8(0x1f2)],_0xf85c47=_0x3c0d71[_0x251ee8(0x1f2)];for(;_0x5b59bb>_0x8f1c1d&&_0xf85c47>_0x8f1c1d&&_0xafd00e[_0x5b59bb-0x1]===_0x3c0d71[_0xf85c47-0x1];)--_0x5b59bb,--_0xf85c47;return{'start':_0x8f1c1d,'deleteLength':_0x5b59bb-_0x8f1c1d,'insertLength':_0xf85c47-_0x8f1c1d};}function _0x43e1(_0x1d453b,_0x3f404c){_0x1d453b=_0x1d453b-0x161;const _0x3d4ac1=_0x3d4a();let _0x43e1c8=_0x3d4ac1[_0x1d453b];return _0x43e1c8;}function St(_0x1e5356){const _0xe85b52=_0xb81d4c;return{'formulas':Object['fromEntries'](Object[_0xe85b52(0x18e)](_0x1e5356[_0xe85b52(0x18d)])[_0xe85b52(0x259)](([_0x5785f3,_0x1368a8])=>[_0x5785f3,{..._0x1368a8,..._0x1368a8[_0xe85b52(0x19e)]?{'numberFormat':{..._0x1368a8[_0xe85b52(0x19e)]}}:null,..._0x1368a8[_0xe85b52(0x1ed)]?{'lastValue':{..._0x1368a8['lastValue']}}:null}]))};}let Y=class extends _0xf99196{constructor(_0x21f5ab,_0x3a53e4,_0x29fc29,_0x3ce3da){const _0x4ace72=_0xb81d4c;super(),this[_0x4ace72(0x166)]=_0x21f5ab,this['_commandService']=_0x3a53e4,this[_0x4ace72(0x1b1)]=_0x29fc29,this[_0x4ace72(0x1df)]=_0x3ce3da,A(this,'_pendingUnitIds',new Set()),A(this,_0x4ace72(0x1a2),!0x1),A(this,_0x4ace72(0x163),!0x1),this[_0x4ace72(0x166)][_0x4ace72(0x1ca)](_0x19d9b2[_0x4ace72(0x1e7)])[_0x4ace72(0x171)](_0x50f8e3=>this[_0x4ace72(0x1df)][_0x4ace72(0x182)](_0x50f8e3)),this[_0x4ace72(0x16e)](this[_0x4ace72(0x1b1)][_0x4ace72(0x1ac)][_0x4ace72(0x204)](({unitId:_0x4a9667})=>this[_0x4ace72(0x1ad)](_0x4a9667))),this[_0x4ace72(0x16e)](this[_0x4ace72(0x166)][_0x4ace72(0x24b)][_0x4ace72(0x204)](({unit:_0x82e290})=>{const _0x4b7ddd=_0x4ace72;_0x82e290[_0x4b7ddd(0x178)]===_0x19d9b2[_0x4b7ddd(0x1e7)]&&this[_0x4b7ddd(0x1e2)](_0x82e290[_0x4b7ddd(0x22a)]());})),this[_0x4ace72(0x16e)](this[_0x4ace72(0x166)][_0x4ace72(0x24f)][_0x4ace72(0x204)](_0x883489=>{const _0x4f143e=_0x4ace72;this[_0x4f143e(0x1df)]['unregisterUnit'](_0x883489[_0x4f143e(0x22a)]());})),this[_0x4ace72(0x16e)](this[_0x4ace72(0x23d)][_0x4ace72(0x231)](_0x98b949=>{const _0x35fc93=_0x4ace72;if(_0x98b949['id']===_0x3ff622['id']&&Ct(_0x98b949[_0x35fc93(0x1fe)])){let _0x374fcf=_0x98b949[_0x35fc93(0x1fe)];_0x374fcf[_0x35fc93(0x256)]||this[_0x35fc93(0x1ad)](_0x374fcf[_0x35fc93(0x1a1)]);}}));}[_0xb81d4c(0x21f)](){const _0x52d1b7=_0xb81d4c;this[_0x52d1b7(0x163)]=!0x0,super['dispose']();}[_0xb81d4c(0x1e2)](_0x5cff1f){const _0x10f508=_0xb81d4c;this['_pendingUnitIds'][_0x10f508(0x1d3)](_0x5cff1f),this[_0x10f508(0x1a2)]||(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0x54a297=_0x10f508;if(this['_syncScheduled']=!0x1,this[_0x54a297(0x163)])return;let _0x250e54=Array[_0x54a297(0x1a7)](this['_pendingUnitIds']);this['_pendingUnitIds'][_0x54a297(0x208)](),_0x250e54['forEach'](_0x45c2d0=>this['_syncUnit'](_0x45c2d0));}));}['_syncUnit'](_0x2682af){const _0x202a3f=_0xb81d4c;let _0x8514d7=this[_0x202a3f(0x166)]['getUnit'](_0x2682af,_0x19d9b2['UNIVER_DOC']);_0x8514d7&&this[_0x202a3f(0x1df)][_0x202a3f(0x182)](_0x8514d7);}};Y=N([M(0x0,_0x1616da),M(0x1,_0x41ce44),M(0x2,_0x3abf00(j)),M(0x3,_0x3abf00(P))],Y);function Ct(_0x13dd71){const _0x5e65a1=_0xb81d4c;return typeof _0x13dd71==_0x5e65a1(0x234)&&!!_0x13dd71&&'unitId'in _0x13dd71&&typeof _0x13dd71['unitId']==_0x5e65a1(0x1fc)&&(!(_0x5e65a1(0x256)in _0x13dd71)||_0x13dd71[_0x5e65a1(0x256)]===void 0x0||typeof _0x13dd71[_0x5e65a1(0x256)]==_0x5e65a1(0x1fc));}let X=class extends _0xf99196{constructor(_0x1e3aa9,_0x1685e1){const _0x108c41=_0xb81d4c;super(),this[_0x108c41(0x172)]=_0x1e3aa9,this[_0x108c41(0x254)]=_0x1685e1,this[_0x108c41(0x16e)](this[_0x108c41(0x172)][_0x108c41(0x236)]({'pluginName':y,'businesses':[_0x19d9b2['UNIVER_DOC']],'toJson':_0x42accb=>JSON[_0x108c41(0x1ab)](this['_docFormulaModel']['serialize'](_0x42accb)),'parseJson':_0x32ce26=>JSON[_0x108c41(0x1ae)](_0x32ce26),'onLoad':(_0x4eef6,_0x40d82b)=>{const _0x518ddb=_0x108c41;this[_0x518ddb(0x254)][_0x518ddb(0x1bc)](_0x4eef6,_0x40d82b);},'onUnLoad':_0x351220=>this[_0x108c41(0x254)][_0x108c41(0x241)](_0x351220)}));}};X=N([M(0x0,_0x85b6e7),M(0x1,_0x3abf00(j))],X);var wt='@univerjs-pro/docs-formula',Tt=_0xb81d4c(0x196);const Et={};let Z=class extends _0xf99196{constructor(_0x5bc09d,_0x1ebd7c,_0x95644e){const _0x2e883d=_0xb81d4c;super(),this[_0x2e883d(0x186)]=_0x5bc09d,this['_formulaService']=_0x1ebd7c,this[_0x2e883d(0x16e)](_0x95644e[_0x2e883d(0x195)]({'resolve':(_0x3231ac,_0x477fe9)=>{const _0x11c9c7=_0x2e883d;var _0x3cee8e;return((_0x3cee8e=_0x477fe9[_0x11c9c7(0x1c4)])==null?void 0x0:_0x3cee8e[_0x11c9c7(0x21d)](w)[_0x11c9c7(0x259)](_0x51c626=>({'startOffset':_0x51c626['startIndex'],'endOffset':_0x51c626[_0x11c9c7(0x218)]+0x1,'text':this['resolveFormula'](_0x3231ac,_0x51c626[_0x11c9c7(0x1dd)])})))??[];}})),this[_0x2e883d(0x16e)](this[_0x2e883d(0x219)][_0x2e883d(0x18c)][_0x2e883d(0x204)](({unitId:_0x3ed933})=>{const _0xa55c5d=_0x2e883d;_0x95644e[_0xa55c5d(0x21a)](_0x3ed933);}));}[_0xb81d4c(0x161)](_0x40966f,_0x439f2d){const _0x415ee4=_0xb81d4c;var _0x4778dc;return((_0x4778dc=this[_0x415ee4(0x219)][_0x415ee4(0x227)]({'unitId':_0x40966f,'rangeId':_0x439f2d}))==null?void 0x0:_0x4778dc[_0x415ee4(0x24e)])??'';}[_0xb81d4c(0x1d4)](_0x394249,_0x5413cc,_0x34a0ff){const _0x2e2e9a=_0xb81d4c;var _0x199d8a;let _0x57b282=this['_univerInstanceService'][_0x2e2e9a(0x17d)](_0x394249,_0x19d9b2[_0x2e2e9a(0x1e7)]),_0x3cc96e=_0x57b282==null?void 0x0:_0x57b282[_0x2e2e9a(0x1d7)]();if(!_0x3cc96e)return'';let _0x225777=_0x3cc96e[_0x2e2e9a(0x1cb)][_0x2e2e9a(0x1c6)](_0x5413cc,_0x34a0ff),_0x3dc6a5=((_0x199d8a=_0x3cc96e[_0x2e2e9a(0x1c4)])==null?void 0x0:_0x199d8a[_0x2e2e9a(0x21d)](_0xa98203=>w(_0xa98203)&&_0xa98203[_0x2e2e9a(0x23b)]>=_0x5413cc&&_0xa98203[_0x2e2e9a(0x218)]<_0x34a0ff)[_0x2e2e9a(0x18f)]((_0x4041d4,_0x10de0e)=>_0x10de0e[_0x2e2e9a(0x23b)]-_0x4041d4[_0x2e2e9a(0x23b)]))??[];for(let _0x4fc340 of _0x3dc6a5){let _0x5af6c8=_0x4fc340[_0x2e2e9a(0x23b)]-_0x5413cc,_0x1a9bc0=_0x4fc340['endIndex']-_0x5413cc+0x1;_0x225777=''+_0x225777[_0x2e2e9a(0x1c6)](0x0,_0x5af6c8)+this[_0x2e2e9a(0x161)](_0x394249,_0x4fc340['rangeId'])+_0x225777[_0x2e2e9a(0x1c6)](_0x1a9bc0);}return _0x225777;}[_0xb81d4c(0x1c5)](_0x17f789){return Dt(_0x17f789);}[_0xb81d4c(0x1e8)](_0x3b24af,_0x35dd14,_0x1e014f={}){const _0x2320e5=_0xb81d4c;var _0x239e75;return Be({'id':_0x3b24af,'body':_0x35dd14,'documentStyle':{}},(((_0x239e75=_0x35dd14['customRanges'])==null?void 0x0:_0x239e75[_0x2320e5(0x21d)](w))??[])[_0x2320e5(0x259)](_0x1305ea=>({'rangeId':_0x1305ea[_0x2320e5(0x1dd)],'text':_0x1e014f[_0x1305ea['rangeId']]??this[_0x2320e5(0x161)](_0x3b24af,_0x1305ea['rangeId'])})))[_0x2320e5(0x1c7)]??{'dataStream':''};}};Z=N([M(0x0,_0x1616da),M(0x1,_0x3abf00(P)),M(0x2,_0x3abf00(_0x5a38c7))],Z);function Dt(_0x5a268e){const _0x201547=_0xb81d4c;var _0x4303e3,_0x40490a;let _0x5a7219=Ot(_0x5a268e),_0x522474=Be(_0x5a268e,(((_0x4303e3=_0x5a268e[_0x201547(0x1c7)])==null||(_0x4303e3=_0x4303e3[_0x201547(0x1c4)])==null?void 0x0:_0x4303e3[_0x201547(0x21d)](w))??[])[_0x201547(0x259)](_0x224d40=>({'rangeId':_0x224d40[_0x201547(0x1dd)],'text':kt(_0x5a7219==null?void 0x0:_0x5a7219['formulas'][_0x224d40['rangeId']])})));return _0x522474[_0x201547(0x1a9)]=(_0x40490a=_0x522474[_0x201547(0x1a9)])==null?void 0x0:_0x40490a[_0x201547(0x21d)](_0x26675e=>_0x26675e[_0x201547(0x19a)]!==y),_0x522474;}function Ot(_0x577a6c){const _0x3468dd=_0xb81d4c;var _0x2c1450;let _0x59c4c5=(_0x2c1450=_0x577a6c[_0x3468dd(0x1a9)])==null||(_0x2c1450=_0x2c1450['find'](_0xedaa2e=>_0xedaa2e[_0x3468dd(0x19a)]===_0x3468dd(0x164)))==null?void 0x0:_0x2c1450[_0x3468dd(0x199)];if(_0x59c4c5)try{let _0x56a1a4=JSON['parse'](_0x59c4c5);return x(_0x56a1a4)?_0x56a1a4:void 0x0;}catch{return;}}function kt(_0x401f70){const _0x84940d=_0xb81d4c;return _0x401f70?_0x157ca0({'lastValue':_0x401f70[_0x84940d(0x1ed)],'numberFormat':_0x401f70[_0x84940d(0x19e)]})[_0x84940d(0x24e)]:'';}let Q=class extends _0xf99196{constructor(_0x2433e0,_0x5cb1a0,_0x122ca0){const _0x91d1ce=_0xb81d4c;super(),this['_formulaService']=_0x2433e0,this[_0x91d1ce(0x1fa)]=_0x5cb1a0,this[_0x91d1ce(0x16e)](_0x122ca0[_0x91d1ce(0x257)](this));}[_0xb81d4c(0x21c)](_0x14c541){const _0x5dc97c=_0xb81d4c;let _0x5e47ad=new Map();for(let _0x4f0119 of this[_0x5dc97c(0x219)][_0x5dc97c(0x1cc)]()){var _0x11494a;if(!this[_0x5dc97c(0x1fa)][_0x5dc97c(0x167)](_0x4f0119[_0x5dc97c(0x1c1)][_0x5dc97c(0x1f0)],_0x4f0119[_0x5dc97c(0x24a)])['eligible'])continue;let _0x20f099=_0xfa1663(_0x4f0119[_0x5dc97c(0x24a)]),_0xb65aec=_0x20f099?_0x4884df(_0x20f099):null;if(!_0xb65aec||At(_0x4f0119['config'][_0x5dc97c(0x1ed)],_0xb65aec))continue;let _0x59d293=_0x5e47ad['get'](_0x4f0119['identity'][_0x5dc97c(0x1a1)])??[];_0x59d293[_0x5dc97c(0x18b)]({'rangeId':_0x4f0119[_0x5dc97c(0x1c0)][_0x5dc97c(0x1dd)],'expectedFormula':_0x4f0119[_0x5dc97c(0x1c1)][_0x5dc97c(0x1f0)],'expectedNumberFormat':(_0x11494a=_0x4f0119['config'][_0x5dc97c(0x19e)])==null?void 0x0:_0x11494a[_0x5dc97c(0x168)],'expectedReferenceRevision':_0x4f0119[_0x5dc97c(0x1a0)],'lastValue':_0xb65aec}),_0x5e47ad['set'](_0x4f0119[_0x5dc97c(0x1c0)][_0x5dc97c(0x1a1)],_0x59d293);}return Array[_0x5dc97c(0x1a7)](_0x5e47ad,([_0x582a94,_0x61e498])=>({'id':R['id'],'params':{'unitId':_0x582a94,'updates':_0x61e498}}));}};Q=N([M(0x0,_0x3abf00(P)),M(0x1,_0x3abf00(_0x5bfff4)),M(0x2,_0x3abf00(_0x21c0ca))],Q);function At(_0x40955e,_0x39d32a){const _0x254e8c=_0xb81d4c;return(_0x40955e==null?void 0x0:_0x40955e['v'])===_0x39d32a['v']&&(_0x40955e==null?void 0x0:_0x40955e['t'])===_0x39d32a['t']&&(_0x40955e==null?void 0x0:_0x40955e[_0x254e8c(0x168)])===_0x39d32a[_0x254e8c(0x168)];}let $=class extends _0x4cfe43{constructor(_0xa8a5a3=Et,_0x12c8bb,_0x1933e7,_0x3aa101){const _0x42078c=_0xb81d4c;super(),this[_0x42078c(0x189)]=_0xa8a5a3,this[_0x42078c(0x1c9)]=_0x12c8bb,this[_0x42078c(0x23d)]=_0x1933e7,this[_0x42078c(0x22e)]=_0x3aa101;let {..._0x8a0417}=_0x57fe01({},Et,this[_0x42078c(0x189)]);this[_0x42078c(0x22e)][_0x42078c(0x19d)](_0x42078c(0x23f),_0x8a0417);}[_0xb81d4c(0x250)](){const _0x4a1151=_0xb81d4c;this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([j]),this['_injector'][_0x4a1151(0x1d3)]([P]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([X]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Y]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Q]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Z]),_0x59a954(this[_0x4a1151(0x1c9)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W][_0x4a1151(0x171)](_0x334343=>this['disposeWithMe'](this[_0x4a1151(0x23d)][_0x4a1151(0x19f)](_0x334343)));}};A($,_0xb81d4c(0x18a),y),A($,_0xb81d4c(0x169),wt),A($,'version',Tt),A($,_0xb81d4c(0x178),_0x19d9b2[_0xb81d4c(0x1e7)]),$=N([_0x415d13(_0x46999f,_0x3c9e4a,_0x59ac81),M(0x1,_0x3abf00(_0x38221f)),M(0x2,_0x41ce44),M(0x3,_0x212f05)],$);export{W as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,j as DocFormulaModel,X as DocFormulaResourceController,ot as DocFormulaResultStatus,P as DocFormulaService,z as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,H as RemoveDocFormulaCommand,ut as RemoveDocFormulaMutation,U as ReplaceDocFormulaWithTextCommand,R as SetDocFormulaLastValuesMutation,lt as SetDocFormulaMutation,V as SetDocFormulaNumberFormatCommand,L as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,B as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Dt as degradeDocFormulaDocumentData,T as findDocFormulaRange,Ne as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Pe as isFormulaLastValue};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x4e8d1d=_0xf76d;function _0x3633(){var _0xc53dc7=['_docsFormulaDisplayTextService','customRanges','742016OgXaYr','setNumberFormat','_initialize','prototype','_createFormula','map','update','_getCompleteRanges','getFormulas','iterator','convertToText','_rangeId','get','getRange','_model','replaceWithText','symbol','startOffset','6cuuNFe','string','replaceWithFormula','startIndex','describe','_docsFormulaCommandService','getBody','_commandService','find','length','_insert','96289QLBCZB','createInstance','end','UNIVER_DOC','object','defineProperty','function','rangeId','syncExecuteCommand','3brbyHD','_docsFormulaModel','getSegmentId','degradeDocumentData','body','_univerInstanceService','567278WYaVeo','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','remove','_getCustomRange','range','extend','toPrimitive','appendFormula','getConfig','some','saveFormulaDisplayTextSnapshot','120635MEFBoL','62657pUpWko','getId','_service','2473560NMdnIY','call','formula','36ZgyRSH','5114950xzafyz','paragraph','numberFormat','getFormulaAt','default','_docsFormulaResourceLoaderService','getSnapshot','_document','insertFormula','endOffset','_unitId','endIndex','Document\x20','externalReferences','getFormula','saveUnit','decorate'];_0x3633=function(){return _0xc53dc7;};return _0x3633();}(function(_0x4b27be,_0x5eae59){var _0x1bd2f8=_0xf76d,_0x31e262=_0x4b27be();while(!![]){try{var _0x5e0f1=-parseInt(_0x1bd2f8(0x164))/0x1+-parseInt(_0x1bd2f8(0x173))/0x2*(-parseInt(_0x1bd2f8(0x16d))/0x3)+parseInt(_0x1bd2f8(0x186))/0x4*(parseInt(_0x1bd2f8(0x17f))/0x5)+-parseInt(_0x1bd2f8(0x159))/0x6*(parseInt(_0x1bd2f8(0x180))/0x7)+parseInt(_0x1bd2f8(0x147))/0x8+parseInt(_0x1bd2f8(0x183))/0x9+-parseInt(_0x1bd2f8(0x187))/0xa;if(_0x5e0f1===_0x5eae59)break;else _0x31e262['push'](_0x31e262['shift']());}catch(_0x3269d8){_0x31e262['push'](_0x31e262['shift']());}}}(_0x3633,0x3d6f7));import{ConvertDocFormulaToTextCommand as _0x3c527c,DocFormulaDisplayTextService as _0x43e9b5,DocFormulaModel as _0x5e08ca,DocFormulaService as _0x421237,InsertDocFormulaCommand as _0x3c045b,RemoveDocFormulaCommand as _0x37e065,ReplaceDocFormulaWithTextCommand as _0x2c2385,SetDocFormulaNumberFormatCommand as _0x492dd2,UpdateDocFormulaCommand as _0x3c604f,isDocFormulaRange as _0x19981d}from'@univerjs-pro/docs-formula';import{ICommandService as _0x549850,IResourceLoaderService as _0x312cab,IUniverInstanceService as _0x207dd1,Inject as _0x23a08b,UniverInstanceType as _0x46a90a}from'@univerjs/core';import{FDocument as _0x1ac644,FDocumentParagraph as _0x44e6e4,FDocumentTextRange as _0x4618e9}from'@univerjs/docs/facade';function v(_0x334af9,_0xad1b93){return function(_0x16c0a9,_0x23d6a7){_0xad1b93(_0x16c0a9,_0x23d6a7,_0x334af9);};}function y(_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5){var _0x3f40f2=_0xf76d,_0x4c55aa=arguments['length'],_0x19139e=_0x4c55aa<0x3?_0x24bf90:_0x2707c5===null?_0x2707c5=Object['getOwnPropertyDescriptor'](_0x24bf90,_0x1ab771):_0x2707c5,_0x3f17fd;if(typeof Reflect==_0x3f40f2(0x168)&&typeof Reflect[_0x3f40f2(0x144)]==_0x3f40f2(0x16a))_0x19139e=Reflect[_0x3f40f2(0x144)](_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5);else{for(var _0x34fd4b=_0x2111c7[_0x3f40f2(0x162)]-0x1;_0x34fd4b>=0x0;_0x34fd4b--)(_0x3f17fd=_0x2111c7[_0x34fd4b])&&(_0x19139e=(_0x4c55aa<0x3?_0x3f17fd(_0x19139e):_0x4c55aa>0x3?_0x3f17fd(_0x24bf90,_0x1ab771,_0x19139e):_0x3f17fd(_0x24bf90,_0x1ab771))||_0x19139e);}return _0x4c55aa>0x3&&_0x19139e&&Object[_0x3f40f2(0x169)](_0x24bf90,_0x1ab771,_0x19139e),_0x19139e;}let b=class{constructor(_0xe4cb1,_0x59071d,_0x38b188,_0x25b3e5,_0x1c9ec0,_0x4953d0){var _0x13e345=_0xf76d;this[_0x13e345(0x191)]=_0xe4cb1,this[_0x13e345(0x152)]=_0x59071d,this[_0x13e345(0x160)]=_0x38b188,this['_model']=_0x25b3e5,this[_0x13e345(0x182)]=_0x1c9ec0,this[_0x13e345(0x172)]=_0x4953d0;}[_0x4e8d1d(0x181)](){var _0x46b880=_0x4e8d1d;return this[_0x46b880(0x152)];}['getRange'](){var _0x377138=_0x4e8d1d;let _0x2189c5=this[_0x377138(0x177)]();return _0x2189c5?{'endOffset':_0x2189c5[_0x377138(0x192)]+0x1,'rangeId':_0x2189c5[_0x377138(0x16b)],'startOffset':_0x2189c5[_0x377138(0x15c)]}:null;}[_0x4e8d1d(0x195)](){var _0x3f7d78=_0x4e8d1d,_0x207919;return((_0x207919=this[_0x3f7d78(0x155)][_0x3f7d78(0x195)](this[_0x3f7d78(0x191)],this[_0x3f7d78(0x152)]))==null?void 0x0:_0x207919['formula'])??'';}['getConfig'](){var _0x448d71=_0x4e8d1d;return this[_0x448d71(0x155)][_0x448d71(0x195)](this[_0x448d71(0x191)],this[_0x448d71(0x152)])??null;}['getResult'](){var _0x5f5100=_0x4e8d1d;return this[_0x5f5100(0x182)]['getResult']({'unitId':this[_0x5f5100(0x191)],'rangeId':this[_0x5f5100(0x152)]})??null;}[_0x4e8d1d(0x15d)](){var _0x495312=_0x4e8d1d;let _0xd4cba5=this['getRange'](),_0x435634=this[_0x495312(0x17c)](),_0x340c9a=this['getResult']();return!_0xd4cba5||!_0x435634||!_0x340c9a?null:{..._0xd4cba5,'config':_0x435634,'formula':_0x435634[_0x495312(0x185)],'result':_0x340c9a,'type':_0x495312(0x185)};}[_0x4e8d1d(0x14d)](_0xeced81){var _0x5e87e6=_0x4e8d1d;return this['_commandService'][_0x5e87e6(0x16c)](_0x3c604f['id'],{'externalReferences':_0xeced81[_0x5e87e6(0x194)],'formula':_0xeced81[_0x5e87e6(0x185)],'numberFormat':_0xeced81[_0x5e87e6(0x189)],'rangeId':this[_0x5e87e6(0x152)],'unitId':this[_0x5e87e6(0x191)]});}[_0x4e8d1d(0x148)](_0x22f63d){var _0x337a27=_0x4e8d1d;return this[_0x337a27(0x160)][_0x337a27(0x16c)](_0x492dd2['id'],{'numberFormat':_0x22f63d,'rangeId':this[_0x337a27(0x152)],'unitId':this[_0x337a27(0x191)]});}[_0x4e8d1d(0x176)](){var _0x1d4cdc=_0x4e8d1d;return this[_0x1d4cdc(0x160)][_0x1d4cdc(0x16c)](_0x37e065['id'],{'rangeId':this[_0x1d4cdc(0x152)],'unitId':this[_0x1d4cdc(0x191)]});}[_0x4e8d1d(0x156)](_0x1fe20a){var _0x2f9b08=_0x4e8d1d;return this[_0x2f9b08(0x160)][_0x2f9b08(0x16c)](_0x2c2385['id'],{'rangeId':this[_0x2f9b08(0x152)],'text':_0x1fe20a,'unitId':this[_0x2f9b08(0x191)]});}[_0x4e8d1d(0x151)](){var _0x828606=_0x4e8d1d;return this[_0x828606(0x160)]['syncExecuteCommand'](_0x3c527c['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x828606(0x191)]});}[_0x4e8d1d(0x177)](){var _0x1c7838=_0x4e8d1d,_0x9740a8;let _0x4bee25=this['_univerInstanceService']['getUnit'](this[_0x1c7838(0x191)],_0x46a90a[_0x1c7838(0x167)]);return _0x4bee25==null||(_0x9740a8=_0x4bee25[_0x1c7838(0x18d)]()[_0x1c7838(0x171)])==null||(_0x9740a8=_0x9740a8[_0x1c7838(0x146)])==null?void 0x0:_0x9740a8[_0x1c7838(0x161)](_0x2c4f82=>_0x2c4f82[_0x1c7838(0x16b)]===this[_0x1c7838(0x152)]&&_0x19981d(_0x2c4f82));}};function _0xf76d(_0x2e5ab8,_0x5f5a47){_0x2e5ab8=_0x2e5ab8-0x144;var _0x363350=_0x3633();var _0xf76d62=_0x363350[_0x2e5ab8];return _0xf76d62;}b=y([v(0x2,_0x549850),v(0x3,_0x23a08b(_0x5e08ca)),v(0x4,_0x23a08b(_0x421237)),v(0x5,_0x207dd1)],b);function x(_0x29dbc1){'@babel/helpers - typeof';var _0x18fceb=_0x4e8d1d;return x=typeof Symbol==_0x18fceb(0x16a)&&typeof Symbol[_0x18fceb(0x150)]==_0x18fceb(0x157)?function(_0x191f9b){return typeof _0x191f9b;}:function(_0x197c1f){var _0x1a8856=_0x18fceb;return _0x197c1f&&typeof Symbol==_0x1a8856(0x16a)&&_0x197c1f['constructor']===Symbol&&_0x197c1f!==Symbol[_0x1a8856(0x14a)]?_0x1a8856(0x157):typeof _0x197c1f;},x(_0x29dbc1);}function S(_0x473d74,_0x4fcc0d){var _0x529981=_0x4e8d1d;if(x(_0x473d74)!='object'||!_0x473d74)return _0x473d74;var _0x24c97b;if(typeof Symbol<'u'&&(_0x24c97b=_0x473d74[Symbol[_0x529981(0x17a)]])!==void 0x0){var _0x3392c6=_0x24c97b[_0x529981(0x184)](_0x473d74,_0x4fcc0d||_0x529981(0x18b));if(x(_0x3392c6)!=_0x529981(0x168))return _0x3392c6;throw TypeError(_0x529981(0x174));}return(_0x4fcc0d==='string'?String:Number)(_0x473d74);}function C(_0x1f4030){var _0x5eb068=_0x4e8d1d,_0x507509=S(_0x1f4030,_0x5eb068(0x15a));return x(_0x507509)==_0x5eb068(0x157)?_0x507509:_0x507509+'';}function w(_0x227b8f,_0x594c15,_0x3fc39e){return(_0x594c15=C(_0x594c15))in _0x227b8f?Object['defineProperty'](_0x227b8f,_0x594c15,{'value':_0x3fc39e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x227b8f[_0x594c15]=_0x3fc39e,_0x227b8f;}var T=class extends _0x1ac644{constructor(..._0x516a2b){var _0x5df59d=_0x4e8d1d;super(..._0x516a2b),w(this,_0x5df59d(0x15e),void 0x0),w(this,_0x5df59d(0x145),void 0x0),w(this,_0x5df59d(0x16e),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x4e8d1d(0x149)](_0x2a9ab1){var _0x5cc953=_0x4e8d1d;this[_0x5cc953(0x15e)]=_0x2a9ab1['get'](_0x549850),this['_docsFormulaDisplayTextService']=_0x2a9ab1['get'](_0x43e9b5),this[_0x5cc953(0x16e)]=_0x2a9ab1[_0x5cc953(0x153)](_0x5e08ca),this[_0x5cc953(0x18c)]=_0x2a9ab1[_0x5cc953(0x153)](_0x312cab);}[_0x4e8d1d(0x14f)](){var _0xfc6774=_0x4e8d1d;return this[_0xfc6774(0x14e)]()[_0xfc6774(0x14c)](_0x208ef7=>this['_createFormula'](_0x208ef7[_0xfc6774(0x16b)]));}[_0x4e8d1d(0x195)](_0x13b033){var _0x57ce81=_0x4e8d1d;return this['_getCompleteRanges']()[_0x57ce81(0x17d)](_0x31bb84=>_0x31bb84[_0x57ce81(0x16b)]===_0x13b033)?this[_0x57ce81(0x14b)](_0x13b033):null;}[_0x4e8d1d(0x18a)](_0x3bbd59){var _0x60af2c=_0x4e8d1d;let _0x396893=this['_getCompleteRanges']()[_0x60af2c(0x161)](_0x196783=>_0x196783[_0x60af2c(0x15c)]<=_0x3bbd59&&_0x3bbd59<=_0x196783[_0x60af2c(0x192)]);return _0x396893?this[_0x60af2c(0x14b)](_0x396893[_0x60af2c(0x16b)]):null;}[_0x4e8d1d(0x17e)](){var _0x565f7a=_0x4e8d1d;let _0x207bca=this['_docsFormulaResourceLoaderService'][_0x565f7a(0x196)](this['id']);if(!_0x207bca)throw Error(_0x565f7a(0x193)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x565f7a(0x145)][_0x565f7a(0x170)](_0x207bca);}[_0x4e8d1d(0x18f)](_0x391539){var _0x45fdfa=_0x4e8d1d;return this[_0x45fdfa(0x163)]({'externalReferences':_0x391539[_0x45fdfa(0x194)],'formula':_0x391539['formula'],'numberFormat':_0x391539[_0x45fdfa(0x189)],'target':{'type':_0x45fdfa(0x178),'startOffset':_0x391539[_0x45fdfa(0x158)],'endOffset':_0x391539[_0x45fdfa(0x190)]},'unitId':this[_0x45fdfa(0x181)]()});}[_0x4e8d1d(0x163)](_0x2e8b83){var _0x974750=_0x4e8d1d;let _0x5c0316=this[_0x974750(0x15e)]['syncExecuteCommand'](_0x3c045b['id'],_0x2e8b83);return _0x5c0316?this['_createFormula'](_0x5c0316[_0x974750(0x16b)]):null;}[_0x4e8d1d(0x14e)](){var _0x273fd4=_0x4e8d1d,_0xfad6d2;let _0x188bcf=this[_0x273fd4(0x16e)][_0x273fd4(0x14f)](this[_0x273fd4(0x181)]());return((_0xfad6d2=this[_0x273fd4(0x15f)]('')['customRanges'])==null?void 0x0:_0xfad6d2['filter'](_0x526892=>_0x19981d(_0x526892)&&_0x188bcf[_0x526892[_0x273fd4(0x16b)]]!=null))??[];}[_0x4e8d1d(0x14b)](_0x289242){var _0x4ba4ae=_0x4e8d1d;return this[_0x4ba4ae(0x175)]['createInstance'](b,this[_0x4ba4ae(0x181)](),_0x289242);}};_0x1ac644[_0x4e8d1d(0x179)](T);var E=class extends _0x44e6e4{constructor(..._0x5716df){var _0xa2aa34=_0x4e8d1d;super(..._0x5716df),w(this,_0xa2aa34(0x15e),void 0x0);}['_initialize'](_0x1d697f){var _0xcc815b=_0x4e8d1d;this['_docsFormulaCommandService']=_0x1d697f[_0xcc815b(0x153)](_0x549850);}[_0x4e8d1d(0x18f)](_0x2a4f4a,_0x3710d8,_0x1512ff={}){var _0x345d43=_0x4e8d1d;return this[_0x345d43(0x163)](_0x2a4f4a,_0x3710d8,_0x1512ff);}[_0x4e8d1d(0x17b)](_0x4c9c07,_0x26aa01={}){var _0x3e7d9e=_0x4e8d1d;return this[_0x3e7d9e(0x163)](_0x3e7d9e(0x166),_0x4c9c07,_0x26aa01);}[_0x4e8d1d(0x163)](_0x3159dc,_0x4062a2,_0x427c34){var _0x2a3313=_0x4e8d1d;if(this[_0x2a3313(0x16f)]())return null;let _0x3581df={'externalReferences':_0x427c34[_0x2a3313(0x194)],'formula':_0x4062a2,'numberFormat':_0x427c34[_0x2a3313(0x189)],'target':{'type':_0x2a3313(0x188),'paragraphId':this['getId'](),'position':_0x3159dc},'unitId':this[_0x2a3313(0x18e)][_0x2a3313(0x181)]()},_0x8a3f0c=this[_0x2a3313(0x15e)][_0x2a3313(0x16c)](_0x3c045b['id'],_0x3581df);return _0x8a3f0c?this[_0x2a3313(0x175)]['createInstance'](b,this[_0x2a3313(0x18e)][_0x2a3313(0x181)](),_0x8a3f0c[_0x2a3313(0x16b)]):null;}};_0x44e6e4[_0x4e8d1d(0x179)](E);var D=class extends _0x4618e9{constructor(..._0x2797e2){var _0x5c3edf=_0x4e8d1d;super(..._0x2797e2),w(this,_0x5c3edf(0x15e),void 0x0);}[_0x4e8d1d(0x149)](_0x45312a){var _0x5a4e91=_0x4e8d1d;this[_0x5a4e91(0x15e)]=_0x45312a[_0x5a4e91(0x153)](_0x549850);}[_0x4e8d1d(0x15b)](_0x1e5aab,_0x3c65c2={}){var _0x46eed9=_0x4e8d1d;let {endOffset:_0x574388,segmentId:_0x1f9318,startOffset:_0x116856}=this[_0x46eed9(0x154)]();return _0x1f9318?null:this['_insert'](_0x116856,_0x574388,_0x1e5aab,_0x3c65c2);}['_insert'](_0x21d069,_0x5141dd,_0x4604ab,_0x12c9f8){var _0x5626fe=_0x4e8d1d;let _0x3f32b6={'externalReferences':_0x12c9f8[_0x5626fe(0x194)],'formula':_0x4604ab,'numberFormat':_0x12c9f8[_0x5626fe(0x189)],'target':{'type':_0x5626fe(0x178),'startOffset':_0x21d069,'endOffset':_0x5141dd},'unitId':this[_0x5626fe(0x18e)][_0x5626fe(0x181)]()},_0x294159=this['_docsFormulaCommandService'][_0x5626fe(0x16c)](_0x3c045b['id'],_0x3f32b6);return _0x294159?this[_0x5626fe(0x175)][_0x5626fe(0x165)](b,this[_0x5626fe(0x18e)][_0x5626fe(0x181)](),_0x294159['rangeId']):null;}};_0x4618e9[_0x4e8d1d(0x179)](D);export{b as FDocumentFormula};
1
+ var _0x3a803d=_0x4c55;(function(_0xde343c,_0x2641e0){var _0xe311b6=_0x4c55,_0x7a802e=_0xde343c();while(!![]){try{var _0x29f1cf=parseInt(_0xe311b6(0xc9))/0x1+parseInt(_0xe311b6(0xf8))/0x2+-parseInt(_0xe311b6(0xe9))/0x3*(parseInt(_0xe311b6(0xf3))/0x4)+parseInt(_0xe311b6(0xf9))/0x5+parseInt(_0xe311b6(0xff))/0x6*(parseInt(_0xe311b6(0xcc))/0x7)+-parseInt(_0xe311b6(0xdd))/0x8+-parseInt(_0xe311b6(0xe6))/0x9;if(_0x29f1cf===_0x2641e0)break;else _0x7a802e['push'](_0x7a802e['shift']());}catch(_0xd2782c){_0x7a802e['push'](_0x7a802e['shift']());}}}(_0x3fa3,0xc89b3));import{ConvertDocFormulaToTextCommand as _0x4dc3b6,DocFormulaDisplayTextService as _0x44acd2,DocFormulaModel as _0x2217c6,DocFormulaService as _0x124ba9,InsertDocFormulaCommand as _0xcc371d,RemoveDocFormulaCommand as _0x21b7de,ReplaceDocFormulaWithTextCommand as _0x460db1,SetDocFormulaNumberFormatCommand as _0x582fd2,UpdateDocFormulaCommand as _0x59bdaf,isDocFormulaRange as _0x3ee5c9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x29b40b,IResourceLoaderService as _0x3cc1a5,IUniverInstanceService as _0x3fa665,Inject as _0x1e7f0b,UniverInstanceType as _0xd4469a}from'@univerjs/core';import{FDocument as _0x4efe3d,FDocumentParagraph as _0x3ec53d,FDocumentTextRange as _0x5e91bd}from'@univerjs/docs/facade';function v(_0x36da73,_0x50c50b){return function(_0x2548a6,_0x21f6f2){_0x50c50b(_0x2548a6,_0x21f6f2,_0x36da73);};}function y(_0x4b2dd1,_0x300f69,_0x31f854,_0x33fee9){var _0x39cd8a=_0x4c55,_0x5987ad=arguments['length'],_0x86392c=_0x5987ad<0x3?_0x300f69:_0x33fee9===null?_0x33fee9=Object[_0x39cd8a(0x10b)](_0x300f69,_0x31f854):_0x33fee9,_0x2c7b28;if(typeof Reflect==_0x39cd8a(0x102)&&typeof Reflect[_0x39cd8a(0x100)]==_0x39cd8a(0x10e))_0x86392c=Reflect[_0x39cd8a(0x100)](_0x4b2dd1,_0x300f69,_0x31f854,_0x33fee9);else{for(var _0x52ad09=_0x4b2dd1[_0x39cd8a(0x105)]-0x1;_0x52ad09>=0x0;_0x52ad09--)(_0x2c7b28=_0x4b2dd1[_0x52ad09])&&(_0x86392c=(_0x5987ad<0x3?_0x2c7b28(_0x86392c):_0x5987ad>0x3?_0x2c7b28(_0x300f69,_0x31f854,_0x86392c):_0x2c7b28(_0x300f69,_0x31f854))||_0x86392c);}return _0x5987ad>0x3&&_0x86392c&&Object[_0x39cd8a(0xf1)](_0x300f69,_0x31f854,_0x86392c),_0x86392c;}let b=class{constructor(_0x24757e,_0x222f5f,_0x48c42a,_0x12304a,_0x4acc6c,_0x555797){var _0x495f69=_0x4c55;this[_0x495f69(0x109)]=_0x24757e,this['_rangeId']=_0x222f5f,this[_0x495f69(0xf5)]=_0x48c42a,this[_0x495f69(0x110)]=_0x12304a,this[_0x495f69(0xd7)]=_0x4acc6c,this['_univerInstanceService']=_0x555797;}['getId'](){var _0x37752f=_0x4c55;return this[_0x37752f(0x101)];}[_0x3a803d(0x10c)](){var _0x1d88df=_0x3a803d;let _0x214ac9=this[_0x1d88df(0xd3)]();return _0x214ac9?{'endOffset':_0x214ac9[_0x1d88df(0x106)]+0x1,'rangeId':_0x214ac9[_0x1d88df(0xeb)],'startOffset':_0x214ac9[_0x1d88df(0xe5)]}:null;}[_0x3a803d(0xea)](){var _0x4af4cd=_0x3a803d,_0x57693b;return((_0x57693b=this[_0x4af4cd(0x110)][_0x4af4cd(0xea)](this[_0x4af4cd(0x109)],this[_0x4af4cd(0x101)]))==null?void 0x0:_0x57693b['formula'])??'';}[_0x3a803d(0xf6)](){var _0x27f958=_0x3a803d;return this[_0x27f958(0x110)][_0x27f958(0xea)](this[_0x27f958(0x109)],this[_0x27f958(0x101)])??null;}[_0x3a803d(0xc6)](){var _0x347e93=_0x3a803d;return this[_0x347e93(0xd7)][_0x347e93(0xc6)]({'unitId':this['_unitId'],'rangeId':this[_0x347e93(0x101)]})??null;}['describe'](){var _0x4069cb=_0x3a803d;let _0x4f78ca=this[_0x4069cb(0x10c)](),_0x3cb615=this[_0x4069cb(0xf6)](),_0x2074e0=this['getResult']();return!_0x4f78ca||!_0x3cb615||!_0x2074e0?null:{..._0x4f78ca,'config':_0x3cb615,'formula':_0x3cb615['formula'],'result':_0x2074e0,'type':_0x4069cb(0xfc)};}[_0x3a803d(0xda)](_0x138879){var _0x55576a=_0x3a803d;return this[_0x55576a(0xf5)][_0x55576a(0xfa)](_0x59bdaf['id'],{'externalReferences':_0x138879[_0x55576a(0xe8)],'formula':_0x138879['formula'],'numberFormat':_0x138879[_0x55576a(0xed)],'rangeId':this['_rangeId'],'unitId':this[_0x55576a(0x109)]});}[_0x3a803d(0xc8)](_0x2499b0){var _0x3c4162=_0x3a803d;return this['_commandService'][_0x3c4162(0xfa)](_0x582fd2['id'],{'numberFormat':_0x2499b0,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x3a803d(0xe2)](){var _0x54878c=_0x3a803d;return this['_commandService']['syncExecuteCommand'](_0x21b7de['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x54878c(0x109)]});}['replaceWithText'](_0x49fc5e){var _0x230a71=_0x3a803d;return this['_commandService'][_0x230a71(0xfa)](_0x460db1['id'],{'rangeId':this[_0x230a71(0x101)],'text':_0x49fc5e,'unitId':this['_unitId']});}[_0x3a803d(0xd4)](){var _0x259aed=_0x3a803d;return this[_0x259aed(0xf5)]['syncExecuteCommand'](_0x4dc3b6['id'],{'rangeId':this[_0x259aed(0x101)],'unitId':this['_unitId']});}['_getCustomRange'](){var _0x17fa56=_0x3a803d,_0x1fea2d;let _0x331c67=this[_0x17fa56(0xd2)]['getUnit'](this[_0x17fa56(0x109)],_0xd4469a['UNIVER_DOC']);return _0x331c67==null||(_0x1fea2d=_0x331c67[_0x17fa56(0xce)]()[_0x17fa56(0xc7)])==null||(_0x1fea2d=_0x1fea2d[_0x17fa56(0xd5)])==null?void 0x0:_0x1fea2d['find'](_0x116d7d=>_0x116d7d['rangeId']===this[_0x17fa56(0x101)]&&_0x3ee5c9(_0x116d7d));}};function _0x3fa3(){var _0x364a24=['rangeId','createInstance','numberFormat','_insert','getFormulas','_docsFormulaResourceLoaderService','defineProperty','_docsFormulaModel','4976796KcPZAJ','saveFormulaDisplayTextSnapshot','_commandService','getConfig','getSegmentId','1768600faWCfa','5791790AmTlyN','syncExecuteCommand','map','formula','constructor','filter','6SwuMVl','decorate','_rangeId','object','_docsFormulaDisplayTextService','iterator','length','endIndex','_getCompleteRanges','getFormulaAt','_unitId','extend','getOwnPropertyDescriptor','getRange','insertFormula','function','symbol','_model','getResult','body','setNumberFormat','1262650QEgvhn','_injector','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','9308173JvwJnX','replaceWithFormula','getSnapshot','_document','_initialize','call','_univerInstanceService','_getCustomRange','convertToText','customRanges','get','_service','getId','_createFormula','update','toPrimitive','getBody','147240XmFbad','end','paragraph','saveUnit','some','remove','_docsFormulaCommandService','range','startIndex','22956840NNroqH','find','externalReferences','3mPacuv','getFormula'];_0x3fa3=function(){return _0x364a24;};return _0x3fa3();}b=y([v(0x2,_0x29b40b),v(0x3,_0x1e7f0b(_0x2217c6)),v(0x4,_0x1e7f0b(_0x124ba9)),v(0x5,_0x3fa665)],b);function x(_0x4c1ed2){'@babel/helpers - typeof';var _0x19be8f=_0x3a803d;return x=typeof Symbol==_0x19be8f(0x10e)&&typeof Symbol[_0x19be8f(0x104)]==_0x19be8f(0x10f)?function(_0x57b0d3){return typeof _0x57b0d3;}:function(_0x53e71d){var _0x2d9e60=_0x19be8f;return _0x53e71d&&typeof Symbol==_0x2d9e60(0x10e)&&_0x53e71d[_0x2d9e60(0xfd)]===Symbol&&_0x53e71d!==Symbol['prototype']?_0x2d9e60(0x10f):typeof _0x53e71d;},x(_0x4c1ed2);}function S(_0x4a20cd,_0x1eb92a){var _0x2892c5=_0x3a803d;if(x(_0x4a20cd)!=_0x2892c5(0x102)||!_0x4a20cd)return _0x4a20cd;var _0xd4074c;if(typeof Symbol<'u'&&(_0xd4074c=_0x4a20cd[Symbol[_0x2892c5(0xdb)]])!==void 0x0){var _0x265d26=_0xd4074c[_0x2892c5(0xd1)](_0x4a20cd,_0x1eb92a||'default');if(x(_0x265d26)!='object')return _0x265d26;throw TypeError(_0x2892c5(0xcb));}return(_0x1eb92a==='string'?String:Number)(_0x4a20cd);}function _0x4c55(_0x2f2233,_0x4740b8){_0x2f2233=_0x2f2233-0xc6;var _0x3fa37b=_0x3fa3();var _0x4c5561=_0x3fa37b[_0x2f2233];return _0x4c5561;}function C(_0x3092fb){var _0x1af065=_0x3a803d,_0x515731=S(_0x3092fb,'string');return x(_0x515731)==_0x1af065(0x10f)?_0x515731:_0x515731+'';}function w(_0x3b2482,_0x379d41,_0x21c9c0){var _0x31903b=_0x3a803d;return(_0x379d41=C(_0x379d41))in _0x3b2482?Object[_0x31903b(0xf1)](_0x3b2482,_0x379d41,{'value':_0x21c9c0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3b2482[_0x379d41]=_0x21c9c0,_0x3b2482;}var T=class extends _0x4efe3d{constructor(..._0x1ef66a){var _0x180f43=_0x3a803d;super(..._0x1ef66a),w(this,_0x180f43(0xe3),void 0x0),w(this,'_docsFormulaDisplayTextService',void 0x0),w(this,'_docsFormulaModel',void 0x0),w(this,_0x180f43(0xf0),void 0x0);}[_0x3a803d(0xd0)](_0x563508){var _0xb7aad=_0x3a803d;this[_0xb7aad(0xe3)]=_0x563508[_0xb7aad(0xd6)](_0x29b40b),this[_0xb7aad(0x103)]=_0x563508[_0xb7aad(0xd6)](_0x44acd2),this[_0xb7aad(0xf2)]=_0x563508[_0xb7aad(0xd6)](_0x2217c6),this[_0xb7aad(0xf0)]=_0x563508[_0xb7aad(0xd6)](_0x3cc1a5);}[_0x3a803d(0xef)](){var _0x1f7f64=_0x3a803d;return this['_getCompleteRanges']()[_0x1f7f64(0xfb)](_0x31aea4=>this['_createFormula'](_0x31aea4[_0x1f7f64(0xeb)]));}['getFormula'](_0x19b4c4){var _0x26f5b0=_0x3a803d;return this[_0x26f5b0(0x107)]()[_0x26f5b0(0xe1)](_0x988958=>_0x988958[_0x26f5b0(0xeb)]===_0x19b4c4)?this[_0x26f5b0(0xd9)](_0x19b4c4):null;}[_0x3a803d(0x108)](_0x34760c){var _0x52f910=_0x3a803d;let _0x3e0a10=this[_0x52f910(0x107)]()[_0x52f910(0xe7)](_0x390d03=>_0x390d03['startIndex']<=_0x34760c&&_0x34760c<=_0x390d03['endIndex']);return _0x3e0a10?this[_0x52f910(0xd9)](_0x3e0a10['rangeId']):null;}[_0x3a803d(0xf4)](){var _0x1969bc=_0x3a803d;let _0x13c4f1=this[_0x1969bc(0xf0)][_0x1969bc(0xe0)](this['id']);if(!_0x13c4f1)throw Error('Document\x20'+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x1969bc(0x103)]['degradeDocumentData'](_0x13c4f1);}[_0x3a803d(0x10d)](_0x338e17){var _0x1ef60c=_0x3a803d;return this[_0x1ef60c(0xee)]({'externalReferences':_0x338e17[_0x1ef60c(0xe8)],'formula':_0x338e17[_0x1ef60c(0xfc)],'numberFormat':_0x338e17[_0x1ef60c(0xed)],'target':{'type':_0x1ef60c(0xe4),'startOffset':_0x338e17['startOffset'],'endOffset':_0x338e17['endOffset']},'unitId':this[_0x1ef60c(0xd8)]()});}[_0x3a803d(0xee)](_0x3cfe70){var _0x5697be=_0x3a803d;let _0xbae152=this['_docsFormulaCommandService'][_0x5697be(0xfa)](_0xcc371d['id'],_0x3cfe70);return _0xbae152?this[_0x5697be(0xd9)](_0xbae152[_0x5697be(0xeb)]):null;}['_getCompleteRanges'](){var _0x5e9d4b=_0x3a803d,_0x2d10ce;let _0x62f609=this[_0x5e9d4b(0xf2)][_0x5e9d4b(0xef)](this[_0x5e9d4b(0xd8)]());return((_0x2d10ce=this[_0x5e9d4b(0xdc)]('')[_0x5e9d4b(0xd5)])==null?void 0x0:_0x2d10ce[_0x5e9d4b(0xfe)](_0x3cd0e5=>_0x3ee5c9(_0x3cd0e5)&&_0x62f609[_0x3cd0e5[_0x5e9d4b(0xeb)]]!=null))??[];}[_0x3a803d(0xd9)](_0x345772){var _0x36cea7=_0x3a803d;return this[_0x36cea7(0xca)][_0x36cea7(0xec)](b,this[_0x36cea7(0xd8)](),_0x345772);}};_0x4efe3d['extend'](T);var E=class extends _0x3ec53d{constructor(..._0x4be71d){var _0x9e05f9=_0x3a803d;super(..._0x4be71d),w(this,_0x9e05f9(0xe3),void 0x0);}['_initialize'](_0x2b96a7){var _0x22ea2d=_0x3a803d;this[_0x22ea2d(0xe3)]=_0x2b96a7['get'](_0x29b40b);}[_0x3a803d(0x10d)](_0x56bb57,_0xf79444,_0x5bcd73={}){var _0xfcf7d9=_0x3a803d;return this[_0xfcf7d9(0xee)](_0x56bb57,_0xf79444,_0x5bcd73);}['appendFormula'](_0x2e604a,_0x104c68={}){var _0x30d0a9=_0x3a803d;return this[_0x30d0a9(0xee)](_0x30d0a9(0xde),_0x2e604a,_0x104c68);}[_0x3a803d(0xee)](_0x370ae7,_0x19e2ef,_0x2a66ce){var _0x1e2d76=_0x3a803d;if(this[_0x1e2d76(0xf7)]())return null;let _0x3f1996={'externalReferences':_0x2a66ce[_0x1e2d76(0xe8)],'formula':_0x19e2ef,'numberFormat':_0x2a66ce[_0x1e2d76(0xed)],'target':{'type':_0x1e2d76(0xdf),'paragraphId':this['getId'](),'position':_0x370ae7},'unitId':this[_0x1e2d76(0xcf)][_0x1e2d76(0xd8)]()},_0x651e3e=this[_0x1e2d76(0xe3)][_0x1e2d76(0xfa)](_0xcc371d['id'],_0x3f1996);return _0x651e3e?this[_0x1e2d76(0xca)][_0x1e2d76(0xec)](b,this[_0x1e2d76(0xcf)][_0x1e2d76(0xd8)](),_0x651e3e[_0x1e2d76(0xeb)]):null;}};_0x3ec53d['extend'](E);var D=class extends _0x5e91bd{constructor(..._0x12cc1a){var _0xfbc239=_0x3a803d;super(..._0x12cc1a),w(this,_0xfbc239(0xe3),void 0x0);}[_0x3a803d(0xd0)](_0x57924c){var _0x505e43=_0x3a803d;this['_docsFormulaCommandService']=_0x57924c[_0x505e43(0xd6)](_0x29b40b);}[_0x3a803d(0xcd)](_0x413dfb,_0x944afc={}){var _0x51b458=_0x3a803d;let {endOffset:_0x3550be,segmentId:_0x3e5af3,startOffset:_0x45addf}=this[_0x51b458(0x10c)]();return _0x3e5af3?null:this[_0x51b458(0xee)](_0x45addf,_0x3550be,_0x413dfb,_0x944afc);}[_0x3a803d(0xee)](_0x2caa31,_0x50f2e0,_0x56252b,_0x14dd5b){var _0x409bd7=_0x3a803d;let _0x5490e7={'externalReferences':_0x14dd5b[_0x409bd7(0xe8)],'formula':_0x56252b,'numberFormat':_0x14dd5b[_0x409bd7(0xed)],'target':{'type':_0x409bd7(0xe4),'startOffset':_0x2caa31,'endOffset':_0x50f2e0},'unitId':this[_0x409bd7(0xcf)][_0x409bd7(0xd8)]()},_0xa8d631=this[_0x409bd7(0xe3)]['syncExecuteCommand'](_0xcc371d['id'],_0x5490e7);return _0xa8d631?this[_0x409bd7(0xca)][_0x409bd7(0xec)](b,this[_0x409bd7(0xcf)]['getId'](),_0xa8d631[_0x409bd7(0xeb)]):null;}};_0x5e91bd[_0x3a803d(0x10a)](D);export{b as FDocumentFormula};