@univerjs-pro/docs-formula 1.0.0-insiders.20260729-99504c3

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/index.js ADDED
@@ -0,0 +1 @@
1
+ const _0x27e79d=_0x370d;(function(_0x14ba25,_0xcd9770){const _0x101d96=_0x370d,_0x16b3ad=_0x14ba25();while(!![]){try{const _0x4aa5d6=-parseInt(_0x101d96(0x2a3))/0x1+-parseInt(_0x101d96(0x207))/0x2*(parseInt(_0x101d96(0x294))/0x3)+parseInt(_0x101d96(0x26d))/0x4*(-parseInt(_0x101d96(0x26c))/0x5)+parseInt(_0x101d96(0x257))/0x6+parseInt(_0x101d96(0x27a))/0x7*(-parseInt(_0x101d96(0x1db))/0x8)+-parseInt(_0x101d96(0x27c))/0x9+-parseInt(_0x101d96(0x20c))/0xa*(-parseInt(_0x101d96(0x20f))/0xb);if(_0x4aa5d6===_0xcd9770)break;else _0x16b3ad['push'](_0x16b3ad['shift']());}catch(_0x28f7b5){_0x16b3ad['push'](_0x16b3ad['shift']());}}}(_0x1f6c,0xbff9b));import{FormulaCacheEligibilityService as _0x2da8c8,FormulaLastValuePersistenceService as _0x4e98bd,HostExternalReferenceModel as _0x2db26f,UniverProFormulaEnginePlugin as _0x1191d2,buildUpsertHostExternalReferenceMutations as _0x533c27,collectFormulaExternalReferenceQualifiers as _0x4e521e,getScalarFormulaResultCell as _0x3b7ba6,resolveFormulaResultPresentation as _0x4a5c5a,resolveHostFormulaExternalReferences as _0x4d0812,toFormulaLastValue as _0x1a46bb}from'@univerjs-pro/engine-formula';import{CellValueType as _0x1af753,CommandType as _0x529668,CustomRangeType as _0x2f51c9,DataStreamTreeTokenType as _0x1f118d,DependentOn as _0x4146e0,Disposable as _0x1df972,ICommandService as _0x513b93,IConfigService as _0x4736d9,IResourceManagerService as _0x5a138b,IUndoRedoService as _0x40467d,IUniverInstanceService as _0xecc2db,Inject as _0x25156c,Injector as _0x3573f9,JSONX as _0x4f8421,Plugin as _0x17012f,TextX as _0x58fa34,Tools as _0x16095d,UniverInstanceType as _0x50d513,generateRandomId as _0x234005,getBodySliceForTextXAction as _0x30e927,getCustomRangeInterval as _0x442b9f,getParagraphContentStartOffset as _0xd85cec,getRichTextEditPath as _0x3f9f00,merge as _0x20bb68,shiftExclusiveRangeOnDelete as _0x1b2d84,shiftExclusiveRangeOnInsert as _0x54b0f6,shiftInclusiveRangeOnDelete as _0x53e728,shiftInclusiveRangeOnInsert as _0x4e26c1,touchDependencies as _0x4569e5}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x209d53,DocSelectionManagerService as _0x4918cc,DocTextResolverService as _0x53e787,RichTextEditingMutation as _0x70564a,UniverDocsPlugin as _0x58be4d}from'@univerjs/docs';import{FormulaResultStatus as _0x254812,LexerTreeBuilder as _0x240393,OtherFormulaBizType as _0xe37e06,RegisterOtherFormulaService as _0x1fbc67}from'@univerjs/engine-formula';import{Subject as _0x1ab380}from'rxjs';import{UniverLicensePlugin as _0x3857d7}from'@univerjs-pro/license';const b='DOC_FORMULA_PLUGIN',Ae=0x1,je=_0x27e79d(0x1d6),Me='';function x(){return{'schemaVersion':0x1,'formulas':{}};}function S(_0x479094){const _0x550af5=_0x27e79d;return!_0x479094||typeof _0x479094!=_0x550af5(0x27d)||!C(_0x479094,[_0x550af5(0x1ce),_0x550af5(0x25d)])||!(_0x550af5(0x1ce)in _0x479094)||_0x479094['schemaVersion']!==0x1||!('formulas'in _0x479094)||!_0x479094['formulas']||typeof _0x479094[_0x550af5(0x25d)]!=_0x550af5(0x27d)||Array[_0x550af5(0x1d2)](_0x479094[_0x550af5(0x25d)])?!0x1:Object['entries'](_0x479094[_0x550af5(0x25d)])[_0x550af5(0x29c)](([_0x82c7ee,_0x52f255])=>_0x82c7ee[_0x550af5(0x251)]>0x0&&Ne(_0x52f255));}function Ne(_0x181c73){const _0x3033dd=_0x27e79d;return!_0x181c73||typeof _0x181c73!='object'||!C(_0x181c73,['formula','numberFormat',_0x3033dd(0x1e7)])||!(_0x3033dd(0x26a)in _0x181c73)||typeof _0x181c73[_0x3033dd(0x26a)]!=_0x3033dd(0x1bd)||!_0x181c73[_0x3033dd(0x26a)][_0x3033dd(0x2a6)]()||_0x3033dd(0x1d7)in _0x181c73&&_0x181c73[_0x3033dd(0x1d7)]!=null&&(typeof _0x181c73[_0x3033dd(0x1d7)]!=_0x3033dd(0x27d)||!C(_0x181c73[_0x3033dd(0x1d7)],[_0x3033dd(0x281)])||!(_0x3033dd(0x281)in _0x181c73[_0x3033dd(0x1d7)])||typeof _0x181c73[_0x3033dd(0x1d7)][_0x3033dd(0x281)]!='string')?!0x1:!(_0x3033dd(0x1e7)in _0x181c73)||_0x181c73[_0x3033dd(0x1e7)]==null||Pe(_0x181c73[_0x3033dd(0x1e7)]);}function Pe(_0x1910d7){const _0x2deb83=_0x27e79d;return!_0x1910d7||typeof _0x1910d7!=_0x2deb83(0x27d)||!C(_0x1910d7,['v','t',_0x2deb83(0x281)])||!('v'in _0x1910d7)||_0x1910d7['v']!==null&&typeof _0x1910d7['v']!='string'&&typeof _0x1910d7['v']!=_0x2deb83(0x219)&&typeof _0x1910d7['v']!='boolean'||'t'in _0x1910d7&&_0x1910d7['t']!=null&&!Fe(_0x1910d7['t'])?!0x1:!(_0x2deb83(0x281)in _0x1910d7)||_0x1910d7[_0x2deb83(0x281)]==null||typeof _0x1910d7['pattern']==_0x2deb83(0x1bd);}function C(_0x27a7b5,_0x424726){const _0x23ebb8=_0x27e79d;let _0x537552=new Set(_0x424726);return Object[_0x23ebb8(0x24b)](_0x27a7b5)['every'](_0x364edf=>_0x537552[_0x23ebb8(0x1f8)](_0x364edf));}function _0x370d(_0x36e0f1,_0x289e4b){_0x36e0f1=_0x36e0f1-0x1ae;const _0x1f6c55=_0x1f6c();let _0x370def=_0x1f6c55[_0x36e0f1];return _0x370def;}function Fe(_0x28e374){const _0x22c06f=_0x27e79d;return typeof _0x28e374==_0x22c06f(0x219)&&Object['values'](_0x1af753)[_0x22c06f(0x1bb)](_0x28e374);}const Ie=new Set([_0x1f118d[_0x27e79d(0x2a7)],_0x1f118d['TABLE_START'],_0x1f118d[_0x27e79d(0x231)],_0x1f118d['TABLE_CELL_START'],_0x1f118d[_0x27e79d(0x1f9)],_0x1f118d[_0x27e79d(0x25b)],_0x1f118d[_0x27e79d(0x1b9)],_0x1f118d['COLUMN_GROUP_START'],_0x1f118d[_0x27e79d(0x1e3)],_0x1f118d['COLUMN_END'],_0x1f118d[_0x27e79d(0x1c2)],_0x1f118d[_0x27e79d(0x209)],_0x1f118d[_0x27e79d(0x241)],_0x1f118d[_0x27e79d(0x23b)]]);var w=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Le(_0x23a69e){const _0x81c8b5=_0x27e79d;var _0x4524d6,_0x15bf7f,_0x4ca98f,_0x463c8b;let _0x202f59=_0x16095d[_0x81c8b5(0x211)](_0x23a69e[_0x81c8b5(0x1f2)]),_0x1d04cb=M(_0x202f59),{startOffset:_0x49db3d,endOffset:_0x89e91}=Ue(_0x1d04cb,_0x23a69e[_0x81c8b5(0x24e)],_0x23a69e[_0x81c8b5(0x290)]);Ve(_0x1d04cb,_0x49db3d,_0x89e91);let _0x475c66=(_0x4524d6=(_0x15bf7f=_0x1d04cb[_0x81c8b5(0x2ac)])==null?void 0x0:_0x15bf7f[_0x81c8b5(0x22d)](_0x249ed5=>{const _0x549601=_0x81c8b5;if(!T(_0x249ed5))return!0x1;let _0xf0686=_0x442b9f(_0x249ed5);return _0xf0686[_0x549601(0x290)]>_0x49db3d&&_0xf0686['startOffset']<_0x89e91;})[_0x81c8b5(0x298)](_0x86aaab=>_0x86aaab[_0x81c8b5(0x1b5)]))==null?[]:_0x4524d6;Ke(_0x1d04cb,_0x49db3d,_0x89e91,''),_0x1d04cb[_0x81c8b5(0x2ac)]=[...(_0x4ca98f=(_0x463c8b=_0x1d04cb[_0x81c8b5(0x2ac)])==null?void 0x0:_0x463c8b[_0x81c8b5(0x22d)](_0x3bbf2b=>!_0x475c66['includes'](_0x3bbf2b[_0x81c8b5(0x1b5)])&&_0x3bbf2b[_0x81c8b5(0x1b5)]!==_0x23a69e['rangeId']))==null?[]:_0x4ca98f,He(_0x23a69e['rangeId'],_0x49db3d)]['sort']((_0x22c9ed,_0x76fb2b)=>_0x22c9ed[_0x81c8b5(0x267)]-_0x76fb2b['startIndex']);let _0x37b0f6=D(_0x23a69e[_0x81c8b5(0x278)]);return _0x475c66[_0x81c8b5(0x1f0)](_0x4b47dc=>{const _0x128759=_0x81c8b5;delete _0x37b0f6[_0x128759(0x25d)][_0x4b47dc];}),_0x37b0f6[_0x81c8b5(0x25d)][_0x23a69e[_0x81c8b5(0x1b5)]]=_0x16095d[_0x81c8b5(0x211)](_0x23a69e[_0x81c8b5(0x1bc)]),{'nextDocumentData':_0x202f59,'nextResource':_0x37b0f6,'cursorOffset':_0x49db3d+0x1};}function Re(_0x59b283){const _0x2c6187=_0x27e79d;var _0x37886b,_0x4e20ed;let _0x22c5c9=_0x16095d[_0x2c6187(0x211)](_0x59b283['documentData']),_0x476953=(_0x37886b=M(_0x22c5c9)['customRanges'])==null?void 0x0:_0x37886b[_0x2c6187(0x220)](_0x25f011=>_0x25f011[_0x2c6187(0x1b5)]===_0x59b283[_0x2c6187(0x1b5)]&&T(_0x25f011));if(!_0x476953||!((_0x4e20ed=_0x59b283[_0x2c6187(0x278)])!=null&&_0x4e20ed[_0x2c6187(0x25d)][_0x59b283[_0x2c6187(0x1b5)]]))return null;let _0x3f148d=D(_0x59b283['resource']);return _0x3f148d[_0x2c6187(0x25d)][_0x59b283[_0x2c6187(0x1b5)]]=_0x16095d['deepClone'](_0x59b283['config']),{'nextDocumentData':_0x22c5c9,'nextResource':_0x3f148d,'cursorOffset':_0x476953[_0x2c6187(0x1b2)]+0x1};}function ze(_0x33066b){const _0xbd0692=_0x27e79d;var _0x597c30;let _0x30a19a=_0x16095d[_0xbd0692(0x211)](_0x33066b[_0xbd0692(0x1f2)]),_0x2420e8=qe(_0x30a19a,_0x33066b[_0xbd0692(0x1b5)],(_0x597c30=_0x33066b['text'])==null?'':_0x597c30);if(_0x2420e8==null)return null;let _0x267f4b=D(_0x33066b[_0xbd0692(0x278)]);return delete _0x267f4b['formulas'][_0x33066b[_0xbd0692(0x1b5)]],{'nextDocumentData':_0x30a19a,'nextResource':_0x267f4b,'cursorOffset':_0x2420e8};}function Be(_0x4309da,_0x4ad341){const _0x495451=_0x27e79d;var _0x5f10ba,_0x4349e6;let _0x36c4f2=_0x16095d[_0x495451(0x211)](_0x4309da),_0x2a6c34=_0x36c4f2[_0x495451(0x1c9)];if(!_0x2a6c34)return _0x36c4f2;let _0x3f4a90=new Map(_0x4ad341[_0x495451(0x298)](_0xe3ea76=>[_0xe3ea76[_0x495451(0x1b5)],_0xe3ea76[_0x495451(0x1b1)]])),_0x2bcd2f=(_0x5f10ba=(_0x4349e6=_0x2a6c34[_0x495451(0x2ac)])==null?void 0x0:_0x4349e6[_0x495451(0x22d)](_0x4bcae1=>T(_0x4bcae1)&&_0x3f4a90[_0x495451(0x1f8)](_0x4bcae1['rangeId']))[_0x495451(0x2a1)]((_0x288946,_0x27c2d5)=>_0x27c2d5['startIndex']-_0x288946[_0x495451(0x267)]))==null?[]:_0x5f10ba;for(let _0x5cc9ad of _0x2bcd2f){var _0x4fb409;qe(_0x36c4f2,_0x5cc9ad[_0x495451(0x1b5)],(_0x4fb409=_0x3f4a90[_0x495451(0x29a)](_0x5cc9ad[_0x495451(0x1b5)]))==null?'':_0x4fb409);}return _0x36c4f2;}function T(_0x2d7da8){const _0x38136f=_0x27e79d;var _0x5f5765;return(_0x2d7da8==null?void 0x0:_0x2d7da8[_0x38136f(0x1ed)])===_0x2f51c9[_0x38136f(0x239)]&&_0x2d7da8[_0x38136f(0x295)]===!0x0&&((_0x5f5765=_0x2d7da8['properties'])==null?void 0x0:_0x5f5765['kind'])==='univer-docs-formula';}function E(_0x46625d,_0x46f5ea){const _0x164bfb=_0x27e79d;var _0x1528a5;return _0x46625d==null||(_0x1528a5=_0x46625d['customRanges'])==null?void 0x0:_0x1528a5['find'](_0x3ed73e=>_0x3ed73e[_0x164bfb(0x1b5)]===_0x46f5ea&&T(_0x3ed73e));}function Ve(_0x5024e9,_0x16579f,_0xaef3d5){const _0x5b8341=_0x27e79d;if(_0x16579f===_0xaef3d5){if(Ie[_0x5b8341(0x1f8)](_0x5024e9[_0x5b8341(0x1c8)][_0x16579f]))throw new w();return;}for(let _0xa37900=_0x16579f;_0xa37900<_0xaef3d5;_0xa37900++)if(_0x5024e9[_0x5b8341(0x1c8)][_0xa37900]===_0x1f118d[_0x5b8341(0x1f3)]||Ie[_0x5b8341(0x1f8)](_0x5024e9['dataStream'][_0xa37900]))throw new w();}function He(_0x2bce2f,_0x342b13){const _0x50fb1e=_0x27e79d;return{'startIndex':_0x342b13,'endIndex':_0x342b13,'rangeId':_0x2bce2f,'rangeType':_0x2f51c9[_0x50fb1e(0x239)],'wholeEntity':!0x0,'properties':{'kind':je}};}function D(_0x46b8e3){const _0x4efdac=_0x27e79d;return _0x46b8e3?_0x16095d[_0x4efdac(0x211)](_0x46b8e3):x();}function Ue(_0x15311f,_0x4fcb44,_0x40107c){const _0x183917=_0x27e79d;let _0x52c4b2=Ge(_0x15311f),_0x2a366e=_0x4fcb44==null?_0x52c4b2:_0x4fcb44,_0x1c60cc=_0x40107c==null?_0x2a366e:_0x40107c;return{'startOffset':We(Math[_0x183917(0x277)](_0x2a366e,_0x1c60cc),_0x52c4b2),'endOffset':We(Math[_0x183917(0x201)](_0x2a366e,_0x1c60cc),_0x52c4b2)};}function We(_0x200a10,_0x52be61){const _0xdeb432=_0x27e79d;return Math[_0xdeb432(0x201)](0x0,Math['min'](_0x200a10,_0x52be61));}function Ge(_0x121985){const _0x54a230=_0x27e79d;return _0x121985[_0x54a230(0x1c8)]['endsWith'](''+_0x1f118d[_0x54a230(0x1f3)]+_0x1f118d[_0x54a230(0x2a7)])?Math[_0x54a230(0x201)](0x0,_0x121985[_0x54a230(0x1c8)][_0x54a230(0x251)]-0x2):_0x121985[_0x54a230(0x1c8)]['endsWith'](_0x1f118d['SECTION_BREAK'])?Math[_0x54a230(0x201)](0x0,_0x121985[_0x54a230(0x1c8)]['length']-0x1):_0x121985[_0x54a230(0x1c8)]['length'];}function Ke(_0x4be196,_0x1491d9,_0x2fc644,_0x421861){_0x2fc644>_0x1491d9&&Ye(_0x4be196,_0x1491d9,_0x2fc644),Je(_0x4be196,_0x1491d9,_0x421861);}function qe(_0x10ce91,_0x332941,_0x18fabe){const _0x3b1027=_0x27e79d;var _0x1b0865,_0x5df3ea;let _0x483ea6=M(_0x10ce91),_0x592b0a=(_0x1b0865=_0x483ea6[_0x3b1027(0x2ac)])==null?void 0x0:_0x1b0865[_0x3b1027(0x220)](_0x36e91c=>_0x36e91c[_0x3b1027(0x1b5)]===_0x332941&&T(_0x36e91c));if(!_0x592b0a)return null;let _0x4b2a07=_0x442b9f(_0x592b0a);return Ke(_0x483ea6,_0x4b2a07[_0x3b1027(0x24e)],_0x4b2a07[_0x3b1027(0x290)],_0x18fabe),_0x483ea6[_0x3b1027(0x2ac)]=(_0x5df3ea=_0x483ea6[_0x3b1027(0x2ac)])==null?void 0x0:_0x5df3ea[_0x3b1027(0x22d)](_0xd377d1=>_0xd377d1[_0x3b1027(0x1b5)]!==_0x332941),_0x4b2a07[_0x3b1027(0x24e)]+_0x18fabe[_0x3b1027(0x251)];}function Je(_0x16d29c,_0x94f1b6,_0xde6120){const _0x37f476=_0x27e79d;_0xde6120&&(_0x16d29c['dataStream']=''+_0x16d29c['dataStream']['slice'](0x0,_0x94f1b6)+_0xde6120+_0x16d29c['dataStream'][_0x37f476(0x235)](_0x94f1b6),Xe(_0x16d29c,_0x94f1b6,_0xde6120[_0x37f476(0x251)]));}function Ye(_0x339bc7,_0x1d45d6,_0x4442d2){const _0x10f102=_0x27e79d;let _0x492e2e=_0x4442d2-_0x1d45d6;_0x339bc7[_0x10f102(0x1c8)]=''+_0x339bc7[_0x10f102(0x1c8)][_0x10f102(0x235)](0x0,_0x1d45d6)+_0x339bc7[_0x10f102(0x1c8)][_0x10f102(0x235)](_0x4442d2),Ze(_0x339bc7,_0x1d45d6,_0x492e2e);}function Xe(_0x333d75,_0x4e4c10,_0x1bc76d){const _0x4625bb=_0x27e79d;_0x333d75[_0x4625bb(0x217)]=O(_0x333d75[_0x4625bb(0x217)],_0x4e4c10,_0x1bc76d),_0x333d75['sectionBreaks']=O(_0x333d75[_0x4625bb(0x1be)],_0x4e4c10,_0x1bc76d),_0x333d75[_0x4625bb(0x291)]=O(_0x333d75[_0x4625bb(0x291)],_0x4e4c10,_0x1bc76d),_0x333d75[_0x4625bb(0x1e1)]=Qe(_0x333d75[_0x4625bb(0x1e1)],_0x4e4c10,_0x1bc76d),_0x333d75['tables']=$e(_0x333d75['tables'],_0x4e4c10,_0x1bc76d),_0x333d75['columnGroups']=A(_0x333d75['columnGroups'],_0x4e4c10,_0x1bc76d),_0x333d75['customRanges']=A(_0x333d75[_0x4625bb(0x2ac)],_0x4e4c10,_0x1bc76d),_0x333d75[_0x4625bb(0x1d9)]=A(_0x333d75['customDecorations'],_0x4e4c10,_0x1bc76d),_0x333d75[_0x4625bb(0x1d4)]=A(_0x333d75[_0x4625bb(0x1d4)],_0x4e4c10,_0x1bc76d);}function Ze(_0x5ccd83,_0x1c4403,_0x54bbfd){const _0x3a931d=_0x27e79d;var _0x23a773,_0x1608e4;_0x5ccd83[_0x3a931d(0x217)]=k(_0x5ccd83[_0x3a931d(0x217)],_0x1c4403,_0x54bbfd),_0x5ccd83[_0x3a931d(0x1be)]=k(_0x5ccd83[_0x3a931d(0x1be)],_0x1c4403,_0x54bbfd),_0x5ccd83['customBlocks']=k(_0x5ccd83[_0x3a931d(0x291)],_0x1c4403,_0x54bbfd),_0x5ccd83['textRuns']=(_0x23a773=et((_0x1608e4=_0x5ccd83[_0x3a931d(0x1e1)])==null?void 0x0:_0x1608e4[_0x3a931d(0x298)](_0x480a44=>({..._0x480a44,'startIndex':_0x480a44['st'],'endIndex':_0x480a44['ed']})),_0x1c4403,_0x54bbfd))==null?void 0x0:_0x23a773['map'](_0x5cb1af=>{let {startIndex:_0x2af28f,endIndex:_0x147006,..._0x50f5a1}=_0x5cb1af;return{..._0x50f5a1,'st':_0x2af28f,'ed':_0x147006};}),_0x5ccd83[_0x3a931d(0x271)]=et(_0x5ccd83['tables'],_0x1c4403,_0x54bbfd),_0x5ccd83[_0x3a931d(0x1af)]=j(_0x5ccd83[_0x3a931d(0x1af)],_0x1c4403,_0x54bbfd),_0x5ccd83[_0x3a931d(0x2ac)]=j(_0x5ccd83[_0x3a931d(0x2ac)],_0x1c4403,_0x54bbfd),_0x5ccd83['customDecorations']=j(_0x5ccd83[_0x3a931d(0x1d9)],_0x1c4403,_0x54bbfd),_0x5ccd83['blockRanges']=j(_0x5ccd83[_0x3a931d(0x1d4)],_0x1c4403,_0x54bbfd);}function O(_0x406bc8,_0x578c48,_0x3257ff){const _0x4fa684=_0x27e79d;return _0x406bc8==null?void 0x0:_0x406bc8[_0x4fa684(0x298)](_0x5d6afe=>_0x5d6afe[_0x4fa684(0x267)]>=_0x578c48?{..._0x5d6afe,'startIndex':_0x5d6afe['startIndex']+_0x3257ff}:_0x5d6afe);}function k(_0x1ddfb7,_0x24e6e9,_0x5c316b){const _0x5af5c4=_0x27e79d;let _0x5c448b=_0x24e6e9+_0x5c316b;return _0x1ddfb7==null?void 0x0:_0x1ddfb7[_0x5af5c4(0x298)](_0x4f5e40=>_0x4f5e40[_0x5af5c4(0x267)]>=_0x24e6e9&&_0x4f5e40['startIndex']<_0x5c448b?null:_0x4f5e40[_0x5af5c4(0x267)]>=_0x5c448b?{..._0x4f5e40,'startIndex':_0x4f5e40['startIndex']-_0x5c316b}:_0x4f5e40)['filter'](_0x5c8a79=>_0x5c8a79!=null);}function Qe(_0x5e2e4d,_0x3e9b7f,_0x6e5310){const _0x2dda91=_0x27e79d;return _0x5e2e4d==null?void 0x0:_0x5e2e4d[_0x2dda91(0x298)](_0x3a46f2=>_0x3a46f2['st']>=_0x3e9b7f?{..._0x3a46f2,'st':_0x3a46f2['st']+_0x6e5310,'ed':_0x3a46f2['ed']+_0x6e5310}:_0x3a46f2['ed']>_0x3e9b7f?{..._0x3a46f2,'ed':_0x3a46f2['ed']+_0x6e5310}:_0x3a46f2);}function A(_0x8f8c2c,_0x4eef44,_0x10338e){const _0x5a4632=_0x27e79d;return _0x8f8c2c==null?void 0x0:_0x8f8c2c[_0x5a4632(0x298)](_0x41f6c5=>_0x4e26c1(_0x41f6c5,_0x4eef44,_0x10338e));}function $e(_0x22c7ad,_0x2533c8,_0x2fa92b){const _0x186d3e=_0x27e79d;return _0x22c7ad==null?void 0x0:_0x22c7ad[_0x186d3e(0x298)](_0x5e99ff=>_0x54b0f6(_0x5e99ff,_0x2533c8,_0x2fa92b));}function j(_0x3a277f,_0x32ce4b,_0x28c84d){const _0x66887b=_0x27e79d;return _0x3a277f==null?void 0x0:_0x3a277f['map'](_0x2694bf=>_0x53e728(_0x2694bf,_0x32ce4b,_0x28c84d))[_0x66887b(0x22d)](_0x20711f=>_0x20711f!=null);}function et(_0x7cbb08,_0x163c2e,_0x1aa59d){return _0x7cbb08==null?void 0x0:_0x7cbb08['map'](_0x4ad362=>_0x1b2d84(_0x4ad362,_0x163c2e,_0x1aa59d))['filter'](_0x2e5966=>_0x2e5966!=null);}function M(_0x1c5ea0){const _0x5e639a=_0x27e79d;if(!_0x1c5ea0[_0x5e639a(0x1c9)])throw Error(_0x5e639a(0x1b7));return _0x1c5ea0['body'];}function N(_0x137e73){'@babel/helpers - typeof';const _0x554722=_0x27e79d;return N=typeof Symbol==_0x554722(0x1da)&&typeof Symbol[_0x554722(0x1ef)]==_0x554722(0x1e2)?function(_0x4e9307){return typeof _0x4e9307;}:function(_0xa00d47){const _0x51b695=_0x554722;return _0xa00d47&&typeof Symbol==_0x51b695(0x1da)&&_0xa00d47[_0x51b695(0x262)]===Symbol&&_0xa00d47!==Symbol[_0x51b695(0x1cf)]?'symbol':typeof _0xa00d47;},N(_0x137e73);}function tt(_0x11624f,_0x151603){const _0x2c9624=_0x27e79d;if(N(_0x11624f)!=_0x2c9624(0x27d)||!_0x11624f)return _0x11624f;var _0x2e29ad=_0x11624f[Symbol[_0x2c9624(0x275)]];if(_0x2e29ad!==void 0x0){var _0x4ca71d=_0x2e29ad[_0x2c9624(0x23f)](_0x11624f,_0x151603||'default');if(N(_0x4ca71d)!=_0x2c9624(0x27d))return _0x4ca71d;throw TypeError(_0x2c9624(0x22f));}return(_0x151603==='string'?String:Number)(_0x11624f);}function nt(_0xd0f0d2){const _0x30f1e4=_0x27e79d;var _0x5703f8=tt(_0xd0f0d2,_0x30f1e4(0x1bd));return N(_0x5703f8)==_0x30f1e4(0x1e2)?_0x5703f8:_0x5703f8+'';}function P(_0x294ae5,_0x5ee1df,_0x553f49){const _0x1b7faf=_0x27e79d;return(_0x5ee1df=nt(_0x5ee1df))in _0x294ae5?Object[_0x1b7faf(0x25a)](_0x294ae5,_0x5ee1df,{'value':_0x553f49,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x294ae5[_0x5ee1df]=_0x553f49,_0x294ae5;}var F=class extends _0x1df972{constructor(..._0xf3cc9d){const _0x10005e=_0x27e79d;super(..._0xf3cc9d),P(this,_0x10005e(0x289),new Map()),P(this,_0x10005e(0x224),new Map()),P(this,'_loadErrors',new Map()),P(this,'_change$',new _0x1ab380()),P(this,_0x10005e(0x1ca),this[_0x10005e(0x242)]['asObservable']());}[_0x27e79d(0x264)](_0x5d6cb0,_0x507a19){const _0x1329e1=_0x27e79d;var _0xbb6a88;let _0x1c7ae2=(_0xbb6a88=this[_0x1329e1(0x289)]['get'](_0x5d6cb0))==null?void 0x0:_0xbb6a88['formulas'][_0x507a19];return _0x1c7ae2?_0x16095d[_0x1329e1(0x211)](_0x1c7ae2):void 0x0;}['getFormulas'](_0x7ab2d){const _0x2307c3=_0x27e79d;var _0x3e4e34,_0x3d0489;return _0x16095d[_0x2307c3(0x211)]((_0x3e4e34=(_0x3d0489=this[_0x2307c3(0x289)]['get'](_0x7ab2d))==null?void 0x0:_0x3d0489[_0x2307c3(0x25d)])==null?{}:_0x3e4e34);}[_0x27e79d(0x21d)](_0x3da921){const _0xdafcab=_0x27e79d;let _0x4d20b9=this[_0xdafcab(0x289)][_0xdafcab(0x29a)](_0x3da921);return _0x4d20b9?_0x16095d['deepClone'](_0x4d20b9):void 0x0;}[_0x27e79d(0x297)](_0x450106,_0x5ad8a4,_0x4c9a78){const _0x163579=_0x27e79d;return this[_0x163579(0x20b)](_0x450106,{[_0x5ad8a4]:_0x4c9a78});}[_0x27e79d(0x256)](_0x96a8db,_0x3ee552){const _0x1fa7b0=_0x27e79d;return this['_loadErrors'][_0x1fa7b0(0x1f8)](_0x96a8db)||!S(_0x3ee552)?!0x1:(this[_0x1fa7b0(0x289)][_0x1fa7b0(0x1c1)](_0x96a8db,_0x16095d['deepClone'](_0x3ee552)),this[_0x1fa7b0(0x242)][_0x1fa7b0(0x1bf)]({'unitId':_0x96a8db}),!0x0);}[_0x27e79d(0x20b)](_0x272b58,_0x4b607e){const _0x1c8c2c=_0x27e79d;var _0x5ec128;if(this[_0x1c8c2c(0x1d0)][_0x1c8c2c(0x1f8)](_0x272b58)||!Object[_0x1c8c2c(0x24b)](_0x4b607e)[_0x1c8c2c(0x251)]||!S({'schemaVersion':0x1,'formulas':_0x4b607e}))return!0x1;let _0x9edf75=(_0x5ec128=this[_0x1c8c2c(0x289)][_0x1c8c2c(0x29a)](_0x272b58))==null?x():_0x5ec128,_0x4696dc=_0x16095d['deepClone'](_0x9edf75);return Object[_0x1c8c2c(0x274)](_0x4696dc[_0x1c8c2c(0x25d)],_0x16095d[_0x1c8c2c(0x211)](_0x4b607e)),this[_0x1c8c2c(0x289)]['set'](_0x272b58,_0x4696dc),this['_change$'][_0x1c8c2c(0x1bf)]({'unitId':_0x272b58,'rangeIds':Object[_0x1c8c2c(0x24b)](_0x4b607e)}),!0x0;}[_0x27e79d(0x205)](_0x5911d1,_0x2f3a45){const _0x96acf5=_0x27e79d;if(this[_0x96acf5(0x1d0)][_0x96acf5(0x1f8)](_0x5911d1))return!0x1;let _0xf76dc3=this['_resources']['get'](_0x5911d1);if(!(_0xf76dc3!=null&&_0xf76dc3[_0x96acf5(0x25d)][_0x2f3a45]))return!0x1;let _0xf3568b=_0x16095d[_0x96acf5(0x211)](_0xf76dc3);return delete _0xf3568b[_0x96acf5(0x25d)][_0x2f3a45],this[_0x96acf5(0x289)][_0x96acf5(0x1c1)](_0x5911d1,_0xf3568b),this[_0x96acf5(0x242)]['next']({'unitId':_0x5911d1,'rangeIds':[_0x2f3a45]}),!0x0;}[_0x27e79d(0x2a9)](_0x516a1d,_0x45328f){const _0x526de3=_0x27e79d;return _0x45328f&&typeof _0x45328f=='object'&&_0x526de3(0x1ce)in _0x45328f&&_0x45328f[_0x526de3(0x1ce)]!==0x1?(this[_0x526de3(0x1de)](_0x516a1d,_0x45328f,_0x526de3(0x28a)),!0x1):S(_0x45328f)?(this[_0x526de3(0x289)]['set'](_0x516a1d,_0x16095d[_0x526de3(0x211)](_0x45328f)),this['_rawResources'][_0x526de3(0x266)](_0x516a1d),this[_0x526de3(0x1d0)]['delete'](_0x516a1d),this[_0x526de3(0x242)][_0x526de3(0x1bf)]({'unitId':_0x516a1d}),!0x0):(this[_0x526de3(0x1de)](_0x516a1d,_0x45328f,_0x526de3(0x203)),!0x1);}[_0x27e79d(0x248)](_0x12c76e){const _0x29c975=_0x27e79d;let _0x1ca00b=this[_0x29c975(0x289)][_0x29c975(0x29a)](_0x12c76e);return _0x1ca00b?_0x16095d['deepClone'](_0x1ca00b):this[_0x29c975(0x224)]['has'](_0x12c76e)?_0x16095d[_0x29c975(0x211)](this[_0x29c975(0x224)][_0x29c975(0x29a)](_0x12c76e)):x();}[_0x27e79d(0x26f)](_0x5dacf9){const _0x48b823=_0x27e79d;return this[_0x48b823(0x1d0)][_0x48b823(0x29a)](_0x5dacf9);}[_0x27e79d(0x265)](_0xa5b71e){const _0x38cf2b=_0x27e79d;this[_0x38cf2b(0x289)][_0x38cf2b(0x266)](_0xa5b71e),this[_0x38cf2b(0x224)][_0x38cf2b(0x266)](_0xa5b71e),this[_0x38cf2b(0x1d0)][_0x38cf2b(0x266)](_0xa5b71e),this['_change$'][_0x38cf2b(0x1bf)]({'unitId':_0xa5b71e});}[_0x27e79d(0x25c)](){const _0xe16338=_0x27e79d;this[_0xe16338(0x289)]['clear'](),this[_0xe16338(0x224)][_0xe16338(0x214)](),this[_0xe16338(0x1d0)][_0xe16338(0x214)](),this[_0xe16338(0x242)]['complete'](),super[_0xe16338(0x25c)]();}[_0x27e79d(0x1de)](_0x22800f,_0x3c039f,_0x52a7d6){const _0x11ff6f=_0x27e79d;this[_0x11ff6f(0x289)][_0x11ff6f(0x266)](_0x22800f),this[_0x11ff6f(0x224)]['set'](_0x22800f,_0x16095d['deepClone'](_0x3c039f)),this[_0x11ff6f(0x1d0)]['set'](_0x22800f,_0x52a7d6),this[_0x11ff6f(0x242)][_0x11ff6f(0x1bf)]({'unitId':_0x22800f});}};function _0x1f6c(){const _0x59fa6f=['getTextRanges','customDecorations','function','8261016Njahxq','resolveText','presentationChanged$','_preserveInvalid','_cacheEligibilityService','paragraph','textRuns','symbol','COLUMN_START','asObservable','notifyTextChanged','getOwnPropertyDescriptor','lastValue','cell','data','resources','undoMutation','_registrations','rangeType','docs-formula.command.insert','iterator','forEach','MUTATION','documentData','PARAGRAPH','ERROR','packageName','pluginName','externalReferences','has','TABLE_CELL_END','_syncUnit','registerProvider','getUnit','expectedFormula','selection','@univerjs-pro/docs-formula','getUnitId','max','_injector','invalid-resource','version','removeFormula','resolved','4OlwhME','editOp','BLOCK_START','disabled','setFormulas','710xwmloQ','resolveFormula','EMPTY','687291lYENsL','document','deepClone','DOC','values','clear','expectedReferenceRevision','push','paragraphs','docs-formula.mutation.remove-formula','number','parse','degradeBody','previousDocumentData','getResource','source','presentation','find','nextResource','_configService','start','_rawResources','referenceRevision','liveResult','replaceDocRanges','_pendingUnitIds','COMMAND','entries','_univerInstanceService','cursorOffset','filter','getAllUnitsForType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','TABLE_ROW_START','_syncScheduled','_instanceService','_registrationService','slice','syncUnit','getSnapshot','subscribe','CUSTOM','type','CUSTOM_BLOCK','registerCommand','getBody','decorate','call','previousResource','BLOCK_END','_change$','formulaResult$','resourceUndo','_formulaKeys','expectedNumberFormat','accessor','serialize','docs-formula.mutation.set-resource','status','keys','_isDisposed','stringify','startOffset','references','redoMutation','length','_commandService','onStarting','name','pushUndoRedo','setResource','4974480UJpdrr','isInteger','docs-formula.command.update','defineProperty','TABLE_ROW_END','dispose','formulas','resolveBinding','stale','getRevision','sequenceNodesBuilder','constructor','getFormulaValueSync','getFormula','removeUnit','delete','startIndex','identity','some','formula','disposeWithMe','15ovdfPq','1744652xGuQGV','fromEntries','getLoadError','add','tables','docs-formula.command.set-number-format','_presentationChanged$','assign','toPrimitive','target','min','resource','UNIVER_DOC','7zXRTgZ','_formulaService','12875886rAMJmi','object','paragraphId','from','params','pattern','registerPluginResource','position','success','unregisterUnit','_config','resourceRedo','SUCCESS','_resources','unsupported-version','setConfig','docs-formula.command.convert-to-text','register','deleteLength','docs-formula.config','endOffset','customBlocks','insert','_docFormulaModel','68604DnuXNw','wholeEntity','model','setFormula','map','complete','get','documentRedo','every','getResult','_deleteRegistration','degradeDocumentData','externalMutations','sort','color','661394KufALR','docs-formula.command.remove','empty','trim','SECTION_BREAK','_hostExternalReferenceModel','load','_service','trigger','customRanges','nextDocumentData','formulaId','columnGroups','_updateFormulaResult','text','endIndex','_model','unitAdded$','rangeId','unregister','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','segmentId','TABLE_END','error','includes','config','string','sectionBreaks','next','DOC_FORMULA_PLUGIN','set','COLUMN_GROUP_END','docs-formula.command.replace-with-text','_resourceManagerService','getFormulas','registerFormulaWithRange','PENDING','dataStream','body','change$','_queueSync','unitId','_setPresentation','schemaVersion','prototype','_loadErrors','insertLength','isArray','updates','blockRanges','deleteFormula','univer-docs-formula','numberFormat'];_0x1f6c=function(){return _0x59fa6f;};return _0x1f6c();}let rt=function(_0x11483b){const _0x264209=_0x27e79d;return _0x11483b[_0x264209(0x20e)]=_0x264209(0x2a5),_0x11483b[_0x264209(0x1c7)]='pending',_0x11483b[_0x264209(0x288)]=_0x264209(0x284),_0x11483b[_0x264209(0x1f4)]=_0x264209(0x1ba),_0x11483b;}({});function I(_0x2d9e54,_0x377d3d){return function(_0x4195d0,_0x495932){_0x377d3d(_0x4195d0,_0x495932,_0x2d9e54);};}function L(_0x34243c,_0x4aba95,_0x14c53a,_0x4f7088){const _0x1867fc=_0x27e79d;var _0x319a03=arguments[_0x1867fc(0x251)],_0x20e71e=_0x319a03<0x3?_0x4aba95:_0x4f7088===null?_0x4f7088=Object[_0x1867fc(0x1e6)](_0x4aba95,_0x14c53a):_0x4f7088,_0x473f84;if(typeof Reflect==_0x1867fc(0x27d)&&typeof Reflect[_0x1867fc(0x23e)]==_0x1867fc(0x1da))_0x20e71e=Reflect['decorate'](_0x34243c,_0x4aba95,_0x14c53a,_0x4f7088);else{for(var _0x13c35f=_0x34243c[_0x1867fc(0x251)]-0x1;_0x13c35f>=0x0;_0x13c35f--)(_0x473f84=_0x34243c[_0x13c35f])&&(_0x20e71e=(_0x319a03<0x3?_0x473f84(_0x20e71e):_0x319a03>0x3?_0x473f84(_0x4aba95,_0x14c53a,_0x20e71e):_0x473f84(_0x4aba95,_0x14c53a))||_0x20e71e);}return _0x319a03>0x3&&_0x20e71e&&Object[_0x1867fc(0x25a)](_0x4aba95,_0x14c53a,_0x20e71e),_0x20e71e;}let R=class extends _0x1df972{constructor(_0x173822,_0x3424d3,_0x1079cd){const _0x465fe0=_0x27e79d;super(),this[_0x465fe0(0x1b3)]=_0x173822,this[_0x465fe0(0x234)]=_0x3424d3,this[_0x465fe0(0x2a8)]=_0x1079cd,P(this,_0x465fe0(0x1ec),new Map()),P(this,_0x465fe0(0x245),new Map()),P(this,_0x465fe0(0x273),new _0x1ab380()),P(this,_0x465fe0(0x1dd),this['_presentationChanged$'][_0x465fe0(0x1e4)]()),this[_0x465fe0(0x26b)](this['_registrationService'][_0x465fe0(0x243)]['subscribe'](_0x19a299=>{const _0x3d9227=_0x465fe0;for(let _0x155286 of Object[_0x3d9227(0x213)](_0x19a299))for(let _0x33059e of Object[_0x3d9227(0x213)](_0x155286))_0x33059e['forEach'](_0x281a8f=>this[_0x3d9227(0x1b0)](_0x281a8f));}));}[_0x27e79d(0x236)](_0xf022c6){const _0x33c570=_0x27e79d;var _0x2ebf81,_0x6338eb;let _0x28f6ec=_0xf022c6[_0x33c570(0x200)](),_0x497f54=(_0x2ebf81=(_0x6338eb=_0xf022c6[_0x33c570(0x237)]()[_0x33c570(0x1c9)])==null||(_0x6338eb=_0x6338eb[_0x33c570(0x2ac)])==null?void 0x0:_0x6338eb[_0x33c570(0x22d)](T))==null?[]:_0x2ebf81,_0xf4da11=this[_0x33c570(0x1b3)][_0x33c570(0x1c5)](_0x28f6ec),_0x33bef4=new Set();for(let _0x47ecb3 of _0x497f54){let _0x394589=_0xf4da11[_0x47ecb3[_0x33c570(0x1b5)]];_0x394589&&(_0x33bef4[_0x33c570(0x270)](z(_0x28f6ec,_0x47ecb3['rangeId'])),this['register']({'unitId':_0x28f6ec,'rangeId':_0x47ecb3['rangeId']},_0x394589));}for(let _0x38d29d of Array[_0x33c570(0x27f)](this[_0x33c570(0x1ec)][_0x33c570(0x213)]()))_0x38d29d[_0x33c570(0x1cc)]===_0x28f6ec&&!_0x33bef4['has'](z(_0x38d29d['unitId'],_0x38d29d['rangeId']))&&this[_0x33c570(0x1b6)](_0x38d29d);}[_0x27e79d(0x28d)](_0x4970a6,_0x2dd369){const _0x480bf2=_0x27e79d;let _0x33952e=z(_0x4970a6[_0x480bf2(0x1cc)],_0x4970a6[_0x480bf2(0x1b5)]),_0x4fdb49=this[_0x480bf2(0x1ec)]['get'](_0x33952e),_0x5465ce=this['_hostExternalReferenceModel'][_0x480bf2(0x260)](_0x4970a6['unitId']);if(_0x4fdb49&&_0x4fdb49[_0x480bf2(0x1bc)][_0x480bf2(0x26a)]===_0x2dd369['formula']&&_0x4fdb49[_0x480bf2(0x225)]===_0x5465ce){var _0x3ef48b;_0x4fdb49[_0x480bf2(0x1bc)]=_0x2dd369;let _0x33ae65=_0x4fdb49[_0x480bf2(0x1ae)]?(_0x3ef48b=this[_0x480bf2(0x234)][_0x480bf2(0x263)](_0x4fdb49['unitId'],_0x4fdb49[_0x480bf2(0x1cc)],_0x4fdb49[_0x480bf2(0x1ae)]))==null?void 0x0:_0x3ef48b:void 0x0;_0x4fdb49[_0x480bf2(0x226)]=_0x33ae65,this[_0x480bf2(0x1cd)](_0x33952e,B(_0x2dd369,_0x33ae65));return;}_0x4fdb49!=null&&_0x4fdb49[_0x480bf2(0x1ae)]&&this[_0x480bf2(0x29e)](_0x4fdb49);let _0x187a2f={..._0x4970a6,'config':_0x2dd369,'referenceRevision':_0x5465ce,'presentation':B(_0x2dd369,void 0x0)};if(this[_0x480bf2(0x1ec)]['set'](_0x33952e,_0x187a2f),!_0x2dd369[_0x480bf2(0x26a)][_0x480bf2(0x2a6)]())return;let _0xdf4249=this[_0x480bf2(0x234)][_0x480bf2(0x1c6)](_0x4970a6[_0x480bf2(0x1cc)],_0x4970a6[_0x480bf2(0x1cc)],_0x2dd369[_0x480bf2(0x26a)],void 0x0,{'rangeId':_0x4970a6[_0x480bf2(0x1b5)]},_0xe37e06[_0x480bf2(0x212)],_0x4970a6['rangeId']);_0x187a2f[_0x480bf2(0x1ae)]=_0xdf4249,this[_0x480bf2(0x245)][_0x480bf2(0x1c1)](_0xdf4249,_0x33952e);}[_0x27e79d(0x1b6)](_0x3df249){const _0x4c23a3=_0x27e79d;let _0x17f663=z(_0x3df249[_0x4c23a3(0x1cc)],_0x3df249['rangeId']),_0x3d36bb=this[_0x4c23a3(0x1ec)][_0x4c23a3(0x29a)](_0x17f663);_0x3d36bb&&(this['_deleteRegistration'](_0x3d36bb),this[_0x4c23a3(0x1ec)]['delete'](_0x17f663));}['unregisterUnit'](_0x2b3d5f){const _0xac9647=_0x27e79d;for(let _0x46af8d of Array[_0xac9647(0x27f)](this['_registrations']['values']()))_0x46af8d[_0xac9647(0x1cc)]===_0x2b3d5f&&this[_0xac9647(0x1b6)](_0x46af8d);}['getPresentation'](_0x4e0a7e){const _0x5889b8=_0x27e79d;var _0x193311;return(_0x193311=this['_registrations'][_0x5889b8(0x29a)](z(_0x4e0a7e['unitId'],_0x4e0a7e[_0x5889b8(0x1b5)])))==null?void 0x0:_0x193311[_0x5889b8(0x21f)];}[_0x27e79d(0x29d)](_0x2e67d9){const _0x23b578=_0x27e79d;let _0x1fb329=this[_0x23b578(0x1ec)][_0x23b578(0x29a)](z(_0x2e67d9[_0x23b578(0x1cc)],_0x2e67d9['rangeId']));return _0x1fb329?V(_0x1fb329):void 0x0;}['getRegisteredFormulas'](){const _0x412a4d=_0x27e79d;return Array[_0x412a4d(0x27f)](this[_0x412a4d(0x1ec)][_0x412a4d(0x213)](),_0x424eb8=>({'identity':{'unitId':_0x424eb8[_0x412a4d(0x1cc)],'rangeId':_0x424eb8[_0x412a4d(0x1b5)]},'config':_0x424eb8[_0x412a4d(0x1bc)],'referenceRevision':_0x424eb8['referenceRevision'],..._0x424eb8[_0x412a4d(0x226)]?{'liveResult':_0x424eb8[_0x412a4d(0x226)]}:null}));}[_0x27e79d(0x25c)](){const _0x5a3040=_0x27e79d;for(let _0xeb873b of this[_0x5a3040(0x1ec)][_0x5a3040(0x213)]())this[_0x5a3040(0x29e)](_0xeb873b);this[_0x5a3040(0x1ec)][_0x5a3040(0x214)](),this['_formulaKeys'][_0x5a3040(0x214)](),this['_presentationChanged$'][_0x5a3040(0x299)](),super[_0x5a3040(0x25c)]();}[_0x27e79d(0x1b0)](_0x166fd0){const _0x2e4836=_0x27e79d;let _0x21b004=this[_0x2e4836(0x245)][_0x2e4836(0x29a)](_0x166fd0[_0x2e4836(0x1ae)]),_0x4ed641=_0x21b004?this[_0x2e4836(0x1ec)][_0x2e4836(0x29a)](_0x21b004):void 0x0;!_0x21b004||!_0x4ed641||(_0x4ed641[_0x2e4836(0x226)]=_0x166fd0,this[_0x2e4836(0x1cd)](_0x21b004,B(_0x4ed641[_0x2e4836(0x1bc)],_0x166fd0)));}[_0x27e79d(0x1cd)](_0x41ae31,_0x272fa0){const _0x4124b4=_0x27e79d;var _0x4ade20,_0x249ad6,_0x1f4ed1;let _0x399f7a=this[_0x4124b4(0x1ec)][_0x4124b4(0x29a)](_0x41ae31);if(!_0x399f7a||it(_0x399f7a[_0x4124b4(0x21f)],_0x272fa0))return;let _0x301a0f=_0x399f7a[_0x4124b4(0x21f)],_0x32aa46=V(_0x399f7a);_0x399f7a[_0x4124b4(0x21f)]=_0x272fa0,this[_0x4124b4(0x273)][_0x4124b4(0x1bf)]({'unitId':_0x399f7a[_0x4124b4(0x1cc)],'rangeId':_0x399f7a['rangeId'],'presentation':_0x272fa0,'previousPresentation':_0x301a0f,'result':V(_0x399f7a),'previousResult':{..._0x32aa46,..._0x301a0f,'value':(_0x4ade20=_0x301a0f[_0x4124b4(0x1e8)])==null?void 0x0:_0x4ade20['v'],'valueType':(_0x249ad6=(_0x1f4ed1=_0x301a0f[_0x4124b4(0x1e8)])==null?void 0x0:_0x1f4ed1['t'])==null?void 0x0:_0x249ad6}});}['_deleteRegistration'](_0x50b09c){const _0x3be655=_0x27e79d;_0x50b09c['formulaId']&&(this[_0x3be655(0x234)][_0x3be655(0x1d5)](_0x50b09c['unitId'],_0x50b09c[_0x3be655(0x1cc)],[_0x50b09c[_0x3be655(0x1ae)]]),this[_0x3be655(0x245)][_0x3be655(0x266)](_0x50b09c[_0x3be655(0x1ae)]));}};R=L([I(0x0,_0x25156c(F)),I(0x1,_0x25156c(_0x1fbc67)),I(0x2,_0x25156c(_0x2db26f))],R);function z(_0x142901,_0x3e008b){return _0x142901+'\x00'+_0x3e008b;}function B(_0x4ee45f,_0x32ff41){const _0x180ecd=_0x27e79d;return _0x4a5c5a({'numberFormat':_0x4ee45f[_0x180ecd(0x1d7)],'lastValue':_0x4ee45f['lastValue'],'result':_0x32ff41});}function V(_0x43a27c){const _0x5083e7=_0x27e79d;var _0x13f0ad,_0x59bf72,_0x216b60,_0x4c1ad6;let _0x175135=_0x43a27c[_0x5083e7(0x21f)],_0x4eaefe=_0x43a27c[_0x5083e7(0x1bc)]['formula'][_0x5083e7(0x2a6)]()?_0x175135[_0x5083e7(0x25f)]||_0x175135[_0x5083e7(0x1e8)]==null?'pending':((_0x13f0ad=_0x43a27c[_0x5083e7(0x226)])==null?void 0x0:_0x13f0ad[_0x5083e7(0x24a)])===_0x254812[_0x5083e7(0x1f4)]?'error':'success':_0x5083e7(0x2a5);return{..._0x175135,'status':_0x4eaefe,'value':(_0x59bf72=_0x175135[_0x5083e7(0x1e8)])==null?void 0x0:_0x59bf72['v'],'valueType':(_0x216b60=(_0x4c1ad6=_0x175135[_0x5083e7(0x1e8)])==null?void 0x0:_0x4c1ad6['t'])==null?void 0x0:_0x216b60};}function it(_0x326d44,_0x231859){const _0x9f2792=_0x27e79d;var _0x3f9b04,_0x142fe0,_0x2df335,_0x54f861;return _0x326d44['text']===_0x231859['text']&&_0x326d44[_0x9f2792(0x2a2)]===_0x231859[_0x9f2792(0x2a2)]&&_0x326d44[_0x9f2792(0x281)]===_0x231859[_0x9f2792(0x281)]&&_0x326d44['source']===_0x231859[_0x9f2792(0x21e)]&&_0x326d44[_0x9f2792(0x25f)]===_0x231859['stale']&&((_0x3f9b04=_0x326d44[_0x9f2792(0x1e8)])==null?void 0x0:_0x3f9b04['t'])===((_0x142fe0=_0x231859[_0x9f2792(0x1e8)])==null?void 0x0:_0x142fe0['t'])&&Object['is']((_0x2df335=_0x326d44['cell'])==null?void 0x0:_0x2df335['v'],(_0x54f861=_0x231859['cell'])==null?void 0x0:_0x54f861['v']);}const at={'id':'docs-formula.mutation.set-formula','type':_0x529668[_0x27e79d(0x1f1)],'handler':(_0x4a39d6,_0x28fe79)=>!(_0x28fe79!=null&&_0x28fe79[_0x27e79d(0x1cc)])||!_0x28fe79['rangeId']||!_0x28fe79[_0x27e79d(0x1bc)]?!0x1:_0x4a39d6[_0x27e79d(0x29a)](F)['setFormula'](_0x28fe79[_0x27e79d(0x1cc)],_0x28fe79[_0x27e79d(0x1b5)],_0x28fe79['config'])},ot={'id':_0x27e79d(0x218),'type':_0x529668[_0x27e79d(0x1f1)],'handler':(_0x10448f,_0x3589f1)=>!(_0x3589f1!=null&&_0x3589f1[_0x27e79d(0x1cc)])||!_0x3589f1[_0x27e79d(0x1b5)]?!0x1:_0x10448f[_0x27e79d(0x29a)](F)[_0x27e79d(0x205)](_0x3589f1[_0x27e79d(0x1cc)],_0x3589f1[_0x27e79d(0x1b5)])},H={'id':_0x27e79d(0x249),'type':_0x529668[_0x27e79d(0x1f1)],'handler':(_0x25f85f,_0x3ed384)=>!(_0x3ed384!=null&&_0x3ed384[_0x27e79d(0x1cc)])||!_0x3ed384['resource']?!0x1:_0x25f85f['get'](F)['setResource'](_0x3ed384[_0x27e79d(0x1cc)],_0x3ed384[_0x27e79d(0x278)])},U={'id':'docs-formula.mutation.set-last-values','type':_0x529668[_0x27e79d(0x1f1)],'handler':(_0xbb5f07,_0x25dbf4)=>{const _0x3bb9d2=_0x27e79d;if(!(_0x25dbf4!=null&&_0x25dbf4[_0x3bb9d2(0x1cc)])||!_0x25dbf4[_0x3bb9d2(0x1d3)][_0x3bb9d2(0x251)])return!0x1;let _0x435d5e=_0xbb5f07[_0x3bb9d2(0x29a)](F),_0x3d91b8=_0xbb5f07['get'](_0x2db26f),_0x484b14=_0x435d5e[_0x3bb9d2(0x21d)](_0x25dbf4['unitId']);if(!_0x484b14)return!0x1;let _0x26855e=_0x16095d[_0x3bb9d2(0x211)](_0x484b14),_0x148bdc=!0x1;for(let _0x54efbf of _0x25dbf4[_0x3bb9d2(0x1d3)]){var _0x1853fa,_0x1401f0,_0x545ae1,_0x7141e6;let _0x3dc184=_0x26855e[_0x3bb9d2(0x25d)][_0x54efbf['rangeId']];!_0x3dc184||_0x3dc184[_0x3bb9d2(0x26a)]!==_0x54efbf[_0x3bb9d2(0x1fd)]||((_0x1853fa=_0x3dc184[_0x3bb9d2(0x1d7)])==null?void 0x0:_0x1853fa['pattern'])!==_0x54efbf[_0x3bb9d2(0x246)]||_0x3d91b8['getRevision'](_0x25dbf4[_0x3bb9d2(0x1cc)])!==_0x54efbf[_0x3bb9d2(0x215)]||(((_0x1401f0=_0x3dc184[_0x3bb9d2(0x1e7)])==null?void 0x0:_0x1401f0['v'])!==_0x54efbf[_0x3bb9d2(0x1e7)]['v']||((_0x545ae1=_0x3dc184[_0x3bb9d2(0x1e7)])==null?void 0x0:_0x545ae1['t'])!==_0x54efbf['lastValue']['t']||((_0x7141e6=_0x3dc184['lastValue'])==null?void 0x0:_0x7141e6[_0x3bb9d2(0x281)])!==_0x54efbf[_0x3bb9d2(0x1e7)][_0x3bb9d2(0x281)])&&(_0x3dc184['lastValue']=_0x16095d[_0x3bb9d2(0x211)](_0x54efbf[_0x3bb9d2(0x1e7)]),_0x148bdc=!0x0);}return!_0x148bdc||_0x435d5e[_0x3bb9d2(0x256)](_0x25dbf4[_0x3bb9d2(0x1cc)],_0x26855e);}},W={'id':_0x27e79d(0x1ee),'type':_0x529668[_0x27e79d(0x229)],'handler':(_0x1e7b9f,_0x41e62d)=>{const _0xa239a2=_0x27e79d;var _0x49aa69;if(!(_0x41e62d!=null&&_0x41e62d[_0xa239a2(0x26a)][_0xa239a2(0x2a6)]()))return!0x1;let _0x2d85cc=K(_0x1e7b9f,_0x41e62d[_0xa239a2(0x1cc)],'');if(!_0x2d85cc)return!0x1;let _0x100156=pt(_0x41e62d[_0xa239a2(0x276)],_0x2d85cc[_0xa239a2(0x1c9)],ft(_0x1e7b9f,_0x2d85cc['unitId']));if(!_0x100156)return!0x1;let _0x2241e8=mt(_0x1e7b9f,_0x2d85cc[_0xa239a2(0x1cc)],_0x41e62d[_0xa239a2(0x26a)],(_0x49aa69=_0x41e62d[_0xa239a2(0x1f7)])==null?[]:_0x49aa69);if(!_0x2241e8)return!0x1;let _0x34e6cd=ht(_0x2d85cc[_0xa239a2(0x1c9)],_0x2d85cc[_0xa239a2(0x296)],_0x2d85cc['unitId']),_0x301ead=gt({'documentData':_0x2d85cc['documentData'],'resource':_0x2d85cc[_0xa239a2(0x278)],'rangeId':_0x34e6cd,'config':{'formula':_0x41e62d[_0xa239a2(0x26a)],..._0x41e62d['numberFormat']?{'numberFormat':_0x41e62d[_0xa239a2(0x1d7)]}:null},'startOffset':_0x100156[_0xa239a2(0x24e)],'endOffset':_0x100156[_0xa239a2(0x290)]});if(!_0x301ead)return!0x1;let _0x415f3d=_0x533c27(_0x1e7b9f,_0x2d85cc[_0xa239a2(0x1cc)],_0x2241e8);return!_0x415f3d||!q({'accessor':_0x1e7b9f,'document':_0x2d85cc['document'],'unitId':_0x2d85cc[_0xa239a2(0x1cc)],'trigger':W['id'],'rangeId':_0x34e6cd,'previousResource':_0x2d85cc['resource'],'nextResource':_0x301ead[_0xa239a2(0x221)],'previousDocumentData':_0x2d85cc['documentData'],'nextDocumentData':_0x301ead[_0xa239a2(0x2ad)],'cursorOffset':_0x301ead['cursorOffset'],'externalMutations':_0x415f3d})?!0x1:{'rangeId':_0x34e6cd,'startOffset':_0x301ead['cursorOffset']-0x1,'endOffset':_0x301ead[_0xa239a2(0x22c)]};}},G={'id':_0x27e79d(0x259),'type':_0x529668[_0x27e79d(0x229)],'handler':(_0x22b06a,_0x56b5ea)=>{const _0x13db66=_0x27e79d;var _0x160771;if(!(_0x56b5ea!=null&&_0x56b5ea[_0x13db66(0x1b5)])||!_0x56b5ea['formula']['trim']())return!0x1;let _0x4a62ef=K(_0x22b06a,_0x56b5ea[_0x13db66(0x1cc)],''),_0x5a9a1a=_0x4a62ef==null?void 0x0:_0x4a62ef['model']['getFormula'](_0x4a62ef[_0x13db66(0x1cc)],_0x56b5ea['rangeId']),_0x379c18=_0x4a62ef?E(_0x4a62ef['documentData'][_0x13db66(0x1c9)],_0x56b5ea['rangeId']):void 0x0;if(!_0x4a62ef||!_0x5a9a1a||!_0x379c18)return!0x1;let _0x12558d=mt(_0x22b06a,_0x4a62ef[_0x13db66(0x1cc)],_0x56b5ea[_0x13db66(0x26a)],(_0x160771=_0x56b5ea[_0x13db66(0x1f7)])==null?[]:_0x160771);if(!_0x12558d)return!0x1;let _0x2088bd=_0x533c27(_0x22b06a,_0x4a62ef['unitId'],_0x12558d);if(!_0x2088bd)return!0x1;let _0x57ba43=Ct(_0x4a62ef[_0x13db66(0x278)]);return _0x57ba43['formulas'][_0x56b5ea[_0x13db66(0x1b5)]]={'formula':_0x56b5ea['formula'],..._0x56b5ea[_0x13db66(0x1d7)]?{'numberFormat':_0x56b5ea['numberFormat']}:_0x5a9a1a[_0x13db66(0x1d7)]?{'numberFormat':_0x5a9a1a[_0x13db66(0x1d7)]}:null},q({'accessor':_0x22b06a,'document':_0x4a62ef['document'],'unitId':_0x4a62ef['unitId'],'trigger':G['id'],'rangeId':_0x56b5ea[_0x13db66(0x1b5)],'previousResource':_0x4a62ef['resource'],'nextResource':_0x57ba43,'cursorOffset':_0x379c18[_0x13db66(0x1b2)]+0x1,'externalMutations':_0x2088bd});}},st={'id':_0x27e79d(0x272),'type':_0x529668['COMMAND'],'handler':(_0x3462f1,_0x14344a)=>{const _0x200e70=_0x27e79d;if(!(_0x14344a!=null&&_0x14344a['rangeId']))return!0x1;let _0x20ffac=K(_0x3462f1,_0x14344a[_0x200e70(0x1cc)],''),_0x1db862=_0x20ffac==null?void 0x0:_0x20ffac['model'][_0x200e70(0x264)](_0x20ffac[_0x200e70(0x1cc)],_0x14344a[_0x200e70(0x1b5)]),_0x385c23=_0x20ffac?E(_0x20ffac[_0x200e70(0x1f2)]['body'],_0x14344a[_0x200e70(0x1b5)]):void 0x0;if(!_0x20ffac||!_0x1db862||!_0x385c23)return!0x1;let _0x477bb5=Ct(_0x20ffac[_0x200e70(0x278)]);return _0x477bb5[_0x200e70(0x25d)][_0x14344a['rangeId']]={..._0x1db862,..._0x14344a[_0x200e70(0x1d7)]?{'numberFormat':_0x14344a[_0x200e70(0x1d7)]}:null},_0x14344a['numberFormat']||delete _0x477bb5[_0x200e70(0x25d)][_0x14344a['rangeId']][_0x200e70(0x1d7)],q({'accessor':_0x3462f1,'document':_0x20ffac[_0x200e70(0x210)],'unitId':_0x20ffac[_0x200e70(0x1cc)],'trigger':st['id'],'rangeId':_0x14344a[_0x200e70(0x1b5)],'previousResource':_0x20ffac[_0x200e70(0x278)],'nextResource':_0x477bb5,'cursorOffset':_0x385c23[_0x200e70(0x1b2)]+0x1,'externalMutations':{}});}},ct={'id':_0x27e79d(0x2a4),'type':_0x529668[_0x27e79d(0x229)],'handler':(_0x40fe89,_0x3b1899)=>dt(_0x40fe89,_0x3b1899,'',ct['id'])},lt={'id':_0x27e79d(0x1c3),'type':_0x529668[_0x27e79d(0x229)],'handler':(_0x4e4b29,_0x328d6b)=>{const _0x3c4a5a=_0x27e79d;var _0x39aebd;return dt(_0x4e4b29,_0x328d6b,(_0x39aebd=_0x328d6b==null?void 0x0:_0x328d6b[_0x3c4a5a(0x1b1)])==null?'':_0x39aebd,lt['id']);}},ut={'id':_0x27e79d(0x28c),'type':_0x529668[_0x27e79d(0x229)],'handler':(_0x5b9780,_0x1b6f02)=>{const _0x12229c=_0x27e79d;if(!(_0x1b6f02!=null&&_0x1b6f02[_0x12229c(0x1b5)]))return!0x1;let _0x4bf5db=K(_0x5b9780,_0x1b6f02[_0x12229c(0x1cc)],'');if(!_0x4bf5db)return!0x1;let _0x15a9bb=_0x5b9780[_0x12229c(0x29a)](R)[_0x12229c(0x29d)]({'unitId':_0x4bf5db[_0x12229c(0x1cc)],'rangeId':_0x1b6f02[_0x12229c(0x1b5)]});return _0x15a9bb?dt(_0x5b9780,_0x1b6f02,_0x15a9bb[_0x12229c(0x1b1)],ut['id']):!0x1;}};function dt(_0xc3de7e,_0x2caf99,_0x2c53fc,_0x8c659f){const _0x48e70f=_0x27e79d;if(!(_0x2caf99!=null&&_0x2caf99['rangeId']))return!0x1;let _0x29b64c=K(_0xc3de7e,_0x2caf99[_0x48e70f(0x1cc)],'');if(!_0x29b64c)return!0x1;let _0x541633=ze({'documentData':_0x29b64c['documentData'],'resource':_0x29b64c['resource'],'rangeId':_0x2caf99[_0x48e70f(0x1b5)],'text':_0x2c53fc});return _0x541633?q({'accessor':_0xc3de7e,'document':_0x29b64c[_0x48e70f(0x210)],'unitId':_0x29b64c['unitId'],'trigger':_0x8c659f,'rangeId':_0x2caf99[_0x48e70f(0x1b5)],'previousResource':_0x29b64c['resource'],'nextResource':_0x541633[_0x48e70f(0x221)],'previousDocumentData':_0x29b64c[_0x48e70f(0x1f2)],'nextDocumentData':_0x541633[_0x48e70f(0x2ad)],'cursorOffset':_0x541633['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x1bf930,_0x2ca376,_0x326a9a){const _0x2154d0=_0x27e79d;var _0x3d4a20,_0x4a96f2;if(_0x326a9a)return null;let _0x468f97=_0x1bf930[_0x2154d0(0x29a)](_0xecc2db),_0x516539=(_0x3d4a20=_0x2ca376?_0x468f97['getUnit'](_0x2ca376,_0x50d513[_0x2154d0(0x279)]):_0x468f97['getCurrentUnitOfType'](_0x50d513[_0x2154d0(0x279)]))==null?null:_0x3d4a20;if(!_0x516539)return null;let _0xfef4fc=_0x516539['getSnapshot'](),_0x26137d=_0xfef4fc['body'];if(_0xfef4fc[_0x2154d0(0x20a)]||!_0x26137d)return null;let _0x216714=_0x1bf930['get'](F);return _0x216714[_0x2154d0(0x26f)](_0x516539[_0x2154d0(0x200)]())?null:{'document':_0x516539,'body':_0x26137d,'documentData':_0xfef4fc,'model':_0x216714,'resource':(_0x4a96f2=_0x216714[_0x2154d0(0x21d)](_0x516539[_0x2154d0(0x200)]()))==null?x():_0x4a96f2,'unitId':_0x516539[_0x2154d0(0x200)]()};}function ft(_0x282284,_0xaa826a){const _0x4b0047=_0x27e79d;var _0x5aebfd;return(_0x5aebfd=_0x282284[_0x4b0047(0x29a)](_0x4918cc)[_0x4b0047(0x1d8)]({'subUnitId':_0xaa826a,'unitId':_0xaa826a}))==null?void 0x0:_0x5aebfd[0x0];}function pt(_0x2c7fcc,_0x596e7c,_0x4e30a4){const _0x510658=_0x27e79d;if((_0x2c7fcc==null?void 0x0:_0x2c7fcc[_0x510658(0x23a)])===_0x510658(0x1e0)){var _0x170e98,_0x57a4d4;let _0x3c010f=(_0x170e98=(_0x57a4d4=_0x596e7c[_0x510658(0x217)])==null?void 0x0:_0x57a4d4['filter'](_0x267087=>_0x267087[_0x510658(0x27e)]===_0x2c7fcc[_0x510658(0x27e)]))==null?[]:_0x170e98;if(_0x3c010f[_0x510658(0x251)]!==0x1)return null;let _0x92ca47=_0x3c010f[0x0],_0x4b397c=_0xd85cec(_0x596e7c,_0x92ca47),_0x6c3fb5=_0x92ca47[_0x510658(0x267)]-_0x4b397c,_0x524b50=_0x2c7fcc['position']==='end'?_0x6c3fb5:_0x2c7fcc[_0x510658(0x283)];if(!Number[_0x510658(0x258)](_0x524b50)||_0x524b50<0x0||_0x524b50>_0x6c3fb5)return null;let _0x46e788=_0x4b397c+_0x524b50;return{'startOffset':_0x46e788,'endOffset':_0x46e788};}if((_0x2c7fcc==null?void 0x0:_0x2c7fcc['type'])==='range')return!Number[_0x510658(0x258)](_0x2c7fcc[_0x510658(0x24e)])||!Number[_0x510658(0x258)](_0x2c7fcc['endOffset'])?null:{'startOffset':Math[_0x510658(0x277)](_0x2c7fcc['startOffset'],_0x2c7fcc[_0x510658(0x290)]),'endOffset':Math[_0x510658(0x201)](_0x2c7fcc[_0x510658(0x24e)],_0x2c7fcc[_0x510658(0x290)])};let _0x54f92a=(_0x2c7fcc==null?void 0x0:_0x2c7fcc['type'])===_0x510658(0x1fe)?_0x2c7fcc[_0x510658(0x1fe)]:_0x4e30a4;return!_0x54f92a||_0x54f92a[_0x510658(0x1b8)]?null:{'startOffset':Math['min'](_0x54f92a[_0x510658(0x24e)],_0x54f92a[_0x510658(0x290)]),'endOffset':Math[_0x510658(0x201)](_0x54f92a[_0x510658(0x24e)],_0x54f92a[_0x510658(0x290)])};}function mt(_0x443e84,_0x18ba5f,_0x31afe8,_0x227996){const _0x3b0f48=_0x27e79d;let _0x26c5fd=_0x443e84[_0x3b0f48(0x29a)](_0x240393),_0x15339b=_0x31afe8['startsWith']('=')?_0x31afe8['slice'](0x1):_0x31afe8,_0x10e98c=_0x26c5fd[_0x3b0f48(0x261)](_0x15339b);if(!_0x10e98c)return null;let _0x59b8f7=_0x443e84[_0x3b0f48(0x29a)](_0x2db26f),_0x5c7f9f=_0x4d0812({'qualifiers':_0x4e521e(_0x10e98c),'explicitReferences':_0x227996==null?[]:_0x227996,'resolveBinding':_0x21978b=>_0x59b8f7[_0x3b0f48(0x25e)](_0x18ba5f,_0x21978b)});return _0x5c7f9f['status']===_0x3b0f48(0x206)?_0x5c7f9f[_0x3b0f48(0x24f)]:null;}function ht(_0x377d95,_0x60e59a,_0x1c604f){const _0x5721b1=_0x27e79d;var _0x5170c6;let _0x4d1b95=_0x234005(0x6);for(;_0x377d95!=null&&(_0x5170c6=_0x377d95[_0x5721b1(0x2ac)])!=null&&_0x5170c6[_0x5721b1(0x269)](_0xc83444=>_0xc83444[_0x5721b1(0x1b5)]===_0x4d1b95)||_0x60e59a['getFormula'](_0x1c604f,_0x4d1b95);)_0x4d1b95=_0x234005(0x6);return _0x4d1b95;}function gt(_0x33bb1d){try{return Le(_0x33bb1d);}catch(_0x46629e){if(_0x46629e instanceof w)return null;throw _0x46629e;}}function _t(_0x5c75e3){const _0xc5fa2b=_0x27e79d;let _0x94a131=_0x5c75e3[_0xc5fa2b(0x21c)]&&_0x5c75e3[_0xc5fa2b(0x2ad)]?yt(_0x5c75e3[_0xc5fa2b(0x210)],_0x5c75e3[_0xc5fa2b(0x1cc)],_0x5c75e3[_0xc5fa2b(0x21c)],_0x5c75e3['nextDocumentData'],_0x5c75e3[_0xc5fa2b(0x22c)],_0x5c75e3[_0xc5fa2b(0x2ab)]):null;return _0x5c75e3[_0xc5fa2b(0x21c)]&&_0x5c75e3[_0xc5fa2b(0x2ad)]&&!_0x94a131?null:{'documentRedo':_0x94a131,'resourceRedo':{'id':H['id'],'params':{'unitId':_0x5c75e3[_0xc5fa2b(0x1cc)],'resource':_0x5c75e3[_0xc5fa2b(0x221)]}},'resourceUndo':{'id':H['id'],'params':{'unitId':_0x5c75e3['unitId'],'resource':_0x5c75e3[_0xc5fa2b(0x240)]}}};}function vt(_0x10f7ac,_0x2bb2cd,_0xa9be95,_0x559e){const _0x45cc73=_0x27e79d;_0x559e[_0x45cc73(0x255)]({'id':_0x10f7ac['trigger']+':'+_0x10f7ac[_0x45cc73(0x1b5)],'unitID':_0x10f7ac[_0x45cc73(0x1cc)],'redoMutations':[..._0x10f7ac['externalMutations'][_0x45cc73(0x250)]?[_0x10f7ac[_0x45cc73(0x2a0)][_0x45cc73(0x250)]]:[],..._0x2bb2cd[_0x45cc73(0x29b)]?[_0x2bb2cd[_0x45cc73(0x29b)]]:[],_0x2bb2cd[_0x45cc73(0x287)]],'undoMutations':[_0x2bb2cd[_0x45cc73(0x244)],..._0xa9be95?[_0xa9be95]:[],..._0x10f7ac[_0x45cc73(0x2a0)]['undoMutation']?[_0x10f7ac[_0x45cc73(0x2a0)][_0x45cc73(0x1eb)]]:[]]});}function q(_0x1ad766){const _0x4cdd33=_0x27e79d;let _0x19c646=_0x1ad766[_0x4cdd33(0x247)][_0x4cdd33(0x29a)](_0x513b93),_0x3fe447=_0x1ad766[_0x4cdd33(0x247)][_0x4cdd33(0x29a)](_0x40467d),_0x5e0d3c=_0x1ad766[_0x4cdd33(0x247)][_0x4cdd33(0x29a)](_0x4918cc),_0x30f88e=_t(_0x1ad766);if(!_0x30f88e)return!0x1;let _0x2b3da5=!0x1,_0x4325dc=null,_0xad167a=!0x1;try{if(_0x1ad766['externalMutations'][_0x4cdd33(0x250)]){if(!_0x19c646[_0x4cdd33(0x230)](_0x1ad766[_0x4cdd33(0x2a0)][_0x4cdd33(0x250)]['id'],_0x1ad766[_0x4cdd33(0x2a0)][_0x4cdd33(0x250)][_0x4cdd33(0x280)]))return!0x1;_0x2b3da5=!0x0;}if(_0x30f88e[_0x4cdd33(0x29b)]){let _0x353f36=_0x19c646[_0x4cdd33(0x230)](_0x30f88e['documentRedo']['id'],_0x30f88e[_0x4cdd33(0x29b)][_0x4cdd33(0x280)]);if(!_0x353f36)return J(_0x19c646,_0x1ad766[_0x4cdd33(0x2a0)],_0x2b3da5),!0x1;_0x4325dc={'id':_0x70564a['id'],'params':{..._0x353f36,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x19c646[_0x4cdd33(0x230)](_0x30f88e[_0x4cdd33(0x287)]['id'],_0x30f88e[_0x4cdd33(0x287)][_0x4cdd33(0x280)]))return bt(_0x19c646,_0x4325dc),J(_0x19c646,_0x1ad766[_0x4cdd33(0x2a0)],_0x2b3da5),!0x1;_0xad167a=!0x0,vt(_0x1ad766,_0x30f88e,_0x4325dc,_0x3fe447);}catch(_0x1465f6){throw _0xad167a&&_0x19c646[_0x4cdd33(0x230)](_0x30f88e[_0x4cdd33(0x244)]['id'],_0x30f88e[_0x4cdd33(0x244)][_0x4cdd33(0x280)]),bt(_0x19c646,_0x4325dc),J(_0x19c646,_0x1ad766[_0x4cdd33(0x2a0)],_0x2b3da5),_0x1465f6;}return _0x5e0d3c[_0x4cdd33(0x227)]([{'startOffset':_0x1ad766[_0x4cdd33(0x22c)],'endOffset':_0x1ad766[_0x4cdd33(0x22c)],'segmentId':''}],{'unitId':_0x1ad766[_0x4cdd33(0x1cc)],'subUnitId':_0x1ad766[_0x4cdd33(0x1cc)]},!0x1,{[_0x209d53]:!0x0}),!0x0;}function yt(_0x3cc0a2,_0x9c7c40,_0x44cb15,_0x1d5f65,_0x586d77,_0x2c666b){let _0x51f4ca=xt(_0x44cb15,_0x1d5f65,_0x3f9f00(_0x3cc0a2,''));return _0x51f4ca?{'id':_0x70564a['id'],'params':{'unitId':_0x9c7c40,'actions':_0x51f4ca,'segmentId':'','textRanges':[{'startOffset':_0x586d77,'endOffset':_0x586d77,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x2c666b}}:null;}function bt(_0x341274,_0x19f2e5){const _0x932583=_0x27e79d;_0x19f2e5&&_0x341274[_0x932583(0x230)](_0x19f2e5['id'],_0x19f2e5[_0x932583(0x280)]);}function J(_0x174050,_0x1761bd,_0x3d8f7d){const _0x230556=_0x27e79d;_0x3d8f7d&&_0x1761bd['undoMutation']&&_0x174050['syncExecuteCommand'](_0x1761bd[_0x230556(0x1eb)]['id'],_0x1761bd[_0x230556(0x1eb)][_0x230556(0x280)]);}function xt(_0x4751de,_0x431ff4,_0x29bd00){const _0x267be0=_0x27e79d;let _0x19eaf9=_0x4751de[_0x267be0(0x1c9)],_0x187307=_0x431ff4['body'],_0x21bfdf=St(_0x19eaf9==null?void 0x0:_0x19eaf9['dataStream'],_0x187307==null?void 0x0:_0x187307['dataStream']);if(!_0x21bfdf||!_0x187307)return null;let _0x29d4d4=new _0x58fa34();return _0x29d4d4['retain'](_0x21bfdf[_0x267be0(0x223)]),_0x21bfdf[_0x267be0(0x1d1)]>0x0&&_0x29d4d4[_0x267be0(0x292)](_0x21bfdf['insertLength'],_0x30e927(_0x187307,_0x21bfdf[_0x267be0(0x223)],_0x21bfdf['start']+_0x21bfdf[_0x267be0(0x1d1)],!0x1)),_0x21bfdf[_0x267be0(0x28e)]>0x0&&_0x29d4d4[_0x267be0(0x266)](_0x21bfdf[_0x267be0(0x28e)]),_0x4f8421['getInstance']()[_0x267be0(0x208)](_0x29d4d4[_0x267be0(0x248)](),_0x29bd00);}function St(_0x5e2e82,_0x40085c){const _0x431dcf=_0x27e79d;if(_0x5e2e82==null||_0x40085c==null||_0x5e2e82===_0x40085c)return null;let _0x1a17d3=0x0;for(;_0x1a17d3<_0x5e2e82[_0x431dcf(0x251)]&&_0x1a17d3<_0x40085c[_0x431dcf(0x251)]&&_0x5e2e82[_0x1a17d3]===_0x40085c[_0x1a17d3];)_0x1a17d3+=0x1;let _0xd1e45f=_0x5e2e82[_0x431dcf(0x251)],_0x350cb=_0x40085c[_0x431dcf(0x251)];for(;_0xd1e45f>_0x1a17d3&&_0x350cb>_0x1a17d3&&_0x5e2e82[_0xd1e45f-0x1]===_0x40085c[_0x350cb-0x1];)--_0xd1e45f,--_0x350cb;return{'start':_0x1a17d3,'deleteLength':_0xd1e45f-_0x1a17d3,'insertLength':_0x350cb-_0x1a17d3};}function Ct(_0x341a1e){const _0xc2902e=_0x27e79d;return{'schemaVersion':0x1,'formulas':Object[_0xc2902e(0x26e)](Object[_0xc2902e(0x22a)](_0x341a1e['formulas'])[_0xc2902e(0x298)](([_0x4c0e9d,_0x2963ee])=>[_0x4c0e9d,{..._0x2963ee,..._0x2963ee['numberFormat']?{'numberFormat':{..._0x2963ee[_0xc2902e(0x1d7)]}}:null,..._0x2963ee[_0xc2902e(0x1e7)]?{'lastValue':{..._0x2963ee['lastValue']}}:null}]))};}let Y=class extends _0x1df972{constructor(_0x32e036,_0x21e27c,_0x23df95,_0x37f3ac){const _0x258176=_0x27e79d;super(),this[_0x258176(0x233)]=_0x32e036,this[_0x258176(0x252)]=_0x21e27c,this['_model']=_0x23df95,this[_0x258176(0x2aa)]=_0x37f3ac,P(this,'_pendingUnitIds',new Set()),P(this,_0x258176(0x232),!0x1),P(this,_0x258176(0x24c),!0x1),this[_0x258176(0x233)][_0x258176(0x22e)](_0x50d513[_0x258176(0x279)])['forEach'](_0x1b0c61=>this[_0x258176(0x2aa)][_0x258176(0x236)](_0x1b0c61)),this[_0x258176(0x26b)](this[_0x258176(0x1b3)][_0x258176(0x1ca)][_0x258176(0x238)](({unitId:_0x3ee59d})=>this[_0x258176(0x1fa)](_0x3ee59d))),this[_0x258176(0x26b)](this[_0x258176(0x233)][_0x258176(0x1b4)][_0x258176(0x238)](({unit:_0x21e190})=>{const _0x2bbb53=_0x258176;_0x21e190[_0x2bbb53(0x23a)]===_0x50d513[_0x2bbb53(0x279)]&&this[_0x2bbb53(0x1cb)](_0x21e190[_0x2bbb53(0x200)]());})),this[_0x258176(0x26b)](this[_0x258176(0x233)]['unitDisposed$']['subscribe'](_0x40c357=>{const _0x30e6f6=_0x258176;this[_0x30e6f6(0x2aa)][_0x30e6f6(0x285)](_0x40c357[_0x30e6f6(0x200)]());})),this[_0x258176(0x26b)](this[_0x258176(0x252)]['onCommandExecuted'](_0x5416dd=>{const _0x46e43b=_0x258176;if(_0x5416dd['id']===_0x70564a['id']&&wt(_0x5416dd[_0x46e43b(0x280)])){let _0x2e9a6d=_0x5416dd[_0x46e43b(0x280)];_0x2e9a6d[_0x46e43b(0x1b8)]||this[_0x46e43b(0x1fa)](_0x2e9a6d[_0x46e43b(0x1cc)]);}}));}[_0x27e79d(0x25c)](){const _0x58fbcd=_0x27e79d;this['_isDisposed']=!0x0,super[_0x58fbcd(0x25c)]();}[_0x27e79d(0x1cb)](_0x255da0){const _0x44f9de=_0x27e79d;this['_pendingUnitIds'][_0x44f9de(0x270)](_0x255da0),!this[_0x44f9de(0x232)]&&(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0x45d469=_0x44f9de;if(this[_0x45d469(0x232)]=!0x1,this['_isDisposed'])return;let _0x44ae0e=Array[_0x45d469(0x27f)](this[_0x45d469(0x228)]);this['_pendingUnitIds']['clear'](),_0x44ae0e[_0x45d469(0x1f0)](_0x2a9c95=>this[_0x45d469(0x1fa)](_0x2a9c95));}));}[_0x27e79d(0x1fa)](_0x32aaf3){const _0x18873a=_0x27e79d;let _0x28f7b1=this[_0x18873a(0x233)][_0x18873a(0x1fc)](_0x32aaf3,_0x50d513[_0x18873a(0x279)]);_0x28f7b1&&this['_service'][_0x18873a(0x236)](_0x28f7b1);}};Y=L([I(0x0,_0xecc2db),I(0x1,_0x513b93),I(0x2,_0x25156c(F)),I(0x3,_0x25156c(R))],Y);function wt(_0x2a9b77){const _0x4eb14a=_0x27e79d;return typeof _0x2a9b77=='object'&&!!_0x2a9b77&&'unitId'in _0x2a9b77&&typeof _0x2a9b77[_0x4eb14a(0x1cc)]==_0x4eb14a(0x1bd)&&(!(_0x4eb14a(0x1b8)in _0x2a9b77)||_0x2a9b77[_0x4eb14a(0x1b8)]===void 0x0||typeof _0x2a9b77[_0x4eb14a(0x1b8)]=='string');}let X=class extends _0x1df972{constructor(_0x22152e,_0x312507){const _0x347228=_0x27e79d;super(),this['_resourceManagerService']=_0x22152e,this['_docFormulaModel']=_0x312507,this[_0x347228(0x26b)](this[_0x347228(0x1c4)][_0x347228(0x282)]({'pluginName':b,'businesses':[_0x50d513['UNIVER_DOC']],'toJson':_0x212b79=>JSON[_0x347228(0x24d)](this[_0x347228(0x293)][_0x347228(0x248)](_0x212b79)),'parseJson':_0x2642a2=>JSON[_0x347228(0x21a)](_0x2642a2),'onLoad':(_0x240884,_0x3b037c)=>{const _0x2bffb2=_0x347228;this[_0x2bffb2(0x293)]['load'](_0x240884,_0x3b037c);},'onUnLoad':_0x554068=>this[_0x347228(0x293)]['removeUnit'](_0x554068)}));}};X=L([I(0x0,_0x5a138b),I(0x1,_0x25156c(F))],X);var Tt=_0x27e79d(0x1ff),Et='1.0.0-insiders.20260729-99504c3';const Dt={};let Z=class extends _0x1df972{constructor(_0x2002ab,_0x559932,_0xa3b09f){const _0xdeb356=_0x27e79d;super(),this[_0xdeb356(0x22b)]=_0x2002ab,this[_0xdeb356(0x27b)]=_0x559932,this[_0xdeb356(0x26b)](_0xa3b09f['register']({'resolve':(_0x185145,_0x125db5)=>{const _0x5a109f=_0xdeb356;var _0x1744a1,_0x285f0f;return(_0x1744a1=(_0x285f0f=_0x125db5[_0x5a109f(0x2ac)])==null?void 0x0:_0x285f0f[_0x5a109f(0x22d)](T)[_0x5a109f(0x298)](_0x47db4e=>({'startOffset':_0x47db4e['startIndex'],'endOffset':_0x47db4e[_0x5a109f(0x1b2)]+0x1,'text':this['resolveFormula'](_0x185145,_0x47db4e[_0x5a109f(0x1b5)])})))==null?[]:_0x1744a1;}})),this[_0xdeb356(0x26b)](this[_0xdeb356(0x27b)]['presentationChanged$']['subscribe'](({unitId:_0xef9dd7})=>{const _0x42293f=_0xdeb356;_0xa3b09f[_0x42293f(0x1e5)](_0xef9dd7);}));}[_0x27e79d(0x20d)](_0x1bbd41,_0x3b9f0d){const _0x5def42=_0x27e79d;var _0x132cc9,_0x3c39df;return(_0x132cc9=(_0x3c39df=this[_0x5def42(0x27b)][_0x5def42(0x29d)]({'unitId':_0x1bbd41,'rangeId':_0x3b9f0d}))==null?void 0x0:_0x3c39df[_0x5def42(0x1b1)])==null?'':_0x132cc9;}[_0x27e79d(0x1dc)](_0x5c95de,_0x184c2c,_0x4ab74e){const _0x39eaac=_0x27e79d;var _0x422fd9,_0x136968;let _0x4d7c28=this[_0x39eaac(0x22b)][_0x39eaac(0x1fc)](_0x5c95de,_0x50d513[_0x39eaac(0x279)]),_0x5a6a9c=_0x4d7c28==null?void 0x0:_0x4d7c28[_0x39eaac(0x23d)]();if(!_0x5a6a9c)return'';let _0x4d17af=_0x5a6a9c['dataStream'][_0x39eaac(0x235)](_0x184c2c,_0x4ab74e),_0x3df66d=(_0x422fd9=(_0x136968=_0x5a6a9c[_0x39eaac(0x2ac)])==null?void 0x0:_0x136968[_0x39eaac(0x22d)](_0x4c5f0a=>T(_0x4c5f0a)&&_0x4c5f0a[_0x39eaac(0x267)]>=_0x184c2c&&_0x4c5f0a[_0x39eaac(0x1b2)]<_0x4ab74e)[_0x39eaac(0x2a1)]((_0x350e2c,_0x5885bb)=>_0x5885bb[_0x39eaac(0x267)]-_0x350e2c[_0x39eaac(0x267)]))==null?[]:_0x422fd9;for(let _0x1e702f of _0x3df66d){let _0x426280=_0x1e702f['startIndex']-_0x184c2c,_0x4188c8=_0x1e702f[_0x39eaac(0x1b2)]-_0x184c2c+0x1;_0x4d17af=''+_0x4d17af[_0x39eaac(0x235)](0x0,_0x426280)+this[_0x39eaac(0x20d)](_0x5c95de,_0x1e702f[_0x39eaac(0x1b5)])+_0x4d17af[_0x39eaac(0x235)](_0x4188c8);}return _0x4d17af;}[_0x27e79d(0x29f)](_0x160180){return Ot(_0x160180);}[_0x27e79d(0x21b)](_0x82e3cb,_0x381053,_0x2657d6={}){const _0xc7e785=_0x27e79d;var _0x875b92,_0x780786,_0x4c71cf;return(_0x4c71cf=Be({'id':_0x82e3cb,'body':_0x381053,'documentStyle':{}},((_0x875b92=(_0x780786=_0x381053[_0xc7e785(0x2ac)])==null?void 0x0:_0x780786[_0xc7e785(0x22d)](T))==null?[]:_0x875b92)['map'](_0x5c0b5e=>{const _0x1004c=_0xc7e785;var _0x4271b5;return{'rangeId':_0x5c0b5e[_0x1004c(0x1b5)],'text':(_0x4271b5=_0x2657d6[_0x5c0b5e['rangeId']])==null?this[_0x1004c(0x20d)](_0x82e3cb,_0x5c0b5e[_0x1004c(0x1b5)]):_0x4271b5};}))[_0xc7e785(0x1c9)])==null?{'dataStream':''}:_0x4c71cf;}};Z=L([I(0x0,_0xecc2db),I(0x1,_0x25156c(R)),I(0x2,_0x25156c(_0x53e787))],Z);function Ot(_0xda60a4){const _0x34758b=_0x27e79d;var _0xf868d2,_0x45d473,_0x52ae9c;let _0x101781=kt(_0xda60a4),_0x28447b=Be(_0xda60a4,((_0xf868d2=(_0x45d473=_0xda60a4[_0x34758b(0x1c9)])==null||(_0x45d473=_0x45d473[_0x34758b(0x2ac)])==null?void 0x0:_0x45d473['filter'](T))==null?[]:_0xf868d2)[_0x34758b(0x298)](_0x1bdb2f=>({'rangeId':_0x1bdb2f[_0x34758b(0x1b5)],'text':At(_0x101781==null?void 0x0:_0x101781[_0x34758b(0x25d)][_0x1bdb2f[_0x34758b(0x1b5)]])})));return _0x28447b[_0x34758b(0x1ea)]=(_0x52ae9c=_0x28447b['resources'])==null?void 0x0:_0x52ae9c[_0x34758b(0x22d)](_0x1f49ee=>_0x1f49ee['name']!==b),_0x28447b;}function kt(_0x1fcf9a){const _0x5259bb=_0x27e79d;var _0x53573a;let _0x5c33b9=(_0x53573a=_0x1fcf9a[_0x5259bb(0x1ea)])==null||(_0x53573a=_0x53573a[_0x5259bb(0x220)](_0x38e595=>_0x38e595[_0x5259bb(0x254)]===_0x5259bb(0x1c0)))==null?void 0x0:_0x53573a[_0x5259bb(0x1e9)];if(_0x5c33b9)try{let _0x46aaa9=JSON[_0x5259bb(0x21a)](_0x5c33b9);return S(_0x46aaa9)?_0x46aaa9:void 0x0;}catch{return;}}function At(_0x589bf0){const _0x3b10d6=_0x27e79d;return _0x589bf0?_0x4a5c5a({'lastValue':_0x589bf0['lastValue'],'numberFormat':_0x589bf0[_0x3b10d6(0x1d7)]})[_0x3b10d6(0x1b1)]:'';}let Q=class extends _0x1df972{constructor(_0x2d1be2,_0x556b67,_0x1a7acf){const _0x3ca7a3=_0x27e79d;super(),this[_0x3ca7a3(0x27b)]=_0x2d1be2,this[_0x3ca7a3(0x1df)]=_0x556b67,this['disposeWithMe'](_0x1a7acf[_0x3ca7a3(0x1fb)](this));}['collectMutations'](_0x1f69cc){const _0x51e44d=_0x27e79d;let _0x8d8c7a=new Map();for(let _0x1e7fde of this[_0x51e44d(0x27b)]['getRegisteredFormulas']()){var _0x5f00d7,_0x4ac913;if(!this['_cacheEligibilityService']['assess'](_0x1e7fde[_0x51e44d(0x1bc)][_0x51e44d(0x26a)],_0x1e7fde[_0x51e44d(0x226)])['eligible'])continue;let _0x1dcf60=_0x3b7ba6(_0x1e7fde[_0x51e44d(0x226)]),_0x449d3a=_0x1dcf60?_0x1a46bb(_0x1dcf60):null;if(!_0x449d3a||jt(_0x1e7fde[_0x51e44d(0x1bc)][_0x51e44d(0x1e7)],_0x449d3a))continue;let _0x3792db=(_0x5f00d7=_0x8d8c7a[_0x51e44d(0x29a)](_0x1e7fde[_0x51e44d(0x268)]['unitId']))==null?[]:_0x5f00d7;_0x3792db[_0x51e44d(0x216)]({'rangeId':_0x1e7fde[_0x51e44d(0x268)][_0x51e44d(0x1b5)],'expectedFormula':_0x1e7fde['config'][_0x51e44d(0x26a)],'expectedNumberFormat':(_0x4ac913=_0x1e7fde[_0x51e44d(0x1bc)]['numberFormat'])==null?void 0x0:_0x4ac913['pattern'],'expectedReferenceRevision':_0x1e7fde[_0x51e44d(0x225)],'lastValue':_0x449d3a}),_0x8d8c7a[_0x51e44d(0x1c1)](_0x1e7fde[_0x51e44d(0x268)][_0x51e44d(0x1cc)],_0x3792db);}return Array['from'](_0x8d8c7a,([_0x47fb51,_0x4e2d08])=>({'id':U['id'],'params':{'unitId':_0x47fb51,'updates':_0x4e2d08}}));}};Q=L([I(0x0,_0x25156c(R)),I(0x1,_0x25156c(_0x2da8c8)),I(0x2,_0x25156c(_0x4e98bd))],Q);function jt(_0x18c244,_0x459175){const _0x2bb989=_0x27e79d;return(_0x18c244==null?void 0x0:_0x18c244['v'])===_0x459175['v']&&(_0x18c244==null?void 0x0:_0x18c244['t'])===_0x459175['t']&&(_0x18c244==null?void 0x0:_0x18c244[_0x2bb989(0x281)])===_0x459175[_0x2bb989(0x281)];}let $=class extends _0x17012f{constructor(_0x3ab04e=Dt,_0x325c93,_0x326ddc,_0x5445c0){const _0x51c408=_0x27e79d;super(),this[_0x51c408(0x286)]=_0x3ab04e,this[_0x51c408(0x202)]=_0x325c93,this[_0x51c408(0x252)]=_0x326ddc,this[_0x51c408(0x222)]=_0x5445c0;let {..._0xa2fefc}=_0x20bb68({},Dt,this[_0x51c408(0x286)]);this[_0x51c408(0x222)][_0x51c408(0x28b)](_0x51c408(0x28f),_0xa2fefc);}[_0x27e79d(0x253)](){const _0x3a74d1=_0x27e79d;this['_injector'][_0x3a74d1(0x270)]([F]),this[_0x3a74d1(0x202)]['add']([R]),this['_injector'][_0x3a74d1(0x270)]([X]),this['_injector'][_0x3a74d1(0x270)]([Y]),this['_injector']['add']([Q]),this[_0x3a74d1(0x202)][_0x3a74d1(0x270)]([Z]),_0x4569e5(this[_0x3a74d1(0x202)],[[F],[X],[Y],[Q],[Z]]),[at,ot,H,U,W,G,st,ct,lt,ut][_0x3a74d1(0x1f0)](_0x2662b2=>this[_0x3a74d1(0x26b)](this['_commandService'][_0x3a74d1(0x23c)](_0x2662b2)));}};P($,_0x27e79d(0x1f6),b),P($,_0x27e79d(0x1f5),Tt),P($,_0x27e79d(0x204),Et),P($,_0x27e79d(0x23a),_0x50d513[_0x27e79d(0x279)]),$=L([_0x4146e0(_0x3857d7,_0x1191d2,_0x58be4d),I(0x1,_0x25156c(_0x3573f9)),I(0x2,_0x513b93),I(0x3,_0x4736d9)],$);export{ut as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,b as DOC_FORMULA_PLUGIN,Ae as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,F as DocFormulaModel,X as DocFormulaResourceController,rt as DocFormulaResultStatus,R as DocFormulaService,W as InsertDocFormulaCommand,w as InvalidDocFormulaInsertRangeError,ct as RemoveDocFormulaCommand,ot as RemoveDocFormulaMutation,lt as ReplaceDocFormulaWithTextCommand,U as SetDocFormulaLastValuesMutation,at as SetDocFormulaMutation,st as SetDocFormulaNumberFormatCommand,H as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,G as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,x as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,E as findDocFormulaRange,Ne as isDocFormulaConfig,T as isDocFormulaRange,S as isDocFormulaResource,Pe as isFormulaLastValue};
@@ -0,0 +1,11 @@
1
+ import type { ICommand } from '@univerjs/core';
2
+ import type { IDocFormulaInsertCommandParams, IDocFormulaInsertCommandResult, IDocFormulaRemoveCommandParams, IDocFormulaSetNumberFormatCommandParams, IDocFormulaUpdateCommandParams } from '../common/type';
3
+ export declare const InsertDocFormulaCommand: ICommand<IDocFormulaInsertCommandParams, IDocFormulaInsertCommandResult | false>;
4
+ export declare const UpdateDocFormulaCommand: ICommand<IDocFormulaUpdateCommandParams>;
5
+ export declare const SetDocFormulaNumberFormatCommand: ICommand<IDocFormulaSetNumberFormatCommandParams>;
6
+ export declare const RemoveDocFormulaCommand: ICommand<IDocFormulaRemoveCommandParams>;
7
+ export interface IReplaceDocFormulaWithTextCommandParams extends IDocFormulaRemoveCommandParams {
8
+ text: string;
9
+ }
10
+ export declare const ReplaceDocFormulaWithTextCommand: ICommand<IReplaceDocFormulaWithTextCommandParams>;
11
+ export declare const ConvertDocFormulaToTextCommand: ICommand<IDocFormulaRemoveCommandParams>;
@@ -0,0 +1,34 @@
1
+ import type { IFormulaLastValue } from '@univerjs-pro/engine-formula';
2
+ import type { IMutation } from '@univerjs/core';
3
+ import type { IDocFormulaConfig, IDocFormulaResource } from '../common/type';
4
+ export interface ISetDocFormulaMutationParams {
5
+ unitId: string;
6
+ rangeId: string;
7
+ config: IDocFormulaConfig;
8
+ }
9
+ export interface IRemoveDocFormulaMutationParams {
10
+ unitId: string;
11
+ rangeId: string;
12
+ }
13
+ export interface ISetDocFormulaResourceMutationParams {
14
+ unitId: string;
15
+ resource: IDocFormulaResource;
16
+ }
17
+ export interface ISetDocFormulaLastValuesMutationParams {
18
+ unitId: string;
19
+ updates: readonly {
20
+ rangeId: string;
21
+ expectedFormula: string;
22
+ expectedNumberFormat?: string;
23
+ expectedReferenceRevision: number;
24
+ lastValue: IFormulaLastValue;
25
+ }[];
26
+ }
27
+ export declare const SetDocFormulaMutation: IMutation<ISetDocFormulaMutationParams>;
28
+ export declare const RemoveDocFormulaMutation: IMutation<IRemoveDocFormulaMutationParams>;
29
+ export declare const SetDocFormulaResourceMutation: IMutation<ISetDocFormulaResourceMutationParams>;
30
+ /**
31
+ * Applies derived cache values with a Formula-source compare-and-set guard.
32
+ * The mutation is intentionally excluded from user undo history.
33
+ */
34
+ export declare const SetDocFormulaLastValuesMutation: IMutation<ISetDocFormulaLastValuesMutationParams>;
@@ -0,0 +1,41 @@
1
+ import type { ICustomRange, IDocumentBody, IDocumentData } from '@univerjs/core';
2
+ import type { IDocFormulaConfig, IDocFormulaResource } from './type';
3
+ export declare class InvalidDocFormulaInsertRangeError extends Error {
4
+ constructor();
5
+ }
6
+ export interface IDocFormulaActionBuildResult {
7
+ nextDocumentData: IDocumentData;
8
+ nextResource: IDocFormulaResource;
9
+ cursorOffset: number;
10
+ }
11
+ export interface IInsertDocFormulaActionParams {
12
+ documentData: IDocumentData;
13
+ resource?: IDocFormulaResource;
14
+ rangeId: string;
15
+ config: IDocFormulaConfig;
16
+ startOffset?: number;
17
+ endOffset?: number;
18
+ }
19
+ export interface IUpdateDocFormulaActionParams {
20
+ documentData: IDocumentData;
21
+ resource?: IDocFormulaResource;
22
+ rangeId: string;
23
+ config: IDocFormulaConfig;
24
+ }
25
+ export interface IRemoveDocFormulaActionParams {
26
+ documentData: IDocumentData;
27
+ resource?: IDocFormulaResource;
28
+ rangeId: string;
29
+ text?: string;
30
+ }
31
+ export interface IDocFormulaTextReplacement {
32
+ rangeId: string;
33
+ text: string;
34
+ }
35
+ export declare function buildInsertDocFormulaActions(params: IInsertDocFormulaActionParams): IDocFormulaActionBuildResult;
36
+ export declare function buildUpdateDocFormulaActions(params: IUpdateDocFormulaActionParams): IDocFormulaActionBuildResult | null;
37
+ export declare function buildRemoveDocFormulaActions(params: IRemoveDocFormulaActionParams): IDocFormulaActionBuildResult | null;
38
+ export declare function buildDocFormulaTextProjection(documentData: IDocumentData, replacements: readonly IDocFormulaTextReplacement[]): IDocumentData;
39
+ export declare function isDocFormulaRange(range: ICustomRange | undefined | null): range is ICustomRange;
40
+ export declare function findDocFormulaRange(body: IDocumentBody | undefined, rangeId: string): ICustomRange | undefined;
41
+ export declare function assertSafeDocFormulaInsertRange(body: IDocumentBody, startOffset: number, endOffset: number): void;
@@ -0,0 +1,4 @@
1
+ export declare const DOC_FORMULA_PLUGIN = "DOC_FORMULA_PLUGIN";
2
+ export declare const DOC_FORMULA_SCHEMA_VERSION = 1;
3
+ export declare const DOC_FORMULA_CUSTOM_RANGE_KIND = "univer-docs-formula";
4
+ export declare const DOC_FORMULA_OBJECT_REPLACEMENT = "\uFFFC";
@@ -0,0 +1,6 @@
1
+ import type { IFormulaLastValue } from '@univerjs-pro/engine-formula';
2
+ import type { IDocFormulaConfig, IDocFormulaResource } from './type';
3
+ export declare function createEmptyDocFormulaResource(): IDocFormulaResource;
4
+ export declare function isDocFormulaResource(value: unknown): value is IDocFormulaResource;
5
+ export declare function isDocFormulaConfig(value: unknown): value is IDocFormulaConfig;
6
+ export declare function isFormulaLastValue(value: unknown): value is IFormulaLastValue;
@@ -0,0 +1,86 @@
1
+ import type { IFormulaLastValue, IFormulaResultPresentation, IHostExternalReference } from '@univerjs-pro/engine-formula';
2
+ import type { CellValueType, ITextRangeParam } from '@univerjs/core';
3
+ import type { DOC_FORMULA_SCHEMA_VERSION } from './const';
4
+ export interface IDocFormulaConfig {
5
+ formula: string;
6
+ numberFormat?: {
7
+ pattern: string;
8
+ };
9
+ lastValue?: IFormulaLastValue;
10
+ }
11
+ export interface IDocFormulaResource {
12
+ schemaVersion: typeof DOC_FORMULA_SCHEMA_VERSION;
13
+ formulas: Record<string, IDocFormulaConfig>;
14
+ }
15
+ export type DocFormulaResourceLoadError = 'invalid-resource' | 'unsupported-version';
16
+ export declare enum DocFormulaResultStatus {
17
+ EMPTY = "empty",
18
+ PENDING = "pending",
19
+ SUCCESS = "success",
20
+ ERROR = "error"
21
+ }
22
+ export interface IDocFormulaResult extends IFormulaResultPresentation {
23
+ status: DocFormulaResultStatus;
24
+ value: unknown;
25
+ valueType?: CellValueType;
26
+ }
27
+ /**
28
+ * Insertion target used by `InsertDocFormulaCommand`.
29
+ *
30
+ * - `paragraph` resolves a persisted `paragraphId` against the latest body.
31
+ * Numeric positions are zero-based UTF-16 offsets relative to the paragraph;
32
+ * `'end'` is the semantic append position.
33
+ * - `range` is a snapshot-relative main-body range for immediate replacement.
34
+ * - `selection` is an editor selection captured for one immediate insertion.
35
+ */
36
+ export type IDocFormulaInsertTarget = {
37
+ type: 'paragraph';
38
+ paragraphId: string;
39
+ position: 'end' | number;
40
+ } | {
41
+ type: 'range';
42
+ startOffset: number;
43
+ endOffset: number;
44
+ } | {
45
+ type: 'selection';
46
+ selection: ITextRangeParam;
47
+ };
48
+ export interface IDocFormulaInsertCommandParams {
49
+ unitId?: string;
50
+ formula: string;
51
+ numberFormat?: {
52
+ pattern: string;
53
+ };
54
+ externalReferences?: readonly IHostExternalReference[];
55
+ /**
56
+ * Stable paragraph, immediate range, or captured selection target.
57
+ *
58
+ * When omitted, the Command uses the active main-body editor selection.
59
+ */
60
+ target?: IDocFormulaInsertTarget;
61
+ }
62
+ export interface IDocFormulaInsertCommandResult {
63
+ endOffset: number;
64
+ rangeId: string;
65
+ startOffset: number;
66
+ }
67
+ export interface IDocFormulaUpdateCommandParams {
68
+ unitId?: string;
69
+ rangeId: string;
70
+ formula: string;
71
+ numberFormat?: {
72
+ pattern: string;
73
+ };
74
+ externalReferences?: readonly IHostExternalReference[];
75
+ }
76
+ export interface IDocFormulaSetNumberFormatCommandParams {
77
+ unitId?: string;
78
+ rangeId: string;
79
+ numberFormat?: {
80
+ pattern: string;
81
+ };
82
+ }
83
+ export interface IDocFormulaRemoveCommandParams {
84
+ unitId?: string;
85
+ rangeId: string;
86
+ }
@@ -0,0 +1,5 @@
1
+ export declare const DOCS_FORMULA_PLUGIN_CONFIG_KEY = "docs-formula.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverDocsFormulaConfig {
4
+ }
5
+ export declare const defaultPluginConfig: IUniverDocsFormulaConfig;
@@ -0,0 +1,16 @@
1
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
+ import { DocFormulaModel } from '../models/doc-formula-model';
3
+ import { DocFormulaService } from '../services/doc-formula.service';
4
+ export declare class DocFormulaLifecycleController extends Disposable {
5
+ private readonly _instanceService;
6
+ private readonly _commandService;
7
+ private readonly _model;
8
+ private readonly _service;
9
+ private readonly _pendingUnitIds;
10
+ private _syncScheduled;
11
+ private _isDisposed;
12
+ constructor(_instanceService: IUniverInstanceService, _commandService: ICommandService, _model: DocFormulaModel, _service: DocFormulaService);
13
+ dispose(): void;
14
+ private _queueSync;
15
+ private _syncUnit;
16
+ }
@@ -0,0 +1,7 @@
1
+ import { Disposable, IResourceManagerService } from '@univerjs/core';
2
+ import { DocFormulaModel } from '../models/doc-formula-model';
3
+ export declare class DocFormulaResourceController extends Disposable {
4
+ private readonly _resourceManagerService;
5
+ private readonly _docFormulaModel;
6
+ constructor(_resourceManagerService: IResourceManagerService, _docFormulaModel: DocFormulaModel);
7
+ }