@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504151606 → 0.6.10-nightly.202504171607

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 _0x1c049f=_0x295f;(function(_0x28ff90,_0xb0ea8e){const _0x2abf20=_0x295f,_0x4a47bc=_0x28ff90();while(!![]){try{const _0x467df3=parseInt(_0x2abf20(0x213))/0x1*(-parseInt(_0x2abf20(0x218))/0x2)+-parseInt(_0x2abf20(0x260))/0x3+-parseInt(_0x2abf20(0x1fd))/0x4*(parseInt(_0x2abf20(0x202))/0x5)+-parseInt(_0x2abf20(0x25e))/0x6*(parseInt(_0x2abf20(0x25a))/0x7)+-parseInt(_0x2abf20(0x21f))/0x8+parseInt(_0x2abf20(0x25d))/0x9+-parseInt(_0x2abf20(0x268))/0xa*(-parseInt(_0x2abf20(0x1ec))/0xb);if(_0x467df3===_0xb0ea8e)break;else _0x4a47bc['push'](_0x4a47bc['shift']());}catch(_0x34158b){_0x4a47bc['push'](_0x4a47bc['shift']());}}}(_0x3a23,0x928c4));Object[_0x1c049f(0x1fc)](exports,Symbol[_0x1c049f(0x212)],{'value':_0x1c049f(0x225)});const b=require(_0x1c049f(0x220)),T=require(_0x1c049f(0x266)),c=require(_0x1c049f(0x243)),j=require(_0x1c049f(0x20d)),M=require(_0x1c049f(0x21c)),w=require(_0x1c049f(0x204)),P=require(_0x1c049f(0x20b)),U=_0x1c049f(0x1eb);var I=(_0x54f33f=>(_0x54f33f[_0x54f33f[_0x1c049f(0x210)]=0x0]=_0x1c049f(0x210),_0x54f33f[_0x54f33f[_0x1c049f(0x201)]=0x1]=_0x1c049f(0x201),_0x54f33f[_0x54f33f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x54f33f))(I||{}),v=(_0x70358b=>(_0x70358b[_0x70358b['Unknown']=0x0]='Unknown',_0x70358b[_0x70358b[_0x1c049f(0x1f3)]=0x1]=_0x1c049f(0x1f3),_0x70358b[_0x70358b['Reply']=0x2]=_0x1c049f(0x222),_0x70358b[_0x70358b[_0x1c049f(0x255)]=0x3]=_0x1c049f(0x255),_0x70358b[_0x70358b[_0x1c049f(0x1ed)]=0x4]=_0x1c049f(0x1ed),_0x70358b[_0x70358b[_0x1c049f(0x227)]=0x5]=_0x1c049f(0x227),_0x70358b[_0x70358b[_0x1c049f(0x219)]=-0x1]=_0x1c049f(0x219),_0x70358b))(v||{});const f=_0x525d6f=>c['dayjs'](new Date(+_0x525d6f))[_0x1c049f(0x216)](_0x1c049f(0x234)),R=async(_0x1fc6ac,_0x4cb50d)=>{const _0x53c2c0=_0x1c049f,_0x3d1fc0=_0x1fc6ac[_0x53c2c0(0x206)](c[_0x53c2c0(0x241)]),_0x24a257=_0x1fc6ac[_0x53c2c0(0x206)](P['HTTPService']);_0x4cb50d[_0x53c2c0(0x23a)](_0xb9f8a8=>{const _0x37f40c=_0x53c2c0;_0x3d1fc0[_0x37f40c(0x20a)](_0xb9f8a8)&&_0x4cb50d[_0x37f40c(0x1f7)](_0xb9f8a8);}),_0x4cb50d[_0x53c2c0(0x256)]&&(await _0x24a257[_0x53c2c0(0x206)](_0x53c2c0(0x22a),{'params':{'userIDs':[..._0x4cb50d]}}))[_0x53c2c0(0x21b)][_0x53c2c0(0x233)]['forEach'](_0xb146e5=>{_0xb146e5&&_0x3d1fc0['addUser'](_0xb146e5);});};var $=Object[_0x1c049f(0x245)],E=(_0x48414b,_0x118e69,_0x2242b5,_0x43552b)=>{const _0xa2ed9=_0x1c049f;for(var _0xfc72c2=_0x43552b>0x1?void 0x0:_0x43552b?$(_0x118e69,_0x2242b5):_0x118e69,_0x2b5952=_0x48414b[_0xa2ed9(0x24b)]-0x1,_0x59c9ed;_0x2b5952>=0x0;_0x2b5952--)(_0x59c9ed=_0x48414b[_0x2b5952])&&(_0xfc72c2=_0x59c9ed(_0xfc72c2)||_0xfc72c2);return _0xfc72c2;},S=(_0x251473,_0x1aa895)=>(_0x274e3d,_0xd99bf6)=>_0x1aa895(_0x274e3d,_0xd99bf6,_0x251473);let p=class extends c[_0x1c049f(0x1f2)]{constructor(_0x3ec85d,_0x1c0ff8,_0xd13962,_0xb71843){const _0xbd85e4=_0x1c049f;super(),this['_commentService']=_0x3ec85d,this[_0xbd85e4(0x239)]=_0x1c0ff8,this['_userService']=_0xd13962,this[_0xbd85e4(0x1f4)]=_0xb71843,this[_0xbd85e4(0x24a)](),this[_0xbd85e4(0x209)]();}[_0x1c049f(0x209)](){const _0x48bc56=_0x1c049f;this['disposeWithMe'](this['_threadCommentModel'][_0x48bc56(0x258)][_0x48bc56(0x22e)](w[_0x48bc56(0x229)](0x10))[_0x48bc56(0x259)](_0x520c1e=>{const _0x3c9f89=_0x48bc56,_0x2acf5d=new Set();_0x520c1e[_0x3c9f89(0x23a)](_0x51d918=>{const _0x3ea8fe=_0x3c9f89;switch(_0x51d918[_0x3ea8fe(0x214)]){case _0x3ea8fe(0x1ff):{const _0x523833=_0x51d918[_0x3ea8fe(0x217)][_0x3ea8fe(0x23e)];_0x2acf5d['add'](_0x523833);break;}}}),R(this['_injector'],_0x2acf5d);}));}['_init'](){const _0x31c5df=_0x1c049f;this[_0x31c5df(0x21a)](this[_0x31c5df(0x23c)][_0x31c5df(0x258)]['subscribe'](async _0x375480=>{const _0x17eaa9=_0x31c5df;var _0x252b9a,_0x1b92c1,_0x463c11,_0xff0c9f;const _0x2d52ed=(_0x252b9a=this[_0x17eaa9(0x239)][_0x17eaa9(0x25b)](_0x375480[_0x17eaa9(0x237)])[_0x17eaa9(0x1ee)](_0x3d7b59=>_0x3d7b59[_0x17eaa9(0x26a)]===_0x375480[_0x17eaa9(0x26a)]))==null?void 0x0:_0x252b9a[_0x17eaa9(0x207)];if(!_0x2d52ed)return;const {unitId:_0x288f07,subUnitId:_0x20f120}=_0x2d52ed;switch(_0x375480['user']&&this[_0x17eaa9(0x23d)][_0x17eaa9(0x248)](_0x375480[_0x17eaa9(0x1f5)]),_0x375480[_0x17eaa9(0x214)]){case v['Add']:break;case v[_0x17eaa9(0x222)]:{this[_0x17eaa9(0x239)][_0x17eaa9(0x1fb)](_0x288f07,_0x20f120,{'unitId':_0x288f07,'subUnitId':_0x20f120,'ref':'','id':_0x375480[_0x17eaa9(0x22f)],'dT':f(+_0x375480[_0x17eaa9(0x24d)]),'threadId':_0x375480[_0x17eaa9(0x26a)],'personId':(_0x463c11=(_0x1b92c1=_0x375480['user'])==null?void 0x0:_0x1b92c1['userID'])!=null?_0x463c11:_0x375480[_0x17eaa9(0x21d)],'text':JSON['parse'](_0x375480[_0x17eaa9(0x238)]),'parentId':_0x2d52ed['id']});break;}case v[_0x17eaa9(0x1ed)]:{const _0x532b66=this[_0x17eaa9(0x239)][_0x17eaa9(0x22b)](_0x288f07,_0x20f120,_0x375480[_0x17eaa9(0x22f)]);_0x532b66&&_0x532b66[_0x17eaa9(0x22c)]&&this['_threadCommentModel'][_0x17eaa9(0x26b)](_0x288f07,_0x20f120,_0x375480[_0x17eaa9(0x22f)]);break;}case v[_0x17eaa9(0x255)]:{this[_0x17eaa9(0x239)][_0x17eaa9(0x263)](_0x288f07,_0x20f120,{'commentId':_0x375480['replyId'],'text':JSON[_0x17eaa9(0x20f)](_0x375480[_0x17eaa9(0x238)])});break;}case v[_0x17eaa9(0x227)]:{const _0x4eaa37=(_0xff0c9f=this[_0x17eaa9(0x239)][_0x17eaa9(0x25b)](_0x375480['unitId'])[_0x17eaa9(0x1ee)](_0x322fe4=>_0x322fe4[_0x17eaa9(0x26a)]===_0x375480[_0x17eaa9(0x26a)]))==null?void 0x0:_0xff0c9f[_0x17eaa9(0x207)];_0x4eaa37&&this[_0x17eaa9(0x239)]['resolveComment'](_0x288f07,_0x20f120,_0x4eaa37['id'],_0x375480[_0x17eaa9(0x265)]===I[_0x17eaa9(0x201)]);break;}}}));}};function _0x295f(_0x42bdf0,_0x59136b){const _0x3a2384=_0x3a23();return _0x295f=function(_0x295fb2,_0x4259e5){_0x295fb2=_0x295fb2-0x1e7;let _0x57ce92=_0x3a2384[_0x295fb2];return _0x57ce92;},_0x295f(_0x42bdf0,_0x59136b);}p=E([S(0x0,c[_0x1c049f(0x1ef)](b[_0x1c049f(0x1fa)])),S(0x1,c[_0x1c049f(0x1ef)](M[_0x1c049f(0x200)])),S(0x2,c['Inject'](c[_0x1c049f(0x241)])),S(0x3,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x226)]))],p);const q=_0x1c049f(0x224),D={};function _0x3a23(){const _0x39e43f=['DependentOn','userID','/add','reply','merge','Edit','size','_threadCommentDataSource','commentUpdate$','subscribe','7sHNXZb','getUnit','values','9088200CoDAmi','312126ZIpefL','resolved','1872936pqGvzS','UniverThreadCommentDataSourcePlugin','CustomRangeType','updateComment','COMMENT','solved','@univerjs-pro/license','error','22210sLKBRO','/universer-api/comment/unit/','threadId','deleteComment','filter','/list','symbol','getMemberID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','11066WyHweg','Delete','find','Inject','rangeId','setConfig','Disposable','Add','_injector','user','CollaborationSessionService','delete','comments','_sessionService','CommentService','addComment','defineProperty','12fFcnTV','_threadCommentDataSourceService','add','ThreadCommentModel','Solved','1239760gIlYEl','IConfigService','rxjs','/delete','get','root','listComments','_initUserSync','getUser','@univerjs/network','_config','@univerjs/thread-comment-ui','rangeType','parse','OpenOrReOpen','slice','toStringTag','1074115nzMcrj','type','replies','format','payload','2LvgukQ','UNRECOGNIZED','disposeWithMe','body','@univerjs/thread-comment','userId','/solved','1196496gfAYTr','@univerjs-pro/collaboration-client','requireSession','Reply','onStarting','thread-comment-data-source.config','Module','Injector','Solve','Plugin','bufferTime','/universer-api/user/list','getComment','parentId','UniverCollaborationClientPlugin','pipe','replyId','post','code','saveCommentToSnapshot','users','YYYY/MM/DD\x20HH:mm','map','syncUpdateMutationToColla','unitId','content','_threadCommentModel','forEach','/reply','_commentService','_userService','personId','UniverInstanceType','HTTPService','UserManagerService','dayjs','@univerjs/core','_configService','getOwnPropertyDescriptor','_httpService','UNIVER_UNKNOWN','addUser','customRanges','_init','length','stringify','createTimestamp','_initDataSource','/edit'];_0x3a23=function(){return _0x39e43f;};return _0x3a23();}var A=Object[_0x1c049f(0x245)],x=(_0x36a081,_0x5a5e4f,_0x165fcd,_0x344a7c)=>{const _0x742887=_0x1c049f;for(var _0x2cdee2=_0x344a7c>0x1?void 0x0:_0x344a7c?A(_0x5a5e4f,_0x165fcd):_0x5a5e4f,_0x360c16=_0x36a081[_0x742887(0x24b)]-0x1,_0x22f6bf;_0x360c16>=0x0;_0x360c16--)(_0x22f6bf=_0x36a081[_0x360c16])&&(_0x2cdee2=_0x22f6bf(_0x2cdee2)||_0x2cdee2);return _0x2cdee2;},_=(_0x3892a9,_0x5ae2b2)=>(_0x19826c,_0x280b8d)=>_0x5ae2b2(_0x19826c,_0x280b8d,_0x3892a9);function Y(_0x537a1e,_0x4920ac){const _0x2dbc2f=_0x1c049f,_0x522b7e=_0x537a1e['replies'][0x0];return{..._0x4920ac,'id':_0x522b7e['replyId'],'resolved':_0x537a1e['solved']===0x1,'dT':f(_0x522b7e['createTimestamp']),'personId':_0x522b7e[_0x2dbc2f(0x21d)],'threadId':_0x522b7e[_0x2dbc2f(0x26a)]};}function G(_0x48a56e,_0x33eabf,_0x142b4c){const _0x9834a4=_0x1c049f;var _0xf2a003,_0x5197b1;if(((_0x5197b1=(_0xf2a003=_0x48a56e==null?void 0x0:_0x48a56e[_0x9834a4(0x215)])==null?void 0x0:_0xf2a003[_0x9834a4(0x24b)])!=null?_0x5197b1:0x0)>0x0){const _0x13c3f0=(_0x54cc15,_0x657fc9)=>({'id':_0x54cc15[_0x9834a4(0x22f)],'threadId':_0x54cc15[_0x9834a4(0x26a)],'dT':f(_0x54cc15[_0x9834a4(0x24d)]),'personId':_0x54cc15[_0x9834a4(0x21d)],'resolved':_0x48a56e['solved']===I['Solved'],'unitId':_0x33eabf,'subUnitId':_0x142b4c,'text':JSON[_0x9834a4(0x20f)](_0x54cc15['content']),'parentId':_0x657fc9}),_0x1d14fa=_0x13c3f0(_0x48a56e[_0x9834a4(0x215)][0x0]);return{..._0x1d14fa,'children':_0x48a56e['replies'][_0x9834a4(0x211)](0x1)['map'](_0xeeb172=>_0x13c3f0(_0xeeb172,_0x1d14fa['id']))};}return null;}let g=class{constructor(_0x1f6da3,_0x35e71a,_0x14812c,_0x483cdc){const _0x504ef0=_0x1c049f;this['_httpService']=_0x1f6da3,this[_0x504ef0(0x23d)]=_0x35e71a,this['_sessionService']=_0x14812c,this[_0x504ef0(0x1f4)]=_0x483cdc;}async[_0x1c049f(0x1fb)](_0x1b65f9){const _0x47f937=_0x1c049f;var _0x45c763,_0x402541;const {parentId:_0x4c685c,unitId:_0x3f16fc,text:_0x5a2ff2,threadId:_0x429710}=_0x1b65f9,_0x3a7bce=(_0x402541=(_0x45c763=_0x5a2ff2[_0x47f937(0x249)])==null?void 0x0:_0x45c763[_0x47f937(0x1e7)](_0x76bc75=>_0x76bc75['rangeType']===c[_0x47f937(0x262)][_0x47f937(0x264)])[_0x47f937(0x235)](_0x98bb4d=>_0x98bb4d[_0x47f937(0x1f0)]))!=null?_0x402541:[],_0x1faa0f=JSON[_0x47f937(0x24c)](_0x5a2ff2),_0x9cc9a9=(await this['_sessionService']['requireSession'](_0x3f16fc))['getMemberID']();if(_0x4c685c){const _0xe089ed={'memberId':_0x9cc9a9,'unitId':_0x3f16fc,'content':_0x1faa0f,'mention':_0x3a7bce,'threadId':_0x429710},_0x113f7d=(await this[_0x47f937(0x246)]['post']('/universer-api/comment/unit/'+_0x3f16fc+_0x47f937(0x23b),{'body':_0xe089ed}))[_0x47f937(0x21b)][_0x47f937(0x253)];return{..._0x1b65f9,'id':_0x113f7d[_0x47f937(0x22f)],'dT':c[_0x47f937(0x242)](+_0x113f7d[_0x47f937(0x24d)])[_0x47f937(0x216)](_0x47f937(0x234)),'personId':_0x113f7d[_0x47f937(0x21d)]};}else{const _0x396d3e={'memberId':_0x9cc9a9,'unitId':_0x3f16fc,'content':_0x1faa0f,'mention':_0x3a7bce},_0x107925=await this['_httpService'][_0x47f937(0x230)](_0x47f937(0x269)+_0x3f16fc+_0x47f937(0x252),{'body':_0x396d3e});return Y(_0x107925[_0x47f937(0x21b)]['comment'],_0x1b65f9);}}async['updateComment'](_0x24a4ef){const _0x4541b7=_0x1c049f;var _0x49a692,_0x2c5511;const {text:_0x3ed37f,unitId:_0x3f41bd}=_0x24a4ef,_0x28942b=(_0x2c5511=(_0x49a692=_0x3ed37f[_0x4541b7(0x249)])==null?void 0x0:_0x49a692[_0x4541b7(0x1e7)](_0x217bde=>_0x217bde[_0x4541b7(0x20e)]===c['CustomRangeType'][_0x4541b7(0x264)])['map'](_0x59197b=>_0x59197b[_0x4541b7(0x1f0)]))!=null?_0x2c5511:[],_0x4c3ce4=JSON[_0x4541b7(0x24c)](_0x3ed37f),_0x5b3d7d=_0x24a4ef[_0x4541b7(0x26a)],_0x3f241f=_0x24a4ef['id'],_0x579dfe={'memberId':(await this[_0x4541b7(0x1f9)][_0x4541b7(0x221)](_0x3f41bd))[_0x4541b7(0x1ea)](),'unitId':_0x3f41bd,'threadId':_0x5b3d7d,'mention':_0x28942b,'content':_0x4c3ce4,'replyId':_0x3f241f},_0x3c776c=await this['_httpService'][_0x4541b7(0x230)](_0x4541b7(0x269)+_0x3f41bd+_0x4541b7(0x24f),{'body':_0x579dfe});return!_0x3c776c[_0x4541b7(0x21b)][_0x4541b7(0x267)]||_0x3c776c[_0x4541b7(0x21b)][_0x4541b7(0x267)][_0x4541b7(0x231)]===0x1;}async['resolveComment'](_0x23756e){const _0x45bd41=_0x1c049f,{unitId:_0x37476e}=_0x23756e,_0x106657=_0x23756e[_0x45bd41(0x26a)],_0x503d49={'memberId':this[_0x45bd41(0x23d)]['getCurrentUser']()[_0x45bd41(0x251)],'unitId':_0x37476e,'threadId':_0x106657,'solved':_0x23756e[_0x45bd41(0x25f)]?I[_0x45bd41(0x201)]:I[_0x45bd41(0x210)]},_0x1fbc7e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x37476e+_0x45bd41(0x21e),{'body':_0x503d49});return!_0x1fbc7e[_0x45bd41(0x21b)][_0x45bd41(0x267)]||_0x1fbc7e[_0x45bd41(0x21b)][_0x45bd41(0x267)]['code']===0x1;}async['deleteComment'](_0x495a87,_0x2ac28d,_0x4429f6,_0x30956c){const _0x5c9a82=_0x1c049f,_0x2d5a85={'memberId':(await this[_0x5c9a82(0x1f9)][_0x5c9a82(0x221)](_0x495a87))[_0x5c9a82(0x1ea)](),'threadId':_0x4429f6,'replyId':_0x30956c,'unitId':_0x495a87},_0x3fe0c5=await this[_0x5c9a82(0x246)][_0x5c9a82(0x230)]('/universer-api/comment/unit/'+_0x495a87+_0x5c9a82(0x205),{'body':_0x2d5a85});return!_0x3fe0c5[_0x5c9a82(0x21b)][_0x5c9a82(0x267)]||_0x3fe0c5['body'][_0x5c9a82(0x267)][_0x5c9a82(0x231)]===0x1;}async[_0x1c049f(0x208)](_0x29fab2,_0x108610,_0x3c90e3){const _0x40fc23=_0x1c049f,_0x23a6e5={'unitId':_0x29fab2,'threadId':_0x3c90e3},_0x58ed17=await this[_0x40fc23(0x246)][_0x40fc23(0x230)]('/universer-api/comment/unit/'+_0x29fab2+_0x40fc23(0x1e8),{'body':_0x23a6e5}),_0x52bf03=_0x3c90e3[_0x40fc23(0x235)](_0x3eeb61=>G(_0x58ed17[_0x40fc23(0x21b)][_0x40fc23(0x1f8)][_0x3eeb61],_0x29fab2,_0x108610))['filter'](Boolean);return Object[_0x40fc23(0x25c)](_0x58ed17[_0x40fc23(0x21b)]['users'])[_0x40fc23(0x23a)](_0x49e7c3=>{const _0x4d1128=_0x40fc23;this[_0x4d1128(0x23d)][_0x4d1128(0x248)](_0x49e7c3);}),_0x52bf03;}[_0x1c049f(0x232)](_0x329722){return{'id':_0x329722['id'],'threadId':_0x329722['threadId'],'ref':_0x329722['ref']};}};g=x([_(0x0,c[_0x1c049f(0x1ef)](P[_0x1c049f(0x240)])),_(0x1,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x241)])),_(0x2,c[_0x1c049f(0x1ef)](b[_0x1c049f(0x1f6)])),_(0x3,c['Inject'](c[_0x1c049f(0x226)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x5616a2,_0x216993,_0x577467,_0x3e73f2)=>{for(var _0xac1d11=_0x3e73f2>0x1?void 0x0:_0x3e73f2?H(_0x216993,_0x577467):_0x216993,_0x26a4f6=_0x5616a2['length']-0x1,_0x4ea80c;_0x26a4f6>=0x0;_0x26a4f6--)(_0x4ea80c=_0x5616a2[_0x26a4f6])&&(_0xac1d11=_0x4ea80c(_0xac1d11)||_0xac1d11);return _0xac1d11;},y=(_0xa4cba3,_0x17cc9e)=>(_0x58f0fe,_0x19e3c0)=>_0x17cc9e(_0x58f0fe,_0x19e3c0,_0xa4cba3);let C=class extends c[_0x1c049f(0x1f2)]{constructor(_0x4ba7f6,_0x2f1bc8){const _0x377630=_0x1c049f;super(),this[_0x377630(0x1fe)]=_0x4ba7f6,this[_0x377630(0x257)]=_0x2f1bc8,this['_initDataSource']();}[_0x1c049f(0x24e)](){const _0x47c5e6=_0x1c049f;this[_0x47c5e6(0x1fe)]['dataSource']=this[_0x47c5e6(0x257)],this[_0x47c5e6(0x1fe)][_0x47c5e6(0x236)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1c049f(0x1ef)](g))],C);var F=Object[_0x1c049f(0x1fc)],L=Object[_0x1c049f(0x245)],Z=(_0x4fcf00,_0x521c59,_0x3c594f)=>_0x521c59 in _0x4fcf00?F(_0x4fcf00,_0x521c59,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c594f}):_0x4fcf00[_0x521c59]=_0x3c594f,W=(_0x5f4ee3,_0x588ac1,_0x23387b,_0x232baa)=>{for(var _0x220a25=_0x232baa>0x1?void 0x0:_0x232baa?L(_0x588ac1,_0x23387b):_0x588ac1,_0x4bce83=_0x5f4ee3['length']-0x1,_0x3ac253;_0x4bce83>=0x0;_0x4bce83--)(_0x3ac253=_0x5f4ee3[_0x4bce83])&&(_0x220a25=_0x3ac253(_0x220a25)||_0x220a25);return _0x220a25;},O=(_0x2ed981,_0x3e24fe)=>(_0x486f96,_0x437855)=>_0x3e24fe(_0x486f96,_0x437855,_0x2ed981),N=(_0x5482bd,_0x2a145b,_0x306916)=>Z(_0x5482bd,typeof _0x2a145b!=_0x1c049f(0x1e9)?_0x2a145b+'':_0x2a145b,_0x306916);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1c049f(0x228)]{constructor(_0x5aa8c9=D,_0x325dc9,_0x6e69ce){const _0x17907e=_0x1c049f;super(),this[_0x17907e(0x20c)]=_0x5aa8c9,this['_injector']=_0x325dc9,this['_configService']=_0x6e69ce;const {..._0x542964}=c[_0x17907e(0x254)]({},D,this['_config']);this[_0x17907e(0x244)][_0x17907e(0x1f1)](q,_0x542964);}[_0x1c049f(0x223)](){[[g],[C],[p]]['forEach'](_0x21353c=>{const _0x4ce1b0=_0x295f;this[_0x4ce1b0(0x1f4)][_0x4ce1b0(0x1ff)](_0x21353c);});}['onReady'](){const _0x5761ff=_0x1c049f;this[_0x5761ff(0x1f4)][_0x5761ff(0x206)](C),this[_0x5761ff(0x1f4)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1c049f(0x261)],_0x1c049f(0x214),c[_0x1c049f(0x23f)][_0x1c049f(0x247)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1c049f(0x250)](j['UniverThreadCommentUIPlugin'],b[_0x1c049f(0x22d)],T['UniverLicensePlugin']),O(0x1,c[_0x1c049f(0x1ef)](c[_0x1c049f(0x226)])),O(0x2,c[_0x1c049f(0x203)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x94cb=_0x13d3;(function(_0x12e7cf,_0x1bad64){const _0x5d3c8c=_0x13d3,_0x30308b=_0x12e7cf();while(!![]){try{const _0x2de8fd=-parseInt(_0x5d3c8c(0x1e1))/0x1+-parseInt(_0x5d3c8c(0x204))/0x2*(parseInt(_0x5d3c8c(0x205))/0x3)+parseInt(_0x5d3c8c(0x1eb))/0x4+-parseInt(_0x5d3c8c(0x1cc))/0x5*(parseInt(_0x5d3c8c(0x1f7))/0x6)+parseInt(_0x5d3c8c(0x1a9))/0x7*(parseInt(_0x5d3c8c(0x1d9))/0x8)+parseInt(_0x5d3c8c(0x1d3))/0x9+parseInt(_0x5d3c8c(0x1dc))/0xa*(-parseInt(_0x5d3c8c(0x1c3))/0xb);if(_0x2de8fd===_0x1bad64)break;else _0x30308b['push'](_0x30308b['shift']());}catch(_0x115423){_0x30308b['push'](_0x30308b['shift']());}}}(_0x5334,0x4fec5));function _0x5334(){const _0x540479=['listComments','updateComment','_commentService','getMemberID','_injector','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','/universer-api/comment/unit/','IConfigService','_userService','replyId','delete','UNIVER_UNKNOWN','reply','payload','filter','_threadCommentDataSourceService','commentUpdate$','CommentService','rangeType','onReady','_threadCommentModel','UserManagerService','rangeId','Add','/edit','_init','parse','@univerjs-pro/license','threadId','UniverThreadCommentUIPlugin','unitId','Injector','Inject','Solved','userID','1257221ZJydFR','@univerjs-pro/collaboration-client','merge','resolveComment','requireSession','_sessionService','DependentOn','error','Module','setConfig','OpenOrReOpen','createTimestamp','length','defineProperty','UniverLicensePlugin','getUser','add','_httpService','type','users','_config','Solve','@univerjs/thread-comment-ui','@univerjs/thread-comment','customRanges','user','11MoOeNf','/delete','COMMENT','/universer-api/user/list','post','/add','_configService','UniverThreadCommentDataSourcePlugin','addUser','455PTUtAN','UniverInstanceType','comment','_initDataSource','_threadCommentDataSource','Edit','/reply','4420125uohuxj','dataSource','slice','_initUserSync','Delete','Disposable','8uCiYdw','forEach','Unknown','73650sVzHNq','format','toStringTag','getComment','@univerjs/network','463554KAMvdA','@univerjs/core','dayjs','UNRECOGNIZED','saveCommentToSnapshot','userId','bufferTime','content','root','YYYY/MM/DD\x20HH:mm','2321140NljVVr','get','stringify','pluginName','/solved','rxjs','CollaborationSessionService','HTTPService','code','getOwnPropertyDescriptor','getCurrentUser','find','7698QMxjIl','/list','Reply','deleteComment','body','onStarting','subscribe','personId','ThreadCommentModel','CustomRangeType','symbol','replies','getUnit','6JsuRnU','335976cGakQq','size','values','solved'];_0x5334=function(){return _0x540479;};return _0x5334();}Object[_0x94cb(0x1b6)](exports,Symbol[_0x94cb(0x1de)],{'value':_0x94cb(0x1b1)});const b=require(_0x94cb(0x1aa)),T=require(_0x94cb(0x1a1)),c=require(_0x94cb(0x1e2)),j=require(_0x94cb(0x1bf)),M=require(_0x94cb(0x1c0)),w=require(_0x94cb(0x1f0)),P=require(_0x94cb(0x1e0)),U=_0x94cb(0x20f);var I=(_0x561841=>(_0x561841[_0x561841['OpenOrReOpen']=0x0]=_0x94cb(0x1b3),_0x561841[_0x561841[_0x94cb(0x1a7)]=0x1]=_0x94cb(0x1a7),_0x561841[_0x561841[_0x94cb(0x1e4)]=-0x1]=_0x94cb(0x1e4),_0x561841))(I||{}),v=(_0x44e34b=>(_0x44e34b[_0x44e34b[_0x94cb(0x1db)]=0x0]='Unknown',_0x44e34b[_0x44e34b[_0x94cb(0x19d)]=0x1]=_0x94cb(0x19d),_0x44e34b[_0x44e34b['Reply']=0x2]=_0x94cb(0x1f9),_0x44e34b[_0x44e34b[_0x94cb(0x1d1)]=0x3]=_0x94cb(0x1d1),_0x44e34b[_0x44e34b[_0x94cb(0x1d7)]=0x4]=_0x94cb(0x1d7),_0x44e34b[_0x44e34b['Solve']=0x5]=_0x94cb(0x1be),_0x44e34b[_0x44e34b[_0x94cb(0x1e4)]=-0x1]=_0x94cb(0x1e4),_0x44e34b))(v||{});const f=_0x42f883=>c[_0x94cb(0x1e3)](new Date(+_0x42f883))[_0x94cb(0x1dd)](_0x94cb(0x1ea)),R=async(_0x3f0364,_0x23d08f)=>{const _0x339351=_0x94cb,_0x3bc391=_0x3f0364['get'](c[_0x339351(0x19b)]),_0x32688d=_0x3f0364['get'](P[_0x339351(0x1f2)]);_0x23d08f[_0x339351(0x1da)](_0x221e9b=>{const _0x3013bc=_0x339351;_0x3bc391[_0x3013bc(0x1b8)](_0x221e9b)&&_0x23d08f[_0x3013bc(0x190)](_0x221e9b);}),_0x23d08f[_0x339351(0x206)]&&(await _0x32688d[_0x339351(0x1ec)](_0x339351(0x1c6),{'params':{'userIDs':[..._0x23d08f]}}))[_0x339351(0x1fb)][_0x339351(0x1bc)][_0x339351(0x1da)](_0x162062=>{const _0x425fe7=_0x339351;_0x162062&&_0x3bc391[_0x425fe7(0x1cb)](_0x162062);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x31747e,_0x401aa3,_0x2b7367,_0x30712f)=>{const _0x4943b9=_0x94cb;for(var _0x3b2331=_0x30712f>0x1?void 0x0:_0x30712f?$(_0x401aa3,_0x2b7367):_0x401aa3,_0x4f3324=_0x31747e[_0x4943b9(0x1b5)]-0x1,_0xa911f3;_0x4f3324>=0x0;_0x4f3324--)(_0xa911f3=_0x31747e[_0x4f3324])&&(_0x3b2331=_0xa911f3(_0x3b2331)||_0x3b2331);return _0x3b2331;},S=(_0x3ab998,_0x52488a)=>(_0x4e7c91,_0x21cbad)=>_0x52488a(_0x4e7c91,_0x21cbad,_0x3ab998);let p=class extends c[_0x94cb(0x1d8)]{constructor(_0x43b1c7,_0x3e6fa9,_0x153621,_0x12f52c){const _0x5282ef=_0x94cb;super(),this['_commentService']=_0x43b1c7,this[_0x5282ef(0x19a)]=_0x3e6fa9,this[_0x5282ef(0x18e)]=_0x153621,this[_0x5282ef(0x20d)]=_0x12f52c,this['_init'](),this[_0x5282ef(0x1d6)]();}[_0x94cb(0x1d6)](){const _0x3eea83=_0x94cb;this['disposeWithMe'](this[_0x3eea83(0x19a)][_0x3eea83(0x196)]['pipe'](w[_0x3eea83(0x1e7)](0x10))[_0x3eea83(0x1fd)](_0x43edf1=>{const _0x4395ee=_0x3eea83,_0x1e7b3d=new Set();_0x43edf1['forEach'](_0xfe44b7=>{const _0x387367=_0x13d3;switch(_0xfe44b7['type']){case _0x387367(0x1b9):{const _0x5a8bbe=_0xfe44b7[_0x387367(0x193)][_0x387367(0x1fe)];_0x1e7b3d[_0x387367(0x1b9)](_0x5a8bbe);break;}}}),R(this[_0x4395ee(0x20d)],_0x1e7b3d);}));}[_0x94cb(0x19f)](){const _0x30226a=_0x94cb;this['disposeWithMe'](this[_0x30226a(0x20b)]['commentUpdate$'][_0x30226a(0x1fd)](async _0x590ac6=>{const _0x43ad8c=_0x30226a;var _0x1c61fd,_0x227b07,_0x45cd07,_0x5d7d77;const _0x5cb885=(_0x1c61fd=this[_0x43ad8c(0x19a)][_0x43ad8c(0x203)](_0x590ac6[_0x43ad8c(0x1a4)])[_0x43ad8c(0x1f6)](_0x3eea96=>_0x3eea96[_0x43ad8c(0x1a2)]===_0x590ac6[_0x43ad8c(0x1a2)]))==null?void 0x0:_0x1c61fd[_0x43ad8c(0x1e9)];if(!_0x5cb885)return;const {unitId:_0x2111de,subUnitId:_0x4c600c}=_0x5cb885;switch(_0x590ac6[_0x43ad8c(0x1c2)]&&this['_userService'][_0x43ad8c(0x1cb)](_0x590ac6[_0x43ad8c(0x1c2)]),_0x590ac6[_0x43ad8c(0x1bb)]){case v[_0x43ad8c(0x19d)]:break;case v[_0x43ad8c(0x1f9)]:{this['_threadCommentModel'][_0x43ad8c(0x20e)](_0x2111de,_0x4c600c,{'unitId':_0x2111de,'subUnitId':_0x4c600c,'ref':'','id':_0x590ac6[_0x43ad8c(0x18f)],'dT':f(+_0x590ac6[_0x43ad8c(0x1b4)]),'threadId':_0x590ac6['threadId'],'personId':(_0x45cd07=(_0x227b07=_0x590ac6['user'])==null?void 0x0:_0x227b07['userID'])!=null?_0x45cd07:_0x590ac6[_0x43ad8c(0x1e6)],'text':JSON[_0x43ad8c(0x1a0)](_0x590ac6['content']),'parentId':_0x5cb885['id']});break;}case v[_0x43ad8c(0x1d7)]:{const _0x51e6ec=this[_0x43ad8c(0x19a)][_0x43ad8c(0x1df)](_0x2111de,_0x4c600c,_0x590ac6['replyId']);_0x51e6ec&&_0x51e6ec['parentId']&&this[_0x43ad8c(0x19a)][_0x43ad8c(0x1fa)](_0x2111de,_0x4c600c,_0x590ac6[_0x43ad8c(0x18f)]);break;}case v[_0x43ad8c(0x1d1)]:{this[_0x43ad8c(0x19a)]['updateComment'](_0x2111de,_0x4c600c,{'commentId':_0x590ac6['replyId'],'text':JSON[_0x43ad8c(0x1a0)](_0x590ac6[_0x43ad8c(0x1e8)])});break;}case v[_0x43ad8c(0x1be)]:{const _0x30de78=(_0x5d7d77=this[_0x43ad8c(0x19a)][_0x43ad8c(0x203)](_0x590ac6[_0x43ad8c(0x1a4)])[_0x43ad8c(0x1f6)](_0x20cdf7=>_0x20cdf7['threadId']===_0x590ac6[_0x43ad8c(0x1a2)]))==null?void 0x0:_0x5d7d77[_0x43ad8c(0x1e9)];_0x30de78&&this[_0x43ad8c(0x19a)]['resolveComment'](_0x2111de,_0x4c600c,_0x30de78['id'],_0x590ac6['solved']===I[_0x43ad8c(0x1a7)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x94cb(0x197)])),S(0x1,c['Inject'](M[_0x94cb(0x1ff)])),S(0x2,c['Inject'](c[_0x94cb(0x19b)])),S(0x3,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x94cb(0x1f4)],x=(_0x36b502,_0x542d4d,_0x210e5b,_0x1d7d71)=>{const _0x133ddc=_0x94cb;for(var _0x25f680=_0x1d7d71>0x1?void 0x0:_0x1d7d71?A(_0x542d4d,_0x210e5b):_0x542d4d,_0x1c6a2d=_0x36b502[_0x133ddc(0x1b5)]-0x1,_0x525b5e;_0x1c6a2d>=0x0;_0x1c6a2d--)(_0x525b5e=_0x36b502[_0x1c6a2d])&&(_0x25f680=_0x525b5e(_0x25f680)||_0x25f680);return _0x25f680;},_=(_0x10d198,_0x40cd61)=>(_0x387f2e,_0x380939)=>_0x40cd61(_0x387f2e,_0x380939,_0x10d198);function Y(_0x51af42,_0x452008){const _0x18a3a4=_0x94cb,_0x28ad28=_0x51af42[_0x18a3a4(0x202)][0x0];return{..._0x452008,'id':_0x28ad28[_0x18a3a4(0x18f)],'resolved':_0x51af42[_0x18a3a4(0x208)]===0x1,'dT':f(_0x28ad28[_0x18a3a4(0x1b4)]),'personId':_0x28ad28['userId'],'threadId':_0x28ad28[_0x18a3a4(0x1a2)]};}function G(_0x3059b4,_0x3e8437,_0x1531ec){const _0x4536ad=_0x94cb;var _0x49a4ed,_0x35b767;if(((_0x35b767=(_0x49a4ed=_0x3059b4==null?void 0x0:_0x3059b4[_0x4536ad(0x202)])==null?void 0x0:_0x49a4ed[_0x4536ad(0x1b5)])!=null?_0x35b767:0x0)>0x0){const _0x3e6062=(_0x5d9b8d,_0x5dba8b)=>({'id':_0x5d9b8d[_0x4536ad(0x18f)],'threadId':_0x5d9b8d[_0x4536ad(0x1a2)],'dT':f(_0x5d9b8d[_0x4536ad(0x1b4)]),'personId':_0x5d9b8d[_0x4536ad(0x1e6)],'resolved':_0x3059b4[_0x4536ad(0x208)]===I[_0x4536ad(0x1a7)],'unitId':_0x3e8437,'subUnitId':_0x1531ec,'text':JSON[_0x4536ad(0x1a0)](_0x5d9b8d[_0x4536ad(0x1e8)]),'parentId':_0x5dba8b}),_0x3bfb64=_0x3e6062(_0x3059b4[_0x4536ad(0x202)][0x0]);return{..._0x3bfb64,'children':_0x3059b4['replies'][_0x4536ad(0x1d5)](0x1)[_0x4536ad(0x18b)](_0x394daf=>_0x3e6062(_0x394daf,_0x3bfb64['id']))};}return null;}let g=class{constructor(_0x57c615,_0x46ec7d,_0x55b693,_0x274742){const _0x36d2d0=_0x94cb;this[_0x36d2d0(0x1ba)]=_0x57c615,this[_0x36d2d0(0x18e)]=_0x46ec7d,this[_0x36d2d0(0x1ae)]=_0x55b693,this['_injector']=_0x274742;}async[_0x94cb(0x20e)](_0x322787){const _0x25c43e=_0x94cb;var _0x4913d2,_0xfd7fba;const {parentId:_0x34c10c,unitId:_0x45fad6,text:_0x58e7cc,threadId:_0x506a0f}=_0x322787,_0x48dfad=(_0xfd7fba=(_0x4913d2=_0x58e7cc[_0x25c43e(0x1c1)])==null?void 0x0:_0x4913d2[_0x25c43e(0x194)](_0xf4b935=>_0xf4b935[_0x25c43e(0x198)]===c['CustomRangeType'][_0x25c43e(0x1c5)])[_0x25c43e(0x18b)](_0x477d9c=>_0x477d9c['rangeId']))!=null?_0xfd7fba:[],_0x225e0b=JSON[_0x25c43e(0x1ed)](_0x58e7cc),_0x1348e8=(await this[_0x25c43e(0x1ae)][_0x25c43e(0x1ad)](_0x45fad6))['getMemberID']();if(_0x34c10c){const _0x42be41={'memberId':_0x1348e8,'unitId':_0x45fad6,'content':_0x225e0b,'mention':_0x48dfad,'threadId':_0x506a0f},_0x4dd84f=(await this[_0x25c43e(0x1ba)][_0x25c43e(0x1c7)](_0x25c43e(0x18c)+_0x45fad6+_0x25c43e(0x1d2),{'body':_0x42be41}))[_0x25c43e(0x1fb)][_0x25c43e(0x192)];return{..._0x322787,'id':_0x4dd84f[_0x25c43e(0x18f)],'dT':c[_0x25c43e(0x1e3)](+_0x4dd84f['createTimestamp'])[_0x25c43e(0x1dd)](_0x25c43e(0x1ea)),'personId':_0x4dd84f['userId']};}else{const _0x512cb4={'memberId':_0x1348e8,'unitId':_0x45fad6,'content':_0x225e0b,'mention':_0x48dfad},_0x5ea6e5=await this[_0x25c43e(0x1ba)][_0x25c43e(0x1c7)]('/universer-api/comment/unit/'+_0x45fad6+_0x25c43e(0x1c8),{'body':_0x512cb4});return Y(_0x5ea6e5[_0x25c43e(0x1fb)][_0x25c43e(0x1ce)],_0x322787);}}async[_0x94cb(0x20a)](_0x196866){const _0x238cf3=_0x94cb;var _0x392716,_0x242128;const {text:_0x4302fc,unitId:_0x3c121b}=_0x196866,_0x4117e7=(_0x242128=(_0x392716=_0x4302fc[_0x238cf3(0x1c1)])==null?void 0x0:_0x392716['filter'](_0x184cd2=>_0x184cd2[_0x238cf3(0x198)]===c[_0x238cf3(0x200)]['COMMENT'])[_0x238cf3(0x18b)](_0x47f43c=>_0x47f43c[_0x238cf3(0x19c)]))!=null?_0x242128:[],_0x1806af=JSON[_0x238cf3(0x1ed)](_0x4302fc),_0x3c9105=_0x196866[_0x238cf3(0x1a2)],_0x5a69f2=_0x196866['id'],_0x649c17={'memberId':(await this[_0x238cf3(0x1ae)][_0x238cf3(0x1ad)](_0x3c121b))[_0x238cf3(0x20c)](),'unitId':_0x3c121b,'threadId':_0x3c9105,'mention':_0x4117e7,'content':_0x1806af,'replyId':_0x5a69f2},_0xe03d03=await this['_httpService'][_0x238cf3(0x1c7)]('/universer-api/comment/unit/'+_0x3c121b+_0x238cf3(0x19e),{'body':_0x649c17});return!_0xe03d03[_0x238cf3(0x1fb)][_0x238cf3(0x1b0)]||_0xe03d03[_0x238cf3(0x1fb)][_0x238cf3(0x1b0)][_0x238cf3(0x1f3)]===0x1;}async[_0x94cb(0x1ac)](_0x48bac6){const _0x1dc1b3=_0x94cb,{unitId:_0x59229b}=_0x48bac6,_0x26fd64=_0x48bac6['threadId'],_0x496d8f={'memberId':this[_0x1dc1b3(0x18e)][_0x1dc1b3(0x1f5)]()[_0x1dc1b3(0x1a8)],'unitId':_0x59229b,'threadId':_0x26fd64,'solved':_0x48bac6['resolved']?I[_0x1dc1b3(0x1a7)]:I[_0x1dc1b3(0x1b3)]},_0x5e31c5=await this['_httpService'][_0x1dc1b3(0x1c7)](_0x1dc1b3(0x18c)+_0x59229b+_0x1dc1b3(0x1ef),{'body':_0x496d8f});return!_0x5e31c5[_0x1dc1b3(0x1fb)][_0x1dc1b3(0x1b0)]||_0x5e31c5[_0x1dc1b3(0x1fb)][_0x1dc1b3(0x1b0)][_0x1dc1b3(0x1f3)]===0x1;}async['deleteComment'](_0x339d98,_0x2089ca,_0x93ea30,_0x10f678){const _0xd64242=_0x94cb,_0x20c7d9={'memberId':(await this[_0xd64242(0x1ae)][_0xd64242(0x1ad)](_0x339d98))[_0xd64242(0x20c)](),'threadId':_0x93ea30,'replyId':_0x10f678,'unitId':_0x339d98},_0x5b6e09=await this[_0xd64242(0x1ba)]['post']('/universer-api/comment/unit/'+_0x339d98+_0xd64242(0x1c4),{'body':_0x20c7d9});return!_0x5b6e09['body']['error']||_0x5b6e09[_0xd64242(0x1fb)][_0xd64242(0x1b0)]['code']===0x1;}async[_0x94cb(0x209)](_0x2aeaab,_0x540c51,_0x22a40c){const _0x3d5bc6=_0x94cb,_0x2f4e6c={'unitId':_0x2aeaab,'threadId':_0x22a40c},_0x5a783e=await this[_0x3d5bc6(0x1ba)][_0x3d5bc6(0x1c7)](_0x3d5bc6(0x18c)+_0x2aeaab+_0x3d5bc6(0x1f8),{'body':_0x2f4e6c}),_0x5ebf13=_0x22a40c[_0x3d5bc6(0x18b)](_0x1c5d56=>G(_0x5a783e['body']['comments'][_0x1c5d56],_0x2aeaab,_0x540c51))[_0x3d5bc6(0x194)](Boolean);return Object[_0x3d5bc6(0x207)](_0x5a783e[_0x3d5bc6(0x1fb)][_0x3d5bc6(0x1bc)])['forEach'](_0x4e16be=>{const _0x5ecf10=_0x3d5bc6;this[_0x5ecf10(0x18e)][_0x5ecf10(0x1cb)](_0x4e16be);}),_0x5ebf13;}[_0x94cb(0x1e5)](_0x2b3938){const _0x282558=_0x94cb;return{'id':_0x2b3938['id'],'threadId':_0x2b3938[_0x282558(0x1a2)],'ref':_0x2b3938['ref']};}};g=x([_(0x0,c[_0x94cb(0x1a6)](P[_0x94cb(0x1f2)])),_(0x1,c[_0x94cb(0x1a6)](c[_0x94cb(0x19b)])),_(0x2,c[_0x94cb(0x1a6)](b[_0x94cb(0x1f1)])),_(0x3,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xfe289f,_0x1f02be,_0x33ab3d,_0xc4386c)=>{const _0x1d172a=_0x94cb;for(var _0x2d5562=_0xc4386c>0x1?void 0x0:_0xc4386c?H(_0x1f02be,_0x33ab3d):_0x1f02be,_0x2fbbaf=_0xfe289f[_0x1d172a(0x1b5)]-0x1,_0x1a1e64;_0x2fbbaf>=0x0;_0x2fbbaf--)(_0x1a1e64=_0xfe289f[_0x2fbbaf])&&(_0x2d5562=_0x1a1e64(_0x2d5562)||_0x2d5562);return _0x2d5562;},y=(_0x81462,_0x2024d6)=>(_0x2162fd,_0x216256)=>_0x2024d6(_0x2162fd,_0x216256,_0x81462);let C=class extends c['Disposable']{constructor(_0x337c80,_0x2d0054){const _0x168655=_0x94cb;super(),this[_0x168655(0x195)]=_0x337c80,this[_0x168655(0x1d0)]=_0x2d0054,this[_0x168655(0x1cf)]();}[_0x94cb(0x1cf)](){const _0x219c91=_0x94cb;this[_0x219c91(0x195)][_0x219c91(0x1d4)]=this[_0x219c91(0x1d0)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x94cb(0x1a6)](g))],C);function _0x13d3(_0x1fe216,_0x2cf518){const _0x53345e=_0x5334();return _0x13d3=function(_0x13d32e,_0xcfc9ee){_0x13d32e=_0x13d32e-0x18b;let _0x178037=_0x53345e[_0x13d32e];return _0x178037;},_0x13d3(_0x1fe216,_0x2cf518);}var F=Object[_0x94cb(0x1b6)],L=Object[_0x94cb(0x1f4)],Z=(_0x448291,_0x2b3e2a,_0x5d9b9e)=>_0x2b3e2a in _0x448291?F(_0x448291,_0x2b3e2a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d9b9e}):_0x448291[_0x2b3e2a]=_0x5d9b9e,W=(_0x371a69,_0x4ed720,_0x34c76e,_0x489b69)=>{for(var _0x3c347a=_0x489b69>0x1?void 0x0:_0x489b69?L(_0x4ed720,_0x34c76e):_0x4ed720,_0x12a079=_0x371a69['length']-0x1,_0x29e14a;_0x12a079>=0x0;_0x12a079--)(_0x29e14a=_0x371a69[_0x12a079])&&(_0x3c347a=_0x29e14a(_0x3c347a)||_0x3c347a);return _0x3c347a;},O=(_0x261a16,_0x111bd3)=>(_0x1dc48a,_0x3a7bb9)=>_0x111bd3(_0x1dc48a,_0x3a7bb9,_0x261a16),N=(_0xda924b,_0x4d2c8,_0x14065f)=>Z(_0xda924b,typeof _0x4d2c8!=_0x94cb(0x201)?_0x4d2c8+'':_0x4d2c8,_0x14065f);exports[_0x94cb(0x1ca)]=class extends c['Plugin']{constructor(_0x182748=D,_0x5b5d63,_0x71d87){const _0x111b2f=_0x94cb;super(),this[_0x111b2f(0x1bd)]=_0x182748,this[_0x111b2f(0x20d)]=_0x5b5d63,this[_0x111b2f(0x1c9)]=_0x71d87;const {..._0x121c76}=c[_0x111b2f(0x1ab)]({},D,this[_0x111b2f(0x1bd)]);this[_0x111b2f(0x1c9)][_0x111b2f(0x1b2)](q,_0x121c76);}[_0x94cb(0x1fc)](){[[g],[C],[p]]['forEach'](_0x54ff66=>{const _0x4c708d=_0x13d3;this[_0x4c708d(0x20d)][_0x4c708d(0x1b9)](_0x54ff66);});}[_0x94cb(0x199)](){const _0x496ee0=_0x94cb;this[_0x496ee0(0x20d)][_0x496ee0(0x1ec)](C),this['_injector'][_0x496ee0(0x1ec)](p);}},N(exports[_0x94cb(0x1ca)],_0x94cb(0x1ee),U),N(exports[_0x94cb(0x1ca)],_0x94cb(0x1bb),c[_0x94cb(0x1cd)][_0x94cb(0x191)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x94cb(0x1af)](j[_0x94cb(0x1a3)],b['UniverCollaborationClientPlugin'],T[_0x94cb(0x1b7)]),O(0x1,c[_0x94cb(0x1a6)](c[_0x94cb(0x1a5)])),O(0x2,c[_0x94cb(0x18d)])],exports[_0x94cb(0x1ca)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x170a12=_0x413c;(function(_0x28507b,_0x41102d){const _0xef12a7=_0x413c,_0x436a77=_0x28507b();while(!![]){try{const _0x1b8321=-parseInt(_0xef12a7(0xd0))/0x1*(parseInt(_0xef12a7(0x11c))/0x2)+parseInt(_0xef12a7(0x10d))/0x3+parseInt(_0xef12a7(0x101))/0x4*(parseInt(_0xef12a7(0xc0))/0x5)+parseInt(_0xef12a7(0xf3))/0x6*(parseInt(_0xef12a7(0xea))/0x7)+-parseInt(_0xef12a7(0xe7))/0x8+-parseInt(_0xef12a7(0xb5))/0x9*(-parseInt(_0xef12a7(0xee))/0xa)+-parseInt(_0xef12a7(0xdf))/0xb;if(_0x1b8321===_0x41102d)break;else _0x436a77['push'](_0x436a77['shift']());}catch(_0x3b80fc){_0x436a77['push'](_0x436a77['shift']());}}}(_0x49b9,0xbcfa2));function _0x49b9(){const _0xb5011a=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4673024EKTpjc','commentUpdate$','code','40082sBcgsl','format','onStarting','threadId','944310OLszVk','getMemberID','values','/reply','getOwnPropertyDescriptor','390nrEsLG','/delete','root','Solve','replyId','_httpService','_sessionService','_initDataSource','/universer-api/user/list','rangeId','/list','_threadCommentDataSource','/solved','Edit','1764712lnPhdQ','delete','customRanges','Reply','/universer-api/comment/unit/','userID','unitId','ref','post','error','updateComment','subscribe','4386057eVrRpB','Unknown','symbol','dataSource','parentId','comment','_configService','body','getUser','addUser','/add','_injector','thread-comment-data-source.config','length','getUnit','4xpdRxZ','comments','solved','_commentService','27kMBEXG','user','pluginName','pipe','resolved','requireSession','disposeWithMe','deleteComment','_config','find','YYYY/MM/DD\x20HH:mm','15LzHtzI','UNRECOGNIZED','payload','size','addComment','map','personId','OpenOrReOpen','add','getCurrentUser','COMMENT','Add','content','createTimestamp','_threadCommentModel','parse','628010HIVSuh','get','saveCommentToSnapshot','forEach','Solved','resolveComment','_threadCommentDataSourceService','_init','stringify','_userService','_initUserSync','UNIVER_UNKNOWN','/edit','Delete','users','9095218EURhJb','userId','rangeType','filter','replies','type','setConfig'];_0x49b9=function(){return _0xb5011a;};return _0x49b9();}import{CommentService as _0x4c2ad4,CollaborationSessionService as _0x2c13ff,UniverCollaborationClientPlugin as _0xd73538}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38ebb4}from'@univerjs-pro/license';import{dayjs as _0x2f8643,UserManagerService as _0x25c551,Inject as _0x359cb5,Injector as _0x1b2434,Disposable as _0x1f8f54,CustomRangeType as _0x556bf3,UniverInstanceType as _0x516c80,DependentOn as _0x5794d3,IConfigService as _0x58e04f,Plugin as _0x27fb9a,merge as _0x16d744}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17c15e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b2a67,IThreadCommentDataSourceService as _0x66404b}from'@univerjs/thread-comment';import{bufferTime as _0x3e468c}from'rxjs';import{HTTPService as _0x52d944}from'@univerjs/network';const W=_0x170a12(0xe6);var I=(_0x241ee0=>(_0x241ee0[_0x241ee0['OpenOrReOpen']=0x0]=_0x170a12(0xc7),_0x241ee0[_0x241ee0[_0x170a12(0xd4)]=0x1]=_0x170a12(0xd4),_0x241ee0[_0x241ee0[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x241ee0))(I||{}),v=(_0x58b0d4=>(_0x58b0d4[_0x58b0d4[_0x170a12(0x10e)]=0x0]=_0x170a12(0x10e),_0x58b0d4[_0x58b0d4['Add']=0x1]=_0x170a12(0xcb),_0x58b0d4[_0x58b0d4[_0x170a12(0x104)]=0x2]=_0x170a12(0x104),_0x58b0d4[_0x58b0d4[_0x170a12(0x100)]=0x3]=_0x170a12(0x100),_0x58b0d4[_0x58b0d4[_0x170a12(0xdd)]=0x4]=_0x170a12(0xdd),_0x58b0d4[_0x58b0d4[_0x170a12(0xf6)]=0x5]=_0x170a12(0xf6),_0x58b0d4[_0x58b0d4[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x58b0d4))(v||{});const D=_0xcf989e=>_0x2f8643(new Date(+_0xcf989e))[_0x170a12(0xeb)](_0x170a12(0xbf)),B=async(_0x2ab184,_0xba09b0)=>{const _0x9176a0=_0x170a12,_0x4cc8ca=_0x2ab184[_0x9176a0(0xd1)](_0x25c551),_0x405f43=_0x2ab184['get'](_0x52d944);_0xba09b0[_0x9176a0(0xd3)](_0x1c6072=>{const _0x12f205=_0x9176a0;_0x4cc8ca[_0x12f205(0x115)](_0x1c6072)&&_0xba09b0[_0x12f205(0x102)](_0x1c6072);}),_0xba09b0[_0x9176a0(0xc3)]&&(await _0x405f43[_0x9176a0(0xd1)](_0x9176a0(0xfb),{'params':{'userIDs':[..._0xba09b0]}}))[_0x9176a0(0x114)][_0x9176a0(0xde)][_0x9176a0(0xd3)](_0x5ecb2b=>{const _0x10c4c1=_0x9176a0;_0x5ecb2b&&_0x4cc8ca[_0x10c4c1(0x116)](_0x5ecb2b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xd9722c,_0x2dcda6,_0x2b91bb,_0x9f4534)=>{const _0x11b6b9=_0x170a12;for(var _0x1298b3=_0x9f4534>0x1?void 0x0:_0x9f4534?K(_0x2dcda6,_0x2b91bb):_0x2dcda6,_0xd9d81b=_0xd9722c[_0x11b6b9(0x11a)]-0x1,_0x1ad9e0;_0xd9d81b>=0x0;_0xd9d81b--)(_0x1ad9e0=_0xd9722c[_0xd9d81b])&&(_0x1298b3=_0x1ad9e0(_0x1298b3)||_0x1298b3);return _0x1298b3;},p=(_0x4d7fdd,_0x728472)=>(_0x5665d8,_0x1f955f)=>_0x728472(_0x5665d8,_0x1f955f,_0x4d7fdd);let S=class extends _0x1f8f54{constructor(_0x8a3a2b,_0x2eda73,_0x41a41e,_0x4bae05){const _0x23aba6=_0x170a12;super(),this[_0x23aba6(0xb4)]=_0x8a3a2b,this[_0x23aba6(0xce)]=_0x2eda73,this['_userService']=_0x41a41e,this['_injector']=_0x4bae05,this[_0x23aba6(0xd7)](),this[_0x23aba6(0xda)]();}[_0x170a12(0xda)](){const _0x1bbd66=_0x170a12;this[_0x1bbd66(0xbb)](this[_0x1bbd66(0xce)][_0x1bbd66(0xe8)][_0x1bbd66(0xb8)](_0x3e468c(0x10))[_0x1bbd66(0x10c)](_0x4c5b61=>{const _0x1d82c3=_0x1bbd66,_0x1fb7eb=new Set();_0x4c5b61[_0x1d82c3(0xd3)](_0x1b3870=>{const _0x1a1701=_0x1d82c3;switch(_0x1b3870['type']){case _0x1a1701(0xc8):{const _0x3f3e2b=_0x1b3870[_0x1a1701(0xc2)][_0x1a1701(0xc6)];_0x1fb7eb[_0x1a1701(0xc8)](_0x3f3e2b);break;}}}),B(this[_0x1d82c3(0x118)],_0x1fb7eb);}));}[_0x170a12(0xd7)](){const _0x39e942=_0x170a12;this[_0x39e942(0xbb)](this['_commentService'][_0x39e942(0xe8)][_0x39e942(0x10c)](async _0x3df873=>{const _0x517ed4=_0x39e942;var _0x42f004,_0x11e5d0,_0x2f72ae,_0x1fe7aa;const _0x33d73e=(_0x42f004=this[_0x517ed4(0xce)][_0x517ed4(0x11b)](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x39a088=>_0x39a088[_0x517ed4(0xed)]===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x42f004[_0x517ed4(0xf5)];if(!_0x33d73e)return;const {unitId:_0x22c859,subUnitId:_0x2504c1}=_0x33d73e;switch(_0x3df873['user']&&this['_userService'][_0x517ed4(0x116)](_0x3df873[_0x517ed4(0xb6)]),_0x3df873[_0x517ed4(0xe4)]){case v['Add']:break;case v['Reply']:{this[_0x517ed4(0xce)]['addComment'](_0x22c859,_0x2504c1,{'unitId':_0x22c859,'subUnitId':_0x2504c1,'ref':'','id':_0x3df873[_0x517ed4(0xf7)],'dT':D(+_0x3df873[_0x517ed4(0xcd)]),'threadId':_0x3df873[_0x517ed4(0xed)],'personId':(_0x2f72ae=(_0x11e5d0=_0x3df873[_0x517ed4(0xb6)])==null?void 0x0:_0x11e5d0[_0x517ed4(0x106)])!=null?_0x2f72ae:_0x3df873[_0x517ed4(0xe0)],'text':JSON[_0x517ed4(0xcf)](_0x3df873['content']),'parentId':_0x33d73e['id']});break;}case v[_0x517ed4(0xdd)]:{const _0x4257b6=this[_0x517ed4(0xce)]['getComment'](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);_0x4257b6&&_0x4257b6[_0x517ed4(0x111)]&&this[_0x517ed4(0xce)][_0x517ed4(0xbc)](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);break;}case v[_0x517ed4(0x100)]:{this[_0x517ed4(0xce)][_0x517ed4(0x10b)](_0x22c859,_0x2504c1,{'commentId':_0x3df873['replyId'],'text':JSON[_0x517ed4(0xcf)](_0x3df873[_0x517ed4(0xcc)])});break;}case v[_0x517ed4(0xf6)]:{const _0x5a87c0=(_0x1fe7aa=this['_threadCommentModel']['getUnit'](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x5d611=>_0x5d611['threadId']===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x1fe7aa[_0x517ed4(0xf5)];_0x5a87c0&&this['_threadCommentModel']['resolveComment'](_0x22c859,_0x2504c1,_0x5a87c0['id'],_0x3df873[_0x517ed4(0xb3)]===I[_0x517ed4(0xd4)]);break;}}}));}};S=V([p(0x0,_0x359cb5(_0x4c2ad4)),p(0x1,_0x359cb5(_0x4b2a67)),p(0x2,_0x359cb5(_0x25c551)),p(0x3,_0x359cb5(_0x1b2434))],S);const z=_0x170a12(0x119),M={};var k=Object[_0x170a12(0xf2)],Q=(_0x546307,_0x4f484d,_0x1349d8,_0x352bf1)=>{const _0x174430=_0x170a12;for(var _0x190015=_0x352bf1>0x1?void 0x0:_0x352bf1?k(_0x4f484d,_0x1349d8):_0x4f484d,_0x598dc9=_0x546307[_0x174430(0x11a)]-0x1,_0x4e334e;_0x598dc9>=0x0;_0x598dc9--)(_0x4e334e=_0x546307[_0x598dc9])&&(_0x190015=_0x4e334e(_0x190015)||_0x190015);return _0x190015;},_=(_0x5bc900,_0x24dd49)=>(_0x1658df,_0x133e2e)=>_0x24dd49(_0x1658df,_0x133e2e,_0x5bc900);function X(_0x3d36a3,_0x34add5){const _0x420bab=_0x170a12,_0x344159=_0x3d36a3['replies'][0x0];return{..._0x34add5,'id':_0x344159[_0x420bab(0xf7)],'resolved':_0x3d36a3[_0x420bab(0xb3)]===0x1,'dT':D(_0x344159[_0x420bab(0xcd)]),'personId':_0x344159[_0x420bab(0xe0)],'threadId':_0x344159[_0x420bab(0xed)]};}function ee(_0x17b22a,_0x564788,_0xba524e){const _0x4c4b0c=_0x170a12;var _0x1b09df,_0x42baad;if(((_0x42baad=(_0x1b09df=_0x17b22a==null?void 0x0:_0x17b22a[_0x4c4b0c(0xe3)])==null?void 0x0:_0x1b09df[_0x4c4b0c(0x11a)])!=null?_0x42baad:0x0)>0x0){const _0x34064b=(_0x3597e0,_0x3b0880)=>({'id':_0x3597e0[_0x4c4b0c(0xf7)],'threadId':_0x3597e0['threadId'],'dT':D(_0x3597e0[_0x4c4b0c(0xcd)]),'personId':_0x3597e0[_0x4c4b0c(0xe0)],'resolved':_0x17b22a[_0x4c4b0c(0xb3)]===I['Solved'],'unitId':_0x564788,'subUnitId':_0xba524e,'text':JSON[_0x4c4b0c(0xcf)](_0x3597e0[_0x4c4b0c(0xcc)]),'parentId':_0x3b0880}),_0x1e3a3f=_0x34064b(_0x17b22a[_0x4c4b0c(0xe3)][0x0]);return{..._0x1e3a3f,'children':_0x17b22a[_0x4c4b0c(0xe3)]['slice'](0x1)[_0x4c4b0c(0xc5)](_0x5abb7c=>_0x34064b(_0x5abb7c,_0x1e3a3f['id']))};}return null;}let f=class{constructor(_0x33345f,_0x55fa38,_0x6d15d5,_0x5c4ee0){const _0x52d859=_0x170a12;this[_0x52d859(0xf8)]=_0x33345f,this[_0x52d859(0xd9)]=_0x55fa38,this[_0x52d859(0xf9)]=_0x6d15d5,this[_0x52d859(0x118)]=_0x5c4ee0;}async[_0x170a12(0xc4)](_0x4228b8){const _0x216388=_0x170a12;var _0x5e3840,_0xcd2e7d;const {parentId:_0x352f3f,unitId:_0x55c7cd,text:_0x44d758,threadId:_0x433dd7}=_0x4228b8,_0x5dfeb6=(_0xcd2e7d=(_0x5e3840=_0x44d758['customRanges'])==null?void 0x0:_0x5e3840[_0x216388(0xe2)](_0x55d5d5=>_0x55d5d5[_0x216388(0xe1)]===_0x556bf3[_0x216388(0xca)])['map'](_0x52dfeb=>_0x52dfeb[_0x216388(0xfc)]))!=null?_0xcd2e7d:[],_0x5cf39d=JSON[_0x216388(0xd8)](_0x44d758),_0x3bcad8=(await this['_sessionService'][_0x216388(0xba)](_0x55c7cd))[_0x216388(0xef)]();if(_0x352f3f){const _0x2773e3={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6,'threadId':_0x433dd7},_0x35bc00=(await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0xf1),{'body':_0x2773e3}))[_0x216388(0x114)]['reply'];return{..._0x4228b8,'id':_0x35bc00['replyId'],'dT':_0x2f8643(+_0x35bc00[_0x216388(0xcd)])[_0x216388(0xeb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35bc00['userId']};}else{const _0x3e6a59={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6},_0x3de87e=await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0x117),{'body':_0x3e6a59});return X(_0x3de87e[_0x216388(0x114)][_0x216388(0x112)],_0x4228b8);}}async['updateComment'](_0x2c0855){const _0x539810=_0x170a12;var _0x363707,_0x25e5c5;const {text:_0x13edc0,unitId:_0x2eee87}=_0x2c0855,_0x28cbd1=(_0x25e5c5=(_0x363707=_0x13edc0[_0x539810(0x103)])==null?void 0x0:_0x363707[_0x539810(0xe2)](_0x45c916=>_0x45c916['rangeType']===_0x556bf3[_0x539810(0xca)])[_0x539810(0xc5)](_0x1cecfd=>_0x1cecfd[_0x539810(0xfc)]))!=null?_0x25e5c5:[],_0x38dc71=JSON[_0x539810(0xd8)](_0x13edc0),_0x137032=_0x2c0855['threadId'],_0x5c0be0=_0x2c0855['id'],_0x24bc66={'memberId':(await this[_0x539810(0xf9)][_0x539810(0xba)](_0x2eee87))[_0x539810(0xef)](),'unitId':_0x2eee87,'threadId':_0x137032,'mention':_0x28cbd1,'content':_0x38dc71,'replyId':_0x5c0be0},_0x342009=await this['_httpService']['post'](_0x539810(0x105)+_0x2eee87+_0x539810(0xdc),{'body':_0x24bc66});return!_0x342009['body'][_0x539810(0x10a)]||_0x342009['body'][_0x539810(0x10a)][_0x539810(0xe9)]===0x1;}async[_0x170a12(0xd5)](_0x38e51b){const _0x344364=_0x170a12,{unitId:_0x4b7b1e}=_0x38e51b,_0x3378b8=_0x38e51b[_0x344364(0xed)],_0x26b591={'memberId':this[_0x344364(0xd9)][_0x344364(0xc9)]()[_0x344364(0x106)],'unitId':_0x4b7b1e,'threadId':_0x3378b8,'solved':_0x38e51b[_0x344364(0xb9)]?I['Solved']:I['OpenOrReOpen']},_0x53fd1a=await this['_httpService'][_0x344364(0x109)](_0x344364(0x105)+_0x4b7b1e+_0x344364(0xff),{'body':_0x26b591});return!_0x53fd1a['body']['error']||_0x53fd1a[_0x344364(0x114)]['error'][_0x344364(0xe9)]===0x1;}async[_0x170a12(0xbc)](_0x20ca4f,_0x4a6258,_0x2558b8,_0x3793f8){const _0x1e042b=_0x170a12,_0x1ab9d4={'memberId':(await this['_sessionService'][_0x1e042b(0xba)](_0x20ca4f))[_0x1e042b(0xef)](),'threadId':_0x2558b8,'replyId':_0x3793f8,'unitId':_0x20ca4f},_0xd4c3ad=await this[_0x1e042b(0xf8)][_0x1e042b(0x109)](_0x1e042b(0x105)+_0x20ca4f+_0x1e042b(0xf4),{'body':_0x1ab9d4});return!_0xd4c3ad[_0x1e042b(0x114)][_0x1e042b(0x10a)]||_0xd4c3ad['body'][_0x1e042b(0x10a)][_0x1e042b(0xe9)]===0x1;}async['listComments'](_0x105d0b,_0x25fe3b,_0x38b90d){const _0xfae800=_0x170a12,_0xf485c={'unitId':_0x105d0b,'threadId':_0x38b90d},_0xbc3581=await this[_0xfae800(0xf8)][_0xfae800(0x109)](_0xfae800(0x105)+_0x105d0b+_0xfae800(0xfd),{'body':_0xf485c}),_0x396810=_0x38b90d[_0xfae800(0xc5)](_0x3a33c2=>ee(_0xbc3581['body'][_0xfae800(0x11d)][_0x3a33c2],_0x105d0b,_0x25fe3b))[_0xfae800(0xe2)](Boolean);return Object[_0xfae800(0xf0)](_0xbc3581[_0xfae800(0x114)][_0xfae800(0xde)])[_0xfae800(0xd3)](_0x91cdc3=>{const _0x57e83e=_0xfae800;this[_0x57e83e(0xd9)][_0x57e83e(0x116)](_0x91cdc3);}),_0x396810;}[_0x170a12(0xd2)](_0x4f9356){const _0x35825f=_0x170a12;return{'id':_0x4f9356['id'],'threadId':_0x4f9356[_0x35825f(0xed)],'ref':_0x4f9356[_0x35825f(0x108)]};}};f=Q([_(0x0,_0x359cb5(_0x52d944)),_(0x1,_0x359cb5(_0x25c551)),_(0x2,_0x359cb5(_0x2c13ff)),_(0x3,_0x359cb5(_0x1b2434))],f);var re=Object[_0x170a12(0xf2)],te=(_0x394000,_0x4c0a39,_0x3ae398,_0x27ec62)=>{const _0x42ea85=_0x170a12;for(var _0x5b53f3=_0x27ec62>0x1?void 0x0:_0x27ec62?re(_0x4c0a39,_0x3ae398):_0x4c0a39,_0x10c12f=_0x394000[_0x42ea85(0x11a)]-0x1,_0x2b1fe8;_0x10c12f>=0x0;_0x10c12f--)(_0x2b1fe8=_0x394000[_0x10c12f])&&(_0x5b53f3=_0x2b1fe8(_0x5b53f3)||_0x5b53f3);return _0x5b53f3;},N=(_0x4fad23,_0x467e74)=>(_0x1d3cf4,_0x48f888)=>_0x467e74(_0x1d3cf4,_0x48f888,_0x4fad23);let g=class extends _0x1f8f54{constructor(_0x33d743,_0x21ff61){const _0xd3c28e=_0x170a12;super(),this[_0xd3c28e(0xd6)]=_0x33d743,this[_0xd3c28e(0xfe)]=_0x21ff61,this['_initDataSource']();}[_0x170a12(0xfa)](){const _0x473d85=_0x170a12;this['_threadCommentDataSourceService'][_0x473d85(0x110)]=this[_0x473d85(0xfe)],this[_0x473d85(0xd6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x66404b),N(0x1,_0x359cb5(f))],g);var se=Object['defineProperty'],oe=Object[_0x170a12(0xf2)],ne=(_0x232b58,_0xa60be5,_0x532a00)=>_0xa60be5 in _0x232b58?se(_0x232b58,_0xa60be5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x532a00}):_0x232b58[_0xa60be5]=_0x532a00,ie=(_0x26d43c,_0x38630f,_0x370d62,_0x55cd90)=>{const _0x40222c=_0x170a12;for(var _0x3adefa=_0x55cd90>0x1?void 0x0:_0x55cd90?oe(_0x38630f,_0x370d62):_0x38630f,_0x2e3f5e=_0x26d43c[_0x40222c(0x11a)]-0x1,_0x5152db;_0x2e3f5e>=0x0;_0x2e3f5e--)(_0x5152db=_0x26d43c[_0x2e3f5e])&&(_0x3adefa=_0x5152db(_0x3adefa)||_0x3adefa);return _0x3adefa;},w=(_0x14b0fd,_0x408e0d)=>(_0x2f3157,_0x1c7a01)=>_0x408e0d(_0x2f3157,_0x1c7a01,_0x14b0fd),$=(_0xbc54a0,_0x53455b,_0x5420c0)=>ne(_0xbc54a0,typeof _0x53455b!=_0x170a12(0x10f)?_0x53455b+'':_0x53455b,_0x5420c0);function _0x413c(_0x3fa5f7,_0x522b94){const _0x49b987=_0x49b9();return _0x413c=function(_0x413c9d,_0x49abca){_0x413c9d=_0x413c9d-0xb3;let _0x5bd89a=_0x49b987[_0x413c9d];return _0x5bd89a;},_0x413c(_0x3fa5f7,_0x522b94);}let b=class extends _0x27fb9a{constructor(_0x935635=M,_0x66f983,_0x1ea46c){const _0x4d2b5b=_0x170a12;super(),this[_0x4d2b5b(0xbd)]=_0x935635,this[_0x4d2b5b(0x118)]=_0x66f983,this[_0x4d2b5b(0x113)]=_0x1ea46c;const {..._0x18b5f8}=_0x16d744({},M,this[_0x4d2b5b(0xbd)]);this[_0x4d2b5b(0x113)][_0x4d2b5b(0xe5)](z,_0x18b5f8);}[_0x170a12(0xec)](){const _0x551f9a=_0x170a12;[[f],[g],[S]][_0x551f9a(0xd3)](_0x445c9d=>{const _0x159eba=_0x551f9a;this[_0x159eba(0x118)]['add'](_0x445c9d);});}['onReady'](){const _0x869f5d=_0x170a12;this[_0x869f5d(0x118)][_0x869f5d(0xd1)](g),this[_0x869f5d(0x118)][_0x869f5d(0xd1)](S);}};$(b,_0x170a12(0xb7),W),$(b,_0x170a12(0xe4),_0x516c80[_0x170a12(0xdb)]),b=ie([_0x5794d3(_0x17c15e,_0xd73538,_0x38ebb4),w(0x1,_0x359cb5(_0x1b2434)),w(0x2,_0x58e04f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x579c20=_0x39bc;(function(_0x3a19ec,_0x5306c6){const _0x2664d2=_0x39bc,_0x268996=_0x3a19ec();while(!![]){try{const _0x3f9853=parseInt(_0x2664d2(0x220))/0x1+parseInt(_0x2664d2(0x211))/0x2*(parseInt(_0x2664d2(0x202))/0x3)+parseInt(_0x2664d2(0x1e9))/0x4*(parseInt(_0x2664d2(0x1f6))/0x5)+-parseInt(_0x2664d2(0x203))/0x6+parseInt(_0x2664d2(0x1c7))/0x7*(-parseInt(_0x2664d2(0x21c))/0x8)+parseInt(_0x2664d2(0x1d7))/0x9*(-parseInt(_0x2664d2(0x1ff))/0xa)+-parseInt(_0x2664d2(0x1c6))/0xb*(-parseInt(_0x2664d2(0x1d9))/0xc);if(_0x3f9853===_0x5306c6)break;else _0x268996['push'](_0x268996['shift']());}catch(_0x4ed346){_0x268996['push'](_0x268996['shift']());}}}(_0x85a0,0x9dc99));import{CommentService as _0x17d1ba,CollaborationSessionService as _0x3d9f93,UniverCollaborationClientPlugin as _0x3f9f09}from'@univerjs-pro/collaboration-client';function _0x85a0(){const _0x23b890=['1152846YEebpZ','_threadCommentModel','deleteComment','dataSource','getMemberID','COMMENT','pipe','createTimestamp','threadId','stringify','Solved','addComment','_initDataSource','/universer-api/user/list','74090PUGJzW','slice','format','commentUpdate$','resolved','rangeType','values','/edit','UNIVER_UNKNOWN','code','_threadCommentDataSource','6836056sdzMYR','requireSession','content','body','1911xgmooL','Solve','resolveComment','user','_configService','parentId','type','syncUpdateMutationToColla','OpenOrReOpen','replyId','_threadCommentDataSourceService','_userService','11dLCfjx','7KaHFZX','YYYY/MM/DD\x20HH:mm','Unknown','length','getUnit','_config','_init','ref','/reply','parse','users','pluginName','Add','getCurrentUser','rangeId','_injector','3447HhwEZh','get','12416328JjxfRu','/delete','find','replies','UNRECOGNIZED','post','/solved','forEach','disposeWithMe','/add','/universer-api/comment/unit/','customRanges','onStarting','comments','Reply','root','196vpWGWV','saveCommentToSnapshot','_commentService','onReady','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','userID','Delete','_httpService','map','userId','thread-comment-data-source.config','20765CGQOgh','_sessionService','unitId','_initUserSync','listComments','updateComment','getOwnPropertyDescriptor','filter','error','11390eGnfNt','reply','add','72HHGHsh'];_0x85a0=function(){return _0x23b890;};return _0x85a0();}import{UniverLicensePlugin as _0x3fe27b}from'@univerjs-pro/license';import{dayjs as _0x56f7b2,UserManagerService as _0x30db64,Inject as _0xfdb629,Injector as _0xedefd5,Disposable as _0x5476f6,CustomRangeType as _0x66063e,UniverInstanceType as _0x13d77a,DependentOn as _0x18fc2e,IConfigService as _0x23ffae,Plugin as _0x212ef2,merge as _0x4e9d07}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ff4fb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11e319,IThreadCommentDataSourceService as _0x4c2afb}from'@univerjs/thread-comment';import{bufferTime as _0x455ea8}from'rxjs';import{HTTPService as _0x217d03}from'@univerjs/network';const W=_0x579c20(0x1ee);var I=(_0x59fdc0=>(_0x59fdc0[_0x59fdc0[_0x579c20(0x1c2)]=0x0]='OpenOrReOpen',_0x59fdc0[_0x59fdc0[_0x579c20(0x20d)]=0x1]='Solved',_0x59fdc0[_0x59fdc0[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x59fdc0))(I||{}),v=(_0x10764b=>(_0x10764b[_0x10764b['Unknown']=0x0]=_0x579c20(0x1c9),_0x10764b[_0x10764b[_0x579c20(0x1d3)]=0x1]='Add',_0x10764b[_0x10764b[_0x579c20(0x1e7)]=0x2]=_0x579c20(0x1e7),_0x10764b[_0x10764b['Edit']=0x3]='Edit',_0x10764b[_0x10764b[_0x579c20(0x1f1)]=0x4]=_0x579c20(0x1f1),_0x10764b[_0x10764b[_0x579c20(0x221)]=0x5]='Solve',_0x10764b[_0x10764b[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x10764b))(v||{});const D=_0x1f6663=>_0x56f7b2(new Date(+_0x1f6663))[_0x579c20(0x213)](_0x579c20(0x1c8)),B=async(_0x52cf66,_0xc588d6)=>{const _0x157aac=_0x579c20,_0x34b893=_0x52cf66[_0x157aac(0x1d8)](_0x30db64),_0x5e686a=_0x52cf66[_0x157aac(0x1d8)](_0x217d03);_0xc588d6['forEach'](_0x1070a3=>{const _0x2569a2=_0x157aac;_0x34b893[_0x2569a2(0x1ed)](_0x1070a3)&&_0xc588d6['delete'](_0x1070a3);}),_0xc588d6['size']&&(await _0x5e686a['get'](_0x157aac(0x210),{'params':{'userIDs':[..._0xc588d6]}}))['body']['users'][_0x157aac(0x1e0)](_0x4f887b=>{_0x4f887b&&_0x34b893['addUser'](_0x4f887b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x471545,_0x355b95,_0x544974,_0x5c2582)=>{for(var _0x639c80=_0x5c2582>0x1?void 0x0:_0x5c2582?K(_0x355b95,_0x544974):_0x355b95,_0x28907e=_0x471545['length']-0x1,_0x57ce86;_0x28907e>=0x0;_0x28907e--)(_0x57ce86=_0x471545[_0x28907e])&&(_0x639c80=_0x57ce86(_0x639c80)||_0x639c80);return _0x639c80;},p=(_0x246949,_0x2da074)=>(_0x310f8d,_0x267e27)=>_0x2da074(_0x310f8d,_0x267e27,_0x246949);let S=class extends _0x5476f6{constructor(_0x46fa63,_0x4910d4,_0x23c7c9,_0x577ad3){const _0x495860=_0x579c20;super(),this[_0x495860(0x1eb)]=_0x46fa63,this[_0x495860(0x204)]=_0x4910d4,this[_0x495860(0x1c5)]=_0x23c7c9,this['_injector']=_0x577ad3,this['_init'](),this[_0x495860(0x1f9)]();}['_initUserSync'](){const _0x4de8c5=_0x579c20;this[_0x4de8c5(0x1e1)](this[_0x4de8c5(0x204)]['commentUpdate$'][_0x4de8c5(0x209)](_0x455ea8(0x10))['subscribe'](_0xb58bdd=>{const _0x47733c=_0x4de8c5,_0x25dbd1=new Set();_0xb58bdd[_0x47733c(0x1e0)](_0x29b037=>{const _0x3e359e=_0x47733c;switch(_0x29b037['type']){case _0x3e359e(0x201):{const _0x2eaa73=_0x29b037['payload']['personId'];_0x25dbd1[_0x3e359e(0x201)](_0x2eaa73);break;}}}),B(this['_injector'],_0x25dbd1);}));}[_0x579c20(0x1cd)](){const _0x460773=_0x579c20;this['disposeWithMe'](this[_0x460773(0x1eb)][_0x460773(0x214)]['subscribe'](async _0x4ba53a=>{const _0x1ed2ee=_0x460773;var _0x368fcb,_0x5cba2e,_0x21609b,_0x49b8ee;const _0x4c8df3=(_0x368fcb=this[_0x1ed2ee(0x204)]['getUnit'](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0x43bc58=>_0x43bc58[_0x1ed2ee(0x20b)]===_0x4ba53a['threadId']))==null?void 0x0:_0x368fcb['root'];if(!_0x4c8df3)return;const {unitId:_0x3b6135,subUnitId:_0x44d7d8}=_0x4c8df3;switch(_0x4ba53a[_0x1ed2ee(0x223)]&&this[_0x1ed2ee(0x1c5)]['addUser'](_0x4ba53a['user']),_0x4ba53a[_0x1ed2ee(0x1c0)]){case v[_0x1ed2ee(0x1d3)]:break;case v[_0x1ed2ee(0x1e7)]:{this[_0x1ed2ee(0x204)]['addComment'](_0x3b6135,_0x44d7d8,{'unitId':_0x3b6135,'subUnitId':_0x44d7d8,'ref':'','id':_0x4ba53a[_0x1ed2ee(0x1c3)],'dT':D(+_0x4ba53a['createTimestamp']),'threadId':_0x4ba53a['threadId'],'personId':(_0x21609b=(_0x5cba2e=_0x4ba53a[_0x1ed2ee(0x223)])==null?void 0x0:_0x5cba2e['userID'])!=null?_0x21609b:_0x4ba53a[_0x1ed2ee(0x1f4)],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)]),'parentId':_0x4c8df3['id']});break;}case v[_0x1ed2ee(0x1f1)]:{const _0x2c852d=this[_0x1ed2ee(0x204)]['getComment'](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);_0x2c852d&&_0x2c852d[_0x1ed2ee(0x1bf)]&&this['_threadCommentModel'][_0x1ed2ee(0x205)](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);break;}case v['Edit']:{this[_0x1ed2ee(0x204)]['updateComment'](_0x3b6135,_0x44d7d8,{'commentId':_0x4ba53a['replyId'],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)])});break;}case v[_0x1ed2ee(0x221)]:{const _0x3b3ec1=(_0x49b8ee=this['_threadCommentModel'][_0x1ed2ee(0x1cb)](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0xa80e7e=>_0xa80e7e['threadId']===_0x4ba53a[_0x1ed2ee(0x20b)]))==null?void 0x0:_0x49b8ee[_0x1ed2ee(0x1e8)];_0x3b3ec1&&this[_0x1ed2ee(0x204)][_0x1ed2ee(0x222)](_0x3b6135,_0x44d7d8,_0x3b3ec1['id'],_0x4ba53a[_0x1ed2ee(0x1ef)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xfdb629(_0x17d1ba)),p(0x1,_0xfdb629(_0x11e319)),p(0x2,_0xfdb629(_0x30db64)),p(0x3,_0xfdb629(_0xedefd5))],S);const z=_0x579c20(0x1f5),M={};var k=Object[_0x579c20(0x1fc)],Q=(_0x45808e,_0x378876,_0x1225a5,_0x35ea91)=>{const _0x1c3714=_0x579c20;for(var _0x393660=_0x35ea91>0x1?void 0x0:_0x35ea91?k(_0x378876,_0x1225a5):_0x378876,_0x402094=_0x45808e[_0x1c3714(0x1ca)]-0x1,_0x4a44b6;_0x402094>=0x0;_0x402094--)(_0x4a44b6=_0x45808e[_0x402094])&&(_0x393660=_0x4a44b6(_0x393660)||_0x393660);return _0x393660;},_=(_0x4260b9,_0x171e20)=>(_0x41ff99,_0x40dd70)=>_0x171e20(_0x41ff99,_0x40dd70,_0x4260b9);function X(_0x160899,_0x40a24e){const _0x53d479=_0x579c20,_0x343f8e=_0x160899[_0x53d479(0x1dc)][0x0];return{..._0x40a24e,'id':_0x343f8e['replyId'],'resolved':_0x160899['solved']===0x1,'dT':D(_0x343f8e[_0x53d479(0x20a)]),'personId':_0x343f8e[_0x53d479(0x1f4)],'threadId':_0x343f8e[_0x53d479(0x20b)]};}function ee(_0x4dd358,_0x3ff13e,_0x8679ab){const _0x1e2857=_0x579c20;var _0x498072,_0x45c7ef;if(((_0x45c7ef=(_0x498072=_0x4dd358==null?void 0x0:_0x4dd358[_0x1e2857(0x1dc)])==null?void 0x0:_0x498072[_0x1e2857(0x1ca)])!=null?_0x45c7ef:0x0)>0x0){const _0x368b88=(_0x140ee5,_0x3d05c4)=>({'id':_0x140ee5['replyId'],'threadId':_0x140ee5[_0x1e2857(0x20b)],'dT':D(_0x140ee5[_0x1e2857(0x20a)]),'personId':_0x140ee5['userId'],'resolved':_0x4dd358[_0x1e2857(0x1ef)]===I[_0x1e2857(0x20d)],'unitId':_0x3ff13e,'subUnitId':_0x8679ab,'text':JSON[_0x1e2857(0x1d0)](_0x140ee5[_0x1e2857(0x21e)]),'parentId':_0x3d05c4}),_0x5247d3=_0x368b88(_0x4dd358['replies'][0x0]);return{..._0x5247d3,'children':_0x4dd358['replies'][_0x1e2857(0x212)](0x1)[_0x1e2857(0x1f3)](_0x143baf=>_0x368b88(_0x143baf,_0x5247d3['id']))};}return null;}let f=class{constructor(_0x44616f,_0x564672,_0x1f2950,_0x105c12){const _0x71c10c=_0x579c20;this['_httpService']=_0x44616f,this[_0x71c10c(0x1c5)]=_0x564672,this[_0x71c10c(0x1f7)]=_0x1f2950,this[_0x71c10c(0x1d6)]=_0x105c12;}async[_0x579c20(0x20e)](_0x67785c){const _0xe58fbb=_0x579c20;var _0x3cf550,_0x4279c2;const {parentId:_0x3acf03,unitId:_0x27ccc9,text:_0x5de64d,threadId:_0x31deac}=_0x67785c,_0x4de088=(_0x4279c2=(_0x3cf550=_0x5de64d[_0xe58fbb(0x1e4)])==null?void 0x0:_0x3cf550['filter'](_0x4618fe=>_0x4618fe[_0xe58fbb(0x216)]===_0x66063e['COMMENT'])[_0xe58fbb(0x1f3)](_0xace37b=>_0xace37b[_0xe58fbb(0x1d5)]))!=null?_0x4279c2:[],_0x5c91aa=JSON[_0xe58fbb(0x20c)](_0x5de64d),_0x508a97=(await this[_0xe58fbb(0x1f7)][_0xe58fbb(0x21d)](_0x27ccc9))[_0xe58fbb(0x207)]();if(_0x3acf03){const _0xbf7634={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088,'threadId':_0x31deac},_0x4a6a9b=(await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1cf),{'body':_0xbf7634}))['body'][_0xe58fbb(0x200)];return{..._0x67785c,'id':_0x4a6a9b['replyId'],'dT':_0x56f7b2(+_0x4a6a9b['createTimestamp'])[_0xe58fbb(0x213)](_0xe58fbb(0x1c8)),'personId':_0x4a6a9b[_0xe58fbb(0x1f4)]};}else{const _0x504773={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088},_0x4ab39b=await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1e2),{'body':_0x504773});return X(_0x4ab39b['body']['comment'],_0x67785c);}}async[_0x579c20(0x1fb)](_0x2e6699){const _0x235ad8=_0x579c20;var _0x3bee31,_0x307ca7;const {text:_0x594a8c,unitId:_0x47721b}=_0x2e6699,_0x323b34=(_0x307ca7=(_0x3bee31=_0x594a8c[_0x235ad8(0x1e4)])==null?void 0x0:_0x3bee31[_0x235ad8(0x1fd)](_0x56de4d=>_0x56de4d[_0x235ad8(0x216)]===_0x66063e[_0x235ad8(0x208)])[_0x235ad8(0x1f3)](_0x445f87=>_0x445f87[_0x235ad8(0x1d5)]))!=null?_0x307ca7:[],_0x5bbde7=JSON[_0x235ad8(0x20c)](_0x594a8c),_0x3cc976=_0x2e6699[_0x235ad8(0x20b)],_0xbe3082=_0x2e6699['id'],_0x4e5ee1={'memberId':(await this[_0x235ad8(0x1f7)][_0x235ad8(0x21d)](_0x47721b))[_0x235ad8(0x207)](),'unitId':_0x47721b,'threadId':_0x3cc976,'mention':_0x323b34,'content':_0x5bbde7,'replyId':_0xbe3082},_0x18cbd3=await this[_0x235ad8(0x1f2)]['post'](_0x235ad8(0x1e3)+_0x47721b+_0x235ad8(0x218),{'body':_0x4e5ee1});return!_0x18cbd3[_0x235ad8(0x21f)]['error']||_0x18cbd3[_0x235ad8(0x21f)][_0x235ad8(0x1fe)][_0x235ad8(0x21a)]===0x1;}async['resolveComment'](_0x36078d){const _0x2d9aca=_0x579c20,{unitId:_0x100167}=_0x36078d,_0x32bf6e=_0x36078d['threadId'],_0x5bebd4={'memberId':this[_0x2d9aca(0x1c5)][_0x2d9aca(0x1d4)]()[_0x2d9aca(0x1f0)],'unitId':_0x100167,'threadId':_0x32bf6e,'solved':_0x36078d[_0x2d9aca(0x215)]?I[_0x2d9aca(0x20d)]:I[_0x2d9aca(0x1c2)]},_0x2666cb=await this[_0x2d9aca(0x1f2)][_0x2d9aca(0x1de)]('/universer-api/comment/unit/'+_0x100167+_0x2d9aca(0x1df),{'body':_0x5bebd4});return!_0x2666cb[_0x2d9aca(0x21f)]['error']||_0x2666cb[_0x2d9aca(0x21f)][_0x2d9aca(0x1fe)][_0x2d9aca(0x21a)]===0x1;}async[_0x579c20(0x205)](_0x23bb7f,_0x3bc849,_0x518143,_0x2da63b){const _0x6b13e4=_0x579c20,_0x1581f0={'memberId':(await this[_0x6b13e4(0x1f7)][_0x6b13e4(0x21d)](_0x23bb7f))[_0x6b13e4(0x207)](),'threadId':_0x518143,'replyId':_0x2da63b,'unitId':_0x23bb7f},_0x3b0528=await this[_0x6b13e4(0x1f2)][_0x6b13e4(0x1de)](_0x6b13e4(0x1e3)+_0x23bb7f+_0x6b13e4(0x1da),{'body':_0x1581f0});return!_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)]||_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)][_0x6b13e4(0x21a)]===0x1;}async[_0x579c20(0x1fa)](_0x2a457a,_0x1d4d0f,_0x2116de){const _0x4393b5=_0x579c20,_0x591d79={'unitId':_0x2a457a,'threadId':_0x2116de},_0x5142e4=await this[_0x4393b5(0x1f2)][_0x4393b5(0x1de)]('/universer-api/comment/unit/'+_0x2a457a+'/list',{'body':_0x591d79}),_0x5f4f08=_0x2116de[_0x4393b5(0x1f3)](_0x34fb65=>ee(_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1e6)][_0x34fb65],_0x2a457a,_0x1d4d0f))[_0x4393b5(0x1fd)](Boolean);return Object[_0x4393b5(0x217)](_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1d1)])[_0x4393b5(0x1e0)](_0x2bde33=>{const _0xce8f5d=_0x4393b5;this[_0xce8f5d(0x1c5)]['addUser'](_0x2bde33);}),_0x5f4f08;}[_0x579c20(0x1ea)](_0x3bcc79){const _0x53f3fc=_0x579c20;return{'id':_0x3bcc79['id'],'threadId':_0x3bcc79[_0x53f3fc(0x20b)],'ref':_0x3bcc79[_0x53f3fc(0x1ce)]};}};f=Q([_(0x0,_0xfdb629(_0x217d03)),_(0x1,_0xfdb629(_0x30db64)),_(0x2,_0xfdb629(_0x3d9f93)),_(0x3,_0xfdb629(_0xedefd5))],f);var re=Object[_0x579c20(0x1fc)],te=(_0x587487,_0x1f62be,_0xb70b67,_0x5cd8b3)=>{const _0x277c93=_0x579c20;for(var _0x11fa97=_0x5cd8b3>0x1?void 0x0:_0x5cd8b3?re(_0x1f62be,_0xb70b67):_0x1f62be,_0xe14a36=_0x587487[_0x277c93(0x1ca)]-0x1,_0x3bc5a6;_0xe14a36>=0x0;_0xe14a36--)(_0x3bc5a6=_0x587487[_0xe14a36])&&(_0x11fa97=_0x3bc5a6(_0x11fa97)||_0x11fa97);return _0x11fa97;},N=(_0x52e3cc,_0x42075c)=>(_0x7dcf59,_0x2492a6)=>_0x42075c(_0x7dcf59,_0x2492a6,_0x52e3cc);let g=class extends _0x5476f6{constructor(_0x324ac6,_0x23324d){const _0x2e4ab1=_0x579c20;super(),this[_0x2e4ab1(0x1c4)]=_0x324ac6,this[_0x2e4ab1(0x21b)]=_0x23324d,this[_0x2e4ab1(0x20f)]();}[_0x579c20(0x20f)](){const _0x3b1990=_0x579c20;this[_0x3b1990(0x1c4)][_0x3b1990(0x206)]=this['_threadCommentDataSource'],this[_0x3b1990(0x1c4)][_0x3b1990(0x1c1)]=!0x1;}};function _0x39bc(_0x4d073d,_0x11e396){const _0x85a08a=_0x85a0();return _0x39bc=function(_0x39bce5,_0x47fb34){_0x39bce5=_0x39bce5-0x1be;let _0x54f029=_0x85a08a[_0x39bce5];return _0x54f029;},_0x39bc(_0x4d073d,_0x11e396);}g=te([N(0x0,_0x4c2afb),N(0x1,_0xfdb629(f))],g);var se=Object['defineProperty'],oe=Object[_0x579c20(0x1fc)],ne=(_0xd66e01,_0x5efc0b,_0xfa577a)=>_0x5efc0b in _0xd66e01?se(_0xd66e01,_0x5efc0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfa577a}):_0xd66e01[_0x5efc0b]=_0xfa577a,ie=(_0x251592,_0x2e5e7c,_0x343cbe,_0x290471)=>{const _0xf3ac10=_0x579c20;for(var _0x5de1e3=_0x290471>0x1?void 0x0:_0x290471?oe(_0x2e5e7c,_0x343cbe):_0x2e5e7c,_0x3ea5f7=_0x251592[_0xf3ac10(0x1ca)]-0x1,_0x290db2;_0x3ea5f7>=0x0;_0x3ea5f7--)(_0x290db2=_0x251592[_0x3ea5f7])&&(_0x5de1e3=_0x290db2(_0x5de1e3)||_0x5de1e3);return _0x5de1e3;},w=(_0x2930c4,_0x5f4643)=>(_0x3eba81,_0x3cab6a)=>_0x5f4643(_0x3eba81,_0x3cab6a,_0x2930c4),$=(_0x2cb69e,_0x46b1b0,_0x42b110)=>ne(_0x2cb69e,typeof _0x46b1b0!='symbol'?_0x46b1b0+'':_0x46b1b0,_0x42b110);let b=class extends _0x212ef2{constructor(_0x381505=M,_0xd639ad,_0x5e9cb6){const _0xb7ed8d=_0x579c20;super(),this[_0xb7ed8d(0x1cc)]=_0x381505,this[_0xb7ed8d(0x1d6)]=_0xd639ad,this[_0xb7ed8d(0x1be)]=_0x5e9cb6;const {..._0x4b1085}=_0x4e9d07({},M,this[_0xb7ed8d(0x1cc)]);this[_0xb7ed8d(0x1be)]['setConfig'](z,_0x4b1085);}[_0x579c20(0x1e5)](){const _0x4f45b9=_0x579c20;[[f],[g],[S]][_0x4f45b9(0x1e0)](_0x41d14e=>{const _0xa47dc9=_0x4f45b9;this['_injector'][_0xa47dc9(0x201)](_0x41d14e);});}[_0x579c20(0x1ec)](){const _0x26f858=_0x579c20;this[_0x26f858(0x1d6)][_0x26f858(0x1d8)](g),this['_injector'][_0x26f858(0x1d8)](S);}};$(b,_0x579c20(0x1d2),W),$(b,_0x579c20(0x1c0),_0x13d77a[_0x579c20(0x219)]),b=ie([_0x18fc2e(_0x1ff4fb,_0x3f9f09,_0x3fe27b),w(0x1,_0xfdb629(_0xedefd5)),w(0x2,_0x23ffae)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x170a12=_0x413c;(function(_0x28507b,_0x41102d){const _0xef12a7=_0x413c,_0x436a77=_0x28507b();while(!![]){try{const _0x1b8321=-parseInt(_0xef12a7(0xd0))/0x1*(parseInt(_0xef12a7(0x11c))/0x2)+parseInt(_0xef12a7(0x10d))/0x3+parseInt(_0xef12a7(0x101))/0x4*(parseInt(_0xef12a7(0xc0))/0x5)+parseInt(_0xef12a7(0xf3))/0x6*(parseInt(_0xef12a7(0xea))/0x7)+-parseInt(_0xef12a7(0xe7))/0x8+-parseInt(_0xef12a7(0xb5))/0x9*(-parseInt(_0xef12a7(0xee))/0xa)+-parseInt(_0xef12a7(0xdf))/0xb;if(_0x1b8321===_0x41102d)break;else _0x436a77['push'](_0x436a77['shift']());}catch(_0x3b80fc){_0x436a77['push'](_0x436a77['shift']());}}}(_0x49b9,0xbcfa2));function _0x49b9(){const _0xb5011a=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4673024EKTpjc','commentUpdate$','code','40082sBcgsl','format','onStarting','threadId','944310OLszVk','getMemberID','values','/reply','getOwnPropertyDescriptor','390nrEsLG','/delete','root','Solve','replyId','_httpService','_sessionService','_initDataSource','/universer-api/user/list','rangeId','/list','_threadCommentDataSource','/solved','Edit','1764712lnPhdQ','delete','customRanges','Reply','/universer-api/comment/unit/','userID','unitId','ref','post','error','updateComment','subscribe','4386057eVrRpB','Unknown','symbol','dataSource','parentId','comment','_configService','body','getUser','addUser','/add','_injector','thread-comment-data-source.config','length','getUnit','4xpdRxZ','comments','solved','_commentService','27kMBEXG','user','pluginName','pipe','resolved','requireSession','disposeWithMe','deleteComment','_config','find','YYYY/MM/DD\x20HH:mm','15LzHtzI','UNRECOGNIZED','payload','size','addComment','map','personId','OpenOrReOpen','add','getCurrentUser','COMMENT','Add','content','createTimestamp','_threadCommentModel','parse','628010HIVSuh','get','saveCommentToSnapshot','forEach','Solved','resolveComment','_threadCommentDataSourceService','_init','stringify','_userService','_initUserSync','UNIVER_UNKNOWN','/edit','Delete','users','9095218EURhJb','userId','rangeType','filter','replies','type','setConfig'];_0x49b9=function(){return _0xb5011a;};return _0x49b9();}import{CommentService as _0x4c2ad4,CollaborationSessionService as _0x2c13ff,UniverCollaborationClientPlugin as _0xd73538}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38ebb4}from'@univerjs-pro/license';import{dayjs as _0x2f8643,UserManagerService as _0x25c551,Inject as _0x359cb5,Injector as _0x1b2434,Disposable as _0x1f8f54,CustomRangeType as _0x556bf3,UniverInstanceType as _0x516c80,DependentOn as _0x5794d3,IConfigService as _0x58e04f,Plugin as _0x27fb9a,merge as _0x16d744}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17c15e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b2a67,IThreadCommentDataSourceService as _0x66404b}from'@univerjs/thread-comment';import{bufferTime as _0x3e468c}from'rxjs';import{HTTPService as _0x52d944}from'@univerjs/network';const W=_0x170a12(0xe6);var I=(_0x241ee0=>(_0x241ee0[_0x241ee0['OpenOrReOpen']=0x0]=_0x170a12(0xc7),_0x241ee0[_0x241ee0[_0x170a12(0xd4)]=0x1]=_0x170a12(0xd4),_0x241ee0[_0x241ee0[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x241ee0))(I||{}),v=(_0x58b0d4=>(_0x58b0d4[_0x58b0d4[_0x170a12(0x10e)]=0x0]=_0x170a12(0x10e),_0x58b0d4[_0x58b0d4['Add']=0x1]=_0x170a12(0xcb),_0x58b0d4[_0x58b0d4[_0x170a12(0x104)]=0x2]=_0x170a12(0x104),_0x58b0d4[_0x58b0d4[_0x170a12(0x100)]=0x3]=_0x170a12(0x100),_0x58b0d4[_0x58b0d4[_0x170a12(0xdd)]=0x4]=_0x170a12(0xdd),_0x58b0d4[_0x58b0d4[_0x170a12(0xf6)]=0x5]=_0x170a12(0xf6),_0x58b0d4[_0x58b0d4[_0x170a12(0xc1)]=-0x1]=_0x170a12(0xc1),_0x58b0d4))(v||{});const D=_0xcf989e=>_0x2f8643(new Date(+_0xcf989e))[_0x170a12(0xeb)](_0x170a12(0xbf)),B=async(_0x2ab184,_0xba09b0)=>{const _0x9176a0=_0x170a12,_0x4cc8ca=_0x2ab184[_0x9176a0(0xd1)](_0x25c551),_0x405f43=_0x2ab184['get'](_0x52d944);_0xba09b0[_0x9176a0(0xd3)](_0x1c6072=>{const _0x12f205=_0x9176a0;_0x4cc8ca[_0x12f205(0x115)](_0x1c6072)&&_0xba09b0[_0x12f205(0x102)](_0x1c6072);}),_0xba09b0[_0x9176a0(0xc3)]&&(await _0x405f43[_0x9176a0(0xd1)](_0x9176a0(0xfb),{'params':{'userIDs':[..._0xba09b0]}}))[_0x9176a0(0x114)][_0x9176a0(0xde)][_0x9176a0(0xd3)](_0x5ecb2b=>{const _0x10c4c1=_0x9176a0;_0x5ecb2b&&_0x4cc8ca[_0x10c4c1(0x116)](_0x5ecb2b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xd9722c,_0x2dcda6,_0x2b91bb,_0x9f4534)=>{const _0x11b6b9=_0x170a12;for(var _0x1298b3=_0x9f4534>0x1?void 0x0:_0x9f4534?K(_0x2dcda6,_0x2b91bb):_0x2dcda6,_0xd9d81b=_0xd9722c[_0x11b6b9(0x11a)]-0x1,_0x1ad9e0;_0xd9d81b>=0x0;_0xd9d81b--)(_0x1ad9e0=_0xd9722c[_0xd9d81b])&&(_0x1298b3=_0x1ad9e0(_0x1298b3)||_0x1298b3);return _0x1298b3;},p=(_0x4d7fdd,_0x728472)=>(_0x5665d8,_0x1f955f)=>_0x728472(_0x5665d8,_0x1f955f,_0x4d7fdd);let S=class extends _0x1f8f54{constructor(_0x8a3a2b,_0x2eda73,_0x41a41e,_0x4bae05){const _0x23aba6=_0x170a12;super(),this[_0x23aba6(0xb4)]=_0x8a3a2b,this[_0x23aba6(0xce)]=_0x2eda73,this['_userService']=_0x41a41e,this['_injector']=_0x4bae05,this[_0x23aba6(0xd7)](),this[_0x23aba6(0xda)]();}[_0x170a12(0xda)](){const _0x1bbd66=_0x170a12;this[_0x1bbd66(0xbb)](this[_0x1bbd66(0xce)][_0x1bbd66(0xe8)][_0x1bbd66(0xb8)](_0x3e468c(0x10))[_0x1bbd66(0x10c)](_0x4c5b61=>{const _0x1d82c3=_0x1bbd66,_0x1fb7eb=new Set();_0x4c5b61[_0x1d82c3(0xd3)](_0x1b3870=>{const _0x1a1701=_0x1d82c3;switch(_0x1b3870['type']){case _0x1a1701(0xc8):{const _0x3f3e2b=_0x1b3870[_0x1a1701(0xc2)][_0x1a1701(0xc6)];_0x1fb7eb[_0x1a1701(0xc8)](_0x3f3e2b);break;}}}),B(this[_0x1d82c3(0x118)],_0x1fb7eb);}));}[_0x170a12(0xd7)](){const _0x39e942=_0x170a12;this[_0x39e942(0xbb)](this['_commentService'][_0x39e942(0xe8)][_0x39e942(0x10c)](async _0x3df873=>{const _0x517ed4=_0x39e942;var _0x42f004,_0x11e5d0,_0x2f72ae,_0x1fe7aa;const _0x33d73e=(_0x42f004=this[_0x517ed4(0xce)][_0x517ed4(0x11b)](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x39a088=>_0x39a088[_0x517ed4(0xed)]===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x42f004[_0x517ed4(0xf5)];if(!_0x33d73e)return;const {unitId:_0x22c859,subUnitId:_0x2504c1}=_0x33d73e;switch(_0x3df873['user']&&this['_userService'][_0x517ed4(0x116)](_0x3df873[_0x517ed4(0xb6)]),_0x3df873[_0x517ed4(0xe4)]){case v['Add']:break;case v['Reply']:{this[_0x517ed4(0xce)]['addComment'](_0x22c859,_0x2504c1,{'unitId':_0x22c859,'subUnitId':_0x2504c1,'ref':'','id':_0x3df873[_0x517ed4(0xf7)],'dT':D(+_0x3df873[_0x517ed4(0xcd)]),'threadId':_0x3df873[_0x517ed4(0xed)],'personId':(_0x2f72ae=(_0x11e5d0=_0x3df873[_0x517ed4(0xb6)])==null?void 0x0:_0x11e5d0[_0x517ed4(0x106)])!=null?_0x2f72ae:_0x3df873[_0x517ed4(0xe0)],'text':JSON[_0x517ed4(0xcf)](_0x3df873['content']),'parentId':_0x33d73e['id']});break;}case v[_0x517ed4(0xdd)]:{const _0x4257b6=this[_0x517ed4(0xce)]['getComment'](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);_0x4257b6&&_0x4257b6[_0x517ed4(0x111)]&&this[_0x517ed4(0xce)][_0x517ed4(0xbc)](_0x22c859,_0x2504c1,_0x3df873[_0x517ed4(0xf7)]);break;}case v[_0x517ed4(0x100)]:{this[_0x517ed4(0xce)][_0x517ed4(0x10b)](_0x22c859,_0x2504c1,{'commentId':_0x3df873['replyId'],'text':JSON[_0x517ed4(0xcf)](_0x3df873[_0x517ed4(0xcc)])});break;}case v[_0x517ed4(0xf6)]:{const _0x5a87c0=(_0x1fe7aa=this['_threadCommentModel']['getUnit'](_0x3df873[_0x517ed4(0x107)])[_0x517ed4(0xbe)](_0x5d611=>_0x5d611['threadId']===_0x3df873[_0x517ed4(0xed)]))==null?void 0x0:_0x1fe7aa[_0x517ed4(0xf5)];_0x5a87c0&&this['_threadCommentModel']['resolveComment'](_0x22c859,_0x2504c1,_0x5a87c0['id'],_0x3df873[_0x517ed4(0xb3)]===I[_0x517ed4(0xd4)]);break;}}}));}};S=V([p(0x0,_0x359cb5(_0x4c2ad4)),p(0x1,_0x359cb5(_0x4b2a67)),p(0x2,_0x359cb5(_0x25c551)),p(0x3,_0x359cb5(_0x1b2434))],S);const z=_0x170a12(0x119),M={};var k=Object[_0x170a12(0xf2)],Q=(_0x546307,_0x4f484d,_0x1349d8,_0x352bf1)=>{const _0x174430=_0x170a12;for(var _0x190015=_0x352bf1>0x1?void 0x0:_0x352bf1?k(_0x4f484d,_0x1349d8):_0x4f484d,_0x598dc9=_0x546307[_0x174430(0x11a)]-0x1,_0x4e334e;_0x598dc9>=0x0;_0x598dc9--)(_0x4e334e=_0x546307[_0x598dc9])&&(_0x190015=_0x4e334e(_0x190015)||_0x190015);return _0x190015;},_=(_0x5bc900,_0x24dd49)=>(_0x1658df,_0x133e2e)=>_0x24dd49(_0x1658df,_0x133e2e,_0x5bc900);function X(_0x3d36a3,_0x34add5){const _0x420bab=_0x170a12,_0x344159=_0x3d36a3['replies'][0x0];return{..._0x34add5,'id':_0x344159[_0x420bab(0xf7)],'resolved':_0x3d36a3[_0x420bab(0xb3)]===0x1,'dT':D(_0x344159[_0x420bab(0xcd)]),'personId':_0x344159[_0x420bab(0xe0)],'threadId':_0x344159[_0x420bab(0xed)]};}function ee(_0x17b22a,_0x564788,_0xba524e){const _0x4c4b0c=_0x170a12;var _0x1b09df,_0x42baad;if(((_0x42baad=(_0x1b09df=_0x17b22a==null?void 0x0:_0x17b22a[_0x4c4b0c(0xe3)])==null?void 0x0:_0x1b09df[_0x4c4b0c(0x11a)])!=null?_0x42baad:0x0)>0x0){const _0x34064b=(_0x3597e0,_0x3b0880)=>({'id':_0x3597e0[_0x4c4b0c(0xf7)],'threadId':_0x3597e0['threadId'],'dT':D(_0x3597e0[_0x4c4b0c(0xcd)]),'personId':_0x3597e0[_0x4c4b0c(0xe0)],'resolved':_0x17b22a[_0x4c4b0c(0xb3)]===I['Solved'],'unitId':_0x564788,'subUnitId':_0xba524e,'text':JSON[_0x4c4b0c(0xcf)](_0x3597e0[_0x4c4b0c(0xcc)]),'parentId':_0x3b0880}),_0x1e3a3f=_0x34064b(_0x17b22a[_0x4c4b0c(0xe3)][0x0]);return{..._0x1e3a3f,'children':_0x17b22a[_0x4c4b0c(0xe3)]['slice'](0x1)[_0x4c4b0c(0xc5)](_0x5abb7c=>_0x34064b(_0x5abb7c,_0x1e3a3f['id']))};}return null;}let f=class{constructor(_0x33345f,_0x55fa38,_0x6d15d5,_0x5c4ee0){const _0x52d859=_0x170a12;this[_0x52d859(0xf8)]=_0x33345f,this[_0x52d859(0xd9)]=_0x55fa38,this[_0x52d859(0xf9)]=_0x6d15d5,this[_0x52d859(0x118)]=_0x5c4ee0;}async[_0x170a12(0xc4)](_0x4228b8){const _0x216388=_0x170a12;var _0x5e3840,_0xcd2e7d;const {parentId:_0x352f3f,unitId:_0x55c7cd,text:_0x44d758,threadId:_0x433dd7}=_0x4228b8,_0x5dfeb6=(_0xcd2e7d=(_0x5e3840=_0x44d758['customRanges'])==null?void 0x0:_0x5e3840[_0x216388(0xe2)](_0x55d5d5=>_0x55d5d5[_0x216388(0xe1)]===_0x556bf3[_0x216388(0xca)])['map'](_0x52dfeb=>_0x52dfeb[_0x216388(0xfc)]))!=null?_0xcd2e7d:[],_0x5cf39d=JSON[_0x216388(0xd8)](_0x44d758),_0x3bcad8=(await this['_sessionService'][_0x216388(0xba)](_0x55c7cd))[_0x216388(0xef)]();if(_0x352f3f){const _0x2773e3={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6,'threadId':_0x433dd7},_0x35bc00=(await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0xf1),{'body':_0x2773e3}))[_0x216388(0x114)]['reply'];return{..._0x4228b8,'id':_0x35bc00['replyId'],'dT':_0x2f8643(+_0x35bc00[_0x216388(0xcd)])[_0x216388(0xeb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35bc00['userId']};}else{const _0x3e6a59={'memberId':_0x3bcad8,'unitId':_0x55c7cd,'content':_0x5cf39d,'mention':_0x5dfeb6},_0x3de87e=await this['_httpService'][_0x216388(0x109)](_0x216388(0x105)+_0x55c7cd+_0x216388(0x117),{'body':_0x3e6a59});return X(_0x3de87e[_0x216388(0x114)][_0x216388(0x112)],_0x4228b8);}}async['updateComment'](_0x2c0855){const _0x539810=_0x170a12;var _0x363707,_0x25e5c5;const {text:_0x13edc0,unitId:_0x2eee87}=_0x2c0855,_0x28cbd1=(_0x25e5c5=(_0x363707=_0x13edc0[_0x539810(0x103)])==null?void 0x0:_0x363707[_0x539810(0xe2)](_0x45c916=>_0x45c916['rangeType']===_0x556bf3[_0x539810(0xca)])[_0x539810(0xc5)](_0x1cecfd=>_0x1cecfd[_0x539810(0xfc)]))!=null?_0x25e5c5:[],_0x38dc71=JSON[_0x539810(0xd8)](_0x13edc0),_0x137032=_0x2c0855['threadId'],_0x5c0be0=_0x2c0855['id'],_0x24bc66={'memberId':(await this[_0x539810(0xf9)][_0x539810(0xba)](_0x2eee87))[_0x539810(0xef)](),'unitId':_0x2eee87,'threadId':_0x137032,'mention':_0x28cbd1,'content':_0x38dc71,'replyId':_0x5c0be0},_0x342009=await this['_httpService']['post'](_0x539810(0x105)+_0x2eee87+_0x539810(0xdc),{'body':_0x24bc66});return!_0x342009['body'][_0x539810(0x10a)]||_0x342009['body'][_0x539810(0x10a)][_0x539810(0xe9)]===0x1;}async[_0x170a12(0xd5)](_0x38e51b){const _0x344364=_0x170a12,{unitId:_0x4b7b1e}=_0x38e51b,_0x3378b8=_0x38e51b[_0x344364(0xed)],_0x26b591={'memberId':this[_0x344364(0xd9)][_0x344364(0xc9)]()[_0x344364(0x106)],'unitId':_0x4b7b1e,'threadId':_0x3378b8,'solved':_0x38e51b[_0x344364(0xb9)]?I['Solved']:I['OpenOrReOpen']},_0x53fd1a=await this['_httpService'][_0x344364(0x109)](_0x344364(0x105)+_0x4b7b1e+_0x344364(0xff),{'body':_0x26b591});return!_0x53fd1a['body']['error']||_0x53fd1a[_0x344364(0x114)]['error'][_0x344364(0xe9)]===0x1;}async[_0x170a12(0xbc)](_0x20ca4f,_0x4a6258,_0x2558b8,_0x3793f8){const _0x1e042b=_0x170a12,_0x1ab9d4={'memberId':(await this['_sessionService'][_0x1e042b(0xba)](_0x20ca4f))[_0x1e042b(0xef)](),'threadId':_0x2558b8,'replyId':_0x3793f8,'unitId':_0x20ca4f},_0xd4c3ad=await this[_0x1e042b(0xf8)][_0x1e042b(0x109)](_0x1e042b(0x105)+_0x20ca4f+_0x1e042b(0xf4),{'body':_0x1ab9d4});return!_0xd4c3ad[_0x1e042b(0x114)][_0x1e042b(0x10a)]||_0xd4c3ad['body'][_0x1e042b(0x10a)][_0x1e042b(0xe9)]===0x1;}async['listComments'](_0x105d0b,_0x25fe3b,_0x38b90d){const _0xfae800=_0x170a12,_0xf485c={'unitId':_0x105d0b,'threadId':_0x38b90d},_0xbc3581=await this[_0xfae800(0xf8)][_0xfae800(0x109)](_0xfae800(0x105)+_0x105d0b+_0xfae800(0xfd),{'body':_0xf485c}),_0x396810=_0x38b90d[_0xfae800(0xc5)](_0x3a33c2=>ee(_0xbc3581['body'][_0xfae800(0x11d)][_0x3a33c2],_0x105d0b,_0x25fe3b))[_0xfae800(0xe2)](Boolean);return Object[_0xfae800(0xf0)](_0xbc3581[_0xfae800(0x114)][_0xfae800(0xde)])[_0xfae800(0xd3)](_0x91cdc3=>{const _0x57e83e=_0xfae800;this[_0x57e83e(0xd9)][_0x57e83e(0x116)](_0x91cdc3);}),_0x396810;}[_0x170a12(0xd2)](_0x4f9356){const _0x35825f=_0x170a12;return{'id':_0x4f9356['id'],'threadId':_0x4f9356[_0x35825f(0xed)],'ref':_0x4f9356[_0x35825f(0x108)]};}};f=Q([_(0x0,_0x359cb5(_0x52d944)),_(0x1,_0x359cb5(_0x25c551)),_(0x2,_0x359cb5(_0x2c13ff)),_(0x3,_0x359cb5(_0x1b2434))],f);var re=Object[_0x170a12(0xf2)],te=(_0x394000,_0x4c0a39,_0x3ae398,_0x27ec62)=>{const _0x42ea85=_0x170a12;for(var _0x5b53f3=_0x27ec62>0x1?void 0x0:_0x27ec62?re(_0x4c0a39,_0x3ae398):_0x4c0a39,_0x10c12f=_0x394000[_0x42ea85(0x11a)]-0x1,_0x2b1fe8;_0x10c12f>=0x0;_0x10c12f--)(_0x2b1fe8=_0x394000[_0x10c12f])&&(_0x5b53f3=_0x2b1fe8(_0x5b53f3)||_0x5b53f3);return _0x5b53f3;},N=(_0x4fad23,_0x467e74)=>(_0x1d3cf4,_0x48f888)=>_0x467e74(_0x1d3cf4,_0x48f888,_0x4fad23);let g=class extends _0x1f8f54{constructor(_0x33d743,_0x21ff61){const _0xd3c28e=_0x170a12;super(),this[_0xd3c28e(0xd6)]=_0x33d743,this[_0xd3c28e(0xfe)]=_0x21ff61,this['_initDataSource']();}[_0x170a12(0xfa)](){const _0x473d85=_0x170a12;this['_threadCommentDataSourceService'][_0x473d85(0x110)]=this[_0x473d85(0xfe)],this[_0x473d85(0xd6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x66404b),N(0x1,_0x359cb5(f))],g);var se=Object['defineProperty'],oe=Object[_0x170a12(0xf2)],ne=(_0x232b58,_0xa60be5,_0x532a00)=>_0xa60be5 in _0x232b58?se(_0x232b58,_0xa60be5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x532a00}):_0x232b58[_0xa60be5]=_0x532a00,ie=(_0x26d43c,_0x38630f,_0x370d62,_0x55cd90)=>{const _0x40222c=_0x170a12;for(var _0x3adefa=_0x55cd90>0x1?void 0x0:_0x55cd90?oe(_0x38630f,_0x370d62):_0x38630f,_0x2e3f5e=_0x26d43c[_0x40222c(0x11a)]-0x1,_0x5152db;_0x2e3f5e>=0x0;_0x2e3f5e--)(_0x5152db=_0x26d43c[_0x2e3f5e])&&(_0x3adefa=_0x5152db(_0x3adefa)||_0x3adefa);return _0x3adefa;},w=(_0x14b0fd,_0x408e0d)=>(_0x2f3157,_0x1c7a01)=>_0x408e0d(_0x2f3157,_0x1c7a01,_0x14b0fd),$=(_0xbc54a0,_0x53455b,_0x5420c0)=>ne(_0xbc54a0,typeof _0x53455b!=_0x170a12(0x10f)?_0x53455b+'':_0x53455b,_0x5420c0);function _0x413c(_0x3fa5f7,_0x522b94){const _0x49b987=_0x49b9();return _0x413c=function(_0x413c9d,_0x49abca){_0x413c9d=_0x413c9d-0xb3;let _0x5bd89a=_0x49b987[_0x413c9d];return _0x5bd89a;},_0x413c(_0x3fa5f7,_0x522b94);}let b=class extends _0x27fb9a{constructor(_0x935635=M,_0x66f983,_0x1ea46c){const _0x4d2b5b=_0x170a12;super(),this[_0x4d2b5b(0xbd)]=_0x935635,this[_0x4d2b5b(0x118)]=_0x66f983,this[_0x4d2b5b(0x113)]=_0x1ea46c;const {..._0x18b5f8}=_0x16d744({},M,this[_0x4d2b5b(0xbd)]);this[_0x4d2b5b(0x113)][_0x4d2b5b(0xe5)](z,_0x18b5f8);}[_0x170a12(0xec)](){const _0x551f9a=_0x170a12;[[f],[g],[S]][_0x551f9a(0xd3)](_0x445c9d=>{const _0x159eba=_0x551f9a;this[_0x159eba(0x118)]['add'](_0x445c9d);});}['onReady'](){const _0x869f5d=_0x170a12;this[_0x869f5d(0x118)][_0x869f5d(0xd1)](g),this[_0x869f5d(0x118)][_0x869f5d(0xd1)](S);}};$(b,_0x170a12(0xb7),W),$(b,_0x170a12(0xe4),_0x516c80[_0x170a12(0xdb)]),b=ie([_0x5794d3(_0x17c15e,_0xd73538,_0x38ebb4),w(0x1,_0x359cb5(_0x1b2434)),w(0x2,_0x58e04f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x579c20=_0x39bc;(function(_0x3a19ec,_0x5306c6){const _0x2664d2=_0x39bc,_0x268996=_0x3a19ec();while(!![]){try{const _0x3f9853=parseInt(_0x2664d2(0x220))/0x1+parseInt(_0x2664d2(0x211))/0x2*(parseInt(_0x2664d2(0x202))/0x3)+parseInt(_0x2664d2(0x1e9))/0x4*(parseInt(_0x2664d2(0x1f6))/0x5)+-parseInt(_0x2664d2(0x203))/0x6+parseInt(_0x2664d2(0x1c7))/0x7*(-parseInt(_0x2664d2(0x21c))/0x8)+parseInt(_0x2664d2(0x1d7))/0x9*(-parseInt(_0x2664d2(0x1ff))/0xa)+-parseInt(_0x2664d2(0x1c6))/0xb*(-parseInt(_0x2664d2(0x1d9))/0xc);if(_0x3f9853===_0x5306c6)break;else _0x268996['push'](_0x268996['shift']());}catch(_0x4ed346){_0x268996['push'](_0x268996['shift']());}}}(_0x85a0,0x9dc99));import{CommentService as _0x17d1ba,CollaborationSessionService as _0x3d9f93,UniverCollaborationClientPlugin as _0x3f9f09}from'@univerjs-pro/collaboration-client';function _0x85a0(){const _0x23b890=['1152846YEebpZ','_threadCommentModel','deleteComment','dataSource','getMemberID','COMMENT','pipe','createTimestamp','threadId','stringify','Solved','addComment','_initDataSource','/universer-api/user/list','74090PUGJzW','slice','format','commentUpdate$','resolved','rangeType','values','/edit','UNIVER_UNKNOWN','code','_threadCommentDataSource','6836056sdzMYR','requireSession','content','body','1911xgmooL','Solve','resolveComment','user','_configService','parentId','type','syncUpdateMutationToColla','OpenOrReOpen','replyId','_threadCommentDataSourceService','_userService','11dLCfjx','7KaHFZX','YYYY/MM/DD\x20HH:mm','Unknown','length','getUnit','_config','_init','ref','/reply','parse','users','pluginName','Add','getCurrentUser','rangeId','_injector','3447HhwEZh','get','12416328JjxfRu','/delete','find','replies','UNRECOGNIZED','post','/solved','forEach','disposeWithMe','/add','/universer-api/comment/unit/','customRanges','onStarting','comments','Reply','root','196vpWGWV','saveCommentToSnapshot','_commentService','onReady','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','userID','Delete','_httpService','map','userId','thread-comment-data-source.config','20765CGQOgh','_sessionService','unitId','_initUserSync','listComments','updateComment','getOwnPropertyDescriptor','filter','error','11390eGnfNt','reply','add','72HHGHsh'];_0x85a0=function(){return _0x23b890;};return _0x85a0();}import{UniverLicensePlugin as _0x3fe27b}from'@univerjs-pro/license';import{dayjs as _0x56f7b2,UserManagerService as _0x30db64,Inject as _0xfdb629,Injector as _0xedefd5,Disposable as _0x5476f6,CustomRangeType as _0x66063e,UniverInstanceType as _0x13d77a,DependentOn as _0x18fc2e,IConfigService as _0x23ffae,Plugin as _0x212ef2,merge as _0x4e9d07}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ff4fb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11e319,IThreadCommentDataSourceService as _0x4c2afb}from'@univerjs/thread-comment';import{bufferTime as _0x455ea8}from'rxjs';import{HTTPService as _0x217d03}from'@univerjs/network';const W=_0x579c20(0x1ee);var I=(_0x59fdc0=>(_0x59fdc0[_0x59fdc0[_0x579c20(0x1c2)]=0x0]='OpenOrReOpen',_0x59fdc0[_0x59fdc0[_0x579c20(0x20d)]=0x1]='Solved',_0x59fdc0[_0x59fdc0[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x59fdc0))(I||{}),v=(_0x10764b=>(_0x10764b[_0x10764b['Unknown']=0x0]=_0x579c20(0x1c9),_0x10764b[_0x10764b[_0x579c20(0x1d3)]=0x1]='Add',_0x10764b[_0x10764b[_0x579c20(0x1e7)]=0x2]=_0x579c20(0x1e7),_0x10764b[_0x10764b['Edit']=0x3]='Edit',_0x10764b[_0x10764b[_0x579c20(0x1f1)]=0x4]=_0x579c20(0x1f1),_0x10764b[_0x10764b[_0x579c20(0x221)]=0x5]='Solve',_0x10764b[_0x10764b[_0x579c20(0x1dd)]=-0x1]=_0x579c20(0x1dd),_0x10764b))(v||{});const D=_0x1f6663=>_0x56f7b2(new Date(+_0x1f6663))[_0x579c20(0x213)](_0x579c20(0x1c8)),B=async(_0x52cf66,_0xc588d6)=>{const _0x157aac=_0x579c20,_0x34b893=_0x52cf66[_0x157aac(0x1d8)](_0x30db64),_0x5e686a=_0x52cf66[_0x157aac(0x1d8)](_0x217d03);_0xc588d6['forEach'](_0x1070a3=>{const _0x2569a2=_0x157aac;_0x34b893[_0x2569a2(0x1ed)](_0x1070a3)&&_0xc588d6['delete'](_0x1070a3);}),_0xc588d6['size']&&(await _0x5e686a['get'](_0x157aac(0x210),{'params':{'userIDs':[..._0xc588d6]}}))['body']['users'][_0x157aac(0x1e0)](_0x4f887b=>{_0x4f887b&&_0x34b893['addUser'](_0x4f887b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x471545,_0x355b95,_0x544974,_0x5c2582)=>{for(var _0x639c80=_0x5c2582>0x1?void 0x0:_0x5c2582?K(_0x355b95,_0x544974):_0x355b95,_0x28907e=_0x471545['length']-0x1,_0x57ce86;_0x28907e>=0x0;_0x28907e--)(_0x57ce86=_0x471545[_0x28907e])&&(_0x639c80=_0x57ce86(_0x639c80)||_0x639c80);return _0x639c80;},p=(_0x246949,_0x2da074)=>(_0x310f8d,_0x267e27)=>_0x2da074(_0x310f8d,_0x267e27,_0x246949);let S=class extends _0x5476f6{constructor(_0x46fa63,_0x4910d4,_0x23c7c9,_0x577ad3){const _0x495860=_0x579c20;super(),this[_0x495860(0x1eb)]=_0x46fa63,this[_0x495860(0x204)]=_0x4910d4,this[_0x495860(0x1c5)]=_0x23c7c9,this['_injector']=_0x577ad3,this['_init'](),this[_0x495860(0x1f9)]();}['_initUserSync'](){const _0x4de8c5=_0x579c20;this[_0x4de8c5(0x1e1)](this[_0x4de8c5(0x204)]['commentUpdate$'][_0x4de8c5(0x209)](_0x455ea8(0x10))['subscribe'](_0xb58bdd=>{const _0x47733c=_0x4de8c5,_0x25dbd1=new Set();_0xb58bdd[_0x47733c(0x1e0)](_0x29b037=>{const _0x3e359e=_0x47733c;switch(_0x29b037['type']){case _0x3e359e(0x201):{const _0x2eaa73=_0x29b037['payload']['personId'];_0x25dbd1[_0x3e359e(0x201)](_0x2eaa73);break;}}}),B(this['_injector'],_0x25dbd1);}));}[_0x579c20(0x1cd)](){const _0x460773=_0x579c20;this['disposeWithMe'](this[_0x460773(0x1eb)][_0x460773(0x214)]['subscribe'](async _0x4ba53a=>{const _0x1ed2ee=_0x460773;var _0x368fcb,_0x5cba2e,_0x21609b,_0x49b8ee;const _0x4c8df3=(_0x368fcb=this[_0x1ed2ee(0x204)]['getUnit'](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0x43bc58=>_0x43bc58[_0x1ed2ee(0x20b)]===_0x4ba53a['threadId']))==null?void 0x0:_0x368fcb['root'];if(!_0x4c8df3)return;const {unitId:_0x3b6135,subUnitId:_0x44d7d8}=_0x4c8df3;switch(_0x4ba53a[_0x1ed2ee(0x223)]&&this[_0x1ed2ee(0x1c5)]['addUser'](_0x4ba53a['user']),_0x4ba53a[_0x1ed2ee(0x1c0)]){case v[_0x1ed2ee(0x1d3)]:break;case v[_0x1ed2ee(0x1e7)]:{this[_0x1ed2ee(0x204)]['addComment'](_0x3b6135,_0x44d7d8,{'unitId':_0x3b6135,'subUnitId':_0x44d7d8,'ref':'','id':_0x4ba53a[_0x1ed2ee(0x1c3)],'dT':D(+_0x4ba53a['createTimestamp']),'threadId':_0x4ba53a['threadId'],'personId':(_0x21609b=(_0x5cba2e=_0x4ba53a[_0x1ed2ee(0x223)])==null?void 0x0:_0x5cba2e['userID'])!=null?_0x21609b:_0x4ba53a[_0x1ed2ee(0x1f4)],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)]),'parentId':_0x4c8df3['id']});break;}case v[_0x1ed2ee(0x1f1)]:{const _0x2c852d=this[_0x1ed2ee(0x204)]['getComment'](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);_0x2c852d&&_0x2c852d[_0x1ed2ee(0x1bf)]&&this['_threadCommentModel'][_0x1ed2ee(0x205)](_0x3b6135,_0x44d7d8,_0x4ba53a[_0x1ed2ee(0x1c3)]);break;}case v['Edit']:{this[_0x1ed2ee(0x204)]['updateComment'](_0x3b6135,_0x44d7d8,{'commentId':_0x4ba53a['replyId'],'text':JSON[_0x1ed2ee(0x1d0)](_0x4ba53a[_0x1ed2ee(0x21e)])});break;}case v[_0x1ed2ee(0x221)]:{const _0x3b3ec1=(_0x49b8ee=this['_threadCommentModel'][_0x1ed2ee(0x1cb)](_0x4ba53a[_0x1ed2ee(0x1f8)])[_0x1ed2ee(0x1db)](_0xa80e7e=>_0xa80e7e['threadId']===_0x4ba53a[_0x1ed2ee(0x20b)]))==null?void 0x0:_0x49b8ee[_0x1ed2ee(0x1e8)];_0x3b3ec1&&this[_0x1ed2ee(0x204)][_0x1ed2ee(0x222)](_0x3b6135,_0x44d7d8,_0x3b3ec1['id'],_0x4ba53a[_0x1ed2ee(0x1ef)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xfdb629(_0x17d1ba)),p(0x1,_0xfdb629(_0x11e319)),p(0x2,_0xfdb629(_0x30db64)),p(0x3,_0xfdb629(_0xedefd5))],S);const z=_0x579c20(0x1f5),M={};var k=Object[_0x579c20(0x1fc)],Q=(_0x45808e,_0x378876,_0x1225a5,_0x35ea91)=>{const _0x1c3714=_0x579c20;for(var _0x393660=_0x35ea91>0x1?void 0x0:_0x35ea91?k(_0x378876,_0x1225a5):_0x378876,_0x402094=_0x45808e[_0x1c3714(0x1ca)]-0x1,_0x4a44b6;_0x402094>=0x0;_0x402094--)(_0x4a44b6=_0x45808e[_0x402094])&&(_0x393660=_0x4a44b6(_0x393660)||_0x393660);return _0x393660;},_=(_0x4260b9,_0x171e20)=>(_0x41ff99,_0x40dd70)=>_0x171e20(_0x41ff99,_0x40dd70,_0x4260b9);function X(_0x160899,_0x40a24e){const _0x53d479=_0x579c20,_0x343f8e=_0x160899[_0x53d479(0x1dc)][0x0];return{..._0x40a24e,'id':_0x343f8e['replyId'],'resolved':_0x160899['solved']===0x1,'dT':D(_0x343f8e[_0x53d479(0x20a)]),'personId':_0x343f8e[_0x53d479(0x1f4)],'threadId':_0x343f8e[_0x53d479(0x20b)]};}function ee(_0x4dd358,_0x3ff13e,_0x8679ab){const _0x1e2857=_0x579c20;var _0x498072,_0x45c7ef;if(((_0x45c7ef=(_0x498072=_0x4dd358==null?void 0x0:_0x4dd358[_0x1e2857(0x1dc)])==null?void 0x0:_0x498072[_0x1e2857(0x1ca)])!=null?_0x45c7ef:0x0)>0x0){const _0x368b88=(_0x140ee5,_0x3d05c4)=>({'id':_0x140ee5['replyId'],'threadId':_0x140ee5[_0x1e2857(0x20b)],'dT':D(_0x140ee5[_0x1e2857(0x20a)]),'personId':_0x140ee5['userId'],'resolved':_0x4dd358[_0x1e2857(0x1ef)]===I[_0x1e2857(0x20d)],'unitId':_0x3ff13e,'subUnitId':_0x8679ab,'text':JSON[_0x1e2857(0x1d0)](_0x140ee5[_0x1e2857(0x21e)]),'parentId':_0x3d05c4}),_0x5247d3=_0x368b88(_0x4dd358['replies'][0x0]);return{..._0x5247d3,'children':_0x4dd358['replies'][_0x1e2857(0x212)](0x1)[_0x1e2857(0x1f3)](_0x143baf=>_0x368b88(_0x143baf,_0x5247d3['id']))};}return null;}let f=class{constructor(_0x44616f,_0x564672,_0x1f2950,_0x105c12){const _0x71c10c=_0x579c20;this['_httpService']=_0x44616f,this[_0x71c10c(0x1c5)]=_0x564672,this[_0x71c10c(0x1f7)]=_0x1f2950,this[_0x71c10c(0x1d6)]=_0x105c12;}async[_0x579c20(0x20e)](_0x67785c){const _0xe58fbb=_0x579c20;var _0x3cf550,_0x4279c2;const {parentId:_0x3acf03,unitId:_0x27ccc9,text:_0x5de64d,threadId:_0x31deac}=_0x67785c,_0x4de088=(_0x4279c2=(_0x3cf550=_0x5de64d[_0xe58fbb(0x1e4)])==null?void 0x0:_0x3cf550['filter'](_0x4618fe=>_0x4618fe[_0xe58fbb(0x216)]===_0x66063e['COMMENT'])[_0xe58fbb(0x1f3)](_0xace37b=>_0xace37b[_0xe58fbb(0x1d5)]))!=null?_0x4279c2:[],_0x5c91aa=JSON[_0xe58fbb(0x20c)](_0x5de64d),_0x508a97=(await this[_0xe58fbb(0x1f7)][_0xe58fbb(0x21d)](_0x27ccc9))[_0xe58fbb(0x207)]();if(_0x3acf03){const _0xbf7634={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088,'threadId':_0x31deac},_0x4a6a9b=(await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1cf),{'body':_0xbf7634}))['body'][_0xe58fbb(0x200)];return{..._0x67785c,'id':_0x4a6a9b['replyId'],'dT':_0x56f7b2(+_0x4a6a9b['createTimestamp'])[_0xe58fbb(0x213)](_0xe58fbb(0x1c8)),'personId':_0x4a6a9b[_0xe58fbb(0x1f4)]};}else{const _0x504773={'memberId':_0x508a97,'unitId':_0x27ccc9,'content':_0x5c91aa,'mention':_0x4de088},_0x4ab39b=await this[_0xe58fbb(0x1f2)][_0xe58fbb(0x1de)](_0xe58fbb(0x1e3)+_0x27ccc9+_0xe58fbb(0x1e2),{'body':_0x504773});return X(_0x4ab39b['body']['comment'],_0x67785c);}}async[_0x579c20(0x1fb)](_0x2e6699){const _0x235ad8=_0x579c20;var _0x3bee31,_0x307ca7;const {text:_0x594a8c,unitId:_0x47721b}=_0x2e6699,_0x323b34=(_0x307ca7=(_0x3bee31=_0x594a8c[_0x235ad8(0x1e4)])==null?void 0x0:_0x3bee31[_0x235ad8(0x1fd)](_0x56de4d=>_0x56de4d[_0x235ad8(0x216)]===_0x66063e[_0x235ad8(0x208)])[_0x235ad8(0x1f3)](_0x445f87=>_0x445f87[_0x235ad8(0x1d5)]))!=null?_0x307ca7:[],_0x5bbde7=JSON[_0x235ad8(0x20c)](_0x594a8c),_0x3cc976=_0x2e6699[_0x235ad8(0x20b)],_0xbe3082=_0x2e6699['id'],_0x4e5ee1={'memberId':(await this[_0x235ad8(0x1f7)][_0x235ad8(0x21d)](_0x47721b))[_0x235ad8(0x207)](),'unitId':_0x47721b,'threadId':_0x3cc976,'mention':_0x323b34,'content':_0x5bbde7,'replyId':_0xbe3082},_0x18cbd3=await this[_0x235ad8(0x1f2)]['post'](_0x235ad8(0x1e3)+_0x47721b+_0x235ad8(0x218),{'body':_0x4e5ee1});return!_0x18cbd3[_0x235ad8(0x21f)]['error']||_0x18cbd3[_0x235ad8(0x21f)][_0x235ad8(0x1fe)][_0x235ad8(0x21a)]===0x1;}async['resolveComment'](_0x36078d){const _0x2d9aca=_0x579c20,{unitId:_0x100167}=_0x36078d,_0x32bf6e=_0x36078d['threadId'],_0x5bebd4={'memberId':this[_0x2d9aca(0x1c5)][_0x2d9aca(0x1d4)]()[_0x2d9aca(0x1f0)],'unitId':_0x100167,'threadId':_0x32bf6e,'solved':_0x36078d[_0x2d9aca(0x215)]?I[_0x2d9aca(0x20d)]:I[_0x2d9aca(0x1c2)]},_0x2666cb=await this[_0x2d9aca(0x1f2)][_0x2d9aca(0x1de)]('/universer-api/comment/unit/'+_0x100167+_0x2d9aca(0x1df),{'body':_0x5bebd4});return!_0x2666cb[_0x2d9aca(0x21f)]['error']||_0x2666cb[_0x2d9aca(0x21f)][_0x2d9aca(0x1fe)][_0x2d9aca(0x21a)]===0x1;}async[_0x579c20(0x205)](_0x23bb7f,_0x3bc849,_0x518143,_0x2da63b){const _0x6b13e4=_0x579c20,_0x1581f0={'memberId':(await this[_0x6b13e4(0x1f7)][_0x6b13e4(0x21d)](_0x23bb7f))[_0x6b13e4(0x207)](),'threadId':_0x518143,'replyId':_0x2da63b,'unitId':_0x23bb7f},_0x3b0528=await this[_0x6b13e4(0x1f2)][_0x6b13e4(0x1de)](_0x6b13e4(0x1e3)+_0x23bb7f+_0x6b13e4(0x1da),{'body':_0x1581f0});return!_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)]||_0x3b0528[_0x6b13e4(0x21f)][_0x6b13e4(0x1fe)][_0x6b13e4(0x21a)]===0x1;}async[_0x579c20(0x1fa)](_0x2a457a,_0x1d4d0f,_0x2116de){const _0x4393b5=_0x579c20,_0x591d79={'unitId':_0x2a457a,'threadId':_0x2116de},_0x5142e4=await this[_0x4393b5(0x1f2)][_0x4393b5(0x1de)]('/universer-api/comment/unit/'+_0x2a457a+'/list',{'body':_0x591d79}),_0x5f4f08=_0x2116de[_0x4393b5(0x1f3)](_0x34fb65=>ee(_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1e6)][_0x34fb65],_0x2a457a,_0x1d4d0f))[_0x4393b5(0x1fd)](Boolean);return Object[_0x4393b5(0x217)](_0x5142e4[_0x4393b5(0x21f)][_0x4393b5(0x1d1)])[_0x4393b5(0x1e0)](_0x2bde33=>{const _0xce8f5d=_0x4393b5;this[_0xce8f5d(0x1c5)]['addUser'](_0x2bde33);}),_0x5f4f08;}[_0x579c20(0x1ea)](_0x3bcc79){const _0x53f3fc=_0x579c20;return{'id':_0x3bcc79['id'],'threadId':_0x3bcc79[_0x53f3fc(0x20b)],'ref':_0x3bcc79[_0x53f3fc(0x1ce)]};}};f=Q([_(0x0,_0xfdb629(_0x217d03)),_(0x1,_0xfdb629(_0x30db64)),_(0x2,_0xfdb629(_0x3d9f93)),_(0x3,_0xfdb629(_0xedefd5))],f);var re=Object[_0x579c20(0x1fc)],te=(_0x587487,_0x1f62be,_0xb70b67,_0x5cd8b3)=>{const _0x277c93=_0x579c20;for(var _0x11fa97=_0x5cd8b3>0x1?void 0x0:_0x5cd8b3?re(_0x1f62be,_0xb70b67):_0x1f62be,_0xe14a36=_0x587487[_0x277c93(0x1ca)]-0x1,_0x3bc5a6;_0xe14a36>=0x0;_0xe14a36--)(_0x3bc5a6=_0x587487[_0xe14a36])&&(_0x11fa97=_0x3bc5a6(_0x11fa97)||_0x11fa97);return _0x11fa97;},N=(_0x52e3cc,_0x42075c)=>(_0x7dcf59,_0x2492a6)=>_0x42075c(_0x7dcf59,_0x2492a6,_0x52e3cc);let g=class extends _0x5476f6{constructor(_0x324ac6,_0x23324d){const _0x2e4ab1=_0x579c20;super(),this[_0x2e4ab1(0x1c4)]=_0x324ac6,this[_0x2e4ab1(0x21b)]=_0x23324d,this[_0x2e4ab1(0x20f)]();}[_0x579c20(0x20f)](){const _0x3b1990=_0x579c20;this[_0x3b1990(0x1c4)][_0x3b1990(0x206)]=this['_threadCommentDataSource'],this[_0x3b1990(0x1c4)][_0x3b1990(0x1c1)]=!0x1;}};function _0x39bc(_0x4d073d,_0x11e396){const _0x85a08a=_0x85a0();return _0x39bc=function(_0x39bce5,_0x47fb34){_0x39bce5=_0x39bce5-0x1be;let _0x54f029=_0x85a08a[_0x39bce5];return _0x54f029;},_0x39bc(_0x4d073d,_0x11e396);}g=te([N(0x0,_0x4c2afb),N(0x1,_0xfdb629(f))],g);var se=Object['defineProperty'],oe=Object[_0x579c20(0x1fc)],ne=(_0xd66e01,_0x5efc0b,_0xfa577a)=>_0x5efc0b in _0xd66e01?se(_0xd66e01,_0x5efc0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfa577a}):_0xd66e01[_0x5efc0b]=_0xfa577a,ie=(_0x251592,_0x2e5e7c,_0x343cbe,_0x290471)=>{const _0xf3ac10=_0x579c20;for(var _0x5de1e3=_0x290471>0x1?void 0x0:_0x290471?oe(_0x2e5e7c,_0x343cbe):_0x2e5e7c,_0x3ea5f7=_0x251592[_0xf3ac10(0x1ca)]-0x1,_0x290db2;_0x3ea5f7>=0x0;_0x3ea5f7--)(_0x290db2=_0x251592[_0x3ea5f7])&&(_0x5de1e3=_0x290db2(_0x5de1e3)||_0x5de1e3);return _0x5de1e3;},w=(_0x2930c4,_0x5f4643)=>(_0x3eba81,_0x3cab6a)=>_0x5f4643(_0x3eba81,_0x3cab6a,_0x2930c4),$=(_0x2cb69e,_0x46b1b0,_0x42b110)=>ne(_0x2cb69e,typeof _0x46b1b0!='symbol'?_0x46b1b0+'':_0x46b1b0,_0x42b110);let b=class extends _0x212ef2{constructor(_0x381505=M,_0xd639ad,_0x5e9cb6){const _0xb7ed8d=_0x579c20;super(),this[_0xb7ed8d(0x1cc)]=_0x381505,this[_0xb7ed8d(0x1d6)]=_0xd639ad,this[_0xb7ed8d(0x1be)]=_0x5e9cb6;const {..._0x4b1085}=_0x4e9d07({},M,this[_0xb7ed8d(0x1cc)]);this[_0xb7ed8d(0x1be)]['setConfig'](z,_0x4b1085);}[_0x579c20(0x1e5)](){const _0x4f45b9=_0x579c20;[[f],[g],[S]][_0x4f45b9(0x1e0)](_0x41d14e=>{const _0xa47dc9=_0x4f45b9;this['_injector'][_0xa47dc9(0x201)](_0x41d14e);});}[_0x579c20(0x1ec)](){const _0x26f858=_0x579c20;this[_0x26f858(0x1d6)][_0x26f858(0x1d8)](g),this['_injector'][_0x26f858(0x1d8)](S);}};$(b,_0x579c20(0x1d2),W),$(b,_0x579c20(0x1c0),_0x13d77a[_0x579c20(0x219)]),b=ie([_0x18fc2e(_0x1ff4fb,_0x3f9f09,_0x3fe27b),w(0x1,_0xfdb629(_0xedefd5)),w(0x2,_0x23ffae)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5ab6(){const _0x5948fe=['YYYY/MM/DD\x20HH:mm','1820064XYFeAu','5419519OnEWqD','map','values','Solve','/reply','userID','defineProperty','subscribe','onReady','Injector','updateComment','toStringTag','Unknown','Delete','_httpService','replies','@univerjs-pro/collaboration-client','deleteComment','@univerjs/network','_configService','/universer-api/user/list','payload','comments','161084bpTCHt','UniverInstanceType','OpenOrReOpen','@univerjs/core','/universer-api/comment/unit/','ref','UniverProThreadCommentDatasource','merge','CollaborationSessionService','/add','threadId','dayjs','640840GmOLTW','amd','_threadCommentModel','unitId','type','_initUserSync','getCurrentUser','_userService','_threadCommentDataSourceService','filter','getUser','@univerjs/thread-comment','content','listComments','Add','parse','58QsVbop','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','onStarting','Inject','rangeId','commentUpdate$','pluginName','UniverCollaborationClientPlugin','DependentOn','UserManagerService','resolved','4487505pAOErU','IConfigService','reply','addUser','code','_sessionService','Disposable','Reply','bufferTime','resolveComment','UniverCore','get','getMemberID','/edit','user','_injector','root','requireSession','_init','UniverThreadCommentUi','Solved','customRanges','createTimestamp','length','/list','size','ThreadCommentModel','function','UniverProLicense','@univerjs-pro/license','add','UNRECOGNIZED','replyId','_config','delete','UniverThreadCommentUIPlugin','Plugin','UniverNetwork','parentId','rxjs','solved','48315hmkAaV','forEach','addComment','find','UniverThreadCommentDataSourcePlugin','UniverLicensePlugin','userId','_commentService','HTTPService','6HtcHKt','post','CustomRangeType','rangeType','slice','getOwnPropertyDescriptor','_initDataSource','IThreadCommentDataSourceService','7531353ydVDGs','error','personId','body','getUnit','format','stringify','Edit','thread-comment-data-source.config','dataSource','exports','/delete','pipe'];_0x5ab6=function(){return _0x5948fe;};return _0x5ab6();}function _0x1a47(_0xda2925,_0x273348){const _0x5ab6d6=_0x5ab6();return _0x1a47=function(_0x1a47cb,_0x1f685a){_0x1a47cb=_0x1a47cb-0x89;let _0x2375f1=_0x5ab6d6[_0x1a47cb];return _0x2375f1;},_0x1a47(_0xda2925,_0x273348);}(function(_0x2b9ede,_0x1d0a80){const _0x346a42=_0x1a47,_0x3d8802=_0x2b9ede();while(!![]){try{const _0x5814e0=-parseInt(_0x346a42(0xd6))/0x1+parseInt(_0x346a42(0xf2))/0x2*(-parseInt(_0x346a42(0x9f))/0x3)+parseInt(_0x346a42(0xe2))/0x4+parseInt(_0x346a42(0xfe))/0x5+parseInt(_0x346a42(0xa8))/0x6*(-parseInt(_0x346a42(0xbf))/0x7)+parseInt(_0x346a42(0xbe))/0x8+parseInt(_0x346a42(0xb0))/0x9;if(_0x5814e0===_0x1d0a80)break;else _0x3d8802['push'](_0x3d8802['shift']());}catch(_0x1c5e11){_0x3d8802['push'](_0x3d8802['shift']());}}}(_0x5ab6,0xafb4a),function(_0x196604,_0x55e28a){const _0xc4d601=_0x1a47;typeof exports=='object'&&typeof module<'u'?_0x55e28a(exports,require(_0xc4d601(0xcf)),require(_0xc4d601(0x93)),require(_0xc4d601(0xd9)),require('@univerjs/thread-comment-ui'),require(_0xc4d601(0xed)),require(_0xc4d601(0x9d)),require(_0xc4d601(0xd1))):typeof define==_0xc4d601(0x91)&&define[_0xc4d601(0xe3)]?define([_0xc4d601(0xba),_0xc4d601(0xcf),_0xc4d601(0x93),_0xc4d601(0xd9),'@univerjs/thread-comment-ui',_0xc4d601(0xed),_0xc4d601(0x9d),_0xc4d601(0xd1)],_0x55e28a):(_0x196604=typeof globalThis<'u'?globalThis:_0x196604||self,_0x55e28a(_0x196604[_0xc4d601(0xdc)]={},_0x196604['UniverProCollaborationClient'],_0x196604[_0xc4d601(0x92)],_0x196604[_0xc4d601(0x108)],_0x196604[_0xc4d601(0x89)],_0x196604['UniverThreadComment'],_0x196604[_0xc4d601(0x9d)],_0x196604[_0xc4d601(0x9b)]));}(this,function(_0x594425,_0x468d22,_0x280668,_0x5715d9,_0x5a9834,_0x4257e4,_0x79533f,_0x1c12d2){'use strict';const _0x1be135=_0x1a47;const _0x3871d9=_0x1be135(0xf3);var _0x174176=(_0x537992=>(_0x537992[_0x537992[_0x1be135(0xd8)]=0x0]=_0x1be135(0xd8),_0x537992[_0x537992[_0x1be135(0x8a)]=0x1]=_0x1be135(0x8a),_0x537992[_0x537992['UNRECOGNIZED']=-0x1]=_0x1be135(0x95),_0x537992))(_0x174176||{}),_0x2ad31f=(_0x32fcfa=>(_0x32fcfa[_0x32fcfa['Unknown']=0x0]=_0x1be135(0xcb),_0x32fcfa[_0x32fcfa[_0x1be135(0xf0)]=0x1]='Add',_0x32fcfa[_0x32fcfa['Reply']=0x2]=_0x1be135(0x105),_0x32fcfa[_0x32fcfa[_0x1be135(0xb7)]=0x3]=_0x1be135(0xb7),_0x32fcfa[_0x32fcfa['Delete']=0x4]=_0x1be135(0xcc),_0x32fcfa[_0x32fcfa[_0x1be135(0xc2)]=0x5]=_0x1be135(0xc2),_0x32fcfa[_0x32fcfa[_0x1be135(0x95)]=-0x1]=_0x1be135(0x95),_0x32fcfa))(_0x2ad31f||{});const _0x1330ee=_0x1c6a0e=>_0x5715d9['dayjs'](new Date(+_0x1c6a0e))[_0x1be135(0xb5)](_0x1be135(0xbd)),_0x51811a=async(_0x4acc8c,_0x31f3ab)=>{const _0x3cc8d2=_0x1be135,_0x4297f5=_0x4acc8c['get'](_0x5715d9[_0x3cc8d2(0xfc)]),_0x5676f2=_0x4acc8c['get'](_0x1c12d2[_0x3cc8d2(0xa7)]);_0x31f3ab[_0x3cc8d2(0xa0)](_0x3dea4c=>{const _0x383233=_0x3cc8d2;_0x4297f5[_0x383233(0xec)](_0x3dea4c)&&_0x31f3ab[_0x383233(0x98)](_0x3dea4c);}),_0x31f3ab[_0x3cc8d2(0x8f)]&&(await _0x5676f2[_0x3cc8d2(0x109)](_0x3cc8d2(0xd3),{'params':{'userIDs':[..._0x31f3ab]}}))['body']['users'][_0x3cc8d2(0xa0)](_0x3f7b0e=>{const _0x431695=_0x3cc8d2;_0x3f7b0e&&_0x4297f5[_0x431695(0x101)](_0x3f7b0e);});};var _0x4a9638=Object[_0x1be135(0xad)],_0x4f4e15=(_0x5dd294,_0x32673c,_0x3f7f9b,_0x201b22)=>{const _0x284d9e=_0x1be135;for(var _0x5ac52b=_0x201b22>0x1?void 0x0:_0x201b22?_0x4a9638(_0x32673c,_0x3f7f9b):_0x32673c,_0x4be631=_0x5dd294[_0x284d9e(0x8d)]-0x1,_0x3646d9;_0x4be631>=0x0;_0x4be631--)(_0x3646d9=_0x5dd294[_0x4be631])&&(_0x5ac52b=_0x3646d9(_0x5ac52b)||_0x5ac52b);return _0x5ac52b;},_0x3d3bb4=(_0x4ec865,_0x3a5db0)=>(_0x5c591d,_0x4d7d45)=>_0x3a5db0(_0x5c591d,_0x4d7d45,_0x4ec865);let _0x55c5b2=class extends _0x5715d9['Disposable']{constructor(_0x233bd3,_0x43b62f,_0x52e9b2,_0x18dee5){const _0x2e2cc6=_0x1be135;super(),this[_0x2e2cc6(0xa6)]=_0x233bd3,this[_0x2e2cc6(0xe4)]=_0x43b62f,this['_userService']=_0x52e9b2,this[_0x2e2cc6(0x10d)]=_0x18dee5,this[_0x2e2cc6(0x110)](),this[_0x2e2cc6(0xe7)]();}[_0x1be135(0xe7)](){const _0x151bf7=_0x1be135;this['disposeWithMe'](this[_0x151bf7(0xe4)]['commentUpdate$'][_0x151bf7(0xbc)](_0x79533f[_0x151bf7(0x106)](0x10))[_0x151bf7(0xc6)](_0x51026d=>{const _0x214c37=_0x151bf7,_0x3dbd4a=new Set();_0x51026d[_0x214c37(0xa0)](_0x6c9e66=>{const _0xaaf8d7=_0x214c37;switch(_0x6c9e66[_0xaaf8d7(0xe6)]){case _0xaaf8d7(0x94):{const _0x5a1cc5=_0x6c9e66[_0xaaf8d7(0xd4)][_0xaaf8d7(0xb2)];_0x3dbd4a[_0xaaf8d7(0x94)](_0x5a1cc5);break;}}}),_0x51811a(this[_0x214c37(0x10d)],_0x3dbd4a);}));}[_0x1be135(0x110)](){const _0x2572a4=_0x1be135;this['disposeWithMe'](this[_0x2572a4(0xa6)][_0x2572a4(0xf8)][_0x2572a4(0xc6)](async _0x429f1a=>{const _0x34e56c=_0x2572a4;var _0x3e6d28,_0x4e1794,_0x16972c,_0x297aba;const _0x17e388=(_0x3e6d28=this[_0x34e56c(0xe4)][_0x34e56c(0xb4)](_0x429f1a['unitId'])[_0x34e56c(0xa2)](_0x14271c=>_0x14271c[_0x34e56c(0xe0)]===_0x429f1a['threadId']))==null?void 0x0:_0x3e6d28[_0x34e56c(0x10e)];if(!_0x17e388)return;const {unitId:_0x8de14f,subUnitId:_0x392cc7}=_0x17e388;switch(_0x429f1a['user']&&this[_0x34e56c(0xe9)][_0x34e56c(0x101)](_0x429f1a[_0x34e56c(0x10c)]),_0x429f1a['type']){case _0x2ad31f[_0x34e56c(0xf0)]:break;case _0x2ad31f[_0x34e56c(0x105)]:{this[_0x34e56c(0xe4)][_0x34e56c(0xa1)](_0x8de14f,_0x392cc7,{'unitId':_0x8de14f,'subUnitId':_0x392cc7,'ref':'','id':_0x429f1a[_0x34e56c(0x96)],'dT':_0x1330ee(+_0x429f1a[_0x34e56c(0x8c)]),'threadId':_0x429f1a[_0x34e56c(0xe0)],'personId':(_0x16972c=(_0x4e1794=_0x429f1a[_0x34e56c(0x10c)])==null?void 0x0:_0x4e1794[_0x34e56c(0xc4)])!=null?_0x16972c:_0x429f1a[_0x34e56c(0xa5)],'text':JSON[_0x34e56c(0xf1)](_0x429f1a[_0x34e56c(0xee)]),'parentId':_0x17e388['id']});break;}case _0x2ad31f[_0x34e56c(0xcc)]:{const _0x2f82e6=this['_threadCommentModel']['getComment'](_0x8de14f,_0x392cc7,_0x429f1a['replyId']);_0x2f82e6&&_0x2f82e6[_0x34e56c(0x9c)]&&this[_0x34e56c(0xe4)][_0x34e56c(0xd0)](_0x8de14f,_0x392cc7,_0x429f1a['replyId']);break;}case _0x2ad31f[_0x34e56c(0xb7)]:{this[_0x34e56c(0xe4)][_0x34e56c(0xc9)](_0x8de14f,_0x392cc7,{'commentId':_0x429f1a[_0x34e56c(0x96)],'text':JSON[_0x34e56c(0xf1)](_0x429f1a['content'])});break;}case _0x2ad31f['Solve']:{const _0x263712=(_0x297aba=this[_0x34e56c(0xe4)][_0x34e56c(0xb4)](_0x429f1a[_0x34e56c(0xe5)])['find'](_0x2296f4=>_0x2296f4[_0x34e56c(0xe0)]===_0x429f1a[_0x34e56c(0xe0)]))==null?void 0x0:_0x297aba[_0x34e56c(0x10e)];_0x263712&&this['_threadCommentModel'][_0x34e56c(0x107)](_0x8de14f,_0x392cc7,_0x263712['id'],_0x429f1a[_0x34e56c(0x9e)]===_0x174176[_0x34e56c(0x8a)]);break;}}}));}};_0x55c5b2=_0x4f4e15([_0x3d3bb4(0x0,_0x5715d9['Inject'](_0x468d22['CommentService'])),_0x3d3bb4(0x1,_0x5715d9[_0x1be135(0xf6)](_0x4257e4[_0x1be135(0x90)])),_0x3d3bb4(0x2,_0x5715d9[_0x1be135(0xf6)](_0x5715d9['UserManagerService'])),_0x3d3bb4(0x3,_0x5715d9['Inject'](_0x5715d9['Injector']))],_0x55c5b2);const _0x7522ca=_0x1be135(0xb8),_0x1cc121={};var _0x2120c9=Object[_0x1be135(0xad)],_0x5056b3=(_0x33f925,_0x5088e1,_0xf88159,_0x4a2651)=>{const _0xc746af=_0x1be135;for(var _0x9b87fc=_0x4a2651>0x1?void 0x0:_0x4a2651?_0x2120c9(_0x5088e1,_0xf88159):_0x5088e1,_0x5862ed=_0x33f925[_0xc746af(0x8d)]-0x1,_0x438977;_0x5862ed>=0x0;_0x5862ed--)(_0x438977=_0x33f925[_0x5862ed])&&(_0x9b87fc=_0x438977(_0x9b87fc)||_0x9b87fc);return _0x9b87fc;},_0x4a8e54=(_0x12ec0c,_0x1c81e1)=>(_0x186777,_0x1393be)=>_0x1c81e1(_0x186777,_0x1393be,_0x12ec0c);function _0xbfdbe8(_0x1d97ae,_0x441c68){const _0x268d35=_0x1be135,_0x136d1b=_0x1d97ae['replies'][0x0];return{..._0x441c68,'id':_0x136d1b[_0x268d35(0x96)],'resolved':_0x1d97ae[_0x268d35(0x9e)]===0x1,'dT':_0x1330ee(_0x136d1b[_0x268d35(0x8c)]),'personId':_0x136d1b[_0x268d35(0xa5)],'threadId':_0x136d1b[_0x268d35(0xe0)]};}function _0xfddaac(_0x1c86e3,_0x28a2bc,_0x1ec27d){const _0x5c461c=_0x1be135;var _0x4ba368,_0x2b2486;if(((_0x2b2486=(_0x4ba368=_0x1c86e3==null?void 0x0:_0x1c86e3[_0x5c461c(0xce)])==null?void 0x0:_0x4ba368['length'])!=null?_0x2b2486:0x0)>0x0){const _0x4cbd08=(_0x423066,_0x31bb8e)=>({'id':_0x423066[_0x5c461c(0x96)],'threadId':_0x423066[_0x5c461c(0xe0)],'dT':_0x1330ee(_0x423066['createTimestamp']),'personId':_0x423066['userId'],'resolved':_0x1c86e3[_0x5c461c(0x9e)]===_0x174176[_0x5c461c(0x8a)],'unitId':_0x28a2bc,'subUnitId':_0x1ec27d,'text':JSON[_0x5c461c(0xf1)](_0x423066[_0x5c461c(0xee)]),'parentId':_0x31bb8e}),_0x49b695=_0x4cbd08(_0x1c86e3[_0x5c461c(0xce)][0x0]);return{..._0x49b695,'children':_0x1c86e3[_0x5c461c(0xce)][_0x5c461c(0xac)](0x1)[_0x5c461c(0xc0)](_0x2eb501=>_0x4cbd08(_0x2eb501,_0x49b695['id']))};}return null;}let _0x3f0acf=class{constructor(_0x125949,_0x37a335,_0x1e8045,_0x215d66){const _0x5183df=_0x1be135;this[_0x5183df(0xcd)]=_0x125949,this[_0x5183df(0xe9)]=_0x37a335,this[_0x5183df(0x103)]=_0x1e8045,this[_0x5183df(0x10d)]=_0x215d66;}async[_0x1be135(0xa1)](_0x2b28f4){const _0x183539=_0x1be135;var _0x1f080d,_0x5ae676;const {parentId:_0x1548e3,unitId:_0x5643e9,text:_0x55766e,threadId:_0x18ecba}=_0x2b28f4,_0x4045b0=(_0x5ae676=(_0x1f080d=_0x55766e[_0x183539(0x8b)])==null?void 0x0:_0x1f080d[_0x183539(0xeb)](_0x228982=>_0x228982[_0x183539(0xab)]===_0x5715d9[_0x183539(0xaa)]['COMMENT'])[_0x183539(0xc0)](_0x493b08=>_0x493b08[_0x183539(0xf7)]))!=null?_0x5ae676:[],_0x511084=JSON['stringify'](_0x55766e),_0x1fb059=(await this['_sessionService'][_0x183539(0x10f)](_0x5643e9))['getMemberID']();if(_0x1548e3){const _0x336afe={'memberId':_0x1fb059,'unitId':_0x5643e9,'content':_0x511084,'mention':_0x4045b0,'threadId':_0x18ecba},_0x4d01b6=(await this['_httpService'][_0x183539(0xa9)](_0x183539(0xda)+_0x5643e9+_0x183539(0xc3),{'body':_0x336afe}))[_0x183539(0xb3)][_0x183539(0x100)];return{..._0x2b28f4,'id':_0x4d01b6[_0x183539(0x96)],'dT':_0x5715d9[_0x183539(0xe1)](+_0x4d01b6['createTimestamp'])[_0x183539(0xb5)](_0x183539(0xbd)),'personId':_0x4d01b6['userId']};}else{const _0x31bcb6={'memberId':_0x1fb059,'unitId':_0x5643e9,'content':_0x511084,'mention':_0x4045b0},_0x517b40=await this[_0x183539(0xcd)]['post'](_0x183539(0xda)+_0x5643e9+_0x183539(0xdf),{'body':_0x31bcb6});return _0xbfdbe8(_0x517b40['body']['comment'],_0x2b28f4);}}async[_0x1be135(0xc9)](_0x45dc71){const _0x575e87=_0x1be135;var _0x4511dd,_0x19519c;const {text:_0x112378,unitId:_0x55a24f}=_0x45dc71,_0x563702=(_0x19519c=(_0x4511dd=_0x112378['customRanges'])==null?void 0x0:_0x4511dd[_0x575e87(0xeb)](_0x3315ec=>_0x3315ec[_0x575e87(0xab)]===_0x5715d9['CustomRangeType']['COMMENT'])['map'](_0x3fbd68=>_0x3fbd68['rangeId']))!=null?_0x19519c:[],_0x28bf41=JSON[_0x575e87(0xb6)](_0x112378),_0x4c8269=_0x45dc71[_0x575e87(0xe0)],_0x169e2f=_0x45dc71['id'],_0x37c2fc={'memberId':(await this[_0x575e87(0x103)][_0x575e87(0x10f)](_0x55a24f))[_0x575e87(0x10a)](),'unitId':_0x55a24f,'threadId':_0x4c8269,'mention':_0x563702,'content':_0x28bf41,'replyId':_0x169e2f},_0x829f6e=await this[_0x575e87(0xcd)]['post'](_0x575e87(0xda)+_0x55a24f+_0x575e87(0x10b),{'body':_0x37c2fc});return!_0x829f6e['body']['error']||_0x829f6e['body'][_0x575e87(0xb1)][_0x575e87(0x102)]===0x1;}async['resolveComment'](_0x899de){const _0x1d2a52=_0x1be135,{unitId:_0x4e4ac6}=_0x899de,_0x20a929=_0x899de['threadId'],_0x21a376={'memberId':this[_0x1d2a52(0xe9)][_0x1d2a52(0xe8)]()[_0x1d2a52(0xc4)],'unitId':_0x4e4ac6,'threadId':_0x20a929,'solved':_0x899de[_0x1d2a52(0xfd)]?_0x174176[_0x1d2a52(0x8a)]:_0x174176[_0x1d2a52(0xd8)]},_0x34096a=await this[_0x1d2a52(0xcd)][_0x1d2a52(0xa9)]('/universer-api/comment/unit/'+_0x4e4ac6+'/solved',{'body':_0x21a376});return!_0x34096a[_0x1d2a52(0xb3)][_0x1d2a52(0xb1)]||_0x34096a[_0x1d2a52(0xb3)][_0x1d2a52(0xb1)][_0x1d2a52(0x102)]===0x1;}async[_0x1be135(0xd0)](_0x412a93,_0x13acd6,_0x18f4ad,_0x5e5b36){const _0x21364d=_0x1be135,_0x4e5474={'memberId':(await this[_0x21364d(0x103)][_0x21364d(0x10f)](_0x412a93))['getMemberID'](),'threadId':_0x18f4ad,'replyId':_0x5e5b36,'unitId':_0x412a93},_0x4a681f=await this[_0x21364d(0xcd)]['post']('/universer-api/comment/unit/'+_0x412a93+_0x21364d(0xbb),{'body':_0x4e5474});return!_0x4a681f[_0x21364d(0xb3)]['error']||_0x4a681f[_0x21364d(0xb3)]['error'][_0x21364d(0x102)]===0x1;}async[_0x1be135(0xef)](_0x2b4075,_0x58129a,_0x29acb4){const _0x4ebb15=_0x1be135,_0x393a56={'unitId':_0x2b4075,'threadId':_0x29acb4},_0x6f30d7=await this[_0x4ebb15(0xcd)][_0x4ebb15(0xa9)](_0x4ebb15(0xda)+_0x2b4075+_0x4ebb15(0x8e),{'body':_0x393a56}),_0x3893e9=_0x29acb4[_0x4ebb15(0xc0)](_0x289174=>_0xfddaac(_0x6f30d7['body'][_0x4ebb15(0xd5)][_0x289174],_0x2b4075,_0x58129a))[_0x4ebb15(0xeb)](Boolean);return Object[_0x4ebb15(0xc1)](_0x6f30d7[_0x4ebb15(0xb3)]['users'])[_0x4ebb15(0xa0)](_0x24f05e=>{const _0x2a8c1c=_0x4ebb15;this[_0x2a8c1c(0xe9)][_0x2a8c1c(0x101)](_0x24f05e);}),_0x3893e9;}['saveCommentToSnapshot'](_0x424a1e){const _0x46214c=_0x1be135;return{'id':_0x424a1e['id'],'threadId':_0x424a1e[_0x46214c(0xe0)],'ref':_0x424a1e[_0x46214c(0xdb)]};}};_0x3f0acf=_0x5056b3([_0x4a8e54(0x0,_0x5715d9[_0x1be135(0xf6)](_0x1c12d2[_0x1be135(0xa7)])),_0x4a8e54(0x1,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xfc)])),_0x4a8e54(0x2,_0x5715d9[_0x1be135(0xf6)](_0x468d22[_0x1be135(0xde)])),_0x4a8e54(0x3,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xc8)]))],_0x3f0acf);var _0x39bb44=Object['getOwnPropertyDescriptor'],_0x21c4b0=(_0x16aa49,_0x5741df,_0x51926d,_0x21edbb)=>{for(var _0x538d47=_0x21edbb>0x1?void 0x0:_0x21edbb?_0x39bb44(_0x5741df,_0x51926d):_0x5741df,_0x232595=_0x16aa49['length']-0x1,_0x11fb82;_0x232595>=0x0;_0x232595--)(_0x11fb82=_0x16aa49[_0x232595])&&(_0x538d47=_0x11fb82(_0x538d47)||_0x538d47);return _0x538d47;},_0xdec002=(_0xd4dc7d,_0x1b9acb)=>(_0x5827dc,_0xa8fcf1)=>_0x1b9acb(_0x5827dc,_0xa8fcf1,_0xd4dc7d);let _0x4b7063=class extends _0x5715d9[_0x1be135(0x104)]{constructor(_0x2645e4,_0x4da71c){const _0x55e8ce=_0x1be135;super(),this['_threadCommentDataSourceService']=_0x2645e4,this[_0x55e8ce(0xf4)]=_0x4da71c,this[_0x55e8ce(0xae)]();}[_0x1be135(0xae)](){const _0x5ee56d=_0x1be135;this['_threadCommentDataSourceService'][_0x5ee56d(0xb9)]=this[_0x5ee56d(0xf4)],this[_0x5ee56d(0xea)]['syncUpdateMutationToColla']=!0x1;}};_0x4b7063=_0x21c4b0([_0xdec002(0x0,_0x4257e4[_0x1be135(0xaf)]),_0xdec002(0x1,_0x5715d9[_0x1be135(0xf6)](_0x3f0acf))],_0x4b7063);var _0x27dfff=Object[_0x1be135(0xc5)],_0x37ba32=Object[_0x1be135(0xad)],_0x26a8d0=(_0x47e2aa,_0x46ceb0,_0x309e46)=>_0x46ceb0 in _0x47e2aa?_0x27dfff(_0x47e2aa,_0x46ceb0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x309e46}):_0x47e2aa[_0x46ceb0]=_0x309e46,_0x558711=(_0x4608dc,_0xed1637,_0x1a566a,_0x330c8f)=>{const _0x32f4fb=_0x1be135;for(var _0x55016a=_0x330c8f>0x1?void 0x0:_0x330c8f?_0x37ba32(_0xed1637,_0x1a566a):_0xed1637,_0x2042d4=_0x4608dc[_0x32f4fb(0x8d)]-0x1,_0x4c59a8;_0x2042d4>=0x0;_0x2042d4--)(_0x4c59a8=_0x4608dc[_0x2042d4])&&(_0x55016a=_0x4c59a8(_0x55016a)||_0x55016a);return _0x55016a;},_0x4e7e88=(_0x5825b2,_0x138d9b)=>(_0x4ded52,_0x1085fe)=>_0x138d9b(_0x4ded52,_0x1085fe,_0x5825b2),_0xcd3589=(_0x51d4c3,_0x10cd50,_0xa5cda3)=>_0x26a8d0(_0x51d4c3,typeof _0x10cd50!='symbol'?_0x10cd50+'':_0x10cd50,_0xa5cda3);_0x594425[_0x1be135(0xa3)]=class extends _0x5715d9[_0x1be135(0x9a)]{constructor(_0x4d5664=_0x1cc121,_0x23d1e1,_0x4d221e){const _0x1f413b=_0x1be135;super(),this[_0x1f413b(0x97)]=_0x4d5664,this[_0x1f413b(0x10d)]=_0x23d1e1,this[_0x1f413b(0xd2)]=_0x4d221e;const {..._0xb43379}=_0x5715d9[_0x1f413b(0xdd)]({},_0x1cc121,this[_0x1f413b(0x97)]);this[_0x1f413b(0xd2)]['setConfig'](_0x7522ca,_0xb43379);}[_0x1be135(0xf5)](){const _0x148f1e=_0x1be135;[[_0x3f0acf],[_0x4b7063],[_0x55c5b2]][_0x148f1e(0xa0)](_0x26406f=>{const _0x54a58b=_0x148f1e;this['_injector'][_0x54a58b(0x94)](_0x26406f);});}[_0x1be135(0xc7)](){const _0x127e97=_0x1be135;this[_0x127e97(0x10d)][_0x127e97(0x109)](_0x4b7063),this[_0x127e97(0x10d)]['get'](_0x55c5b2);}},_0xcd3589(_0x594425[_0x1be135(0xa3)],_0x1be135(0xf9),_0x3871d9),_0xcd3589(_0x594425[_0x1be135(0xa3)],_0x1be135(0xe6),_0x5715d9[_0x1be135(0xd7)]['UNIVER_UNKNOWN']),_0x594425[_0x1be135(0xa3)]=_0x558711([_0x5715d9[_0x1be135(0xfb)](_0x5a9834[_0x1be135(0x99)],_0x468d22[_0x1be135(0xfa)],_0x280668[_0x1be135(0xa4)]),_0x4e7e88(0x1,_0x5715d9[_0x1be135(0xf6)](_0x5715d9[_0x1be135(0xc8)])),_0x4e7e88(0x2,_0x5715d9[_0x1be135(0xff)])],_0x594425['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x594425,Symbol[_0x1be135(0xca)],{'value':'Module'});}));
1
+ function _0x392a(_0xf444fd,_0xbe4c17){const _0x6500ad=_0x6500();return _0x392a=function(_0x392ac1,_0x4b1473){_0x392ac1=_0x392ac1-0x1f1;let _0x42ca68=_0x6500ad[_0x392ac1];return _0x42ca68;},_0x392a(_0xf444fd,_0xbe4c17);}(function(_0x265e52,_0x314283){const _0x3106c5=_0x392a,_0x3b7971=_0x265e52();while(!![]){try{const _0x365ff6=parseInt(_0x3106c5(0x207))/0x1+parseInt(_0x3106c5(0x228))/0x2*(parseInt(_0x3106c5(0x269))/0x3)+-parseInt(_0x3106c5(0x24f))/0x4+parseInt(_0x3106c5(0x25b))/0x5*(-parseInt(_0x3106c5(0x23c))/0x6)+parseInt(_0x3106c5(0x232))/0x7+parseInt(_0x3106c5(0x238))/0x8+-parseInt(_0x3106c5(0x25d))/0x9;if(_0x365ff6===_0x314283)break;else _0x3b7971['push'](_0x3b7971['shift']());}catch(_0x315c7d){_0x3b7971['push'](_0x3b7971['shift']());}}}(_0x6500,0xf3e2a),function(_0x4acc0e,_0x5d6fb5){const _0x511481=_0x392a;typeof exports=='object'&&typeof module<'u'?_0x5d6fb5(exports,require(_0x511481(0x247)),require('@univerjs-pro/license'),require(_0x511481(0x21e)),require(_0x511481(0x221)),require(_0x511481(0x23a)),require('rxjs'),require('@univerjs/network')):typeof define==_0x511481(0x257)&&define[_0x511481(0x1f2)]?define([_0x511481(0x208),_0x511481(0x247),'@univerjs-pro/license',_0x511481(0x21e),_0x511481(0x221),_0x511481(0x23a),_0x511481(0x242),'@univerjs/network'],_0x5d6fb5):(_0x4acc0e=typeof globalThis<'u'?globalThis:_0x4acc0e||self,_0x5d6fb5(_0x4acc0e[_0x511481(0x1fb)]={},_0x4acc0e[_0x511481(0x258)],_0x4acc0e[_0x511481(0x22e)],_0x4acc0e[_0x511481(0x25a)],_0x4acc0e['UniverThreadCommentUi'],_0x4acc0e['UniverThreadComment'],_0x4acc0e['rxjs'],_0x4acc0e['UniverNetwork']));}(this,function(_0x3b57cb,_0x20292e,_0x1f61df,_0x45dac1,_0x543281,_0x1b4bea,_0x13baeb,_0x5f2cf7){'use strict';const _0x43c8d5=_0x392a;const _0x12920e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x256af4=(_0x4f23e2=>(_0x4f23e2[_0x4f23e2[_0x43c8d5(0x229)]=0x0]='OpenOrReOpen',_0x4f23e2[_0x4f23e2['Solved']=0x1]=_0x43c8d5(0x1fe),_0x4f23e2[_0x4f23e2[_0x43c8d5(0x25f)]=-0x1]='UNRECOGNIZED',_0x4f23e2))(_0x256af4||{}),_0x848303=(_0x36e891=>(_0x36e891[_0x36e891[_0x43c8d5(0x234)]=0x0]=_0x43c8d5(0x234),_0x36e891[_0x36e891['Add']=0x1]=_0x43c8d5(0x218),_0x36e891[_0x36e891[_0x43c8d5(0x243)]=0x2]=_0x43c8d5(0x243),_0x36e891[_0x36e891[_0x43c8d5(0x20d)]=0x3]=_0x43c8d5(0x20d),_0x36e891[_0x36e891[_0x43c8d5(0x21d)]=0x4]=_0x43c8d5(0x21d),_0x36e891[_0x36e891['Solve']=0x5]=_0x43c8d5(0x24b),_0x36e891[_0x36e891[_0x43c8d5(0x25f)]=-0x1]='UNRECOGNIZED',_0x36e891))(_0x848303||{});const _0x348e67=_0x411bda=>_0x45dac1[_0x43c8d5(0x20c)](new Date(+_0x411bda))['format'](_0x43c8d5(0x25c)),_0x27a07e=async(_0x315624,_0x24c8bb)=>{const _0xa81314=_0x43c8d5,_0x3ecbbe=_0x315624[_0xa81314(0x249)](_0x45dac1[_0xa81314(0x231)]),_0xb96d7d=_0x315624[_0xa81314(0x249)](_0x5f2cf7[_0xa81314(0x1f3)]);_0x24c8bb[_0xa81314(0x240)](_0x5f4fe6=>{const _0x1f208c=_0xa81314;_0x3ecbbe['getUser'](_0x5f4fe6)&&_0x24c8bb[_0x1f208c(0x263)](_0x5f4fe6);}),_0x24c8bb[_0xa81314(0x262)]&&(await _0xb96d7d[_0xa81314(0x249)](_0xa81314(0x202),{'params':{'userIDs':[..._0x24c8bb]}}))[_0xa81314(0x214)]['users'][_0xa81314(0x240)](_0x5e0368=>{_0x5e0368&&_0x3ecbbe['addUser'](_0x5e0368);});};var _0x7623a1=Object['getOwnPropertyDescriptor'],_0x115631=(_0x5811f5,_0x33ab8a,_0x61da1e,_0x17a435)=>{for(var _0x2e2485=_0x17a435>0x1?void 0x0:_0x17a435?_0x7623a1(_0x33ab8a,_0x61da1e):_0x33ab8a,_0x52eb8d=_0x5811f5['length']-0x1,_0x350591;_0x52eb8d>=0x0;_0x52eb8d--)(_0x350591=_0x5811f5[_0x52eb8d])&&(_0x2e2485=_0x350591(_0x2e2485)||_0x2e2485);return _0x2e2485;},_0x3e3b62=(_0x33506d,_0x4885dd)=>(_0x3f4bb7,_0x54aabd)=>_0x4885dd(_0x3f4bb7,_0x54aabd,_0x33506d);let _0x122c86=class extends _0x45dac1[_0x43c8d5(0x220)]{constructor(_0x3fa75c,_0x75ac37,_0xe09823,_0x936548){const _0x4d6971=_0x43c8d5;super(),this[_0x4d6971(0x259)]=_0x3fa75c,this['_threadCommentModel']=_0x75ac37,this[_0x4d6971(0x251)]=_0xe09823,this[_0x4d6971(0x1f9)]=_0x936548,this[_0x4d6971(0x200)](),this[_0x4d6971(0x23f)]();}[_0x43c8d5(0x23f)](){const _0x188488=_0x43c8d5;this[_0x188488(0x24e)](this['_threadCommentModel']['commentUpdate$'][_0x188488(0x1fd)](_0x13baeb[_0x188488(0x268)](0x10))[_0x188488(0x261)](_0x31dba5=>{const _0x2b1f91=_0x188488,_0x1953ee=new Set();_0x31dba5[_0x2b1f91(0x240)](_0xc8847d=>{const _0x383110=_0x2b1f91;switch(_0xc8847d['type']){case _0x383110(0x203):{const _0x9eb82a=_0xc8847d['payload'][_0x383110(0x225)];_0x1953ee[_0x383110(0x203)](_0x9eb82a);break;}}}),_0x27a07e(this[_0x2b1f91(0x1f9)],_0x1953ee);}));}[_0x43c8d5(0x200)](){const _0x188ee9=_0x43c8d5;this['disposeWithMe'](this[_0x188ee9(0x259)][_0x188ee9(0x22f)][_0x188ee9(0x261)](async _0x30f39c=>{const _0x5cd481=_0x188ee9;var _0x2b1635,_0x3a02f1,_0x1d4090,_0x4f9f9e;const _0x4cec82=(_0x2b1635=this[_0x5cd481(0x236)][_0x5cd481(0x237)](_0x30f39c[_0x5cd481(0x25e)])['find'](_0x41d039=>_0x41d039[_0x5cd481(0x241)]===_0x30f39c[_0x5cd481(0x241)]))==null?void 0x0:_0x2b1635[_0x5cd481(0x23e)];if(!_0x4cec82)return;const {unitId:_0x481aaf,subUnitId:_0x43352d}=_0x4cec82;switch(_0x30f39c['user']&&this[_0x5cd481(0x251)][_0x5cd481(0x211)](_0x30f39c[_0x5cd481(0x22c)]),_0x30f39c['type']){case _0x848303['Add']:break;case _0x848303[_0x5cd481(0x243)]:{this[_0x5cd481(0x236)][_0x5cd481(0x26f)](_0x481aaf,_0x43352d,{'unitId':_0x481aaf,'subUnitId':_0x43352d,'ref':'','id':_0x30f39c[_0x5cd481(0x254)],'dT':_0x348e67(+_0x30f39c[_0x5cd481(0x26c)]),'threadId':_0x30f39c[_0x5cd481(0x241)],'personId':(_0x1d4090=(_0x3a02f1=_0x30f39c['user'])==null?void 0x0:_0x3a02f1['userID'])!=null?_0x1d4090:_0x30f39c['userId'],'text':JSON['parse'](_0x30f39c[_0x5cd481(0x264)]),'parentId':_0x4cec82['id']});break;}case _0x848303['Delete']:{const _0x723ddb=this[_0x5cd481(0x236)][_0x5cd481(0x1f1)](_0x481aaf,_0x43352d,_0x30f39c[_0x5cd481(0x254)]);_0x723ddb&&_0x723ddb[_0x5cd481(0x23b)]&&this[_0x5cd481(0x236)][_0x5cd481(0x20b)](_0x481aaf,_0x43352d,_0x30f39c[_0x5cd481(0x254)]);break;}case _0x848303[_0x5cd481(0x20d)]:{this['_threadCommentModel'][_0x5cd481(0x224)](_0x481aaf,_0x43352d,{'commentId':_0x30f39c[_0x5cd481(0x254)],'text':JSON['parse'](_0x30f39c[_0x5cd481(0x264)])});break;}case _0x848303['Solve']:{const _0x288c41=(_0x4f9f9e=this['_threadCommentModel'][_0x5cd481(0x237)](_0x30f39c[_0x5cd481(0x25e)])['find'](_0x3a8d54=>_0x3a8d54[_0x5cd481(0x241)]===_0x30f39c[_0x5cd481(0x241)]))==null?void 0x0:_0x4f9f9e[_0x5cd481(0x23e)];_0x288c41&&this['_threadCommentModel'][_0x5cd481(0x206)](_0x481aaf,_0x43352d,_0x288c41['id'],_0x30f39c['solved']===_0x256af4[_0x5cd481(0x1fe)]);break;}}}));}};_0x122c86=_0x115631([_0x3e3b62(0x0,_0x45dac1[_0x43c8d5(0x230)](_0x20292e['CommentService'])),_0x3e3b62(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x1b4bea[_0x43c8d5(0x244)])),_0x3e3b62(0x2,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x231)])),_0x3e3b62(0x3,_0x45dac1['Inject'](_0x45dac1[_0x43c8d5(0x24d)]))],_0x122c86);const _0x1475c2=_0x43c8d5(0x213),_0x3f892e={};var _0x268684=Object[_0x43c8d5(0x22a)],_0x13f40d=(_0x2a3933,_0x4101e4,_0x9012c3,_0x200fa8)=>{const _0x4a4aee=_0x43c8d5;for(var _0x3738ed=_0x200fa8>0x1?void 0x0:_0x200fa8?_0x268684(_0x4101e4,_0x9012c3):_0x4101e4,_0x2bfc8f=_0x2a3933[_0x4a4aee(0x267)]-0x1,_0x2379bd;_0x2bfc8f>=0x0;_0x2bfc8f--)(_0x2379bd=_0x2a3933[_0x2bfc8f])&&(_0x3738ed=_0x2379bd(_0x3738ed)||_0x3738ed);return _0x3738ed;},_0x537edf=(_0x9ea23f,_0x1d2bf3)=>(_0x2f4488,_0x95f62d)=>_0x1d2bf3(_0x2f4488,_0x95f62d,_0x9ea23f);function _0x5aba47(_0x5951b2,_0x1737df){const _0x23f38f=_0x43c8d5,_0x4ec2f7=_0x5951b2[_0x23f38f(0x21c)][0x0];return{..._0x1737df,'id':_0x4ec2f7[_0x23f38f(0x254)],'resolved':_0x5951b2[_0x23f38f(0x26a)]===0x1,'dT':_0x348e67(_0x4ec2f7[_0x23f38f(0x26c)]),'personId':_0x4ec2f7['userId'],'threadId':_0x4ec2f7[_0x23f38f(0x241)]};}function _0x32480c(_0x9d5992,_0x4ddfe8,_0x1a3d4a){const _0x183cea=_0x43c8d5;var _0x1195fd,_0x28fe7c;if(((_0x28fe7c=(_0x1195fd=_0x9d5992==null?void 0x0:_0x9d5992[_0x183cea(0x21c)])==null?void 0x0:_0x1195fd[_0x183cea(0x267)])!=null?_0x28fe7c:0x0)>0x0){const _0x242aa1=(_0x41a684,_0xc6b308)=>({'id':_0x41a684['replyId'],'threadId':_0x41a684[_0x183cea(0x241)],'dT':_0x348e67(_0x41a684['createTimestamp']),'personId':_0x41a684[_0x183cea(0x201)],'resolved':_0x9d5992['solved']===_0x256af4[_0x183cea(0x1fe)],'unitId':_0x4ddfe8,'subUnitId':_0x1a3d4a,'text':JSON['parse'](_0x41a684['content']),'parentId':_0xc6b308}),_0x33cc4d=_0x242aa1(_0x9d5992['replies'][0x0]);return{..._0x33cc4d,'children':_0x9d5992[_0x183cea(0x21c)][_0x183cea(0x216)](0x1)[_0x183cea(0x222)](_0x55d85b=>_0x242aa1(_0x55d85b,_0x33cc4d['id']))};}return null;}let _0x2effbb=class{constructor(_0x40414f,_0x234134,_0x465af0,_0x4ffa00){const _0x472688=_0x43c8d5;this[_0x472688(0x256)]=_0x40414f,this[_0x472688(0x251)]=_0x234134,this['_sessionService']=_0x465af0,this[_0x472688(0x1f9)]=_0x4ffa00;}async[_0x43c8d5(0x26f)](_0x24e985){const _0x2f7a4d=_0x43c8d5;var _0x5bf9f9,_0x4e06b2;const {parentId:_0x489aa3,unitId:_0x32180c,text:_0x217af8,threadId:_0x4c0a62}=_0x24e985,_0x1403ee=(_0x4e06b2=(_0x5bf9f9=_0x217af8[_0x2f7a4d(0x1f4)])==null?void 0x0:_0x5bf9f9[_0x2f7a4d(0x1f6)](_0x4aa1ac=>_0x4aa1ac[_0x2f7a4d(0x255)]===_0x45dac1['CustomRangeType']['COMMENT'])[_0x2f7a4d(0x222)](_0x331b13=>_0x331b13[_0x2f7a4d(0x26d)]))!=null?_0x4e06b2:[],_0x464b7a=JSON['stringify'](_0x217af8),_0x504694=(await this[_0x2f7a4d(0x20f)][_0x2f7a4d(0x24c)](_0x32180c))[_0x2f7a4d(0x219)]();if(_0x489aa3){const _0x49bc97={'memberId':_0x504694,'unitId':_0x32180c,'content':_0x464b7a,'mention':_0x1403ee,'threadId':_0x4c0a62},_0x58f1bd=(await this[_0x2f7a4d(0x256)][_0x2f7a4d(0x21f)]('/universer-api/comment/unit/'+_0x32180c+_0x2f7a4d(0x1f7),{'body':_0x49bc97}))['body'][_0x2f7a4d(0x23d)];return{..._0x24e985,'id':_0x58f1bd['replyId'],'dT':_0x45dac1[_0x2f7a4d(0x20c)](+_0x58f1bd['createTimestamp'])['format'](_0x2f7a4d(0x25c)),'personId':_0x58f1bd['userId']};}else{const _0x531bf0={'memberId':_0x504694,'unitId':_0x32180c,'content':_0x464b7a,'mention':_0x1403ee},_0x520fc9=await this[_0x2f7a4d(0x256)][_0x2f7a4d(0x21f)](_0x2f7a4d(0x215)+_0x32180c+_0x2f7a4d(0x26e),{'body':_0x531bf0});return _0x5aba47(_0x520fc9[_0x2f7a4d(0x214)][_0x2f7a4d(0x20e)],_0x24e985);}}async[_0x43c8d5(0x224)](_0x272235){const _0x4ce700=_0x43c8d5;var _0x22eb65,_0x5c52e3;const {text:_0x49555f,unitId:_0x47d720}=_0x272235,_0x21768c=(_0x5c52e3=(_0x22eb65=_0x49555f[_0x4ce700(0x1f4)])==null?void 0x0:_0x22eb65[_0x4ce700(0x1f6)](_0x29a33d=>_0x29a33d[_0x4ce700(0x255)]===_0x45dac1[_0x4ce700(0x239)][_0x4ce700(0x205)])[_0x4ce700(0x222)](_0x31c9c8=>_0x31c9c8[_0x4ce700(0x26d)]))!=null?_0x5c52e3:[],_0x49512d=JSON[_0x4ce700(0x210)](_0x49555f),_0x817af3=_0x272235[_0x4ce700(0x241)],_0xadbf69=_0x272235['id'],_0x3dc6c9={'memberId':(await this['_sessionService'][_0x4ce700(0x24c)](_0x47d720))[_0x4ce700(0x219)](),'unitId':_0x47d720,'threadId':_0x817af3,'mention':_0x21768c,'content':_0x49512d,'replyId':_0xadbf69},_0x458b70=await this[_0x4ce700(0x256)][_0x4ce700(0x21f)]('/universer-api/comment/unit/'+_0x47d720+'/edit',{'body':_0x3dc6c9});return!_0x458b70[_0x4ce700(0x214)][_0x4ce700(0x233)]||_0x458b70[_0x4ce700(0x214)][_0x4ce700(0x233)][_0x4ce700(0x227)]===0x1;}async[_0x43c8d5(0x206)](_0xbee941){const _0x28b6cb=_0x43c8d5,{unitId:_0x503409}=_0xbee941,_0x5d85de=_0xbee941[_0x28b6cb(0x241)],_0x15da00={'memberId':this[_0x28b6cb(0x251)]['getCurrentUser']()[_0x28b6cb(0x212)],'unitId':_0x503409,'threadId':_0x5d85de,'solved':_0xbee941[_0x28b6cb(0x217)]?_0x256af4[_0x28b6cb(0x1fe)]:_0x256af4['OpenOrReOpen']},_0x365fc3=await this[_0x28b6cb(0x256)]['post'](_0x28b6cb(0x215)+_0x503409+_0x28b6cb(0x26b),{'body':_0x15da00});return!_0x365fc3[_0x28b6cb(0x214)][_0x28b6cb(0x233)]||_0x365fc3['body'][_0x28b6cb(0x233)][_0x28b6cb(0x227)]===0x1;}async['deleteComment'](_0x83f89f,_0x50fd51,_0x501a90,_0x5cae6f){const _0x4642ca=_0x43c8d5,_0x295f6f={'memberId':(await this['_sessionService'][_0x4642ca(0x24c)](_0x83f89f))[_0x4642ca(0x219)](),'threadId':_0x501a90,'replyId':_0x5cae6f,'unitId':_0x83f89f},_0x1df292=await this[_0x4642ca(0x256)][_0x4642ca(0x21f)](_0x4642ca(0x215)+_0x83f89f+_0x4642ca(0x1f8),{'body':_0x295f6f});return!_0x1df292[_0x4642ca(0x214)]['error']||_0x1df292['body']['error'][_0x4642ca(0x227)]===0x1;}async['listComments'](_0x143512,_0x141d69,_0x26c043){const _0x3be000=_0x43c8d5,_0xb81dd2={'unitId':_0x143512,'threadId':_0x26c043},_0x576c67=await this[_0x3be000(0x256)][_0x3be000(0x21f)]('/universer-api/comment/unit/'+_0x143512+_0x3be000(0x252),{'body':_0xb81dd2}),_0x1b91ec=_0x26c043['map'](_0x3c4584=>_0x32480c(_0x576c67['body']['comments'][_0x3c4584],_0x143512,_0x141d69))[_0x3be000(0x1f6)](Boolean);return Object['values'](_0x576c67[_0x3be000(0x214)]['users'])[_0x3be000(0x240)](_0x273753=>{const _0x5bea42=_0x3be000;this['_userService'][_0x5bea42(0x211)](_0x273753);}),_0x1b91ec;}['saveCommentToSnapshot'](_0x2ef3ce){const _0x3e31c5=_0x43c8d5;return{'id':_0x2ef3ce['id'],'threadId':_0x2ef3ce[_0x3e31c5(0x241)],'ref':_0x2ef3ce[_0x3e31c5(0x246)]};}};_0x2effbb=_0x13f40d([_0x537edf(0x0,_0x45dac1[_0x43c8d5(0x230)](_0x5f2cf7[_0x43c8d5(0x1f3)])),_0x537edf(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x231)])),_0x537edf(0x2,_0x45dac1[_0x43c8d5(0x230)](_0x20292e[_0x43c8d5(0x1ff)])),_0x537edf(0x3,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1[_0x43c8d5(0x24d)]))],_0x2effbb);var _0x286cca=Object[_0x43c8d5(0x22a)],_0x41b44c=(_0x43ab10,_0xf4878a,_0x44df48,_0x2e0ac7)=>{for(var _0x440531=_0x2e0ac7>0x1?void 0x0:_0x2e0ac7?_0x286cca(_0xf4878a,_0x44df48):_0xf4878a,_0xeb2a25=_0x43ab10['length']-0x1,_0x305fe2;_0xeb2a25>=0x0;_0xeb2a25--)(_0x305fe2=_0x43ab10[_0xeb2a25])&&(_0x440531=_0x305fe2(_0x440531)||_0x440531);return _0x440531;},_0x168c7b=(_0x930d72,_0x37a9a9)=>(_0x1f5b5f,_0x371a18)=>_0x37a9a9(_0x1f5b5f,_0x371a18,_0x930d72);let _0x5076d7=class extends _0x45dac1['Disposable']{constructor(_0x22318c,_0x332822){const _0x438e6e=_0x43c8d5;super(),this[_0x438e6e(0x24a)]=_0x22318c,this['_threadCommentDataSource']=_0x332822,this[_0x438e6e(0x250)]();}[_0x43c8d5(0x250)](){const _0x49b4fe=_0x43c8d5;this[_0x49b4fe(0x24a)]['dataSource']=this['_threadCommentDataSource'],this[_0x49b4fe(0x24a)][_0x49b4fe(0x21b)]=!0x1;}};_0x5076d7=_0x41b44c([_0x168c7b(0x0,_0x1b4bea[_0x43c8d5(0x248)]),_0x168c7b(0x1,_0x45dac1['Inject'](_0x2effbb))],_0x5076d7);var _0x2c224c=Object[_0x43c8d5(0x260)],_0x5a3310=Object[_0x43c8d5(0x22a)],_0x39c18f=(_0x5e33a9,_0x56761f,_0x5c1cf8)=>_0x56761f in _0x5e33a9?_0x2c224c(_0x5e33a9,_0x56761f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c1cf8}):_0x5e33a9[_0x56761f]=_0x5c1cf8,_0x32fb9d=(_0x4d9862,_0x3388df,_0x5a05b3,_0x6ad1e1)=>{for(var _0xe6288b=_0x6ad1e1>0x1?void 0x0:_0x6ad1e1?_0x5a3310(_0x3388df,_0x5a05b3):_0x3388df,_0x1346b2=_0x4d9862['length']-0x1,_0x49525a;_0x1346b2>=0x0;_0x1346b2--)(_0x49525a=_0x4d9862[_0x1346b2])&&(_0xe6288b=_0x49525a(_0xe6288b)||_0xe6288b);return _0xe6288b;},_0x2d5542=(_0x97e8b9,_0x5c8763)=>(_0x5bc52b,_0x71eccc)=>_0x5c8763(_0x5bc52b,_0x71eccc,_0x97e8b9),_0x2de679=(_0x26b9ea,_0x7d6040,_0x2d884a)=>_0x39c18f(_0x26b9ea,typeof _0x7d6040!=_0x43c8d5(0x265)?_0x7d6040+'':_0x7d6040,_0x2d884a);_0x3b57cb[_0x43c8d5(0x226)]=class extends _0x45dac1['Plugin']{constructor(_0x159389=_0x3f892e,_0x3eb83c,_0x46f085){const _0x1c0ebd=_0x43c8d5;super(),this[_0x1c0ebd(0x1f5)]=_0x159389,this['_injector']=_0x3eb83c,this[_0x1c0ebd(0x235)]=_0x46f085;const {..._0x551fc7}=_0x45dac1[_0x1c0ebd(0x1fc)]({},_0x3f892e,this[_0x1c0ebd(0x1f5)]);this[_0x1c0ebd(0x235)][_0x1c0ebd(0x209)](_0x1475c2,_0x551fc7);}[_0x43c8d5(0x253)](){const _0x563179=_0x43c8d5;[[_0x2effbb],[_0x5076d7],[_0x122c86]][_0x563179(0x240)](_0x404963=>{const _0x40a409=_0x563179;this[_0x40a409(0x1f9)][_0x40a409(0x203)](_0x404963);});}[_0x43c8d5(0x245)](){const _0x3c8458=_0x43c8d5;this[_0x3c8458(0x1f9)][_0x3c8458(0x249)](_0x5076d7),this[_0x3c8458(0x1f9)][_0x3c8458(0x249)](_0x122c86);}},_0x2de679(_0x3b57cb[_0x43c8d5(0x226)],_0x43c8d5(0x22b),_0x12920e),_0x2de679(_0x3b57cb[_0x43c8d5(0x226)],_0x43c8d5(0x1fa),_0x45dac1[_0x43c8d5(0x223)]['UNIVER_UNKNOWN']),_0x3b57cb['UniverThreadCommentDataSourcePlugin']=_0x32fb9d([_0x45dac1[_0x43c8d5(0x20a)](_0x543281['UniverThreadCommentUIPlugin'],_0x20292e[_0x43c8d5(0x22d)],_0x1f61df[_0x43c8d5(0x204)]),_0x2d5542(0x1,_0x45dac1[_0x43c8d5(0x230)](_0x45dac1['Injector'])),_0x2d5542(0x2,_0x45dac1[_0x43c8d5(0x21a)])],_0x3b57cb[_0x43c8d5(0x226)]),Object[_0x43c8d5(0x260)](_0x3b57cb,Symbol[_0x43c8d5(0x266)],{'value':'Module'});}));function _0x6500(){const _0xf884a3=['IThreadCommentDataSourceService','get','_threadCommentDataSourceService','Solve','requireSession','Injector','disposeWithMe','816408ZaytVo','_initDataSource','_userService','/list','onStarting','replyId','rangeType','_httpService','function','UniverProCollaborationClient','_commentService','UniverCore','16405grtzuv','YYYY/MM/DD\x20HH:mm','22028310ecTEFF','unitId','UNRECOGNIZED','defineProperty','subscribe','size','delete','content','symbol','toStringTag','length','bufferTime','5663577erkXHy','solved','/solved','createTimestamp','rangeId','/add','addComment','getComment','amd','HTTPService','customRanges','_config','filter','/reply','/delete','_injector','type','UniverProThreadCommentDatasource','merge','pipe','Solved','CollaborationSessionService','_init','userId','/universer-api/user/list','add','UniverLicensePlugin','COMMENT','resolveComment','1280438jSexmt','exports','setConfig','DependentOn','deleteComment','dayjs','Edit','comment','_sessionService','stringify','addUser','userID','thread-comment-data-source.config','body','/universer-api/comment/unit/','slice','resolved','Add','getMemberID','IConfigService','syncUpdateMutationToColla','replies','Delete','@univerjs/core','post','Disposable','@univerjs/thread-comment-ui','map','UniverInstanceType','updateComment','personId','UniverThreadCommentDataSourcePlugin','code','2HQlNZS','OpenOrReOpen','getOwnPropertyDescriptor','pluginName','user','UniverCollaborationClientPlugin','UniverProLicense','commentUpdate$','Inject','UserManagerService','407449puuOzR','error','Unknown','_configService','_threadCommentModel','getUnit','15047248oECUNo','CustomRangeType','@univerjs/thread-comment','parentId','2664OEbzKz','reply','root','_initUserSync','forEach','threadId','rxjs','Reply','ThreadCommentModel','onReady','ref','@univerjs-pro/collaboration-client'];_0x6500=function(){return _0xf884a3;};return _0x6500();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504151606",
3
+ "version": "0.6.10-nightly.202504171607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.6.10-nightly.202504151606",
49
- "@univerjs/core": "0.6.10-nightly.202504151606",
50
- "@univerjs/network": "0.6.10-nightly.202504151606",
51
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504151606",
52
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504151606",
53
- "@univerjs/thread-comment": "0.6.10-nightly.202504151606",
54
- "@univerjs/protocol": "0.1.46-alpha.3"
48
+ "@univerjs-pro/license": "0.6.10-nightly.202504171607",
49
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504171607",
50
+ "@univerjs/core": "0.6.10-nightly.202504171607",
51
+ "@univerjs/network": "0.6.10-nightly.202504171607",
52
+ "@univerjs/thread-comment": "0.6.10-nightly.202504171607",
53
+ "@univerjs/protocol": "0.1.46-alpha.3",
54
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504171607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.2.6",
59
+ "vite": "^6.3.0",
60
60
  "vitest": "^3.1.1",
61
61
  "@univerjs-infra/shared": "0.6.10-alpha.0"
62
62
  },