@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/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @univerjs-pro/docs-formula
2
+
3
+ `@univerjs-pro/docs-formula` provides inline Formula custom ranges for Univer Docs.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ pnpm add @univerjs-pro/docs-formula
9
+ ```
10
+
11
+ Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { UniverDocsFormulaPlugin } from '@univerjs-pro/docs-formula';
17
+
18
+ univer.registerPlugin(UniverDocsFormulaPlugin);
19
+ ```
20
+
21
+ The package owns Formula custom-range data, resource persistence, commands, and headless Facade APIs.
22
+ Register `@univerjs-pro/docs-formula-ui` separately when the editor UI is required.
23
+
24
+ ## Resources
25
+
26
+ - [Documentation](https://docs.univer.ai/guides/pro)
27
+ - [NPM package](https://npmjs.com/package/@univerjs-pro/docs-formula)
@@ -0,0 +1 @@
1
+ var _0x2dbea6=_0x2bf0;(function(_0x46caf8,_0x31688c){var _0x2b1a52=_0x2bf0,_0x476d04=_0x46caf8();while(!![]){try{var _0x54a390=parseInt(_0x2b1a52(0x17b))/0x1*(-parseInt(_0x2b1a52(0x1b3))/0x2)+-parseInt(_0x2b1a52(0x191))/0x3*(parseInt(_0x2b1a52(0x172))/0x4)+parseInt(_0x2b1a52(0x1cc))/0x5*(-parseInt(_0x2b1a52(0x18a))/0x6)+parseInt(_0x2b1a52(0x1b8))/0x7+parseInt(_0x2b1a52(0x1af))/0x8*(-parseInt(_0x2b1a52(0x177))/0x9)+parseInt(_0x2b1a52(0x1b5))/0xa+parseInt(_0x2b1a52(0x1bf))/0xb;if(_0x54a390===_0x31688c)break;else _0x476d04['push'](_0x476d04['shift']());}catch(_0x15af6f){_0x476d04['push'](_0x476d04['shift']());}}}(_0x27d3,0xcae8c),Object[_0x2dbea6(0x1b0)](exports,Symbol[_0x2dbea6(0x1be)],{'value':_0x2dbea6(0x18f)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0xcb29ab,_0x21d325){return function(_0x55634b,_0x5aae5d){_0x21d325(_0x55634b,_0x5aae5d,_0xcb29ab);};}function i(_0x47a07d,_0x3ec859,_0x5cb722,_0x47a63e){var _0xd419a2=_0x2dbea6,_0x54ae80=arguments[_0xd419a2(0x1c4)],_0x9c8102=_0x54ae80<0x3?_0x3ec859:_0x47a63e===null?_0x47a63e=Object[_0xd419a2(0x1bb)](_0x3ec859,_0x5cb722):_0x47a63e,_0x276743;if(typeof Reflect==_0xd419a2(0x187)&&typeof Reflect[_0xd419a2(0x1ba)]==_0xd419a2(0x17c))_0x9c8102=Reflect['decorate'](_0x47a07d,_0x3ec859,_0x5cb722,_0x47a63e);else{for(var _0x1733d4=_0x47a07d['length']-0x1;_0x1733d4>=0x0;_0x1733d4--)(_0x276743=_0x47a07d[_0x1733d4])&&(_0x9c8102=(_0x54ae80<0x3?_0x276743(_0x9c8102):_0x54ae80>0x3?_0x276743(_0x3ec859,_0x5cb722,_0x9c8102):_0x276743(_0x3ec859,_0x5cb722))||_0x9c8102);}return _0x54ae80>0x3&&_0x9c8102&&Object['defineProperty'](_0x3ec859,_0x5cb722,_0x9c8102),_0x9c8102;}let a=class{constructor(_0x158608,_0x5d0ab5,_0xfd91df,_0x4920b6,_0x18c7e5,_0x28ca2a){var _0x148525=_0x2dbea6;this[_0x148525(0x181)]=_0x158608,this[_0x148525(0x192)]=_0x5d0ab5,this[_0x148525(0x174)]=_0xfd91df,this['_model']=_0x4920b6,this[_0x148525(0x1a3)]=_0x18c7e5,this[_0x148525(0x1c3)]=_0x28ca2a;}['getId'](){return this['_rangeId'];}['getRange'](){var _0x484ffc=_0x2dbea6;let _0x52f344=this[_0x484ffc(0x17e)]();return _0x52f344?{'endOffset':_0x52f344['endIndex']+0x1,'rangeId':_0x52f344[_0x484ffc(0x188)],'startOffset':_0x52f344[_0x484ffc(0x1cd)]}:null;}['getFormula'](){var _0x44f344=_0x2dbea6,_0x33b98d,_0x5b6eba;return(_0x33b98d=(_0x5b6eba=this[_0x44f344(0x1ad)][_0x44f344(0x1b9)](this['_unitId'],this['_rangeId']))==null?void 0x0:_0x5b6eba[_0x44f344(0x197)])==null?'':_0x33b98d;}[_0x2dbea6(0x186)](){var _0xe18b92=_0x2dbea6,_0x45abc7;return(_0x45abc7=this[_0xe18b92(0x1ad)][_0xe18b92(0x1b9)](this[_0xe18b92(0x181)],this[_0xe18b92(0x192)]))==null?null:_0x45abc7;}[_0x2dbea6(0x178)](){var _0x21aed3=_0x2dbea6,_0x152dea;return(_0x152dea=this[_0x21aed3(0x1a3)][_0x21aed3(0x178)]({'unitId':this['_unitId'],'rangeId':this['_rangeId']}))==null?null:_0x152dea;}[_0x2dbea6(0x182)](){var _0x3fc8cc=_0x2dbea6;let _0x13c3b4=this['getRange'](),_0x10b4a9=this[_0x3fc8cc(0x186)](),_0x1ce3b8=this[_0x3fc8cc(0x178)]();return!_0x13c3b4||!_0x10b4a9||!_0x1ce3b8?null:{..._0x13c3b4,'config':_0x10b4a9,'formula':_0x10b4a9[_0x3fc8cc(0x197)],'result':_0x1ce3b8,'type':_0x3fc8cc(0x197)};}[_0x2dbea6(0x1bc)](_0x3b2df0){var _0x4531b2=_0x2dbea6;return this[_0x4531b2(0x174)][_0x4531b2(0x1d1)](e[_0x4531b2(0x1c6)]['id'],{'externalReferences':_0x3b2df0[_0x4531b2(0x1c2)],'formula':_0x3b2df0[_0x4531b2(0x197)],'numberFormat':_0x3b2df0[_0x4531b2(0x194)],'rangeId':this[_0x4531b2(0x192)],'unitId':this[_0x4531b2(0x181)]});}[_0x2dbea6(0x1ab)](_0x3ba3f2){var _0x141566=_0x2dbea6;return this[_0x141566(0x174)][_0x141566(0x1d1)](e[_0x141566(0x1bd)]['id'],{'numberFormat':_0x3ba3f2,'rangeId':this[_0x141566(0x192)],'unitId':this['_unitId']});}[_0x2dbea6(0x1c9)](){var _0x1f8378=_0x2dbea6;return this[_0x1f8378(0x174)][_0x1f8378(0x1d1)](e[_0x1f8378(0x1c5)]['id'],{'rangeId':this[_0x1f8378(0x192)],'unitId':this[_0x1f8378(0x181)]});}[_0x2dbea6(0x180)](_0x2180ad){var _0x22c3a5=_0x2dbea6;return this[_0x22c3a5(0x174)][_0x22c3a5(0x1d1)](e[_0x22c3a5(0x193)]['id'],{'rangeId':this[_0x22c3a5(0x192)],'text':_0x2180ad,'unitId':this[_0x22c3a5(0x181)]});}[_0x2dbea6(0x1c1)](){var _0x7b8afa=_0x2dbea6;return this[_0x7b8afa(0x174)][_0x7b8afa(0x1d1)](e['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this[_0x7b8afa(0x192)],'unitId':this['_unitId']});}['_getCustomRange'](){var _0x221ce8=_0x2dbea6,_0x56d746;let _0x1f46ee=this[_0x221ce8(0x1c3)]['getUnit'](this['_unitId'],t[_0x221ce8(0x1c0)][_0x221ce8(0x19e)]);return _0x1f46ee==null||(_0x56d746=_0x1f46ee[_0x221ce8(0x19b)]()[_0x221ce8(0x1a9)])==null||(_0x56d746=_0x56d746['customRanges'])==null?void 0x0:_0x56d746[_0x221ce8(0x19d)](_0x267f3c=>_0x267f3c['rangeId']===this[_0x221ce8(0x192)]&&(0x0,e[_0x221ce8(0x199)])(_0x267f3c));}};a=i([r(0x2,t['ICommandService']),r(0x3,(0x0,t[_0x2dbea6(0x1ce)])(e[_0x2dbea6(0x19c)])),r(0x4,(0x0,t[_0x2dbea6(0x1ce)])(e[_0x2dbea6(0x179)])),r(0x5,t[_0x2dbea6(0x185)])],a);function o(_0x588ee9){'@babel/helpers - typeof';var _0x1d6f24=_0x2dbea6;return o=typeof Symbol==_0x1d6f24(0x17c)&&typeof Symbol[_0x1d6f24(0x1b6)]=='symbol'?function(_0x1abb29){return typeof _0x1abb29;}:function(_0x6691ed){var _0x1e5fba=_0x1d6f24;return _0x6691ed&&typeof Symbol==_0x1e5fba(0x17c)&&_0x6691ed[_0x1e5fba(0x19f)]===Symbol&&_0x6691ed!==Symbol['prototype']?'symbol':typeof _0x6691ed;},o(_0x588ee9);}function _0x27d3(){var _0x5b9f15=['defineProperty','_createFormula','end','6104bZGlYo','endOffset','10441710IGjVsC','iterator','getFormulas','8926680vodBLl','getFormula','decorate','getOwnPropertyDescriptor','update','SetDocFormulaNumberFormatCommand','toStringTag','9820635gLPODt','UniverInstanceType','convertToText','externalReferences','_univerInstanceService','length','RemoveDocFormulaCommand','UpdateDocFormulaCommand','InsertDocFormulaCommand','FDocumentTextRange','remove','string','_document','1633365blKPUv','startIndex','Inject','customRanges','getId','syncExecuteCommand','12kgowUJ','default','_commandService','replaceWithFormula','appendFormula','27aTwVSE','getResult','DocFormulaService','DocFormulaDisplayTextService','343zplfhF','function','_injector','_getCustomRange','_initialize','replaceWithText','_unitId','describe','range','\x20could\x20not\x20be\x20serialized.','IUniverInstanceService','getConfig','object','rangeId','get','12ssfaXs','map','startOffset','toPrimitive','Document\x20','Module','_docsFormulaDisplayTextService','283077ZEzYzb','_rangeId','ReplaceDocFormulaWithTextCommand','numberFormat','FDocumentParagraph','FDocument','formula','saveFormulaDisplayTextSnapshot','isDocFormulaRange','extend','getSnapshot','DocFormulaModel','find','UNIVER_DOC','constructor','_getCompleteRanges','_insert','filter','_service','_docsFormulaModel','getRange','IResourceLoaderService','_docsFormulaCommandService','ICommandService','body','_docsFormulaResourceLoaderService','setNumberFormat','saveUnit','_model','createInstance','1060856DnAYag'];_0x27d3=function(){return _0x5b9f15;};return _0x27d3();}function _0x2bf0(_0x4a5fef,_0x3952e8){_0x4a5fef=_0x4a5fef-0x172;var _0x27d350=_0x27d3();var _0x2bf0c5=_0x27d350[_0x4a5fef];return _0x2bf0c5;}function s(_0x53577a,_0x13d9ac){var _0x41f6fd=_0x2dbea6;if(o(_0x53577a)!='object'||!_0x53577a)return _0x53577a;var _0x2f6fd0=_0x53577a[Symbol[_0x41f6fd(0x18d)]];if(_0x2f6fd0!==void 0x0){var _0x2969d3=_0x2f6fd0['call'](_0x53577a,_0x13d9ac||_0x41f6fd(0x173));if(o(_0x2969d3)!=_0x41f6fd(0x187))return _0x2969d3;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x13d9ac==='string'?String:Number)(_0x53577a);}function c(_0x1a6637){var _0x1ec0c5=_0x2dbea6,_0xd4a8bf=s(_0x1a6637,_0x1ec0c5(0x1ca));return o(_0xd4a8bf)=='symbol'?_0xd4a8bf:_0xd4a8bf+'';}function l(_0x2d22f6,_0x3da118,_0x3ffbe0){var _0x14cc9b=_0x2dbea6;return(_0x3da118=c(_0x3da118))in _0x2d22f6?Object[_0x14cc9b(0x1b0)](_0x2d22f6,_0x3da118,{'value':_0x3ffbe0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2d22f6[_0x3da118]=_0x3ffbe0,_0x2d22f6;}var u=class extends n[_0x2dbea6(0x196)]{constructor(..._0x2052f0){var _0x28389b=_0x2dbea6;super(..._0x2052f0),l(this,_0x28389b(0x1a7),void 0x0),l(this,_0x28389b(0x190),void 0x0),l(this,_0x28389b(0x1a4),void 0x0),l(this,_0x28389b(0x1aa),void 0x0);}['_initialize'](_0x57f1eb){var _0x2adaed=_0x2dbea6;this[_0x2adaed(0x1a7)]=_0x57f1eb[_0x2adaed(0x189)](t[_0x2adaed(0x1a8)]),this[_0x2adaed(0x190)]=_0x57f1eb['get'](e[_0x2adaed(0x17a)]),this[_0x2adaed(0x1a4)]=_0x57f1eb[_0x2adaed(0x189)](e[_0x2adaed(0x19c)]),this['_docsFormulaResourceLoaderService']=_0x57f1eb[_0x2adaed(0x189)](t[_0x2adaed(0x1a6)]);}[_0x2dbea6(0x1b7)](){var _0x235a9d=_0x2dbea6;return this[_0x235a9d(0x1a0)]()[_0x235a9d(0x18b)](_0x5cca68=>this['_createFormula'](_0x5cca68[_0x235a9d(0x188)]));}[_0x2dbea6(0x1b9)](_0x166701){var _0x127558=_0x2dbea6;return this[_0x127558(0x1a0)]()['some'](_0x1ae78e=>_0x1ae78e[_0x127558(0x188)]===_0x166701)?this['_createFormula'](_0x166701):null;}['getFormulaAt'](_0x5618e6){var _0x18b55d=_0x2dbea6;let _0x21198b=this[_0x18b55d(0x1a0)]()[_0x18b55d(0x19d)](_0x586590=>_0x586590['startIndex']<=_0x5618e6&&_0x5618e6<=_0x586590['endIndex']);return _0x21198b?this[_0x18b55d(0x1b1)](_0x21198b[_0x18b55d(0x188)]):null;}[_0x2dbea6(0x198)](){var _0x5c195b=_0x2dbea6;let _0x2f97bd=this['_docsFormulaResourceLoaderService'][_0x5c195b(0x1ac)](this['id']);if(!_0x2f97bd)throw Error(_0x5c195b(0x18e)+this['id']+_0x5c195b(0x184));return this[_0x5c195b(0x190)]['degradeDocumentData'](_0x2f97bd);}['insertFormula'](_0x38750e){var _0x39f4e1=_0x2dbea6;return this[_0x39f4e1(0x1a1)]({'externalReferences':_0x38750e[_0x39f4e1(0x1c2)],'formula':_0x38750e[_0x39f4e1(0x197)],'numberFormat':_0x38750e['numberFormat'],'target':{'type':_0x39f4e1(0x183),'startOffset':_0x38750e[_0x39f4e1(0x18c)],'endOffset':_0x38750e[_0x39f4e1(0x1b4)]},'unitId':this[_0x39f4e1(0x1d0)]()});}[_0x2dbea6(0x1a1)](_0x135ede){var _0x22a72a=_0x2dbea6;let _0x381def=this[_0x22a72a(0x1a7)][_0x22a72a(0x1d1)](e[_0x22a72a(0x1c7)]['id'],_0x135ede);return _0x381def?this[_0x22a72a(0x1b1)](_0x381def[_0x22a72a(0x188)]):null;}[_0x2dbea6(0x1a0)](){var _0x2208df=_0x2dbea6,_0x1d270d,_0x262810;let _0x11cbd7=this[_0x2208df(0x1a4)][_0x2208df(0x1b7)](this[_0x2208df(0x1d0)]());return(_0x1d270d=(_0x262810=this['getBody']('')[_0x2208df(0x1cf)])==null?void 0x0:_0x262810[_0x2208df(0x1a2)](_0x17fcc5=>(0x0,e['isDocFormulaRange'])(_0x17fcc5)&&_0x11cbd7[_0x17fcc5['rangeId']]!=null))==null?[]:_0x1d270d;}[_0x2dbea6(0x1b1)](_0x2a2c65){var _0x5a3c42=_0x2dbea6;return this[_0x5a3c42(0x17d)]['createInstance'](a,this['getId'](),_0x2a2c65);}};n[_0x2dbea6(0x196)][_0x2dbea6(0x19a)](u);var d=class extends n['FDocumentParagraph']{constructor(..._0x96a226){var _0x27f0e1=_0x2dbea6;super(..._0x96a226),l(this,_0x27f0e1(0x1a7),void 0x0);}[_0x2dbea6(0x17f)](_0x5e7b41){var _0x2ea548=_0x2dbea6;this['_docsFormulaCommandService']=_0x5e7b41[_0x2ea548(0x189)](t[_0x2ea548(0x1a8)]);}['insertFormula'](_0x1db142,_0x2c04ea,_0x28c160={}){return this['_insert'](_0x1db142,_0x2c04ea,_0x28c160);}[_0x2dbea6(0x176)](_0x10826d,_0x48637f={}){var _0x35a21c=_0x2dbea6;return this[_0x35a21c(0x1a1)](_0x35a21c(0x1b2),_0x10826d,_0x48637f);}['_insert'](_0x5b16f4,_0x4efeca,_0x4f2b8d){var _0x2e3227=_0x2dbea6;if(this['getSegmentId']())return null;let _0x4dc51e={'externalReferences':_0x4f2b8d[_0x2e3227(0x1c2)],'formula':_0x4efeca,'numberFormat':_0x4f2b8d['numberFormat'],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x5b16f4},'unitId':this[_0x2e3227(0x1cb)][_0x2e3227(0x1d0)]()},_0x432f31=this[_0x2e3227(0x1a7)]['syncExecuteCommand'](e[_0x2e3227(0x1c7)]['id'],_0x4dc51e);return _0x432f31?this[_0x2e3227(0x17d)][_0x2e3227(0x1ae)](a,this[_0x2e3227(0x1cb)][_0x2e3227(0x1d0)](),_0x432f31['rangeId']):null;}};n[_0x2dbea6(0x195)]['extend'](d);var f=class extends n[_0x2dbea6(0x1c8)]{constructor(..._0x41e00b){var _0x402e6c=_0x2dbea6;super(..._0x41e00b),l(this,_0x402e6c(0x1a7),void 0x0);}[_0x2dbea6(0x17f)](_0x55707d){var _0x46136a=_0x2dbea6;this['_docsFormulaCommandService']=_0x55707d[_0x46136a(0x189)](t[_0x46136a(0x1a8)]);}[_0x2dbea6(0x175)](_0x6cb186,_0x47583b={}){var _0x173b54=_0x2dbea6;let {endOffset:_0x39d548,segmentId:_0x2709d5,startOffset:_0x413267}=this[_0x173b54(0x1a5)]();return _0x2709d5?null:this[_0x173b54(0x1a1)](_0x413267,_0x39d548,_0x6cb186,_0x47583b);}[_0x2dbea6(0x1a1)](_0x24d170,_0x2a1b2b,_0xd1fab3,_0x44d7e0){var _0x19362a=_0x2dbea6;let _0x1b9b82={'externalReferences':_0x44d7e0[_0x19362a(0x1c2)],'formula':_0xd1fab3,'numberFormat':_0x44d7e0[_0x19362a(0x194)],'target':{'type':_0x19362a(0x183),'startOffset':_0x24d170,'endOffset':_0x2a1b2b},'unitId':this['_document'][_0x19362a(0x1d0)]()},_0x3d69c6=this[_0x19362a(0x1a7)][_0x19362a(0x1d1)](e[_0x19362a(0x1c7)]['id'],_0x1b9b82);return _0x3d69c6?this[_0x19362a(0x17d)][_0x19362a(0x1ae)](a,this[_0x19362a(0x1cb)][_0x19362a(0x1d0)](),_0x3d69c6[_0x19362a(0x188)]):null;}};n['FDocumentTextRange'][_0x2dbea6(0x19a)](f),Object[_0x2dbea6(0x1b0)](exports,'FDocumentFormula',{'enumerable':!0x0,'get':function(){return a;}});
@@ -0,0 +1 @@
1
+ const _0xfcbb9f=_0x4740;(function(_0x50e69c,_0x4eeb4a){const _0x4095e1=_0x4740,_0x5766e8=_0x50e69c();while(!![]){try{const _0x520115=parseInt(_0x4095e1(0x22d))/0x1+parseInt(_0x4095e1(0x275))/0x2*(parseInt(_0x4095e1(0x15a))/0x3)+parseInt(_0x4095e1(0x196))/0x4*(parseInt(_0x4095e1(0x16d))/0x5)+parseInt(_0x4095e1(0x278))/0x6*(parseInt(_0x4095e1(0x271))/0x7)+-parseInt(_0x4095e1(0x1e8))/0x8*(-parseInt(_0x4095e1(0x1a4))/0x9)+-parseInt(_0x4095e1(0x217))/0xa*(parseInt(_0x4095e1(0x151))/0xb)+parseInt(_0x4095e1(0x1dd))/0xc*(-parseInt(_0x4095e1(0x26d))/0xd);if(_0x520115===_0x4eeb4a)break;else _0x5766e8['push'](_0x5766e8['shift']());}catch(_0x131ed1){_0x5766e8['push'](_0x5766e8['shift']());}}}(_0x3363,0x440b5),Object[_0xfcbb9f(0x20c)](exports,Symbol[_0xfcbb9f(0x268)],{'value':_0xfcbb9f(0x195)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0xfcbb9f(0x184),s=_0xfcbb9f(0x20a);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x58c32e){const _0x1cd88b=_0xfcbb9f;return!_0x58c32e||typeof _0x58c32e!=_0x1cd88b(0x1dc)||!f(_0x58c32e,[_0x1cd88b(0x161),_0x1cd88b(0x1ee)])||!('schemaVersion'in _0x58c32e)||_0x58c32e[_0x1cd88b(0x161)]!==0x1||!(_0x1cd88b(0x1ee)in _0x58c32e)||!_0x58c32e[_0x1cd88b(0x1ee)]||typeof _0x58c32e['formulas']!=_0x1cd88b(0x1dc)||Array[_0x1cd88b(0x1d5)](_0x58c32e[_0x1cd88b(0x1ee)])?!0x1:Object[_0x1cd88b(0x1e6)](_0x58c32e[_0x1cd88b(0x1ee)])[_0x1cd88b(0x249)](([_0x4d4979,_0x48609e])=>_0x4d4979[_0x1cd88b(0x24d)]>0x0&&u(_0x48609e));}function u(_0x3072bd){const _0x1879e9=_0xfcbb9f;return!_0x3072bd||typeof _0x3072bd!=_0x1879e9(0x1dc)||!f(_0x3072bd,['formula',_0x1879e9(0x27a),_0x1879e9(0x148)])||!('formula'in _0x3072bd)||typeof _0x3072bd[_0x1879e9(0x1d6)]!=_0x1879e9(0x207)||!_0x3072bd[_0x1879e9(0x1d6)][_0x1879e9(0x241)]()||_0x1879e9(0x27a)in _0x3072bd&&_0x3072bd[_0x1879e9(0x27a)]!=null&&(typeof _0x3072bd[_0x1879e9(0x27a)]!=_0x1879e9(0x1dc)||!f(_0x3072bd[_0x1879e9(0x27a)],[_0x1879e9(0x272)])||!(_0x1879e9(0x272)in _0x3072bd[_0x1879e9(0x27a)])||typeof _0x3072bd[_0x1879e9(0x27a)][_0x1879e9(0x272)]!=_0x1879e9(0x207))?!0x1:!(_0x1879e9(0x148)in _0x3072bd)||_0x3072bd[_0x1879e9(0x148)]==null||d(_0x3072bd[_0x1879e9(0x148)]);}function d(_0x4a2718){const _0x47efbf=_0xfcbb9f;return!_0x4a2718||typeof _0x4a2718!=_0x47efbf(0x1dc)||!f(_0x4a2718,['v','t',_0x47efbf(0x272)])||!('v'in _0x4a2718)||_0x4a2718['v']!==null&&typeof _0x4a2718['v']!=_0x47efbf(0x207)&&typeof _0x4a2718['v']!=_0x47efbf(0x13d)&&typeof _0x4a2718['v']!='boolean'||'t'in _0x4a2718&&_0x4a2718['t']!=null&&!ee(_0x4a2718['t'])?!0x1:!(_0x47efbf(0x272)in _0x4a2718)||_0x4a2718[_0x47efbf(0x272)]==null||typeof _0x4a2718[_0x47efbf(0x272)]==_0x47efbf(0x207);}function f(_0x2c9f93,_0x23fcb1){const _0xb5b6f3=_0xfcbb9f;let _0x85903e=new Set(_0x23fcb1);return Object[_0xb5b6f3(0x286)](_0x2c9f93)['every'](_0x5597d2=>_0x85903e['has'](_0x5597d2));}function ee(_0x54199b){const _0xd49bff=_0xfcbb9f;return typeof _0x54199b==_0xd49bff(0x13d)&&Object['values'](t[_0xd49bff(0x170)])[_0xd49bff(0x281)](_0x54199b);}const te=new Set([t[_0xfcbb9f(0x269)][_0xfcbb9f(0x191)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x1e2)],t['DataStreamTreeTokenType'][_0xfcbb9f(0x167)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x23a)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x1e7)],t['DataStreamTreeTokenType']['TABLE_ROW_END'],t[_0xfcbb9f(0x269)]['TABLE_END'],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x24c)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x245)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x1e1)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x16b)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x227)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x226)],t[_0xfcbb9f(0x269)][_0xfcbb9f(0x22c)]]);var p=class extends Error{constructor(){const _0x36d967=_0xfcbb9f;super(_0x36d967(0x213));}};function m(_0x51ffd3){const _0x38da73=_0xfcbb9f;var _0x1960f9,_0x49f1a0,_0x52b5bc,_0x2e10a2;let _0x23b816=t[_0x38da73(0x18d)][_0x38da73(0x1ff)](_0x51ffd3[_0x38da73(0x22b)]),_0x4fc122=T(_0x23b816),{startOffset:_0x3f6262,endOffset:_0x105a23}=ae(_0x4fc122,_0x51ffd3[_0x38da73(0x277)],_0x51ffd3[_0x38da73(0x255)]);v(_0x4fc122,_0x3f6262,_0x105a23);let _0x45b693=(_0x1960f9=(_0x49f1a0=_0x4fc122['customRanges'])==null?void 0x0:_0x49f1a0[_0x38da73(0x265)](_0x3c783c=>{const _0x5616a9=_0x38da73;if(!g(_0x3c783c))return!0x1;let _0x3076f3=(0x0,t[_0x5616a9(0x14d)])(_0x3c783c);return _0x3076f3['endOffset']>_0x3f6262&&_0x3076f3[_0x5616a9(0x277)]<_0x105a23;})[_0x38da73(0x177)](_0x449e89=>_0x449e89[_0x38da73(0x24a)]))==null?[]:_0x1960f9;se(_0x4fc122,_0x3f6262,_0x105a23,''),_0x4fc122[_0x38da73(0x27b)]=[...(_0x52b5bc=(_0x2e10a2=_0x4fc122[_0x38da73(0x27b)])==null?void 0x0:_0x2e10a2['filter'](_0x4875f9=>!_0x45b693[_0x38da73(0x281)](_0x4875f9[_0x38da73(0x24a)])&&_0x4875f9['rangeId']!==_0x51ffd3[_0x38da73(0x24a)]))==null?[]:_0x52b5bc,ie(_0x51ffd3[_0x38da73(0x24a)],_0x3f6262)]['sort']((_0x329af9,_0x2110cc)=>_0x329af9[_0x38da73(0x212)]-_0x2110cc[_0x38da73(0x212)]);let _0xaabf21=y(_0x51ffd3[_0x38da73(0x1fd)]);return _0x45b693['forEach'](_0x531038=>{const _0x21a5e3=_0x38da73;delete _0xaabf21[_0x21a5e3(0x1ee)][_0x531038];}),_0xaabf21[_0x38da73(0x1ee)][_0x51ffd3['rangeId']]=t[_0x38da73(0x18d)][_0x38da73(0x1ff)](_0x51ffd3[_0x38da73(0x1de)]),{'nextDocumentData':_0x23b816,'nextResource':_0xaabf21,'cursorOffset':_0x3f6262+0x1};}function ne(_0x369e46){const _0x4f1ea9=_0xfcbb9f;var _0x4bcf78,_0x1be878;let _0x50615a=t[_0x4f1ea9(0x18d)][_0x4f1ea9(0x1ff)](_0x369e46[_0x4f1ea9(0x22b)]),_0x51a692=(_0x4bcf78=T(_0x50615a)[_0x4f1ea9(0x27b)])==null?void 0x0:_0x4bcf78[_0x4f1ea9(0x1a5)](_0x1fbdc4=>_0x1fbdc4[_0x4f1ea9(0x24a)]===_0x369e46[_0x4f1ea9(0x24a)]&&g(_0x1fbdc4));if(!_0x51a692||!((_0x1be878=_0x369e46['resource'])!=null&&_0x1be878[_0x4f1ea9(0x1ee)][_0x369e46[_0x4f1ea9(0x24a)]]))return null;let _0x3d2657=y(_0x369e46[_0x4f1ea9(0x1fd)]);return _0x3d2657[_0x4f1ea9(0x1ee)][_0x369e46[_0x4f1ea9(0x24a)]]=t[_0x4f1ea9(0x18d)]['deepClone'](_0x369e46[_0x4f1ea9(0x1de)]),{'nextDocumentData':_0x50615a,'nextResource':_0x3d2657,'cursorOffset':_0x51a692[_0x4f1ea9(0x17f)]+0x1};}function re(_0x237324){const _0x1f2ed4=_0xfcbb9f;var _0x55e00c;let _0x14467c=t[_0x1f2ed4(0x18d)]['deepClone'](_0x237324[_0x1f2ed4(0x22b)]),_0x21880d=ce(_0x14467c,_0x237324[_0x1f2ed4(0x24a)],(_0x55e00c=_0x237324[_0x1f2ed4(0x1ef)])==null?'':_0x55e00c);if(_0x21880d==null)return null;let _0x3fcd9f=y(_0x237324[_0x1f2ed4(0x1fd)]);return delete _0x3fcd9f[_0x1f2ed4(0x1ee)][_0x237324[_0x1f2ed4(0x24a)]],{'nextDocumentData':_0x14467c,'nextResource':_0x3fcd9f,'cursorOffset':_0x21880d};}function h(_0xdb59a0,_0x125d47){const _0x4c8af0=_0xfcbb9f;var _0x5bc240,_0x5056eb;let _0x534b01=t['Tools'][_0x4c8af0(0x1ff)](_0xdb59a0),_0x4c807a=_0x534b01[_0x4c8af0(0x214)];if(!_0x4c807a)return _0x534b01;let _0x198041=new Map(_0x125d47[_0x4c8af0(0x177)](_0x552674=>[_0x552674[_0x4c8af0(0x24a)],_0x552674[_0x4c8af0(0x1ef)]])),_0x32b4d3=(_0x5bc240=(_0x5056eb=_0x4c807a[_0x4c8af0(0x27b)])==null?void 0x0:_0x5056eb['filter'](_0x80faf8=>g(_0x80faf8)&&_0x198041[_0x4c8af0(0x1ce)](_0x80faf8[_0x4c8af0(0x24a)]))[_0x4c8af0(0x211)]((_0x1eb87c,_0x2c43ab)=>_0x2c43ab[_0x4c8af0(0x212)]-_0x1eb87c[_0x4c8af0(0x212)]))==null?[]:_0x5bc240;for(let _0x1fd8ae of _0x32b4d3){var _0x735043;ce(_0x534b01,_0x1fd8ae[_0x4c8af0(0x24a)],(_0x735043=_0x198041[_0x4c8af0(0x1a3)](_0x1fd8ae['rangeId']))==null?'':_0x735043);}return _0x534b01;}function g(_0x3dc35c){const _0x5cb2f4=_0xfcbb9f;var _0x599c7f;return(_0x3dc35c==null?void 0x0:_0x3dc35c[_0x5cb2f4(0x188)])===t[_0x5cb2f4(0x285)]['CUSTOM']&&_0x3dc35c[_0x5cb2f4(0x1c2)]===!0x0&&((_0x599c7f=_0x3dc35c[_0x5cb2f4(0x25e)])==null?void 0x0:_0x599c7f[_0x5cb2f4(0x201)])===_0x5cb2f4(0x20a);}function _(_0x281938,_0x41f4ea){const _0x465b50=_0xfcbb9f;var _0x3914b0;return _0x281938==null||(_0x3914b0=_0x281938[_0x465b50(0x27b)])==null?void 0x0:_0x3914b0[_0x465b50(0x1a5)](_0x2d1a85=>_0x2d1a85[_0x465b50(0x24a)]===_0x41f4ea&&g(_0x2d1a85));}function v(_0x40ad2e,_0x5ecc5d,_0x29fc0b){const _0x5a0359=_0xfcbb9f;if(_0x5ecc5d===_0x29fc0b){if(te['has'](_0x40ad2e[_0x5a0359(0x1a7)][_0x5ecc5d]))throw new p();return;}for(let _0x61b013=_0x5ecc5d;_0x61b013<_0x29fc0b;_0x61b013++)if(_0x40ad2e[_0x5a0359(0x1a7)][_0x61b013]===t['DataStreamTreeTokenType'][_0x5a0359(0x18e)]||te[_0x5a0359(0x1ce)](_0x40ad2e[_0x5a0359(0x1a7)][_0x61b013]))throw new p();}function ie(_0x23a87e,_0x3fc49e){const _0x3f3a2f=_0xfcbb9f;return{'startIndex':_0x3fc49e,'endIndex':_0x3fc49e,'rangeId':_0x23a87e,'rangeType':t[_0x3f3a2f(0x285)][_0x3f3a2f(0x17a)],'wholeEntity':!0x0,'properties':{'kind':s}};}function y(_0x51b307){const _0x367874=_0xfcbb9f;return _0x51b307?t[_0x367874(0x18d)][_0x367874(0x1ff)](_0x51b307):c();}function ae(_0x2d5711,_0xe29e31,_0x3e0df7){const _0x94fa43=_0xfcbb9f;let _0x466414=oe(_0x2d5711),_0x533430=_0xe29e31==null?_0x466414:_0xe29e31,_0x5b5a71=_0x3e0df7==null?_0x533430:_0x3e0df7;return{'startOffset':b(Math[_0x94fa43(0x1eb)](_0x533430,_0x5b5a71),_0x466414),'endOffset':b(Math[_0x94fa43(0x1c3)](_0x533430,_0x5b5a71),_0x466414)};}function _0x4740(_0x116cda,_0x1e18a7){_0x116cda=_0x116cda-0x13d;const _0x3363ba=_0x3363();let _0x4740f9=_0x3363ba[_0x116cda];return _0x4740f9;}function b(_0x11eca3,_0x507087){const _0x34b482=_0xfcbb9f;return Math[_0x34b482(0x1c3)](0x0,Math[_0x34b482(0x1eb)](_0x11eca3,_0x507087));}function oe(_0x19947b){const _0x3b22a8=_0xfcbb9f;return _0x19947b[_0x3b22a8(0x1a7)]['endsWith'](''+t[_0x3b22a8(0x269)][_0x3b22a8(0x18e)]+t[_0x3b22a8(0x269)][_0x3b22a8(0x191)])?Math[_0x3b22a8(0x1c3)](0x0,_0x19947b['dataStream'][_0x3b22a8(0x24d)]-0x2):_0x19947b['dataStream'][_0x3b22a8(0x1bb)](t['DataStreamTreeTokenType'][_0x3b22a8(0x191)])?Math[_0x3b22a8(0x1c3)](0x0,_0x19947b['dataStream'][_0x3b22a8(0x24d)]-0x1):_0x19947b[_0x3b22a8(0x1a7)]['length'];}function se(_0x38d64c,_0x6c1287,_0x2598ae,_0x510957){_0x2598ae>_0x6c1287&&ue(_0x38d64c,_0x6c1287,_0x2598ae),le(_0x38d64c,_0x6c1287,_0x510957);}function ce(_0x5c547d,_0x5e17e4,_0x4cea2f){const _0x21bf84=_0xfcbb9f;var _0x436df1,_0x1b128d;let _0x552b6f=T(_0x5c547d),_0x57711f=(_0x436df1=_0x552b6f['customRanges'])==null?void 0x0:_0x436df1[_0x21bf84(0x1a5)](_0x5eb730=>_0x5eb730[_0x21bf84(0x24a)]===_0x5e17e4&&g(_0x5eb730));if(!_0x57711f)return null;let _0x33648d=(0x0,t[_0x21bf84(0x14d)])(_0x57711f);return se(_0x552b6f,_0x33648d[_0x21bf84(0x277)],_0x33648d[_0x21bf84(0x255)],_0x4cea2f),_0x552b6f['customRanges']=(_0x1b128d=_0x552b6f[_0x21bf84(0x27b)])==null?void 0x0:_0x1b128d['filter'](_0x4a93ce=>_0x4a93ce['rangeId']!==_0x5e17e4),_0x33648d[_0x21bf84(0x277)]+_0x4cea2f[_0x21bf84(0x24d)];}function le(_0x13ab1d,_0x4de362,_0x16c0a9){const _0x59a779=_0xfcbb9f;_0x16c0a9&&(_0x13ab1d[_0x59a779(0x1a7)]=''+_0x13ab1d[_0x59a779(0x1a7)]['slice'](0x0,_0x4de362)+_0x16c0a9+_0x13ab1d[_0x59a779(0x1a7)]['slice'](_0x4de362),de(_0x13ab1d,_0x4de362,_0x16c0a9[_0x59a779(0x24d)]));}function ue(_0x4b526e,_0x369764,_0xf8e253){const _0x5c1966=_0xfcbb9f;let _0x24bba2=_0xf8e253-_0x369764;_0x4b526e[_0x5c1966(0x1a7)]=''+_0x4b526e[_0x5c1966(0x1a7)]['slice'](0x0,_0x369764)+_0x4b526e[_0x5c1966(0x1a7)][_0x5c1966(0x16a)](_0xf8e253),fe(_0x4b526e,_0x369764,_0x24bba2);}function de(_0x5e81d3,_0x5f2c20,_0x2c3980){const _0x5b2acc=_0xfcbb9f;_0x5e81d3['paragraphs']=x(_0x5e81d3['paragraphs'],_0x5f2c20,_0x2c3980),_0x5e81d3['sectionBreaks']=x(_0x5e81d3[_0x5b2acc(0x252)],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x258)]=x(_0x5e81d3[_0x5b2acc(0x258)],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x18c)]=pe(_0x5e81d3[_0x5b2acc(0x18c)],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x13f)]=me(_0x5e81d3[_0x5b2acc(0x13f)],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x23f)]=C(_0x5e81d3['columnGroups'],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x27b)]=C(_0x5e81d3[_0x5b2acc(0x27b)],_0x5f2c20,_0x2c3980),_0x5e81d3[_0x5b2acc(0x1ed)]=C(_0x5e81d3['customDecorations'],_0x5f2c20,_0x2c3980),_0x5e81d3['blockRanges']=C(_0x5e81d3[_0x5b2acc(0x218)],_0x5f2c20,_0x2c3980);}function fe(_0x360be4,_0x24687d,_0x1973aa){const _0x35b857=_0xfcbb9f;var _0x3f01d2,_0x4178d0;_0x360be4[_0x35b857(0x228)]=S(_0x360be4[_0x35b857(0x228)],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x252)]=S(_0x360be4[_0x35b857(0x252)],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x258)]=S(_0x360be4['customBlocks'],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x18c)]=(_0x3f01d2=he((_0x4178d0=_0x360be4[_0x35b857(0x18c)])==null?void 0x0:_0x4178d0['map'](_0x2cf66c=>({..._0x2cf66c,'startIndex':_0x2cf66c['st'],'endIndex':_0x2cf66c['ed']})),_0x24687d,_0x1973aa))==null?void 0x0:_0x3f01d2['map'](_0x3b8c9f=>{let {startIndex:_0x13cf09,endIndex:_0x4335d3,..._0x260ed5}=_0x3b8c9f;return{..._0x260ed5,'st':_0x13cf09,'ed':_0x4335d3};}),_0x360be4[_0x35b857(0x13f)]=he(_0x360be4['tables'],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x23f)]=w(_0x360be4[_0x35b857(0x23f)],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x27b)]=w(_0x360be4[_0x35b857(0x27b)],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x1ed)]=w(_0x360be4['customDecorations'],_0x24687d,_0x1973aa),_0x360be4[_0x35b857(0x218)]=w(_0x360be4[_0x35b857(0x218)],_0x24687d,_0x1973aa);}function x(_0x5a90cb,_0x3d0a09,_0x5152ba){const _0x11c079=_0xfcbb9f;return _0x5a90cb==null?void 0x0:_0x5a90cb[_0x11c079(0x177)](_0x41eef8=>_0x41eef8[_0x11c079(0x212)]>=_0x3d0a09?{..._0x41eef8,'startIndex':_0x41eef8['startIndex']+_0x5152ba}:_0x41eef8);}function S(_0x20df28,_0x5d91d8,_0x479a3c){const _0x122094=_0xfcbb9f;let _0x478e03=_0x5d91d8+_0x479a3c;return _0x20df28==null?void 0x0:_0x20df28[_0x122094(0x177)](_0x471a70=>_0x471a70[_0x122094(0x212)]>=_0x5d91d8&&_0x471a70[_0x122094(0x212)]<_0x478e03?null:_0x471a70[_0x122094(0x212)]>=_0x478e03?{..._0x471a70,'startIndex':_0x471a70[_0x122094(0x212)]-_0x479a3c}:_0x471a70)[_0x122094(0x265)](_0x3a0920=>_0x3a0920!=null);}function pe(_0x2953dd,_0x8560ce,_0x56a71b){const _0x31fc0e=_0xfcbb9f;return _0x2953dd==null?void 0x0:_0x2953dd[_0x31fc0e(0x177)](_0xee9ca1=>_0xee9ca1['st']>=_0x8560ce?{..._0xee9ca1,'st':_0xee9ca1['st']+_0x56a71b,'ed':_0xee9ca1['ed']+_0x56a71b}:_0xee9ca1['ed']>_0x8560ce?{..._0xee9ca1,'ed':_0xee9ca1['ed']+_0x56a71b}:_0xee9ca1);}function C(_0x267068,_0x1bfda1,_0x323121){const _0x5dd2ee=_0xfcbb9f;return _0x267068==null?void 0x0:_0x267068[_0x5dd2ee(0x177)](_0x49349c=>(0x0,t[_0x5dd2ee(0x221)])(_0x49349c,_0x1bfda1,_0x323121));}function me(_0x1e950a,_0x72bab6,_0x5bfc80){const _0x14dabc=_0xfcbb9f;return _0x1e950a==null?void 0x0:_0x1e950a[_0x14dabc(0x177)](_0x29d06f=>(0x0,t[_0x14dabc(0x1b0)])(_0x29d06f,_0x72bab6,_0x5bfc80));}function w(_0x522043,_0x5c3af5,_0x5b3691){const _0x1dc9b8=_0xfcbb9f;return _0x522043==null?void 0x0:_0x522043[_0x1dc9b8(0x177)](_0x201acd=>(0x0,t['shiftInclusiveRangeOnDelete'])(_0x201acd,_0x5c3af5,_0x5b3691))['filter'](_0x467377=>_0x467377!=null);}function he(_0x50b1e9,_0x32ba35,_0x33ec3d){const _0x878f26=_0xfcbb9f;return _0x50b1e9==null?void 0x0:_0x50b1e9[_0x878f26(0x177)](_0x1eb76f=>(0x0,t[_0x878f26(0x1ad)])(_0x1eb76f,_0x32ba35,_0x33ec3d))['filter'](_0x226ad5=>_0x226ad5!=null);}function T(_0x2ce553){const _0x4daea5=_0xfcbb9f;if(!_0x2ce553[_0x4daea5(0x214)])throw Error(_0x4daea5(0x198));return _0x2ce553['body'];}function E(_0x4470e1){'@babel/helpers - typeof';const _0x2af2ca=_0xfcbb9f;return E=typeof Symbol==_0x2af2ca(0x17e)&&typeof Symbol[_0x2af2ca(0x243)]=='symbol'?function(_0x5040bb){return typeof _0x5040bb;}:function(_0x51fe65){const _0x1c28b1=_0x2af2ca;return _0x51fe65&&typeof Symbol=='function'&&_0x51fe65[_0x1c28b1(0x257)]===Symbol&&_0x51fe65!==Symbol[_0x1c28b1(0x284)]?_0x1c28b1(0x289):typeof _0x51fe65;},E(_0x4470e1);}function ge(_0x820f6b,_0x2de3ec){const _0x4b6888=_0xfcbb9f;if(E(_0x820f6b)!=_0x4b6888(0x1dc)||!_0x820f6b)return _0x820f6b;var _0x355117=_0x820f6b[Symbol[_0x4b6888(0x256)]];if(_0x355117!==void 0x0){var _0x72d87a=_0x355117[_0x4b6888(0x20f)](_0x820f6b,_0x2de3ec||_0x4b6888(0x24e));if(E(_0x72d87a)!=_0x4b6888(0x1dc))return _0x72d87a;throw TypeError(_0x4b6888(0x283));}return(_0x2de3ec===_0x4b6888(0x207)?String:Number)(_0x820f6b);}function _e(_0x683cf3){const _0x755aec=_0xfcbb9f;var _0x27ea3f=ge(_0x683cf3,_0x755aec(0x207));return E(_0x27ea3f)==_0x755aec(0x289)?_0x27ea3f:_0x27ea3f+'';}function D(_0x54620e,_0x277917,_0x2284e1){const _0x17bfe2=_0xfcbb9f;return(_0x277917=_e(_0x277917))in _0x54620e?Object[_0x17bfe2(0x20c)](_0x54620e,_0x277917,{'value':_0x2284e1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x54620e[_0x277917]=_0x2284e1,_0x54620e;}var O=class extends t[_0xfcbb9f(0x1fe)]{constructor(..._0x583d0e){const _0x491b14=_0xfcbb9f;super(..._0x583d0e),D(this,'_resources',new Map()),D(this,'_rawResources',new Map()),D(this,'_loadErrors',new Map()),D(this,'_change$',new i[(_0x491b14(0x192))]()),D(this,'change$',this['_change$']['asObservable']());}[_0xfcbb9f(0x1f7)](_0x541799,_0x270fb7){const _0x2f4293=_0xfcbb9f;var _0x2ec07a;let _0x4b5f3b=(_0x2ec07a=this['_resources'][_0x2f4293(0x1a3)](_0x541799))==null?void 0x0:_0x2ec07a[_0x2f4293(0x1ee)][_0x270fb7];return _0x4b5f3b?t['Tools'][_0x2f4293(0x1ff)](_0x4b5f3b):void 0x0;}[_0xfcbb9f(0x233)](_0xd61a05){const _0x515137=_0xfcbb9f;var _0x49297a,_0x27c4aa;return t[_0x515137(0x18d)][_0x515137(0x1ff)]((_0x49297a=(_0x27c4aa=this[_0x515137(0x1a1)][_0x515137(0x1a3)](_0xd61a05))==null?void 0x0:_0x27c4aa['formulas'])==null?{}:_0x49297a);}[_0xfcbb9f(0x1b3)](_0x452f28){const _0x3c2504=_0xfcbb9f;let _0x550643=this['_resources']['get'](_0x452f28);return _0x550643?t['Tools'][_0x3c2504(0x1ff)](_0x550643):void 0x0;}[_0xfcbb9f(0x183)](_0x51c3b6,_0x2c7dd4,_0x4e1aa3){return this['setFormulas'](_0x51c3b6,{[_0x2c7dd4]:_0x4e1aa3});}['setResource'](_0x44b9f0,_0x514667){const _0x748b37=_0xfcbb9f;return this['_loadErrors'][_0x748b37(0x1ce)](_0x44b9f0)||!l(_0x514667)?!0x1:(this[_0x748b37(0x1a1)][_0x748b37(0x1f5)](_0x44b9f0,t[_0x748b37(0x18d)][_0x748b37(0x1ff)](_0x514667)),this['_change$'][_0x748b37(0x21a)]({'unitId':_0x44b9f0}),!0x0);}[_0xfcbb9f(0x288)](_0x223b09,_0x77c3f5){const _0x4eb92d=_0xfcbb9f;var _0x121eb8;if(this[_0x4eb92d(0x253)][_0x4eb92d(0x1ce)](_0x223b09)||!Object[_0x4eb92d(0x286)](_0x77c3f5)[_0x4eb92d(0x24d)]||!l({'schemaVersion':0x1,'formulas':_0x77c3f5}))return!0x1;let _0x5ef5b6=(_0x121eb8=this[_0x4eb92d(0x1a1)][_0x4eb92d(0x1a3)](_0x223b09))==null?c():_0x121eb8,_0x2348ca=t[_0x4eb92d(0x18d)]['deepClone'](_0x5ef5b6);return Object[_0x4eb92d(0x246)](_0x2348ca[_0x4eb92d(0x1ee)],t['Tools'][_0x4eb92d(0x1ff)](_0x77c3f5)),this[_0x4eb92d(0x1a1)]['set'](_0x223b09,_0x2348ca),this['_change$'][_0x4eb92d(0x21a)]({'unitId':_0x223b09,'rangeIds':Object['keys'](_0x77c3f5)}),!0x0;}[_0xfcbb9f(0x244)](_0x21d903,_0x5c893c){const _0x436bad=_0xfcbb9f;if(this[_0x436bad(0x253)][_0x436bad(0x1ce)](_0x21d903))return!0x1;let _0x182cfc=this[_0x436bad(0x1a1)][_0x436bad(0x1a3)](_0x21d903);if(!(_0x182cfc!=null&&_0x182cfc['formulas'][_0x5c893c]))return!0x1;let _0x469663=t[_0x436bad(0x18d)][_0x436bad(0x1ff)](_0x182cfc);return delete _0x469663['formulas'][_0x5c893c],this[_0x436bad(0x1a1)][_0x436bad(0x1f5)](_0x21d903,_0x469663),this[_0x436bad(0x1f1)][_0x436bad(0x21a)]({'unitId':_0x21d903,'rangeIds':[_0x5c893c]}),!0x0;}[_0xfcbb9f(0x1e3)](_0x2ee522,_0x4f9687){const _0xa68803=_0xfcbb9f;return _0x4f9687&&typeof _0x4f9687=='object'&&_0xa68803(0x161)in _0x4f9687&&_0x4f9687[_0xa68803(0x161)]!==0x1?(this['_preserveInvalid'](_0x2ee522,_0x4f9687,_0xa68803(0x25c)),!0x1):l(_0x4f9687)?(this[_0xa68803(0x1a1)][_0xa68803(0x1f5)](_0x2ee522,t[_0xa68803(0x18d)]['deepClone'](_0x4f9687)),this[_0xa68803(0x242)]['delete'](_0x2ee522),this[_0xa68803(0x253)]['delete'](_0x2ee522),this[_0xa68803(0x1f1)][_0xa68803(0x21a)]({'unitId':_0x2ee522}),!0x0):(this[_0xa68803(0x229)](_0x2ee522,_0x4f9687,_0xa68803(0x1d9)),!0x1);}['serialize'](_0x31baf0){const _0x7088a=_0xfcbb9f;let _0xd68071=this[_0x7088a(0x1a1)][_0x7088a(0x1a3)](_0x31baf0);return _0xd68071?t['Tools'][_0x7088a(0x1ff)](_0xd68071):this[_0x7088a(0x242)]['has'](_0x31baf0)?t[_0x7088a(0x18d)]['deepClone'](this['_rawResources']['get'](_0x31baf0)):c();}[_0xfcbb9f(0x142)](_0x5b61d6){const _0x15907e=_0xfcbb9f;return this[_0x15907e(0x253)][_0x15907e(0x1a3)](_0x5b61d6);}[_0xfcbb9f(0x1fb)](_0x517e8a){const _0xdf8771=_0xfcbb9f;this[_0xdf8771(0x1a1)]['delete'](_0x517e8a),this[_0xdf8771(0x242)][_0xdf8771(0x1f8)](_0x517e8a),this['_loadErrors']['delete'](_0x517e8a),this[_0xdf8771(0x1f1)]['next']({'unitId':_0x517e8a});}['dispose'](){const _0x2007b5=_0xfcbb9f;this[_0x2007b5(0x1a1)][_0x2007b5(0x262)](),this[_0x2007b5(0x242)][_0x2007b5(0x262)](),this[_0x2007b5(0x253)]['clear'](),this[_0x2007b5(0x1f1)][_0x2007b5(0x164)](),super[_0x2007b5(0x1ec)]();}[_0xfcbb9f(0x229)](_0x30d131,_0x1072d0,_0x2f23c3){const _0x2ee762=_0xfcbb9f;this[_0x2ee762(0x1a1)]['delete'](_0x30d131),this[_0x2ee762(0x242)][_0x2ee762(0x1f5)](_0x30d131,t[_0x2ee762(0x18d)][_0x2ee762(0x1ff)](_0x1072d0)),this['_loadErrors'][_0x2ee762(0x1f5)](_0x30d131,_0x2f23c3),this[_0x2ee762(0x1f1)][_0x2ee762(0x21a)]({'unitId':_0x30d131});}};let ve=function(_0x4e63a5){const _0x25bac1=_0xfcbb9f;return _0x4e63a5[_0x25bac1(0x16c)]='empty',_0x4e63a5[_0x25bac1(0x234)]=_0x25bac1(0x208),_0x4e63a5[_0x25bac1(0x149)]=_0x25bac1(0x24f),_0x4e63a5[_0x25bac1(0x20e)]=_0x25bac1(0x236),_0x4e63a5;}({});function k(_0x5933db,_0x1d2ebd){return function(_0x172630,_0x553e79){_0x1d2ebd(_0x172630,_0x553e79,_0x5933db);};}function A(_0x260cb7,_0x37e2d5,_0x2c57a9,_0x50acca){const _0x5b043f=_0xfcbb9f;var _0x3fb681=arguments[_0x5b043f(0x24d)],_0x483186=_0x3fb681<0x3?_0x37e2d5:_0x50acca===null?_0x50acca=Object['getOwnPropertyDescriptor'](_0x37e2d5,_0x2c57a9):_0x50acca,_0x65e422;if(typeof Reflect==_0x5b043f(0x1dc)&&typeof Reflect[_0x5b043f(0x15f)]==_0x5b043f(0x17e))_0x483186=Reflect[_0x5b043f(0x15f)](_0x260cb7,_0x37e2d5,_0x2c57a9,_0x50acca);else{for(var _0x5d2a2c=_0x260cb7[_0x5b043f(0x24d)]-0x1;_0x5d2a2c>=0x0;_0x5d2a2c--)(_0x65e422=_0x260cb7[_0x5d2a2c])&&(_0x483186=(_0x3fb681<0x3?_0x65e422(_0x483186):_0x3fb681>0x3?_0x65e422(_0x37e2d5,_0x2c57a9,_0x483186):_0x65e422(_0x37e2d5,_0x2c57a9))||_0x483186);}return _0x3fb681>0x3&&_0x483186&&Object[_0x5b043f(0x20c)](_0x37e2d5,_0x2c57a9,_0x483186),_0x483186;}function _0x3363(){const _0x507e2b=['stringify','TextX','docs-formula.config','wholeEntity','max','deleteFormula','paragraphId','fromEntries','getAllUnitsForType','_instanceService','resolveBinding','_queueSync','from','SetDocFormulaLastValuesMutation','getRegisteredFormulas','has','insertLength','RegisterOtherFormulaService','segmentId','onStarting','nextDocumentData','referenceRevision','isArray','formula','getParagraphContentStartOffset','paragraph','invalid-resource','UniverDocsPlugin','getRevision','object','12AbfrKt','config','merge','CommandType','COLUMN_END','TABLE_START','load','DOC_FORMULA_CUSTOM_RANGE_KIND','updates','entries','TABLE_CELL_END','216DTVqbo','1.0.0-insiders.20260729-99504c3','unregisterUnit','min','dispose','customDecorations','formulas','text','values','_change$','ConvertDocFormulaToTextCommand','_config','formulaResult$','set','ICommandService','getFormula','delete','resolveFormulaResultPresentation','selection','removeUnit','OtherFormulaBizType','resource','Disposable','deepClone','buildRemoveDocFormulaActions','kind','_univerInstanceService','unitDisposed$','getResult','subscribe','docs-formula.command.convert-to-text','string','pending','UniverLicensePlugin','univer-docs-formula','UpdateDocFormulaCommand','defineProperty','model','ERROR','call','setResource','sort','startIndex','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','body','RemoveDocFormulaMutation','startsWith','14460pHheuG','blockRanges','document','next','FormulaResultStatus','resolveFormula','isInteger','collectFormulaExternalReferenceQualifiers','degradeDocumentData','touchDependencies','shiftInclusiveRangeOnInsert','DOC_SELECTION_OPTION_PRESERVE_CARET','getFormulaValueSync','findDocFormulaRange','getRichTextEditPath','BLOCK_END','BLOCK_START','paragraphs','_preserveInvalid','previousDocumentData','documentData','CUSTOM_BLOCK','124986yyqMeg','registerProvider','previousResource','createEmptyDocFormulaResource','JSONX','expectedReferenceRevision','getFormulas','PENDING','serialize','error','externalMutations','_hostExternalReferenceModel','collectMutations','TABLE_CELL_START','nextResource','insert','parse','FormulaCacheEligibilityService','columnGroups','deleteLength','trim','_rawResources','iterator','removeFormula','COLUMN_START','assign','RemoveDocFormulaCommand','_model','every','rangeId','COMMAND','COLUMN_GROUP_START','length','default','success','_cacheEligibilityService','getInstance','sectionBreaks','_loadErrors','undoMutation','endOffset','toPrimitive','constructor','customBlocks','resources','type','buildUpdateDocFormulaActions','unsupported-version','params','properties','registerCommand','data','cursorOffset','clear','getUnit','isDocFormulaResource','filter','name','registerFormulaWithRange','toStringTag','DataStreamTreeTokenType','getUnitId','DocSelectionManagerService','docs-formula.command.update','17513561gTlncE','Plugin','resourceRedo','range','3498887tOhSEu','pattern','DocFormulaService','DOC','4klcJLS','UNIVER_DOC','startOffset','6SlTPXw','externalReferences','numberFormat','customRanges','Injector','isFormulaLastValue','_syncScheduled','retain','presentationChanged$','includes','Inject','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','prototype','CustomRangeType','keys','_syncUnit','setFormulas','symbol','_setPresentation','number','FormulaLastValuePersistenceService','tables','IConfigService','DependentOn','getLoadError','registerPluginResource','eligible','unitId','buildInsertDocFormulaActions','generateRandomId','lastValue','SUCCESS','UniverDocsFormulaPlugin','presentation','resolveText','getCustomRangeInterval','forEach','cell','unregister','2299YVfFmN','getPresentation','end','empty','_registrationService','_formulaService','formulaId','getSnapshot','syncExecuteCommand','488694shCUjd','references','resolveHostFormulaExternalReferences','syncUnit','DocFormulaResourceController','decorate','_pendingUnitIds','schemaVersion','start','status','complete','onCommandExecuted','assess','TABLE_ROW_START','RichTextEditingMutation','some','slice','COLUMN_GROUP_END','EMPTY','185jjYHFa','setConfig','SetDocFormulaMutation','CellValueType','SetDocFormulaNumberFormatCommand','getCurrentUnitOfType','assertSafeDocFormulaInsertRange','_commandService','_injector','identity','map','_registrations','disposeWithMe','CUSTOM','_formulaKeys','asObservable','color','function','endIndex','UniverInstanceType','_isDisposed','target','setFormula','DOC_FORMULA_PLUGIN','_docFormulaModel','docs-formula.command.insert','add','rangeType','getTextRanges','resolved','docs-formula.mutation.set-last-values','textRuns','Tools','PARAGRAPH','@univerjs-pro/docs-formula','register','SECTION_BREAK','Subject','accessor','expectedFormula','Module','47548ckVFdh','_deleteRegistration','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','docs-formula.mutation.remove-formula','stale','version','pluginName','position','resourceUndo','redoMutation','getScalarFormulaResultCell','_resources','HostExternalReferenceModel','get','179226kbFOif','find','_configService','dataStream','_updateFormulaResult','liveResult','push','unitAdded$','InsertDocFormulaCommand','shiftExclusiveRangeOnDelete','notifyTextChanged','LexerTreeBuilder','shiftExclusiveRangeOnInsert','DOC_FORMULA_SCHEMA_VERSION','UniverProFormulaEnginePlugin','getResource','editOp','source','MUTATION','documentRedo','IUniverInstanceService','_service','InvalidDocFormulaInsertRangeError','endsWith','docs-formula.command.remove','_presentationChanged$','DocFormulaLifecycleController'];_0x3363=function(){return _0x507e2b;};return _0x3363();}let j=class extends t['Disposable']{constructor(_0x4261ef,_0x14fee0,_0x75867c){const _0x2ed3be=_0xfcbb9f;super(),this[_0x2ed3be(0x248)]=_0x4261ef,this[_0x2ed3be(0x155)]=_0x14fee0,this[_0x2ed3be(0x238)]=_0x75867c,D(this,_0x2ed3be(0x178),new Map()),D(this,_0x2ed3be(0x17b),new Map()),D(this,_0x2ed3be(0x1bd),new i[(_0x2ed3be(0x192))]()),D(this,_0x2ed3be(0x280),this[_0x2ed3be(0x1bd)][_0x2ed3be(0x17c)]()),this[_0x2ed3be(0x179)](this['_registrationService'][_0x2ed3be(0x1f4)][_0x2ed3be(0x205)](_0x615810=>{const _0x1bda75=_0x2ed3be;for(let _0x17e25a of Object[_0x1bda75(0x1f0)](_0x615810))for(let _0x12f1dd of Object[_0x1bda75(0x1f0)](_0x17e25a))_0x12f1dd['forEach'](_0x29f02d=>this[_0x1bda75(0x1a8)](_0x29f02d));}));}[_0xfcbb9f(0x15d)](_0x564d0c){const _0x3eba14=_0xfcbb9f;var _0x216b9e,_0x5043c0;let _0x23619c=_0x564d0c[_0x3eba14(0x26a)](),_0x17d815=(_0x216b9e=(_0x5043c0=_0x564d0c[_0x3eba14(0x158)]()['body'])==null||(_0x5043c0=_0x5043c0['customRanges'])==null?void 0x0:_0x5043c0[_0x3eba14(0x265)](g))==null?[]:_0x216b9e,_0x37867a=this[_0x3eba14(0x248)]['getFormulas'](_0x23619c),_0x486df5=new Set();for(let _0x2ec10f of _0x17d815){let _0x534471=_0x37867a[_0x2ec10f['rangeId']];_0x534471&&(_0x486df5[_0x3eba14(0x187)](M(_0x23619c,_0x2ec10f['rangeId'])),this[_0x3eba14(0x190)]({'unitId':_0x23619c,'rangeId':_0x2ec10f['rangeId']},_0x534471));}for(let _0x387897 of Array[_0x3eba14(0x1cb)](this['_registrations'][_0x3eba14(0x1f0)]()))_0x387897['unitId']===_0x23619c&&!_0x486df5[_0x3eba14(0x1ce)](M(_0x387897['unitId'],_0x387897[_0x3eba14(0x24a)]))&&this[_0x3eba14(0x150)](_0x387897);}[_0xfcbb9f(0x190)](_0x58078e,_0x39840f){const _0x372b72=_0xfcbb9f;let _0x49edbb=M(_0x58078e[_0x372b72(0x145)],_0x58078e['rangeId']),_0x5050be=this[_0x372b72(0x178)][_0x372b72(0x1a3)](_0x49edbb),_0xf3ae2=this['_hostExternalReferenceModel'][_0x372b72(0x1db)](_0x58078e[_0x372b72(0x145)]);if(_0x5050be&&_0x5050be[_0x372b72(0x1de)]['formula']===_0x39840f[_0x372b72(0x1d6)]&&_0x5050be[_0x372b72(0x1d4)]===_0xf3ae2){var _0x314f30;_0x5050be[_0x372b72(0x1de)]=_0x39840f;let _0x2cab67=_0x5050be[_0x372b72(0x157)]?(_0x314f30=this[_0x372b72(0x155)][_0x372b72(0x223)](_0x5050be[_0x372b72(0x145)],_0x5050be[_0x372b72(0x145)],_0x5050be[_0x372b72(0x157)]))==null?void 0x0:_0x314f30:void 0x0;_0x5050be[_0x372b72(0x1a9)]=_0x2cab67,this['_setPresentation'](_0x49edbb,N(_0x39840f,_0x2cab67));return;}_0x5050be!=null&&_0x5050be[_0x372b72(0x157)]&&this[_0x372b72(0x197)](_0x5050be);let _0x349d13={..._0x58078e,'config':_0x39840f,'referenceRevision':_0xf3ae2,'presentation':N(_0x39840f,void 0x0)};if(this[_0x372b72(0x178)][_0x372b72(0x1f5)](_0x49edbb,_0x349d13),!_0x39840f[_0x372b72(0x1d6)][_0x372b72(0x241)]())return;let _0x52828d=this[_0x372b72(0x155)][_0x372b72(0x267)](_0x58078e['unitId'],_0x58078e['unitId'],_0x39840f[_0x372b72(0x1d6)],void 0x0,{'rangeId':_0x58078e['rangeId']},r[_0x372b72(0x1fc)][_0x372b72(0x274)],_0x58078e[_0x372b72(0x24a)]);_0x349d13[_0x372b72(0x157)]=_0x52828d,this[_0x372b72(0x17b)][_0x372b72(0x1f5)](_0x52828d,_0x49edbb);}[_0xfcbb9f(0x150)](_0x27b508){const _0x32cb1e=_0xfcbb9f;let _0x8f01c0=M(_0x27b508[_0x32cb1e(0x145)],_0x27b508[_0x32cb1e(0x24a)]),_0x53c44c=this[_0x32cb1e(0x178)][_0x32cb1e(0x1a3)](_0x8f01c0);_0x53c44c&&(this[_0x32cb1e(0x197)](_0x53c44c),this[_0x32cb1e(0x178)][_0x32cb1e(0x1f8)](_0x8f01c0));}[_0xfcbb9f(0x1ea)](_0x4370e0){const _0x189dce=_0xfcbb9f;for(let _0x5c7e13 of Array[_0x189dce(0x1cb)](this[_0x189dce(0x178)][_0x189dce(0x1f0)]()))_0x5c7e13[_0x189dce(0x145)]===_0x4370e0&&this[_0x189dce(0x150)](_0x5c7e13);}[_0xfcbb9f(0x152)](_0x321de9){const _0x110b46=_0xfcbb9f;var _0x158b3d;return(_0x158b3d=this[_0x110b46(0x178)]['get'](M(_0x321de9[_0x110b46(0x145)],_0x321de9['rangeId'])))==null?void 0x0:_0x158b3d[_0x110b46(0x14b)];}[_0xfcbb9f(0x204)](_0x12a8de){const _0x5cb17c=_0xfcbb9f;let _0x2f5742=this[_0x5cb17c(0x178)][_0x5cb17c(0x1a3)](M(_0x12a8de['unitId'],_0x12a8de[_0x5cb17c(0x24a)]));return _0x2f5742?P(_0x2f5742):void 0x0;}[_0xfcbb9f(0x1cd)](){const _0x390b82=_0xfcbb9f;return Array['from'](this[_0x390b82(0x178)]['values'](),_0x5d79f6=>({'identity':{'unitId':_0x5d79f6[_0x390b82(0x145)],'rangeId':_0x5d79f6['rangeId']},'config':_0x5d79f6[_0x390b82(0x1de)],'referenceRevision':_0x5d79f6[_0x390b82(0x1d4)],..._0x5d79f6['liveResult']?{'liveResult':_0x5d79f6[_0x390b82(0x1a9)]}:null}));}['dispose'](){const _0x2b547f=_0xfcbb9f;for(let _0x34ac23 of this[_0x2b547f(0x178)]['values']())this[_0x2b547f(0x197)](_0x34ac23);this[_0x2b547f(0x178)]['clear'](),this[_0x2b547f(0x17b)]['clear'](),this[_0x2b547f(0x1bd)]['complete'](),super[_0x2b547f(0x1ec)]();}[_0xfcbb9f(0x1a8)](_0x2b0587){const _0x420e79=_0xfcbb9f;let _0x23f18e=this[_0x420e79(0x17b)][_0x420e79(0x1a3)](_0x2b0587['formulaId']),_0x1116e3=_0x23f18e?this['_registrations']['get'](_0x23f18e):void 0x0;!_0x23f18e||!_0x1116e3||(_0x1116e3[_0x420e79(0x1a9)]=_0x2b0587,this[_0x420e79(0x28a)](_0x23f18e,N(_0x1116e3[_0x420e79(0x1de)],_0x2b0587)));}[_0xfcbb9f(0x28a)](_0x2a4f59,_0x42f2cc){const _0x4afd29=_0xfcbb9f;var _0x2d1b80,_0x2ac0e3,_0x44d48c;let _0x50b0c1=this[_0x4afd29(0x178)]['get'](_0x2a4f59);if(!_0x50b0c1||ye(_0x50b0c1[_0x4afd29(0x14b)],_0x42f2cc))return;let _0x2a60bb=_0x50b0c1[_0x4afd29(0x14b)],_0x40930b=P(_0x50b0c1);_0x50b0c1[_0x4afd29(0x14b)]=_0x42f2cc,this[_0x4afd29(0x1bd)]['next']({'unitId':_0x50b0c1[_0x4afd29(0x145)],'rangeId':_0x50b0c1['rangeId'],'presentation':_0x42f2cc,'previousPresentation':_0x2a60bb,'result':P(_0x50b0c1),'previousResult':{..._0x40930b,..._0x2a60bb,'value':(_0x2d1b80=_0x2a60bb[_0x4afd29(0x14f)])==null?void 0x0:_0x2d1b80['v'],'valueType':(_0x2ac0e3=(_0x44d48c=_0x2a60bb[_0x4afd29(0x14f)])==null?void 0x0:_0x44d48c['t'])==null?void 0x0:_0x2ac0e3}});}[_0xfcbb9f(0x197)](_0x63751e){const _0x5a1023=_0xfcbb9f;_0x63751e[_0x5a1023(0x157)]&&(this['_registrationService'][_0x5a1023(0x1c4)](_0x63751e[_0x5a1023(0x145)],_0x63751e[_0x5a1023(0x145)],[_0x63751e[_0x5a1023(0x157)]]),this[_0x5a1023(0x17b)]['delete'](_0x63751e[_0x5a1023(0x157)]));}};j=A([k(0x0,(0x0,t[_0xfcbb9f(0x282)])(O)),k(0x1,(0x0,t['Inject'])(r[_0xfcbb9f(0x1d0)])),k(0x2,(0x0,t[_0xfcbb9f(0x282)])(e['HostExternalReferenceModel']))],j);function M(_0x3cb9e1,_0x1dfe11){return _0x3cb9e1+'\x00'+_0x1dfe11;}function N(_0x34f203,_0x322b55){const _0x3902e0=_0xfcbb9f;return(0x0,e[_0x3902e0(0x1f9)])({'numberFormat':_0x34f203[_0x3902e0(0x27a)],'lastValue':_0x34f203[_0x3902e0(0x148)],'result':_0x322b55});}function P(_0x271b49){const _0x530f39=_0xfcbb9f;var _0x4bb44c,_0x17615f,_0x44b923,_0x25977f;let _0x69532c=_0x271b49['presentation'],_0x1c9085=_0x271b49[_0x530f39(0x1de)][_0x530f39(0x1d6)][_0x530f39(0x241)]()?_0x69532c['stale']||_0x69532c['cell']==null?_0x530f39(0x208):((_0x4bb44c=_0x271b49[_0x530f39(0x1a9)])==null?void 0x0:_0x4bb44c[_0x530f39(0x163)])===r[_0x530f39(0x21b)][_0x530f39(0x20e)]?_0x530f39(0x236):'success':_0x530f39(0x154);return{..._0x69532c,'status':_0x1c9085,'value':(_0x17615f=_0x69532c['cell'])==null?void 0x0:_0x17615f['v'],'valueType':(_0x44b923=(_0x25977f=_0x69532c[_0x530f39(0x14f)])==null?void 0x0:_0x25977f['t'])==null?void 0x0:_0x44b923};}function ye(_0x3dfdf4,_0x36e59d){const _0x4c9946=_0xfcbb9f;var _0x1654a4,_0x245bec,_0x2c31d4,_0x7c0de5;return _0x3dfdf4[_0x4c9946(0x1ef)]===_0x36e59d[_0x4c9946(0x1ef)]&&_0x3dfdf4[_0x4c9946(0x17d)]===_0x36e59d[_0x4c9946(0x17d)]&&_0x3dfdf4['pattern']===_0x36e59d[_0x4c9946(0x272)]&&_0x3dfdf4[_0x4c9946(0x1b5)]===_0x36e59d[_0x4c9946(0x1b5)]&&_0x3dfdf4['stale']===_0x36e59d[_0x4c9946(0x19a)]&&((_0x1654a4=_0x3dfdf4[_0x4c9946(0x14f)])==null?void 0x0:_0x1654a4['t'])===((_0x245bec=_0x36e59d[_0x4c9946(0x14f)])==null?void 0x0:_0x245bec['t'])&&Object['is']((_0x2c31d4=_0x3dfdf4[_0x4c9946(0x14f)])==null?void 0x0:_0x2c31d4['v'],(_0x7c0de5=_0x36e59d['cell'])==null?void 0x0:_0x7c0de5['v']);}const F={'id':'docs-formula.mutation.set-formula','type':t[_0xfcbb9f(0x1e0)]['MUTATION'],'handler':(_0x539da3,_0x485452)=>!(_0x485452!=null&&_0x485452[_0xfcbb9f(0x145)])||!_0x485452[_0xfcbb9f(0x24a)]||!_0x485452['config']?!0x1:_0x539da3['get'](O)[_0xfcbb9f(0x183)](_0x485452[_0xfcbb9f(0x145)],_0x485452[_0xfcbb9f(0x24a)],_0x485452[_0xfcbb9f(0x1de)])},I={'id':_0xfcbb9f(0x199),'type':t[_0xfcbb9f(0x1e0)]['MUTATION'],'handler':(_0x494854,_0x4922ad)=>!(_0x4922ad!=null&&_0x4922ad[_0xfcbb9f(0x145)])||!_0x4922ad['rangeId']?!0x1:_0x494854[_0xfcbb9f(0x1a3)](O)[_0xfcbb9f(0x244)](_0x4922ad[_0xfcbb9f(0x145)],_0x4922ad['rangeId'])},L={'id':'docs-formula.mutation.set-resource','type':t[_0xfcbb9f(0x1e0)]['MUTATION'],'handler':(_0x46b068,_0x8a1b8e)=>!(_0x8a1b8e!=null&&_0x8a1b8e[_0xfcbb9f(0x145)])||!_0x8a1b8e[_0xfcbb9f(0x1fd)]?!0x1:_0x46b068['get'](O)['setResource'](_0x8a1b8e[_0xfcbb9f(0x145)],_0x8a1b8e[_0xfcbb9f(0x1fd)])},R={'id':_0xfcbb9f(0x18b),'type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x1b6)],'handler':(_0x46ae6e,_0x28aee0)=>{const _0x2ec187=_0xfcbb9f;if(!(_0x28aee0!=null&&_0x28aee0['unitId'])||!_0x28aee0[_0x2ec187(0x1e5)][_0x2ec187(0x24d)])return!0x1;let _0x393dcf=_0x46ae6e[_0x2ec187(0x1a3)](O),_0x5a639a=_0x46ae6e['get'](e['HostExternalReferenceModel']),_0x141ac2=_0x393dcf[_0x2ec187(0x1b3)](_0x28aee0[_0x2ec187(0x145)]);if(!_0x141ac2)return!0x1;let _0x5f48db=t[_0x2ec187(0x18d)][_0x2ec187(0x1ff)](_0x141ac2),_0x3c9140=!0x1;for(let _0x3b63bd of _0x28aee0[_0x2ec187(0x1e5)]){var _0x66720e,_0x4050fe,_0x3ce780,_0x2a1f9a;let _0x565362=_0x5f48db[_0x2ec187(0x1ee)][_0x3b63bd[_0x2ec187(0x24a)]];!_0x565362||_0x565362['formula']!==_0x3b63bd[_0x2ec187(0x194)]||((_0x66720e=_0x565362[_0x2ec187(0x27a)])==null?void 0x0:_0x66720e[_0x2ec187(0x272)])!==_0x3b63bd['expectedNumberFormat']||_0x5a639a[_0x2ec187(0x1db)](_0x28aee0['unitId'])!==_0x3b63bd[_0x2ec187(0x232)]||(((_0x4050fe=_0x565362[_0x2ec187(0x148)])==null?void 0x0:_0x4050fe['v'])!==_0x3b63bd[_0x2ec187(0x148)]['v']||((_0x3ce780=_0x565362['lastValue'])==null?void 0x0:_0x3ce780['t'])!==_0x3b63bd[_0x2ec187(0x148)]['t']||((_0x2a1f9a=_0x565362[_0x2ec187(0x148)])==null?void 0x0:_0x2a1f9a['pattern'])!==_0x3b63bd['lastValue'][_0x2ec187(0x272)])&&(_0x565362[_0x2ec187(0x148)]=t[_0x2ec187(0x18d)]['deepClone'](_0x3b63bd[_0x2ec187(0x148)]),_0x3c9140=!0x0);}return!_0x3c9140||_0x393dcf[_0x2ec187(0x210)](_0x28aee0[_0x2ec187(0x145)],_0x5f48db);}},z={'id':_0xfcbb9f(0x186),'type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x24b)],'handler':(_0x5469dd,_0x270c64)=>{const _0x26e294=_0xfcbb9f;var _0x45cd5d;if(!(_0x270c64!=null&&_0x270c64[_0x26e294(0x1d6)][_0x26e294(0x241)]()))return!0x1;let _0x31c325=K(_0x5469dd,_0x270c64[_0x26e294(0x145)],'');if(!_0x31c325)return!0x1;let _0x1fdc72=xe(_0x270c64[_0x26e294(0x182)],_0x31c325[_0x26e294(0x214)],be(_0x5469dd,_0x31c325[_0x26e294(0x145)]));if(!_0x1fdc72)return!0x1;let _0x13ced9=Se(_0x5469dd,_0x31c325[_0x26e294(0x145)],_0x270c64[_0x26e294(0x1d6)],(_0x45cd5d=_0x270c64[_0x26e294(0x279)])==null?[]:_0x45cd5d);if(!_0x13ced9)return!0x1;let _0xb5b935=Ce(_0x31c325['body'],_0x31c325['model'],_0x31c325['unitId']),_0x2fe543=we({'documentData':_0x31c325[_0x26e294(0x22b)],'resource':_0x31c325['resource'],'rangeId':_0xb5b935,'config':{'formula':_0x270c64['formula'],..._0x270c64[_0x26e294(0x27a)]?{'numberFormat':_0x270c64[_0x26e294(0x27a)]}:null},'startOffset':_0x1fdc72['startOffset'],'endOffset':_0x1fdc72[_0x26e294(0x255)]});if(!_0x2fe543)return!0x1;let _0x116705=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x5469dd,_0x31c325[_0x26e294(0x145)],_0x13ced9);return!_0x116705||!q({'accessor':_0x5469dd,'document':_0x31c325[_0x26e294(0x219)],'unitId':_0x31c325[_0x26e294(0x145)],'trigger':z['id'],'rangeId':_0xb5b935,'previousResource':_0x31c325[_0x26e294(0x1fd)],'nextResource':_0x2fe543[_0x26e294(0x23b)],'previousDocumentData':_0x31c325[_0x26e294(0x22b)],'nextDocumentData':_0x2fe543[_0x26e294(0x1d3)],'cursorOffset':_0x2fe543[_0x26e294(0x261)],'externalMutations':_0x116705})?!0x1:{'rangeId':_0xb5b935,'startOffset':_0x2fe543[_0x26e294(0x261)]-0x1,'endOffset':_0x2fe543['cursorOffset']};}},B={'id':_0xfcbb9f(0x26c),'type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x24b)],'handler':(_0x314dc4,_0x20c2e3)=>{const _0x2327f3=_0xfcbb9f;var _0x1f7139;if(!(_0x20c2e3!=null&&_0x20c2e3[_0x2327f3(0x24a)])||!_0x20c2e3['formula'][_0x2327f3(0x241)]())return!0x1;let _0x18a3e5=K(_0x314dc4,_0x20c2e3['unitId'],''),_0x2eb50a=_0x18a3e5==null?void 0x0:_0x18a3e5[_0x2327f3(0x20d)][_0x2327f3(0x1f7)](_0x18a3e5['unitId'],_0x20c2e3['rangeId']),_0x3dedb6=_0x18a3e5?_(_0x18a3e5[_0x2327f3(0x22b)][_0x2327f3(0x214)],_0x20c2e3['rangeId']):void 0x0;if(!_0x18a3e5||!_0x2eb50a||!_0x3dedb6)return!0x1;let _0x1f77f0=Se(_0x314dc4,_0x18a3e5[_0x2327f3(0x145)],_0x20c2e3[_0x2327f3(0x1d6)],(_0x1f7139=_0x20c2e3[_0x2327f3(0x279)])==null?[]:_0x1f7139);if(!_0x1f77f0)return!0x1;let _0x10962e=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x314dc4,_0x18a3e5[_0x2327f3(0x145)],_0x1f77f0);if(!_0x10962e)return!0x1;let _0x37af0b=je(_0x18a3e5[_0x2327f3(0x1fd)]);return _0x37af0b[_0x2327f3(0x1ee)][_0x20c2e3[_0x2327f3(0x24a)]]={'formula':_0x20c2e3[_0x2327f3(0x1d6)],..._0x20c2e3[_0x2327f3(0x27a)]?{'numberFormat':_0x20c2e3[_0x2327f3(0x27a)]}:_0x2eb50a[_0x2327f3(0x27a)]?{'numberFormat':_0x2eb50a[_0x2327f3(0x27a)]}:null},q({'accessor':_0x314dc4,'document':_0x18a3e5[_0x2327f3(0x219)],'unitId':_0x18a3e5['unitId'],'trigger':B['id'],'rangeId':_0x20c2e3['rangeId'],'previousResource':_0x18a3e5['resource'],'nextResource':_0x37af0b,'cursorOffset':_0x3dedb6[_0x2327f3(0x17f)]+0x1,'externalMutations':_0x10962e});}},V={'id':'docs-formula.command.set-number-format','type':t[_0xfcbb9f(0x1e0)]['COMMAND'],'handler':(_0x324366,_0xdcbc22)=>{const _0x327b55=_0xfcbb9f;if(!(_0xdcbc22!=null&&_0xdcbc22[_0x327b55(0x24a)]))return!0x1;let _0xa566ac=K(_0x324366,_0xdcbc22[_0x327b55(0x145)],''),_0x388d6f=_0xa566ac==null?void 0x0:_0xa566ac[_0x327b55(0x20d)][_0x327b55(0x1f7)](_0xa566ac[_0x327b55(0x145)],_0xdcbc22[_0x327b55(0x24a)]),_0x32f3d5=_0xa566ac?_(_0xa566ac['documentData'][_0x327b55(0x214)],_0xdcbc22[_0x327b55(0x24a)]):void 0x0;if(!_0xa566ac||!_0x388d6f||!_0x32f3d5)return!0x1;let _0x558c4a=je(_0xa566ac[_0x327b55(0x1fd)]);return _0x558c4a['formulas'][_0xdcbc22[_0x327b55(0x24a)]]={..._0x388d6f,..._0xdcbc22[_0x327b55(0x27a)]?{'numberFormat':_0xdcbc22['numberFormat']}:null},_0xdcbc22[_0x327b55(0x27a)]||delete _0x558c4a[_0x327b55(0x1ee)][_0xdcbc22[_0x327b55(0x24a)]][_0x327b55(0x27a)],q({'accessor':_0x324366,'document':_0xa566ac[_0x327b55(0x219)],'unitId':_0xa566ac['unitId'],'trigger':V['id'],'rangeId':_0xdcbc22[_0x327b55(0x24a)],'previousResource':_0xa566ac[_0x327b55(0x1fd)],'nextResource':_0x558c4a,'cursorOffset':_0x32f3d5['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0xfcbb9f(0x1bc),'type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x24b)],'handler':(_0x2af935,_0xa788d1)=>G(_0x2af935,_0xa788d1,'',H['id'])},U={'id':'docs-formula.command.replace-with-text','type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x24b)],'handler':(_0x5765c9,_0x7e9850)=>{var _0x1fd818;return G(_0x5765c9,_0x7e9850,(_0x1fd818=_0x7e9850==null?void 0x0:_0x7e9850['text'])==null?'':_0x1fd818,U['id']);}},W={'id':_0xfcbb9f(0x206),'type':t[_0xfcbb9f(0x1e0)][_0xfcbb9f(0x24b)],'handler':(_0xec3648,_0x37e04f)=>{const _0x386330=_0xfcbb9f;if(!(_0x37e04f!=null&&_0x37e04f[_0x386330(0x24a)]))return!0x1;let _0x2bec7b=K(_0xec3648,_0x37e04f[_0x386330(0x145)],'');if(!_0x2bec7b)return!0x1;let _0x527899=_0xec3648[_0x386330(0x1a3)](j)['getResult']({'unitId':_0x2bec7b[_0x386330(0x145)],'rangeId':_0x37e04f[_0x386330(0x24a)]});return _0x527899?G(_0xec3648,_0x37e04f,_0x527899[_0x386330(0x1ef)],W['id']):!0x1;}};function G(_0x539d03,_0x543cc8,_0x2b8870,_0xdca1a){const _0x42ad63=_0xfcbb9f;if(!(_0x543cc8!=null&&_0x543cc8[_0x42ad63(0x24a)]))return!0x1;let _0x33607a=K(_0x539d03,_0x543cc8[_0x42ad63(0x145)],'');if(!_0x33607a)return!0x1;let _0x19d48e=re({'documentData':_0x33607a[_0x42ad63(0x22b)],'resource':_0x33607a[_0x42ad63(0x1fd)],'rangeId':_0x543cc8[_0x42ad63(0x24a)],'text':_0x2b8870});return _0x19d48e?q({'accessor':_0x539d03,'document':_0x33607a[_0x42ad63(0x219)],'unitId':_0x33607a[_0x42ad63(0x145)],'trigger':_0xdca1a,'rangeId':_0x543cc8[_0x42ad63(0x24a)],'previousResource':_0x33607a[_0x42ad63(0x1fd)],'nextResource':_0x19d48e[_0x42ad63(0x23b)],'previousDocumentData':_0x33607a[_0x42ad63(0x22b)],'nextDocumentData':_0x19d48e[_0x42ad63(0x1d3)],'cursorOffset':_0x19d48e['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x29b409,_0x4d13d4,_0x1c7ee6){const _0x3c6dd2=_0xfcbb9f;var _0x5dbc20,_0x2f32ac;if(_0x1c7ee6)return null;let _0x34cdce=_0x29b409[_0x3c6dd2(0x1a3)](t[_0x3c6dd2(0x1b8)]),_0x54595e=(_0x5dbc20=_0x4d13d4?_0x34cdce[_0x3c6dd2(0x263)](_0x4d13d4,t[_0x3c6dd2(0x180)][_0x3c6dd2(0x276)]):_0x34cdce[_0x3c6dd2(0x172)](t['UniverInstanceType'][_0x3c6dd2(0x276)]))==null?null:_0x5dbc20;if(!_0x54595e)return null;let _0x59485a=_0x54595e[_0x3c6dd2(0x158)](),_0x244db5=_0x59485a['body'];if(_0x59485a['disabled']||!_0x244db5)return null;let _0xa0640a=_0x29b409['get'](O);return _0xa0640a[_0x3c6dd2(0x142)](_0x54595e[_0x3c6dd2(0x26a)]())?null:{'document':_0x54595e,'body':_0x244db5,'documentData':_0x59485a,'model':_0xa0640a,'resource':(_0x2f32ac=_0xa0640a[_0x3c6dd2(0x1b3)](_0x54595e['getUnitId']()))==null?c():_0x2f32ac,'unitId':_0x54595e[_0x3c6dd2(0x26a)]()};}function be(_0xe14d62,_0x5ce37b){const _0x58c647=_0xfcbb9f;var _0x52c196;return(_0x52c196=_0xe14d62[_0x58c647(0x1a3)](n[_0x58c647(0x26b)])[_0x58c647(0x189)]({'subUnitId':_0x5ce37b,'unitId':_0x5ce37b}))==null?void 0x0:_0x52c196[0x0];}function xe(_0x56a27a,_0x25eb4e,_0x2ca67b){const _0x400b47=_0xfcbb9f;if((_0x56a27a==null?void 0x0:_0x56a27a[_0x400b47(0x25a)])===_0x400b47(0x1d8)){var _0x125a01,_0x5f3bef;let _0x2f16d7=(_0x125a01=(_0x5f3bef=_0x25eb4e[_0x400b47(0x228)])==null?void 0x0:_0x5f3bef[_0x400b47(0x265)](_0x5233d0=>_0x5233d0[_0x400b47(0x1c5)]===_0x56a27a['paragraphId']))==null?[]:_0x125a01;if(_0x2f16d7[_0x400b47(0x24d)]!==0x1)return null;let _0x5cae33=_0x2f16d7[0x0],_0x49f741=(0x0,t[_0x400b47(0x1d7)])(_0x25eb4e,_0x5cae33),_0x2a4bcf=_0x5cae33['startIndex']-_0x49f741,_0x55106c=_0x56a27a[_0x400b47(0x19d)]===_0x400b47(0x153)?_0x2a4bcf:_0x56a27a[_0x400b47(0x19d)];if(!Number[_0x400b47(0x21d)](_0x55106c)||_0x55106c<0x0||_0x55106c>_0x2a4bcf)return null;let _0x3607bc=_0x49f741+_0x55106c;return{'startOffset':_0x3607bc,'endOffset':_0x3607bc};}if((_0x56a27a==null?void 0x0:_0x56a27a[_0x400b47(0x25a)])===_0x400b47(0x270))return!Number[_0x400b47(0x21d)](_0x56a27a['startOffset'])||!Number[_0x400b47(0x21d)](_0x56a27a[_0x400b47(0x255)])?null:{'startOffset':Math['min'](_0x56a27a['startOffset'],_0x56a27a[_0x400b47(0x255)]),'endOffset':Math[_0x400b47(0x1c3)](_0x56a27a[_0x400b47(0x277)],_0x56a27a['endOffset'])};let _0x382173=(_0x56a27a==null?void 0x0:_0x56a27a[_0x400b47(0x25a)])===_0x400b47(0x1fa)?_0x56a27a[_0x400b47(0x1fa)]:_0x2ca67b;return!_0x382173||_0x382173[_0x400b47(0x1d1)]?null:{'startOffset':Math[_0x400b47(0x1eb)](_0x382173['startOffset'],_0x382173[_0x400b47(0x255)]),'endOffset':Math[_0x400b47(0x1c3)](_0x382173[_0x400b47(0x277)],_0x382173['endOffset'])};}function Se(_0x1637c8,_0x11d104,_0x433dcc,_0x120536){const _0x5357a7=_0xfcbb9f;let _0xbc1fa7=_0x1637c8[_0x5357a7(0x1a3)](r[_0x5357a7(0x1af)]),_0x107571=_0x433dcc[_0x5357a7(0x216)]('=')?_0x433dcc[_0x5357a7(0x16a)](0x1):_0x433dcc,_0xbb7a4d=_0xbc1fa7['sequenceNodesBuilder'](_0x107571);if(!_0xbb7a4d)return null;let _0x4710e8=_0x1637c8['get'](e[_0x5357a7(0x1a2)]),_0x2578a9=(0x0,e[_0x5357a7(0x15c)])({'qualifiers':(0x0,e[_0x5357a7(0x21e)])(_0xbb7a4d),'explicitReferences':_0x120536==null?[]:_0x120536,'resolveBinding':_0x1cef64=>_0x4710e8[_0x5357a7(0x1c9)](_0x11d104,_0x1cef64)});return _0x2578a9[_0x5357a7(0x163)]===_0x5357a7(0x18a)?_0x2578a9[_0x5357a7(0x15b)]:null;}function Ce(_0x398b9d,_0x13863c,_0x50f9af){const _0x3e4c3e=_0xfcbb9f;var _0x492abf;let _0xc7b04c=(0x0,t[_0x3e4c3e(0x147)])(0x6);for(;_0x398b9d!=null&&(_0x492abf=_0x398b9d[_0x3e4c3e(0x27b)])!=null&&_0x492abf[_0x3e4c3e(0x169)](_0x27b03d=>_0x27b03d[_0x3e4c3e(0x24a)]===_0xc7b04c)||_0x13863c[_0x3e4c3e(0x1f7)](_0x50f9af,_0xc7b04c);)_0xc7b04c=(0x0,t['generateRandomId'])(0x6);return _0xc7b04c;}function we(_0x1303cb){try{return m(_0x1303cb);}catch(_0x41f1dd){if(_0x41f1dd instanceof p)return null;throw _0x41f1dd;}}function Te(_0x419663){const _0x35a25a=_0xfcbb9f;let _0x4b5301=_0x419663[_0x35a25a(0x22a)]&&_0x419663['nextDocumentData']?De(_0x419663[_0x35a25a(0x219)],_0x419663[_0x35a25a(0x145)],_0x419663[_0x35a25a(0x22a)],_0x419663[_0x35a25a(0x1d3)],_0x419663['cursorOffset'],_0x419663['trigger']):null;return _0x419663[_0x35a25a(0x22a)]&&_0x419663[_0x35a25a(0x1d3)]&&!_0x4b5301?null:{'documentRedo':_0x4b5301,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x419663['unitId'],'resource':_0x419663[_0x35a25a(0x23b)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x419663['unitId'],'resource':_0x419663[_0x35a25a(0x22f)]}}};}function Ee(_0x38fb79,_0xf939a4,_0x95e323,_0x1b9431){const _0x5b18f3=_0xfcbb9f;_0x1b9431['pushUndoRedo']({'id':_0x38fb79['trigger']+':'+_0x38fb79[_0x5b18f3(0x24a)],'unitID':_0x38fb79[_0x5b18f3(0x145)],'redoMutations':[..._0x38fb79[_0x5b18f3(0x237)][_0x5b18f3(0x19f)]?[_0x38fb79['externalMutations'][_0x5b18f3(0x19f)]]:[],..._0xf939a4[_0x5b18f3(0x1b7)]?[_0xf939a4['documentRedo']]:[],_0xf939a4[_0x5b18f3(0x26f)]],'undoMutations':[_0xf939a4[_0x5b18f3(0x19e)],..._0x95e323?[_0x95e323]:[],..._0x38fb79[_0x5b18f3(0x237)][_0x5b18f3(0x254)]?[_0x38fb79[_0x5b18f3(0x237)]['undoMutation']]:[]]});}function q(_0x263c78){const _0x5b64ea=_0xfcbb9f;let _0xbacbd=_0x263c78[_0x5b64ea(0x193)][_0x5b64ea(0x1a3)](t[_0x5b64ea(0x1f6)]),_0x1dde97=_0x263c78[_0x5b64ea(0x193)][_0x5b64ea(0x1a3)](t['IUndoRedoService']),_0x2834e4=_0x263c78['accessor'][_0x5b64ea(0x1a3)](n[_0x5b64ea(0x26b)]),_0x3e10fb=Te(_0x263c78);if(!_0x3e10fb)return!0x1;let _0x177b80=!0x1,_0x27b42e=null,_0x351a5a=!0x1;try{if(_0x263c78['externalMutations']['redoMutation']){if(!_0xbacbd[_0x5b64ea(0x159)](_0x263c78[_0x5b64ea(0x237)][_0x5b64ea(0x19f)]['id'],_0x263c78[_0x5b64ea(0x237)][_0x5b64ea(0x19f)][_0x5b64ea(0x25d)]))return!0x1;_0x177b80=!0x0;}if(_0x3e10fb[_0x5b64ea(0x1b7)]){let _0x58b942=_0xbacbd['syncExecuteCommand'](_0x3e10fb[_0x5b64ea(0x1b7)]['id'],_0x3e10fb[_0x5b64ea(0x1b7)][_0x5b64ea(0x25d)]);if(!_0x58b942)return J(_0xbacbd,_0x263c78[_0x5b64ea(0x237)],_0x177b80),!0x1;_0x27b42e={'id':n[_0x5b64ea(0x168)]['id'],'params':{..._0x58b942,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0xbacbd[_0x5b64ea(0x159)](_0x3e10fb[_0x5b64ea(0x26f)]['id'],_0x3e10fb[_0x5b64ea(0x26f)][_0x5b64ea(0x25d)]))return Oe(_0xbacbd,_0x27b42e),J(_0xbacbd,_0x263c78[_0x5b64ea(0x237)],_0x177b80),!0x1;_0x351a5a=!0x0,Ee(_0x263c78,_0x3e10fb,_0x27b42e,_0x1dde97);}catch(_0x3b1d06){throw _0x351a5a&&_0xbacbd[_0x5b64ea(0x159)](_0x3e10fb[_0x5b64ea(0x19e)]['id'],_0x3e10fb[_0x5b64ea(0x19e)][_0x5b64ea(0x25d)]),Oe(_0xbacbd,_0x27b42e),J(_0xbacbd,_0x263c78['externalMutations'],_0x177b80),_0x3b1d06;}return _0x2834e4['replaceDocRanges']([{'startOffset':_0x263c78[_0x5b64ea(0x261)],'endOffset':_0x263c78[_0x5b64ea(0x261)],'segmentId':''}],{'unitId':_0x263c78[_0x5b64ea(0x145)],'subUnitId':_0x263c78[_0x5b64ea(0x145)]},!0x1,{[n[_0x5b64ea(0x222)]]:!0x0}),!0x0;}function De(_0x2376b7,_0x56d383,_0x51e3ba,_0x4e9228,_0x85d86f,_0x3c6557){const _0x5a6fa1=_0xfcbb9f;let _0x57fde8=ke(_0x51e3ba,_0x4e9228,(0x0,t[_0x5a6fa1(0x225)])(_0x2376b7,''));return _0x57fde8?{'id':n['RichTextEditingMutation']['id'],'params':{'unitId':_0x56d383,'actions':_0x57fde8,'segmentId':'','textRanges':[{'startOffset':_0x85d86f,'endOffset':_0x85d86f,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x3c6557}}:null;}function Oe(_0x2cfce3,_0x2d5b3f){const _0x5a47a5=_0xfcbb9f;_0x2d5b3f&&_0x2cfce3[_0x5a47a5(0x159)](_0x2d5b3f['id'],_0x2d5b3f[_0x5a47a5(0x25d)]);}function J(_0x2e5ea3,_0x1b41cf,_0x25f652){const _0x42a583=_0xfcbb9f;_0x25f652&&_0x1b41cf[_0x42a583(0x254)]&&_0x2e5ea3['syncExecuteCommand'](_0x1b41cf[_0x42a583(0x254)]['id'],_0x1b41cf[_0x42a583(0x254)][_0x42a583(0x25d)]);}function ke(_0x349920,_0x328534,_0x21a7d4){const _0x5c2c67=_0xfcbb9f;let _0x17e74a=_0x349920[_0x5c2c67(0x214)],_0x174acc=_0x328534[_0x5c2c67(0x214)],_0x366676=Ae(_0x17e74a==null?void 0x0:_0x17e74a[_0x5c2c67(0x1a7)],_0x174acc==null?void 0x0:_0x174acc[_0x5c2c67(0x1a7)]);if(!_0x366676||!_0x174acc)return null;let _0x506d6a=new t[(_0x5c2c67(0x1c0))]();return _0x506d6a[_0x5c2c67(0x27f)](_0x366676[_0x5c2c67(0x162)]),_0x366676['insertLength']>0x0&&_0x506d6a[_0x5c2c67(0x23c)](_0x366676[_0x5c2c67(0x1cf)],(0x0,t['getBodySliceForTextXAction'])(_0x174acc,_0x366676[_0x5c2c67(0x162)],_0x366676['start']+_0x366676[_0x5c2c67(0x1cf)],!0x1)),_0x366676[_0x5c2c67(0x240)]>0x0&&_0x506d6a[_0x5c2c67(0x1f8)](_0x366676[_0x5c2c67(0x240)]),t[_0x5c2c67(0x231)][_0x5c2c67(0x251)]()[_0x5c2c67(0x1b4)](_0x506d6a[_0x5c2c67(0x235)](),_0x21a7d4);}function Ae(_0x3f5e70,_0x197c1c){const _0x283fb5=_0xfcbb9f;if(_0x3f5e70==null||_0x197c1c==null||_0x3f5e70===_0x197c1c)return null;let _0xd9ad62=0x0;for(;_0xd9ad62<_0x3f5e70[_0x283fb5(0x24d)]&&_0xd9ad62<_0x197c1c[_0x283fb5(0x24d)]&&_0x3f5e70[_0xd9ad62]===_0x197c1c[_0xd9ad62];)_0xd9ad62+=0x1;let _0x484dcb=_0x3f5e70[_0x283fb5(0x24d)],_0x143e45=_0x197c1c['length'];for(;_0x484dcb>_0xd9ad62&&_0x143e45>_0xd9ad62&&_0x3f5e70[_0x484dcb-0x1]===_0x197c1c[_0x143e45-0x1];)--_0x484dcb,--_0x143e45;return{'start':_0xd9ad62,'deleteLength':_0x484dcb-_0xd9ad62,'insertLength':_0x143e45-_0xd9ad62};}function je(_0x2031c8){const _0x494398=_0xfcbb9f;return{'schemaVersion':0x1,'formulas':Object[_0x494398(0x1c6)](Object['entries'](_0x2031c8['formulas'])['map'](([_0x50e1c1,_0x555e97])=>[_0x50e1c1,{..._0x555e97,..._0x555e97[_0x494398(0x27a)]?{'numberFormat':{..._0x555e97[_0x494398(0x27a)]}}:null,..._0x555e97[_0x494398(0x148)]?{'lastValue':{..._0x555e97[_0x494398(0x148)]}}:null}]))};}let Y=class extends t[_0xfcbb9f(0x1fe)]{constructor(_0x1d95dd,_0x2e2c5e,_0x1c12d5,_0x4da432){const _0x2d6798=_0xfcbb9f;super(),this[_0x2d6798(0x1c8)]=_0x1d95dd,this[_0x2d6798(0x174)]=_0x2e2c5e,this['_model']=_0x1c12d5,this[_0x2d6798(0x1b9)]=_0x4da432,D(this,_0x2d6798(0x160),new Set()),D(this,_0x2d6798(0x27e),!0x1),D(this,_0x2d6798(0x181),!0x1),this['_instanceService'][_0x2d6798(0x1c7)](t[_0x2d6798(0x180)][_0x2d6798(0x276)])[_0x2d6798(0x14e)](_0x433eae=>this[_0x2d6798(0x1b9)]['syncUnit'](_0x433eae)),this['disposeWithMe'](this['_model']['change$'][_0x2d6798(0x205)](({unitId:_0x4f498c})=>this['_syncUnit'](_0x4f498c))),this[_0x2d6798(0x179)](this[_0x2d6798(0x1c8)][_0x2d6798(0x1ab)][_0x2d6798(0x205)](({unit:_0x50f804})=>{const _0x53eee4=_0x2d6798;_0x50f804[_0x53eee4(0x25a)]===t[_0x53eee4(0x180)][_0x53eee4(0x276)]&&this[_0x53eee4(0x1ca)](_0x50f804[_0x53eee4(0x26a)]());})),this[_0x2d6798(0x179)](this['_instanceService'][_0x2d6798(0x203)][_0x2d6798(0x205)](_0x457e0a=>{const _0x1f2c03=_0x2d6798;this['_service']['unregisterUnit'](_0x457e0a[_0x1f2c03(0x26a)]());})),this['disposeWithMe'](this['_commandService'][_0x2d6798(0x165)](_0xabbf91=>{const _0xe55657=_0x2d6798;if(_0xabbf91['id']===n[_0xe55657(0x168)]['id']&&Me(_0xabbf91[_0xe55657(0x25d)])){let _0x2cd8aa=_0xabbf91[_0xe55657(0x25d)];_0x2cd8aa['segmentId']||this[_0xe55657(0x287)](_0x2cd8aa[_0xe55657(0x145)]);}}));}['dispose'](){const _0x4b7732=_0xfcbb9f;this[_0x4b7732(0x181)]=!0x0,super[_0x4b7732(0x1ec)]();}[_0xfcbb9f(0x1ca)](_0x4c6a10){const _0x3a5c04=_0xfcbb9f;this[_0x3a5c04(0x160)][_0x3a5c04(0x187)](_0x4c6a10),!this['_syncScheduled']&&(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0x4ef111=_0x3a5c04;if(this[_0x4ef111(0x27e)]=!0x1,this[_0x4ef111(0x181)])return;let _0x3f338e=Array[_0x4ef111(0x1cb)](this['_pendingUnitIds']);this[_0x4ef111(0x160)][_0x4ef111(0x262)](),_0x3f338e['forEach'](_0x53f225=>this[_0x4ef111(0x287)](_0x53f225));}));}['_syncUnit'](_0x3b0f2a){const _0x5297cb=_0xfcbb9f;let _0x565d83=this[_0x5297cb(0x1c8)]['getUnit'](_0x3b0f2a,t[_0x5297cb(0x180)][_0x5297cb(0x276)]);_0x565d83&&this['_service'][_0x5297cb(0x15d)](_0x565d83);}};Y=A([k(0x0,t[_0xfcbb9f(0x1b8)]),k(0x1,t[_0xfcbb9f(0x1f6)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t['Inject'])(j))],Y);function Me(_0x327d11){const _0x45bcc1=_0xfcbb9f;return typeof _0x327d11=='object'&&!!_0x327d11&&_0x45bcc1(0x145)in _0x327d11&&typeof _0x327d11[_0x45bcc1(0x145)]==_0x45bcc1(0x207)&&(!('segmentId'in _0x327d11)||_0x327d11[_0x45bcc1(0x1d1)]===void 0x0||typeof _0x327d11[_0x45bcc1(0x1d1)]==_0x45bcc1(0x207));}let X=class extends t[_0xfcbb9f(0x1fe)]{constructor(_0x3bab80,_0x2046d4){const _0x217773=_0xfcbb9f;super(),this['_resourceManagerService']=_0x3bab80,this[_0x217773(0x185)]=_0x2046d4,this['disposeWithMe'](this['_resourceManagerService'][_0x217773(0x143)]({'pluginName':o,'businesses':[t[_0x217773(0x180)][_0x217773(0x276)]],'toJson':_0x37187f=>JSON[_0x217773(0x1bf)](this[_0x217773(0x185)][_0x217773(0x235)](_0x37187f)),'parseJson':_0x25af8c=>JSON[_0x217773(0x23d)](_0x25af8c),'onLoad':(_0x2ef79d,_0x12b54d)=>{const _0x2a9949=_0x217773;this[_0x2a9949(0x185)][_0x2a9949(0x1e3)](_0x2ef79d,_0x12b54d);},'onUnLoad':_0x33a17a=>this[_0x217773(0x185)][_0x217773(0x1fb)](_0x33a17a)}));}};X=A([k(0x0,t['IResourceManagerService']),k(0x1,(0x0,t[_0xfcbb9f(0x282)])(O))],X);var Ne=_0xfcbb9f(0x18f),Pe=_0xfcbb9f(0x1e9);const Fe={};let Z=class extends t[_0xfcbb9f(0x1fe)]{constructor(_0x4e6bc5,_0xc2993e,_0x294d44){const _0x1b5a61=_0xfcbb9f;super(),this[_0x1b5a61(0x202)]=_0x4e6bc5,this[_0x1b5a61(0x156)]=_0xc2993e,this[_0x1b5a61(0x179)](_0x294d44[_0x1b5a61(0x190)]({'resolve':(_0x3ad172,_0x43dac5)=>{const _0x222a72=_0x1b5a61;var _0x375b94,_0x527e97;return(_0x375b94=(_0x527e97=_0x43dac5['customRanges'])==null?void 0x0:_0x527e97[_0x222a72(0x265)](g)[_0x222a72(0x177)](_0x277702=>({'startOffset':_0x277702[_0x222a72(0x212)],'endOffset':_0x277702[_0x222a72(0x17f)]+0x1,'text':this[_0x222a72(0x21c)](_0x3ad172,_0x277702['rangeId'])})))==null?[]:_0x375b94;}})),this[_0x1b5a61(0x179)](this[_0x1b5a61(0x156)][_0x1b5a61(0x280)]['subscribe'](({unitId:_0x1e9a18})=>{const _0xd27992=_0x1b5a61;_0x294d44[_0xd27992(0x1ae)](_0x1e9a18);}));}[_0xfcbb9f(0x21c)](_0x3f1b4d,_0x5b9ad5){const _0x6a365e=_0xfcbb9f;var _0xced445,_0x2378a5;return(_0xced445=(_0x2378a5=this['_formulaService'][_0x6a365e(0x204)]({'unitId':_0x3f1b4d,'rangeId':_0x5b9ad5}))==null?void 0x0:_0x2378a5[_0x6a365e(0x1ef)])==null?'':_0xced445;}[_0xfcbb9f(0x14c)](_0x5c6866,_0xe8ce3b,_0x26e724){const _0x4e695c=_0xfcbb9f;var _0x5c3c5e,_0x626df1;let _0x57bbc3=this[_0x4e695c(0x202)][_0x4e695c(0x263)](_0x5c6866,t[_0x4e695c(0x180)][_0x4e695c(0x276)]),_0x516910=_0x57bbc3==null?void 0x0:_0x57bbc3['getBody']();if(!_0x516910)return'';let _0x3fbcd0=_0x516910[_0x4e695c(0x1a7)][_0x4e695c(0x16a)](_0xe8ce3b,_0x26e724),_0x2da73f=(_0x5c3c5e=(_0x626df1=_0x516910[_0x4e695c(0x27b)])==null?void 0x0:_0x626df1[_0x4e695c(0x265)](_0x9ff1b3=>g(_0x9ff1b3)&&_0x9ff1b3[_0x4e695c(0x212)]>=_0xe8ce3b&&_0x9ff1b3[_0x4e695c(0x17f)]<_0x26e724)['sort']((_0x571a68,_0x2a5dbc)=>_0x2a5dbc['startIndex']-_0x571a68[_0x4e695c(0x212)]))==null?[]:_0x5c3c5e;for(let _0x472160 of _0x2da73f){let _0x40d38c=_0x472160[_0x4e695c(0x212)]-_0xe8ce3b,_0x3467a2=_0x472160[_0x4e695c(0x17f)]-_0xe8ce3b+0x1;_0x3fbcd0=''+_0x3fbcd0[_0x4e695c(0x16a)](0x0,_0x40d38c)+this[_0x4e695c(0x21c)](_0x5c6866,_0x472160[_0x4e695c(0x24a)])+_0x3fbcd0['slice'](_0x3467a2);}return _0x3fbcd0;}[_0xfcbb9f(0x21f)](_0x1df97b){return Ie(_0x1df97b);}['degradeBody'](_0x1a9bab,_0x3c70ad,_0x15c944={}){const _0x1143b2=_0xfcbb9f;var _0x2f5523,_0x4e1804,_0x191b25;return(_0x191b25=h({'id':_0x1a9bab,'body':_0x3c70ad,'documentStyle':{}},((_0x2f5523=(_0x4e1804=_0x3c70ad[_0x1143b2(0x27b)])==null?void 0x0:_0x4e1804[_0x1143b2(0x265)](g))==null?[]:_0x2f5523)[_0x1143b2(0x177)](_0x491fbb=>{const _0x546f86=_0x1143b2;var _0x2e5ca0;return{'rangeId':_0x491fbb[_0x546f86(0x24a)],'text':(_0x2e5ca0=_0x15c944[_0x491fbb[_0x546f86(0x24a)]])==null?this[_0x546f86(0x21c)](_0x1a9bab,_0x491fbb[_0x546f86(0x24a)]):_0x2e5ca0};}))[_0x1143b2(0x214)])==null?{'dataStream':''}:_0x191b25;}};Z=A([k(0x0,t[_0xfcbb9f(0x1b8)]),k(0x1,(0x0,t[_0xfcbb9f(0x282)])(j)),k(0x2,(0x0,t[_0xfcbb9f(0x282)])(n['DocTextResolverService']))],Z);function Ie(_0x5cff95){const _0x4b52d8=_0xfcbb9f;var _0x208a45,_0x11e3b1,_0xa9fc;let _0x2a5b6d=Le(_0x5cff95),_0x59cf94=h(_0x5cff95,((_0x208a45=(_0x11e3b1=_0x5cff95[_0x4b52d8(0x214)])==null||(_0x11e3b1=_0x11e3b1[_0x4b52d8(0x27b)])==null?void 0x0:_0x11e3b1[_0x4b52d8(0x265)](g))==null?[]:_0x208a45)[_0x4b52d8(0x177)](_0x205b11=>({'rangeId':_0x205b11[_0x4b52d8(0x24a)],'text':Re(_0x2a5b6d==null?void 0x0:_0x2a5b6d[_0x4b52d8(0x1ee)][_0x205b11[_0x4b52d8(0x24a)]])})));return _0x59cf94['resources']=(_0xa9fc=_0x59cf94['resources'])==null?void 0x0:_0xa9fc[_0x4b52d8(0x265)](_0x7ef343=>_0x7ef343[_0x4b52d8(0x266)]!==o),_0x59cf94;}function Le(_0x48eba3){const _0x26a841=_0xfcbb9f;var _0x49d8ea;let _0x3593c0=(_0x49d8ea=_0x48eba3[_0x26a841(0x259)])==null||(_0x49d8ea=_0x49d8ea['find'](_0x3eb7e7=>_0x3eb7e7['name']===_0x26a841(0x184)))==null?void 0x0:_0x49d8ea[_0x26a841(0x260)];if(_0x3593c0)try{let _0x351263=JSON[_0x26a841(0x23d)](_0x3593c0);return l(_0x351263)?_0x351263:void 0x0;}catch{return;}}function Re(_0x2ed577){const _0x3e170d=_0xfcbb9f;return _0x2ed577?(0x0,e[_0x3e170d(0x1f9)])({'lastValue':_0x2ed577['lastValue'],'numberFormat':_0x2ed577['numberFormat']})[_0x3e170d(0x1ef)]:'';}let Q=class extends t['Disposable']{constructor(_0x3f9962,_0x25a0ce,_0x5f51a1){const _0x5a0ef3=_0xfcbb9f;super(),this[_0x5a0ef3(0x156)]=_0x3f9962,this[_0x5a0ef3(0x250)]=_0x25a0ce,this[_0x5a0ef3(0x179)](_0x5f51a1[_0x5a0ef3(0x22e)](this));}[_0xfcbb9f(0x239)](_0x1bfa35){const _0x22b3ca=_0xfcbb9f;let _0x26adab=new Map();for(let _0x564b2f of this['_formulaService'][_0x22b3ca(0x1cd)]()){var _0x472739,_0xa717fb;if(!this[_0x22b3ca(0x250)][_0x22b3ca(0x166)](_0x564b2f['config'][_0x22b3ca(0x1d6)],_0x564b2f[_0x22b3ca(0x1a9)])[_0x22b3ca(0x144)])continue;let _0x46c735=(0x0,e[_0x22b3ca(0x1a0)])(_0x564b2f[_0x22b3ca(0x1a9)]),_0x40191c=_0x46c735?(0x0,e['toFormulaLastValue'])(_0x46c735):null;if(!_0x40191c||ze(_0x564b2f[_0x22b3ca(0x1de)][_0x22b3ca(0x148)],_0x40191c))continue;let _0x51cd5a=(_0x472739=_0x26adab['get'](_0x564b2f[_0x22b3ca(0x176)][_0x22b3ca(0x145)]))==null?[]:_0x472739;_0x51cd5a[_0x22b3ca(0x1aa)]({'rangeId':_0x564b2f[_0x22b3ca(0x176)][_0x22b3ca(0x24a)],'expectedFormula':_0x564b2f[_0x22b3ca(0x1de)]['formula'],'expectedNumberFormat':(_0xa717fb=_0x564b2f[_0x22b3ca(0x1de)][_0x22b3ca(0x27a)])==null?void 0x0:_0xa717fb[_0x22b3ca(0x272)],'expectedReferenceRevision':_0x564b2f['referenceRevision'],'lastValue':_0x40191c}),_0x26adab['set'](_0x564b2f[_0x22b3ca(0x176)][_0x22b3ca(0x145)],_0x51cd5a);}return Array[_0x22b3ca(0x1cb)](_0x26adab,([_0x1e43b6,_0x2271bc])=>({'id':R['id'],'params':{'unitId':_0x1e43b6,'updates':_0x2271bc}}));}};Q=A([k(0x0,(0x0,t[_0xfcbb9f(0x282)])(j)),k(0x1,(0x0,t[_0xfcbb9f(0x282)])(e[_0xfcbb9f(0x23e)])),k(0x2,(0x0,t[_0xfcbb9f(0x282)])(e[_0xfcbb9f(0x13e)]))],Q);function ze(_0x107108,_0x31deb6){const _0x236f15=_0xfcbb9f;return(_0x107108==null?void 0x0:_0x107108['v'])===_0x31deb6['v']&&(_0x107108==null?void 0x0:_0x107108['t'])===_0x31deb6['t']&&(_0x107108==null?void 0x0:_0x107108[_0x236f15(0x272)])===_0x31deb6['pattern'];}let $=class extends t[_0xfcbb9f(0x26e)]{constructor(_0x35bd8c=Fe,_0x1a0de8,_0x527e71,_0x47e632){const _0x3462c4=_0xfcbb9f;super(),this[_0x3462c4(0x1f3)]=_0x35bd8c,this[_0x3462c4(0x175)]=_0x1a0de8,this[_0x3462c4(0x174)]=_0x527e71,this['_configService']=_0x47e632;let {..._0x16055b}=(0x0,t[_0x3462c4(0x1df)])({},Fe,this['_config']);this[_0x3462c4(0x1a6)][_0x3462c4(0x16e)](_0x3462c4(0x1c1),_0x16055b);}[_0xfcbb9f(0x1d2)](){const _0x53b77c=_0xfcbb9f;this[_0x53b77c(0x175)][_0x53b77c(0x187)]([O]),this[_0x53b77c(0x175)][_0x53b77c(0x187)]([j]),this[_0x53b77c(0x175)]['add']([X]),this['_injector'][_0x53b77c(0x187)]([Y]),this['_injector']['add']([Q]),this[_0x53b77c(0x175)][_0x53b77c(0x187)]([Z]),(0x0,t[_0x53b77c(0x220)])(this[_0x53b77c(0x175)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x53b77c(0x14e)](_0x2ce4ba=>this[_0x53b77c(0x179)](this[_0x53b77c(0x174)][_0x53b77c(0x25f)](_0x2ce4ba)));}};D($,_0xfcbb9f(0x19c),o),D($,'packageName',Ne),D($,_0xfcbb9f(0x19b),Pe),D($,_0xfcbb9f(0x25a),t[_0xfcbb9f(0x180)]['UNIVER_DOC']),$=A([(0x0,t[_0xfcbb9f(0x141)])(a[_0xfcbb9f(0x209)],e[_0xfcbb9f(0x1b2)],n[_0xfcbb9f(0x1da)]),k(0x1,(0x0,t[_0xfcbb9f(0x282)])(t[_0xfcbb9f(0x27c)])),k(0x2,t['ICommandService']),k(0x3,t[_0xfcbb9f(0x140)])],$),exports[_0xfcbb9f(0x1f2)]=W,exports[_0xfcbb9f(0x1e4)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0xfcbb9f(0x184)]=o,exports[_0xfcbb9f(0x1b1)]=0x1,Object[_0xfcbb9f(0x20c)](exports,'DocFormulaDisplayTextService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0xfcbb9f(0x20c)](exports,_0xfcbb9f(0x1be),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object['defineProperty'](exports,_0xfcbb9f(0x15e),{'enumerable':!0x0,'get':function(){return X;}}),exports['DocFormulaResultStatus']=ve,Object['defineProperty'](exports,_0xfcbb9f(0x273),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0xfcbb9f(0x1ac)]=z,exports[_0xfcbb9f(0x1ba)]=p,exports[_0xfcbb9f(0x247)]=H,exports[_0xfcbb9f(0x215)]=I,exports['ReplaceDocFormulaWithTextCommand']=U,exports[_0xfcbb9f(0x1cc)]=R,exports[_0xfcbb9f(0x16f)]=F,exports[_0xfcbb9f(0x171)]=V,exports['SetDocFormulaResourceMutation']=L,Object[_0xfcbb9f(0x20c)](exports,_0xfcbb9f(0x14a),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0xfcbb9f(0x20b)]=B,exports[_0xfcbb9f(0x173)]=v,exports[_0xfcbb9f(0x146)]=m,exports[_0xfcbb9f(0x200)]=re,exports[_0xfcbb9f(0x25b)]=ne,exports[_0xfcbb9f(0x230)]=c,exports['degradeDocFormulaDocumentData']=Ie,exports[_0xfcbb9f(0x224)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0xfcbb9f(0x264)]=l,exports[_0xfcbb9f(0x27d)]=d;
@@ -0,0 +1 @@
1
+ var _0x40f27e=_0x4d8b;(function(_0x56e6a7,_0x1ed32b){var _0x30b3a9=_0x4d8b,_0x15635f=_0x56e6a7();while(!![]){try{var _0x49d397=-parseInt(_0x30b3a9(0xc0))/0x1+-parseInt(_0x30b3a9(0xb0))/0x2+parseInt(_0x30b3a9(0xb1))/0x3+parseInt(_0x30b3a9(0xa6))/0x4+-parseInt(_0x30b3a9(0xa3))/0x5*(parseInt(_0x30b3a9(0xcd))/0x6)+-parseInt(_0x30b3a9(0x9b))/0x7*(-parseInt(_0x30b3a9(0xa5))/0x8)+parseInt(_0x30b3a9(0xcb))/0x9*(parseInt(_0x30b3a9(0xdf))/0xa);if(_0x49d397===_0x1ed32b)break;else _0x15635f['push'](_0x15635f['shift']());}catch(_0x1ffac2){_0x15635f['push'](_0x15635f['shift']());}}}(_0x2d28,0x82f6a));import{ConvertDocFormulaToTextCommand as _0x1b39dd,DocFormulaDisplayTextService as _0x4d8611,DocFormulaModel as _0x5ce3cb,DocFormulaService as _0x41f597,InsertDocFormulaCommand as _0x79156e,RemoveDocFormulaCommand as _0x5d8f45,ReplaceDocFormulaWithTextCommand as _0x24000b,SetDocFormulaNumberFormatCommand as _0x172947,UpdateDocFormulaCommand as _0x2744ba,isDocFormulaRange as _0x422b16}from'@univerjs-pro/docs-formula';import{ICommandService as _0x5b5660,IResourceLoaderService as _0xdb1371,IUniverInstanceService as _0x5c8675,Inject as _0x1e6de8,UniverInstanceType as _0x509adc}from'@univerjs/core';function _0x2d28(){var _0x5d7e20=['string','degradeDocumentData','function','startIndex','insertFormula','_model','_initialize','get','constructor','9mGNVrf','_document','226302Wqtkgm','end','remove','numberFormat','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_rangeId','_docsFormulaCommandService','saveUnit','replaceWithText','call','saveFormulaDisplayTextSnapshot','default','getFormulas','getSegmentId','update','endIndex','_docsFormulaDisplayTextService','_injector','9114090szzXcb','decorate','iterator','symbol','appendFormula','_univerInstanceService','object','getResult','customRanges','defineProperty','Document\x20','_commandService','_docsFormulaModel','_insert','2638517EgpERS','syncExecuteCommand','getUnit','externalReferences','getSnapshot','getConfig','length','range','70TCKjKF','toPrimitive','8kyMixz','2035908lUMYWa','getBody','getRange','setNumberFormat','convertToText','replaceWithFormula','createInstance','rangeId','find','getFormula','1462384FKCwsF','1885836LqGOzH','formula','describe','map','_docsFormulaResourceLoaderService','_service','paragraph','getOwnPropertyDescriptor','_getCustomRange','extend','_unitId','body','_createFormula','getId','\x20could\x20not\x20be\x20serialized.','630273OuugQi','_getCompleteRanges'];_0x2d28=function(){return _0x5d7e20;};return _0x2d28();}import{FDocument as _0x180ea8,FDocumentParagraph as _0x490071,FDocumentTextRange as _0x41c813}from'@univerjs/docs/facade';function v(_0x2508c8,_0x1fc74f){return function(_0x350a43,_0xb26edb){_0x1fc74f(_0x350a43,_0xb26edb,_0x2508c8);};}function y(_0xa4fde2,_0x48ddb4,_0x40773,_0x58bcd4){var _0x3a227c=_0x4d8b,_0x1188c7=arguments['length'],_0x544de1=_0x1188c7<0x3?_0x48ddb4:_0x58bcd4===null?_0x58bcd4=Object[_0x3a227c(0xb8)](_0x48ddb4,_0x40773):_0x58bcd4,_0xdb020d;if(typeof Reflect==_0x3a227c(0xe5)&&typeof Reflect[_0x3a227c(0xe0)]==_0x3a227c(0xc4))_0x544de1=Reflect[_0x3a227c(0xe0)](_0xa4fde2,_0x48ddb4,_0x40773,_0x58bcd4);else{for(var _0x1093c1=_0xa4fde2[_0x3a227c(0xa1)]-0x1;_0x1093c1>=0x0;_0x1093c1--)(_0xdb020d=_0xa4fde2[_0x1093c1])&&(_0x544de1=(_0x1188c7<0x3?_0xdb020d(_0x544de1):_0x1188c7>0x3?_0xdb020d(_0x48ddb4,_0x40773,_0x544de1):_0xdb020d(_0x48ddb4,_0x40773))||_0x544de1);}return _0x1188c7>0x3&&_0x544de1&&Object[_0x3a227c(0xe8)](_0x48ddb4,_0x40773,_0x544de1),_0x544de1;}function _0x4d8b(_0x514060,_0x46959f){_0x514060=_0x514060-0x99;var _0x2d28c7=_0x2d28();var _0x4d8b2d=_0x2d28c7[_0x514060];return _0x4d8b2d;}let b=class{constructor(_0x1d7acb,_0x484945,_0x3c8523,_0x393877,_0x2d8ec4,_0x2c5fc0){var _0xc9378e=_0x4d8b;this[_0xc9378e(0xbb)]=_0x1d7acb,this[_0xc9378e(0xd2)]=_0x484945,this[_0xc9378e(0xea)]=_0x3c8523,this[_0xc9378e(0xc7)]=_0x393877,this[_0xc9378e(0xb6)]=_0x2d8ec4,this[_0xc9378e(0xe4)]=_0x2c5fc0;}[_0x40f27e(0xbe)](){var _0x1fc282=_0x40f27e;return this[_0x1fc282(0xd2)];}[_0x40f27e(0xa8)](){var _0x3aa8d3=_0x40f27e;let _0xd98b24=this[_0x3aa8d3(0xb9)]();return _0xd98b24?{'endOffset':_0xd98b24['endIndex']+0x1,'rangeId':_0xd98b24['rangeId'],'startOffset':_0xd98b24[_0x3aa8d3(0xc5)]}:null;}['getFormula'](){var _0x2d585c=_0x40f27e,_0x19d48a,_0x41534f;return(_0x19d48a=(_0x41534f=this['_model'][_0x2d585c(0xaf)](this['_unitId'],this[_0x2d585c(0xd2)]))==null?void 0x0:_0x41534f[_0x2d585c(0xb2)])==null?'':_0x19d48a;}[_0x40f27e(0xa0)](){var _0x401299=_0x40f27e,_0x2e01d7;return(_0x2e01d7=this[_0x401299(0xc7)][_0x401299(0xaf)](this['_unitId'],this[_0x401299(0xd2)]))==null?null:_0x2e01d7;}[_0x40f27e(0xe6)](){var _0x3b1c99=_0x40f27e,_0xd8b72c;return(_0xd8b72c=this[_0x3b1c99(0xb6)][_0x3b1c99(0xe6)]({'unitId':this[_0x3b1c99(0xbb)],'rangeId':this[_0x3b1c99(0xd2)]}))==null?null:_0xd8b72c;}[_0x40f27e(0xb3)](){var _0x1ab227=_0x40f27e;let _0x3101e8=this[_0x1ab227(0xa8)](),_0x794b6c=this['getConfig'](),_0x5545f8=this[_0x1ab227(0xe6)]();return!_0x3101e8||!_0x794b6c||!_0x5545f8?null:{..._0x3101e8,'config':_0x794b6c,'formula':_0x794b6c[_0x1ab227(0xb2)],'result':_0x5545f8,'type':'formula'};}[_0x40f27e(0xdb)](_0x4666f0){var _0x50c079=_0x40f27e;return this[_0x50c079(0xea)][_0x50c079(0x9c)](_0x2744ba['id'],{'externalReferences':_0x4666f0['externalReferences'],'formula':_0x4666f0[_0x50c079(0xb2)],'numberFormat':_0x4666f0[_0x50c079(0xd0)],'rangeId':this[_0x50c079(0xd2)],'unitId':this['_unitId']});}[_0x40f27e(0xa9)](_0x42eaa8){var _0x33a6c5=_0x40f27e;return this[_0x33a6c5(0xea)]['syncExecuteCommand'](_0x172947['id'],{'numberFormat':_0x42eaa8,'rangeId':this['_rangeId'],'unitId':this[_0x33a6c5(0xbb)]});}[_0x40f27e(0xcf)](){var _0xf0b091=_0x40f27e;return this[_0xf0b091(0xea)][_0xf0b091(0x9c)](_0x5d8f45['id'],{'rangeId':this[_0xf0b091(0xd2)],'unitId':this[_0xf0b091(0xbb)]});}[_0x40f27e(0xd5)](_0x21fa26){var _0x2a262c=_0x40f27e;return this[_0x2a262c(0xea)]['syncExecuteCommand'](_0x24000b['id'],{'rangeId':this[_0x2a262c(0xd2)],'text':_0x21fa26,'unitId':this[_0x2a262c(0xbb)]});}[_0x40f27e(0xaa)](){var _0xb1d53f=_0x40f27e;return this['_commandService'][_0xb1d53f(0x9c)](_0x1b39dd['id'],{'rangeId':this[_0xb1d53f(0xd2)],'unitId':this[_0xb1d53f(0xbb)]});}[_0x40f27e(0xb9)](){var _0x8c04c1=_0x40f27e,_0x588eef;let _0x537cc7=this[_0x8c04c1(0xe4)][_0x8c04c1(0x9d)](this[_0x8c04c1(0xbb)],_0x509adc['UNIVER_DOC']);return _0x537cc7==null||(_0x588eef=_0x537cc7[_0x8c04c1(0x9f)]()[_0x8c04c1(0xbc)])==null||(_0x588eef=_0x588eef[_0x8c04c1(0xe7)])==null?void 0x0:_0x588eef[_0x8c04c1(0xae)](_0x302d88=>_0x302d88[_0x8c04c1(0xad)]===this[_0x8c04c1(0xd2)]&&_0x422b16(_0x302d88));}};b=y([v(0x2,_0x5b5660),v(0x3,_0x1e6de8(_0x5ce3cb)),v(0x4,_0x1e6de8(_0x41f597)),v(0x5,_0x5c8675)],b);function x(_0x5e7ebd){'@babel/helpers - typeof';var _0x46aacd=_0x40f27e;return x=typeof Symbol==_0x46aacd(0xc4)&&typeof Symbol[_0x46aacd(0xe1)]==_0x46aacd(0xe2)?function(_0x2c3273){return typeof _0x2c3273;}:function(_0x83372f){var _0x2ff751=_0x46aacd;return _0x83372f&&typeof Symbol=='function'&&_0x83372f[_0x2ff751(0xca)]===Symbol&&_0x83372f!==Symbol['prototype']?'symbol':typeof _0x83372f;},x(_0x5e7ebd);}function S(_0x27a31c,_0x3059b7){var _0x28f241=_0x40f27e;if(x(_0x27a31c)!=_0x28f241(0xe5)||!_0x27a31c)return _0x27a31c;var _0x568ff2=_0x27a31c[Symbol[_0x28f241(0xa4)]];if(_0x568ff2!==void 0x0){var _0x3a64bf=_0x568ff2[_0x28f241(0xd6)](_0x27a31c,_0x3059b7||_0x28f241(0xd8));if(x(_0x3a64bf)!='object')return _0x3a64bf;throw TypeError(_0x28f241(0xd1));}return(_0x3059b7===_0x28f241(0xc2)?String:Number)(_0x27a31c);}function C(_0x1b1852){var _0x3802bb=_0x40f27e,_0x7568bc=S(_0x1b1852,_0x3802bb(0xc2));return x(_0x7568bc)==_0x3802bb(0xe2)?_0x7568bc:_0x7568bc+'';}function w(_0x446d3e,_0x134bfa,_0x426aba){var _0xcceebf=_0x40f27e;return(_0x134bfa=C(_0x134bfa))in _0x446d3e?Object[_0xcceebf(0xe8)](_0x446d3e,_0x134bfa,{'value':_0x426aba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x446d3e[_0x134bfa]=_0x426aba,_0x446d3e;}var T=class extends _0x180ea8{constructor(..._0x1acabd){var _0xbf0f0=_0x40f27e;super(..._0x1acabd),w(this,_0xbf0f0(0xd3),void 0x0),w(this,_0xbf0f0(0xdd),void 0x0),w(this,_0xbf0f0(0x99),void 0x0),w(this,_0xbf0f0(0xb5),void 0x0);}['_initialize'](_0x2b9c55){var _0x6bc4a7=_0x40f27e;this[_0x6bc4a7(0xd3)]=_0x2b9c55['get'](_0x5b5660),this[_0x6bc4a7(0xdd)]=_0x2b9c55['get'](_0x4d8611),this['_docsFormulaModel']=_0x2b9c55[_0x6bc4a7(0xc9)](_0x5ce3cb),this[_0x6bc4a7(0xb5)]=_0x2b9c55[_0x6bc4a7(0xc9)](_0xdb1371);}[_0x40f27e(0xd9)](){var _0x369180=_0x40f27e;return this[_0x369180(0xc1)]()[_0x369180(0xb4)](_0x43638a=>this[_0x369180(0xbd)](_0x43638a['rangeId']));}['getFormula'](_0x4a2a8b){var _0x1a6344=_0x40f27e;return this[_0x1a6344(0xc1)]()['some'](_0x34f91e=>_0x34f91e['rangeId']===_0x4a2a8b)?this[_0x1a6344(0xbd)](_0x4a2a8b):null;}['getFormulaAt'](_0x3224d9){var _0xbdb7c6=_0x40f27e;let _0x3d1fd9=this['_getCompleteRanges']()[_0xbdb7c6(0xae)](_0xaf403e=>_0xaf403e[_0xbdb7c6(0xc5)]<=_0x3224d9&&_0x3224d9<=_0xaf403e[_0xbdb7c6(0xdc)]);return _0x3d1fd9?this[_0xbdb7c6(0xbd)](_0x3d1fd9[_0xbdb7c6(0xad)]):null;}[_0x40f27e(0xd7)](){var _0x4c3fc9=_0x40f27e;let _0x28cc51=this[_0x4c3fc9(0xb5)][_0x4c3fc9(0xd4)](this['id']);if(!_0x28cc51)throw Error(_0x4c3fc9(0xe9)+this['id']+_0x4c3fc9(0xbf));return this[_0x4c3fc9(0xdd)][_0x4c3fc9(0xc3)](_0x28cc51);}[_0x40f27e(0xc6)](_0x18625c){var _0x27b8ca=_0x40f27e;return this[_0x27b8ca(0x9a)]({'externalReferences':_0x18625c[_0x27b8ca(0x9e)],'formula':_0x18625c['formula'],'numberFormat':_0x18625c[_0x27b8ca(0xd0)],'target':{'type':'range','startOffset':_0x18625c['startOffset'],'endOffset':_0x18625c['endOffset']},'unitId':this[_0x27b8ca(0xbe)]()});}['_insert'](_0x53b976){var _0x55d73d=_0x40f27e;let _0x50027f=this['_docsFormulaCommandService'][_0x55d73d(0x9c)](_0x79156e['id'],_0x53b976);return _0x50027f?this['_createFormula'](_0x50027f['rangeId']):null;}[_0x40f27e(0xc1)](){var _0x9c3996=_0x40f27e,_0x11c288,_0x2a29c6;let _0x4963d1=this['_docsFormulaModel'][_0x9c3996(0xd9)](this[_0x9c3996(0xbe)]());return(_0x11c288=(_0x2a29c6=this[_0x9c3996(0xa7)]('')[_0x9c3996(0xe7)])==null?void 0x0:_0x2a29c6['filter'](_0x485d49=>_0x422b16(_0x485d49)&&_0x4963d1[_0x485d49['rangeId']]!=null))==null?[]:_0x11c288;}[_0x40f27e(0xbd)](_0x554ad2){var _0x22edef=_0x40f27e;return this[_0x22edef(0xde)]['createInstance'](b,this[_0x22edef(0xbe)](),_0x554ad2);}};_0x180ea8['extend'](T);var E=class extends _0x490071{constructor(..._0x318898){var _0x10df80=_0x40f27e;super(..._0x318898),w(this,_0x10df80(0xd3),void 0x0);}[_0x40f27e(0xc8)](_0x4a162c){var _0x2d0f13=_0x40f27e;this['_docsFormulaCommandService']=_0x4a162c[_0x2d0f13(0xc9)](_0x5b5660);}[_0x40f27e(0xc6)](_0x151ab0,_0x1bc4e9,_0x49632c={}){var _0x248126=_0x40f27e;return this[_0x248126(0x9a)](_0x151ab0,_0x1bc4e9,_0x49632c);}[_0x40f27e(0xe3)](_0x19b7ad,_0x59abbf={}){var _0x93ea5f=_0x40f27e;return this[_0x93ea5f(0x9a)](_0x93ea5f(0xce),_0x19b7ad,_0x59abbf);}[_0x40f27e(0x9a)](_0x264f6d,_0x1e5f6c,_0x2d0994){var _0x106106=_0x40f27e;if(this[_0x106106(0xda)]())return null;let _0x4b2bf6={'externalReferences':_0x2d0994[_0x106106(0x9e)],'formula':_0x1e5f6c,'numberFormat':_0x2d0994[_0x106106(0xd0)],'target':{'type':_0x106106(0xb7),'paragraphId':this['getId'](),'position':_0x264f6d},'unitId':this['_document'][_0x106106(0xbe)]()},_0x4494ec=this[_0x106106(0xd3)][_0x106106(0x9c)](_0x79156e['id'],_0x4b2bf6);return _0x4494ec?this[_0x106106(0xde)]['createInstance'](b,this['_document'][_0x106106(0xbe)](),_0x4494ec[_0x106106(0xad)]):null;}};_0x490071[_0x40f27e(0xba)](E);var D=class extends _0x41c813{constructor(..._0x2e97b7){var _0x54d1d5=_0x40f27e;super(..._0x2e97b7),w(this,_0x54d1d5(0xd3),void 0x0);}['_initialize'](_0x4ebd89){var _0x83086e=_0x40f27e;this[_0x83086e(0xd3)]=_0x4ebd89[_0x83086e(0xc9)](_0x5b5660);}[_0x40f27e(0xab)](_0x573180,_0x28f11c={}){var _0x40ee29=_0x40f27e;let {endOffset:_0x29d06e,segmentId:_0x4ffdfe,startOffset:_0x50f5da}=this['getRange']();return _0x4ffdfe?null:this[_0x40ee29(0x9a)](_0x50f5da,_0x29d06e,_0x573180,_0x28f11c);}['_insert'](_0x482c3b,_0x3b99a4,_0x37458e,_0x90b876){var _0x29756f=_0x40f27e;let _0x484538={'externalReferences':_0x90b876[_0x29756f(0x9e)],'formula':_0x37458e,'numberFormat':_0x90b876[_0x29756f(0xd0)],'target':{'type':_0x29756f(0xa2),'startOffset':_0x482c3b,'endOffset':_0x3b99a4},'unitId':this[_0x29756f(0xcc)][_0x29756f(0xbe)]()},_0x4d7c0a=this[_0x29756f(0xd3)][_0x29756f(0x9c)](_0x79156e['id'],_0x484538);return _0x4d7c0a?this[_0x29756f(0xde)][_0x29756f(0xac)](b,this[_0x29756f(0xcc)][_0x29756f(0xbe)](),_0x4d7c0a[_0x29756f(0xad)]):null;}};_0x41c813['extend'](D);export{b as FDocumentFormula};
@@ -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};
package/lib/facade.js ADDED
@@ -0,0 +1 @@
1
+ var _0x40f27e=_0x4d8b;(function(_0x56e6a7,_0x1ed32b){var _0x30b3a9=_0x4d8b,_0x15635f=_0x56e6a7();while(!![]){try{var _0x49d397=-parseInt(_0x30b3a9(0xc0))/0x1+-parseInt(_0x30b3a9(0xb0))/0x2+parseInt(_0x30b3a9(0xb1))/0x3+parseInt(_0x30b3a9(0xa6))/0x4+-parseInt(_0x30b3a9(0xa3))/0x5*(parseInt(_0x30b3a9(0xcd))/0x6)+-parseInt(_0x30b3a9(0x9b))/0x7*(-parseInt(_0x30b3a9(0xa5))/0x8)+parseInt(_0x30b3a9(0xcb))/0x9*(parseInt(_0x30b3a9(0xdf))/0xa);if(_0x49d397===_0x1ed32b)break;else _0x15635f['push'](_0x15635f['shift']());}catch(_0x1ffac2){_0x15635f['push'](_0x15635f['shift']());}}}(_0x2d28,0x82f6a));import{ConvertDocFormulaToTextCommand as _0x1b39dd,DocFormulaDisplayTextService as _0x4d8611,DocFormulaModel as _0x5ce3cb,DocFormulaService as _0x41f597,InsertDocFormulaCommand as _0x79156e,RemoveDocFormulaCommand as _0x5d8f45,ReplaceDocFormulaWithTextCommand as _0x24000b,SetDocFormulaNumberFormatCommand as _0x172947,UpdateDocFormulaCommand as _0x2744ba,isDocFormulaRange as _0x422b16}from'@univerjs-pro/docs-formula';import{ICommandService as _0x5b5660,IResourceLoaderService as _0xdb1371,IUniverInstanceService as _0x5c8675,Inject as _0x1e6de8,UniverInstanceType as _0x509adc}from'@univerjs/core';function _0x2d28(){var _0x5d7e20=['string','degradeDocumentData','function','startIndex','insertFormula','_model','_initialize','get','constructor','9mGNVrf','_document','226302Wqtkgm','end','remove','numberFormat','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_rangeId','_docsFormulaCommandService','saveUnit','replaceWithText','call','saveFormulaDisplayTextSnapshot','default','getFormulas','getSegmentId','update','endIndex','_docsFormulaDisplayTextService','_injector','9114090szzXcb','decorate','iterator','symbol','appendFormula','_univerInstanceService','object','getResult','customRanges','defineProperty','Document\x20','_commandService','_docsFormulaModel','_insert','2638517EgpERS','syncExecuteCommand','getUnit','externalReferences','getSnapshot','getConfig','length','range','70TCKjKF','toPrimitive','8kyMixz','2035908lUMYWa','getBody','getRange','setNumberFormat','convertToText','replaceWithFormula','createInstance','rangeId','find','getFormula','1462384FKCwsF','1885836LqGOzH','formula','describe','map','_docsFormulaResourceLoaderService','_service','paragraph','getOwnPropertyDescriptor','_getCustomRange','extend','_unitId','body','_createFormula','getId','\x20could\x20not\x20be\x20serialized.','630273OuugQi','_getCompleteRanges'];_0x2d28=function(){return _0x5d7e20;};return _0x2d28();}import{FDocument as _0x180ea8,FDocumentParagraph as _0x490071,FDocumentTextRange as _0x41c813}from'@univerjs/docs/facade';function v(_0x2508c8,_0x1fc74f){return function(_0x350a43,_0xb26edb){_0x1fc74f(_0x350a43,_0xb26edb,_0x2508c8);};}function y(_0xa4fde2,_0x48ddb4,_0x40773,_0x58bcd4){var _0x3a227c=_0x4d8b,_0x1188c7=arguments['length'],_0x544de1=_0x1188c7<0x3?_0x48ddb4:_0x58bcd4===null?_0x58bcd4=Object[_0x3a227c(0xb8)](_0x48ddb4,_0x40773):_0x58bcd4,_0xdb020d;if(typeof Reflect==_0x3a227c(0xe5)&&typeof Reflect[_0x3a227c(0xe0)]==_0x3a227c(0xc4))_0x544de1=Reflect[_0x3a227c(0xe0)](_0xa4fde2,_0x48ddb4,_0x40773,_0x58bcd4);else{for(var _0x1093c1=_0xa4fde2[_0x3a227c(0xa1)]-0x1;_0x1093c1>=0x0;_0x1093c1--)(_0xdb020d=_0xa4fde2[_0x1093c1])&&(_0x544de1=(_0x1188c7<0x3?_0xdb020d(_0x544de1):_0x1188c7>0x3?_0xdb020d(_0x48ddb4,_0x40773,_0x544de1):_0xdb020d(_0x48ddb4,_0x40773))||_0x544de1);}return _0x1188c7>0x3&&_0x544de1&&Object[_0x3a227c(0xe8)](_0x48ddb4,_0x40773,_0x544de1),_0x544de1;}function _0x4d8b(_0x514060,_0x46959f){_0x514060=_0x514060-0x99;var _0x2d28c7=_0x2d28();var _0x4d8b2d=_0x2d28c7[_0x514060];return _0x4d8b2d;}let b=class{constructor(_0x1d7acb,_0x484945,_0x3c8523,_0x393877,_0x2d8ec4,_0x2c5fc0){var _0xc9378e=_0x4d8b;this[_0xc9378e(0xbb)]=_0x1d7acb,this[_0xc9378e(0xd2)]=_0x484945,this[_0xc9378e(0xea)]=_0x3c8523,this[_0xc9378e(0xc7)]=_0x393877,this[_0xc9378e(0xb6)]=_0x2d8ec4,this[_0xc9378e(0xe4)]=_0x2c5fc0;}[_0x40f27e(0xbe)](){var _0x1fc282=_0x40f27e;return this[_0x1fc282(0xd2)];}[_0x40f27e(0xa8)](){var _0x3aa8d3=_0x40f27e;let _0xd98b24=this[_0x3aa8d3(0xb9)]();return _0xd98b24?{'endOffset':_0xd98b24['endIndex']+0x1,'rangeId':_0xd98b24['rangeId'],'startOffset':_0xd98b24[_0x3aa8d3(0xc5)]}:null;}['getFormula'](){var _0x2d585c=_0x40f27e,_0x19d48a,_0x41534f;return(_0x19d48a=(_0x41534f=this['_model'][_0x2d585c(0xaf)](this['_unitId'],this[_0x2d585c(0xd2)]))==null?void 0x0:_0x41534f[_0x2d585c(0xb2)])==null?'':_0x19d48a;}[_0x40f27e(0xa0)](){var _0x401299=_0x40f27e,_0x2e01d7;return(_0x2e01d7=this[_0x401299(0xc7)][_0x401299(0xaf)](this['_unitId'],this[_0x401299(0xd2)]))==null?null:_0x2e01d7;}[_0x40f27e(0xe6)](){var _0x3b1c99=_0x40f27e,_0xd8b72c;return(_0xd8b72c=this[_0x3b1c99(0xb6)][_0x3b1c99(0xe6)]({'unitId':this[_0x3b1c99(0xbb)],'rangeId':this[_0x3b1c99(0xd2)]}))==null?null:_0xd8b72c;}[_0x40f27e(0xb3)](){var _0x1ab227=_0x40f27e;let _0x3101e8=this[_0x1ab227(0xa8)](),_0x794b6c=this['getConfig'](),_0x5545f8=this[_0x1ab227(0xe6)]();return!_0x3101e8||!_0x794b6c||!_0x5545f8?null:{..._0x3101e8,'config':_0x794b6c,'formula':_0x794b6c[_0x1ab227(0xb2)],'result':_0x5545f8,'type':'formula'};}[_0x40f27e(0xdb)](_0x4666f0){var _0x50c079=_0x40f27e;return this[_0x50c079(0xea)][_0x50c079(0x9c)](_0x2744ba['id'],{'externalReferences':_0x4666f0['externalReferences'],'formula':_0x4666f0[_0x50c079(0xb2)],'numberFormat':_0x4666f0[_0x50c079(0xd0)],'rangeId':this[_0x50c079(0xd2)],'unitId':this['_unitId']});}[_0x40f27e(0xa9)](_0x42eaa8){var _0x33a6c5=_0x40f27e;return this[_0x33a6c5(0xea)]['syncExecuteCommand'](_0x172947['id'],{'numberFormat':_0x42eaa8,'rangeId':this['_rangeId'],'unitId':this[_0x33a6c5(0xbb)]});}[_0x40f27e(0xcf)](){var _0xf0b091=_0x40f27e;return this[_0xf0b091(0xea)][_0xf0b091(0x9c)](_0x5d8f45['id'],{'rangeId':this[_0xf0b091(0xd2)],'unitId':this[_0xf0b091(0xbb)]});}[_0x40f27e(0xd5)](_0x21fa26){var _0x2a262c=_0x40f27e;return this[_0x2a262c(0xea)]['syncExecuteCommand'](_0x24000b['id'],{'rangeId':this[_0x2a262c(0xd2)],'text':_0x21fa26,'unitId':this[_0x2a262c(0xbb)]});}[_0x40f27e(0xaa)](){var _0xb1d53f=_0x40f27e;return this['_commandService'][_0xb1d53f(0x9c)](_0x1b39dd['id'],{'rangeId':this[_0xb1d53f(0xd2)],'unitId':this[_0xb1d53f(0xbb)]});}[_0x40f27e(0xb9)](){var _0x8c04c1=_0x40f27e,_0x588eef;let _0x537cc7=this[_0x8c04c1(0xe4)][_0x8c04c1(0x9d)](this[_0x8c04c1(0xbb)],_0x509adc['UNIVER_DOC']);return _0x537cc7==null||(_0x588eef=_0x537cc7[_0x8c04c1(0x9f)]()[_0x8c04c1(0xbc)])==null||(_0x588eef=_0x588eef[_0x8c04c1(0xe7)])==null?void 0x0:_0x588eef[_0x8c04c1(0xae)](_0x302d88=>_0x302d88[_0x8c04c1(0xad)]===this[_0x8c04c1(0xd2)]&&_0x422b16(_0x302d88));}};b=y([v(0x2,_0x5b5660),v(0x3,_0x1e6de8(_0x5ce3cb)),v(0x4,_0x1e6de8(_0x41f597)),v(0x5,_0x5c8675)],b);function x(_0x5e7ebd){'@babel/helpers - typeof';var _0x46aacd=_0x40f27e;return x=typeof Symbol==_0x46aacd(0xc4)&&typeof Symbol[_0x46aacd(0xe1)]==_0x46aacd(0xe2)?function(_0x2c3273){return typeof _0x2c3273;}:function(_0x83372f){var _0x2ff751=_0x46aacd;return _0x83372f&&typeof Symbol=='function'&&_0x83372f[_0x2ff751(0xca)]===Symbol&&_0x83372f!==Symbol['prototype']?'symbol':typeof _0x83372f;},x(_0x5e7ebd);}function S(_0x27a31c,_0x3059b7){var _0x28f241=_0x40f27e;if(x(_0x27a31c)!=_0x28f241(0xe5)||!_0x27a31c)return _0x27a31c;var _0x568ff2=_0x27a31c[Symbol[_0x28f241(0xa4)]];if(_0x568ff2!==void 0x0){var _0x3a64bf=_0x568ff2[_0x28f241(0xd6)](_0x27a31c,_0x3059b7||_0x28f241(0xd8));if(x(_0x3a64bf)!='object')return _0x3a64bf;throw TypeError(_0x28f241(0xd1));}return(_0x3059b7===_0x28f241(0xc2)?String:Number)(_0x27a31c);}function C(_0x1b1852){var _0x3802bb=_0x40f27e,_0x7568bc=S(_0x1b1852,_0x3802bb(0xc2));return x(_0x7568bc)==_0x3802bb(0xe2)?_0x7568bc:_0x7568bc+'';}function w(_0x446d3e,_0x134bfa,_0x426aba){var _0xcceebf=_0x40f27e;return(_0x134bfa=C(_0x134bfa))in _0x446d3e?Object[_0xcceebf(0xe8)](_0x446d3e,_0x134bfa,{'value':_0x426aba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x446d3e[_0x134bfa]=_0x426aba,_0x446d3e;}var T=class extends _0x180ea8{constructor(..._0x1acabd){var _0xbf0f0=_0x40f27e;super(..._0x1acabd),w(this,_0xbf0f0(0xd3),void 0x0),w(this,_0xbf0f0(0xdd),void 0x0),w(this,_0xbf0f0(0x99),void 0x0),w(this,_0xbf0f0(0xb5),void 0x0);}['_initialize'](_0x2b9c55){var _0x6bc4a7=_0x40f27e;this[_0x6bc4a7(0xd3)]=_0x2b9c55['get'](_0x5b5660),this[_0x6bc4a7(0xdd)]=_0x2b9c55['get'](_0x4d8611),this['_docsFormulaModel']=_0x2b9c55[_0x6bc4a7(0xc9)](_0x5ce3cb),this[_0x6bc4a7(0xb5)]=_0x2b9c55[_0x6bc4a7(0xc9)](_0xdb1371);}[_0x40f27e(0xd9)](){var _0x369180=_0x40f27e;return this[_0x369180(0xc1)]()[_0x369180(0xb4)](_0x43638a=>this[_0x369180(0xbd)](_0x43638a['rangeId']));}['getFormula'](_0x4a2a8b){var _0x1a6344=_0x40f27e;return this[_0x1a6344(0xc1)]()['some'](_0x34f91e=>_0x34f91e['rangeId']===_0x4a2a8b)?this[_0x1a6344(0xbd)](_0x4a2a8b):null;}['getFormulaAt'](_0x3224d9){var _0xbdb7c6=_0x40f27e;let _0x3d1fd9=this['_getCompleteRanges']()[_0xbdb7c6(0xae)](_0xaf403e=>_0xaf403e[_0xbdb7c6(0xc5)]<=_0x3224d9&&_0x3224d9<=_0xaf403e[_0xbdb7c6(0xdc)]);return _0x3d1fd9?this[_0xbdb7c6(0xbd)](_0x3d1fd9[_0xbdb7c6(0xad)]):null;}[_0x40f27e(0xd7)](){var _0x4c3fc9=_0x40f27e;let _0x28cc51=this[_0x4c3fc9(0xb5)][_0x4c3fc9(0xd4)](this['id']);if(!_0x28cc51)throw Error(_0x4c3fc9(0xe9)+this['id']+_0x4c3fc9(0xbf));return this[_0x4c3fc9(0xdd)][_0x4c3fc9(0xc3)](_0x28cc51);}[_0x40f27e(0xc6)](_0x18625c){var _0x27b8ca=_0x40f27e;return this[_0x27b8ca(0x9a)]({'externalReferences':_0x18625c[_0x27b8ca(0x9e)],'formula':_0x18625c['formula'],'numberFormat':_0x18625c[_0x27b8ca(0xd0)],'target':{'type':'range','startOffset':_0x18625c['startOffset'],'endOffset':_0x18625c['endOffset']},'unitId':this[_0x27b8ca(0xbe)]()});}['_insert'](_0x53b976){var _0x55d73d=_0x40f27e;let _0x50027f=this['_docsFormulaCommandService'][_0x55d73d(0x9c)](_0x79156e['id'],_0x53b976);return _0x50027f?this['_createFormula'](_0x50027f['rangeId']):null;}[_0x40f27e(0xc1)](){var _0x9c3996=_0x40f27e,_0x11c288,_0x2a29c6;let _0x4963d1=this['_docsFormulaModel'][_0x9c3996(0xd9)](this[_0x9c3996(0xbe)]());return(_0x11c288=(_0x2a29c6=this[_0x9c3996(0xa7)]('')[_0x9c3996(0xe7)])==null?void 0x0:_0x2a29c6['filter'](_0x485d49=>_0x422b16(_0x485d49)&&_0x4963d1[_0x485d49['rangeId']]!=null))==null?[]:_0x11c288;}[_0x40f27e(0xbd)](_0x554ad2){var _0x22edef=_0x40f27e;return this[_0x22edef(0xde)]['createInstance'](b,this[_0x22edef(0xbe)](),_0x554ad2);}};_0x180ea8['extend'](T);var E=class extends _0x490071{constructor(..._0x318898){var _0x10df80=_0x40f27e;super(..._0x318898),w(this,_0x10df80(0xd3),void 0x0);}[_0x40f27e(0xc8)](_0x4a162c){var _0x2d0f13=_0x40f27e;this['_docsFormulaCommandService']=_0x4a162c[_0x2d0f13(0xc9)](_0x5b5660);}[_0x40f27e(0xc6)](_0x151ab0,_0x1bc4e9,_0x49632c={}){var _0x248126=_0x40f27e;return this[_0x248126(0x9a)](_0x151ab0,_0x1bc4e9,_0x49632c);}[_0x40f27e(0xe3)](_0x19b7ad,_0x59abbf={}){var _0x93ea5f=_0x40f27e;return this[_0x93ea5f(0x9a)](_0x93ea5f(0xce),_0x19b7ad,_0x59abbf);}[_0x40f27e(0x9a)](_0x264f6d,_0x1e5f6c,_0x2d0994){var _0x106106=_0x40f27e;if(this[_0x106106(0xda)]())return null;let _0x4b2bf6={'externalReferences':_0x2d0994[_0x106106(0x9e)],'formula':_0x1e5f6c,'numberFormat':_0x2d0994[_0x106106(0xd0)],'target':{'type':_0x106106(0xb7),'paragraphId':this['getId'](),'position':_0x264f6d},'unitId':this['_document'][_0x106106(0xbe)]()},_0x4494ec=this[_0x106106(0xd3)][_0x106106(0x9c)](_0x79156e['id'],_0x4b2bf6);return _0x4494ec?this[_0x106106(0xde)]['createInstance'](b,this['_document'][_0x106106(0xbe)](),_0x4494ec[_0x106106(0xad)]):null;}};_0x490071[_0x40f27e(0xba)](E);var D=class extends _0x41c813{constructor(..._0x2e97b7){var _0x54d1d5=_0x40f27e;super(..._0x2e97b7),w(this,_0x54d1d5(0xd3),void 0x0);}['_initialize'](_0x4ebd89){var _0x83086e=_0x40f27e;this[_0x83086e(0xd3)]=_0x4ebd89[_0x83086e(0xc9)](_0x5b5660);}[_0x40f27e(0xab)](_0x573180,_0x28f11c={}){var _0x40ee29=_0x40f27e;let {endOffset:_0x29d06e,segmentId:_0x4ffdfe,startOffset:_0x50f5da}=this['getRange']();return _0x4ffdfe?null:this[_0x40ee29(0x9a)](_0x50f5da,_0x29d06e,_0x573180,_0x28f11c);}['_insert'](_0x482c3b,_0x3b99a4,_0x37458e,_0x90b876){var _0x29756f=_0x40f27e;let _0x484538={'externalReferences':_0x90b876[_0x29756f(0x9e)],'formula':_0x37458e,'numberFormat':_0x90b876[_0x29756f(0xd0)],'target':{'type':_0x29756f(0xa2),'startOffset':_0x482c3b,'endOffset':_0x3b99a4},'unitId':this[_0x29756f(0xcc)][_0x29756f(0xbe)]()},_0x4d7c0a=this[_0x29756f(0xd3)][_0x29756f(0x9c)](_0x79156e['id'],_0x484538);return _0x4d7c0a?this[_0x29756f(0xde)][_0x29756f(0xac)](b,this[_0x29756f(0xcc)][_0x29756f(0xbe)](),_0x4d7c0a[_0x29756f(0xad)]):null;}};_0x41c813['extend'](D);export{b as FDocumentFormula};