@univerjs-pro/thread-comment-datasource 0.6.6 → 0.6.7-experimental.20250328-3aaa828

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x550f8f=_0x4086;(function(_0x83fabf,_0x45198d){const _0x5206db=_0x4086,_0x382a8d=_0x83fabf();while(!![]){try{const _0x4856af=parseInt(_0x5206db(0x1a5))/0x1+-parseInt(_0x5206db(0x1d7))/0x2+parseInt(_0x5206db(0x1b5))/0x3+parseInt(_0x5206db(0x17b))/0x4*(parseInt(_0x5206db(0x1bf))/0x5)+parseInt(_0x5206db(0x1a6))/0x6*(-parseInt(_0x5206db(0x1e7))/0x7)+parseInt(_0x5206db(0x186))/0x8*(parseInt(_0x5206db(0x17e))/0x9)+parseInt(_0x5206db(0x1d8))/0xa*(-parseInt(_0x5206db(0x184))/0xb);if(_0x4856af===_0x45198d)break;else _0x382a8d['push'](_0x382a8d['shift']());}catch(_0x5f4491){_0x382a8d['push'](_0x382a8d['shift']());}}}(_0x1f31,0xe968b));Object['defineProperty'](exports,Symbol[_0x550f8f(0x1be)],{'value':_0x550f8f(0x1e2)});const b=require(_0x550f8f(0x18b)),T=require(_0x550f8f(0x1b8)),c=require(_0x550f8f(0x180)),j=require('@univerjs/thread-comment-ui'),M=require(_0x550f8f(0x1b9)),w=require(_0x550f8f(0x1c3)),P=require(_0x550f8f(0x187)),U=_0x550f8f(0x1d9);var I=(_0x3710f9=>(_0x3710f9[_0x3710f9[_0x550f8f(0x1d1)]=0x0]=_0x550f8f(0x1d1),_0x3710f9[_0x3710f9['Solved']=0x1]=_0x550f8f(0x1c4),_0x3710f9[_0x3710f9[_0x550f8f(0x19d)]=-0x1]=_0x550f8f(0x19d),_0x3710f9))(I||{}),v=(_0xa2357e=>(_0xa2357e[_0xa2357e[_0x550f8f(0x1da)]=0x0]=_0x550f8f(0x1da),_0xa2357e[_0xa2357e[_0x550f8f(0x172)]=0x1]=_0x550f8f(0x172),_0xa2357e[_0xa2357e[_0x550f8f(0x1b0)]=0x2]=_0x550f8f(0x1b0),_0xa2357e[_0xa2357e[_0x550f8f(0x177)]=0x3]='Edit',_0xa2357e[_0xa2357e[_0x550f8f(0x1b4)]=0x4]=_0x550f8f(0x1b4),_0xa2357e[_0xa2357e[_0x550f8f(0x182)]=0x5]=_0x550f8f(0x182),_0xa2357e[_0xa2357e[_0x550f8f(0x19d)]=-0x1]=_0x550f8f(0x19d),_0xa2357e))(v||{});const f=_0x45a0c2=>c['dayjs'](new Date(+_0x45a0c2))[_0x550f8f(0x18a)](_0x550f8f(0x19c)),R=async(_0x2066f4,_0x38a004)=>{const _0x359c03=_0x550f8f,_0x58dec3=_0x2066f4[_0x359c03(0x1c0)](c[_0x359c03(0x1e8)]),_0x2f48e7=_0x2066f4[_0x359c03(0x1c0)](P[_0x359c03(0x17f)]);_0x38a004['forEach'](_0x1cf0aa=>{const _0xcd32c=_0x359c03;_0x58dec3[_0xcd32c(0x192)](_0x1cf0aa)&&_0x38a004[_0xcd32c(0x1bc)](_0x1cf0aa);}),_0x38a004[_0x359c03(0x1ac)]&&(await _0x2f48e7[_0x359c03(0x1c0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x38a004]}}))[_0x359c03(0x179)][_0x359c03(0x18c)]['forEach'](_0x507c9e=>{_0x507c9e&&_0x58dec3['addUser'](_0x507c9e);});};var $=Object[_0x550f8f(0x18f)],E=(_0xb8d679,_0x5aff1b,_0xa2a953,_0x5162c4)=>{const _0x328258=_0x550f8f;for(var _0x98d2e5=_0x5162c4>0x1?void 0x0:_0x5162c4?$(_0x5aff1b,_0xa2a953):_0x5aff1b,_0x4c68a4=_0xb8d679[_0x328258(0x1cd)]-0x1,_0x11c321;_0x4c68a4>=0x0;_0x4c68a4--)(_0x11c321=_0xb8d679[_0x4c68a4])&&(_0x98d2e5=_0x11c321(_0x98d2e5)||_0x98d2e5);return _0x98d2e5;},S=(_0x365c75,_0x371c0a)=>(_0x21c058,_0x58803e)=>_0x371c0a(_0x21c058,_0x58803e,_0x365c75);let p=class extends c['Disposable']{constructor(_0x45b7ae,_0x54859d,_0x56c330,_0x52afd2){const _0x55af52=_0x550f8f;super(),this['_commentService']=_0x45b7ae,this[_0x55af52(0x1a3)]=_0x54859d,this[_0x55af52(0x173)]=_0x56c330,this['_injector']=_0x52afd2,this[_0x55af52(0x1b2)](),this[_0x55af52(0x1ca)]();}[_0x550f8f(0x1ca)](){const _0x1790a8=_0x550f8f;this['disposeWithMe'](this[_0x1790a8(0x1a3)]['commentUpdate$'][_0x1790a8(0x1b6)](w['bufferTime'](0x10))['subscribe'](_0x377309=>{const _0x26f575=_0x1790a8,_0x2622af=new Set();_0x377309['forEach'](_0x8a75b7=>{const _0x267529=_0x4086;switch(_0x8a75b7[_0x267529(0x1a2)]){case'add':{const _0x5db0aa=_0x8a75b7['payload'][_0x267529(0x1df)];_0x2622af[_0x267529(0x1ae)](_0x5db0aa);break;}}}),R(this[_0x26f575(0x1c5)],_0x2622af);}));}[_0x550f8f(0x1b2)](){const _0x589b1b=_0x550f8f;this[_0x589b1b(0x19b)](this[_0x589b1b(0x19e)]['commentUpdate$']['subscribe'](async _0x39bd26=>{const _0x28365e=_0x589b1b;var _0x540efb,_0x2f9ad1,_0x102ac1,_0x10ae2e;const _0x3d2712=(_0x540efb=this[_0x28365e(0x1a3)]['getUnit'](_0x39bd26['unitId'])[_0x28365e(0x199)](_0x59f988=>_0x59f988['threadId']===_0x39bd26[_0x28365e(0x1d2)]))==null?void 0x0:_0x540efb[_0x28365e(0x198)];if(!_0x3d2712)return;const {unitId:_0x277c8f,subUnitId:_0x3d2c1a}=_0x3d2712;switch(_0x39bd26['user']&&this[_0x28365e(0x173)]['addUser'](_0x39bd26['user']),_0x39bd26[_0x28365e(0x1a2)]){case v[_0x28365e(0x172)]:break;case v[_0x28365e(0x1b0)]:{this[_0x28365e(0x1a3)][_0x28365e(0x176)](_0x277c8f,_0x3d2c1a,{'unitId':_0x277c8f,'subUnitId':_0x3d2c1a,'ref':'','id':_0x39bd26[_0x28365e(0x197)],'dT':f(+_0x39bd26[_0x28365e(0x18d)]),'threadId':_0x39bd26[_0x28365e(0x1d2)],'personId':(_0x102ac1=(_0x2f9ad1=_0x39bd26['user'])==null?void 0x0:_0x2f9ad1['userID'])!=null?_0x102ac1:_0x39bd26[_0x28365e(0x1b1)],'text':JSON[_0x28365e(0x1cc)](_0x39bd26[_0x28365e(0x1ab)]),'parentId':_0x3d2712['id']});break;}case v[_0x28365e(0x1b4)]:{const _0x595f1c=this['_threadCommentModel'][_0x28365e(0x1e1)](_0x277c8f,_0x3d2c1a,_0x39bd26[_0x28365e(0x197)]);_0x595f1c&&_0x595f1c[_0x28365e(0x1cf)]&&this['_threadCommentModel'][_0x28365e(0x189)](_0x277c8f,_0x3d2c1a,_0x39bd26[_0x28365e(0x197)]);break;}case v[_0x28365e(0x177)]:{this[_0x28365e(0x1a3)][_0x28365e(0x1dd)](_0x277c8f,_0x3d2c1a,{'commentId':_0x39bd26[_0x28365e(0x197)],'text':JSON['parse'](_0x39bd26[_0x28365e(0x1ab)])});break;}case v[_0x28365e(0x182)]:{const _0x5f3bef=(_0x10ae2e=this[_0x28365e(0x1a3)]['getUnit'](_0x39bd26[_0x28365e(0x1c1)])[_0x28365e(0x199)](_0x208ad0=>_0x208ad0['threadId']===_0x39bd26[_0x28365e(0x1d2)]))==null?void 0x0:_0x10ae2e[_0x28365e(0x198)];_0x5f3bef&&this[_0x28365e(0x1a3)][_0x28365e(0x17a)](_0x277c8f,_0x3d2c1a,_0x5f3bef['id'],_0x39bd26[_0x28365e(0x1c7)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x550f8f(0x190)](b[_0x550f8f(0x194)])),S(0x1,c[_0x550f8f(0x190)](M[_0x550f8f(0x1e4)])),S(0x2,c[_0x550f8f(0x190)](c[_0x550f8f(0x1e8)])),S(0x3,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)]))],p);const q=_0x550f8f(0x196),D={};var A=Object[_0x550f8f(0x18f)],x=(_0x5633b1,_0x4212e2,_0x11b7bb,_0x11ac6c)=>{const _0x1ebdfd=_0x550f8f;for(var _0x2e472e=_0x11ac6c>0x1?void 0x0:_0x11ac6c?A(_0x4212e2,_0x11b7bb):_0x4212e2,_0x37efe9=_0x5633b1[_0x1ebdfd(0x1cd)]-0x1,_0x4540f9;_0x37efe9>=0x0;_0x37efe9--)(_0x4540f9=_0x5633b1[_0x37efe9])&&(_0x2e472e=_0x4540f9(_0x2e472e)||_0x2e472e);return _0x2e472e;},_=(_0x2f2217,_0x241cca)=>(_0x5df383,_0x375ca3)=>_0x241cca(_0x5df383,_0x375ca3,_0x2f2217);function Y(_0x701584,_0x31e529){const _0x5a1b94=_0x550f8f,_0x47007f=_0x701584[_0x5a1b94(0x1bd)][0x0];return{..._0x31e529,'id':_0x47007f['replyId'],'resolved':_0x701584[_0x5a1b94(0x1c7)]===0x1,'dT':f(_0x47007f[_0x5a1b94(0x18d)]),'personId':_0x47007f['userId'],'threadId':_0x47007f[_0x5a1b94(0x1d2)]};}function G(_0x1795f1,_0x1775af,_0x5a7fe7){const _0x3531ce=_0x550f8f;var _0x2ffe06,_0x88146d;if(((_0x88146d=(_0x2ffe06=_0x1795f1==null?void 0x0:_0x1795f1[_0x3531ce(0x1bd)])==null?void 0x0:_0x2ffe06[_0x3531ce(0x1cd)])!=null?_0x88146d:0x0)>0x0){const _0x5641ab=(_0x3af926,_0x46cd29)=>({'id':_0x3af926[_0x3531ce(0x197)],'threadId':_0x3af926['threadId'],'dT':f(_0x3af926['createTimestamp']),'personId':_0x3af926[_0x3531ce(0x1b1)],'resolved':_0x1795f1[_0x3531ce(0x1c7)]===I[_0x3531ce(0x1c4)],'unitId':_0x1775af,'subUnitId':_0x5a7fe7,'text':JSON[_0x3531ce(0x1cc)](_0x3af926[_0x3531ce(0x1ab)]),'parentId':_0x46cd29}),_0x252cb7=_0x5641ab(_0x1795f1['replies'][0x0]);return{..._0x252cb7,'children':_0x1795f1[_0x3531ce(0x1bd)][_0x3531ce(0x181)](0x1)['map'](_0x69a63b=>_0x5641ab(_0x69a63b,_0x252cb7['id']))};}return null;}let g=class{constructor(_0x211761,_0x4f5417,_0x5d469c,_0x3761c8){const _0x5eca9a=_0x550f8f;this[_0x5eca9a(0x1d3)]=_0x211761,this[_0x5eca9a(0x173)]=_0x4f5417,this['_sessionService']=_0x5d469c,this[_0x5eca9a(0x1c5)]=_0x3761c8;}async[_0x550f8f(0x176)](_0x4bf04d){const _0x387939=_0x550f8f;var _0x57767c,_0x53742c;const {parentId:_0x50d325,unitId:_0x51d5ca,text:_0x27e977,threadId:_0x558578}=_0x4bf04d,_0x23746b=(_0x53742c=(_0x57767c=_0x27e977['customRanges'])==null?void 0x0:_0x57767c['filter'](_0x3c55cc=>_0x3c55cc[_0x387939(0x1a0)]===c[_0x387939(0x193)]['COMMENT'])[_0x387939(0x174)](_0xb8b47a=>_0xb8b47a[_0x387939(0x17c)]))!=null?_0x53742c:[],_0x30731b=JSON[_0x387939(0x1c2)](_0x27e977),_0x291b9d=(await this[_0x387939(0x1e3)][_0x387939(0x1ea)](_0x51d5ca))[_0x387939(0x19f)]();if(_0x50d325){const _0xebef81={'memberId':_0x291b9d,'unitId':_0x51d5ca,'content':_0x30731b,'mention':_0x23746b,'threadId':_0x558578},_0x5d32e3=(await this[_0x387939(0x1d3)][_0x387939(0x1e5)](_0x387939(0x1d0)+_0x51d5ca+'/reply',{'body':_0xebef81}))[_0x387939(0x179)]['reply'];return{..._0x4bf04d,'id':_0x5d32e3[_0x387939(0x197)],'dT':c[_0x387939(0x195)](+_0x5d32e3[_0x387939(0x18d)])[_0x387939(0x18a)](_0x387939(0x19c)),'personId':_0x5d32e3['userId']};}else{const _0x2c129e={'memberId':_0x291b9d,'unitId':_0x51d5ca,'content':_0x30731b,'mention':_0x23746b},_0x2967fe=await this[_0x387939(0x1d3)][_0x387939(0x1e5)](_0x387939(0x1d0)+_0x51d5ca+_0x387939(0x1de),{'body':_0x2c129e});return Y(_0x2967fe['body']['comment'],_0x4bf04d);}}async[_0x550f8f(0x1dd)](_0x26f31b){const _0x4396b3=_0x550f8f;var _0x2f34e7,_0x4412d7;const {text:_0x2a00e9,unitId:_0x617843}=_0x26f31b,_0x19b685=(_0x4412d7=(_0x2f34e7=_0x2a00e9[_0x4396b3(0x1d6)])==null?void 0x0:_0x2f34e7[_0x4396b3(0x1bb)](_0x57c057=>_0x57c057[_0x4396b3(0x1a0)]===c[_0x4396b3(0x193)]['COMMENT'])[_0x4396b3(0x174)](_0x5c24b2=>_0x5c24b2[_0x4396b3(0x17c)]))!=null?_0x4412d7:[],_0x1dadf0=JSON[_0x4396b3(0x1c2)](_0x2a00e9),_0x403751=_0x26f31b['threadId'],_0x29d5f2=_0x26f31b['id'],_0x3c0333={'memberId':(await this[_0x4396b3(0x1e3)][_0x4396b3(0x1ea)](_0x617843))[_0x4396b3(0x19f)](),'unitId':_0x617843,'threadId':_0x403751,'mention':_0x19b685,'content':_0x1dadf0,'replyId':_0x29d5f2},_0x2c16c6=await this[_0x4396b3(0x1d3)]['post']('/universer-api/comment/unit/'+_0x617843+_0x4396b3(0x1c6),{'body':_0x3c0333});return!_0x2c16c6[_0x4396b3(0x179)]['error']||_0x2c16c6[_0x4396b3(0x179)][_0x4396b3(0x171)][_0x4396b3(0x1a7)]===0x1;}async[_0x550f8f(0x17a)](_0x5cb97c){const _0x2ac657=_0x550f8f,{unitId:_0xe72d8b}=_0x5cb97c,_0x55971f=_0x5cb97c[_0x2ac657(0x1d2)],_0x495107={'memberId':this[_0x2ac657(0x173)][_0x2ac657(0x1a4)]()[_0x2ac657(0x1a9)],'unitId':_0xe72d8b,'threadId':_0x55971f,'solved':_0x5cb97c['resolved']?I[_0x2ac657(0x1c4)]:I[_0x2ac657(0x1d1)]},_0x2d6ca8=await this[_0x2ac657(0x1d3)][_0x2ac657(0x1e5)]('/universer-api/comment/unit/'+_0xe72d8b+_0x2ac657(0x1a1),{'body':_0x495107});return!_0x2d6ca8[_0x2ac657(0x179)][_0x2ac657(0x171)]||_0x2d6ca8['body'][_0x2ac657(0x171)][_0x2ac657(0x1a7)]===0x1;}async['deleteComment'](_0x4ff6a5,_0x2f602d,_0x2e7bae,_0x1a0e9a){const _0x3490ce=_0x550f8f,_0x4a2f46={'memberId':(await this[_0x3490ce(0x1e3)][_0x3490ce(0x1ea)](_0x4ff6a5))[_0x3490ce(0x19f)](),'threadId':_0x2e7bae,'replyId':_0x1a0e9a,'unitId':_0x4ff6a5},_0x5c4844=await this[_0x3490ce(0x1d3)][_0x3490ce(0x1e5)](_0x3490ce(0x1d0)+_0x4ff6a5+'/delete',{'body':_0x4a2f46});return!_0x5c4844['body']['error']||_0x5c4844[_0x3490ce(0x179)]['error'][_0x3490ce(0x1a7)]===0x1;}async[_0x550f8f(0x1e9)](_0x39995b,_0x530725,_0x2da4e0){const _0x41d8c2=_0x550f8f,_0x11452e={'unitId':_0x39995b,'threadId':_0x2da4e0},_0x2ff36a=await this[_0x41d8c2(0x1d3)]['post'](_0x41d8c2(0x1d0)+_0x39995b+_0x41d8c2(0x175),{'body':_0x11452e}),_0x21e340=_0x2da4e0[_0x41d8c2(0x174)](_0x2b2d68=>G(_0x2ff36a[_0x41d8c2(0x179)][_0x41d8c2(0x185)][_0x2b2d68],_0x39995b,_0x530725))[_0x41d8c2(0x1bb)](Boolean);return Object[_0x41d8c2(0x178)](_0x2ff36a['body'][_0x41d8c2(0x18c)])[_0x41d8c2(0x191)](_0x39626b=>{const _0x314c02=_0x41d8c2;this[_0x314c02(0x173)][_0x314c02(0x1c8)](_0x39626b);}),_0x21e340;}[_0x550f8f(0x1b7)](_0x3b35aa){const _0x24eaec=_0x550f8f;return{'id':_0x3b35aa['id'],'threadId':_0x3b35aa[_0x24eaec(0x1d2)],'ref':_0x3b35aa[_0x24eaec(0x1af)]};}};g=x([_(0x0,c[_0x550f8f(0x190)](P[_0x550f8f(0x17f)])),_(0x1,c['Inject'](c[_0x550f8f(0x1e8)])),_(0x2,c[_0x550f8f(0x190)](b['CollaborationSessionService'])),_(0x3,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)]))],g);function _0x1f31(){const _0x5c7989=['thread-comment-data-source.config','replyId','root','find','_threadCommentDataSourceService','disposeWithMe','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','_commentService','getMemberID','rangeType','/solved','type','_threadCommentModel','getCurrentUser','28543OjJWYh','102iPkFuZ','code','_config','userID','merge','content','size','dataSource','add','ref','Reply','userId','_init','UniverInstanceType','Delete','767388xedQYw','pipe','saveCommentToSnapshot','@univerjs-pro/license','@univerjs/thread-comment','Injector','filter','delete','replies','toStringTag','85DwmFte','get','unitId','stringify','rxjs','Solved','_injector','/edit','solved','addUser','_threadCommentDataSource','_initUserSync','DependentOn','parse','length','IConfigService','parentId','/universer-api/comment/unit/','OpenOrReOpen','threadId','_httpService','syncUpdateMutationToColla','setConfig','customRanges','1422276TADlVP','14470uzchtP','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','_initDataSource','UNIVER_UNKNOWN','updateComment','/add','personId','Disposable','getComment','Module','_sessionService','ThreadCommentModel','post','onStarting','84973ecCbfX','UserManagerService','listComments','requireSession','IThreadCommentDataSourceService','error','Add','_userService','map','/list','addComment','Edit','values','body','resolveComment','277688UVpbOU','rangeId','UniverThreadCommentUIPlugin','63DOuhRI','HTTPService','@univerjs/core','slice','Solve','pluginName','6006ETlati','comments','1370392rVavZv','@univerjs/network','UniverThreadCommentDataSourcePlugin','deleteComment','format','@univerjs-pro/collaboration-client','users','createTimestamp','Plugin','getOwnPropertyDescriptor','Inject','forEach','getUser','CustomRangeType','CommentService','dayjs'];_0x1f31=function(){return _0x5c7989;};return _0x1f31();}var H=Object[_0x550f8f(0x18f)],J=(_0x372dd8,_0x4dfc45,_0x1e754a,_0x3de2c1)=>{const _0x595a1c=_0x550f8f;for(var _0x189436=_0x3de2c1>0x1?void 0x0:_0x3de2c1?H(_0x4dfc45,_0x1e754a):_0x4dfc45,_0x4906fe=_0x372dd8[_0x595a1c(0x1cd)]-0x1,_0x3aeba2;_0x4906fe>=0x0;_0x4906fe--)(_0x3aeba2=_0x372dd8[_0x4906fe])&&(_0x189436=_0x3aeba2(_0x189436)||_0x189436);return _0x189436;},y=(_0x5b7b46,_0x2a702c)=>(_0x4637ec,_0x2fd4d6)=>_0x2a702c(_0x4637ec,_0x2fd4d6,_0x5b7b46);let C=class extends c[_0x550f8f(0x1e0)]{constructor(_0x58f959,_0x4e153d){const _0x185202=_0x550f8f;super(),this[_0x185202(0x19a)]=_0x58f959,this[_0x185202(0x1c9)]=_0x4e153d,this[_0x185202(0x1db)]();}[_0x550f8f(0x1db)](){const _0x2dc39d=_0x550f8f;this['_threadCommentDataSourceService'][_0x2dc39d(0x1ad)]=this[_0x2dc39d(0x1c9)],this['_threadCommentDataSourceService'][_0x2dc39d(0x1d4)]=!0x1;}};C=J([y(0x0,M[_0x550f8f(0x170)]),y(0x1,c[_0x550f8f(0x190)](g))],C);var F=Object['defineProperty'],L=Object[_0x550f8f(0x18f)],Z=(_0x43b806,_0x418197,_0x30416c)=>_0x418197 in _0x43b806?F(_0x43b806,_0x418197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30416c}):_0x43b806[_0x418197]=_0x30416c,W=(_0x551e0c,_0x37661c,_0x37ba72,_0x4c7272)=>{const _0x4b711c=_0x550f8f;for(var _0x523705=_0x4c7272>0x1?void 0x0:_0x4c7272?L(_0x37661c,_0x37ba72):_0x37661c,_0x421a52=_0x551e0c[_0x4b711c(0x1cd)]-0x1,_0x36fe95;_0x421a52>=0x0;_0x421a52--)(_0x36fe95=_0x551e0c[_0x421a52])&&(_0x523705=_0x36fe95(_0x523705)||_0x523705);return _0x523705;},O=(_0x27bd84,_0x58de60)=>(_0x55aa43,_0x53f77d)=>_0x58de60(_0x55aa43,_0x53f77d,_0x27bd84),N=(_0x34f294,_0x2aa696,_0x45652a)=>Z(_0x34f294,typeof _0x2aa696!='symbol'?_0x2aa696+'':_0x2aa696,_0x45652a);function _0x4086(_0x2ee372,_0x2f9e8f){const _0x1f3141=_0x1f31();return _0x4086=function(_0x408628,_0x46a36b){_0x408628=_0x408628-0x170;let _0x48c607=_0x1f3141[_0x408628];return _0x48c607;},_0x4086(_0x2ee372,_0x2f9e8f);}exports[_0x550f8f(0x188)]=class extends c[_0x550f8f(0x18e)]{constructor(_0x3e9d56=D,_0x5f1916,_0x8ed6cd){const _0x2f5ed1=_0x550f8f;super(),this[_0x2f5ed1(0x1a8)]=_0x3e9d56,this[_0x2f5ed1(0x1c5)]=_0x5f1916,this['_configService']=_0x8ed6cd;const {..._0x201338}=c[_0x2f5ed1(0x1aa)]({},D,this[_0x2f5ed1(0x1a8)]);this['_configService'][_0x2f5ed1(0x1d5)](q,_0x201338);}[_0x550f8f(0x1e6)](){const _0x505cdb=_0x550f8f;[[g],[C],[p]][_0x505cdb(0x191)](_0x4713c9=>{const _0x4e548a=_0x505cdb;this['_injector'][_0x4e548a(0x1ae)](_0x4713c9);});}['onReady'](){const _0x497e67=_0x550f8f;this[_0x497e67(0x1c5)][_0x497e67(0x1c0)](C),this[_0x497e67(0x1c5)][_0x497e67(0x1c0)](p);}},N(exports[_0x550f8f(0x188)],_0x550f8f(0x183),U),N(exports[_0x550f8f(0x188)],_0x550f8f(0x1a2),c[_0x550f8f(0x1b3)][_0x550f8f(0x1dc)]),exports[_0x550f8f(0x188)]=W([c[_0x550f8f(0x1cb)](j[_0x550f8f(0x17d)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)])),O(0x2,c[_0x550f8f(0x1ce)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x2b5267=_0x2d27;(function(_0x2635fb,_0x4af38e){const _0x5f59c8=_0x2d27,_0x96a2c0=_0x2635fb();while(!![]){try{const _0x2d40f5=-parseInt(_0x5f59c8(0xf0))/0x1*(-parseInt(_0x5f59c8(0x99))/0x2)+parseInt(_0x5f59c8(0x93))/0x3*(-parseInt(_0x5f59c8(0x9e))/0x4)+-parseInt(_0x5f59c8(0xfb))/0x5+parseInt(_0x5f59c8(0xec))/0x6*(-parseInt(_0x5f59c8(0xca))/0x7)+parseInt(_0x5f59c8(0xdb))/0x8*(parseInt(_0x5f59c8(0xee))/0x9)+-parseInt(_0x5f59c8(0xa1))/0xa+parseInt(_0x5f59c8(0x85))/0xb;if(_0x2d40f5===_0x4af38e)break;else _0x96a2c0['push'](_0x96a2c0['shift']());}catch(_0xbdf70a){_0x96a2c0['push'](_0x96a2c0['shift']());}}}(_0x35a4,0xaf116));function _0x2d27(_0x1267a5,_0x56d8f7){const _0x35a49f=_0x35a4();return _0x2d27=function(_0x2d2753,_0x50b969){_0x2d2753=_0x2d2753-0x7f;let _0x1b4de7=_0x35a49f[_0x2d2753];return _0x1b4de7;},_0x2d27(_0x1267a5,_0x56d8f7);}Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x2b5267(0xf6)});const b=require(_0x2b5267(0xdd)),T=require(_0x2b5267(0xc5)),c=require(_0x2b5267(0xe3)),j=require(_0x2b5267(0xb4)),M=require(_0x2b5267(0xdf)),w=require(_0x2b5267(0xae)),P=require(_0x2b5267(0xa2)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3e7fd0=>(_0x3e7fd0[_0x3e7fd0[_0x2b5267(0xe7)]=0x0]='OpenOrReOpen',_0x3e7fd0[_0x3e7fd0[_0x2b5267(0x84)]=0x1]=_0x2b5267(0x84),_0x3e7fd0[_0x3e7fd0[_0x2b5267(0xfd)]=-0x1]='UNRECOGNIZED',_0x3e7fd0))(I||{}),v=(_0x511113=>(_0x511113[_0x511113['Unknown']=0x0]=_0x2b5267(0xfa),_0x511113[_0x511113[_0x2b5267(0xc8)]=0x1]=_0x2b5267(0xc8),_0x511113[_0x511113[_0x2b5267(0xcf)]=0x2]=_0x2b5267(0xcf),_0x511113[_0x511113[_0x2b5267(0x91)]=0x3]=_0x2b5267(0x91),_0x511113[_0x511113['Delete']=0x4]=_0x2b5267(0xab),_0x511113[_0x511113[_0x2b5267(0xa4)]=0x5]=_0x2b5267(0xa4),_0x511113[_0x511113[_0x2b5267(0xfd)]=-0x1]=_0x2b5267(0xfd),_0x511113))(v||{});const f=_0x24e0a1=>c[_0x2b5267(0xac)](new Date(+_0x24e0a1))[_0x2b5267(0xbc)](_0x2b5267(0xce)),R=async(_0x1d7f66,_0x3d0c97)=>{const _0x6de758=_0x2b5267,_0x453032=_0x1d7f66[_0x6de758(0xd9)](c[_0x6de758(0xb8)]),_0x2fde3b=_0x1d7f66[_0x6de758(0xd9)](P[_0x6de758(0x92)]);_0x3d0c97['forEach'](_0x5dffc9=>{const _0x507ef2=_0x6de758;_0x453032[_0x507ef2(0xd1)](_0x5dffc9)&&_0x3d0c97[_0x507ef2(0xc1)](_0x5dffc9);}),_0x3d0c97[_0x6de758(0xb0)]&&(await _0x2fde3b[_0x6de758(0xd9)](_0x6de758(0xc9),{'params':{'userIDs':[..._0x3d0c97]}}))[_0x6de758(0xf5)]['users']['forEach'](_0x5188ae=>{const _0xfb590f=_0x6de758;_0x5188ae&&_0x453032[_0xfb590f(0xd6)](_0x5188ae);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4a83a4,_0x377f09,_0x1be9e2,_0x12d22b)=>{for(var _0x278387=_0x12d22b>0x1?void 0x0:_0x12d22b?$(_0x377f09,_0x1be9e2):_0x377f09,_0x424b2=_0x4a83a4['length']-0x1,_0x31d81a;_0x424b2>=0x0;_0x424b2--)(_0x31d81a=_0x4a83a4[_0x424b2])&&(_0x278387=_0x31d81a(_0x278387)||_0x278387);return _0x278387;},S=(_0x499d9b,_0xd26bc1)=>(_0x1c9ce9,_0x4ed834)=>_0xd26bc1(_0x1c9ce9,_0x4ed834,_0x499d9b);let p=class extends c[_0x2b5267(0x9c)]{constructor(_0x10259a,_0xdc2892,_0x3012fc,_0x31fd81){const _0x1a34d7=_0x2b5267;super(),this[_0x1a34d7(0x82)]=_0x10259a,this[_0x1a34d7(0x83)]=_0xdc2892,this[_0x1a34d7(0x90)]=_0x3012fc,this[_0x1a34d7(0xd2)]=_0x31fd81,this['_init'](),this['_initUserSync']();}[_0x2b5267(0x8d)](){const _0x2c8b6d=_0x2b5267;this[_0x2c8b6d(0xe9)](this[_0x2c8b6d(0x83)][_0x2c8b6d(0xbb)]['pipe'](w[_0x2c8b6d(0xed)](0x10))['subscribe'](_0x2a0a5b=>{const _0x197a04=_0x2c8b6d,_0x37afda=new Set();_0x2a0a5b[_0x197a04(0x8e)](_0x3e9400=>{const _0x5d3d92=_0x197a04;switch(_0x3e9400['type']){case _0x5d3d92(0x8b):{const _0x290693=_0x3e9400[_0x5d3d92(0xe4)][_0x5d3d92(0x9b)];_0x37afda[_0x5d3d92(0x8b)](_0x290693);break;}}}),R(this[_0x197a04(0xd2)],_0x37afda);}));}[_0x2b5267(0x8a)](){const _0x43b8f1=_0x2b5267;this[_0x43b8f1(0xe9)](this[_0x43b8f1(0x82)]['commentUpdate$'][_0x43b8f1(0x9f)](async _0x3be956=>{const _0x3ccf76=_0x43b8f1;var _0x4eefad,_0x58b2a0,_0x34190e,_0x5a39d4;const _0x30a7d3=(_0x4eefad=this[_0x3ccf76(0x83)][_0x3ccf76(0x8c)](_0x3be956[_0x3ccf76(0xb7)])['find'](_0x1442e6=>_0x1442e6[_0x3ccf76(0x104)]===_0x3be956[_0x3ccf76(0x104)]))==null?void 0x0:_0x4eefad[_0x3ccf76(0x102)];if(!_0x30a7d3)return;const {unitId:_0x350f1f,subUnitId:_0x81b8fc}=_0x30a7d3;switch(_0x3be956['user']&&this[_0x3ccf76(0x90)]['addUser'](_0x3be956[_0x3ccf76(0xc0)]),_0x3be956[_0x3ccf76(0xd4)]){case v['Add']:break;case v[_0x3ccf76(0xcf)]:{this[_0x3ccf76(0x83)][_0x3ccf76(0xbe)](_0x350f1f,_0x81b8fc,{'unitId':_0x350f1f,'subUnitId':_0x81b8fc,'ref':'','id':_0x3be956['replyId'],'dT':f(+_0x3be956[_0x3ccf76(0xd3)]),'threadId':_0x3be956[_0x3ccf76(0x104)],'personId':(_0x34190e=(_0x58b2a0=_0x3be956[_0x3ccf76(0xc0)])==null?void 0x0:_0x58b2a0[_0x3ccf76(0x88)])!=null?_0x34190e:_0x3be956[_0x3ccf76(0xbd)],'text':JSON[_0x3ccf76(0xbf)](_0x3be956[_0x3ccf76(0xaa)]),'parentId':_0x30a7d3['id']});break;}case v[_0x3ccf76(0xab)]:{const _0x511383=this['_threadCommentModel'][_0x3ccf76(0xf3)](_0x350f1f,_0x81b8fc,_0x3be956[_0x3ccf76(0x87)]);_0x511383&&_0x511383[_0x3ccf76(0xb1)]&&this[_0x3ccf76(0x83)][_0x3ccf76(0xa5)](_0x350f1f,_0x81b8fc,_0x3be956[_0x3ccf76(0x87)]);break;}case v[_0x3ccf76(0x91)]:{this[_0x3ccf76(0x83)][_0x3ccf76(0x89)](_0x350f1f,_0x81b8fc,{'commentId':_0x3be956['replyId'],'text':JSON[_0x3ccf76(0xbf)](_0x3be956[_0x3ccf76(0xaa)])});break;}case v[_0x3ccf76(0xa4)]:{const _0x3e7222=(_0x5a39d4=this[_0x3ccf76(0x83)][_0x3ccf76(0x8c)](_0x3be956['unitId'])[_0x3ccf76(0xb5)](_0x547979=>_0x547979[_0x3ccf76(0x104)]===_0x3be956['threadId']))==null?void 0x0:_0x5a39d4[_0x3ccf76(0x102)];_0x3e7222&&this['_threadCommentModel'][_0x3ccf76(0xc4)](_0x350f1f,_0x81b8fc,_0x3e7222['id'],_0x3be956[_0x3ccf76(0xa7)]===I[_0x3ccf76(0x84)]);break;}}}));}};p=E([S(0x0,c[_0x2b5267(0xf7)](b[_0x2b5267(0xb3)])),S(0x1,c[_0x2b5267(0xf7)](M[_0x2b5267(0x9a)])),S(0x2,c[_0x2b5267(0xf7)](c[_0x2b5267(0xb8)])),S(0x3,c[_0x2b5267(0xf7)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};function _0x35a4(){const _0x580727=['dataSource','/universer-api/comment/unit/','/list','root','values','threadId','UNIVER_UNKNOWN','post','_config','_commentService','_threadCommentModel','Solved','15303200PIBDiL','rangeType','replyId','userID','updateComment','_init','add','getUnit','_initUserSync','forEach','IThreadCommentDataSourceService','_userService','Edit','HTTPService','69YZgpVB','UniverInstanceType','getMemberID','stringify','/delete','comment','9928jnQYju','ThreadCommentModel','personId','Disposable','filter','231740XgjhUC','subscribe','map','7320740PjzSJh','@univerjs/network','_httpService','Solve','deleteComment','_sessionService','solved','Injector','setConfig','content','Delete','dayjs','resolved','rxjs','getOwnPropertyDescriptor','size','parentId','UniverCollaborationClientPlugin','CommentService','@univerjs/thread-comment-ui','find','/solved','unitId','UserManagerService','UniverLicensePlugin','users','commentUpdate$','format','userId','addComment','parse','user','delete','/edit','replies','resolveComment','@univerjs-pro/license','COMMENT','onStarting','Add','/universer-api/user/list','3073CrIhRI','merge','saveCommentToSnapshot','listComments','YYYY/MM/DD\x20HH:mm','Reply','_threadCommentDataSourceService','getUser','_injector','createTimestamp','type','rangeId','addUser','onReady','error','get','_configService','376pDoLuo','UniverThreadCommentUIPlugin','@univerjs-pro/collaboration-client','length','@univerjs/thread-comment','symbol','UniverThreadCommentDataSourcePlugin','_threadCommentDataSource','@univerjs/core','payload','CustomRangeType','comments','OpenOrReOpen','requireSession','disposeWithMe','Plugin','DependentOn','3822TZTzij','bufferTime','215613sjazwk','/add','118ldheTI','code','slice','getComment','_initDataSource','body','Module','Inject','defineProperty','pluginName','Unknown','208155qijfqL','CollaborationSessionService','UNRECOGNIZED','syncUpdateMutationToColla'];_0x35a4=function(){return _0x580727;};return _0x35a4();}var A=Object[_0x2b5267(0xaf)],x=(_0x3a6bec,_0x34a670,_0x168277,_0x656f4a)=>{const _0x29a337=_0x2b5267;for(var _0x49a4f0=_0x656f4a>0x1?void 0x0:_0x656f4a?A(_0x34a670,_0x168277):_0x34a670,_0x2640b0=_0x3a6bec[_0x29a337(0xde)]-0x1,_0x122b14;_0x2640b0>=0x0;_0x2640b0--)(_0x122b14=_0x3a6bec[_0x2640b0])&&(_0x49a4f0=_0x122b14(_0x49a4f0)||_0x49a4f0);return _0x49a4f0;},_=(_0x5b2df9,_0x46f830)=>(_0x5a0b8f,_0x5392f6)=>_0x46f830(_0x5a0b8f,_0x5392f6,_0x5b2df9);function Y(_0x3e755e,_0x59d1b4){const _0x2f47ea=_0x2b5267,_0x25b70a=_0x3e755e['replies'][0x0];return{..._0x59d1b4,'id':_0x25b70a[_0x2f47ea(0x87)],'resolved':_0x3e755e[_0x2f47ea(0xa7)]===0x1,'dT':f(_0x25b70a[_0x2f47ea(0xd3)]),'personId':_0x25b70a['userId'],'threadId':_0x25b70a[_0x2f47ea(0x104)]};}function G(_0x31de1d,_0x1e0224,_0x1d4dd1){const _0x29f6af=_0x2b5267;var _0x560ce3,_0x2a031f;if(((_0x2a031f=(_0x560ce3=_0x31de1d==null?void 0x0:_0x31de1d['replies'])==null?void 0x0:_0x560ce3[_0x29f6af(0xde)])!=null?_0x2a031f:0x0)>0x0){const _0x328a85=(_0x347b3f,_0x7d08f0)=>({'id':_0x347b3f[_0x29f6af(0x87)],'threadId':_0x347b3f['threadId'],'dT':f(_0x347b3f[_0x29f6af(0xd3)]),'personId':_0x347b3f[_0x29f6af(0xbd)],'resolved':_0x31de1d[_0x29f6af(0xa7)]===I[_0x29f6af(0x84)],'unitId':_0x1e0224,'subUnitId':_0x1d4dd1,'text':JSON['parse'](_0x347b3f[_0x29f6af(0xaa)]),'parentId':_0x7d08f0}),_0x4d1384=_0x328a85(_0x31de1d[_0x29f6af(0xc3)][0x0]);return{..._0x4d1384,'children':_0x31de1d[_0x29f6af(0xc3)][_0x29f6af(0xf2)](0x1)[_0x29f6af(0xa0)](_0x62c061=>_0x328a85(_0x62c061,_0x4d1384['id']))};}return null;}let g=class{constructor(_0x337604,_0x55310c,_0x44fc01,_0x1ba202){const _0x141238=_0x2b5267;this[_0x141238(0xa3)]=_0x337604,this[_0x141238(0x90)]=_0x55310c,this[_0x141238(0xa6)]=_0x44fc01,this[_0x141238(0xd2)]=_0x1ba202;}async[_0x2b5267(0xbe)](_0x2f6b8e){const _0x4ccf6e=_0x2b5267;var _0x578efc,_0x174607;const {parentId:_0x31bd57,unitId:_0x11d088,text:_0x5bffdc,threadId:_0x3ff7ee}=_0x2f6b8e,_0x5ae2b6=(_0x174607=(_0x578efc=_0x5bffdc['customRanges'])==null?void 0x0:_0x578efc['filter'](_0x84f5fa=>_0x84f5fa[_0x4ccf6e(0x86)]===c[_0x4ccf6e(0xe5)][_0x4ccf6e(0xc6)])['map'](_0x2d71d2=>_0x2d71d2[_0x4ccf6e(0xd5)]))!=null?_0x174607:[],_0x1350cf=JSON[_0x4ccf6e(0x96)](_0x5bffdc),_0x338145=(await this[_0x4ccf6e(0xa6)][_0x4ccf6e(0xe8)](_0x11d088))[_0x4ccf6e(0x95)]();if(_0x31bd57){const _0x3fccb8={'memberId':_0x338145,'unitId':_0x11d088,'content':_0x1350cf,'mention':_0x5ae2b6,'threadId':_0x3ff7ee},_0x2d74d2=(await this[_0x4ccf6e(0xa3)][_0x4ccf6e(0x80)](_0x4ccf6e(0x100)+_0x11d088+'/reply',{'body':_0x3fccb8}))[_0x4ccf6e(0xf5)]['reply'];return{..._0x2f6b8e,'id':_0x2d74d2[_0x4ccf6e(0x87)],'dT':c[_0x4ccf6e(0xac)](+_0x2d74d2[_0x4ccf6e(0xd3)])[_0x4ccf6e(0xbc)](_0x4ccf6e(0xce)),'personId':_0x2d74d2[_0x4ccf6e(0xbd)]};}else{const _0x3e0e6a={'memberId':_0x338145,'unitId':_0x11d088,'content':_0x1350cf,'mention':_0x5ae2b6},_0x5c3907=await this[_0x4ccf6e(0xa3)][_0x4ccf6e(0x80)](_0x4ccf6e(0x100)+_0x11d088+_0x4ccf6e(0xef),{'body':_0x3e0e6a});return Y(_0x5c3907[_0x4ccf6e(0xf5)][_0x4ccf6e(0x98)],_0x2f6b8e);}}async['updateComment'](_0x3abe74){const _0x4a1c9e=_0x2b5267;var _0x4693a4,_0x40157a;const {text:_0x44c9cc,unitId:_0x15e4ad}=_0x3abe74,_0x3a51cc=(_0x40157a=(_0x4693a4=_0x44c9cc['customRanges'])==null?void 0x0:_0x4693a4[_0x4a1c9e(0x9d)](_0x49cfc5=>_0x49cfc5[_0x4a1c9e(0x86)]===c[_0x4a1c9e(0xe5)][_0x4a1c9e(0xc6)])[_0x4a1c9e(0xa0)](_0x3708e2=>_0x3708e2['rangeId']))!=null?_0x40157a:[],_0x5ca66e=JSON[_0x4a1c9e(0x96)](_0x44c9cc),_0x2a29c1=_0x3abe74[_0x4a1c9e(0x104)],_0x51ee7c=_0x3abe74['id'],_0x9f0ee7={'memberId':(await this[_0x4a1c9e(0xa6)][_0x4a1c9e(0xe8)](_0x15e4ad))['getMemberID'](),'unitId':_0x15e4ad,'threadId':_0x2a29c1,'mention':_0x3a51cc,'content':_0x5ca66e,'replyId':_0x51ee7c},_0x27ea80=await this[_0x4a1c9e(0xa3)]['post']('/universer-api/comment/unit/'+_0x15e4ad+_0x4a1c9e(0xc2),{'body':_0x9f0ee7});return!_0x27ea80[_0x4a1c9e(0xf5)][_0x4a1c9e(0xd8)]||_0x27ea80[_0x4a1c9e(0xf5)][_0x4a1c9e(0xd8)][_0x4a1c9e(0xf1)]===0x1;}async[_0x2b5267(0xc4)](_0x26640c){const _0x4f7fd0=_0x2b5267,{unitId:_0x1a14d5}=_0x26640c,_0x5e76b4=_0x26640c[_0x4f7fd0(0x104)],_0x1a30d3={'memberId':this[_0x4f7fd0(0x90)]['getCurrentUser']()[_0x4f7fd0(0x88)],'unitId':_0x1a14d5,'threadId':_0x5e76b4,'solved':_0x26640c[_0x4f7fd0(0xad)]?I[_0x4f7fd0(0x84)]:I[_0x4f7fd0(0xe7)]},_0x5868a3=await this[_0x4f7fd0(0xa3)][_0x4f7fd0(0x80)](_0x4f7fd0(0x100)+_0x1a14d5+_0x4f7fd0(0xb6),{'body':_0x1a30d3});return!_0x5868a3[_0x4f7fd0(0xf5)][_0x4f7fd0(0xd8)]||_0x5868a3[_0x4f7fd0(0xf5)][_0x4f7fd0(0xd8)]['code']===0x1;}async[_0x2b5267(0xa5)](_0x1e32ac,_0xf17350,_0x1b2087,_0x7a429f){const _0xb1c89e=_0x2b5267,_0x247d0c={'memberId':(await this[_0xb1c89e(0xa6)][_0xb1c89e(0xe8)](_0x1e32ac))[_0xb1c89e(0x95)](),'threadId':_0x1b2087,'replyId':_0x7a429f,'unitId':_0x1e32ac},_0xe4a03b=await this[_0xb1c89e(0xa3)][_0xb1c89e(0x80)](_0xb1c89e(0x100)+_0x1e32ac+_0xb1c89e(0x97),{'body':_0x247d0c});return!_0xe4a03b[_0xb1c89e(0xf5)][_0xb1c89e(0xd8)]||_0xe4a03b[_0xb1c89e(0xf5)][_0xb1c89e(0xd8)][_0xb1c89e(0xf1)]===0x1;}async[_0x2b5267(0xcd)](_0x41e06e,_0x228d1b,_0x42b0fb){const _0x2f53b8=_0x2b5267,_0x4185d2={'unitId':_0x41e06e,'threadId':_0x42b0fb},_0x2d57a3=await this[_0x2f53b8(0xa3)][_0x2f53b8(0x80)]('/universer-api/comment/unit/'+_0x41e06e+_0x2f53b8(0x101),{'body':_0x4185d2}),_0xdeb055=_0x42b0fb[_0x2f53b8(0xa0)](_0x3fbc62=>G(_0x2d57a3[_0x2f53b8(0xf5)][_0x2f53b8(0xe6)][_0x3fbc62],_0x41e06e,_0x228d1b))[_0x2f53b8(0x9d)](Boolean);return Object[_0x2f53b8(0x103)](_0x2d57a3[_0x2f53b8(0xf5)][_0x2f53b8(0xba)])['forEach'](_0x16392d=>{const _0x3e067a=_0x2f53b8;this[_0x3e067a(0x90)][_0x3e067a(0xd6)](_0x16392d);}),_0xdeb055;}[_0x2b5267(0xcc)](_0x4cd555){return{'id':_0x4cd555['id'],'threadId':_0x4cd555['threadId'],'ref':_0x4cd555['ref']};}};g=x([_(0x0,c[_0x2b5267(0xf7)](P[_0x2b5267(0x92)])),_(0x1,c[_0x2b5267(0xf7)](c[_0x2b5267(0xb8)])),_(0x2,c[_0x2b5267(0xf7)](b[_0x2b5267(0xfc)])),_(0x3,c[_0x2b5267(0xf7)](c[_0x2b5267(0xa8)]))],g);var H=Object[_0x2b5267(0xaf)],J=(_0x422e37,_0x9e2846,_0x158950,_0x24937e)=>{const _0x5cd6a4=_0x2b5267;for(var _0x528b64=_0x24937e>0x1?void 0x0:_0x24937e?H(_0x9e2846,_0x158950):_0x9e2846,_0xdd3da=_0x422e37[_0x5cd6a4(0xde)]-0x1,_0x46b990;_0xdd3da>=0x0;_0xdd3da--)(_0x46b990=_0x422e37[_0xdd3da])&&(_0x528b64=_0x46b990(_0x528b64)||_0x528b64);return _0x528b64;},y=(_0xa5e8e,_0x53358a)=>(_0x208514,_0x581725)=>_0x53358a(_0x208514,_0x581725,_0xa5e8e);let C=class extends c['Disposable']{constructor(_0x2d72d2,_0x56b922){const _0x24da79=_0x2b5267;super(),this[_0x24da79(0xd0)]=_0x2d72d2,this[_0x24da79(0xe2)]=_0x56b922,this['_initDataSource']();}[_0x2b5267(0xf4)](){const _0x4f0e7d=_0x2b5267;this[_0x4f0e7d(0xd0)][_0x4f0e7d(0xff)]=this[_0x4f0e7d(0xe2)],this[_0x4f0e7d(0xd0)][_0x4f0e7d(0xfe)]=!0x1;}};C=J([y(0x0,M[_0x2b5267(0x8f)]),y(0x1,c[_0x2b5267(0xf7)](g))],C);var F=Object[_0x2b5267(0xf8)],L=Object['getOwnPropertyDescriptor'],Z=(_0x44e2f3,_0x44fba4,_0x514a6d)=>_0x44fba4 in _0x44e2f3?F(_0x44e2f3,_0x44fba4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x514a6d}):_0x44e2f3[_0x44fba4]=_0x514a6d,W=(_0xaa3792,_0x264932,_0x2a75ab,_0x7c2642)=>{const _0x4caef4=_0x2b5267;for(var _0xbccca5=_0x7c2642>0x1?void 0x0:_0x7c2642?L(_0x264932,_0x2a75ab):_0x264932,_0x345392=_0xaa3792[_0x4caef4(0xde)]-0x1,_0x5dd9df;_0x345392>=0x0;_0x345392--)(_0x5dd9df=_0xaa3792[_0x345392])&&(_0xbccca5=_0x5dd9df(_0xbccca5)||_0xbccca5);return _0xbccca5;},O=(_0x588335,_0x2dc868)=>(_0x5b171f,_0x925f37)=>_0x2dc868(_0x5b171f,_0x925f37,_0x588335),N=(_0x52190d,_0x26dc16,_0x1f1df0)=>Z(_0x52190d,typeof _0x26dc16!=_0x2b5267(0xe0)?_0x26dc16+'':_0x26dc16,_0x1f1df0);exports[_0x2b5267(0xe1)]=class extends c[_0x2b5267(0xea)]{constructor(_0x1f3a09=D,_0x2382ca,_0x3fe673){const _0x3872a7=_0x2b5267;super(),this[_0x3872a7(0x81)]=_0x1f3a09,this[_0x3872a7(0xd2)]=_0x2382ca,this[_0x3872a7(0xda)]=_0x3fe673;const {..._0x47dc7c}=c[_0x3872a7(0xcb)]({},D,this[_0x3872a7(0x81)]);this[_0x3872a7(0xda)][_0x3872a7(0xa9)](q,_0x47dc7c);}[_0x2b5267(0xc7)](){const _0x2a76fb=_0x2b5267;[[g],[C],[p]][_0x2a76fb(0x8e)](_0x512126=>{const _0x36f21c=_0x2a76fb;this[_0x36f21c(0xd2)][_0x36f21c(0x8b)](_0x512126);});}[_0x2b5267(0xd7)](){const _0x4c6d79=_0x2b5267;this[_0x4c6d79(0xd2)][_0x4c6d79(0xd9)](C),this[_0x4c6d79(0xd2)][_0x4c6d79(0xd9)](p);}},N(exports[_0x2b5267(0xe1)],_0x2b5267(0xf9),U),N(exports[_0x2b5267(0xe1)],_0x2b5267(0xd4),c[_0x2b5267(0x94)][_0x2b5267(0x7f)]),exports[_0x2b5267(0xe1)]=W([c[_0x2b5267(0xeb)](j[_0x2b5267(0xdc)],b[_0x2b5267(0xb2)],T[_0x2b5267(0xb9)]),O(0x1,c[_0x2b5267(0xf7)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x2b5267(0xe1)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x452a10=_0x23a3;(function(_0x54c6af,_0x34802e){const _0x1f534f=_0x23a3,_0x46424d=_0x54c6af();while(!![]){try{const _0x1a07d2=-parseInt(_0x1f534f(0x18e))/0x1+parseInt(_0x1f534f(0x18c))/0x2*(parseInt(_0x1f534f(0x1c5))/0x3)+-parseInt(_0x1f534f(0x1d0))/0x4+parseInt(_0x1f534f(0x1a4))/0x5+parseInt(_0x1f534f(0x192))/0x6*(-parseInt(_0x1f534f(0x18d))/0x7)+parseInt(_0x1f534f(0x196))/0x8+parseInt(_0x1f534f(0x18a))/0x9*(parseInt(_0x1f534f(0x1bb))/0xa);if(_0x1a07d2===_0x34802e)break;else _0x46424d['push'](_0x46424d['shift']());}catch(_0x31964f){_0x46424d['push'](_0x46424d['shift']());}}}(_0xd9c3,0xf17a4));import{CommentService as _0x438cd7,CollaborationSessionService as _0xd72ec9,UniverCollaborationClientPlugin as _0xde1e70}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ee855}from'@univerjs-pro/license';import{dayjs as _0x379e47,UserManagerService as _0x36868b,Inject as _0x4a7f4f,Injector as _0x23ae78,Disposable as _0x5258c6,CustomRangeType as _0x33a00d,UniverInstanceType as _0x69c418,DependentOn as _0x50d19f,IConfigService as _0x4d40ff,Plugin as _0x5405bc,merge as _0x3a041d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33a339}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cf6d5,IThreadCommentDataSourceService as _0x5683f2}from'@univerjs/thread-comment';import{bufferTime as _0x3dfe4a}from'rxjs';import{HTTPService as _0x51c5ba}from'@univerjs/network';const W=_0x452a10(0x1d9);function _0xd9c3(){const _0x17d676=['3449776bVFbWc','/list','_commentService','ref','Solved','deleteComment','resolved','payload','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','replies','rangeType','users','parse','saveCommentToSnapshot','Solve','userId','map','_threadCommentModel','_configService','/reply','pluginName','Unknown','length','7484571pSMVAC','_threadCommentDataSource','87528rXULTb','8953OlycNd','1223361AUZELr','solved','type','size','1128OEQSXI','subscribe','Delete','Add','8687584DaEyuK','filter','disposeWithMe','get','/universer-api/comment/unit/','addComment','updateComment','getComment','user','root','_sessionService','getUnit','forEach','threadId','2174870uTuRyu','getOwnPropertyDescriptor','add','stringify','_threadCommentDataSourceService','find','addUser','/add','unitId','OpenOrReOpen','replyId','_init','code','post','pipe','body','parentId','UNRECOGNIZED','delete','customRanges','symbol','createTimestamp','_userService','10ltRkDy','_config','error','reply','rangeId','format','_httpService','Reply','YYYY/MM/DD\x20HH:mm','Edit','66GxtFbg','onStarting','_initUserSync','commentUpdate$','userID','getMemberID','_initDataSource','comments','requireSession','content','/delete'];_0xd9c3=function(){return _0x17d676;};return _0xd9c3();}var I=(_0x39ba17=>(_0x39ba17[_0x39ba17[_0x452a10(0x1ad)]=0x0]=_0x452a10(0x1ad),_0x39ba17[_0x39ba17[_0x452a10(0x1d4)]=0x1]=_0x452a10(0x1d4),_0x39ba17[_0x39ba17[_0x452a10(0x1b5)]=-0x1]='UNRECOGNIZED',_0x39ba17))(I||{}),v=(_0x2df18e=>(_0x2df18e[_0x2df18e[_0x452a10(0x188)]=0x0]='Unknown',_0x2df18e[_0x2df18e[_0x452a10(0x195)]=0x1]=_0x452a10(0x195),_0x2df18e[_0x2df18e[_0x452a10(0x1c2)]=0x2]='Reply',_0x2df18e[_0x2df18e['Edit']=0x3]=_0x452a10(0x1c4),_0x2df18e[_0x2df18e[_0x452a10(0x194)]=0x4]=_0x452a10(0x194),_0x2df18e[_0x2df18e['Solve']=0x5]='Solve',_0x2df18e[_0x2df18e[_0x452a10(0x1b5)]=-0x1]=_0x452a10(0x1b5),_0x2df18e))(v||{});const D=_0xef17ca=>_0x379e47(new Date(+_0xef17ca))[_0x452a10(0x1c0)](_0x452a10(0x1c3)),B=async(_0x2c3ccf,_0x49bab7)=>{const _0x540d58=_0x452a10,_0x325d76=_0x2c3ccf[_0x540d58(0x199)](_0x36868b),_0x4b096f=_0x2c3ccf['get'](_0x51c5ba);_0x49bab7[_0x540d58(0x1a2)](_0x145507=>{const _0x371815=_0x540d58;_0x325d76['getUser'](_0x145507)&&_0x49bab7[_0x371815(0x1b6)](_0x145507);}),_0x49bab7[_0x540d58(0x191)]&&(await _0x4b096f[_0x540d58(0x199)]('/universer-api/user/list',{'params':{'userIDs':[..._0x49bab7]}}))[_0x540d58(0x1b3)][_0x540d58(0x1dd)]['forEach'](_0x31373e=>{_0x31373e&&_0x325d76['addUser'](_0x31373e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x410e06,_0x542e9c,_0x57b4c3,_0x1d92f9)=>{const _0xb5b627=_0x452a10;for(var _0x442e93=_0x1d92f9>0x1?void 0x0:_0x1d92f9?K(_0x542e9c,_0x57b4c3):_0x542e9c,_0x480d92=_0x410e06[_0xb5b627(0x189)]-0x1,_0x42b27e;_0x480d92>=0x0;_0x480d92--)(_0x42b27e=_0x410e06[_0x480d92])&&(_0x442e93=_0x42b27e(_0x442e93)||_0x442e93);return _0x442e93;},p=(_0x546212,_0x1aad00)=>(_0x5876f9,_0x79fbb8)=>_0x1aad00(_0x5876f9,_0x79fbb8,_0x546212);let S=class extends _0x5258c6{constructor(_0x1be225,_0x16e283,_0x21c8a5,_0x49f8b4){const _0x3248bb=_0x452a10;super(),this['_commentService']=_0x1be225,this[_0x3248bb(0x1e3)]=_0x16e283,this[_0x3248bb(0x1ba)]=_0x21c8a5,this['_injector']=_0x49f8b4,this[_0x3248bb(0x1af)](),this['_initUserSync']();}[_0x452a10(0x1c7)](){const _0x4d539a=_0x452a10;this[_0x4d539a(0x198)](this[_0x4d539a(0x1e3)][_0x4d539a(0x1c8)][_0x4d539a(0x1b2)](_0x3dfe4a(0x10))[_0x4d539a(0x193)](_0x1d1652=>{const _0x3d968b=_0x4d539a,_0x1b0e45=new Set();_0x1d1652[_0x3d968b(0x1a2)](_0x4ef1fc=>{const _0x2b6e9d=_0x3d968b;switch(_0x4ef1fc[_0x2b6e9d(0x190)]){case _0x2b6e9d(0x1a6):{const _0x414eb3=_0x4ef1fc[_0x2b6e9d(0x1d7)]['personId'];_0x1b0e45[_0x2b6e9d(0x1a6)](_0x414eb3);break;}}}),B(this[_0x3d968b(0x1da)],_0x1b0e45);}));}['_init'](){const _0x3bf3d7=_0x452a10;this[_0x3bf3d7(0x198)](this[_0x3bf3d7(0x1d2)]['commentUpdate$']['subscribe'](async _0x1d6bb0=>{const _0x1f94e9=_0x3bf3d7;var _0x762191,_0x22d4fe,_0x54dfb6,_0x5479f6;const _0x1b50fa=(_0x762191=this[_0x1f94e9(0x1e3)][_0x1f94e9(0x1a1)](_0x1d6bb0['unitId'])['find'](_0x330e30=>_0x330e30[_0x1f94e9(0x1a3)]===_0x1d6bb0[_0x1f94e9(0x1a3)]))==null?void 0x0:_0x762191[_0x1f94e9(0x19f)];if(!_0x1b50fa)return;const {unitId:_0x1ed351,subUnitId:_0x2c27fa}=_0x1b50fa;switch(_0x1d6bb0[_0x1f94e9(0x19e)]&&this[_0x1f94e9(0x1ba)][_0x1f94e9(0x1aa)](_0x1d6bb0['user']),_0x1d6bb0[_0x1f94e9(0x190)]){case v[_0x1f94e9(0x195)]:break;case v['Reply']:{this[_0x1f94e9(0x1e3)][_0x1f94e9(0x19b)](_0x1ed351,_0x2c27fa,{'unitId':_0x1ed351,'subUnitId':_0x2c27fa,'ref':'','id':_0x1d6bb0[_0x1f94e9(0x1ae)],'dT':D(+_0x1d6bb0['createTimestamp']),'threadId':_0x1d6bb0[_0x1f94e9(0x1a3)],'personId':(_0x54dfb6=(_0x22d4fe=_0x1d6bb0[_0x1f94e9(0x19e)])==null?void 0x0:_0x22d4fe[_0x1f94e9(0x1c9)])!=null?_0x54dfb6:_0x1d6bb0['userId'],'text':JSON['parse'](_0x1d6bb0[_0x1f94e9(0x1ce)]),'parentId':_0x1b50fa['id']});break;}case v[_0x1f94e9(0x194)]:{const _0x5cdc03=this['_threadCommentModel'][_0x1f94e9(0x19d)](_0x1ed351,_0x2c27fa,_0x1d6bb0['replyId']);_0x5cdc03&&_0x5cdc03[_0x1f94e9(0x1b4)]&&this['_threadCommentModel'][_0x1f94e9(0x1d5)](_0x1ed351,_0x2c27fa,_0x1d6bb0[_0x1f94e9(0x1ae)]);break;}case v[_0x1f94e9(0x1c4)]:{this[_0x1f94e9(0x1e3)]['updateComment'](_0x1ed351,_0x2c27fa,{'commentId':_0x1d6bb0[_0x1f94e9(0x1ae)],'text':JSON['parse'](_0x1d6bb0[_0x1f94e9(0x1ce)])});break;}case v[_0x1f94e9(0x1e0)]:{const _0x177b57=(_0x5479f6=this[_0x1f94e9(0x1e3)]['getUnit'](_0x1d6bb0[_0x1f94e9(0x1ac)])[_0x1f94e9(0x1a9)](_0x4d16e6=>_0x4d16e6[_0x1f94e9(0x1a3)]===_0x1d6bb0[_0x1f94e9(0x1a3)]))==null?void 0x0:_0x5479f6[_0x1f94e9(0x19f)];_0x177b57&&this[_0x1f94e9(0x1e3)]['resolveComment'](_0x1ed351,_0x2c27fa,_0x177b57['id'],_0x1d6bb0[_0x1f94e9(0x18f)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4a7f4f(_0x438cd7)),p(0x1,_0x4a7f4f(_0x3cf6d5)),p(0x2,_0x4a7f4f(_0x36868b)),p(0x3,_0x4a7f4f(_0x23ae78))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x452a10(0x1a5)],Q=(_0x1b4d7f,_0x5db1a5,_0x33fa33,_0x32c211)=>{for(var _0x4c5fbd=_0x32c211>0x1?void 0x0:_0x32c211?k(_0x5db1a5,_0x33fa33):_0x5db1a5,_0x31d16f=_0x1b4d7f['length']-0x1,_0xd2f9ec;_0x31d16f>=0x0;_0x31d16f--)(_0xd2f9ec=_0x1b4d7f[_0x31d16f])&&(_0x4c5fbd=_0xd2f9ec(_0x4c5fbd)||_0x4c5fbd);return _0x4c5fbd;},_=(_0x48186a,_0x376b3d)=>(_0x4be549,_0x1c771d)=>_0x376b3d(_0x4be549,_0x1c771d,_0x48186a);function _0x23a3(_0x18d3e4,_0x219b15){const _0xd9c357=_0xd9c3();return _0x23a3=function(_0x23a36c,_0xbff005){_0x23a36c=_0x23a36c-0x185;let _0x29cf32=_0xd9c357[_0x23a36c];return _0x29cf32;},_0x23a3(_0x18d3e4,_0x219b15);}function X(_0x2bdd58,_0xfd2ad6){const _0x1f69db=_0x452a10,_0x30c2e5=_0x2bdd58[_0x1f69db(0x1db)][0x0];return{..._0xfd2ad6,'id':_0x30c2e5['replyId'],'resolved':_0x2bdd58[_0x1f69db(0x18f)]===0x1,'dT':D(_0x30c2e5[_0x1f69db(0x1b9)]),'personId':_0x30c2e5[_0x1f69db(0x1e1)],'threadId':_0x30c2e5['threadId']};}function ee(_0x358279,_0x48283a,_0x2e01f1){const _0x4df5c9=_0x452a10;var _0x12ee3f,_0x12f1ae;if(((_0x12f1ae=(_0x12ee3f=_0x358279==null?void 0x0:_0x358279[_0x4df5c9(0x1db)])==null?void 0x0:_0x12ee3f[_0x4df5c9(0x189)])!=null?_0x12f1ae:0x0)>0x0){const _0x4a3623=(_0x34f2c2,_0x464aa0)=>({'id':_0x34f2c2['replyId'],'threadId':_0x34f2c2[_0x4df5c9(0x1a3)],'dT':D(_0x34f2c2[_0x4df5c9(0x1b9)]),'personId':_0x34f2c2['userId'],'resolved':_0x358279['solved']===I[_0x4df5c9(0x1d4)],'unitId':_0x48283a,'subUnitId':_0x2e01f1,'text':JSON[_0x4df5c9(0x1de)](_0x34f2c2[_0x4df5c9(0x1ce)]),'parentId':_0x464aa0}),_0x2d1305=_0x4a3623(_0x358279[_0x4df5c9(0x1db)][0x0]);return{..._0x2d1305,'children':_0x358279['replies']['slice'](0x1)[_0x4df5c9(0x1e2)](_0x56267d=>_0x4a3623(_0x56267d,_0x2d1305['id']))};}return null;}let f=class{constructor(_0x142c00,_0x570a33,_0x21bd64,_0x44fe7f){const _0x538440=_0x452a10;this[_0x538440(0x1c1)]=_0x142c00,this[_0x538440(0x1ba)]=_0x570a33,this[_0x538440(0x1a0)]=_0x21bd64,this[_0x538440(0x1da)]=_0x44fe7f;}async[_0x452a10(0x19b)](_0x39229e){const _0x5ec8de=_0x452a10;var _0x58947e,_0x452628;const {parentId:_0xa1d20d,unitId:_0x48c19b,text:_0x4544d0,threadId:_0x2f4076}=_0x39229e,_0x23bcbe=(_0x452628=(_0x58947e=_0x4544d0[_0x5ec8de(0x1b7)])==null?void 0x0:_0x58947e[_0x5ec8de(0x197)](_0x30b829=>_0x30b829['rangeType']===_0x33a00d['COMMENT'])[_0x5ec8de(0x1e2)](_0x36f8f6=>_0x36f8f6[_0x5ec8de(0x1bf)]))!=null?_0x452628:[],_0x30f247=JSON['stringify'](_0x4544d0),_0x20ee8d=(await this['_sessionService']['requireSession'](_0x48c19b))[_0x5ec8de(0x1ca)]();if(_0xa1d20d){const _0x3f0741={'memberId':_0x20ee8d,'unitId':_0x48c19b,'content':_0x30f247,'mention':_0x23bcbe,'threadId':_0x2f4076},_0x2fae6b=(await this[_0x5ec8de(0x1c1)][_0x5ec8de(0x1b1)](_0x5ec8de(0x19a)+_0x48c19b+_0x5ec8de(0x186),{'body':_0x3f0741}))['body'][_0x5ec8de(0x1be)];return{..._0x39229e,'id':_0x2fae6b[_0x5ec8de(0x1ae)],'dT':_0x379e47(+_0x2fae6b[_0x5ec8de(0x1b9)])[_0x5ec8de(0x1c0)](_0x5ec8de(0x1c3)),'personId':_0x2fae6b[_0x5ec8de(0x1e1)]};}else{const _0x276939={'memberId':_0x20ee8d,'unitId':_0x48c19b,'content':_0x30f247,'mention':_0x23bcbe},_0x2bb019=await this[_0x5ec8de(0x1c1)]['post'](_0x5ec8de(0x19a)+_0x48c19b+_0x5ec8de(0x1ab),{'body':_0x276939});return X(_0x2bb019[_0x5ec8de(0x1b3)]['comment'],_0x39229e);}}async[_0x452a10(0x19c)](_0x12997a){const _0x23d545=_0x452a10;var _0x24afe1,_0x576f75;const {text:_0x354852,unitId:_0x35c1d4}=_0x12997a,_0x45a710=(_0x576f75=(_0x24afe1=_0x354852[_0x23d545(0x1b7)])==null?void 0x0:_0x24afe1[_0x23d545(0x197)](_0x51c4c2=>_0x51c4c2[_0x23d545(0x1dc)]===_0x33a00d['COMMENT'])[_0x23d545(0x1e2)](_0x50da2b=>_0x50da2b[_0x23d545(0x1bf)]))!=null?_0x576f75:[],_0x1afe26=JSON[_0x23d545(0x1a7)](_0x354852),_0x3b9ff9=_0x12997a[_0x23d545(0x1a3)],_0x3606d8=_0x12997a['id'],_0xaa494d={'memberId':(await this[_0x23d545(0x1a0)][_0x23d545(0x1cd)](_0x35c1d4))[_0x23d545(0x1ca)](),'unitId':_0x35c1d4,'threadId':_0x3b9ff9,'mention':_0x45a710,'content':_0x1afe26,'replyId':_0x3606d8},_0x4c74ae=await this['_httpService'][_0x23d545(0x1b1)](_0x23d545(0x19a)+_0x35c1d4+'/edit',{'body':_0xaa494d});return!_0x4c74ae[_0x23d545(0x1b3)][_0x23d545(0x1bd)]||_0x4c74ae['body'][_0x23d545(0x1bd)]['code']===0x1;}async['resolveComment'](_0x4bb946){const _0x32ea21=_0x452a10,{unitId:_0x11a1b4}=_0x4bb946,_0x5d4262=_0x4bb946[_0x32ea21(0x1a3)],_0x152d06={'memberId':this[_0x32ea21(0x1ba)]['getCurrentUser']()['userID'],'unitId':_0x11a1b4,'threadId':_0x5d4262,'solved':_0x4bb946[_0x32ea21(0x1d6)]?I[_0x32ea21(0x1d4)]:I[_0x32ea21(0x1ad)]},_0x5814a1=await this['_httpService'][_0x32ea21(0x1b1)](_0x32ea21(0x19a)+_0x11a1b4+_0x32ea21(0x1d8),{'body':_0x152d06});return!_0x5814a1[_0x32ea21(0x1b3)][_0x32ea21(0x1bd)]||_0x5814a1[_0x32ea21(0x1b3)]['error'][_0x32ea21(0x1b0)]===0x1;}async[_0x452a10(0x1d5)](_0x99088d,_0x2614df,_0x4fa98b,_0x3fd877){const _0x53813a=_0x452a10,_0x55957b={'memberId':(await this['_sessionService'][_0x53813a(0x1cd)](_0x99088d))[_0x53813a(0x1ca)](),'threadId':_0x4fa98b,'replyId':_0x3fd877,'unitId':_0x99088d},_0x5dccf0=await this[_0x53813a(0x1c1)]['post'](_0x53813a(0x19a)+_0x99088d+_0x53813a(0x1cf),{'body':_0x55957b});return!_0x5dccf0['body']['error']||_0x5dccf0[_0x53813a(0x1b3)]['error'][_0x53813a(0x1b0)]===0x1;}async['listComments'](_0x24fe12,_0x567744,_0x484c15){const _0x1d325d=_0x452a10,_0x238391={'unitId':_0x24fe12,'threadId':_0x484c15},_0x15a652=await this[_0x1d325d(0x1c1)][_0x1d325d(0x1b1)]('/universer-api/comment/unit/'+_0x24fe12+_0x1d325d(0x1d1),{'body':_0x238391}),_0x1e121a=_0x484c15[_0x1d325d(0x1e2)](_0x269b9a=>ee(_0x15a652[_0x1d325d(0x1b3)][_0x1d325d(0x1cc)][_0x269b9a],_0x24fe12,_0x567744))[_0x1d325d(0x197)](Boolean);return Object['values'](_0x15a652[_0x1d325d(0x1b3)][_0x1d325d(0x1dd)])[_0x1d325d(0x1a2)](_0x4fef89=>{const _0x1c773=_0x1d325d;this[_0x1c773(0x1ba)][_0x1c773(0x1aa)](_0x4fef89);}),_0x1e121a;}[_0x452a10(0x1df)](_0x50c867){const _0x3e3b36=_0x452a10;return{'id':_0x50c867['id'],'threadId':_0x50c867[_0x3e3b36(0x1a3)],'ref':_0x50c867[_0x3e3b36(0x1d3)]};}};f=Q([_(0x0,_0x4a7f4f(_0x51c5ba)),_(0x1,_0x4a7f4f(_0x36868b)),_(0x2,_0x4a7f4f(_0xd72ec9)),_(0x3,_0x4a7f4f(_0x23ae78))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2c4c2b,_0x2cb65b,_0x1710ff,_0x237684)=>{const _0x3872f7=_0x452a10;for(var _0x3dbe1a=_0x237684>0x1?void 0x0:_0x237684?re(_0x2cb65b,_0x1710ff):_0x2cb65b,_0xf7ac5b=_0x2c4c2b[_0x3872f7(0x189)]-0x1,_0x6d86c2;_0xf7ac5b>=0x0;_0xf7ac5b--)(_0x6d86c2=_0x2c4c2b[_0xf7ac5b])&&(_0x3dbe1a=_0x6d86c2(_0x3dbe1a)||_0x3dbe1a);return _0x3dbe1a;},N=(_0x5abc13,_0x4070f4)=>(_0x5cbd10,_0x491034)=>_0x4070f4(_0x5cbd10,_0x491034,_0x5abc13);let g=class extends _0x5258c6{constructor(_0x343024,_0x4aec1d){const _0x3b85a5=_0x452a10;super(),this[_0x3b85a5(0x1a8)]=_0x343024,this[_0x3b85a5(0x18b)]=_0x4aec1d,this[_0x3b85a5(0x1cb)]();}[_0x452a10(0x1cb)](){const _0xf40890=_0x452a10;this[_0xf40890(0x1a8)]['dataSource']=this[_0xf40890(0x18b)],this[_0xf40890(0x1a8)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5683f2),N(0x1,_0x4a7f4f(f))],g);var se=Object['defineProperty'],oe=Object[_0x452a10(0x1a5)],ne=(_0x310416,_0x1ceb09,_0x372bfc)=>_0x1ceb09 in _0x310416?se(_0x310416,_0x1ceb09,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x372bfc}):_0x310416[_0x1ceb09]=_0x372bfc,ie=(_0xd29e20,_0x8d355f,_0x52bbdd,_0x2cfb7f)=>{const _0x3ba812=_0x452a10;for(var _0x5692a8=_0x2cfb7f>0x1?void 0x0:_0x2cfb7f?oe(_0x8d355f,_0x52bbdd):_0x8d355f,_0x448f88=_0xd29e20[_0x3ba812(0x189)]-0x1,_0x4b19b2;_0x448f88>=0x0;_0x448f88--)(_0x4b19b2=_0xd29e20[_0x448f88])&&(_0x5692a8=_0x4b19b2(_0x5692a8)||_0x5692a8);return _0x5692a8;},w=(_0x61f1f8,_0x4eb698)=>(_0x2a90a8,_0x110d82)=>_0x4eb698(_0x2a90a8,_0x110d82,_0x61f1f8),$=(_0x53182a,_0x4b2aea,_0x13d5de)=>ne(_0x53182a,typeof _0x4b2aea!=_0x452a10(0x1b8)?_0x4b2aea+'':_0x4b2aea,_0x13d5de);let b=class extends _0x5405bc{constructor(_0x9310f3=M,_0x133426,_0xb5c3ee){const _0x3cc9f3=_0x452a10;super(),this[_0x3cc9f3(0x1bc)]=_0x9310f3,this[_0x3cc9f3(0x1da)]=_0x133426,this[_0x3cc9f3(0x185)]=_0xb5c3ee;const {..._0x1e6aa6}=_0x3a041d({},M,this[_0x3cc9f3(0x1bc)]);this[_0x3cc9f3(0x185)]['setConfig'](z,_0x1e6aa6);}[_0x452a10(0x1c6)](){[[f],[g],[S]]['forEach'](_0x5d9dc8=>{const _0x47e42e=_0x23a3;this['_injector'][_0x47e42e(0x1a6)](_0x5d9dc8);});}['onReady'](){const _0x5d1975=_0x452a10;this[_0x5d1975(0x1da)]['get'](g),this[_0x5d1975(0x1da)]['get'](S);}};$(b,_0x452a10(0x187),W),$(b,'type',_0x69c418['UNIVER_UNKNOWN']),b=ie([_0x50d19f(_0x33a339,_0xde1e70,_0x3ee855),w(0x1,_0x4a7f4f(_0x23ae78)),w(0x2,_0x4d40ff)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x483333=_0x1dcc;(function(_0x1ca603,_0x4d35d6){const _0x16083d=_0x1dcc,_0x5e516c=_0x1ca603();while(!![]){try{const _0x7fb7e0=parseInt(_0x16083d(0x148))/0x1*(parseInt(_0x16083d(0x191))/0x2)+parseInt(_0x16083d(0x184))/0x3+-parseInt(_0x16083d(0x165))/0x4+parseInt(_0x16083d(0x141))/0x5+-parseInt(_0x16083d(0x156))/0x6+parseInt(_0x16083d(0x18c))/0x7+-parseInt(_0x16083d(0x13d))/0x8*(parseInt(_0x16083d(0x16c))/0x9);if(_0x7fb7e0===_0x4d35d6)break;else _0x5e516c['push'](_0x5e516c['shift']());}catch(_0x3e3e2d){_0x5e516c['push'](_0x5e516c['shift']());}}}(_0x59f6,0x24698));import{CommentService as _0x3d9458,CollaborationSessionService as _0x11f1e5,UniverCollaborationClientPlugin as _0xe8667c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x543dc4}from'@univerjs-pro/license';import{dayjs as _0x4029f8,UserManagerService as _0x274152,Inject as _0x2f34bc,Injector as _0x187dbd,Disposable as _0x5b7dc8,CustomRangeType as _0xeee69f,UniverInstanceType as _0x370564,DependentOn as _0x34f50e,IConfigService as _0x4f9a2b,Plugin as _0x5b4da8,merge as _0xaff30f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d2160}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b4e0f,IThreadCommentDataSourceService as _0x418647}from'@univerjs/thread-comment';import{bufferTime as _0x2d5b81}from'rxjs';import{HTTPService as _0x4458a4}from'@univerjs/network';const W=_0x483333(0x15b);var I=(_0x42a89c=>(_0x42a89c[_0x42a89c[_0x483333(0x179)]=0x0]='OpenOrReOpen',_0x42a89c[_0x42a89c[_0x483333(0x183)]=0x1]=_0x483333(0x183),_0x42a89c[_0x42a89c[_0x483333(0x16a)]=-0x1]=_0x483333(0x16a),_0x42a89c))(I||{}),v=(_0x406619=>(_0x406619[_0x406619[_0x483333(0x13f)]=0x0]=_0x483333(0x13f),_0x406619[_0x406619[_0x483333(0x16d)]=0x1]=_0x483333(0x16d),_0x406619[_0x406619[_0x483333(0x151)]=0x2]=_0x483333(0x151),_0x406619[_0x406619[_0x483333(0x14a)]=0x3]=_0x483333(0x14a),_0x406619[_0x406619[_0x483333(0x173)]=0x4]=_0x483333(0x173),_0x406619[_0x406619[_0x483333(0x17a)]=0x5]=_0x483333(0x17a),_0x406619[_0x406619[_0x483333(0x16a)]=-0x1]=_0x483333(0x16a),_0x406619))(v||{});const D=_0x1aa4c7=>_0x4029f8(new Date(+_0x1aa4c7))[_0x483333(0x150)](_0x483333(0x18e)),B=async(_0x220120,_0x333487)=>{const _0x1f965b=_0x483333,_0x47cc7e=_0x220120[_0x1f965b(0x177)](_0x274152),_0x433243=_0x220120[_0x1f965b(0x177)](_0x4458a4);_0x333487['forEach'](_0xe90194=>{const _0x9d9e6=_0x1f965b;_0x47cc7e['getUser'](_0xe90194)&&_0x333487[_0x9d9e6(0x158)](_0xe90194);}),_0x333487[_0x1f965b(0x180)]&&(await _0x433243[_0x1f965b(0x177)]('/universer-api/user/list',{'params':{'userIDs':[..._0x333487]}}))[_0x1f965b(0x17f)][_0x1f965b(0x16e)]['forEach'](_0x1b43c1=>{const _0x1538fb=_0x1f965b;_0x1b43c1&&_0x47cc7e[_0x1538fb(0x140)](_0x1b43c1);});};var K=Object[_0x483333(0x187)],V=(_0x5dd86e,_0x5c10e4,_0xdc4e5b,_0x2cc1eb)=>{const _0x1a1031=_0x483333;for(var _0x47020a=_0x2cc1eb>0x1?void 0x0:_0x2cc1eb?K(_0x5c10e4,_0xdc4e5b):_0x5c10e4,_0x2bc6f1=_0x5dd86e[_0x1a1031(0x161)]-0x1,_0x5bc40d;_0x2bc6f1>=0x0;_0x2bc6f1--)(_0x5bc40d=_0x5dd86e[_0x2bc6f1])&&(_0x47020a=_0x5bc40d(_0x47020a)||_0x47020a);return _0x47020a;},p=(_0x309d42,_0x334c78)=>(_0x54a8ef,_0x505734)=>_0x334c78(_0x54a8ef,_0x505734,_0x309d42);let S=class extends _0x5b7dc8{constructor(_0x52f9b0,_0x8f18e,_0x43c2f7,_0x35a998){const _0x4f7df0=_0x483333;super(),this[_0x4f7df0(0x18d)]=_0x52f9b0,this[_0x4f7df0(0x14e)]=_0x8f18e,this['_userService']=_0x43c2f7,this[_0x4f7df0(0x175)]=_0x35a998,this['_init'](),this[_0x4f7df0(0x15e)]();}['_initUserSync'](){const _0x3dc8bf=_0x483333;this[_0x3dc8bf(0x166)](this['_threadCommentModel'][_0x3dc8bf(0x181)]['pipe'](_0x2d5b81(0x10))['subscribe'](_0x127084=>{const _0x211e99=_0x3dc8bf,_0x57ffd7=new Set();_0x127084[_0x211e99(0x152)](_0x3549ca=>{const _0xf5fc77=_0x211e99;switch(_0x3549ca[_0xf5fc77(0x134)]){case _0xf5fc77(0x18a):{const _0x114e96=_0x3549ca[_0xf5fc77(0x178)][_0xf5fc77(0x15a)];_0x57ffd7[_0xf5fc77(0x18a)](_0x114e96);break;}}}),B(this[_0x211e99(0x175)],_0x57ffd7);}));}[_0x483333(0x142)](){const _0x164ccd=_0x483333;this[_0x164ccd(0x166)](this[_0x164ccd(0x18d)]['commentUpdate$'][_0x164ccd(0x130)](async _0x586599=>{const _0x2169d4=_0x164ccd;var _0x1e911a,_0x1e713c,_0x3dd28f,_0x4a00f3;const _0x4adec7=(_0x1e911a=this[_0x2169d4(0x14e)][_0x2169d4(0x172)](_0x586599[_0x2169d4(0x17d)])[_0x2169d4(0x168)](_0x18efc0=>_0x18efc0[_0x2169d4(0x138)]===_0x586599[_0x2169d4(0x138)]))==null?void 0x0:_0x1e911a[_0x2169d4(0x145)];if(!_0x4adec7)return;const {unitId:_0x2f8932,subUnitId:_0x5e8ae0}=_0x4adec7;switch(_0x586599[_0x2169d4(0x12f)]&&this[_0x2169d4(0x144)][_0x2169d4(0x140)](_0x586599[_0x2169d4(0x12f)]),_0x586599[_0x2169d4(0x134)]){case v['Add']:break;case v[_0x2169d4(0x151)]:{this[_0x2169d4(0x14e)][_0x2169d4(0x139)](_0x2f8932,_0x5e8ae0,{'unitId':_0x2f8932,'subUnitId':_0x5e8ae0,'ref':'','id':_0x586599[_0x2169d4(0x16b)],'dT':D(+_0x586599[_0x2169d4(0x137)]),'threadId':_0x586599[_0x2169d4(0x138)],'personId':(_0x3dd28f=(_0x1e713c=_0x586599[_0x2169d4(0x12f)])==null?void 0x0:_0x1e713c[_0x2169d4(0x189)])!=null?_0x3dd28f:_0x586599[_0x2169d4(0x13b)],'text':JSON[_0x2169d4(0x14c)](_0x586599[_0x2169d4(0x15f)]),'parentId':_0x4adec7['id']});break;}case v['Delete']:{const _0x57ae11=this[_0x2169d4(0x14e)][_0x2169d4(0x174)](_0x2f8932,_0x5e8ae0,_0x586599[_0x2169d4(0x16b)]);_0x57ae11&&_0x57ae11[_0x2169d4(0x162)]&&this[_0x2169d4(0x14e)][_0x2169d4(0x132)](_0x2f8932,_0x5e8ae0,_0x586599['replyId']);break;}case v[_0x2169d4(0x14a)]:{this[_0x2169d4(0x14e)][_0x2169d4(0x185)](_0x2f8932,_0x5e8ae0,{'commentId':_0x586599[_0x2169d4(0x16b)],'text':JSON[_0x2169d4(0x14c)](_0x586599['content'])});break;}case v[_0x2169d4(0x17a)]:{const _0x3ae2cf=(_0x4a00f3=this[_0x2169d4(0x14e)]['getUnit'](_0x586599[_0x2169d4(0x17d)])[_0x2169d4(0x168)](_0xb57112=>_0xb57112[_0x2169d4(0x138)]===_0x586599[_0x2169d4(0x138)]))==null?void 0x0:_0x4a00f3[_0x2169d4(0x145)];_0x3ae2cf&&this[_0x2169d4(0x14e)][_0x2169d4(0x14f)](_0x2f8932,_0x5e8ae0,_0x3ae2cf['id'],_0x586599['solved']===I[_0x2169d4(0x183)]);break;}}}));}};S=V([p(0x0,_0x2f34bc(_0x3d9458)),p(0x1,_0x2f34bc(_0x4b4e0f)),p(0x2,_0x2f34bc(_0x274152)),p(0x3,_0x2f34bc(_0x187dbd))],S);const z=_0x483333(0x15c),M={};var k=Object[_0x483333(0x187)],Q=(_0x4d3d49,_0x19c530,_0x37bcc0,_0xc06930)=>{const _0x54a1a8=_0x483333;for(var _0x3509f8=_0xc06930>0x1?void 0x0:_0xc06930?k(_0x19c530,_0x37bcc0):_0x19c530,_0x369188=_0x4d3d49[_0x54a1a8(0x161)]-0x1,_0x5f1e9b;_0x369188>=0x0;_0x369188--)(_0x5f1e9b=_0x4d3d49[_0x369188])&&(_0x3509f8=_0x5f1e9b(_0x3509f8)||_0x3509f8);return _0x3509f8;},_=(_0x7c2829,_0x4ccfdd)=>(_0x2c3914,_0x18c257)=>_0x4ccfdd(_0x2c3914,_0x18c257,_0x7c2829);function X(_0x545070,_0x24c1c7){const _0x20eb2d=_0x483333,_0x1c2e62=_0x545070[_0x20eb2d(0x133)][0x0];return{..._0x24c1c7,'id':_0x1c2e62[_0x20eb2d(0x16b)],'resolved':_0x545070[_0x20eb2d(0x143)]===0x1,'dT':D(_0x1c2e62[_0x20eb2d(0x137)]),'personId':_0x1c2e62[_0x20eb2d(0x13b)],'threadId':_0x1c2e62['threadId']};}function ee(_0x48f861,_0x54d4b2,_0x33242c){const _0x420d65=_0x483333;var _0x11f26f,_0x2e5a81;if(((_0x2e5a81=(_0x11f26f=_0x48f861==null?void 0x0:_0x48f861[_0x420d65(0x133)])==null?void 0x0:_0x11f26f[_0x420d65(0x161)])!=null?_0x2e5a81:0x0)>0x0){const _0x10e86d=(_0x4227e0,_0x30505d)=>({'id':_0x4227e0[_0x420d65(0x16b)],'threadId':_0x4227e0[_0x420d65(0x138)],'dT':D(_0x4227e0[_0x420d65(0x137)]),'personId':_0x4227e0[_0x420d65(0x13b)],'resolved':_0x48f861[_0x420d65(0x143)]===I[_0x420d65(0x183)],'unitId':_0x54d4b2,'subUnitId':_0x33242c,'text':JSON[_0x420d65(0x14c)](_0x4227e0[_0x420d65(0x15f)]),'parentId':_0x30505d}),_0x2387c0=_0x10e86d(_0x48f861[_0x420d65(0x133)][0x0]);return{..._0x2387c0,'children':_0x48f861[_0x420d65(0x133)][_0x420d65(0x15d)](0x1)[_0x420d65(0x163)](_0x26deef=>_0x10e86d(_0x26deef,_0x2387c0['id']))};}return null;}let f=class{constructor(_0x1b30ca,_0x2b8c6b,_0x2112ab,_0x2f74cf){const _0x297d99=_0x483333;this['_httpService']=_0x1b30ca,this[_0x297d99(0x144)]=_0x2b8c6b,this[_0x297d99(0x131)]=_0x2112ab,this[_0x297d99(0x175)]=_0x2f74cf;}async[_0x483333(0x139)](_0x6203c9){const _0x420df4=_0x483333;var _0x2b4345,_0x47b39a;const {parentId:_0x211051,unitId:_0x368544,text:_0x58d316,threadId:_0x27bae9}=_0x6203c9,_0x825c3=(_0x47b39a=(_0x2b4345=_0x58d316[_0x420df4(0x160)])==null?void 0x0:_0x2b4345[_0x420df4(0x190)](_0x3ef9b6=>_0x3ef9b6[_0x420df4(0x18f)]===_0xeee69f[_0x420df4(0x14b)])[_0x420df4(0x163)](_0x2799a8=>_0x2799a8[_0x420df4(0x167)]))!=null?_0x47b39a:[],_0x11aa46=JSON['stringify'](_0x58d316),_0x208371=(await this[_0x420df4(0x131)][_0x420df4(0x14d)](_0x368544))[_0x420df4(0x171)]();if(_0x211051){const _0x45cc83={'memberId':_0x208371,'unitId':_0x368544,'content':_0x11aa46,'mention':_0x825c3,'threadId':_0x27bae9},_0x56f392=(await this[_0x420df4(0x17c)][_0x420df4(0x136)]('/universer-api/comment/unit/'+_0x368544+_0x420df4(0x147),{'body':_0x45cc83}))[_0x420df4(0x17f)]['reply'];return{..._0x6203c9,'id':_0x56f392['replyId'],'dT':_0x4029f8(+_0x56f392[_0x420df4(0x137)])[_0x420df4(0x150)](_0x420df4(0x18e)),'personId':_0x56f392[_0x420df4(0x13b)]};}else{const _0x184d6c={'memberId':_0x208371,'unitId':_0x368544,'content':_0x11aa46,'mention':_0x825c3},_0x44f465=await this[_0x420df4(0x17c)][_0x420df4(0x136)]('/universer-api/comment/unit/'+_0x368544+_0x420df4(0x13e),{'body':_0x184d6c});return X(_0x44f465['body'][_0x420df4(0x17e)],_0x6203c9);}}async[_0x483333(0x185)](_0x4ad253){const _0x3585ad=_0x483333;var _0x512c36,_0x5f2c8f;const {text:_0xbb7f51,unitId:_0x220fe1}=_0x4ad253,_0x868e9b=(_0x5f2c8f=(_0x512c36=_0xbb7f51[_0x3585ad(0x160)])==null?void 0x0:_0x512c36['filter'](_0x376333=>_0x376333['rangeType']===_0xeee69f['COMMENT'])[_0x3585ad(0x163)](_0x4881fb=>_0x4881fb[_0x3585ad(0x167)]))!=null?_0x5f2c8f:[],_0x5d912c=JSON['stringify'](_0xbb7f51),_0x58d693=_0x4ad253[_0x3585ad(0x138)],_0x5493bd=_0x4ad253['id'],_0x151f08={'memberId':(await this['_sessionService']['requireSession'](_0x220fe1))[_0x3585ad(0x171)](),'unitId':_0x220fe1,'threadId':_0x58d693,'mention':_0x868e9b,'content':_0x5d912c,'replyId':_0x5493bd},_0x1a4f9e=await this[_0x3585ad(0x17c)][_0x3585ad(0x136)](_0x3585ad(0x17b)+_0x220fe1+'/edit',{'body':_0x151f08});return!_0x1a4f9e[_0x3585ad(0x17f)][_0x3585ad(0x159)]||_0x1a4f9e[_0x3585ad(0x17f)][_0x3585ad(0x159)][_0x3585ad(0x16f)]===0x1;}async[_0x483333(0x14f)](_0x1ebc1b){const _0x3e5f79=_0x483333,{unitId:_0xddf130}=_0x1ebc1b,_0x1763fc=_0x1ebc1b[_0x3e5f79(0x138)],_0x23b715={'memberId':this[_0x3e5f79(0x144)][_0x3e5f79(0x153)]()[_0x3e5f79(0x189)],'unitId':_0xddf130,'threadId':_0x1763fc,'solved':_0x1ebc1b['resolved']?I[_0x3e5f79(0x183)]:I[_0x3e5f79(0x179)]},_0x2cec7f=await this[_0x3e5f79(0x17c)]['post'](_0x3e5f79(0x17b)+_0xddf130+_0x3e5f79(0x169),{'body':_0x23b715});return!_0x2cec7f[_0x3e5f79(0x17f)][_0x3e5f79(0x159)]||_0x2cec7f[_0x3e5f79(0x17f)]['error'][_0x3e5f79(0x16f)]===0x1;}async[_0x483333(0x132)](_0x12bdf2,_0x176272,_0x25ce4a,_0x342009){const _0x5f5ccc=_0x483333,_0xf31bce={'memberId':(await this[_0x5f5ccc(0x131)]['requireSession'](_0x12bdf2))[_0x5f5ccc(0x171)](),'threadId':_0x25ce4a,'replyId':_0x342009,'unitId':_0x12bdf2},_0x16f61b=await this[_0x5f5ccc(0x17c)][_0x5f5ccc(0x136)](_0x5f5ccc(0x17b)+_0x12bdf2+_0x5f5ccc(0x176),{'body':_0xf31bce});return!_0x16f61b[_0x5f5ccc(0x17f)]['error']||_0x16f61b[_0x5f5ccc(0x17f)][_0x5f5ccc(0x159)][_0x5f5ccc(0x16f)]===0x1;}async[_0x483333(0x182)](_0x1d316d,_0x2a02ff,_0x232a56){const _0x1e934a=_0x483333,_0x5e6542={'unitId':_0x1d316d,'threadId':_0x232a56},_0x33bef3=await this[_0x1e934a(0x17c)][_0x1e934a(0x136)](_0x1e934a(0x17b)+_0x1d316d+_0x1e934a(0x164),{'body':_0x5e6542}),_0x42908b=_0x232a56['map'](_0x25a1b0=>ee(_0x33bef3[_0x1e934a(0x17f)][_0x1e934a(0x149)][_0x25a1b0],_0x1d316d,_0x2a02ff))[_0x1e934a(0x190)](Boolean);return Object[_0x1e934a(0x157)](_0x33bef3[_0x1e934a(0x17f)][_0x1e934a(0x16e)])[_0x1e934a(0x152)](_0x4516c0=>{const _0x27aa42=_0x1e934a;this['_userService'][_0x27aa42(0x140)](_0x4516c0);}),_0x42908b;}[_0x483333(0x154)](_0x5f0e3a){const _0x5726ee=_0x483333;return{'id':_0x5f0e3a['id'],'threadId':_0x5f0e3a[_0x5726ee(0x138)],'ref':_0x5f0e3a[_0x5726ee(0x13c)]};}};f=Q([_(0x0,_0x2f34bc(_0x4458a4)),_(0x1,_0x2f34bc(_0x274152)),_(0x2,_0x2f34bc(_0x11f1e5)),_(0x3,_0x2f34bc(_0x187dbd))],f);var re=Object[_0x483333(0x187)],te=(_0x195f12,_0xae5af3,_0x44c4a8,_0x489520)=>{const _0x38521a=_0x483333;for(var _0x225ef6=_0x489520>0x1?void 0x0:_0x489520?re(_0xae5af3,_0x44c4a8):_0xae5af3,_0x59dcf4=_0x195f12[_0x38521a(0x161)]-0x1,_0x37ee59;_0x59dcf4>=0x0;_0x59dcf4--)(_0x37ee59=_0x195f12[_0x59dcf4])&&(_0x225ef6=_0x37ee59(_0x225ef6)||_0x225ef6);return _0x225ef6;},N=(_0x2cbf95,_0x159fd1)=>(_0x491f68,_0x6ff239)=>_0x159fd1(_0x491f68,_0x6ff239,_0x2cbf95);function _0x1dcc(_0x2a0c89,_0x417328){const _0x59f6e6=_0x59f6();return _0x1dcc=function(_0x1dccb5,_0x34cd4d){_0x1dccb5=_0x1dccb5-0x12f;let _0x406a44=_0x59f6e6[_0x1dccb5];return _0x406a44;},_0x1dcc(_0x2a0c89,_0x417328);}function _0x59f6(){const _0x315cd6=['delete','error','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','thread-comment-data-source.config','slice','_initUserSync','content','customRanges','length','parentId','map','/list','552692zneFfD','disposeWithMe','rangeId','find','/solved','UNRECOGNIZED','replyId','9UlNiXP','Add','users','code','dataSource','getMemberID','getUnit','Delete','getComment','_injector','/delete','get','payload','OpenOrReOpen','Solve','/universer-api/comment/unit/','_httpService','unitId','comment','body','size','commentUpdate$','listComments','Solved','304635fIUNuT','updateComment','_config','getOwnPropertyDescriptor','UNIVER_UNKNOWN','userID','add','_threadCommentDataSourceService','2025163wkxCqy','_commentService','YYYY/MM/DD\x20HH:mm','rangeType','filter','1126dYojBG','user','subscribe','_sessionService','deleteComment','replies','type','_configService','post','createTimestamp','threadId','addComment','onReady','userId','ref','2791352xpBlVD','/add','Unknown','addUser','1159435egFapB','_init','solved','_userService','root','defineProperty','/reply','185xuDKjo','comments','Edit','COMMENT','parse','requireSession','_threadCommentModel','resolveComment','format','Reply','forEach','getCurrentUser','saveCommentToSnapshot','_initDataSource','543960WghTSy','values'];_0x59f6=function(){return _0x315cd6;};return _0x59f6();}let g=class extends _0x5b7dc8{constructor(_0x5f4574,_0x238a8b){const _0x391a9d=_0x483333;super(),this[_0x391a9d(0x18b)]=_0x5f4574,this['_threadCommentDataSource']=_0x238a8b,this[_0x391a9d(0x155)]();}[_0x483333(0x155)](){const _0x43d706=_0x483333;this[_0x43d706(0x18b)][_0x43d706(0x170)]=this['_threadCommentDataSource'],this[_0x43d706(0x18b)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x418647),N(0x1,_0x2f34bc(f))],g);var se=Object[_0x483333(0x146)],oe=Object[_0x483333(0x187)],ne=(_0x68d53e,_0x166080,_0x3d1666)=>_0x166080 in _0x68d53e?se(_0x68d53e,_0x166080,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d1666}):_0x68d53e[_0x166080]=_0x3d1666,ie=(_0x2607ec,_0x28df08,_0x53f7f0,_0x22496c)=>{const _0x57e338=_0x483333;for(var _0x1fbd4d=_0x22496c>0x1?void 0x0:_0x22496c?oe(_0x28df08,_0x53f7f0):_0x28df08,_0x33c2f8=_0x2607ec[_0x57e338(0x161)]-0x1,_0x3271c2;_0x33c2f8>=0x0;_0x33c2f8--)(_0x3271c2=_0x2607ec[_0x33c2f8])&&(_0x1fbd4d=_0x3271c2(_0x1fbd4d)||_0x1fbd4d);return _0x1fbd4d;},w=(_0x2716ed,_0x26a508)=>(_0x1effc4,_0x58238a)=>_0x26a508(_0x1effc4,_0x58238a,_0x2716ed),$=(_0x3ffeb5,_0x11385d,_0x3bc3a6)=>ne(_0x3ffeb5,typeof _0x11385d!='symbol'?_0x11385d+'':_0x11385d,_0x3bc3a6);let b=class extends _0x5b4da8{constructor(_0x94e6e8=M,_0x44e126,_0x574cb5){const _0x3497f6=_0x483333;super(),this['_config']=_0x94e6e8,this[_0x3497f6(0x175)]=_0x44e126,this[_0x3497f6(0x135)]=_0x574cb5;const {..._0x4272d3}=_0xaff30f({},M,this[_0x3497f6(0x186)]);this[_0x3497f6(0x135)]['setConfig'](z,_0x4272d3);}['onStarting'](){const _0x987f64=_0x483333;[[f],[g],[S]][_0x987f64(0x152)](_0x5e09f1=>{const _0x52b64d=_0x987f64;this[_0x52b64d(0x175)][_0x52b64d(0x18a)](_0x5e09f1);});}[_0x483333(0x13a)](){const _0x4dfbe6=_0x483333;this['_injector'][_0x4dfbe6(0x177)](g),this[_0x4dfbe6(0x175)][_0x4dfbe6(0x177)](S);}};$(b,'pluginName',W),$(b,'type',_0x370564[_0x483333(0x188)]),b=ie([_0x34f50e(_0x2d2160,_0xe8667c,_0x543dc4),w(0x1,_0x2f34bc(_0x187dbd)),w(0x2,_0x4f9a2b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ const _0x483333=_0x1dcc;(function(_0x1ca603,_0x4d35d6){const _0x16083d=_0x1dcc,_0x5e516c=_0x1ca603();while(!![]){try{const _0x7fb7e0=parseInt(_0x16083d(0x148))/0x1*(parseInt(_0x16083d(0x191))/0x2)+parseInt(_0x16083d(0x184))/0x3+-parseInt(_0x16083d(0x165))/0x4+parseInt(_0x16083d(0x141))/0x5+-parseInt(_0x16083d(0x156))/0x6+parseInt(_0x16083d(0x18c))/0x7+-parseInt(_0x16083d(0x13d))/0x8*(parseInt(_0x16083d(0x16c))/0x9);if(_0x7fb7e0===_0x4d35d6)break;else _0x5e516c['push'](_0x5e516c['shift']());}catch(_0x3e3e2d){_0x5e516c['push'](_0x5e516c['shift']());}}}(_0x59f6,0x24698));import{CommentService as _0x3d9458,CollaborationSessionService as _0x11f1e5,UniverCollaborationClientPlugin as _0xe8667c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x543dc4}from'@univerjs-pro/license';import{dayjs as _0x4029f8,UserManagerService as _0x274152,Inject as _0x2f34bc,Injector as _0x187dbd,Disposable as _0x5b7dc8,CustomRangeType as _0xeee69f,UniverInstanceType as _0x370564,DependentOn as _0x34f50e,IConfigService as _0x4f9a2b,Plugin as _0x5b4da8,merge as _0xaff30f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d2160}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b4e0f,IThreadCommentDataSourceService as _0x418647}from'@univerjs/thread-comment';import{bufferTime as _0x2d5b81}from'rxjs';import{HTTPService as _0x4458a4}from'@univerjs/network';const W=_0x483333(0x15b);var I=(_0x42a89c=>(_0x42a89c[_0x42a89c[_0x483333(0x179)]=0x0]='OpenOrReOpen',_0x42a89c[_0x42a89c[_0x483333(0x183)]=0x1]=_0x483333(0x183),_0x42a89c[_0x42a89c[_0x483333(0x16a)]=-0x1]=_0x483333(0x16a),_0x42a89c))(I||{}),v=(_0x406619=>(_0x406619[_0x406619[_0x483333(0x13f)]=0x0]=_0x483333(0x13f),_0x406619[_0x406619[_0x483333(0x16d)]=0x1]=_0x483333(0x16d),_0x406619[_0x406619[_0x483333(0x151)]=0x2]=_0x483333(0x151),_0x406619[_0x406619[_0x483333(0x14a)]=0x3]=_0x483333(0x14a),_0x406619[_0x406619[_0x483333(0x173)]=0x4]=_0x483333(0x173),_0x406619[_0x406619[_0x483333(0x17a)]=0x5]=_0x483333(0x17a),_0x406619[_0x406619[_0x483333(0x16a)]=-0x1]=_0x483333(0x16a),_0x406619))(v||{});const D=_0x1aa4c7=>_0x4029f8(new Date(+_0x1aa4c7))[_0x483333(0x150)](_0x483333(0x18e)),B=async(_0x220120,_0x333487)=>{const _0x1f965b=_0x483333,_0x47cc7e=_0x220120[_0x1f965b(0x177)](_0x274152),_0x433243=_0x220120[_0x1f965b(0x177)](_0x4458a4);_0x333487['forEach'](_0xe90194=>{const _0x9d9e6=_0x1f965b;_0x47cc7e['getUser'](_0xe90194)&&_0x333487[_0x9d9e6(0x158)](_0xe90194);}),_0x333487[_0x1f965b(0x180)]&&(await _0x433243[_0x1f965b(0x177)]('/universer-api/user/list',{'params':{'userIDs':[..._0x333487]}}))[_0x1f965b(0x17f)][_0x1f965b(0x16e)]['forEach'](_0x1b43c1=>{const _0x1538fb=_0x1f965b;_0x1b43c1&&_0x47cc7e[_0x1538fb(0x140)](_0x1b43c1);});};var K=Object[_0x483333(0x187)],V=(_0x5dd86e,_0x5c10e4,_0xdc4e5b,_0x2cc1eb)=>{const _0x1a1031=_0x483333;for(var _0x47020a=_0x2cc1eb>0x1?void 0x0:_0x2cc1eb?K(_0x5c10e4,_0xdc4e5b):_0x5c10e4,_0x2bc6f1=_0x5dd86e[_0x1a1031(0x161)]-0x1,_0x5bc40d;_0x2bc6f1>=0x0;_0x2bc6f1--)(_0x5bc40d=_0x5dd86e[_0x2bc6f1])&&(_0x47020a=_0x5bc40d(_0x47020a)||_0x47020a);return _0x47020a;},p=(_0x309d42,_0x334c78)=>(_0x54a8ef,_0x505734)=>_0x334c78(_0x54a8ef,_0x505734,_0x309d42);let S=class extends _0x5b7dc8{constructor(_0x52f9b0,_0x8f18e,_0x43c2f7,_0x35a998){const _0x4f7df0=_0x483333;super(),this[_0x4f7df0(0x18d)]=_0x52f9b0,this[_0x4f7df0(0x14e)]=_0x8f18e,this['_userService']=_0x43c2f7,this[_0x4f7df0(0x175)]=_0x35a998,this['_init'](),this[_0x4f7df0(0x15e)]();}['_initUserSync'](){const _0x3dc8bf=_0x483333;this[_0x3dc8bf(0x166)](this['_threadCommentModel'][_0x3dc8bf(0x181)]['pipe'](_0x2d5b81(0x10))['subscribe'](_0x127084=>{const _0x211e99=_0x3dc8bf,_0x57ffd7=new Set();_0x127084[_0x211e99(0x152)](_0x3549ca=>{const _0xf5fc77=_0x211e99;switch(_0x3549ca[_0xf5fc77(0x134)]){case _0xf5fc77(0x18a):{const _0x114e96=_0x3549ca[_0xf5fc77(0x178)][_0xf5fc77(0x15a)];_0x57ffd7[_0xf5fc77(0x18a)](_0x114e96);break;}}}),B(this[_0x211e99(0x175)],_0x57ffd7);}));}[_0x483333(0x142)](){const _0x164ccd=_0x483333;this[_0x164ccd(0x166)](this[_0x164ccd(0x18d)]['commentUpdate$'][_0x164ccd(0x130)](async _0x586599=>{const _0x2169d4=_0x164ccd;var _0x1e911a,_0x1e713c,_0x3dd28f,_0x4a00f3;const _0x4adec7=(_0x1e911a=this[_0x2169d4(0x14e)][_0x2169d4(0x172)](_0x586599[_0x2169d4(0x17d)])[_0x2169d4(0x168)](_0x18efc0=>_0x18efc0[_0x2169d4(0x138)]===_0x586599[_0x2169d4(0x138)]))==null?void 0x0:_0x1e911a[_0x2169d4(0x145)];if(!_0x4adec7)return;const {unitId:_0x2f8932,subUnitId:_0x5e8ae0}=_0x4adec7;switch(_0x586599[_0x2169d4(0x12f)]&&this[_0x2169d4(0x144)][_0x2169d4(0x140)](_0x586599[_0x2169d4(0x12f)]),_0x586599[_0x2169d4(0x134)]){case v['Add']:break;case v[_0x2169d4(0x151)]:{this[_0x2169d4(0x14e)][_0x2169d4(0x139)](_0x2f8932,_0x5e8ae0,{'unitId':_0x2f8932,'subUnitId':_0x5e8ae0,'ref':'','id':_0x586599[_0x2169d4(0x16b)],'dT':D(+_0x586599[_0x2169d4(0x137)]),'threadId':_0x586599[_0x2169d4(0x138)],'personId':(_0x3dd28f=(_0x1e713c=_0x586599[_0x2169d4(0x12f)])==null?void 0x0:_0x1e713c[_0x2169d4(0x189)])!=null?_0x3dd28f:_0x586599[_0x2169d4(0x13b)],'text':JSON[_0x2169d4(0x14c)](_0x586599[_0x2169d4(0x15f)]),'parentId':_0x4adec7['id']});break;}case v['Delete']:{const _0x57ae11=this[_0x2169d4(0x14e)][_0x2169d4(0x174)](_0x2f8932,_0x5e8ae0,_0x586599[_0x2169d4(0x16b)]);_0x57ae11&&_0x57ae11[_0x2169d4(0x162)]&&this[_0x2169d4(0x14e)][_0x2169d4(0x132)](_0x2f8932,_0x5e8ae0,_0x586599['replyId']);break;}case v[_0x2169d4(0x14a)]:{this[_0x2169d4(0x14e)][_0x2169d4(0x185)](_0x2f8932,_0x5e8ae0,{'commentId':_0x586599[_0x2169d4(0x16b)],'text':JSON[_0x2169d4(0x14c)](_0x586599['content'])});break;}case v[_0x2169d4(0x17a)]:{const _0x3ae2cf=(_0x4a00f3=this[_0x2169d4(0x14e)]['getUnit'](_0x586599[_0x2169d4(0x17d)])[_0x2169d4(0x168)](_0xb57112=>_0xb57112[_0x2169d4(0x138)]===_0x586599[_0x2169d4(0x138)]))==null?void 0x0:_0x4a00f3[_0x2169d4(0x145)];_0x3ae2cf&&this[_0x2169d4(0x14e)][_0x2169d4(0x14f)](_0x2f8932,_0x5e8ae0,_0x3ae2cf['id'],_0x586599['solved']===I[_0x2169d4(0x183)]);break;}}}));}};S=V([p(0x0,_0x2f34bc(_0x3d9458)),p(0x1,_0x2f34bc(_0x4b4e0f)),p(0x2,_0x2f34bc(_0x274152)),p(0x3,_0x2f34bc(_0x187dbd))],S);const z=_0x483333(0x15c),M={};var k=Object[_0x483333(0x187)],Q=(_0x4d3d49,_0x19c530,_0x37bcc0,_0xc06930)=>{const _0x54a1a8=_0x483333;for(var _0x3509f8=_0xc06930>0x1?void 0x0:_0xc06930?k(_0x19c530,_0x37bcc0):_0x19c530,_0x369188=_0x4d3d49[_0x54a1a8(0x161)]-0x1,_0x5f1e9b;_0x369188>=0x0;_0x369188--)(_0x5f1e9b=_0x4d3d49[_0x369188])&&(_0x3509f8=_0x5f1e9b(_0x3509f8)||_0x3509f8);return _0x3509f8;},_=(_0x7c2829,_0x4ccfdd)=>(_0x2c3914,_0x18c257)=>_0x4ccfdd(_0x2c3914,_0x18c257,_0x7c2829);function X(_0x545070,_0x24c1c7){const _0x20eb2d=_0x483333,_0x1c2e62=_0x545070[_0x20eb2d(0x133)][0x0];return{..._0x24c1c7,'id':_0x1c2e62[_0x20eb2d(0x16b)],'resolved':_0x545070[_0x20eb2d(0x143)]===0x1,'dT':D(_0x1c2e62[_0x20eb2d(0x137)]),'personId':_0x1c2e62[_0x20eb2d(0x13b)],'threadId':_0x1c2e62['threadId']};}function ee(_0x48f861,_0x54d4b2,_0x33242c){const _0x420d65=_0x483333;var _0x11f26f,_0x2e5a81;if(((_0x2e5a81=(_0x11f26f=_0x48f861==null?void 0x0:_0x48f861[_0x420d65(0x133)])==null?void 0x0:_0x11f26f[_0x420d65(0x161)])!=null?_0x2e5a81:0x0)>0x0){const _0x10e86d=(_0x4227e0,_0x30505d)=>({'id':_0x4227e0[_0x420d65(0x16b)],'threadId':_0x4227e0[_0x420d65(0x138)],'dT':D(_0x4227e0[_0x420d65(0x137)]),'personId':_0x4227e0[_0x420d65(0x13b)],'resolved':_0x48f861[_0x420d65(0x143)]===I[_0x420d65(0x183)],'unitId':_0x54d4b2,'subUnitId':_0x33242c,'text':JSON[_0x420d65(0x14c)](_0x4227e0[_0x420d65(0x15f)]),'parentId':_0x30505d}),_0x2387c0=_0x10e86d(_0x48f861[_0x420d65(0x133)][0x0]);return{..._0x2387c0,'children':_0x48f861[_0x420d65(0x133)][_0x420d65(0x15d)](0x1)[_0x420d65(0x163)](_0x26deef=>_0x10e86d(_0x26deef,_0x2387c0['id']))};}return null;}let f=class{constructor(_0x1b30ca,_0x2b8c6b,_0x2112ab,_0x2f74cf){const _0x297d99=_0x483333;this['_httpService']=_0x1b30ca,this[_0x297d99(0x144)]=_0x2b8c6b,this[_0x297d99(0x131)]=_0x2112ab,this[_0x297d99(0x175)]=_0x2f74cf;}async[_0x483333(0x139)](_0x6203c9){const _0x420df4=_0x483333;var _0x2b4345,_0x47b39a;const {parentId:_0x211051,unitId:_0x368544,text:_0x58d316,threadId:_0x27bae9}=_0x6203c9,_0x825c3=(_0x47b39a=(_0x2b4345=_0x58d316[_0x420df4(0x160)])==null?void 0x0:_0x2b4345[_0x420df4(0x190)](_0x3ef9b6=>_0x3ef9b6[_0x420df4(0x18f)]===_0xeee69f[_0x420df4(0x14b)])[_0x420df4(0x163)](_0x2799a8=>_0x2799a8[_0x420df4(0x167)]))!=null?_0x47b39a:[],_0x11aa46=JSON['stringify'](_0x58d316),_0x208371=(await this[_0x420df4(0x131)][_0x420df4(0x14d)](_0x368544))[_0x420df4(0x171)]();if(_0x211051){const _0x45cc83={'memberId':_0x208371,'unitId':_0x368544,'content':_0x11aa46,'mention':_0x825c3,'threadId':_0x27bae9},_0x56f392=(await this[_0x420df4(0x17c)][_0x420df4(0x136)]('/universer-api/comment/unit/'+_0x368544+_0x420df4(0x147),{'body':_0x45cc83}))[_0x420df4(0x17f)]['reply'];return{..._0x6203c9,'id':_0x56f392['replyId'],'dT':_0x4029f8(+_0x56f392[_0x420df4(0x137)])[_0x420df4(0x150)](_0x420df4(0x18e)),'personId':_0x56f392[_0x420df4(0x13b)]};}else{const _0x184d6c={'memberId':_0x208371,'unitId':_0x368544,'content':_0x11aa46,'mention':_0x825c3},_0x44f465=await this[_0x420df4(0x17c)][_0x420df4(0x136)]('/universer-api/comment/unit/'+_0x368544+_0x420df4(0x13e),{'body':_0x184d6c});return X(_0x44f465['body'][_0x420df4(0x17e)],_0x6203c9);}}async[_0x483333(0x185)](_0x4ad253){const _0x3585ad=_0x483333;var _0x512c36,_0x5f2c8f;const {text:_0xbb7f51,unitId:_0x220fe1}=_0x4ad253,_0x868e9b=(_0x5f2c8f=(_0x512c36=_0xbb7f51[_0x3585ad(0x160)])==null?void 0x0:_0x512c36['filter'](_0x376333=>_0x376333['rangeType']===_0xeee69f['COMMENT'])[_0x3585ad(0x163)](_0x4881fb=>_0x4881fb[_0x3585ad(0x167)]))!=null?_0x5f2c8f:[],_0x5d912c=JSON['stringify'](_0xbb7f51),_0x58d693=_0x4ad253[_0x3585ad(0x138)],_0x5493bd=_0x4ad253['id'],_0x151f08={'memberId':(await this['_sessionService']['requireSession'](_0x220fe1))[_0x3585ad(0x171)](),'unitId':_0x220fe1,'threadId':_0x58d693,'mention':_0x868e9b,'content':_0x5d912c,'replyId':_0x5493bd},_0x1a4f9e=await this[_0x3585ad(0x17c)][_0x3585ad(0x136)](_0x3585ad(0x17b)+_0x220fe1+'/edit',{'body':_0x151f08});return!_0x1a4f9e[_0x3585ad(0x17f)][_0x3585ad(0x159)]||_0x1a4f9e[_0x3585ad(0x17f)][_0x3585ad(0x159)][_0x3585ad(0x16f)]===0x1;}async[_0x483333(0x14f)](_0x1ebc1b){const _0x3e5f79=_0x483333,{unitId:_0xddf130}=_0x1ebc1b,_0x1763fc=_0x1ebc1b[_0x3e5f79(0x138)],_0x23b715={'memberId':this[_0x3e5f79(0x144)][_0x3e5f79(0x153)]()[_0x3e5f79(0x189)],'unitId':_0xddf130,'threadId':_0x1763fc,'solved':_0x1ebc1b['resolved']?I[_0x3e5f79(0x183)]:I[_0x3e5f79(0x179)]},_0x2cec7f=await this[_0x3e5f79(0x17c)]['post'](_0x3e5f79(0x17b)+_0xddf130+_0x3e5f79(0x169),{'body':_0x23b715});return!_0x2cec7f[_0x3e5f79(0x17f)][_0x3e5f79(0x159)]||_0x2cec7f[_0x3e5f79(0x17f)]['error'][_0x3e5f79(0x16f)]===0x1;}async[_0x483333(0x132)](_0x12bdf2,_0x176272,_0x25ce4a,_0x342009){const _0x5f5ccc=_0x483333,_0xf31bce={'memberId':(await this[_0x5f5ccc(0x131)]['requireSession'](_0x12bdf2))[_0x5f5ccc(0x171)](),'threadId':_0x25ce4a,'replyId':_0x342009,'unitId':_0x12bdf2},_0x16f61b=await this[_0x5f5ccc(0x17c)][_0x5f5ccc(0x136)](_0x5f5ccc(0x17b)+_0x12bdf2+_0x5f5ccc(0x176),{'body':_0xf31bce});return!_0x16f61b[_0x5f5ccc(0x17f)]['error']||_0x16f61b[_0x5f5ccc(0x17f)][_0x5f5ccc(0x159)][_0x5f5ccc(0x16f)]===0x1;}async[_0x483333(0x182)](_0x1d316d,_0x2a02ff,_0x232a56){const _0x1e934a=_0x483333,_0x5e6542={'unitId':_0x1d316d,'threadId':_0x232a56},_0x33bef3=await this[_0x1e934a(0x17c)][_0x1e934a(0x136)](_0x1e934a(0x17b)+_0x1d316d+_0x1e934a(0x164),{'body':_0x5e6542}),_0x42908b=_0x232a56['map'](_0x25a1b0=>ee(_0x33bef3[_0x1e934a(0x17f)][_0x1e934a(0x149)][_0x25a1b0],_0x1d316d,_0x2a02ff))[_0x1e934a(0x190)](Boolean);return Object[_0x1e934a(0x157)](_0x33bef3[_0x1e934a(0x17f)][_0x1e934a(0x16e)])[_0x1e934a(0x152)](_0x4516c0=>{const _0x27aa42=_0x1e934a;this['_userService'][_0x27aa42(0x140)](_0x4516c0);}),_0x42908b;}[_0x483333(0x154)](_0x5f0e3a){const _0x5726ee=_0x483333;return{'id':_0x5f0e3a['id'],'threadId':_0x5f0e3a[_0x5726ee(0x138)],'ref':_0x5f0e3a[_0x5726ee(0x13c)]};}};f=Q([_(0x0,_0x2f34bc(_0x4458a4)),_(0x1,_0x2f34bc(_0x274152)),_(0x2,_0x2f34bc(_0x11f1e5)),_(0x3,_0x2f34bc(_0x187dbd))],f);var re=Object[_0x483333(0x187)],te=(_0x195f12,_0xae5af3,_0x44c4a8,_0x489520)=>{const _0x38521a=_0x483333;for(var _0x225ef6=_0x489520>0x1?void 0x0:_0x489520?re(_0xae5af3,_0x44c4a8):_0xae5af3,_0x59dcf4=_0x195f12[_0x38521a(0x161)]-0x1,_0x37ee59;_0x59dcf4>=0x0;_0x59dcf4--)(_0x37ee59=_0x195f12[_0x59dcf4])&&(_0x225ef6=_0x37ee59(_0x225ef6)||_0x225ef6);return _0x225ef6;},N=(_0x2cbf95,_0x159fd1)=>(_0x491f68,_0x6ff239)=>_0x159fd1(_0x491f68,_0x6ff239,_0x2cbf95);function _0x1dcc(_0x2a0c89,_0x417328){const _0x59f6e6=_0x59f6();return _0x1dcc=function(_0x1dccb5,_0x34cd4d){_0x1dccb5=_0x1dccb5-0x12f;let _0x406a44=_0x59f6e6[_0x1dccb5];return _0x406a44;},_0x1dcc(_0x2a0c89,_0x417328);}function _0x59f6(){const _0x315cd6=['delete','error','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','thread-comment-data-source.config','slice','_initUserSync','content','customRanges','length','parentId','map','/list','552692zneFfD','disposeWithMe','rangeId','find','/solved','UNRECOGNIZED','replyId','9UlNiXP','Add','users','code','dataSource','getMemberID','getUnit','Delete','getComment','_injector','/delete','get','payload','OpenOrReOpen','Solve','/universer-api/comment/unit/','_httpService','unitId','comment','body','size','commentUpdate$','listComments','Solved','304635fIUNuT','updateComment','_config','getOwnPropertyDescriptor','UNIVER_UNKNOWN','userID','add','_threadCommentDataSourceService','2025163wkxCqy','_commentService','YYYY/MM/DD\x20HH:mm','rangeType','filter','1126dYojBG','user','subscribe','_sessionService','deleteComment','replies','type','_configService','post','createTimestamp','threadId','addComment','onReady','userId','ref','2791352xpBlVD','/add','Unknown','addUser','1159435egFapB','_init','solved','_userService','root','defineProperty','/reply','185xuDKjo','comments','Edit','COMMENT','parse','requireSession','_threadCommentModel','resolveComment','format','Reply','forEach','getCurrentUser','saveCommentToSnapshot','_initDataSource','543960WghTSy','values'];_0x59f6=function(){return _0x315cd6;};return _0x59f6();}let g=class extends _0x5b7dc8{constructor(_0x5f4574,_0x238a8b){const _0x391a9d=_0x483333;super(),this[_0x391a9d(0x18b)]=_0x5f4574,this['_threadCommentDataSource']=_0x238a8b,this[_0x391a9d(0x155)]();}[_0x483333(0x155)](){const _0x43d706=_0x483333;this[_0x43d706(0x18b)][_0x43d706(0x170)]=this['_threadCommentDataSource'],this[_0x43d706(0x18b)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x418647),N(0x1,_0x2f34bc(f))],g);var se=Object[_0x483333(0x146)],oe=Object[_0x483333(0x187)],ne=(_0x68d53e,_0x166080,_0x3d1666)=>_0x166080 in _0x68d53e?se(_0x68d53e,_0x166080,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d1666}):_0x68d53e[_0x166080]=_0x3d1666,ie=(_0x2607ec,_0x28df08,_0x53f7f0,_0x22496c)=>{const _0x57e338=_0x483333;for(var _0x1fbd4d=_0x22496c>0x1?void 0x0:_0x22496c?oe(_0x28df08,_0x53f7f0):_0x28df08,_0x33c2f8=_0x2607ec[_0x57e338(0x161)]-0x1,_0x3271c2;_0x33c2f8>=0x0;_0x33c2f8--)(_0x3271c2=_0x2607ec[_0x33c2f8])&&(_0x1fbd4d=_0x3271c2(_0x1fbd4d)||_0x1fbd4d);return _0x1fbd4d;},w=(_0x2716ed,_0x26a508)=>(_0x1effc4,_0x58238a)=>_0x26a508(_0x1effc4,_0x58238a,_0x2716ed),$=(_0x3ffeb5,_0x11385d,_0x3bc3a6)=>ne(_0x3ffeb5,typeof _0x11385d!='symbol'?_0x11385d+'':_0x11385d,_0x3bc3a6);let b=class extends _0x5b4da8{constructor(_0x94e6e8=M,_0x44e126,_0x574cb5){const _0x3497f6=_0x483333;super(),this['_config']=_0x94e6e8,this[_0x3497f6(0x175)]=_0x44e126,this[_0x3497f6(0x135)]=_0x574cb5;const {..._0x4272d3}=_0xaff30f({},M,this[_0x3497f6(0x186)]);this[_0x3497f6(0x135)]['setConfig'](z,_0x4272d3);}['onStarting'](){const _0x987f64=_0x483333;[[f],[g],[S]][_0x987f64(0x152)](_0x5e09f1=>{const _0x52b64d=_0x987f64;this[_0x52b64d(0x175)][_0x52b64d(0x18a)](_0x5e09f1);});}[_0x483333(0x13a)](){const _0x4dfbe6=_0x483333;this['_injector'][_0x4dfbe6(0x177)](g),this[_0x4dfbe6(0x175)][_0x4dfbe6(0x177)](S);}};$(b,'pluginName',W),$(b,'type',_0x370564[_0x483333(0x188)]),b=ie([_0x34f50e(_0x2d2160,_0xe8667c,_0x543dc4),w(0x1,_0x2f34bc(_0x187dbd)),w(0x2,_0x4f9a2b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xf624(){const _0x49718c=['parse','_injector','_initUserSync','Unknown','user','stringify','get','UNRECOGNIZED','_initDataSource','onReady','rangeType','Injector','resolved','_init','content','_threadCommentDataSource','toStringTag','delete','_sessionService','saveCommentToSnapshot','code','COMMENT','_threadCommentModel','userID','filter','@univerjs/core','replyId','function','type','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','/solved','requireSession','dataSource','getMemberID','Delete','add','_httpService','bufferTime','693513ZDIoJa','2529ZkXAOM','body','UniverLicensePlugin','_threadCommentDataSourceService','deleteComment','1702580yEUwlT','forEach','5AOuHHF','updateComment','UniverInstanceType','@univerjs-pro/collaboration-client','Module','getComment','UserManagerService','merge','values','createTimestamp','dayjs','UniverNetwork','symbol','_userService','@univerjs/thread-comment-ui','CustomRangeType','HTTPService','threadId','UniverThreadComment','Inject','post','1933870zGARjk','comment','userId','YYYY/MM/DD\x20HH:mm','_config','/add','Add','UniverThreadCommentUIPlugin','customRanges','UNIVER_UNKNOWN','syncUpdateMutationToColla','_commentService','pluginName','67176VwkSzW','error','listComments','getUnit','find','/reply','unitId','disposeWithMe','IThreadCommentDataSourceService','Solved','OpenOrReOpen','reply','map','270766PrIzSl','replies','exports','Solve','/universer-api/comment/unit/','length','UniverThreadCommentDataSourcePlugin','resolveComment','rangeId','IConfigService','onStarting','format','size','getCurrentUser','getOwnPropertyDescriptor','addComment','solved','comments','Reply','setConfig','addUser','Edit','users','Plugin','root','commentUpdate$','thread-comment-data-source.config','@univerjs/network','UniverCore','/list','rxjs','@univerjs-pro/license','pipe','1385508kIcVvj','1965929wUXjEZ','/universer-api/user/list','_configService','object','CommentService','ThreadCommentModel','slice'];_0xf624=function(){return _0x49718c;};return _0xf624();}function _0x14c5(_0x1e7471,_0x19ecf7){const _0xf62439=_0xf624();return _0x14c5=function(_0x14c5cf,_0x312a2b){_0x14c5cf=_0x14c5cf-0x70;let _0x5a969d=_0xf62439[_0x14c5cf];return _0x5a969d;},_0x14c5(_0x1e7471,_0x19ecf7);}(function(_0x2e1f11,_0x585d95){const _0x2eed4b=_0x14c5,_0x1060f2=_0x2e1f11();while(!![]){try{const _0x46ef7c=parseInt(_0x2eed4b(0x95))/0x1+-parseInt(_0x2eed4b(0x7b))/0x2+-parseInt(_0x2eed4b(0xe6))/0x3+-parseInt(_0x2eed4b(0xec))/0x4+-parseInt(_0x2eed4b(0xee))/0x5*(parseInt(_0x2eed4b(0xb6))/0x6)+-parseInt(_0x2eed4b(0xb7))/0x7+parseInt(_0x2eed4b(0x88))/0x8*(parseInt(_0x2eed4b(0xe7))/0x9);if(_0x46ef7c===_0x585d95)break;else _0x1060f2['push'](_0x1060f2['shift']());}catch(_0x3726ea){_0x1060f2['push'](_0x1060f2['shift']());}}}(_0xf624,0x78cd7),function(_0x476e56,_0x4e5e33){const _0x5d7530=_0x14c5;typeof exports==_0x5d7530(0xba)&&typeof module<'u'?_0x4e5e33(exports,require(_0x5d7530(0xf1)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x5d7530(0x74)),require(_0x5d7530(0xdb)),require(_0x5d7530(0xb3)),require('@univerjs/network')):typeof define==_0x5d7530(0xd9)&&define['amd']?define([_0x5d7530(0x97),_0x5d7530(0xf1),_0x5d7530(0xb4),_0x5d7530(0xd7),_0x5d7530(0x74),_0x5d7530(0xdb),_0x5d7530(0xb3),_0x5d7530(0xb0)],_0x4e5e33):(_0x476e56=typeof globalThis<'u'?globalThis:_0x476e56||self,_0x4e5e33(_0x476e56['UniverProThreadCommentDatasource']={},_0x476e56['UniverProCollaborationClient'],_0x476e56['UniverProLicense'],_0x476e56[_0x5d7530(0xb1)],_0x476e56['UniverThreadCommentUi'],_0x476e56[_0x5d7530(0x78)],_0x476e56[_0x5d7530(0xb3)],_0x476e56[_0x5d7530(0x71)]));}(this,function(_0x54c007,_0x297fa0,_0x567b1d,_0x4f678e,_0x314b58,_0x19f793,_0x3c2d3e,_0x29239b){'use strict';const _0xecd8a6=_0x14c5;const _0x433969=_0xecd8a6(0xdc);var _0x4404c4=(_0x67435=>(_0x67435[_0x67435[_0xecd8a6(0x92)]=0x0]=_0xecd8a6(0x92),_0x67435[_0x67435[_0xecd8a6(0x91)]=0x1]='Solved',_0x67435[_0x67435[_0xecd8a6(0xc5)]=-0x1]=_0xecd8a6(0xc5),_0x67435))(_0x4404c4||{}),_0x58703b=(_0x5be47f=>(_0x5be47f[_0x5be47f['Unknown']=0x0]=_0xecd8a6(0xc1),_0x5be47f[_0x5be47f[_0xecd8a6(0x81)]=0x1]='Add',_0x5be47f[_0x5be47f[_0xecd8a6(0xa7)]=0x2]=_0xecd8a6(0xa7),_0x5be47f[_0x5be47f['Edit']=0x3]=_0xecd8a6(0xaa),_0x5be47f[_0x5be47f[_0xecd8a6(0xe2)]=0x4]=_0xecd8a6(0xe2),_0x5be47f[_0x5be47f[_0xecd8a6(0x98)]=0x5]=_0xecd8a6(0x98),_0x5be47f[_0x5be47f['UNRECOGNIZED']=-0x1]=_0xecd8a6(0xc5),_0x5be47f))(_0x58703b||{});const _0x31876b=_0x315033=>_0x4f678e['dayjs'](new Date(+_0x315033))[_0xecd8a6(0xa0)](_0xecd8a6(0x7e)),_0x4e7493=async(_0x3ee5be,_0x373062)=>{const _0x19d94b=_0xecd8a6,_0x217e7e=_0x3ee5be[_0x19d94b(0xc4)](_0x4f678e[_0x19d94b(0xf4)]),_0x1516bf=_0x3ee5be['get'](_0x29239b[_0x19d94b(0x76)]);_0x373062[_0x19d94b(0xed)](_0x270fbc=>{const _0x837e94=_0x19d94b;_0x217e7e['getUser'](_0x270fbc)&&_0x373062[_0x837e94(0xcf)](_0x270fbc);}),_0x373062[_0x19d94b(0xa1)]&&(await _0x1516bf[_0x19d94b(0xc4)](_0x19d94b(0xb8),{'params':{'userIDs':[..._0x373062]}}))[_0x19d94b(0xe8)]['users'][_0x19d94b(0xed)](_0x200698=>{const _0x51c981=_0x19d94b;_0x200698&&_0x217e7e[_0x51c981(0xa9)](_0x200698);});};var _0x30313f=Object[_0xecd8a6(0xa3)],_0xbe7ab4=(_0x3b0eed,_0x197405,_0x35e478,_0x3379fe)=>{const _0x56e65e=_0xecd8a6;for(var _0x5da4fa=_0x3379fe>0x1?void 0x0:_0x3379fe?_0x30313f(_0x197405,_0x35e478):_0x197405,_0x2e773c=_0x3b0eed[_0x56e65e(0x9a)]-0x1,_0x29bd72;_0x2e773c>=0x0;_0x2e773c--)(_0x29bd72=_0x3b0eed[_0x2e773c])&&(_0x5da4fa=_0x29bd72(_0x5da4fa)||_0x5da4fa);return _0x5da4fa;},_0x4d4fbd=(_0x5c89c7,_0x182da4)=>(_0x418f4d,_0xe7fe90)=>_0x182da4(_0x418f4d,_0xe7fe90,_0x5c89c7);let _0x2f7fac=class extends _0x4f678e[_0xecd8a6(0xdd)]{constructor(_0x409840,_0xb10dbc,_0x32873d,_0x39f924){const _0x4fbfd5=_0xecd8a6;super(),this[_0x4fbfd5(0x86)]=_0x409840,this[_0x4fbfd5(0xd4)]=_0xb10dbc,this[_0x4fbfd5(0x73)]=_0x32873d,this[_0x4fbfd5(0xbf)]=_0x39f924,this[_0x4fbfd5(0xcb)](),this[_0x4fbfd5(0xc0)]();}[_0xecd8a6(0xc0)](){const _0x3da5f6=_0xecd8a6;this[_0x3da5f6(0x8f)](this[_0x3da5f6(0xd4)][_0x3da5f6(0xae)][_0x3da5f6(0xb5)](_0x3c2d3e[_0x3da5f6(0xe5)](0x10))['subscribe'](_0x437685=>{const _0x2cab87=_0x3da5f6,_0x28db8d=new Set();_0x437685[_0x2cab87(0xed)](_0x4520bf=>{const _0x2b2cbe=_0x2cab87;switch(_0x4520bf[_0x2b2cbe(0xda)]){case _0x2b2cbe(0xe3):{const _0x5b6be7=_0x4520bf['payload']['personId'];_0x28db8d[_0x2b2cbe(0xe3)](_0x5b6be7);break;}}}),_0x4e7493(this[_0x2cab87(0xbf)],_0x28db8d);}));}[_0xecd8a6(0xcb)](){const _0x3adb74=_0xecd8a6;this[_0x3adb74(0x8f)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4c6ba6=>{const _0x4eb332=_0x3adb74;var _0x108aac,_0x4f8ff0,_0x33921d,_0x110e34;const _0x438754=(_0x108aac=this[_0x4eb332(0xd4)][_0x4eb332(0x8b)](_0x4c6ba6[_0x4eb332(0x8e)])[_0x4eb332(0x8c)](_0xa97c90=>_0xa97c90[_0x4eb332(0x77)]===_0x4c6ba6[_0x4eb332(0x77)]))==null?void 0x0:_0x108aac[_0x4eb332(0xad)];if(!_0x438754)return;const {unitId:_0x2a19c7,subUnitId:_0x3739ad}=_0x438754;switch(_0x4c6ba6[_0x4eb332(0xc2)]&&this[_0x4eb332(0x73)][_0x4eb332(0xa9)](_0x4c6ba6[_0x4eb332(0xc2)]),_0x4c6ba6[_0x4eb332(0xda)]){case _0x58703b[_0x4eb332(0x81)]:break;case _0x58703b[_0x4eb332(0xa7)]:{this[_0x4eb332(0xd4)][_0x4eb332(0xa4)](_0x2a19c7,_0x3739ad,{'unitId':_0x2a19c7,'subUnitId':_0x3739ad,'ref':'','id':_0x4c6ba6[_0x4eb332(0xd8)],'dT':_0x31876b(+_0x4c6ba6['createTimestamp']),'threadId':_0x4c6ba6[_0x4eb332(0x77)],'personId':(_0x33921d=(_0x4f8ff0=_0x4c6ba6['user'])==null?void 0x0:_0x4f8ff0[_0x4eb332(0xd5)])!=null?_0x33921d:_0x4c6ba6[_0x4eb332(0x7d)],'text':JSON[_0x4eb332(0xbe)](_0x4c6ba6['content']),'parentId':_0x438754['id']});break;}case _0x58703b[_0x4eb332(0xe2)]:{const _0x2c7210=this[_0x4eb332(0xd4)][_0x4eb332(0xf3)](_0x2a19c7,_0x3739ad,_0x4c6ba6['replyId']);_0x2c7210&&_0x2c7210['parentId']&&this[_0x4eb332(0xd4)]['deleteComment'](_0x2a19c7,_0x3739ad,_0x4c6ba6[_0x4eb332(0xd8)]);break;}case _0x58703b[_0x4eb332(0xaa)]:{this[_0x4eb332(0xd4)][_0x4eb332(0xef)](_0x2a19c7,_0x3739ad,{'commentId':_0x4c6ba6[_0x4eb332(0xd8)],'text':JSON[_0x4eb332(0xbe)](_0x4c6ba6[_0x4eb332(0xcc)])});break;}case _0x58703b[_0x4eb332(0x98)]:{const _0x59b4dd=(_0x110e34=this['_threadCommentModel'][_0x4eb332(0x8b)](_0x4c6ba6[_0x4eb332(0x8e)])[_0x4eb332(0x8c)](_0x1ab50d=>_0x1ab50d[_0x4eb332(0x77)]===_0x4c6ba6[_0x4eb332(0x77)]))==null?void 0x0:_0x110e34['root'];_0x59b4dd&&this[_0x4eb332(0xd4)][_0x4eb332(0x9c)](_0x2a19c7,_0x3739ad,_0x59b4dd['id'],_0x4c6ba6[_0x4eb332(0xa5)]===_0x4404c4[_0x4eb332(0x91)]);break;}}}));}};_0x2f7fac=_0xbe7ab4([_0x4d4fbd(0x0,_0x4f678e[_0xecd8a6(0x79)](_0x297fa0[_0xecd8a6(0xbb)])),_0x4d4fbd(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x19f793[_0xecd8a6(0xbc)])),_0x4d4fbd(0x2,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xf4)])),_0x4d4fbd(0x3,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)]))],_0x2f7fac);const _0x51fd39=_0xecd8a6(0xaf),_0x1771f0={};var _0x5ddfc3=Object[_0xecd8a6(0xa3)],_0x5d6a98=(_0x396bd7,_0x1a82a1,_0x30c2a5,_0x110687)=>{const _0x3e52f9=_0xecd8a6;for(var _0x25a9f7=_0x110687>0x1?void 0x0:_0x110687?_0x5ddfc3(_0x1a82a1,_0x30c2a5):_0x1a82a1,_0xffbbef=_0x396bd7[_0x3e52f9(0x9a)]-0x1,_0x3c8472;_0xffbbef>=0x0;_0xffbbef--)(_0x3c8472=_0x396bd7[_0xffbbef])&&(_0x25a9f7=_0x3c8472(_0x25a9f7)||_0x25a9f7);return _0x25a9f7;},_0x2e891c=(_0x4b55d5,_0x453bc3)=>(_0x48438e,_0x5b1799)=>_0x453bc3(_0x48438e,_0x5b1799,_0x4b55d5);function _0x51f17d(_0xd20b89,_0x1e17a3){const _0x2b0048=_0xecd8a6,_0x49bff5=_0xd20b89[_0x2b0048(0x96)][0x0];return{..._0x1e17a3,'id':_0x49bff5[_0x2b0048(0xd8)],'resolved':_0xd20b89['solved']===0x1,'dT':_0x31876b(_0x49bff5[_0x2b0048(0xf7)]),'personId':_0x49bff5['userId'],'threadId':_0x49bff5[_0x2b0048(0x77)]};}function _0xdd07b1(_0xeba3e5,_0x5ede74,_0x1ec363){const _0x4a62d3=_0xecd8a6;var _0x15af35,_0x194347;if(((_0x194347=(_0x15af35=_0xeba3e5==null?void 0x0:_0xeba3e5[_0x4a62d3(0x96)])==null?void 0x0:_0x15af35[_0x4a62d3(0x9a)])!=null?_0x194347:0x0)>0x0){const _0x4db262=(_0x578ed2,_0x284c76)=>({'id':_0x578ed2[_0x4a62d3(0xd8)],'threadId':_0x578ed2[_0x4a62d3(0x77)],'dT':_0x31876b(_0x578ed2['createTimestamp']),'personId':_0x578ed2[_0x4a62d3(0x7d)],'resolved':_0xeba3e5[_0x4a62d3(0xa5)]===_0x4404c4[_0x4a62d3(0x91)],'unitId':_0x5ede74,'subUnitId':_0x1ec363,'text':JSON[_0x4a62d3(0xbe)](_0x578ed2[_0x4a62d3(0xcc)]),'parentId':_0x284c76}),_0xc1b7df=_0x4db262(_0xeba3e5[_0x4a62d3(0x96)][0x0]);return{..._0xc1b7df,'children':_0xeba3e5[_0x4a62d3(0x96)][_0x4a62d3(0xbd)](0x1)[_0x4a62d3(0x94)](_0x245371=>_0x4db262(_0x245371,_0xc1b7df['id']))};}return null;}let _0x4812c0=class{constructor(_0xdf6632,_0x2e298b,_0x3b1586,_0x32b9da){const _0x52f307=_0xecd8a6;this['_httpService']=_0xdf6632,this['_userService']=_0x2e298b,this[_0x52f307(0xd0)]=_0x3b1586,this[_0x52f307(0xbf)]=_0x32b9da;}async[_0xecd8a6(0xa4)](_0x54d273){const _0x2bd420=_0xecd8a6;var _0x2b59d3,_0x382172;const {parentId:_0x3d0002,unitId:_0xf98ff4,text:_0x220d89,threadId:_0x325971}=_0x54d273,_0xaddef5=(_0x382172=(_0x2b59d3=_0x220d89[_0x2bd420(0x83)])==null?void 0x0:_0x2b59d3[_0x2bd420(0xd6)](_0x37d49b=>_0x37d49b[_0x2bd420(0xc8)]===_0x4f678e[_0x2bd420(0x75)]['COMMENT'])[_0x2bd420(0x94)](_0x56f050=>_0x56f050[_0x2bd420(0x9d)]))!=null?_0x382172:[],_0x44db78=JSON['stringify'](_0x220d89),_0x13b30f=(await this[_0x2bd420(0xd0)][_0x2bd420(0xdf)](_0xf98ff4))[_0x2bd420(0xe1)]();if(_0x3d0002){const _0x18d117={'memberId':_0x13b30f,'unitId':_0xf98ff4,'content':_0x44db78,'mention':_0xaddef5,'threadId':_0x325971},_0x2bcdb2=(await this[_0x2bd420(0xe4)][_0x2bd420(0x7a)](_0x2bd420(0x99)+_0xf98ff4+_0x2bd420(0x8d),{'body':_0x18d117}))['body'][_0x2bd420(0x93)];return{..._0x54d273,'id':_0x2bcdb2[_0x2bd420(0xd8)],'dT':_0x4f678e[_0x2bd420(0x70)](+_0x2bcdb2[_0x2bd420(0xf7)])[_0x2bd420(0xa0)](_0x2bd420(0x7e)),'personId':_0x2bcdb2[_0x2bd420(0x7d)]};}else{const _0x25b8fc={'memberId':_0x13b30f,'unitId':_0xf98ff4,'content':_0x44db78,'mention':_0xaddef5},_0x317bac=await this['_httpService'][_0x2bd420(0x7a)](_0x2bd420(0x99)+_0xf98ff4+_0x2bd420(0x80),{'body':_0x25b8fc});return _0x51f17d(_0x317bac[_0x2bd420(0xe8)][_0x2bd420(0x7c)],_0x54d273);}}async['updateComment'](_0x32f9d4){const _0x2998ac=_0xecd8a6;var _0x18f582,_0x3c0933;const {text:_0x5ecbe9,unitId:_0x4b2f44}=_0x32f9d4,_0x29b7c5=(_0x3c0933=(_0x18f582=_0x5ecbe9[_0x2998ac(0x83)])==null?void 0x0:_0x18f582[_0x2998ac(0xd6)](_0x5b5980=>_0x5b5980[_0x2998ac(0xc8)]===_0x4f678e[_0x2998ac(0x75)][_0x2998ac(0xd3)])[_0x2998ac(0x94)](_0x25b820=>_0x25b820['rangeId']))!=null?_0x3c0933:[],_0x1a80f7=JSON[_0x2998ac(0xc3)](_0x5ecbe9),_0x47ca28=_0x32f9d4[_0x2998ac(0x77)],_0x2d9156=_0x32f9d4['id'],_0xaefec3={'memberId':(await this[_0x2998ac(0xd0)][_0x2998ac(0xdf)](_0x4b2f44))[_0x2998ac(0xe1)](),'unitId':_0x4b2f44,'threadId':_0x47ca28,'mention':_0x29b7c5,'content':_0x1a80f7,'replyId':_0x2d9156},_0x2acadd=await this[_0x2998ac(0xe4)][_0x2998ac(0x7a)](_0x2998ac(0x99)+_0x4b2f44+'/edit',{'body':_0xaefec3});return!_0x2acadd['body'][_0x2998ac(0x89)]||_0x2acadd[_0x2998ac(0xe8)][_0x2998ac(0x89)][_0x2998ac(0xd2)]===0x1;}async[_0xecd8a6(0x9c)](_0x1799be){const _0x8ec90a=_0xecd8a6,{unitId:_0x3c0c17}=_0x1799be,_0x36d459=_0x1799be[_0x8ec90a(0x77)],_0x9f0917={'memberId':this[_0x8ec90a(0x73)][_0x8ec90a(0xa2)]()['userID'],'unitId':_0x3c0c17,'threadId':_0x36d459,'solved':_0x1799be[_0x8ec90a(0xca)]?_0x4404c4[_0x8ec90a(0x91)]:_0x4404c4[_0x8ec90a(0x92)]},_0x10d396=await this['_httpService'][_0x8ec90a(0x7a)](_0x8ec90a(0x99)+_0x3c0c17+_0x8ec90a(0xde),{'body':_0x9f0917});return!_0x10d396['body']['error']||_0x10d396['body'][_0x8ec90a(0x89)][_0x8ec90a(0xd2)]===0x1;}async[_0xecd8a6(0xeb)](_0x5ae819,_0x54e95c,_0x39b07a,_0x2de289){const _0x20bcb9=_0xecd8a6,_0x311646={'memberId':(await this[_0x20bcb9(0xd0)][_0x20bcb9(0xdf)](_0x5ae819))[_0x20bcb9(0xe1)](),'threadId':_0x39b07a,'replyId':_0x2de289,'unitId':_0x5ae819},_0x1d316f=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5ae819+'/delete',{'body':_0x311646});return!_0x1d316f[_0x20bcb9(0xe8)]['error']||_0x1d316f[_0x20bcb9(0xe8)][_0x20bcb9(0x89)]['code']===0x1;}async[_0xecd8a6(0x8a)](_0x11a303,_0x1a8e5b,_0x1055e4){const _0x5e7590=_0xecd8a6,_0x1d10e7={'unitId':_0x11a303,'threadId':_0x1055e4},_0x3a530b=await this[_0x5e7590(0xe4)][_0x5e7590(0x7a)]('/universer-api/comment/unit/'+_0x11a303+_0x5e7590(0xb2),{'body':_0x1d10e7}),_0x1bc4df=_0x1055e4[_0x5e7590(0x94)](_0x8d8b54=>_0xdd07b1(_0x3a530b[_0x5e7590(0xe8)][_0x5e7590(0xa6)][_0x8d8b54],_0x11a303,_0x1a8e5b))[_0x5e7590(0xd6)](Boolean);return Object[_0x5e7590(0xf6)](_0x3a530b[_0x5e7590(0xe8)][_0x5e7590(0xab)])[_0x5e7590(0xed)](_0x910a79=>{const _0x1a434b=_0x5e7590;this['_userService'][_0x1a434b(0xa9)](_0x910a79);}),_0x1bc4df;}[_0xecd8a6(0xd1)](_0x4a8f9f){const _0x392bdb=_0xecd8a6;return{'id':_0x4a8f9f['id'],'threadId':_0x4a8f9f[_0x392bdb(0x77)],'ref':_0x4a8f9f['ref']};}};_0x4812c0=_0x5d6a98([_0x2e891c(0x0,_0x4f678e[_0xecd8a6(0x79)](_0x29239b[_0xecd8a6(0x76)])),_0x2e891c(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x4f678e[_0xecd8a6(0xf4)])),_0x2e891c(0x2,_0x4f678e[_0xecd8a6(0x79)](_0x297fa0['CollaborationSessionService'])),_0x2e891c(0x3,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)]))],_0x4812c0);var _0x441abc=Object[_0xecd8a6(0xa3)],_0x4a6d61=(_0x28ac50,_0x286e59,_0x137208,_0x414a3b)=>{for(var _0x1ecf72=_0x414a3b>0x1?void 0x0:_0x414a3b?_0x441abc(_0x286e59,_0x137208):_0x286e59,_0x103573=_0x28ac50['length']-0x1,_0x9bd027;_0x103573>=0x0;_0x103573--)(_0x9bd027=_0x28ac50[_0x103573])&&(_0x1ecf72=_0x9bd027(_0x1ecf72)||_0x1ecf72);return _0x1ecf72;},_0x2755fa=(_0x42fa48,_0x13dd3b)=>(_0x2f2703,_0x39dc82)=>_0x13dd3b(_0x2f2703,_0x39dc82,_0x42fa48);let _0x3ff752=class extends _0x4f678e['Disposable']{constructor(_0x265f72,_0x39ec6b){const _0x2d2f57=_0xecd8a6;super(),this[_0x2d2f57(0xea)]=_0x265f72,this[_0x2d2f57(0xcd)]=_0x39ec6b,this[_0x2d2f57(0xc6)]();}[_0xecd8a6(0xc6)](){const _0x3d6f6d=_0xecd8a6;this[_0x3d6f6d(0xea)][_0x3d6f6d(0xe0)]=this[_0x3d6f6d(0xcd)],this[_0x3d6f6d(0xea)][_0x3d6f6d(0x85)]=!0x1;}};_0x3ff752=_0x4a6d61([_0x2755fa(0x0,_0x19f793[_0xecd8a6(0x90)]),_0x2755fa(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x4812c0))],_0x3ff752);var _0x4ff897=Object['defineProperty'],_0x427f4b=Object[_0xecd8a6(0xa3)],_0x27df74=(_0x16936d,_0x2ddd97,_0xf33056)=>_0x2ddd97 in _0x16936d?_0x4ff897(_0x16936d,_0x2ddd97,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf33056}):_0x16936d[_0x2ddd97]=_0xf33056,_0x3de770=(_0x32f6be,_0x365dd8,_0xab4e91,_0x6fffbb)=>{const _0x5c7c64=_0xecd8a6;for(var _0x113f13=_0x6fffbb>0x1?void 0x0:_0x6fffbb?_0x427f4b(_0x365dd8,_0xab4e91):_0x365dd8,_0x416272=_0x32f6be[_0x5c7c64(0x9a)]-0x1,_0x401736;_0x416272>=0x0;_0x416272--)(_0x401736=_0x32f6be[_0x416272])&&(_0x113f13=_0x401736(_0x113f13)||_0x113f13);return _0x113f13;},_0x5d5747=(_0x119052,_0xe19675)=>(_0x2f19ee,_0x2652b0)=>_0xe19675(_0x2f19ee,_0x2652b0,_0x119052),_0x4f6209=(_0x2d65fc,_0x26c4e9,_0x30d1a8)=>_0x27df74(_0x2d65fc,typeof _0x26c4e9!=_0xecd8a6(0x72)?_0x26c4e9+'':_0x26c4e9,_0x30d1a8);_0x54c007[_0xecd8a6(0x9b)]=class extends _0x4f678e[_0xecd8a6(0xac)]{constructor(_0xf59df9=_0x1771f0,_0x41c68d,_0x2eae1f){const _0x120bc0=_0xecd8a6;super(),this[_0x120bc0(0x7f)]=_0xf59df9,this[_0x120bc0(0xbf)]=_0x41c68d,this[_0x120bc0(0xb9)]=_0x2eae1f;const {..._0x2e8fe6}=_0x4f678e[_0x120bc0(0xf5)]({},_0x1771f0,this[_0x120bc0(0x7f)]);this['_configService'][_0x120bc0(0xa8)](_0x51fd39,_0x2e8fe6);}[_0xecd8a6(0x9f)](){const _0x45e78e=_0xecd8a6;[[_0x4812c0],[_0x3ff752],[_0x2f7fac]][_0x45e78e(0xed)](_0x11f72b=>{const _0x580b88=_0x45e78e;this[_0x580b88(0xbf)]['add'](_0x11f72b);});}[_0xecd8a6(0xc7)](){const _0x29d21c=_0xecd8a6;this[_0x29d21c(0xbf)][_0x29d21c(0xc4)](_0x3ff752),this[_0x29d21c(0xbf)][_0x29d21c(0xc4)](_0x2f7fac);}},_0x4f6209(_0x54c007[_0xecd8a6(0x9b)],_0xecd8a6(0x87),_0x433969),_0x4f6209(_0x54c007[_0xecd8a6(0x9b)],_0xecd8a6(0xda),_0x4f678e[_0xecd8a6(0xf0)][_0xecd8a6(0x84)]),_0x54c007[_0xecd8a6(0x9b)]=_0x3de770([_0x4f678e['DependentOn'](_0x314b58[_0xecd8a6(0x82)],_0x297fa0['UniverCollaborationClientPlugin'],_0x567b1d[_0xecd8a6(0xe9)]),_0x5d5747(0x1,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)])),_0x5d5747(0x2,_0x4f678e[_0xecd8a6(0x9e)])],_0x54c007[_0xecd8a6(0x9b)]),Object['defineProperty'](_0x54c007,Symbol[_0xecd8a6(0xce)],{'value':_0xecd8a6(0xf2)});}));
1
+ function _0x2c71(_0x5bdd4d,_0x48178b){const _0x1c0ad4=_0x1c0a();return _0x2c71=function(_0x2c7147,_0x251777){_0x2c7147=_0x2c7147-0x100;let _0x2e197b=_0x1c0ad4[_0x2c7147];return _0x2e197b;},_0x2c71(_0x5bdd4d,_0x48178b);}(function(_0x3cc94a,_0x1eeab1){const _0x2622c8=_0x2c71,_0x2bddb2=_0x3cc94a();while(!![]){try{const _0x1bdbb1=-parseInt(_0x2622c8(0x102))/0x1+parseInt(_0x2622c8(0x164))/0x2+-parseInt(_0x2622c8(0x17d))/0x3*(-parseInt(_0x2622c8(0x162))/0x4)+-parseInt(_0x2622c8(0x133))/0x5+-parseInt(_0x2622c8(0x120))/0x6*(-parseInt(_0x2622c8(0x11e))/0x7)+parseInt(_0x2622c8(0x128))/0x8+parseInt(_0x2622c8(0x105))/0x9;if(_0x1bdbb1===_0x1eeab1)break;else _0x2bddb2['push'](_0x2bddb2['shift']());}catch(_0x1f948b){_0x2bddb2['push'](_0x2bddb2['shift']());}}}(_0x1c0a,0xbecf2),function(_0x488804,_0xcdf29d){const _0x10f6ed=_0x2c71;typeof exports==_0x10f6ed(0x110)&&typeof module<'u'?_0xcdf29d(exports,require(_0x10f6ed(0x12a)),require(_0x10f6ed(0x14f)),require(_0x10f6ed(0x16b)),require('@univerjs/thread-comment-ui'),require(_0x10f6ed(0x12e)),require('rxjs'),require(_0x10f6ed(0x13c))):typeof define==_0x10f6ed(0x126)&&define['amd']?define([_0x10f6ed(0x11a),'@univerjs-pro/collaboration-client',_0x10f6ed(0x14f),_0x10f6ed(0x16b),'@univerjs/thread-comment-ui',_0x10f6ed(0x12e),_0x10f6ed(0x16e),_0x10f6ed(0x13c)],_0xcdf29d):(_0x488804=typeof globalThis<'u'?globalThis:_0x488804||self,_0xcdf29d(_0x488804[_0x10f6ed(0x104)]={},_0x488804[_0x10f6ed(0x10d)],_0x488804[_0x10f6ed(0x130)],_0x488804['UniverCore'],_0x488804['UniverThreadCommentUi'],_0x488804[_0x10f6ed(0x156)],_0x488804[_0x10f6ed(0x16e)],_0x488804[_0x10f6ed(0x155)]));}(this,function(_0x42cf1e,_0x720bac,_0x341c64,_0x2073df,_0x3db1c4,_0x28ce05,_0x387dcd,_0x494454){'use strict';const _0x3f730d=_0x2c71;const _0x505696=_0x3f730d(0x17e);var _0x440524=(_0x16e2f7=>(_0x16e2f7[_0x16e2f7[_0x3f730d(0x148)]=0x0]=_0x3f730d(0x148),_0x16e2f7[_0x16e2f7[_0x3f730d(0x179)]=0x1]='Solved',_0x16e2f7[_0x16e2f7[_0x3f730d(0x160)]=-0x1]=_0x3f730d(0x160),_0x16e2f7))(_0x440524||{}),_0x2cbd43=(_0x22df9c=>(_0x22df9c[_0x22df9c[_0x3f730d(0x17b)]=0x0]='Unknown',_0x22df9c[_0x22df9c[_0x3f730d(0x169)]=0x1]=_0x3f730d(0x169),_0x22df9c[_0x22df9c[_0x3f730d(0x10b)]=0x2]=_0x3f730d(0x10b),_0x22df9c[_0x22df9c[_0x3f730d(0x12c)]=0x3]=_0x3f730d(0x12c),_0x22df9c[_0x22df9c[_0x3f730d(0x150)]=0x4]=_0x3f730d(0x150),_0x22df9c[_0x22df9c[_0x3f730d(0x13d)]=0x5]=_0x3f730d(0x13d),_0x22df9c[_0x22df9c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22df9c))(_0x2cbd43||{});const _0x140793=_0xe62cba=>_0x2073df['dayjs'](new Date(+_0xe62cba))[_0x3f730d(0x163)](_0x3f730d(0x16d)),_0x50a905=async(_0x15e8ca,_0x424937)=>{const _0x5d7861=_0x3f730d,_0x2692ad=_0x15e8ca[_0x5d7861(0x12d)](_0x2073df[_0x5d7861(0x115)]),_0x551500=_0x15e8ca[_0x5d7861(0x12d)](_0x494454[_0x5d7861(0x117)]);_0x424937[_0x5d7861(0x165)](_0x1221ad=>{const _0x4dde7b=_0x5d7861;_0x2692ad[_0x4dde7b(0x107)](_0x1221ad)&&_0x424937[_0x4dde7b(0x14c)](_0x1221ad);}),_0x424937[_0x5d7861(0x119)]&&(await _0x551500[_0x5d7861(0x12d)](_0x5d7861(0x181),{'params':{'userIDs':[..._0x424937]}}))['body'][_0x5d7861(0x14e)][_0x5d7861(0x165)](_0x26f3be=>{_0x26f3be&&_0x2692ad['addUser'](_0x26f3be);});};var _0x46c0c6=Object['getOwnPropertyDescriptor'],_0x393527=(_0x3d0541,_0xf254f8,_0x55e407,_0x226ec3)=>{for(var _0x3cbb4a=_0x226ec3>0x1?void 0x0:_0x226ec3?_0x46c0c6(_0xf254f8,_0x55e407):_0xf254f8,_0x1b8c7e=_0x3d0541['length']-0x1,_0x200948;_0x1b8c7e>=0x0;_0x1b8c7e--)(_0x200948=_0x3d0541[_0x1b8c7e])&&(_0x3cbb4a=_0x200948(_0x3cbb4a)||_0x3cbb4a);return _0x3cbb4a;},_0xa30211=(_0xe292c3,_0x55c16a)=>(_0x9542b,_0x54dfab)=>_0x55c16a(_0x9542b,_0x54dfab,_0xe292c3);let _0x59198f=class extends _0x2073df['Disposable']{constructor(_0x3c9d16,_0x1508aa,_0x7f72b6,_0x433104){const _0x3ad9f9=_0x3f730d;super(),this[_0x3ad9f9(0x175)]=_0x3c9d16,this[_0x3ad9f9(0x140)]=_0x1508aa,this['_userService']=_0x7f72b6,this[_0x3ad9f9(0x10c)]=_0x433104,this[_0x3ad9f9(0x141)](),this[_0x3ad9f9(0x149)]();}[_0x3f730d(0x149)](){const _0x4efe30=_0x3f730d;this[_0x4efe30(0x13b)](this[_0x4efe30(0x140)]['commentUpdate$'][_0x4efe30(0x145)](_0x387dcd[_0x4efe30(0x176)](0x10))['subscribe'](_0x113eb4=>{const _0x979a02=_0x4efe30,_0xbc861a=new Set();_0x113eb4[_0x979a02(0x165)](_0x1cfe66=>{const _0x53e071=_0x979a02;switch(_0x1cfe66[_0x53e071(0x100)]){case _0x53e071(0x11d):{const _0x191727=_0x1cfe66[_0x53e071(0x161)]['personId'];_0xbc861a[_0x53e071(0x11d)](_0x191727);break;}}}),_0x50a905(this[_0x979a02(0x10c)],_0xbc861a);}));}[_0x3f730d(0x141)](){const _0x12e1ac=_0x3f730d;this[_0x12e1ac(0x13b)](this['_commentService'][_0x12e1ac(0x114)][_0x12e1ac(0x132)](async _0x17f560=>{const _0x1d02e5=_0x12e1ac;var _0x2841fa,_0x1d7f9c,_0x370125,_0x1d959c;const _0x22baae=(_0x2841fa=this[_0x1d02e5(0x140)][_0x1d02e5(0x158)](_0x17f560[_0x1d02e5(0x10f)])[_0x1d02e5(0x172)](_0x518357=>_0x518357['threadId']===_0x17f560[_0x1d02e5(0x153)]))==null?void 0x0:_0x2841fa[_0x1d02e5(0x129)];if(!_0x22baae)return;const {unitId:_0x54e24e,subUnitId:_0x13fb32}=_0x22baae;switch(_0x17f560['user']&&this[_0x1d02e5(0x12b)][_0x1d02e5(0x152)](_0x17f560[_0x1d02e5(0x10a)]),_0x17f560[_0x1d02e5(0x100)]){case _0x2cbd43[_0x1d02e5(0x169)]:break;case _0x2cbd43[_0x1d02e5(0x10b)]:{this[_0x1d02e5(0x140)][_0x1d02e5(0x137)](_0x54e24e,_0x13fb32,{'unitId':_0x54e24e,'subUnitId':_0x13fb32,'ref':'','id':_0x17f560[_0x1d02e5(0x125)],'dT':_0x140793(+_0x17f560[_0x1d02e5(0x147)]),'threadId':_0x17f560[_0x1d02e5(0x153)],'personId':(_0x370125=(_0x1d7f9c=_0x17f560['user'])==null?void 0x0:_0x1d7f9c['userID'])!=null?_0x370125:_0x17f560['userId'],'text':JSON[_0x1d02e5(0x13f)](_0x17f560[_0x1d02e5(0x138)]),'parentId':_0x22baae['id']});break;}case _0x2cbd43[_0x1d02e5(0x150)]:{const _0x3a588f=this['_threadCommentModel'][_0x1d02e5(0x17f)](_0x54e24e,_0x13fb32,_0x17f560[_0x1d02e5(0x125)]);_0x3a588f&&_0x3a588f[_0x1d02e5(0x151)]&&this[_0x1d02e5(0x140)]['deleteComment'](_0x54e24e,_0x13fb32,_0x17f560[_0x1d02e5(0x125)]);break;}case _0x2cbd43['Edit']:{this['_threadCommentModel']['updateComment'](_0x54e24e,_0x13fb32,{'commentId':_0x17f560[_0x1d02e5(0x125)],'text':JSON[_0x1d02e5(0x13f)](_0x17f560['content'])});break;}case _0x2cbd43[_0x1d02e5(0x13d)]:{const _0x54495f=(_0x1d959c=this[_0x1d02e5(0x140)][_0x1d02e5(0x158)](_0x17f560[_0x1d02e5(0x10f)])[_0x1d02e5(0x172)](_0x31dacf=>_0x31dacf['threadId']===_0x17f560[_0x1d02e5(0x153)]))==null?void 0x0:_0x1d959c['root'];_0x54495f&&this[_0x1d02e5(0x140)][_0x1d02e5(0x122)](_0x54e24e,_0x13fb32,_0x54495f['id'],_0x17f560[_0x1d02e5(0x154)]===_0x440524[_0x1d02e5(0x179)]);break;}}}));}};_0x59198f=_0x393527([_0xa30211(0x0,_0x2073df[_0x3f730d(0x108)](_0x720bac[_0x3f730d(0x111)])),_0xa30211(0x1,_0x2073df[_0x3f730d(0x108)](_0x28ce05[_0x3f730d(0x16f)])),_0xa30211(0x2,_0x2073df[_0x3f730d(0x108)](_0x2073df['UserManagerService'])),_0xa30211(0x3,_0x2073df[_0x3f730d(0x108)](_0x2073df['Injector']))],_0x59198f);const _0x57eba8='thread-comment-data-source.config',_0x11c6a8={};var _0x4392b5=Object[_0x3f730d(0x146)],_0x495825=(_0x54552d,_0x3bfa4d,_0x232a9c,_0x20ee0d)=>{const _0x447e04=_0x3f730d;for(var _0x3a4e3c=_0x20ee0d>0x1?void 0x0:_0x20ee0d?_0x4392b5(_0x3bfa4d,_0x232a9c):_0x3bfa4d,_0x3ad5f8=_0x54552d[_0x447e04(0x10e)]-0x1,_0x5331a7;_0x3ad5f8>=0x0;_0x3ad5f8--)(_0x5331a7=_0x54552d[_0x3ad5f8])&&(_0x3a4e3c=_0x5331a7(_0x3a4e3c)||_0x3a4e3c);return _0x3a4e3c;},_0x53f2fc=(_0x5544d3,_0xb285f3)=>(_0x49b9e5,_0x16d12b)=>_0xb285f3(_0x49b9e5,_0x16d12b,_0x5544d3);function _0x50cfdb(_0x94792e,_0x3cae7f){const _0x38ceec=_0x3f730d,_0x137bb1=_0x94792e['replies'][0x0];return{..._0x3cae7f,'id':_0x137bb1[_0x38ceec(0x125)],'resolved':_0x94792e[_0x38ceec(0x154)]===0x1,'dT':_0x140793(_0x137bb1['createTimestamp']),'personId':_0x137bb1[_0x38ceec(0x113)],'threadId':_0x137bb1['threadId']};}function _0x57195f(_0x4ecafe,_0x3dea0b,_0x2150e8){const _0x46bfdb=_0x3f730d;var _0xf99fb6,_0x3854c4;if(((_0x3854c4=(_0xf99fb6=_0x4ecafe==null?void 0x0:_0x4ecafe['replies'])==null?void 0x0:_0xf99fb6[_0x46bfdb(0x10e)])!=null?_0x3854c4:0x0)>0x0){const _0x4f780c=(_0x379d4e,_0x32ae65)=>({'id':_0x379d4e[_0x46bfdb(0x125)],'threadId':_0x379d4e[_0x46bfdb(0x153)],'dT':_0x140793(_0x379d4e['createTimestamp']),'personId':_0x379d4e[_0x46bfdb(0x113)],'resolved':_0x4ecafe[_0x46bfdb(0x154)]===_0x440524[_0x46bfdb(0x179)],'unitId':_0x3dea0b,'subUnitId':_0x2150e8,'text':JSON[_0x46bfdb(0x13f)](_0x379d4e[_0x46bfdb(0x138)]),'parentId':_0x32ae65}),_0x10f50e=_0x4f780c(_0x4ecafe[_0x46bfdb(0x127)][0x0]);return{..._0x10f50e,'children':_0x4ecafe[_0x46bfdb(0x127)]['slice'](0x1)[_0x46bfdb(0x15d)](_0x2de437=>_0x4f780c(_0x2de437,_0x10f50e['id']))};}return null;}let _0xb9472=class{constructor(_0x42a062,_0x349f23,_0x223c1a,_0x1dd666){const _0x3e214c=_0x3f730d;this['_httpService']=_0x42a062,this[_0x3e214c(0x12b)]=_0x349f23,this[_0x3e214c(0x180)]=_0x223c1a,this[_0x3e214c(0x10c)]=_0x1dd666;}async['addComment'](_0x13491e){const _0x3a62b3=_0x3f730d;var _0x5355df,_0x1a1c84;const {parentId:_0x25b3e0,unitId:_0x3cb75a,text:_0x7d467a,threadId:_0x4e2875}=_0x13491e,_0xca4cf6=(_0x1a1c84=(_0x5355df=_0x7d467a['customRanges'])==null?void 0x0:_0x5355df[_0x3a62b3(0x109)](_0x1be856=>_0x1be856['rangeType']===_0x2073df[_0x3a62b3(0x167)][_0x3a62b3(0x131)])['map'](_0x136287=>_0x136287[_0x3a62b3(0x144)]))!=null?_0x1a1c84:[],_0x5df2e2=JSON[_0x3a62b3(0x11b)](_0x7d467a),_0x25b47e=(await this[_0x3a62b3(0x180)][_0x3a62b3(0x135)](_0x3cb75a))[_0x3a62b3(0x178)]();if(_0x25b3e0){const _0x57dcc3={'memberId':_0x25b47e,'unitId':_0x3cb75a,'content':_0x5df2e2,'mention':_0xca4cf6,'threadId':_0x4e2875},_0x2ac265=(await this[_0x3a62b3(0x139)][_0x3a62b3(0x103)](_0x3a62b3(0x143)+_0x3cb75a+_0x3a62b3(0x13a),{'body':_0x57dcc3}))['body']['reply'];return{..._0x13491e,'id':_0x2ac265[_0x3a62b3(0x125)],'dT':_0x2073df[_0x3a62b3(0x159)](+_0x2ac265['createTimestamp'])[_0x3a62b3(0x163)](_0x3a62b3(0x16d)),'personId':_0x2ac265['userId']};}else{const _0x5af475={'memberId':_0x25b47e,'unitId':_0x3cb75a,'content':_0x5df2e2,'mention':_0xca4cf6},_0x2e6449=await this[_0x3a62b3(0x139)][_0x3a62b3(0x103)](_0x3a62b3(0x143)+_0x3cb75a+_0x3a62b3(0x101),{'body':_0x5af475});return _0x50cfdb(_0x2e6449['body']['comment'],_0x13491e);}}async[_0x3f730d(0x14d)](_0x1d2369){const _0x4703cb=_0x3f730d;var _0x5cebbb,_0x348eec;const {text:_0x24774b,unitId:_0xf8aca9}=_0x1d2369,_0x752ccc=(_0x348eec=(_0x5cebbb=_0x24774b[_0x4703cb(0x134)])==null?void 0x0:_0x5cebbb[_0x4703cb(0x109)](_0x219e8c=>_0x219e8c['rangeType']===_0x2073df[_0x4703cb(0x167)][_0x4703cb(0x131)])['map'](_0x1cbfe7=>_0x1cbfe7[_0x4703cb(0x144)]))!=null?_0x348eec:[],_0x4c9b9b=JSON[_0x4703cb(0x11b)](_0x24774b),_0x46d5dc=_0x1d2369[_0x4703cb(0x153)],_0x5a38fe=_0x1d2369['id'],_0x313f61={'memberId':(await this[_0x4703cb(0x180)][_0x4703cb(0x135)](_0xf8aca9))[_0x4703cb(0x178)](),'unitId':_0xf8aca9,'threadId':_0x46d5dc,'mention':_0x752ccc,'content':_0x4c9b9b,'replyId':_0x5a38fe},_0x29f270=await this[_0x4703cb(0x139)][_0x4703cb(0x103)](_0x4703cb(0x143)+_0xf8aca9+_0x4703cb(0x14a),{'body':_0x313f61});return!_0x29f270[_0x4703cb(0x136)][_0x4703cb(0x13e)]||_0x29f270[_0x4703cb(0x136)]['error']['code']===0x1;}async[_0x3f730d(0x122)](_0xd3512){const _0x445264=_0x3f730d,{unitId:_0x49b57b}=_0xd3512,_0x4801a5=_0xd3512['threadId'],_0x594981={'memberId':this[_0x445264(0x12b)]['getCurrentUser']()[_0x445264(0x168)],'unitId':_0x49b57b,'threadId':_0x4801a5,'solved':_0xd3512[_0x445264(0x15f)]?_0x440524[_0x445264(0x179)]:_0x440524[_0x445264(0x148)]},_0x4b2b01=await this[_0x445264(0x139)][_0x445264(0x103)](_0x445264(0x143)+_0x49b57b+'/solved',{'body':_0x594981});return!_0x4b2b01[_0x445264(0x136)][_0x445264(0x13e)]||_0x4b2b01[_0x445264(0x136)][_0x445264(0x13e)][_0x445264(0x14b)]===0x1;}async[_0x3f730d(0x118)](_0x1684d7,_0x4932de,_0x47d1a6,_0x7f7a01){const _0x29d496=_0x3f730d,_0xa12fa2={'memberId':(await this[_0x29d496(0x180)]['requireSession'](_0x1684d7))['getMemberID'](),'threadId':_0x47d1a6,'replyId':_0x7f7a01,'unitId':_0x1684d7},_0x3deacd=await this['_httpService']['post'](_0x29d496(0x143)+_0x1684d7+_0x29d496(0x142),{'body':_0xa12fa2});return!_0x3deacd['body'][_0x29d496(0x13e)]||_0x3deacd[_0x29d496(0x136)][_0x29d496(0x13e)]['code']===0x1;}async['listComments'](_0x41054c,_0xa1eeb,_0x418218){const _0x15ea9b=_0x3f730d,_0x4eef4c={'unitId':_0x41054c,'threadId':_0x418218},_0x5dd6e9=await this[_0x15ea9b(0x139)][_0x15ea9b(0x103)](_0x15ea9b(0x143)+_0x41054c+_0x15ea9b(0x17c),{'body':_0x4eef4c}),_0x1a9d77=_0x418218[_0x15ea9b(0x15d)](_0x55a0a3=>_0x57195f(_0x5dd6e9['body'][_0x15ea9b(0x121)][_0x55a0a3],_0x41054c,_0xa1eeb))[_0x15ea9b(0x109)](Boolean);return Object['values'](_0x5dd6e9[_0x15ea9b(0x136)][_0x15ea9b(0x14e)])[_0x15ea9b(0x165)](_0x2129a8=>{const _0x28bb0e=_0x15ea9b;this[_0x28bb0e(0x12b)][_0x28bb0e(0x152)](_0x2129a8);}),_0x1a9d77;}[_0x3f730d(0x17a)](_0x35c8ed){const _0x48214b=_0x3f730d;return{'id':_0x35c8ed['id'],'threadId':_0x35c8ed['threadId'],'ref':_0x35c8ed[_0x48214b(0x15c)]};}};_0xb9472=_0x495825([_0x53f2fc(0x0,_0x2073df[_0x3f730d(0x108)](_0x494454[_0x3f730d(0x117)])),_0x53f2fc(0x1,_0x2073df[_0x3f730d(0x108)](_0x2073df['UserManagerService'])),_0x53f2fc(0x2,_0x2073df['Inject'](_0x720bac[_0x3f730d(0x170)])),_0x53f2fc(0x3,_0x2073df[_0x3f730d(0x108)](_0x2073df[_0x3f730d(0x174)]))],_0xb9472);var _0x5601b4=Object[_0x3f730d(0x146)],_0x339342=(_0x285a7a,_0x4e34e7,_0x3a6f76,_0x1288a3)=>{const _0x94550d=_0x3f730d;for(var _0x4967e7=_0x1288a3>0x1?void 0x0:_0x1288a3?_0x5601b4(_0x4e34e7,_0x3a6f76):_0x4e34e7,_0x2fac33=_0x285a7a[_0x94550d(0x10e)]-0x1,_0x2c527b;_0x2fac33>=0x0;_0x2fac33--)(_0x2c527b=_0x285a7a[_0x2fac33])&&(_0x4967e7=_0x2c527b(_0x4967e7)||_0x4967e7);return _0x4967e7;},_0x9319a5=(_0x37df85,_0x502c32)=>(_0x285988,_0x55d296)=>_0x502c32(_0x285988,_0x55d296,_0x37df85);let _0x44d1f7=class extends _0x2073df[_0x3f730d(0x11f)]{constructor(_0x528623,_0x35252e){const _0x431a8a=_0x3f730d;super(),this[_0x431a8a(0x182)]=_0x528623,this[_0x431a8a(0x106)]=_0x35252e,this[_0x431a8a(0x157)]();}['_initDataSource'](){const _0x5b5776=_0x3f730d;this['_threadCommentDataSourceService']['dataSource']=this[_0x5b5776(0x106)],this[_0x5b5776(0x182)]['syncUpdateMutationToColla']=!0x1;}};_0x44d1f7=_0x339342([_0x9319a5(0x0,_0x28ce05['IThreadCommentDataSourceService']),_0x9319a5(0x1,_0x2073df[_0x3f730d(0x108)](_0xb9472))],_0x44d1f7);var _0x508818=Object[_0x3f730d(0x15a)],_0x5d8a78=Object['getOwnPropertyDescriptor'],_0x40a5b0=(_0x78722d,_0x42e3fa,_0x2b7dbd)=>_0x42e3fa in _0x78722d?_0x508818(_0x78722d,_0x42e3fa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b7dbd}):_0x78722d[_0x42e3fa]=_0x2b7dbd,_0x3ab5bc=(_0x439c6d,_0x3c8769,_0x371574,_0x5d9d39)=>{for(var _0x5a3665=_0x5d9d39>0x1?void 0x0:_0x5d9d39?_0x5d8a78(_0x3c8769,_0x371574):_0x3c8769,_0x13e677=_0x439c6d['length']-0x1,_0x8af46a;_0x13e677>=0x0;_0x13e677--)(_0x8af46a=_0x439c6d[_0x13e677])&&(_0x5a3665=_0x8af46a(_0x5a3665)||_0x5a3665);return _0x5a3665;},_0x589c90=(_0x2fb701,_0x33d37c)=>(_0x558803,_0x2cc7b5)=>_0x33d37c(_0x558803,_0x2cc7b5,_0x2fb701),_0x1b4187=(_0x226aac,_0x4eb30c,_0x4a0b6b)=>_0x40a5b0(_0x226aac,typeof _0x4eb30c!=_0x3f730d(0x15b)?_0x4eb30c+'':_0x4eb30c,_0x4a0b6b);_0x42cf1e['UniverThreadCommentDataSourcePlugin']=class extends _0x2073df[_0x3f730d(0x116)]{constructor(_0x9f0b90=_0x11c6a8,_0xe58f7d,_0x408fca){const _0x26d2ce=_0x3f730d;super(),this[_0x26d2ce(0x124)]=_0x9f0b90,this[_0x26d2ce(0x10c)]=_0xe58f7d,this['_configService']=_0x408fca;const {..._0x34218c}=_0x2073df[_0x26d2ce(0x166)]({},_0x11c6a8,this[_0x26d2ce(0x124)]);this['_configService'][_0x26d2ce(0x171)](_0x57eba8,_0x34218c);}['onStarting'](){const _0x5d4164=_0x3f730d;[[_0xb9472],[_0x44d1f7],[_0x59198f]][_0x5d4164(0x165)](_0x2504a9=>{const _0x2c3405=_0x5d4164;this[_0x2c3405(0x10c)][_0x2c3405(0x11d)](_0x2504a9);});}['onReady'](){const _0x265527=_0x3f730d;this[_0x265527(0x10c)][_0x265527(0x12d)](_0x44d1f7),this[_0x265527(0x10c)][_0x265527(0x12d)](_0x59198f);}},_0x1b4187(_0x42cf1e[_0x3f730d(0x173)],_0x3f730d(0x16a),_0x505696),_0x1b4187(_0x42cf1e[_0x3f730d(0x173)],_0x3f730d(0x100),_0x2073df['UniverInstanceType'][_0x3f730d(0x11c)]),_0x42cf1e['UniverThreadCommentDataSourcePlugin']=_0x3ab5bc([_0x2073df[_0x3f730d(0x12f)](_0x3db1c4[_0x3f730d(0x15e)],_0x720bac['UniverCollaborationClientPlugin'],_0x341c64[_0x3f730d(0x177)]),_0x589c90(0x1,_0x2073df[_0x3f730d(0x108)](_0x2073df[_0x3f730d(0x174)])),_0x589c90(0x2,_0x2073df[_0x3f730d(0x123)])],_0x42cf1e[_0x3f730d(0x173)]),Object[_0x3f730d(0x15a)](_0x42cf1e,Symbol[_0x3f730d(0x112)],{'value':_0x3f730d(0x16c)});}));function _0x1c0a(){const _0x5ce56c=['/universer-api/comment/unit/','rangeId','pipe','getOwnPropertyDescriptor','createTimestamp','OpenOrReOpen','_initUserSync','/edit','code','delete','updateComment','users','@univerjs-pro/license','Delete','parentId','addUser','threadId','solved','UniverNetwork','UniverThreadComment','_initDataSource','getUnit','dayjs','defineProperty','symbol','ref','map','UniverThreadCommentUIPlugin','resolved','UNRECOGNIZED','payload','180156XtbJNG','format','498456xKDclB','forEach','merge','CustomRangeType','userID','Add','pluginName','@univerjs/core','Module','YYYY/MM/DD\x20HH:mm','rxjs','ThreadCommentModel','CollaborationSessionService','setConfig','find','UniverThreadCommentDataSourcePlugin','Injector','_commentService','bufferTime','UniverLicensePlugin','getMemberID','Solved','saveCommentToSnapshot','Unknown','/list','21EtznyX','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','_sessionService','/universer-api/user/list','_threadCommentDataSourceService','type','/add','500706gDmoYc','post','UniverProThreadCommentDatasource','10521855msZRVZ','_threadCommentDataSource','getUser','Inject','filter','user','Reply','_injector','UniverProCollaborationClient','length','unitId','object','CommentService','toStringTag','userId','commentUpdate$','UserManagerService','Plugin','HTTPService','deleteComment','size','exports','stringify','UNIVER_UNKNOWN','add','105NcAFwj','Disposable','187848dzAZnl','comments','resolveComment','IConfigService','_config','replyId','function','replies','2268336dQEfTe','root','@univerjs-pro/collaboration-client','_userService','Edit','get','@univerjs/thread-comment','DependentOn','UniverProLicense','COMMENT','subscribe','6022490SbGYYV','customRanges','requireSession','body','addComment','content','_httpService','/reply','disposeWithMe','@univerjs/network','Solve','error','parse','_threadCommentModel','_init','/delete'];_0x1c0a=function(){return _0x5ce56c;};return _0x1c0a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.6",
3
+ "version": "0.6.7-experimental.20250328-3aaa828",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.6",
49
- "@univerjs-pro/license": "0.6.6",
50
- "@univerjs/protocol": "0.1.44-alpha.3",
51
- "@univerjs/core": "0.6.6",
52
- "@univerjs/thread-comment-ui": "0.6.6",
53
- "@univerjs/network": "0.6.6",
54
- "@univerjs/thread-comment": "0.6.6"
48
+ "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250328-3aaa828",
49
+ "@univerjs/core": "0.6.7-experimental.20250328-3aaa828",
50
+ "@univerjs/protocol": "0.1.45",
51
+ "@univerjs/network": "0.6.7-experimental.20250328-3aaa828",
52
+ "@univerjs-pro/license": "0.6.7-experimental.20250328-3aaa828",
53
+ "@univerjs/thread-comment": "0.6.7-experimental.20250328-3aaa828",
54
+ "@univerjs/thread-comment-ui": "0.6.7-experimental.20250328-3aaa828"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
- "vite": "^6.2.1",
60
- "vitest": "^3.0.8",
61
- "@univerjs-infra/shared": "0.6.6"
59
+ "vite": "^6.2.2",
60
+ "vitest": "^3.0.9",
61
+ "@univerjs-infra/shared": "0.6.7"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",